Skip to content

Commit 628fc0d

Browse files
s-rigaudSamuel Rigaud
and
Samuel Rigaud
authored
Doc: fix some errors (#30632)
Co-authored-by: Samuel Rigaud <[email protected]>
1 parent 008362f commit 628fc0d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+77
-77
lines changed

examples/jsm/geometries/ParametricGeometries.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class ParametricTorusKnotGeometry extends ParametricTubeGeometry {
9898
const radiusSegments = segmentsR;
9999
const extrudePath = new TorusKnotCurve();
100100

101-
super( extrudePath, segments, tube, radiusSegments, true, false );
101+
super( extrudePath, segments, tube, radiusSegments, true );
102102

103103
this.radius = radius;
104104
this.tube = tube;

src/animation/PropertyBinding.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class PropertyBinding {
133133
/**
134134
* The object owns the animated property.
135135
*
136-
* @type {Object}
136+
* @type {?Object}
137137
*/
138138
this.node = PropertyBinding.findNode( rootNode, this.parsedPath.nodeName );
139139

@@ -259,7 +259,7 @@ class PropertyBinding {
259259
*
260260
* @static
261261
* @param {Object} root - The root object.
262-
* @param {string} nodeName - The name of the node.
262+
* @param {string|number} nodeName - The name of the node.
263263
* @return {?Object} The found node. Returns `null` if no object was found.
264264
*/
265265
static findNode( root, nodeName ) {

src/materials/LineBasicMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class LineBasicMaterial extends Material {
1717
/**
1818
* Constructs a new line basic material.
1919
*
20-
* @param {Object} parameters - An object with one or more properties
20+
* @param {Object} [parameters] - An object with one or more properties
2121
* defining the material's appearance. Any property of the material
2222
* (including any property from inherited materials) can be passed
2323
* in here. Color values can be passed any type of value accepted

src/materials/LineDashedMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class LineDashedMaterial extends LineBasicMaterial {
2121
/**
2222
* Constructs a new line dashed material.
2323
*
24-
* @param {Object} parameters - An object with one or more properties
24+
* @param {Object} [parameters] - An object with one or more properties
2525
* defining the material's appearance. Any property of the material
2626
* (including any property from inherited materials) can be passed
2727
* in here. Color values can be passed any type of value accepted

src/materials/Material.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ class Material extends EventDispatcher {
541541
* It is a generic implementation so it can be used with different types
542542
* of materials.
543543
*
544-
* @param {Object} values - The material values to set.
544+
* @param {Object} [values] - The material values to set.
545545
*/
546546
setValues( values ) {
547547

src/materials/MeshBasicMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class MeshBasicMaterial extends Material {
1515
/**
1616
* Constructs a new mesh basic material.
1717
*
18-
* @param {Object} parameters - An object with one or more properties
18+
* @param {Object} [parameters] - An object with one or more properties
1919
* defining the material's appearance. Any property of the material
2020
* (including any property from inherited materials) can be passed
2121
* in here. Color values can be passed any type of value accepted

src/materials/MeshDepthMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class MeshDepthMaterial extends Material {
1212
/**
1313
* Constructs a new mesh depth material.
1414
*
15-
* @param {Object} parameters - An object with one or more properties
15+
* @param {Object} [parameters] - An object with one or more properties
1616
* defining the material's appearance. Any property of the material
1717
* (including any property from inherited materials) can be passed
1818
* in here. Color values can be passed any type of value accepted

src/materials/MeshDistanceMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MeshDistanceMaterial extends Material {
1616
/**
1717
* Constructs a new mesh distance material.
1818
*
19-
* @param {Object} parameters - An object with one or more properties
19+
* @param {Object} [parameters] - An object with one or more properties
2020
* defining the material's appearance. Any property of the material
2121
* (including any property from inherited materials) can be passed
2222
* in here. Color values can be passed any type of value accepted

src/materials/MeshLambertMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MeshLambertMaterial extends Material {
2525
/**
2626
* Constructs a new mesh lambert material.
2727
*
28-
* @param {Object} parameters - An object with one or more properties
28+
* @param {Object} [parameters] - An object with one or more properties
2929
* defining the material's appearance. Any property of the material
3030
* (including any property from inherited materials) can be passed
3131
* in here. Color values can be passed any type of value accepted

src/materials/MeshMatcapMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class MeshMatcapMaterial extends Material {
1919
/**
2020
* Constructs a new mesh matcap material.
2121
*
22-
* @param {Object} parameters - An object with one or more properties
22+
* @param {Object} [parameters] - An object with one or more properties
2323
* defining the material's appearance. Any property of the material
2424
* (including any property from inherited materials) can be passed
2525
* in here. Color values can be passed any type of value accepted

src/materials/MeshNormalMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class MeshNormalMaterial extends Material {
1212
/**
1313
* Constructs a new mesh normal material.
1414
*
15-
* @param {Object} parameters - An object with one or more properties
15+
* @param {Object} [parameters] - An object with one or more properties
1616
* defining the material's appearance. Any property of the material
1717
* (including any property from inherited materials) can be passed
1818
* in here. Color values can be passed any type of value accepted

src/materials/MeshPhongMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class MeshPhongMaterial extends Material {
2323
/**
2424
* Constructs a new mesh phong material.
2525
*
26-
* @param {Object} parameters - An object with one or more properties
26+
* @param {Object} [parameters] - An object with one or more properties
2727
* defining the material's appearance. Any property of the material
2828
* (including any property from inherited materials) can be passed
2929
* in here. Color values can be passed any type of value accepted

src/materials/MeshPhysicalMaterial.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
3333
/**
3434
* Constructs a new mesh physical material.
3535
*
36-
* @param {Object} parameters - An object with one or more properties
36+
* @param {Object} [parameters] - An object with one or more properties
3737
* defining the material's appearance. Any property of the material
3838
* (including any property from inherited materials) can be passed
3939
* in here. Color values can be passed any type of value accepted
@@ -111,8 +111,8 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
111111
* How much `clearcoatNormalMap` affects the clear coat layer, from
112112
* `(0,0)` to `(1,1)`.
113113
*
114-
* @type {number}
115-
* @default 0
114+
* @type {Vector2}
115+
* @default (1,1)
116116
*/
117117
this.clearcoatNormalScale = new Vector2( 1, 1 );
118118

src/materials/MeshStandardMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class MeshStandardMaterial extends Material {
4242
/**
4343
* Constructs a new mesh standard material.
4444
*
45-
* @param {Object} parameters - An object with one or more properties
45+
* @param {Object} [parameters] - An object with one or more properties
4646
* defining the material's appearance. Any property of the material
4747
* (including any property from inherited materials) can be passed
4848
* in here. Color values can be passed any type of value accepted

src/materials/MeshToonMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class MeshToonMaterial extends Material {
1313
/**
1414
* Constructs a new mesh toon material.
1515
*
16-
* @param {Object} parameters - An object with one or more properties
16+
* @param {Object} [parameters] - An object with one or more properties
1717
* defining the material's appearance. Any property of the material
1818
* (including any property from inherited materials) can be passed
1919
* in here. Color values can be passed any type of value accepted

src/materials/PointsMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class PointsMaterial extends Material {
3131
/**
3232
* Constructs a new points material.
3333
*
34-
* @param {Object} parameters - An object with one or more properties
34+
* @param {Object} [parameters] - An object with one or more properties
3535
* defining the material's appearance. Any property of the material
3636
* (including any property from inherited materials) can be passed
3737
* in here. Color values can be passed any type of value accepted

src/materials/RawShaderMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class RawShaderMaterial extends ShaderMaterial {
1414
/**
1515
* Constructs a new raw shader material.
1616
*
17-
* @param {Object} parameters - An object with one or more properties
17+
* @param {Object} [parameters] - An object with one or more properties
1818
* defining the material's appearance. Any property of the material
1919
* (including any property from inherited materials) can be passed
2020
* in here. Color values can be passed any type of value accepted

src/materials/ShaderMaterial.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class ShaderMaterial extends Material {
4141
/**
4242
* Constructs a new shader material.
4343
*
44-
* @param {Object} parameters - An object with one or more properties
44+
* @param {Object} [parameters] - An object with one or more properties
4545
* defining the material's appearance. Any property of the material
4646
* (including any property from inherited materials) can be passed
4747
* in here. Color values can be passed any type of value accepted
@@ -226,7 +226,7 @@ class ShaderMaterial extends Material {
226226
* If set, this calls [gl.bindAttribLocation]{@link https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bindAttribLocation}
227227
* to bind a generic vertex index to an attribute variable.
228228
*
229-
* @type {?string}
229+
* @type {string|undefined}
230230
* @default undefined
231231
*/
232232
this.index0AttributeName = undefined;

src/materials/ShadowMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ShadowMaterial extends Material {
2424
/**
2525
* Constructs a new shadow material.
2626
*
27-
* @param {Object} parameters - An object with one or more properties
27+
* @param {Object} [parameters] - An object with one or more properties
2828
* defining the material's appearance. Any property of the material
2929
* (including any property from inherited materials) can be passed
3030
* in here. Color values can be passed any type of value accepted

src/materials/SpriteMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class SpriteMaterial extends Material {
2020
/**
2121
* Constructs a new sprite material.
2222
*
23-
* @param {Object} parameters - An object with one or more properties
23+
* @param {Object} [parameters] - An object with one or more properties
2424
* defining the material's appearance. Any property of the material
2525
* (including any property from inherited materials) can be passed
2626
* in here. Color values can be passed any type of value accepted

src/materials/nodes/Line2NodeMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Line2NodeMaterial extends NodeMaterial {
3333
/**
3434
* Constructs a new node material for wide line rendering.
3535
*
36-
* @param {?Object} parameters - The configuration parameter.
36+
* @param {Object} [parameters={}] - The configuration parameter.
3737
*/
3838
constructor( parameters = {} ) {
3939

src/materials/nodes/LineBasicNodeMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class LineBasicNodeMaterial extends NodeMaterial {
2020
/**
2121
* Constructs a new line basic node material.
2222
*
23-
* @param {?Object} parameters - The configuration parameter.
23+
* @param {Object} [parameters] - The configuration parameter.
2424
*/
2525
constructor( parameters ) {
2626

src/materials/nodes/LineDashedNodeMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class LineDashedNodeMaterial extends NodeMaterial {
2424
/**
2525
* Constructs a new line dashed node material.
2626
*
27-
* @param {?Object} parameters - The configuration parameter.
27+
* @param {Object} [parameters] - The configuration parameter.
2828
*/
2929
constructor( parameters ) {
3030

src/materials/nodes/MeshBasicNodeMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class MeshBasicNodeMaterial extends NodeMaterial {
2626
/**
2727
* Constructs a new mesh basic node material.
2828
*
29-
* @param {?Object} parameters - The configuration parameter.
29+
* @param {Object} [parameters] - The configuration parameter.
3030
*/
3131
constructor( parameters ) {
3232

src/materials/nodes/MeshLambertNodeMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class MeshLambertNodeMaterial extends NodeMaterial {
2222
/**
2323
* Constructs a new mesh lambert node material.
2424
*
25-
* @param {?Object} parameters - The configuration parameter.
25+
* @param {Object} [parameters] - The configuration parameter.
2626
*/
2727
constructor( parameters ) {
2828

src/materials/nodes/MeshMatcapNodeMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MeshMatcapNodeMaterial extends NodeMaterial {
2525
/**
2626
* Constructs a new mesh normal node material.
2727
*
28-
* @param {?Object} parameters - The configuration parameter.
28+
* @param {Object} [parameters] - The configuration parameter.
2929
*/
3030
constructor( parameters ) {
3131

src/materials/nodes/MeshNormalNodeMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class MeshNormalNodeMaterial extends NodeMaterial {
2727
/**
2828
* Constructs a new mesh normal node material.
2929
*
30-
* @param {?Object} parameters - The configuration parameter.
30+
* @param {Object} [parameters] - The configuration parameter.
3131
*/
3232
constructor( parameters ) {
3333

src/materials/nodes/MeshPhongNodeMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MeshPhongNodeMaterial extends NodeMaterial {
2525
/**
2626
* Constructs a new mesh lambert node material.
2727
*
28-
* @param {?Object} parameters - The configuration parameter.
28+
* @param {Object} [parameters] - The configuration parameter.
2929
*/
3030
constructor( parameters ) {
3131

src/materials/nodes/MeshPhysicalNodeMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
2727
/**
2828
* Constructs a new mesh physical node material.
2929
*
30-
* @param {?Object} parameters - The configuration parameter.
30+
* @param {Object} [parameters] - The configuration parameter.
3131
*/
3232
constructor( parameters ) {
3333

src/materials/nodes/MeshSSSNodeMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class MeshSSSNodeMaterial extends MeshPhysicalNodeMaterial {
8383
/**
8484
* Constructs a new mesh SSS node material.
8585
*
86-
* @param {?Object} parameters - The configuration parameter.
86+
* @param {Object} [parameters] - The configuration parameter.
8787
*/
8888
constructor( parameters ) {
8989

src/materials/nodes/MeshStandardNodeMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class MeshStandardNodeMaterial extends NodeMaterial {
2727
/**
2828
* Constructs a new mesh standard node material.
2929
*
30-
* @param {?Object} parameters - The configuration parameter.
30+
* @param {Object} [parameters] - The configuration parameter.
3131
*/
3232
constructor( parameters ) {
3333

src/materials/nodes/MeshToonNodeMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class MeshToonNodeMaterial extends NodeMaterial {
2121
/**
2222
* Constructs a new mesh toon node material.
2323
*
24-
* @param {?Object} parameters - The configuration parameter.
24+
* @param {Object} [parameters] - The configuration parameter.
2525
*/
2626
constructor( parameters ) {
2727

src/materials/nodes/ShadowNodeMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class ShadowNodeMaterial extends NodeMaterial {
2121
/**
2222
* Constructs a new shadow node material.
2323
*
24-
* @param {?Object} parameters - The configuration parameter.
24+
* @param {Object} [parameters] - The configuration parameter.
2525
*/
2626
constructor( parameters ) {
2727

src/materials/nodes/VolumeNodeMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class VolumeNodeMaterial extends NodeMaterial {
1818
/**
1919
* Constructs a new volume node material.
2020
*
21-
* @param {?Object} parameters - The configuration parameter.
21+
* @param {Object} [parameters] - The configuration parameter.
2222
*/
2323
constructor( parameters ) {
2424

src/nodes/accessors/InstanceNode.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ class InstanceNode extends Node {
6363
/**
6464
* The node that represents the instance matrix data.
6565
*
66-
* @type {Node}
66+
* @type {?Node}
6767
*/
6868
this.instanceMatrixNode = null;
6969

7070
/**
7171
* The node that represents the instance color data.
7272
*
73-
* @type {Node}
73+
* @type {?Node}
7474
*/
7575
this.instanceColorNode = null;
7676

@@ -86,14 +86,14 @@ class InstanceNode extends Node {
8686
/**
8787
* A reference to a buffer that is used by `instanceMatrixNode`.
8888
*
89-
* @type {InstancedInterleavedBuffer}
89+
* @type {?InstancedInterleavedBuffer}
9090
*/
9191
this.buffer = null;
9292

9393
/**
9494
* A reference to a buffer that is used by `instanceColorNode`.
9595
*
96-
* @type {InstancedBufferAttribute}
96+
* @type {?InstancedBufferAttribute}
9797
*/
9898
this.bufferColor = null;
9999

src/nodes/accessors/ReferenceBaseNode.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ReferenceElementNode extends ArrayElementNode {
2424
/**
2525
* Constructs a new reference element node.
2626
*
27-
* @param {?ReferenceBaseNode} referenceNode - The reference node.
27+
* @param {ReferenceBaseNode} referenceNode - The reference node.
2828
* @param {Node} indexNode - The index node that defines the element access.
2929
*/
3030
constructor( referenceNode, indexNode ) {
@@ -351,7 +351,7 @@ export const reference = ( name, type, object ) => nodeObject( new ReferenceBase
351351
* @param {string} name - The name of the property the node refers to.
352352
* @param {string} type - The uniform type that should be used to represent the property value.
353353
* @param {number} count - The number of value inside the array-like object.
354-
* @param {Object} object - An array-like object the property belongs to.
354+
* @param {Object} [object] - An array-like object the property belongs to.
355355
* @returns {ReferenceBaseNode}
356356
*/
357357
export const referenceBuffer = ( name, type, count, object ) => nodeObject( new ReferenceBaseNode( name, type, object, count ) );

src/nodes/accessors/StorageBufferNode.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class StorageBufferNode extends BufferNode {
8686
/**
8787
* The buffer struct type.
8888
*
89-
* @type {?structTypeNode}
89+
* @type {?StructTypeNode}
9090
* @default null
9191
*/
9292
this.structTypeNode = structTypeNode;

0 commit comments

Comments
 (0)