Model - animations[]
Every method of the animations[] lane. Each step of a animations[] entry returns a animation, and the lane's entries are addressed by the identity schema/lanes.ts declares for it.
| Method | Description | Arg | Type | Default | Meaning |
|---|---|---|---|---|---|
formulaTrack | Formula track — A track carrying 1 number per keyframe, authored as a formula of time rather than hand-placed keyframes — baked (sampled) into a plain keyframe track at evaluate time. Drives a numeric parameter's animation. Same grammar as curveFunction's point arg: an arrow-function expression, the engine's own AST (never eval/Function()). | formula | string | '(t) => t' | Arrow-function expression '(t) => number', t in seconds. |
duration | number | 1 | Seconds — a formula has no self-describing end, unlike a keyframe array's last entry. | ||
interpolation | string | 'LINEAR' | 'LINEAR' | 'STEP' — how the BAKED samples interpolate between each other. | ||
numberTrack | Number track — A track carrying 1 number per keyframe — a scalar channel: a numeric parameter's animation, or any single value over time. Keyframes authored directly — times + one value array per keyframe (hand-placed, or baked mocap/GLB import). | times | object | [0,1] | Keyframe times in seconds, ascending. |
values | object | [[0],[1]] | One 1-number array per keyframe, e.g. [[0],[90]]. | ||
duration | number | Seconds. Omit = times[times.length-1] (an explicit longer duration authors a hold before looping). | |||
interpolation | string | 'LINEAR' | 'LINEAR' | 'STEP'. | ||
quaternionTrack | Quaternion track — A track carrying 4 numbers per keyframe [x,y,z,w] — a skeleton joint's rotationTrack. Keyframes authored directly — times + one value array per keyframe (hand-placed, or baked mocap/GLB import). | times | object | [0,1] | Keyframe times in seconds, ascending. |
values | object | [[0,0,0,1],[0,0,0,1]] | One 4-number quaternion array per keyframe, e.g. [[0,0,0,1],[0,0,0.707,0.707]]. | ||
duration | number | Seconds. Omit = times[times.length-1] (an explicit longer duration authors a hold before looping). | |||
interpolation | string | 'LINEAR' | 'LINEAR' | 'STEP'. | ||
vectorTrack | Vector track — A track carrying 3 numbers per keyframe [x,y,z] — a skeleton joint's positionTrack or scaleTrack. Keyframes authored directly — times + one value array per keyframe (hand-placed, or baked mocap/GLB import). | times | object | [0,1] | Keyframe times in seconds, ascending. |
values | object | [[0,0,0],[0,0,1]] | One 3-number array per keyframe, e.g. [[0,0,0],[0,0,100]] (model length for a position, factors for a scale). | ||
duration | number | Seconds. Omit = times[times.length-1] (an explicit longer duration authors a hold before looping). | |||
interpolation | string | 'LINEAR' | 'LINEAR' | 'STEP'. | ||
weightsTrack | Weights track — A track carrying N numbers per keyframe, one per morph target — a mesh's morph-target weights. Keyframes authored directly — times + one value array per keyframe (hand-placed, or baked mocap/GLB import). | times | object | [0,1] | Keyframe times in seconds, ascending. |
values | object | [[0],[1]] | One array per keyframe, every array as long as the mesh's morph-target list, e.g. [[0,0],[1,0]]. | ||
duration | number | Seconds. Omit = times[times.length-1] (an explicit longer duration authors a hold before looping). | |||
interpolation | string | 'LINEAR' | 'LINEAR' | 'STEP'. |