AdvancedKeyframes, target label and value size
Interpolation algorithm used between keyframes
The property this track drives; TrackOptions#label has the format
Keyframe times in seconds
Keyframe values; TrackOptions#values has the layout
ReadonlyvalueNumber of numeric components in each sampled value
Blends a freshly sampled value into a running weighted average
The player calls it every frame while two or more playing states drive the same property. Override it where a component-wise lerp is wrong for the value, as QuaternionTrack does.
The running weighted average, updated in place
The freshly evaluated value to blend in
Blend factor for sample against values
Samples the track at a time, holding the first or last keyframe outside their range
Time in seconds
Keyframe index this returned last time, which shortens the search; 0 always works
Receives valueSize numbers
The keyframe index to pass back as index next time
Keyframes for one animated property
The glTF loader builds tracks for you. Build them yourself to author an animation in code, and pass them to AnimationOptions#tracks. Use
Trackitself for numeric arrays such as morph-target weights, and NumberTrack, Vector3Track or QuaternionTrack for numbers, vectors and rotations.Example