Stores a list of timelines to animate a skeleton's pose over time.
Constructor
Variables
Methods
getTimelines():Array<Timeline>
If the returned array or the timelines it contains are modified, {@link #setTimelines(Array)} must be called.
hasTimeline(propertyIds:StringArray):Bool
Returns true if this animation contains a timeline with any of the specified property IDs.
getDuration():Float
The duration of the animation in seconds, which is usually the highest time of all frames in the timeline. The duration is used to know when it has completed and when it should loop back to the start.
apply(skeleton:Skeleton, lastTime:Float, time:Float, loop:Bool, events:Array<Event>, alpha:Float, blend:MixBlend, direction:MixDirection):Void
Applies the animation's timelines to the specified skeleton.
See Timeline {@link Timeline#apply(Skeleton, float, float, Array, float, MixBlend, MixDirection)}.
@link #getDuration()} and loop
is
true then the animation will repeat, else the last frame will be applied.
@link #getDuration()}. @link DrawOrderTimeline} or {@link AttachmentTimeline}.
Parameters:
skeleton | The skeleton the animation is being applied to. This provides access to the bones, slots, and other skeleton components the timelines may change. |
---|---|
lastTime | The last time in seconds this animation was applied. Some timelines trigger only at specific times rather than every frame. Pass -1 the first time an animation is applied to ensure frame 0 is triggered. |
time | The time in seconds the skeleton is being posed for. Most timelines find the frame before and the frame after this time and interpolate between the frame values. If beyond the { |
loop | If true, the animation repeats after the { |
events | If any events are fired, they are added to this list. Can be null to ignore fired events or if no timelines fire events. |
alpha | 0 applies the current or setup values (depending on |
blend | Controls how mixing is applied when |
direction | Indicates whether the timelines are mixing in or out. Used by timelines which perform instant transitions, such as { |