Browse Source

Merge pull request #21036 from ycw/patch-1

ts: added .computeFrenetFrames
Mr.doob 4 years ago
parent
commit
1303b65062
1 changed files with 10 additions and 0 deletions
  1. 10 0
      src/extras/core/Curve.d.ts

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

@@ -1,4 +1,5 @@
 import { Vector } from './../../math/Vector2';
 import { Vector } from './../../math/Vector2';
+import { Vector3 } from './../../math/Vector3';
 
 
 // Extras / Core /////////////////////////////////////////////////////////////////////
 // Extras / Core /////////////////////////////////////////////////////////////////////
 
 
@@ -76,6 +77,15 @@ export class Curve<T extends Vector> {
 	 */
 	 */
 	getTangentAt( u: number, optionalTarget?: T ): T;
 	getTangentAt( u: number, optionalTarget?: T ): T;
 
 
+	/**
+	 * Generate Frenet frames of the curve
+	 */
+	computeFrenetFrames( segments: number, closed?: boolean ): {
+		tangents: Vector3[],
+		normals: Vector3[],
+		binormals: Vector3[]
+	};
+
 	clone(): Curve<T>;
 	clone(): Curve<T>;
 	copy( source: Curve<T> ): this;
 	copy( source: Curve<T> ): this;
 	toJSON(): object;
 	toJSON(): object;