Skip to content

Commit

Permalink
docs: update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
06wj committed Dec 31, 2019
1 parent ad747de commit b0fcd62
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 61 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ English | [简体中文](./README_ZH.md)
* use script tag from a [cdn][cdn-url]

```
<script src='//g.alicdn.com/hilo/Hilo3d/1.13.45/Hilo3d.js'></script>
<script src='//g.alicdn.com/hilo/Hilo3d/1.13.46/Hilo3d.js'></script>
```

### Documentation
Expand Down Expand Up @@ -119,4 +119,4 @@ English | [简体中文](./README_ZH.md)
[size-image]:https://img.badgesize.io/hiloteam/hilo3d/master/build/Hilo3d.js.svg?compression=gzip&style=flat-square
[ci-url]:https://github.com/hiloteam/Hilo3d/actions?query=workflow%3A%22npm+test%22+branch%3Adev
[ci-image]:https://img.shields.io/github/workflow/status/hiloteam/Hilo3d/npm%20test?style=flat-square
[cdn-url]: https://g.alicdn.com/hilo/Hilo3d/1.13.45/Hilo3d.js
[cdn-url]: https://g.alicdn.com/hilo/Hilo3d/1.13.46/Hilo3d.js
4 changes: 2 additions & 2 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* 使用 script 标签加载 [cdn][cdn-url]
```
<script src='//g.alicdn.com/hilo/Hilo3d/1.13.45/Hilo3d.js'></script>
<script src='//g.alicdn.com/hilo/Hilo3d/1.13.46/Hilo3d.js'></script>
```
### 文档
Expand Down Expand Up @@ -120,4 +120,4 @@
[size-image]:https://img.badgesize.io/hiloteam/hilo3d/master/build/Hilo3d.js.svg?compression=gzip&style=flat-square
[ci-url]:https://github.com/hiloteam/Hilo3d/actions?query=workflow%3A%22npm+test%22+branch%3Adev
[ci-image]:https://img.shields.io/github/workflow/status/hiloteam/Hilo3d/npm%20test?style=flat-square
[cdn-url]: https://g.alicdn.com/hilo/Hilo3d/1.13.45/Hilo3d.js
[cdn-url]: https://g.alicdn.com/hilo/Hilo3d/1.13.46/Hilo3d.js
66 changes: 61 additions & 5 deletions docs/Buffer.html
Original file line number Diff line number Diff line change
Expand Up @@ -8853,12 +8853,12 @@ <h5>Returns:</h5>
<div class="nameContainer">
<h4 class="name" id="bufferSubData">

bufferSubData<span class="signature">(byteOffset, data)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Buffer.html">Buffer</a>}</span>
bufferSubData<span class="signature">(byteOffset, data, <span class="optional">isBinding</span>)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Buffer.html">Buffer</a>}</span>
</h4>


<div class="tag-source">
<a href="renderer_Buffer.js.html">renderer/Buffer.js</a>, <a href="renderer_Buffer.js.html#line153">line 153</a>
<a href="renderer_Buffer.js.html">renderer/Buffer.js</a>, <a href="renderer_Buffer.js.html#line154">line 154</a>
</div>

</div>
Expand Down Expand Up @@ -8888,6 +8888,8 @@ <h4 class="name" id="bufferSubData">
<th>Type</th>


<th>Default</th>


<th class="last">Description</th>
</tr>
Expand All @@ -8911,9 +8913,18 @@ <h4 class="name" id="bufferSubData">
</td>


<td class="default">

</td>


<td class="description last">






</td>
</tr>

Expand All @@ -8934,9 +8945,54 @@ <h4 class="name" id="bufferSubData">
</td>


<td class="default">

</td>


<td class="description last">






</td>
</tr>



<tr>

<td class="name"><code>isBinding</code></td>


<td class="type">


<span class="param-type">Boolean</span>



</td>


<td class="default">

false

</td>


<td class="description last">


<span class="optional">optional</span>





</td>
</tr>

Expand Down Expand Up @@ -9025,7 +9081,7 @@ <h4 class="name" id="uploadGeometryData">


<div class="tag-source">
<a href="renderer_Buffer.js.html">renderer/Buffer.js</a>, <a href="renderer_Buffer.js.html#line167">line 167</a>
<a href="renderer_Buffer.js.html">renderer/Buffer.js</a>, <a href="renderer_Buffer.js.html#line170">line 170</a>
</div>

</div>
Expand Down Expand Up @@ -9165,7 +9221,7 @@ <h4 class="name" id="destroyIfNoRef">


<div class="tag-source">
<a href="renderer_Buffer.js.html">renderer/Buffer.js</a>, <a href="renderer_Buffer.js.html#line187">line 187</a>
<a href="renderer_Buffer.js.html">renderer/Buffer.js</a>, <a href="renderer_Buffer.js.html#line190">line 190</a>
</div>

</div>
Expand Down Expand Up @@ -9309,7 +9365,7 @@ <h4 class="name" id="destroy">


<div class="tag-source">
<a href="renderer_Buffer.js.html">renderer/Buffer.js</a>, <a href="renderer_Buffer.js.html#line196">line 196</a>
<a href="renderer_Buffer.js.html">renderer/Buffer.js</a>, <a href="renderer_Buffer.js.html#line199">line 199</a>
</div>

</div>
Expand Down
96 changes: 48 additions & 48 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7551,10 +7551,10 @@ <h3> </h3>
<h3 align="center">A 3D WebGL Rendering Engine</h3>
<hr>
<p><a href="#Installation">Installation</a><a href="#Documentation">Documentation</a><a href="#Development">Development</a><a href="#Showcase">Showcase</a><a href="#Examples">Examples</a><a href="#Authors">Authors</a><a href="#License">License</a></p>
<p><a target="_blank" href="https://www.npmjs.com/package/hilo3d"><img src="https://img.shields.io/npm/v/hilo3d.svg?style=flat-square" alt="npm"></a> <a target="_blank" href="https://github.com/hiloteam/Hilo3d/actions?query=workflow%3A%22npm+test%22+branch%3Adev"><img src="https://img.shields.io/github/workflow/status/hiloteam/Hilo3d/npm%20test?style=flat-square" alt="ci"></a> <a target="_blank" href="https://g.alicdn.com/hilo/Hilo3d/1.13.45/Hilo3d.js"><img src="https://img.badgesize.io/hiloteam/hilo3d/master/build/Hilo3d.js.svg?compression=gzip&amp;style=flat-square" alt="size"></a> <a target="_blank" href="https://gitter.im/hiloteam/Hilo3d?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge"><img src="https://img.shields.io/badge/GITTER-join%20chat-green.svg?style=flat-square" alt="gitter.im"></a></p>
<p><a target="_blank" href="https://www.npmjs.com/package/hilo3d"><img src="https://img.shields.io/npm/v/hilo3d.svg?style=flat-square" alt="npm"></a> <a target="_blank" href="https://github.com/hiloteam/Hilo3d/actions?query=workflow%3A%22npm+test%22+branch%3Adev"><img src="https://img.shields.io/github/workflow/status/hiloteam/Hilo3d/npm%20test?style=flat-square" alt="ci"></a> <a target="_blank" href="https://g.alicdn.com/hilo/Hilo3d/1.13.46/Hilo3d.js"><img src="https://img.badgesize.io/hiloteam/hilo3d/master/build/Hilo3d.js.svg?compression=gzip&amp;style=flat-square" alt="size"></a> <a target="_blank" href="https://gitter.im/hiloteam/Hilo3d?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge"><img src="https://img.shields.io/badge/GITTER-join%20chat-green.svg?style=flat-square" alt="gitter.im"></a></p>
<h3>Features</h3>
<ul>
<li>Compatible for multiple mobile and desktop bro wsers.</li>
<li>Compatible for multiple mobile and desktop browsers.</li>
<li>Lightweight, only <code>100kb</code> after gzip.</li>
<li>Physically-based rendering support.</li>
<li>Perfect support for glTF models.</li>
Expand All @@ -7567,14 +7567,14 @@ <h3 id="Installation">Installation</h3>
</code></pre>
</li>
<li>
<p>use script tag from a <a target="_blank" href="https://g.alicdn.com/hilo/Hilo3d/1.13.45/Hilo3d.js">cdn</a></p>
<pre class="prettyprint source"><code>&lt;script src='//g.alicdn.com/hilo/Hilo3d/1.13.45/Hilo3d.js'>&lt;/script>
<p>use script tag from a <a target="_blank" href="https://g.alicdn.com/hilo/Hilo3d/1.13.46/Hilo3d.js">cdn</a></p>
<pre class="prettyprint source"><code>&lt;script src='//g.alicdn.com/hilo/Hilo3d/1.13.46/Hilo3d.js'>&lt;/script>
</code></pre>
</li>
</ul>
<h3 id="Documentation">Documentation</h3>
<ul>
<li><a href="../docs/index.html">API documentation</a></li>
<li><a target="_blank" href="https://hilo3d.js.org/docs/index.html">API documentation</a></li>
<li><a target="_blank" href="https://github.com/hiloteam/article/issues?q=is%3Aissue+is%3Aopen+label%3AHilo3d">Tutorial</a></li>
</ul>
<h3 id="Development">Development</h3>
Expand All @@ -7598,126 +7598,126 @@ <h3>Showcase</h3>
<h3 id="Examples">Examples</h3>
<ul>
<li>
<p><a href="../docs/index.html">Index.html</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/docs/index.html">Index.html</a></p>
</li>
<li>
<p>glTF</p>
<ul>
<li><a target="_blank" href="https://cx20.github.io/gltf-test/?engines=Hilo3d">glTF Feature Test</a></li>
<li><a href="../examples/glTFViewer/index.html">glTF Viewer</a></li>
<li><a target="_blank" href="https://hilo3d.js.org/examples/glTFViewer/index.html">glTF Viewer</a></li>
</ul>
</li>
<li>
<p>loader</p>
<ul>
<li><a href="../examples/loader/glTF_loader.html">gltf_loader</a></li>
<li><a href="../examples/loader/glTF_clone.html">gltf_clone</a></li>
<li><a href="../examples/loader/osg/osg_loader.html">osg</a></li>
<li><a href="../examples/loader/smd/smd_loader.html">smd</a></li>
<li><a href="../examples/loader/tga/tga_loader.html">tga</a></li>
<li><a href="../examples/loader/khc/khc.html">khc</a></li>
<li><a href="../examples/loader/shader/shader_loader.html">shader</a></li>
<li><a href="../examples/loader/draco/draco_loader.html">draco</a></li>
<li><a target="_blank" href="https://hilo3d.js.org/examples/loader/glTF_loader.html">gltf_loader</a></li>
<li><a target="_blank" href="https://hilo3d.js.org/examples/loader/glTF_clone.html">gltf_clone</a></li>
<li><a target="_blank" href="https://hilo3d.js.org/examples/loader/osg/osg_loader.html">osg</a></li>
<li><a target="_blank" href="https://hilo3d.js.org/examples/loader/smd/smd_loader.html">smd</a></li>
<li><a target="_blank" href="https://hilo3d.js.org/examples/loader/tga/tga_loader.html">tga</a></li>
<li><a target="_blank" href="https://hilo3d.js.org/examples/loader/khc/khc.html">khc</a></li>
<li><a target="_blank" href="https://hilo3d.js.org/examples/loader/shader/shader_loader.html">shader</a></li>
<li><a target="_blank" href="https://hilo3d.js.org/examples/loader/draco/draco_loader.html">draco</a></li>
</ul>
</li>
<li>
<p><a href="../examples/compressed_texture.html">compressed_texture</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/compressed_texture.html">compressed_texture</a></p>
</li>
<li>
<p><a href="../examples/fog.html">fog</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/fog.html">fog</a></p>
</li>
<li>
<p><a href="../examples/mesh_picker.html">mesh_picker</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/mesh_picker.html">mesh_picker</a></p>
</li>
<li>
<p><a href="../examples/mouse_event.html">mouse_event</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/mouse_event.html">mouse_event</a></p>
</li>
<li>
<p><a href="../examples/lifegame.html">lifegame</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/lifegame.html">lifegame</a></p>
</li>
<li>
<p><a href="../examples/normal_map.html">normal_map</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/normal_map.html">normal_map</a></p>
</li>
<li>
<p><a href="../examples/pbr.html">pbr</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/pbr.html">pbr</a></p>
</li>
<li>
<p><a href="../examples/pbr2.html">pbr2</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/pbr2.html">pbr2</a></p>
</li>
<li>
<p><a href="../examples/polly.html">polly</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/polly.html">polly</a></p>
</li>
<li>
<p><a href="../examples/post_process.html">post_process</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/post_process.html">post_process</a></p>
</li>
<li>
<p><a href="../examples/raycast.html">raycast</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/raycast.html">raycast</a></p>
</li>
<li>
<p><a href="../examples/raycast_node.html">raycast_node</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/raycast_node.html">raycast_node</a></p>
</li>
<li>
<p><a href="../examples/shader_material.html">shader_material</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/shader_material.html">shader_material</a></p>
</li>
<li>
<p><a href="../examples/shadow.html">shadow</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/shadow.html">shadow</a></p>
</li>
<li>
<p><a href="../examples/skybox.html">skybox</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/skybox.html">skybox</a></p>
</li>
<li>
<p><a href="../examples/sphereEnvMap.html">sphereEnvMap</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/sphereEnvMap.html">sphereEnvMap</a></p>
</li>
<li>
<p><a href="../examples/spotLight.html">spotLight</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/spotLight.html">spotLight</a></p>
</li>
<li>
<p><a href="../examples/ssao.html">ssao</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/ssao.html">ssao</a></p>
</li>
<li>
<p><a href="../examples/texture_data.html">texture_data</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/texture_data.html">texture_data</a></p>
</li>
<li>
<p><a href="../examples/transparent.html">transparent</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/transparent.html">transparent</a></p>
</li>
<li>
<p><a href="../examples/video_in_cube.html">video_in_cube</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/video_in_cube.html">video_in_cube</a></p>
</li>
<li>
<p><a href="../examples/webgl_support.html">webgl_support</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/webgl_support.html">webgl_support</a></p>
</li>
<li>
<p><a href="../examples/wireframe.html">wireframe</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/wireframe.html">wireframe</a></p>
</li>
<li>
<p><a href="../examples/geometry_box.html">geometry_box</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/geometry_box.html">geometry_box</a></p>
</li>
<li>
<p><a href="../examples/geometry_box2.html">geometry_box2</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/geometry_box2.html">geometry_box2</a></p>
</li>
<li>
<p><a href="../examples/geometry_color.html">geometry_color</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/geometry_color.html">geometry_color</a></p>
</li>
<li>
<p><a href="../examples/geometry_custom.html">geometry_custom</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/geometry_custom.html">geometry_custom</a></p>
</li>
<li>
<p><a href="../examples/geometry_dynamic.html">geometry_dynamic</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/geometry_dynamic.html">geometry_dynamic</a></p>
</li>
<li>
<p><a href="../examples/geometry_dynamic2.html">geometry_dynamic2</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/geometry_dynamic2.html">geometry_dynamic2</a></p>
</li>
<li>
<p><a href="../examples/geometry_instanced.html">geometry_instanced</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/geometry_instanced.html">geometry_instanced</a></p>
</li>
<li>
<p><a href="../examples/geometry_merge.html">geometry_merge</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/geometry_merge.html">geometry_merge</a></p>
</li>
<li>
<p><a href="../examples/geometry_morph.html">geometry_morph</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/geometry_morph.html">geometry_morph</a></p>
</li>
<li>
<p><a href="../examples/geometry_sphere.html">geometry_sphere</a></p>
<p><a target="_blank" href="https://hilo3d.js.org/examples/geometry_sphere.html">geometry_sphere</a></p>
</li>
</ul>
<h3 id="Authors">Authors</h3>
Expand Down
11 changes: 7 additions & 4 deletions docs/renderer_Buffer.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -7681,15 +7681,18 @@ <h1 class="page-title" data-filename="renderer_Buffer.js.html">Source: renderer/
* 上传部分数据
* @param {Number} byteOffset
* @param {TypedArray} data
* @param {Boolean} [isBinding=false]
* @return {Buffer} this
*/
bufferSubData(byteOffset, data) {
bufferSubData(byteOffset, data, isBinding = false) {
const {
gl,
target
} = this;

this.bind();
if (!isBinding) {
this.bind();
}
gl.bufferSubData(target, byteOffset, data);
return this;
},
Expand All @@ -7702,10 +7705,10 @@ <h1 class="page-title" data-filename="renderer_Buffer.js.html">Source: renderer/
if (!this.data || this.data.byteLength &lt; geometryData.data.byteLength || geometryData._isAllDirty === true) {
this.bufferData(geometryData.data);
} else if (subDataList &amp;&amp; subDataList.length) {
this.bind();
subDataList.forEach((subData) => {
this.bufferSubData(subData.byteOffset, subData.data);
this.bufferSubData(subData.byteOffset, subData.data, true);
});
geometryData.clearSubData();
} else {
this.bufferData(geometryData.data);
}
Expand Down

0 comments on commit b0fcd62

Please sign in to comment.