From b0fcd6226845de59ba3c21e3f416606c39ce7331 Mon Sep 17 00:00:00 2001 From: 06wj <06wj@163.com> Date: Tue, 31 Dec 2019 12:23:10 +0800 Subject: [PATCH] docs: update doc --- README.md | 4 +- README_ZH.md | 4 +- docs/Buffer.html | 66 +++++++++++++++++++++++-- docs/index.html | 96 ++++++++++++++++++------------------ docs/renderer_Buffer.js.html | 11 +++-- 5 files changed, 120 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index 453360df..0037e028 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ English | [简体中文](./README_ZH.md) * use script tag from a [cdn][cdn-url] ``` - + ``` ### Documentation @@ -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 diff --git a/README_ZH.md b/README_ZH.md index 7b0710f4..31abc02d 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -23,7 +23,7 @@ * 使用 script 标签加载 [cdn][cdn-url] ``` - + ``` ### 文档 @@ -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 diff --git a/docs/Buffer.html b/docs/Buffer.html index 980d892e..6952818a 100644 --- a/docs/Buffer.html +++ b/docs/Buffer.html @@ -8853,12 +8853,12 @@
Returns:

- bufferSubData(byteOffset, data){Buffer} + bufferSubData(byteOffset, data, isBinding){Buffer}

- renderer/Buffer.js, line 153 + renderer/Buffer.js, line 154
@@ -8888,6 +8888,8 @@

Type + Default + Description @@ -8911,9 +8913,18 @@

+ + + + + + + + + @@ -8934,9 +8945,54 @@

+ + + + + + + + + + + + + + + + + + + + isBinding + + + + + +Boolean + + + + + + + + + false + + + + + optional + + + + + @@ -9025,7 +9081,7 @@

- renderer/Buffer.js, line 167 + renderer/Buffer.js, line 170
@@ -9165,7 +9221,7 @@

- renderer/Buffer.js, line 187 + renderer/Buffer.js, line 190
@@ -9309,7 +9365,7 @@

- renderer/Buffer.js, line 196 + renderer/Buffer.js, line 199
diff --git a/docs/index.html b/docs/index.html index e5622049..1b418bce 100644 --- a/docs/index.html +++ b/docs/index.html @@ -7551,10 +7551,10 @@

A 3D WebGL Rendering Engine


InstallationDocumentationDevelopmentShowcaseExamplesAuthorsLicense

-

npm ci size gitter.im

+

npm ci size gitter.im

Features

Documentation

Development

@@ -7598,126 +7598,126 @@

Showcase

Examples

Authors

diff --git a/docs/renderer_Buffer.js.html b/docs/renderer_Buffer.js.html index 149e34dc..373a9164 100644 --- a/docs/renderer_Buffer.js.html +++ b/docs/renderer_Buffer.js.html @@ -7681,15 +7681,18 @@

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; }, @@ -7702,10 +7705,10 @@

Source: renderer/ if (!this.data || this.data.byteLength < geometryData.data.byteLength || geometryData._isAllDirty === true) { this.bufferData(geometryData.data); } else if (subDataList && 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); }