Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jsdoc #26658

Closed
wants to merge 2 commits into from
Closed

Jsdoc #26658

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/core/BufferAttribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ) {
Expand Down
29 changes: 29 additions & 0 deletions src/renderers/webgl/WebGLAttributes.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
import {BufferAttribute} from 'three' ;

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused import BufferAttribute.

/**
*
* @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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -118,6 +138,11 @@ function WebGLAttributes( gl, capabilities ) {

//

/**
*
* @param {BufferAttribute} attribute
* @returns
*/
function get( attribute ) {

if ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data;
Expand All @@ -126,6 +151,10 @@ function WebGLAttributes( gl, capabilities ) {

}

/**
*
* @param {BufferAttribute} attribute
*/
function remove( attribute ) {

if ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data;
Expand Down