UNPKG

ts-useful

Version:

Functions for animation, color transitions, ecliptic, bezier, decasteljau, curves, three dimensional curves, smooth scrolling, random range, randomItem, mobius index, vectors, physics vectors, and easing.

15 lines 426 B
import { Decasteljau } from './decasteljau'; /** * * @param points ICoordinate3d[] * @param percent number * @returns ICoordinate3d */ export const ThreeD = (points, percent) => { return { x: Decasteljau(points.map((p) => p.x), percent), y: Decasteljau(points.map((p) => p.y), percent), z: Decasteljau(points.map((p) => p.z), percent) }; }; //# sourceMappingURL=threeD.js.map