AnimationMixer

The class is a player for animations on a particular object called root

Animation Class

The class is a player for animations on a particular object called root

Extends

  • EventDispatcher

Constructors

Constructor

new AnimationMixer(root, useCache?): AnimationMixer

Constructor

Parameters

root

Object3D

animation target.

useCache?

boolean

optional, default is true. By default, animationAction will be cached with root id and name when clipAction.

Returns

AnimationMixer

Overrides

EventDispatcher.constructor

Properties

_uuid

_uuid: string | null

Inherited from

EventDispatcher._uuid


_listeners

_listeners: Map<Symbol, Listener<never>[]>

Inherited from

EventDispatcher._listeners

Accessors

uuid

Get Signature

get uuid(): string

Returns

string

Set Signature

set uuid(uuid): void

Parameters
uuid

string

Returns

void

Inherited from

EventDispatcher.uuid

Methods

on()

on<T>(type, listener): void

Adds a listener to an event type.

Type Parameters

T

T

Parameters

type

EventType<T>

The type of event to listen to.

listener

Listener<T>

The function that gets called when the event is fired.

Returns

void

Inherited from

EventDispatcher.on


once()

once<T>(type, listener): void

Only active the listener one times and then off it| it.

Type Parameters

T

T

Parameters

type

EventType<T>

listener

Listener<T>

Returns

void

Inherited from

EventDispatcher.once


has()

has<T>(type, listener): boolean

Checks if listener is added to an event type.

Type Parameters

T

T

Parameters

type

EventType<T>

listener

Listener<T>

Returns

boolean

Inherited from

EventDispatcher.has


off()

off<T>(type, listener): void

Removes a listener from listening list.

Type Parameters

T

T

Parameters

type

EventType<T>

listener

Listener<T>

Returns

void

Inherited from

EventDispatcher.off


emit()

Call Signature

emit(type): void

Active the event and call the registered listener.

Parameters
type

EventType<never>

Returns

void

Inherited from

EventDispatcher.emit

Call Signature

emit<T>(type, payload): void

Active the event and call the registered listener.

Type Parameters
T

T

Parameters
type

EventType<T>

payload

T

Returns

void

Inherited from

EventDispatcher.emit


clearAllListeners()

clearAllListeners(): void

Removes all listeners from listening list.

Returns

void

Inherited from

EventDispatcher.clearAllListeners


clipAction()

clipAction(clip, root?): AnimationAction

Generating AnimationAction from AnimationClip. Calling With the same clip name and root, it will always return the same action instance.

Parameters

clip

AnimationClip

root?

Object3D

optional, default is the root of AnimationMixer. It is used for searching animation target.

Returns

AnimationAction


update()

update(deltaTime): void

Advance the mixer time and update animation

Parameters

deltaTime

number

delta time in seconds

Returns

void


setTime()

setTime(time): void

Set the mixer to a specific time and update animation

Parameters

time

number

time in seconds

Returns

void