UNPKG

toosoon-utils

Version:
29 lines (28 loc) 734 B
import type { Point3 } from '../../types'; import { Vector3 } from '../geometry'; import Curve from './Curve'; /** * Utility class for manipulating 3D splines * * @exports * @class SplineCurve3 * @extends Curve */ export default class SplineCurve3 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; }