Manage your cookie settings. You can enable or disable different types of cookies below. For more details, see our Privacy Policy.

AnimationGraph

1.4.6+

Wrapper around a native animation graph.

.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.

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

.toString() ⇒ string