View source
class CurveTimeline
package spine
implements Timeline
import spine.Animation
extended by ColorTimeline, DeformTimeline, IkConstraintTimeline, PathConstraintMixTimeline, PathConstraintPositionTimeline, RotateTimeline, TransformConstraintTimeline, TranslateTimeline, TwoColorTimeline
The base class for timelines that use interpolation between key frame values.
Static variables
Constructor
Methods
apply(skeleton:Skeleton, lastTime:Float, time:Float, events:Array<Event>, alpha:Float, blend:MixBlend, direction:MixDirection):Void
getCurvePercent(frameIndex:Int, percent:Float):Float
Returns the interpolated percentage for the specified key frame and linear percentage.
getCurveType(frameIndex:Int):Int
Returns the interpolation type for the specified key frame.
Returns:
Linear is 0, stepped is 1, Bezier is 2.
setCurve(frameIndex:Int, cx1:Float, cy1:Float, cx2:Float, cy2:Float):Void
Sets the specified key frame to Bezier interpolation. cx1
and cx2
are from 0 to 1,
representing the percent of time between the two key frames. cy1
and cy2
are the percent of the
difference between the key frame's values.