Browse Source

Merge pull request #18991 from Mugen87/dev46

TS: Clean up Curve type declarations.
Mr.doob 5 years ago
parent
commit
7800388847
3 changed files with 5 additions and 20 deletions
  1. 5 0
      src/extras/core/Curve.d.ts
  2. 0 5
      src/extras/core/CurvePath.d.ts
  3. 0 15
      src/extras/core/Path.d.ts

+ 5 - 0
src/extras/core/Curve.d.ts

@@ -71,6 +71,11 @@ export class Curve<T extends Vector> {
 	 */
 	getTangentAt( u: number, optionalTarget?: T ): T;
 
+	clone(): Curve<T>;
+	copy( source: Curve<T> ): this;
+	toJSON(): object;
+	fromJSON( json: object ): this;
+
 	/**
 	 * @deprecated since r84.
 	 */

+ 0 - 5
src/extras/core/CurvePath.d.ts

@@ -10,14 +10,9 @@ export class CurvePath<T extends Vector> extends Curve<T> {
 	autoClose: boolean;
 
 	add( curve: Curve<T> ): void;
-	checkConnection(): boolean;
 	closePath(): void;
 	getPoint( t: number ): T;
-	getLength(): number;
-	updateArcLengths(): void;
 	getCurveLengths(): number[];
-	getSpacedPoints( divisions?: number ): T[];
-	getPoints( divisions?: number ): T[];
 
 	/**
 	 * @deprecated Use {@link Geometry#setFromPoints new THREE.Geometry().setFromPoints( points )} instead.

+ 0 - 15
src/extras/core/Path.d.ts

@@ -1,21 +1,6 @@
 import { Vector2 } from './../../math/Vector2';
 import { CurvePath } from './CurvePath';
 
-export enum PathActions {
-	MOVE_TO,
-	LINE_TO,
-	QUADRATIC_CURVE_TO, // Bezier quadratic curve
-	BEZIER_CURVE_TO, // Bezier cubic curve
-	CSPLINE_THRU, // Catmull-rom spline
-	ARC, // Circle
-	ELLIPSE,
-}
-
-export interface PathAction {
-	action: PathActions;
-	args: any;
-}
-
 /**
  * a 2d path representation, comprising of points, lines, and cubes, similar to the html5 2d canvas api. It extends CurvePath.
  */