Animation · function
sampleClip
Sample every track into out. Pure, allocation-free, and it reads no clock.
Explained in Animation.
function sampleClip(clip: AnimationClip, timeSec: number, out: Pose): voidimport { sampleClip } from '@driftengine/animation';Parameters
| Parameter | Type | Description |
|---|---|---|
clip | AnimationClip | |
timeSec | number | |
out | Pose |
In depth
A joint no track mentions is left exactly as it was found, which is what makes layering work: a clip animating one arm can be sampled over a pose already holding the rest of the body. The alternative — resting untouched joints — would make every partial clip a full-body clip and silently overwrite whatever it was layered onto.