Skip to content

Commit 84abf5e

Browse files
author
Samuel Rigaud
committed
Types: fix errors
1 parent fe2a12c commit 84abf5e

File tree

7 files changed

+11
-12
lines changed

7 files changed

+11
-12
lines changed

examples/jsm/csm/CSMFrustum.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class CSMFrustum {
1010
/**
1111
* Constructs a new CSM frustum.
1212
*
13-
* @param {CSMFrustum~Data} data - The CSM data.
13+
* @param {CSMFrustum~Data} [data] - The CSM data.
1414
*/
1515
constructor( data ) {
1616

examples/jsm/csm/CSMShadowNode.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class CSMShadowNode extends ShadowBaseNode {
4949
* Constructs a new CSM shadow node.
5050
*
5151
* @param {DirectionalLight} light - The CSM light.
52-
* @param {CSMShadowNode~Data} data - The CSM data.
52+
* @param {CSMShadowNode~Data} [data={}] - The CSM data.
5353
*/
5454
constructor( light, data = {} ) {
5555

examples/jsm/curves/NURBSUtils.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ function calcKoverI( k, i ) {
351351
* Calculates derivatives (0-nd) of rational curve. See The NURBS Book, page 127, algorithm A4.2.
352352
*
353353
* @param {Array<Vector4>} Pders - Array with derivatives.
354-
* @return {Array<Vector4>} An array with derivatives for rational curve.
354+
* @return {Array<Vector3>} An array with derivatives for rational curve.
355355
*/
356356
function calcRationalCurveDerivatives( Pders ) {
357357

@@ -395,7 +395,7 @@ function calcRationalCurveDerivatives( Pders ) {
395395
* @param {Array<Vector4>} P - The control points in homogeneous space.
396396
* @param {number} u - The parametric point.
397397
* @param {number} nd - The number of derivatives.
398-
* @return {Array<Vector4>} array with derivatives for rational curve.
398+
* @return {Array<Vector3>} array with derivatives for rational curve.
399399
*/
400400
function calcNURBSDerivatives( p, U, P, u, nd ) {
401401

@@ -411,7 +411,7 @@ function calcNURBSDerivatives( p, U, P, u, nd ) {
411411
* @param {number} q - The second degree of B-Spline surface.
412412
* @param {Array<number>} U - The first knot vector.
413413
* @param {Array<number>} V - The second knot vector.
414-
* @param {Array<Vector4>} P - The control points in homogeneous space.
414+
* @param {Array<Array<Vector4>>} P - The control points in homogeneous space.
415415
* @param {number} u - The first parametric point.
416416
* @param {number} v - The second parametric point.
417417
* @param {Vector3} target - The target vector.
@@ -461,7 +461,7 @@ function calcSurfacePoint( p, q, U, V, P, u, v, target ) {
461461
* @param {Array<number>} U - The first knot vector.
462462
* @param {Array<number>} V - The second knot vector.
463463
* @param {Array<number>} W - The third knot vector.
464-
* @param {Array<Vector4>} P - The control points in homogeneous space.
464+
* @param {Array<Array<Array<Vector4>>>} P - The control points in homogeneous space.
465465
* @param {number} u - The first parametric point.
466466
* @param {number} v - The second parametric point.
467467
* @param {number} w - The third parametric point.

examples/jsm/exporters/GLTFExporter.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ class GLTFWriter {
10751075
* @param {number} componentType
10761076
* @param {number} start
10771077
* @param {number} count
1078-
* @param {?number} target Target usage of the BufferView
1078+
* @param {number} [target] Target usage of the BufferView
10791079
* @return {Object}
10801080
*/
10811081
processBufferView( attribute, componentType, start, count, target ) {
@@ -1264,7 +1264,7 @@ class GLTFWriter {
12641264
/**
12651265
* Process attribute to generate an accessor
12661266
* @param {BufferAttribute} attribute Attribute to process
1267-
* @param {?BufferGeometry} geometry Geometry used for truncated draw range
1267+
* @param {?BufferGeometry} [geometry] Geometry used for truncated draw range
12681268
* @param {number} [start=0]
12691269
* @param {number} [count=Infinity]
12701270
* @return {?number} Index of the processed accessor on the "accessors" array

examples/jsm/exporters/PLYExporter.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class PLYExporter {
2929
* @param {Object3D} object - The 3D object to export.
3030
* @param {PLYExporter~OnDone} onDone - A callback function that is executed when the export has finished.
3131
* @param {PLYExporter~Options} options - The export options.
32-
* @return {string|ArrayBuffer} The exported PLY.
32+
* @return {?string|ArrayBuffer} The exported PLY.
3333
*/
3434
parse( object, onDone, options = {} ) {
3535

examples/jsm/lines/LineMaterial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ class LineMaterial extends ShaderMaterial {
662662
* Whether to use alphaToCoverage or not. When enabled, this can improve the
663663
* anti-aliasing of line edges when using MSAA.
664664
*
665-
* @type {Vector2}
665+
* @type {boolean}
666666
*/
667667
get alphaToCoverage() {
668668

src/textures/CanvasTexture.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class CanvasTexture extends Texture {
1313
/**
1414
* Constructs a new texture.
1515
*
16-
* @param {HTMLCanvasElement} canvas - The HTML canvas element.
16+
* @param {HTMLCanvasElement} [canvas] - The HTML canvas element.
1717
* @param {number} [mapping=Texture.DEFAULT_MAPPING] - The texture mapping.
1818
* @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value.
1919
* @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value.
@@ -22,7 +22,6 @@ class CanvasTexture extends Texture {
2222
* @param {number} [format=RGBAFormat] - The texture format.
2323
* @param {number} [type=UnsignedByteType] - The texture type.
2424
* @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
25-
* @param {string} [colorSpace=NoColorSpace] - The color space value.
2625
*/
2726
constructor( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {
2827

0 commit comments

Comments
 (0)