class CurveTimeline
package spine
extends Timeline
import spine.Animation
extended by CurveTimeline1, CurveTimeline2, DeformTimeline, IkConstraintTimeline, PathConstraintMixTimeline, RGB2Timeline, RGBA2Timeline, RGBATimeline, RGBTimeline, TransformConstraintTimeline
Available with spine plugin
The base class for timelines that interpolate between frame values using stepped, linear, or a Bezier curve.
Static variables
Constructor
new(frameCount:Int, bezierCount:Int, propertyIds:StringArray)
@link #shrink(int)}.
Parameters:
bezierCount | The maximum number of Bezier curves. See { |
---|---|
propertyIds | Unique identifiers for the properties the timeline modifies. |
Variables
Methods
setLinear(frame:Int):Void
Sets the specified frame to linear interpolation.
Parameters:
frame | Between 0 and |
---|
setStepped(frame:Int):Void
Sets the specified frame to stepped interpolation.
Parameters:
frame | Between 0 and |
---|
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 |
---|
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 |
---|---|
frame | Between 0 and |
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 |
i | The index of the Bezier segments. See { |