Header menu logo Nu

Timeline Type

The base class for all timelines.

Constructors

Constructor Description

Timeline(frameCount, propertyIds)

Full Usage: Timeline(frameCount, propertyIds)

Parameters:
    frameCount : int
    propertyIds : string[] - Unique identifiers for the properties the timeline modifies.

frameCount : int
propertyIds : string[]

Unique identifiers for the properties the timeline modifies.

Instance members

Instance member Description

this.Apply

Full Usage: this.Apply

Parameters:
    skeleton : 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 : float32 - 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). Pass -1 the first time an animation is applied to ensure frame 0 is triggered.
    time : float32 - 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 : ExposedList<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 : float32 - 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 DrawOrderTimeline or AttachmentTimeline, and other such as ScaleTimeline.

Modifiers: abstract

Applies this timeline to the skeleton.

skeleton : 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 : float32

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). Pass -1 the first time an animation is applied to ensure frame 0 is triggered.

time : float32

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 : ExposedList<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 : float32

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 DrawOrderTimeline or AttachmentTimeline, and other such as ScaleTimeline.

this.Duration

Full Usage: this.Duration

Returns: float32
Returns: float32

this.FrameCount

Full Usage: this.FrameCount

Returns: int
Modifiers: abstract

The number of frames for this timeline.

Returns: int

this.FrameEntries

Full Usage: this.FrameEntries

Returns: int
Modifiers: abstract

The number of entries stored per frame.

Returns: int

this.Frames

Full Usage: this.Frames

Returns: float32[]

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

Returns: float32[]

this.PropertyIds

Full Usage: this.PropertyIds

Returns: string[]

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

Returns: string[]

Type something to start searching.