Private
_blendPrivate
_blendPrivate
_blendPrivate
_componentPrivate
_controllerPrivate
_maskPrivate
_namePrivate
_startingPrivate
_targetPrivate
_weightReturns the currently active state name.
The active states time in seconds.
Returns the currently active states duration.
Returns the currently active state's progress as a value normalized by the state's animation duration. Looped animations will return values greater than 1.
A mask of bones which should be animated or ignored by this layer.
entity.anim.baseLayer.mask = {
// include the spine of the current model and all of its children
"path/to/spine": {
children: true
},
// include the hip of the current model but not all of its children
"path/to/hip": true
};
Returns the name of the layer.
Returns true if a state graph has been loaded and all states in the graph have been assigned animation tracks.
Whether this layer is currently playing.
Returns the previously active state name.
Lists all available states in this layers state graph.
If the anim component layer is currently transitioning between states, returns the progress. Otherwise returns null.
Returns whether the anim component layer is currently transitioning between states.
The blending weight of this layer. Used when calculating the value of properties that are animated by more than one layer.
Assigns an animation track to a state or blend tree node in the current graph. If a state for the given nodePath doesn't exist, it will be created. If all states nodes are linked and the AnimComponent#activate value was set to true then the component will begin playing.
Either the state name or the path to a blend tree node that this
animation should be associated with. Each section of a blend tree path is split using a
period (.
) therefore state names should not include this character (e.g "MyStateName" or
"MyStateName.BlendTreeNode").
The animation track that will be assigned to this state and played whenever this state is active.
Optional
speed: numberUpdate the speed of the state you are assigning an animation to. Defaults to 1.
Optional
loop: booleanUpdate the loop property of the state you are assigning an animation to. Defaults to true.
Transition to any state in the current layers graph. Transitions can be instant or take an optional blend time.
The state that this transition will transition to.
Optional
time: number = 0The duration of the transition in seconds. Defaults to 0.
Optional
transitionOffset: number = nullIf provided, the destination state will begin playing its animation at this time. Given in normalized time, based on the states duration & must be between 0 and 1. Defaults to null.
The Anim Component Layer allows managers a single layer of the animation state graph.