Skip to content

Commit 7d764ea

Browse files
author
Samuel Rigaud
committed
Docs: fix types
1 parent 1095272 commit 7d764ea

File tree

8 files changed

+23
-12
lines changed

8 files changed

+23
-12
lines changed

examples/jsm/lines/LineGeometry.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class LineGeometry extends LineSegmentsGeometry {
4343
/**
4444
* Sets the given line positions for this geometry.
4545
*
46-
* @param {Float32|Array} array - The position data to set.
46+
* @param {Float32Array|Array<number>} array - The position data to set.
4747
* @return {LineGeometry} A reference to this geometry.
4848
*/
4949
setPositions( array ) {
@@ -74,7 +74,7 @@ class LineGeometry extends LineSegmentsGeometry {
7474
/**
7575
* Sets the given line colors for this geometry.
7676
*
77-
* @param {Float32|Array} array - The position data to set.
77+
* @param {Float32Array|Array<number>} array - The position data to set.
7878
* @return {LineGeometry} A reference to this geometry.
7979
*/
8080
setColors( array ) {

examples/jsm/lines/LineSegmentsGeometry.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class LineSegmentsGeometry extends InstancedBufferGeometry {
9090
* Sets the given line positions for this geometry. The length must be a multiple of six since
9191
* each line segment is defined by a start end vertex in the pattern `(xyz xyz)`.
9292
*
93-
* @param {Float32|Array} array - The position data to set.
93+
* @param {Float32Array|Array<number>} array - The position data to set.
9494
* @return {LineSegmentsGeometry} A reference to this geometry.
9595
*/
9696
setPositions( array ) {
@@ -127,7 +127,7 @@ class LineSegmentsGeometry extends InstancedBufferGeometry {
127127
* Sets the given line colors for this geometry. The length must be a multiple of six since
128128
* each line segment is defined by a start end color in the pattern `(rgb rgb)`.
129129
*
130-
* @param {Float32|Array} array - The position data to set.
130+
* @param {Float32Array|Array<number>} array - The position data to set.
131131
* @return {LineSegmentsGeometry} A reference to this geometry.
132132
*/
133133
setColors( array ) {

examples/jsm/postprocessing/TAARenderPass.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class TAARenderPass extends SSAARenderPass {
7878
* @param {number} deltaTime - The delta time in seconds.
7979
* @param {boolean} maskActive - Whether masking is active or not.
8080
*/
81-
render( renderer, writeBuffer, readBuffer, deltaTime ) {
81+
render( renderer, writeBuffer, readBuffer, deltaTime/*, maskActive*/ ) {
8282

8383
if ( this.accumulate === false ) {
8484

src/loaders/nodes/NodeLoader.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class NodeLoader extends Loader {
7878
/**
7979
* Parse the node dependencies for the loaded node.
8080
*
81-
* @param {Object} json - The JSON definition
81+
* @param {Array<Object>} [json] - The JSON definition
8282
* @return {Object<string,Node>} A dictionary with node dependencies.
8383
*/
8484
parseNodes( json ) {
@@ -119,6 +119,10 @@ class NodeLoader extends Loader {
119119
* Parses the node from the given JSON.
120120
*
121121
* @param {Object} json - The JSON definition
122+
* @param {string} json.type - The node type.
123+
* @param {string} json.uuid - The node UUID.
124+
* @param {Array<Object>} [json.nodes] - The node dependencies.
125+
* @param {Object} [json.meta] - The meta data.
122126
* @return {Node} The parsed node.
123127
*/
124128
parse( json ) {

src/materials/Material.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class Material extends EventDispatcher {
151151
* Defines the blending equation.
152152
*
153153
* @type {(AddEquation|SubtractEquation|ReverseSubtractEquation|MinEquation|MaxEquation)}
154-
* @default OneMinusSrcAlphaFactor
154+
* @default AddEquation
155155
*/
156156
this.blendEquation = AddEquation;
157157

@@ -174,8 +174,8 @@ class Material extends EventDispatcher {
174174
/**
175175
* Defines the blending equation of the alpha channel.
176176
*
177-
* @type {(AddEquation|SubtractEquation|ReverseSubtractEquation|MinEquation|MaxEquation)}
178-
* @default OneMinusSrcAlphaFactor
177+
* @type {?(AddEquation|SubtractEquation|ReverseSubtractEquation|MinEquation|MaxEquation)}
178+
* @default null
179179
*/
180180
this.blendEquationAlpha = null;
181181

src/nodes/core/NodeBuilder.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,14 @@ class NodeBuilder {
317317
* This dictionary is also used to count the number of variables
318318
* according to their type (const, vars).
319319
*
320-
* @type {Object<string,Array<NodeVar>|number>}
320+
* @type {{
321+
* vertex: Array<NodeVar>|undefined,
322+
* fragment: Array<NodeVar>|undefined,
323+
* compute: Array<NodeVar>|undefined,
324+
* any: Array<NodeVar>|undefined,
325+
* _const: number|undefined,
326+
* _var: number|undefined
327+
* }}
321328
*/
322329
this.vars = {};
323330

src/renderers/common/XRManager.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ class XRManager extends EventDispatcher {
541541
/**
542542
* Returns the environment blend mode from the current XR session.
543543
*
544-
* @return {?('opaque'|'additive'|'alpha-blend')} The environment blend mode. Returns `null` when used outside of a XR session.
544+
* @return {'opaque'|'additive'|'alpha-blend'|undefined} The environment blend mode. Returns `undefined` when used outside of a XR session.
545545
*/
546546
getEnvironmentBlendMode() {
547547

src/renderers/webxr/WebXRManager.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ class WebXRManager extends EventDispatcher {
498498
/**
499499
* Returns the environment blend mode from the current XR session.
500500
*
501-
* @return {?('opaque'|'additive'|'alpha-blend')} The environment blend mode. Returns `null` when used outside of a XR session.
501+
* @return {'opaque'|'additive'|'alpha-blend'|undefined} The environment blend mode. Returns `undefined` when used outside of a XR session.
502502
*/
503503
this.getEnvironmentBlendMode = function () {
504504

0 commit comments

Comments
 (0)