This module contains lightweight curve utilities for evaluating common spline types,
currently focused on Bézier (quadratic/cubic) and Catmull–Rom interpolation.
These functions are handy when you need smooth parametric motion, easing-like blends,
or curve-based sampling in 1D, 2D, or 3D workflows (for example: camera rails, animated
values, or generating polyline samples).
All evaluators use a normalized parameter t in the range [0..1].
Installation
npminstall@xeokit/sdk
Usage
Below are examples of a few commonly used helpers.
xeokit Spline Curve Math Utilities
Math helpers for working with spline curves.
This module contains lightweight curve utilities for evaluating common spline types, currently focused on Bézier (quadratic/cubic) and Catmull–Rom interpolation. These functions are handy when you need smooth parametric motion, easing-like blends, or curve-based sampling in 1D, 2D, or 3D workflows (for example: camera rails, animated values, or generating polyline samples).
All evaluators use a normalized parameter
tin the range [0..1].Installation
Usage
Below are examples of a few commonly used helpers.
Import the functions:
Quadratic Bézier tangent at
tCubic Bézier tangent at
tSpline tangent basis at
tCatmull–Rom interpolation at
tQuadratic Bézier value at
tCubic Bézier value at
t