Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types: fix errors #30665

Merged
merged 1 commit into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/jsm/csm/CSMFrustum.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {

Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/csm/CSMShadowNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {} ) {

Expand Down
8 changes: 4 additions & 4 deletions examples/jsm/curves/NURBSUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {

Expand Down Expand Up @@ -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 ) {

Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions examples/jsm/exporters/GLTFExporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/exporters/PLYExporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {} ) {

Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/lines/LineMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

Expand Down
3 changes: 1 addition & 2 deletions src/textures/CanvasTexture.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 ) {

Expand Down