Procházet zdrojové kódy

Types: fix errors (#30665)

Co-authored-by: Samuel Rigaud <srigaud@duodisplay.com>
Samuel Rigaud před 1 rokem
rodič
revize
222a903ee0

+ 1 - 1
examples/jsm/csm/CSMFrustum.js

@@ -10,7 +10,7 @@ class CSMFrustum {
 	/**
 	 * Constructs a new CSM frustum.
 	 *
-	 * @param {CSMFrustum~Data} data - The CSM data.
+	 * @param {CSMFrustum~Data} [data] - The CSM data.
 	 */
 	constructor( data ) {
 

+ 1 - 1
examples/jsm/csm/CSMShadowNode.js

@@ -49,7 +49,7 @@ class CSMShadowNode extends ShadowBaseNode {
 	 * Constructs a new CSM shadow node.
 	 *
 	 * @param {DirectionalLight} light - The CSM light.
-	 * @param {CSMShadowNode~Data} data - The CSM data.
+	 * @param {CSMShadowNode~Data} [data={}] - The CSM data.
 	 */
 	constructor( light, data = {} ) {
 

+ 4 - 4
examples/jsm/curves/NURBSUtils.js

@@ -351,7 +351,7 @@ function calcKoverI( k, i ) {
  * Calculates derivatives (0-nd) of rational curve. See The NURBS Book, page 127, algorithm A4.2.
  *
  * @param {Array<Vector4>} Pders - Array with derivatives.
- * @return {Array<Vector4>} An array with derivatives for rational curve.
+ * @return {Array<Vector3>} An array with derivatives for rational curve.
  */
 function calcRationalCurveDerivatives( Pders ) {
 
@@ -395,7 +395,7 @@ function calcRationalCurveDerivatives( Pders ) {
  * @param {Array<Vector4>} P - The control points in homogeneous space.
  * @param {number} u - The parametric point.
  * @param {number} nd - The number of derivatives.
- * @return {Array<Vector4>} array with derivatives for rational curve.
+ * @return {Array<Vector3>} array with derivatives for rational curve.
  */
 function calcNURBSDerivatives( p, U, P, u, nd ) {
 
@@ -411,7 +411,7 @@ function calcNURBSDerivatives( p, U, P, u, nd ) {
  * @param {number} q - The second degree of B-Spline surface.
  * @param {Array<number>} U - The first knot vector.
  * @param {Array<number>} V - The second knot vector.
- * @param {Array<Vector4>} P - The control points in homogeneous space.
+ * @param {Array<Array<Vector4>>} P - The control points in homogeneous space.
  * @param {number} u - The first parametric point.
  * @param {number} v - The second parametric point.
  * @param {Vector3} target - The target vector.
@@ -461,7 +461,7 @@ function calcSurfacePoint( p, q, U, V, P, u, v, target ) {
  * @param {Array<number>} U - The first knot vector.
  * @param {Array<number>} V - The second knot vector.
  * @param {Array<number>} W - The third knot vector.
- * @param {Array<Vector4>} P - The control points in homogeneous space.
+ * @param {Array<Array<Array<Vector4>>>} P - The control points in homogeneous space.
  * @param {number} u - The first parametric point.
  * @param {number} v - The second parametric point.
  * @param {number} w - The third parametric point.

+ 2 - 2
examples/jsm/exporters/GLTFExporter.js

@@ -1075,7 +1075,7 @@ class GLTFWriter {
 	 * @param {number} componentType
 	 * @param {number} start
 	 * @param {number} count
-	 * @param {?number} target Target usage of the BufferView
+	 * @param {number} [target] Target usage of the BufferView
 	 * @return {Object}
 	 */
 	processBufferView( attribute, componentType, start, count, target ) {
@@ -1264,7 +1264,7 @@ class GLTFWriter {
 	/**
 	 * Process attribute to generate an accessor
 	 * @param {BufferAttribute} attribute Attribute to process
-	 * @param {?BufferGeometry} geometry Geometry used for truncated draw range
+	 * @param {?BufferGeometry} [geometry] Geometry used for truncated draw range
 	 * @param {number} [start=0]
 	 * @param {number} [count=Infinity]
 	 * @return {?number} Index of the processed accessor on the "accessors" array

+ 1 - 1
examples/jsm/exporters/PLYExporter.js

@@ -29,7 +29,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 = {} ) {
 

+ 1 - 1
examples/jsm/lines/LineMaterial.js

@@ -662,7 +662,7 @@ class LineMaterial extends ShaderMaterial {
 	 * Whether to use alphaToCoverage or not. When enabled, this can improve the
 	 * anti-aliasing of line edges when using MSAA.
 	 *
-	 * @type {Vector2}
+	 * @type {boolean}
 	 */
 	get alphaToCoverage() {
 

+ 1 - 2
src/textures/CanvasTexture.js

@@ -13,7 +13,7 @@ class CanvasTexture extends Texture {
 	/**
 	 * Constructs a new texture.
 	 *
-	 * @param {HTMLCanvasElement} canvas - The HTML canvas element.
+	 * @param {HTMLCanvasElement} [canvas] - The HTML canvas element.
 	 * @param {number} [mapping=Texture.DEFAULT_MAPPING] - The texture mapping.
 	 * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value.
 	 * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value.
@@ -22,7 +22,6 @@ class CanvasTexture extends Texture {
 	 * @param {number} [format=RGBAFormat] - The texture format.
 	 * @param {number} [type=UnsignedByteType] - The texture type.
 	 * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
-	 * @param {string} [colorSpace=NoColorSpace] - The color space value.
 	 */
 	constructor( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {
 

粤ICP备19079148号