Skip to main content

Class: AnimationMixer

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

Coordinates reusable clip playback and blends tracks that share a target binding.

Constructors​

Constructor​

new AnimationMixer(clips?): AnimationMixer

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

Parameters​

clips?​

AnimationClip[] = []

Returns​

AnimationMixer

Properties​

time​

time: number = 0

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


timeScale​

timeScale: number = 1

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

Methods​

addClip()​

addClip(clip): this

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

Makes a named clip available for playback.

Parameters​

clip​

AnimationClip

Returns​

this


advance()​

advance(deltaTime): this

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

Advances action clocks and crossfades without evaluating CPU-side animation tracks.

Parameters​

deltaTime​

number

Returns​

this


clipAction()​

clipAction(clip, props?): AnimationAction

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

Returns the cached playback action for a clip or registered clip name.

Parameters​

clip​

string | AnimationClip

props?​

AnimationActionProps

Returns​

AnimationAction


getAction()​

getAction(name): AnimationAction | undefined

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

Returns a previously created named action, if present.

Parameters​

name​

string

Returns​

AnimationAction | undefined


setTime()​

setTime(time): this

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

Seeks every action to an absolute mixer time, in seconds.

Parameters​

time​

number

Returns​

this


stopAllAction()​

stopAllAction(): this

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

Stops and resets all registered playback actions.

Returns​

this


update()​

update(deltaTime): this

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

Advances playback by seconds, then applies blended animation values.

Parameters​

deltaTime​

number

Returns​

this