This is a variation of FoxAnimationTrack that allows for calling a keyframe as a function.

Constructor

new(trackName:String, _type:FoxTrackType)

Variables

@:value(new StringMap())callbacks:Map<String, Dynamic> = new StringMap()

A map of callbacks used for this track.

Add a frame following this format: addFrame(<time>, [<callbackName>, [<arguments>]], ...)

Inherited Variables

Defined by FoxAnimationTrack

read onlyname:String

@:value([])frames:Array<FoxKeyframe<T>> = []

Inherited Methods

Defined by FoxAnimationTrack

@:value({ easing : FoxEaseType.LINEAR })addFrame(time:Float, value:T, easing:FoxEaseType = FoxEaseType.LINEAR):Void

addFrames(times:Array<Float>, values:Array<T>, ?easings:Array<FoxEaseType>):Void

removeFrame(frame:FoxKeyframe<T>):Void

removeFrameByIndex(index:Int):Void

@:value({ ceil : false, closestFrame : false })getFrameIndexByTime(time:Float, closestFrame:Bool = false, ceil:Bool = false):Int

Parameters:

closestFrame

The index will be rounded towards the closest value (i.e: 0.55 between 0 and 1, the closest is 1) if false: it will return the index of the current frame

ceil

The index of the next frame will always be returned

@:value({ nextFrame : false, closestFrame : false })getFrameByTime(time:Float, closestFrame:Bool = false, nextFrame:Bool = false):FoxKeyframe<T>

Parameters:

closestFrame

The index will be rounded towards the closest value (i.e: 0.55 between 0 and 1, the closest is 1) if false: it will return the current frame

nextFrame

The next frame will always be returned