MorphWeightSpline
A spline that linearly interpolates over an array of weight values used by morph targets.
const times = [ 0.0, 1.5, 3.0, 4.5, 6.0 ];
const weights = [0.0, 1.0, 0.25, 0.75, 0.5, 0.5, 0.75, 0.25, 1.0, 0.0]; //Two targets
const spline = new WeightSpline({
times : times,
weights : weights
});
const p0 = spline.evaluate(times[0]);
Content copied to clipboard
See also
Types
Link copied to clipboard
interface ConstructorOptions
Functions
Link copied to clipboard
fun evaluate(time: Double, result: ReadonlyArray<Double>? = definedExternally): ReadonlyArray<Double>
Evaluates the curve at a given time.
Link copied to clipboard
Finds an index i
in times
such that the parameter time
is in the interval [times[i], times[i + 1]]
.