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.

19 lines 610 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ThreeD = void 0; const decasteljau_1 = require("./decasteljau"); /** * * @param points ICoordinate3d[] * @param percent number * @returns ICoordinate3d */ const ThreeD = (points, percent) => { return { x: (0, decasteljau_1.Decasteljau)(points.map((p) => p.x), percent), y: (0, decasteljau_1.Decasteljau)(points.map((p) => p.y), percent), z: (0, decasteljau_1.Decasteljau)(points.map((p) => p.z), percent) }; }; exports.ThreeD = ThreeD; //# sourceMappingURL=threeD.js.map