Ver Fonte

Merge pull request #19519 from linbingquan/dev-cleanup-ts

TS: Clean up.
Mr.doob há 5 anos atrás
pai
commit
d43cbd6cc4

+ 1 - 1
src/math/Box2.d.ts

@@ -23,7 +23,7 @@ export class Box2 {
 	expandByScalar( scalar: number ): Box2;
 	expandByScalar( scalar: number ): Box2;
 	containsPoint( point: Vector2 ): boolean;
 	containsPoint( point: Vector2 ): boolean;
 	containsBox( box: Box2 ): boolean;
 	containsBox( box: Box2 ): boolean;
-	getParameter( point: Vector2 ): Vector2;
+	getParameter( point: Vector2, target: Vector2 ): Vector2;
 	intersectsBox( box: Box2 ): boolean;
 	intersectsBox( box: Box2 ): boolean;
 	clampPoint( point: Vector2, target: Vector2 ): Vector2;
 	clampPoint( point: Vector2, target: Vector2 ): Vector2;
 	distanceToPoint( point: Vector2 ): number;
 	distanceToPoint( point: Vector2 ): number;

+ 1 - 1
src/math/Box3.d.ts

@@ -32,7 +32,7 @@ export class Box3 {
 	expandByObject( object: Object3D ): this;
 	expandByObject( object: Object3D ): this;
 	containsPoint( point: Vector3 ): boolean;
 	containsPoint( point: Vector3 ): boolean;
 	containsBox( box: Box3 ): boolean;
 	containsBox( box: Box3 ): boolean;
-	getParameter( point: Vector3 ): Vector3;
+	getParameter( point: Vector3, target: Vector3 ): Vector3;
 	intersectsBox( box: Box3 ): boolean;
 	intersectsBox( box: Box3 ): boolean;
 	intersectsSphere( sphere: Sphere ): boolean;
 	intersectsSphere( sphere: Sphere ): boolean;
 	intersectsPlane( plane: Plane ): boolean;
 	intersectsPlane( plane: Plane ): boolean;

+ 1 - 1
src/math/Matrix3.d.ts

@@ -76,7 +76,7 @@ export class Matrix3 implements Matrix {
 	setFromMatrix4( m: Matrix4 ): Matrix3;
 	setFromMatrix4( m: Matrix4 ): Matrix3;
 	multiplyScalar( s: number ): Matrix3;
 	multiplyScalar( s: number ): Matrix3;
 	determinant(): number;
 	determinant(): number;
-	getInverse( matrix: Matrix3, throwOnDegenerate?: boolean ): Matrix3;
+	getInverse( matrix: Matrix3 ): Matrix3;
 
 
 	/**
 	/**
 	 * Transposes this matrix in place.
 	 * Transposes this matrix in place.

+ 1 - 1
src/math/Vector2.d.ts

@@ -35,7 +35,7 @@ export interface Vector {
 	 *
 	 *
 	 * add(v:T):T;
 	 * add(v:T):T;
 	 */
 	 */
-	add( v: Vector, w?: Vector ): this;
+	add( v: Vector ): this;
 
 
 	/**
 	/**
 	 * addVectors(a:T, b:T):T;
 	 * addVectors(a:T, b:T):T;

+ 3 - 4
src/math/Vector3.d.ts

@@ -71,7 +71,7 @@ export class Vector3 implements Vector {
 	/**
 	/**
 	 * Adds v to this vector.
 	 * Adds v to this vector.
 	 */
 	 */
-	add( v: Vector3, w?: Vector3 ): this;
+	add( v: Vector3 ): this;
 
 
 	addScalar( s: number ): this;
 	addScalar( s: number ): this;
 
 
@@ -211,7 +211,7 @@ export class Vector3 implements Vector {
 	/**
 	/**
 	 * Sets this vector to cross product of itself and v.
 	 * Sets this vector to cross product of itself and v.
 	 */
 	 */
-	cross( a: Vector3, w?: Vector3 ): this;
+	cross( a: Vector3 ): this;
 
 
 	/**
 	/**
 	 * Sets this vector to cross product of a and b.
 	 * Sets this vector to cross product of a and b.
@@ -283,8 +283,7 @@ export class Vector3 implements Vector {
 
 
 	fromBufferAttribute(
 	fromBufferAttribute(
 		attribute: BufferAttribute,
 		attribute: BufferAttribute,
-		index: number,
-		offset?: number
+		index: number
 	): this;
 	): this;
 
 
 	/**
 	/**

+ 2 - 3
src/math/Vector4.d.ts

@@ -68,7 +68,7 @@ export class Vector4 implements Vector {
 	/**
 	/**
 	 * Adds v to this vector.
 	 * Adds v to this vector.
 	 */
 	 */
-	add( v: Vector4, w?: Vector4 ): this;
+	add( v: Vector4 ): this;
 
 
 	addScalar( scalar: number ): this;
 	addScalar( scalar: number ): this;
 
 
@@ -206,8 +206,7 @@ export class Vector4 implements Vector {
 
 
 	fromBufferAttribute(
 	fromBufferAttribute(
 		attribute: BufferAttribute,
 		attribute: BufferAttribute,
-		index: number,
-		offset?: number
+		index: number
 	): this;
 	): this;
 
 
 	/**
 	/**