Skip to main content

Class: AnimationAction

Defined in: modules/engine/src/animation/animation-mixer.ts:39

Playback state and blend influence for a single animation clip.

Constructors​

Constructor​

new AnimationAction(mixer, clip, props?): AnimationAction

Defined in: modules/engine/src/animation/animation-mixer.ts:53

Parameters​

mixer​

AnimationMixer

clip​

AnimationClip

props?​

AnimationActionProps = {}

Returns​

AnimationAction

Properties​

clip​

readonly clip: AnimationClip

Defined in: modules/engine/src/animation/animation-mixer.ts:40


loop​

loop: AnimationLoopMode

Defined in: modules/engine/src/animation/animation-mixer.ts:45


mixer​

readonly mixer: AnimationMixer

Defined in: modules/engine/src/animation/animation-mixer.ts:41


paused​

paused: boolean = false

Defined in: modules/engine/src/animation/animation-mixer.ts:47


playing​

playing: boolean = false

Defined in: modules/engine/src/animation/animation-mixer.ts:48


repetitions​

repetitions: number

Defined in: modules/engine/src/animation/animation-mixer.ts:46


time​

time: number = 0

Defined in: modules/engine/src/animation/animation-mixer.ts:42


timeScale​

timeScale: number

Defined in: modules/engine/src/animation/animation-mixer.ts:43


weight​

weight: number

Defined in: modules/engine/src/animation/animation-mixer.ts:44

Methods​

crossFadeFrom()​

crossFadeFrom(action, duration): this

Defined in: modules/engine/src/animation/animation-mixer.ts:143

Fades another action out while this action fades in.

Parameters​

action​

AnimationAction

duration​

number

Returns​

this


crossFadeTo()​

crossFadeTo(action, duration): this

Defined in: modules/engine/src/animation/animation-mixer.ts:136

Fades this action out while another action fades in.

Parameters​

action​

AnimationAction

duration​

number

Returns​

this


fadeIn()​

fadeIn(duration): this

Defined in: modules/engine/src/animation/animation-mixer.ts:126

Fades this action's current weight to full influence.

Parameters​

duration​

number

Returns​

this


fadeOut()​

fadeOut(duration): this

Defined in: modules/engine/src/animation/animation-mixer.ts:131

Fades this action's current weight to zero influence.

Parameters​

duration​

number

Returns​

this


pause()​

pause(): this

Defined in: modules/engine/src/animation/animation-mixer.ts:70

Temporarily suspends playback while preserving local time.

Returns​

this


play()​

play(): this

Defined in: modules/engine/src/animation/animation-mixer.ts:63

Starts or resumes playback.

Returns​

this


reset()​

reset(): this

Defined in: modules/engine/src/animation/animation-mixer.ts:91

Restores the initial clip time without changing playback state.

Returns​

this


resume()​

resume(): this

Defined in: modules/engine/src/animation/animation-mixer.ts:76

Continues playback after pausing.

Returns​

this


setEffectiveTimeScale()​

setEffectiveTimeScale(timeScale): this

Defined in: modules/engine/src/animation/animation-mixer.ts:120

Sets the action's playback speed and direction.

Parameters​

timeScale​

number

Returns​

this


setEffectiveWeight()​

setEffectiveWeight(weight): this

Defined in: modules/engine/src/animation/animation-mixer.ts:113

Sets the action's blend contribution.

Parameters​

weight​

number

Returns​

this


setLoop()​

setLoop(loop, repetitions?): this

Defined in: modules/engine/src/animation/animation-mixer.ts:105

Selects playback loop behavior and an optional traversal count.

Parameters​

loop​

AnimationLoopMode

repetitions?​

number = Number.POSITIVE_INFINITY

Returns​

this


setTime()​

setTime(time): this

Defined in: modules/engine/src/animation/animation-mixer.ts:98

Seeks to the supplied elapsed clip time, in seconds.

Parameters​

time​

number

Returns​

this


stop()​

stop(): this

Defined in: modules/engine/src/animation/animation-mixer.ts:83

Stops playback and restores the initial clip time.

Returns​

this