diff --git a/src/core/BufferAttribute.js b/src/core/BufferAttribute.js index 8d2495e8c4104e..1a80841b430a80 100644 --- a/src/core/BufferAttribute.js +++ b/src/core/BufferAttribute.js @@ -9,6 +9,12 @@ const _vector2 = /*@__PURE__*/ new Vector2(); class BufferAttribute { + /** + * + * @param {TypedArray} array + * @param {*} itemSize + * @param {*} normalized + */ constructor( array, itemSize, normalized = false ) { if ( Array.isArray( array ) ) { diff --git a/src/renderers/webgl/WebGLAttributes.js b/src/renderers/webgl/WebGLAttributes.js index e810f967465665..deb01c1458ee9f 100644 --- a/src/renderers/webgl/WebGLAttributes.js +++ b/src/renderers/webgl/WebGLAttributes.js @@ -1,9 +1,23 @@ +import {BufferAttribute} from 'three' ; + +/** + * + * @param {WebGL2RenderingContext} gl + * @param {*} capabilities + * @returns + */ function WebGLAttributes( gl, capabilities ) { const isWebGL2 = capabilities.isWebGL2; const buffers = new WeakMap(); + /** + * + * @param {BufferAttribute} attribute + * @param {number} bufferType gl.ARRAY_BUFFER | gl.ELEMENT_ARRAY_BUFFER + * @returns + */ function createBuffer( attribute, bufferType ) { const array = attribute.array; @@ -81,6 +95,12 @@ function WebGLAttributes( gl, capabilities ) { } + /** + * + * @param {WebGLBuffer} buffer + * @param {BufferAttribute} attribute + * @param {number} bufferType gl.ARRAY_BUFFER | gl.ELEMENT_ARRAY_BUFFER + */ function updateBuffer( buffer, attribute, bufferType ) { const array = attribute.array; @@ -118,6 +138,11 @@ function WebGLAttributes( gl, capabilities ) { // + /** + * + * @param {BufferAttribute} attribute + * @returns + */ function get( attribute ) { if ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data; @@ -126,6 +151,10 @@ function WebGLAttributes( gl, capabilities ) { } + /** + * + * @param {BufferAttribute} attribute + */ function remove( attribute ) { if ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data;