diff --git a/examples/jsm/controls/ArcballControls.js b/examples/jsm/controls/ArcballControls.js index 8c5eede8cccc63..5d95ff1be09d93 100644 --- a/examples/jsm/controls/ArcballControls.js +++ b/examples/jsm/controls/ArcballControls.js @@ -1315,7 +1315,7 @@ class ArcballControls extends Controls { * * @param {'PAN'|'ROTATE'|'ZOOM'|'FOV'} operation - The operation to be performed ('PAN', 'ROTATE', 'ZOOM', 'FOV'). * @param {0|1|2|'WHEEL'} mouse - A mouse button (0, 1, 2) or 'WHEEL' for wheel notches. - * @param {'CTRL'|'SHIFT'|null} [key=null] - The keyboard modifier ('CTRL', 'SHIFT') or null if key is not needed. + * @param {?('CTRL'|'SHIFT')} [key=null] - The keyboard modifier ('CTRL', 'SHIFT') or null if key is not needed. * @returns {boolean} `true` if the mouse action has been successfully added, `false` otherwise. */ setMouseAction( operation, mouse, key = null ) { @@ -1396,7 +1396,7 @@ class ArcballControls extends Controls { * Remove a mouse action by specifying its mouse/key combination. * * @param {0|1|2|'WHEEL'} mouse - A mouse button (0, 1, 2) or 'WHEEL' for wheel notches. - * @param {'CTRL'|'SHIFT'|null} key - The keyboard modifier ('CTRL', 'SHIFT') or null if key is not needed. + * @param {?('CTRL'|'SHIFT')} key - The keyboard modifier ('CTRL', 'SHIFT') or null if key is not needed. * @returns {boolean} `true` if the operation has been successfully removed, `false` otherwise. */ unsetMouseAction( mouse, key = null ) { @@ -1421,8 +1421,8 @@ class ArcballControls extends Controls { * * @private * @param {0|1|2|'WHEEL'} mouse - Mouse button index (0, 1, 2) or 'WHEEL' for wheel notches. - * @param {'CTRL'|'SHIFT'|null} key - Keyboard modifier. - * @returns {'PAN'|'ROTATE'|'ZOOM'|'FOV'|null} The operation if it has been found, `null` otherwise. + * @param {?('CTRL'|'SHIFT')} key - Keyboard modifier. + * @returns {?('PAN'|'ROTATE'|'ZOOM'|'FOV')} The operation if it has been found, `null` otherwise. */ getOpFromAction( mouse, key ) { @@ -1463,7 +1463,7 @@ class ArcballControls extends Controls { * * @private * @param {0|1|2} mouse - Mouse button index (0, 1, 2) - * @param {'CTRL'|'SHIFT'|null} key - Keyboard modifier + * @param {?('CTRL'|'SHIFT')} key - Keyboard modifier * @returns {?STATE} The FSA state obtained from the operation associated to mouse/keyboard combination. */ getOpStateFromAction( mouse, key ) { @@ -2509,8 +2509,8 @@ class ArcballControls extends Controls { * Sets values in transformation object. * * @private - * @param {Matrix4} [camera=null] - Transformation to be applied to the camera. - * @param {Matrix4} [gizmos=null] - Transformation to be applied to gizmos. + * @param {?Matrix4} [camera=null] - Transformation to be applied to the camera. + * @param {?Matrix4} [gizmos=null] - Transformation to be applied to gizmos. */ setTransformationMatrices( camera = null, gizmos = null ) { diff --git a/examples/jsm/exporters/GLTFExporter.js b/examples/jsm/exporters/GLTFExporter.js index 2c1d8368ddbb57..2da060f940b591 100644 --- a/examples/jsm/exporters/GLTFExporter.js +++ b/examples/jsm/exporters/GLTFExporter.js @@ -1559,7 +1559,7 @@ class GLTFWriter { /** * Process material * @param {THREE.Material} material Material to process - * @return {Promise} Index of the processed material in the "materials" array + * @return {Promise} Index of the processed material in the "materials" array */ async processMaterialAsync( material ) { @@ -1735,7 +1735,7 @@ class GLTFWriter { /** * Process mesh * @param {THREE.Mesh} mesh Mesh to process - * @return {Promise} Index of the processed mesh in the "meshes" array + * @return {Promise} Index of the processed mesh in the "meshes" array */ async processMeshAsync( mesh ) { @@ -2189,7 +2189,7 @@ class GLTFWriter { * * @param {THREE.AnimationClip} clip * @param {THREE.Object3D} root - * @return {number|null} + * @return {?number} */ processAnimation( clip, root ) { @@ -2299,7 +2299,7 @@ class GLTFWriter { /** * @param {THREE.Object3D} object - * @return {number|null} + * @return {?number} */ processSkin( object ) { diff --git a/examples/jsm/exporters/PLYExporter.js b/examples/jsm/exporters/PLYExporter.js index d5a2fb6ac6aa2a..22feb7d2a1b0f6 100644 --- a/examples/jsm/exporters/PLYExporter.js +++ b/examples/jsm/exporters/PLYExporter.js @@ -31,7 +31,7 @@ class PLYExporter { * @param {Object3D} object - The 3D object to export. * @param {PLYExporter~OnDone} onDone - A callback function that is executed when the export has finished. * @param {PLYExporter~Options} options - The export options. - * @return {?string|ArrayBuffer} The exported PLY. + * @return {?(string|ArrayBuffer)} The exported PLY. */ parse( object, onDone, options = {} ) { diff --git a/examples/jsm/loaders/ColladaLoader.js b/examples/jsm/loaders/ColladaLoader.js index d9fc05f8e011b6..07ac10ef172be1 100644 --- a/examples/jsm/loaders/ColladaLoader.js +++ b/examples/jsm/loaders/ColladaLoader.js @@ -113,7 +113,7 @@ class ColladaLoader extends Loader { * * @param {string} text - The raw Collada data as a string. * @param {string} path - The asset path. - * @return {{scene:Group,animations:Array,kinematics:Object}} An object representing the parsed asset. + * @return {?{scene:Group,animations:Array,kinematics:Object}} An object representing the parsed asset. */ parse( text, path ) { diff --git a/examples/jsm/loaders/GLTFLoader.js b/examples/jsm/loaders/GLTFLoader.js index c3da8872ba5741..38f8c14fb50063 100644 --- a/examples/jsm/loaders/GLTFLoader.js +++ b/examples/jsm/loaders/GLTFLoader.js @@ -2943,7 +2943,7 @@ class GLTFParser { * @private * @param {string} type * @param {number} index - * @return {Promise} + * @return {Promise} */ getDependency( type, index ) { @@ -3283,7 +3283,7 @@ class GLTFParser { * * @private * @param {number} textureIndex - * @return {Promise} + * @return {Promise} */ loadTexture( textureIndex ) { @@ -4020,7 +4020,7 @@ class GLTFParser { * * @private * @param {number} cameraIndex - * @return {Promise} + * @return {Promise|undefined} */ loadCamera( cameraIndex ) { diff --git a/examples/jsm/math/ConvexHull.js b/examples/jsm/math/ConvexHull.js index a58fdf43f25807..d529fa6ee5e321 100644 --- a/examples/jsm/math/ConvexHull.js +++ b/examples/jsm/math/ConvexHull.js @@ -152,7 +152,7 @@ class ConvexHull { * * @param {Ray} ray - The ray to test. * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3|null} The intersection point. Returns `null` if not intersection was detected. + * @return {?Vector3} The intersection point. Returns `null` if not intersection was detected. */ intersectRay( ray, target ) { @@ -1298,7 +1298,7 @@ class HalfEdge { * Returns the origin vertex. * * @private - * @return {VertexNode} The destination vertex. + * @return {?VertexNode} The destination vertex. */ tail() { diff --git a/examples/jsm/misc/MD2CharacterComplex.js b/examples/jsm/misc/MD2CharacterComplex.js index ef6372b4c004b3..005a9a5133568e 100644 --- a/examples/jsm/misc/MD2CharacterComplex.js +++ b/examples/jsm/misc/MD2CharacterComplex.js @@ -121,7 +121,7 @@ class MD2CharacterComplex { /** * The movement controls. * - * @type {Object} + * @type {?Object} * @default null */ this.controls = null; diff --git a/examples/jsm/misc/ProgressiveLightMap.js b/examples/jsm/misc/ProgressiveLightMap.js index b5ef7bf2e9c114..64bf63caa1838a 100644 --- a/examples/jsm/misc/ProgressiveLightMap.js +++ b/examples/jsm/misc/ProgressiveLightMap.js @@ -280,7 +280,7 @@ class ProgressiveLightMap { * * @private * @param {number} res - The square resolution of this object's lightMap. - * @param {WebGLRenderTarget} [lightMap] - The lightmap to initialize the plane with. + * @param {?WebGLRenderTarget} [lightMap] - The lightmap to initialize the plane with. */ _initializeBlurPlane( res, lightMap = null ) { diff --git a/examples/jsm/tsl/display/ChromaticAberrationNode.js b/examples/jsm/tsl/display/ChromaticAberrationNode.js index 8e86a2afee99ce..3fedafbcaaad95 100644 --- a/examples/jsm/tsl/display/ChromaticAberrationNode.js +++ b/examples/jsm/tsl/display/ChromaticAberrationNode.js @@ -189,7 +189,7 @@ export default ChromaticAberrationNode; * @function * @param {Node} node - The node that represents the input of the effect. * @param {Node|number} [strength=1.0] - The strength of the chromatic aberration effect as a node or value. - * @param {Node|Vector2} [center=null] - The center point of the effect as a node or value. If null, uses screen center (0.5, 0.5). + * @param {?(Node|Vector2)} [center=null] - The center point of the effect as a node or value. If null, uses screen center (0.5, 0.5). * @param {Node|number} [scale=1.1] - The scale factor for stepped scaling from center as a node or value. * @returns {ChromaticAberrationNode} */ diff --git a/examples/jsm/utils/BufferGeometryUtils.js b/examples/jsm/utils/BufferGeometryUtils.js index 611478bf4177c2..c84dc7b2bbc998 100644 --- a/examples/jsm/utils/BufferGeometryUtils.js +++ b/examples/jsm/utils/BufferGeometryUtils.js @@ -446,7 +446,7 @@ function deepCloneAttribute( attribute ) { * single {@link InterleavedBuffer} instance. All attributes must have compatible types. * * @param {Array} attributes - The attributes to interleave. - * @return {Array} An array of interleaved attributes. If interleave does not succeed, the method returns `null`. + * @return {?Array} An array of interleaved attributes. If interleave does not succeed, the method returns `null`. */ function interleaveAttributes( attributes ) { diff --git a/examples/jsm/webxr/OculusHandModel.js b/examples/jsm/webxr/OculusHandModel.js index c8cb4806c82712..37cea089375c58 100644 --- a/examples/jsm/webxr/OculusHandModel.js +++ b/examples/jsm/webxr/OculusHandModel.js @@ -122,7 +122,7 @@ class OculusHandModel extends Object3D { /** * Returns the pointer position which is the position of the index finger tip. * - * @return {Vector3|null} The pointer position. Returns `null` if not index finger tip joint was found. + * @return {?Vector3} The pointer position. Returns `null` if not index finger tip joint was found. */ getPointerPosition() { diff --git a/src/core/BufferGeometry.js b/src/core/BufferGeometry.js index 8cf0cba4460a4c..84f1bf92174fba 100644 --- a/src/core/BufferGeometry.js +++ b/src/core/BufferGeometry.js @@ -156,7 +156,7 @@ class BufferGeometry extends EventDispatcher { /** * Bounding box for the geometry which can be calculated with `computeBoundingBox()`. * - * @type {Box3} + * @type {?Box3} * @default null */ this.boundingBox = null; @@ -164,7 +164,7 @@ class BufferGeometry extends EventDispatcher { /** * Bounding sphere for the geometry which can be calculated with `computeBoundingSphere()`. * - * @type {Sphere} + * @type {?Sphere} * @default null */ this.boundingSphere = null; diff --git a/src/lights/webgpu/ProjectorLight.js b/src/lights/webgpu/ProjectorLight.js index ea683c6563b1a3..ad1580163c3c01 100644 --- a/src/lights/webgpu/ProjectorLight.js +++ b/src/lights/webgpu/ProjectorLight.js @@ -24,7 +24,7 @@ class ProjectorLight extends SpotLight { /** * Aspect ratio of the light. Set to `null` to use the texture aspect ratio. * - * @type {number} + * @type {?number} * @default null */ this.aspect = null; diff --git a/src/nodes/accessors/CubeTextureNode.js b/src/nodes/accessors/CubeTextureNode.js index e1e778cd7e0f65..cdc03c337414fe 100644 --- a/src/nodes/accessors/CubeTextureNode.js +++ b/src/nodes/accessors/CubeTextureNode.js @@ -149,7 +149,7 @@ export const cubeTextureBase = /*@__PURE__*/ nodeProxy( CubeTextureNode ).setPar * * @tsl * @function - * @param {?CubeTexture|CubeTextureNode} [value=EmptyTexture] - The cube texture. + * @param {?(CubeTexture|CubeTextureNode)} [value=EmptyTexture] - The cube texture. * @param {?Node} [uvNode=null] - The uv node. * @param {?Node} [levelNode=null] - The level node. * @param {?Node} [biasNode=null] - The bias node. diff --git a/src/nodes/accessors/Object3DNode.js b/src/nodes/accessors/Object3DNode.js index 42b77798aa074e..add6f07d90d9e7 100644 --- a/src/nodes/accessors/Object3DNode.js +++ b/src/nodes/accessors/Object3DNode.js @@ -73,7 +73,7 @@ class Object3DNode extends Node { /** * Overwritten since the node type is inferred from the scope. * - * @return {string} The node type. + * @return {('mat4'|'vec3'|'float')} The node type. */ getNodeType() { diff --git a/src/nodes/accessors/TextureNode.js b/src/nodes/accessors/TextureNode.js index a0c80fe3ec65b8..cedca60e1be94c 100644 --- a/src/nodes/accessors/TextureNode.js +++ b/src/nodes/accessors/TextureNode.js @@ -818,7 +818,7 @@ const textureBase = /*@__PURE__*/ nodeProxy( TextureNode ).setParameterLength( 1 * * @tsl * @function - * @param {?Texture|TextureNode} [value=EmptyTexture] - The texture. + * @param {?(Texture|TextureNode)} [value=EmptyTexture] - The texture. * @param {?Node} [uvNode=null] - The uv node. * @param {?Node} [levelNode=null] - The level node. * @param {?Node} [biasNode=null] - The bias node. @@ -862,7 +862,7 @@ export const uniformTexture = ( value = EmptyTexture ) => texture( value ); * * @tsl * @function - * @param {?Texture|TextureNode} [value=EmptyTexture] - The texture. + * @param {?(Texture|TextureNode)} [value=EmptyTexture] - The texture. * @param {?Node} [uvNode=null] - The uv node. * @param {?Node} [levelNode=null] - The level node. * @param {?Node} [biasNode=null] - The bias node. diff --git a/src/nodes/core/Node.js b/src/nodes/core/Node.js index dca63097c6b84f..6fcfac1a55eff3 100644 --- a/src/nodes/core/Node.js +++ b/src/nodes/core/Node.js @@ -549,7 +549,7 @@ class Node extends EventDispatcher { * This state builds the output node and returns the resulting shader string. * * @param {NodeBuilder} builder - The current node builder. - * @param {?string} output - Can be used to define the output type. + * @param {?string} [output] - Can be used to define the output type. * @return {?string} The generated shader string. */ generate( builder, output ) { @@ -613,8 +613,8 @@ class Node extends EventDispatcher { * - **generate**: Generates the shader code for the node. Returns the generated shader string. * * @param {NodeBuilder} builder - The current node builder. - * @param {string|Node|null} [output=null] - Can be used to define the output type. - * @return {Node|string|null} The result of the build process, depending on the build stage. + * @param {?(string|Node)} [output=null] - Can be used to define the output type. + * @return {?(Node|string)} The result of the build process, depending on the build stage. */ build( builder, output = null ) { @@ -773,7 +773,7 @@ class Node extends EventDispatcher { /** * Returns the child nodes as a JSON object. * - * @return {Array} An iterable list of serialized child objects as JSON. + * @return {Generator} An iterable list of serialized child objects as JSON. */ getSerializeChildren() { diff --git a/src/nodes/core/NodeBuilder.js b/src/nodes/core/NodeBuilder.js index 806c426aea786e..0d0f0aefad35b2 100644 --- a/src/nodes/core/NodeBuilder.js +++ b/src/nodes/core/NodeBuilder.js @@ -2260,8 +2260,8 @@ class NodeBuilder { * * @param {Node} node - The node to execute. * @param {string} buildStage - The build stage to execute the node in. - * @param {Node|string|null} output - Expected output type. For example 'vec3'. - * @return {Node|string|null} The result of the node build. + * @param {?(Node|string)} [output=null] - Expected output type. For example 'vec3'. + * @return {?(Node|string)} The result of the node build. */ flowBuildStage( node, buildStage, output = null ) { @@ -2387,7 +2387,7 @@ class NodeBuilder { * @param {Node} node - The node to execute. * @param {?string} output - Expected output type. For example 'vec3'. * @param {?string} propertyName - The property name to assign the result. - * @return {Object|Node|null} The code flow or node.build() result. + * @return {?(Object|Node)} The code flow or node.build() result. */ flowNodeFromShaderStage( shaderStage, node, output = null, propertyName = null ) { diff --git a/src/nodes/core/SubBuildNode.js b/src/nodes/core/SubBuildNode.js index cc583c6a16f3a6..b4409bc239311c 100644 --- a/src/nodes/core/SubBuildNode.js +++ b/src/nodes/core/SubBuildNode.js @@ -7,7 +7,7 @@ import { nodeObject } from '../tsl/TSLCore.js'; * @augments Node * @param {Node} node - The node to be built in the sub-build. * @param {string} name - The name of the sub-build. - * @param {string|null} [nodeType=null] - The type of the node, if known. + * @param {?string} [nodeType=null] - The type of the node, if known. */ class SubBuildNode extends Node { @@ -83,7 +83,7 @@ export default SubBuildNode; * @function * @param {Node} node - The node to be built in the sub-build. * @param {string} name - The name of the sub-build. - * @param {string|null} [type=null] - The type of the node, if known. + * @param {?string} [type=null] - The type of the node, if known. * @returns {Node} A node object wrapping the SubBuildNode instance. */ export const subBuild = ( node, name, type = null ) => nodeObject( new SubBuildNode( nodeObject( node ), name, type ) ); diff --git a/src/nodes/display/ScreenNode.js b/src/nodes/display/ScreenNode.js index 2f01a72656828a..0a5d157d6cd736 100644 --- a/src/nodes/display/ScreenNode.js +++ b/src/nodes/display/ScreenNode.js @@ -67,7 +67,7 @@ class ScreenNode extends Node { /** * This method is overwritten since the node type depends on the selected scope. * - * @return {('vec2'|'vec4')} The node type. + * @return {('float'|'vec2'|'vec4')} The node type. */ getNodeType() { diff --git a/src/objects/BatchedMesh.js b/src/objects/BatchedMesh.js index c0806d4dfbbfb5..f1daef8c862554 100644 --- a/src/objects/BatchedMesh.js +++ b/src/objects/BatchedMesh.js @@ -971,7 +971,7 @@ class BatchedMesh extends Mesh { * * @param {number} geometryId - The ID of the geometry to return the bounding box for. * @param {Box3} target - The target object that is used to store the method's result. - * @return {Box3|null} The geometry's bounding box. Returns `null` if no geometry has been found for the given ID. + * @return {?Box3} The geometry's bounding box. Returns `null` if no geometry has been found for the given ID. */ getBoundingBoxAt( geometryId, target ) { @@ -1016,7 +1016,7 @@ class BatchedMesh extends Mesh { * * @param {number} geometryId - The ID of the geometry to return the bounding sphere for. * @param {Sphere} target - The target object that is used to store the method's result. - * @return {Sphere|null} The geometry's bounding sphere. Returns `null` if no geometry has been found for the given ID. + * @return {?Sphere} The geometry's bounding sphere. Returns `null` if no geometry has been found for the given ID. */ getBoundingSphereAt( geometryId, target ) { diff --git a/src/objects/LOD.js b/src/objects/LOD.js index 2152e541ec4d2f..6219e62c9c793b 100644 --- a/src/objects/LOD.js +++ b/src/objects/LOD.js @@ -183,7 +183,7 @@ class LOD extends Object3D { * the given distance. * * @param {number} distance - The LOD distance. - * @return {Object3D|null} The found 3D object. `null` if no 3D object has been found. + * @return {?Object3D} The found 3D object. `null` if no 3D object has been found. */ getObjectForDistance( distance ) { diff --git a/src/renderers/common/Attributes.js b/src/renderers/common/Attributes.js index 8b877a90aef110..7f356cf855b2b6 100644 --- a/src/renderers/common/Attributes.js +++ b/src/renderers/common/Attributes.js @@ -33,7 +33,7 @@ class Attributes extends DataMap { * Deletes the data for the given attribute. * * @param {BufferAttribute} attribute - The attribute. - * @return {Object|null} The deleted attribute data. + * @return {?Object} The deleted attribute data. */ delete( attribute ) { diff --git a/src/renderers/common/Renderer.js b/src/renderers/common/Renderer.js index 4507848188eea6..b20d659c288bff 100644 --- a/src/renderers/common/Renderer.js +++ b/src/renderers/common/Renderer.js @@ -2327,7 +2327,7 @@ class Renderer { * if the renderer has been initialized. * * @param {Node|Array} computeNodes - The compute node(s). - * @param {Array|number} [dispatchSizeOrCount=null] - Array with [ x, y, z ] values for dispatch or a single number for the count. + * @param {?(Array|number)} [dispatchSizeOrCount=null] - Array with [ x, y, z ] values for dispatch or a single number for the count. * @return {Promise|undefined} A Promise that resolve when the compute has finished. Only returned when the renderer has not been initialized. */ compute( computeNodes, dispatchSizeOrCount = null ) { @@ -2426,7 +2426,7 @@ class Renderer { * * @async * @param {Node|Array} computeNodes - The compute node(s). - * @param {Array|number} [dispatchSizeOrCount=null] - Array with [ x, y, z ] values for dispatch or a single number for the count. + * @param {?(Array|number)} [dispatchSizeOrCount=null] - Array with [ x, y, z ] values for dispatch or a single number for the count. * @return {Promise} A Promise that resolve when the compute has finished. */ async computeAsync( computeNodes, dispatchSizeOrCount = null ) { @@ -2532,7 +2532,7 @@ class Renderer { * Copies the current bound framebuffer into the given texture. * * @param {FramebufferTexture} framebufferTexture - The texture. - * @param {?Vector2|Vector4} [rectangle=null] - A two or four dimensional vector that defines the rectangular portion of the framebuffer that should be copied. + * @param {?(Vector2|Vector4)} [rectangle=null] - A two or four dimensional vector that defines the rectangular portion of the framebuffer that should be copied. */ copyFramebufferToTexture( framebufferTexture, rectangle = null ) { diff --git a/src/renderers/common/SampledTexture.js b/src/renderers/common/SampledTexture.js index e665b8b6b05b4f..0a33e44d403c76 100644 --- a/src/renderers/common/SampledTexture.js +++ b/src/renderers/common/SampledTexture.js @@ -6,7 +6,7 @@ let _id = 0; * Represents a sampled texture binding type. * * @private - * @augments Binding + * @augments Sampler */ class SampledTexture extends Sampler { diff --git a/src/renderers/webgl-fallback/WebGLBackend.js b/src/renderers/webgl-fallback/WebGLBackend.js index b1072f0264e38f..1e874d763901d2 100644 --- a/src/renderers/webgl-fallback/WebGLBackend.js +++ b/src/renderers/webgl-fallback/WebGLBackend.js @@ -198,7 +198,7 @@ class WebGLBackend extends Backend { * the WebXR device API. * * @private - * @type {WebGLFramebuffer} + * @type {?WebGLFramebuffer} * @default null */ this._xrFramebuffer = null; @@ -817,7 +817,7 @@ class WebGLBackend extends Backend { * @param {Node} computeNode - The compute node. * @param {Array} bindings - The bindings. * @param {ComputePipeline} pipeline - The compute pipeline. - * @param {number|null} [count=null] - The count of compute invocations. If `null`, the count is determined by the compute node. + * @param {?number} [count=null] - The count of compute invocations. If `null`, the count is determined by the compute node. */ compute( computeGroup, computeNode, bindings, pipeline, count = null ) { diff --git a/src/renderers/webgl-fallback/utils/WebGLState.js b/src/renderers/webgl-fallback/utils/WebGLState.js index 1d781e13df2b74..42d33bb2d3fccf 100644 --- a/src/renderers/webgl-fallback/utils/WebGLState.js +++ b/src/renderers/webgl-fallback/utils/WebGLState.js @@ -848,7 +848,7 @@ class WebGLState { * Sets the vertex state by binding the given VAO and element buffer. * * @param {WebGLVertexArrayObject} vao - The VAO. - * @param {WebGLBuffer} indexBuffer - The index buffer. + * @param {?WebGLBuffer} indexBuffer - The index buffer. * @return {boolean} Whether a vertex state has been changed or not. */ setVertexState( vao, indexBuffer = null ) { diff --git a/src/renderers/webgpu/WebGPUBackend.js b/src/renderers/webgpu/WebGPUBackend.js index 0d5e64c42f9f38..014df6da24da32 100644 --- a/src/renderers/webgpu/WebGPUBackend.js +++ b/src/renderers/webgpu/WebGPUBackend.js @@ -1304,7 +1304,7 @@ class WebGPUBackend extends Backend { * @param {Node} computeNode - The compute node. * @param {Array} bindings - The bindings. * @param {ComputePipeline} pipeline - The compute pipeline. - * @param {Array|number} [dispatchSizeOrCount=null] - Array with [ x, y, z ] values for dispatch or a single number for the count. + * @param {?(Array|number)} [dispatchSizeOrCount=null] - Array with [ x, y, z ] values for dispatch or a single number for the count. */ compute( computeGroup, computeNode, bindings, pipeline, dispatchSizeOrCount = null ) {