Skip to content

AnimationAction

new AnimationAction(clip: AnimationClip, localRoot?)

THREE equivalent: THREE.AnimationAction

Playback state for a single AnimationClip. Controls play/stop, looping, weight, and cross-fading. Typically created via Animator.clipAction().

Name Type Description
enabled boolean Whether this action is actively advancing. Default true.
weight number Blend weight [0–1]. Default 1.
timeScale number Playback rate multiplier. Default 1.
time number Current playback position in seconds.
loop number LoopOnce | LoopRepeat | LoopPingPong. Default LoopRepeat.
repetitions number Maximum repetitions before stopping. Default Infinity.
clampWhenFinished boolean When true and LoopOnce, the action freezes at the last frame instead of stopping. Default false.
paused boolean Suspends time advancement without disabling the action. Default false.
clip AnimationClip The clip this action plays.
Method Description
play(): this Enables the action.
stop(): this Disables the action and resets time to 0.
reset(): this Resets time to 0 and re-enables the action.
setLoop(mode: number, repetitions: number): this Sets the loop mode and repetition count.
fadeIn(duration: number): this Animates weight from 0 to 1 over duration seconds.
fadeOut(duration: number): this Animates weight from 1 to 0 over duration seconds.
crossFadeFrom(fadeOutAction: AnimationAction, duration: number): this Fades out another action while this one fades in.