Skip to main content

Class: ScenegraphAnimator<TClip>

Defined in: modules/engine/src/animation/scenegraph-animator.ts:13

Playback policy shared by imported and programmatic scene animations.

Extends​

Type Parameters​

TClip​

TClip extends ScenegraphAnimationClip

Constructors​

Constructor​

new ScenegraphAnimator<TClip>(clips, mixer, options?): ScenegraphAnimator<TClip>

Defined in: modules/engine/src/animation/scenegraph-animator.ts:19

Parameters​

clips​

TClip[]

mixer​

AnimationMixer

options?​
autoplay?​

false | "first" | "all"

onUpdate?​

() => void

Returns​

ScenegraphAnimator<TClip>

Overrides​

Animator.constructor

Properties​

activeClip​

activeClip: string | undefined

Defined in: modules/engine/src/animation/scenegraph-animator.ts:15


animations​

readonly animations: TClip[]

Defined in: modules/engine/src/animation/animator.ts:55

Compatibility alias for clip list.

Inherited from​

Animator.animations


clips​

readonly clips: TClip[]

Defined in: modules/engine/src/animation/animator.ts:53

Managed clip list.

Inherited from​

Animator.clips


mixer​

readonly mixer: AnimationMixer

Defined in: modules/engine/src/animation/scenegraph-animator.ts:14

Methods​

animate()​

animate(timeMs): void

Defined in: modules/engine/src/animation/animator.ts:63

Parameters​

timeMs​

number

Returns​

void

Deprecated​

Use .setTime().

Inherited from​

Animator.animate


getAnimations()​

getAnimations(): TClip[]

Defined in: modules/engine/src/animation/animator.ts:76

Returns the managed animation clips.

Returns​

TClip[]

Inherited from​

Animator.getAnimations


selectClip()​

selectClip(name, options?): TClip

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

Selects one imported clip and optionally crossfades from the previous selection.

Parameters​

name​

string

options?​

AnimationSelectionOptions = {}

Returns​

TClip


setTime()​

setTime(timeMs): void

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

Resolves legacy wall-clock milliseconds while evaluating all clips in one mixer pass.

Parameters​

timeMs​

number

Returns​

void

Overrides​

Animator.setTime


setUpdateHandler()​

setUpdateHandler(callback): this

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

Registers the dependent scenegraph update performed once after each animation frame.

Parameters​

callback​

(() => void) | undefined

Returns​

this


update()​

update(deltaSeconds): void

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

Advances clips using delta seconds without converting the legacy millisecond clock.

Parameters​

deltaSeconds​

number

Returns​

void