Object containing common interpolation functions.
These functions can be passed in the interpolation argument and will only affect fields where you gave an array as target value
Geometric interpolation functions. Good for interpolating positions in space.
Bezier:function
Bezier(v: number[], k: number): number
A Bézier curve is defined by a set of control points P0 through Pn, where n is called its order.
The first and last control points are always the end points of the curve; however, the intermediate control points (if any) generally do not lie on the curve.
A Catmullrom spline is a curve where the original set of points is also used as control points.
Usually Catmullrom splines need two extra elements at the beginning and the end of the point set. This function contemplates that and doesn't need them.
Assumes your points are a succession of cubic bezier curves where the endpoint of one is the start point of the next one.
for example: [Point in the curve, Control point, Control point, Point in the curve, Control point, Control point, Point in the curve]
Parameters
v: number[]
k: number
Returns number
Linear:function
Linear(v: number[], k: number): number
Linear interpolation is like drawing straight lines between the points.
Parameters
v: number[]
k: number
Returns number
QuadraticBezier:function
QuadraticBezier(v: number[], k: number): number
Assumes your points are a succession of quadratic bezier curves where the endpoint of one is the start point of the next one.
for example: [Point in the curve, Control point, Point in the curve, Control point, Point in the curve]
Object containing common interpolation functions. These functions can be passed in the interpolation argument and will only affect fields where you gave an array as target value