Animation · class
RigidAnimation
A clip bound to a list of nodes, one per joint the clip's tracks name.
Explained in Animation.
class RigidAnimationimport { RigidAnimation } from '@driftengine/animation';In depth
The pose is claimed once at construction and reused, so apply allocates nothing however often
it runs.
Constructor
new
constructor(clip: AnimationClip, nodes: readonly (SceneNode | null)[])| Parameter | Type | Description |
|---|---|---|
clip | AnimationClip | |
nodes | readonly (SceneNode | null)[] | Indexed by joint. null for a joint this scene did not instantiate. |
Methods
apply
apply(timeSec: number): voidSample at a caller-supplied time and write every bound node. Reads no clock.
| Parameter | Type | Description |
|---|---|---|
timeSec | number |
More
A joint with no node is skipped rather than refused. An imported clip names joints a scene may not have instantiated, and the right behaviour is the parts that exist moving — the reliability rules forbid throwing in a frame loop outright, and a missing prop is not a reason to stop a scene.