Skip to content

Animator

new Animator(root: Node)

THREE equivalent: THREE.AnimationMixer

Manages AnimationActions on a root Node. Call update(delta) each frame to advance all enabled actions and apply blended property values.

Differs from THREE.js

Constructor takes the root node directly rather than a scene.

Name Type Description
root object The root Node passed at construction.
time number Total accumulated time in seconds.
Method Description
clipAction(clip: AnimationClip): AnimationAction Finds or creates an AnimationAction for the given clip and returns it.
existingAction(clip: AnimationClip): AnimationAction|undefined Returns an existing action without creating one, or undefined.
update(delta: number): void Advances all enabled actions by delta seconds and applies the blended result to the scene graph.
stopAllAction(): void Stops and disables all actions.
uncacheClip(clip: AnimationClip): void Removes all actions and bindings for the given clip.