The interface for all timelines.

Methods

apply(skeleton:Skeleton, lastTime:Float, time:Float, events:Array<Event>, alpha:Float, blend:MixBlend, direction:MixDirection):Void

Applies this timeline to the skeleton.

Parameters:

skeleton

The skeleton the timeline is being applied to. This provides access to the bones, slots, and other skeleton components the timeline may change.

lastTime

The time this timeline was last applied. Timelines such as EventTimeline trigger only at specific times rather than every frame. In that case, the timeline triggers everything between lastTime (exclusive) and time (inclusive).

time

The time within the animation. Most timelines find the key before and the key after this time so they can interpolate between the keys.

events

If any events are fired, they are added to this list. Can be null to ignore fired events or if the timeline does not fire events.

alpha

0 applies the current or setup value (depending on blend). 1 applies the timeline value. Between 0 and 1 applies a value between the current or setup value and the timeline value. By adjusting alpha over time, an animation can be mixed in or out. alpha can also be useful to apply animations on top of each other (layering).

blend

Controls how mixing is applied when alpha < 1.

direction

Indicates whether the timeline is mixing in or out. Used by timelines which perform instant transitions, such as DrawOrderTimeline or AttachmentTimeline.

getPropertyId():Int

Uniquely encodes both the type of this timeline and the skeleton property that it affects.