AnimationGraphManager
1.5.0+
Manage animation graphs.
Creation
Creating an animation graph with a one dimensional blend tree is done using blend1D
Static Members
- .constructor(scene) ⇒ AnimationGraphManager
Methods
- .blend1D(anims) ⇒ AnimationGraph
Constructor
.constructor(scene: Prefab) ⇒ AnimationGraphManager
| Param | Type | Description |
|---|---|---|
scene | Prefab |
Methods
.blend1D(anims: Animation[]) ⇒ AnimationGraph
Generate an animation graph that blends between a list of animation in 1 dimension.
Usage
const graph = engine.animationsGraphs.blend1D([idle, walk, run]);
object.getComponent(AnimationComponent).animation = graph;
Note: All animations must have the same number of tracks and only the first animation has to be retargeted to the object/skin.
Returns: The new animation graph.
| Param | Type | Description |
|---|---|---|
anims | Animation[] | Array of anims to blend. |