Skip to content

Commit b36d77d

Browse files
s-rigaudSamuel Rigaud
and
Samuel Rigaud
authored
Docs: fix types (#30791)
Co-authored-by: Samuel Rigaud <[email protected]>
1 parent 1ff2268 commit b36d77d

File tree

8 files changed

+16
-12
lines changed

8 files changed

+16
-12
lines changed

Diff for: 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 ) {

Diff for: 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 ) {

Diff for: examples/jsm/loaders/RGBMLoader.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class RGBMLoader extends DataTextureLoader {
6464
/**
6565
* Sets the maximum range.
6666
*
67-
* @param {number} value - The maximum range to set.
67+
* @param {(7|16)} value - The maximum range to set.
6868
* @return {RGBMLoader} A reference to this loader.
6969
*/
7070
setMaxRange( value ) {

Diff for: 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

Diff for: 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 ) {

Diff for: 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

Diff for: 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

Diff for: 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)