AnimationGraph

1.4.6+

Wrapper around a native animation graph.

Methods


Methods

.setPlaybackSpeed(samplerIndex: number, speed: number) ⇒ void

1.5.0+

Set the playback speed of a sampler in the graph.

Note: The index of the sampler is the same as the index of the animation in the graph.

Usage

Following example creates a graph with 1D blending, but reuses the forward walk animation as backwards walk by setting the playbackspeed of its sampler to -1.

const graph = engine.animationGraphs.blend1D([walk, idle, walk]);
graph.setPlaybackSpeed(0, -1.0);
ParamTypeDescription
samplerIndexnumberIndex of the sampler
speednumberPlayback speed to set

.toString() ⇒ string