The base class for a {@link CurveTimeline} which sets two properties.

Static variables

@:value(3)staticinlineread onlyENTRIES:Int = 3

@:value(1)staticinlineread onlyVALUE1:Int = 1

@:value(2)staticinlineread onlyVALUE2:Int = 2

@:value(CurveTimeline.LINEAR)staticinlineread onlyLINEAR:Int = CurveTimeline.LINEAR

@:value(CurveTimeline.STEPPED)staticinlineread onlySTEPPED:Int = CurveTimeline.STEPPED

@:value(CurveTimeline.BEZIER)staticinlineread onlyBEZIER:Int = CurveTimeline.BEZIER

@:value(CurveTimeline.BEZIER_SIZE)staticinlineread onlyBEZIER_SIZE:Int = CurveTimeline.BEZIER_SIZE

Constructor

new(frameCount:Int, bezierCount:Int, propertyId1:String, propertyId2:String)

@link #shrink(int)}.

Parameters:

bezierCount

The maximum number of Bezier curves. See {

propertyId1

Unique identifier for the first property the timeline modifies.

propertyId2

Unique identifier for the second property the timeline modifies.

Methods

setFrame(frame:Int, time:Float, value1:Float, value2:Float):Void

Sets the time and values for the specified frame.

Parameters:

frame

Between 0 and frameCount, inclusive.

time

The frame time in seconds.

Inherited Variables

Inherited Methods

Defined by CurveTimeline

setLinear(frame:Int):Void

Sets the specified frame to linear interpolation.

Parameters:

frame

Between 0 and frameCount - 1, inclusive.

setStepped(frame:Int):Void

Sets the specified frame to stepped interpolation.

Parameters:

frame

Between 0 and frameCount - 1, inclusive.

getCurveType(frame:Int):Int

Returns the interpolation type for the specified frame. @link #LINEAR}, {@link #STEPPED}, or {@link #BEZIER} + the index of the Bezier segments.

Parameters:

frame

Between 0 and frameCount - 1, inclusive.

Returns:

{

shrink(bezierCount:Int):Void

Shrinks the storage for Bezier curves, for use when bezierCount (specified in the constructor) was larger than the actual number of Bezier curves.

setBezier(bezier:Int, frame:Int, value:Int, time1:Float, value1:Float, cx1:Float, cy1:Float, cx2:Float, cy2:Float, time2:Float, value2:Float):Void

Stores the segments for the specified Bezier curve. For timelines that modify multiple values, there may be more than one curve per frame.

Parameters:

bezier

The ordinal of this Bezier curve for this timeline, between 0 and bezierCount - 1 (specified in the constructor), inclusive.

frame

Between 0 and frameCount - 1, inclusive.

value

The index of the value for the frame this curve is used for.

time1

The time for the first key.

value1

The value for the first key.

cx1

The time for the first Bezier handle.

cy1

The value for the first Bezier handle.

cx2

The time of the second Bezier handle.

cy2

The value for the second Bezier handle.

time2

The time for the second key.

value2

The value for the second key.

getBezierValue(time:Float, frameIndex:Int, valueOffset:Int, i:Int):Float

Returns the Bezier interpolated value for the specified time. @link #getFrames()} for the values of the frame before time. @link #getCurveType(int)}.

Parameters:

frameIndex

The index into {

valueOffset

The offset from frameIndex to the value this curve is used for.

i

The index of the Bezier segments. See {

Defined by Timeline

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.

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 {