The base class for all timelines.

Static methods

staticsearch(frames:FloatArray, time:Float):Int

Linear search using a stride of 1.

Parameters:

time

Must be >= the first value in frames.

Returns:

The index of the first value <= time.

staticsearchWithStep(frames:FloatArray, time:Float, step:Int):Int

Linear search using the specified stride.

Parameters:

time

Must be >= the first value in frames.

Returns:

The index of the first value <= time.

Constructor

new(frameCount:Int, propertyIds:StringArray)

Parameters:

propertyIds

Unique identifiers for the properties the timeline modifies.

Variables

Methods

getPropertyIds():StringArray

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

getFrames():FloatArray

The time in seconds and any other values for each frame.

getFrameEntries():Int

The number of entries stored per frame.

getFrameCount():Int

The number of frames for this timeline.

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

Applies this timeline to the skeleton. @link EventTimeline} trigger only

      at specific times rather than every frame. In that case, the timeline triggers everything between
      <code>lastTime</code> (exclusive) and <code>time</code> (inclusive). Pass -1 the first time an animation is
      applied to ensure frame 0 is triggered.

@link DrawOrderTimeline} or {@link AttachmentTimeline}, and others such as {@link ScaleTimeline}.

Parameters:

skeleton

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

lastTime

The last time in seconds this timeline was applied. Timelines such as {

time

The time in seconds that 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 last frame, the last frame will be applied.

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 {