UNPKG

toosoon-utils

Version:
29 lines (28 loc) 740 B
import type { Point3 } from '../../types'; import { Vector3 } from '../geometry'; import Curve from './Curve'; /** * Utility class for manipulating 3D polylines * * @exports * @class PolylineCurve3 * @extends Curve */ export default class PolylineCurve3 extends Curve<Vector3> { readonly type: string; /** * Array of points defining the curve */ points: Point3[]; /** * @param {Point3[]} [points] Array of points defining the curve */ constructor(points?: Point3[]); /** * Interpolate a point on this curve * * @param {number} t Normalized time value to interpolate * @returns {Vector3} Interpolated coordinates on this curve */ getPoint(t: number): Vector3; }