gizlang/animation
import * as Animation from "gizlang/animation";Types
Channel
type Channel = { times: Vec<f64>; values: Vec<f64>; lanes: i64; interpolation: string; quaternion: bool; }A sampled field channel. CUBICSPLINE values contain in-tangent, value and out-tangent for every key.
times:Vec<f64>values:Vec<f64>lanes:i64interpolation:stringquaternion:bool
Functions
validate
function validate(channel: Channel): void throws stringValidates a channel once, before it participates in simulation.
Effects: fail, alloc.
blend
function blend(values: Vec<Vec<f64>>, weights: Vec<f64>, quaternion: bool = false): Vec<f64> throws stringNormalized weighted layers. Rotations use hemisphere-correct quaternion nlerp, shared by tools and runtime poses.
Effects: fail, read, write, alloc.
sample
function sample(channel: Channel, time: f64): Vec<f64> throws stringSamples a validated channel, clamping before/after its keys. Quaternion LINEAR uses shortest-path slerp.
Effects: fail, read, write, alloc.