Timeline

The base class for all timelines.

Static Members

Linear search using a stride of 1.

Name Type Description
frames spine.support.utils.FloatArray
time Float Must be >= the first value in frames.
Returns Description
Int The index of the first value <= time.

spine
searchWithStep(frames: spine.support.utils.FloatArray, time: Float, step: Int): Int

Linear search using the specified stride.

Name Type Description
frames spine.support.utils.FloatArray
time Float Must be >= the first value in frames.
step Int
Returns Description
Int The index of the first value <= time.

Instance Members


spine
getPropertyIds(): spine.support.utils.StringArray

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

Returns
spine.support.utils.StringArray

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

Returns
spine.support.utils.FloatArray

spine
getFrameEntries(): Int

The number of entries stored per frame.

Returns
Int

spine
getFrameCount(): Int

The number of frames for this timeline.

Returns
Int

spine
getDuration(): Float
Returns
Float

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

Applies this timeline to the skeleton. @link DrawOrderTimeline} or {@link AttachmentTimeline}, and others such as {@link ScaleTimeline}.

Name Type Description
skeleton 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 Float The last time in seconds this timeline was applied. Timelines such as {
time Float 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 spine.support.utils.Array<Event> 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 Float 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 MixBlend Controls how mixing is applied when alpha < 1.
direction MixDirection Indicates whether the timeline is mixing in or out. Used by timelines which perform instant transitions, such as {

spine
new(frameCount: Int, propertyIds: spine.support.utils.StringArray): Void
Name Type Description
frameCount Int
propertyIds spine.support.utils.StringArray Unique identifiers for the properties the timeline modifies.

Private Members