Class: KeyframeAnimation

lime.animation.KeyframeAnimation

new lime.animation.KeyframeAnimation()

Keyframe Animation object. Keyframe Animation contains images that are changed on targets. Similar to GIF effect.
Source:

Extends

Summary

Members
<private> currentFrame_ :number
Current frame index of the playhead
delay :number
Delay in seconds between frames
<private> frames_ :Array.<Image>
Array of frame images
looping :boolean
Should the animation keep looping or stop when frame animation done. Setting loopoing to true, this is deafault behaviour.
<private> numFramesLoaded_ :number
Number of frame images loaded
scope
<private> usesBackgroundCanvas_ :boolean
Animation is using Background Canvas to make the changes. Faster if there are many targets but only supported on Webkit.

Members

<private> currentFrame_ :number

Current frame index of the playhead
Source:

delay :number

Delay in seconds between frames
Source:

<private> frames_ :Array.<Image>

Array of frame images
Source:

looping :boolean

Should the animation keep looping or stop when frame animation done. Setting loopoing to true, this is deafault behaviour.
Source:

<private> numFramesLoaded_ :number

Number of frame images loaded
Source:

scope

Source:

<private> usesBackgroundCanvas_ :boolean

Animation is using Background Canvas to make the changes. Faster if there are many targets but only supported on Webkit.
Source:

Methods

addFrame(frame) → {lime.animation.KeyframeAnimation}

Add frame to the current animation
Parameters:
Name Type Description
frame string | lime.fill.Fill Path to frame image.
Source:
Returns:
object itself.
Type
lime.animation.KeyframeAnimation

<private> frameLoadedHandler_()

Handler to be called on every loaded frame image
Source:

getDelay() → {number}

Returns the delay in seconds between frames.
Source:
Returns:
Delay between frames.
Type
number

play()

Source:

setDelay(value) → {lime.animation.KeyframeAnimation}

Set the delay between frames to specific value.
Parameters:
Name Type Description
value number New delay value.
Source:
Returns:
object itself.
Type
lime.animation.KeyframeAnimation

setFrames(frames) → {lime.animation.KeyframeAnimation}

Set array of frames to be used in the animation
Parameters:
Name Type Description
frames Array.<string> Paths to frame images.
Source:
Returns:
object itself.
Type
lime.animation.KeyframeAnimation

setLooping(looping) → {lime.animation.KeyframeAnimation}

Set the keyframe animation to keep loopoing or just play the animation once.
Parameters:
Name Type Description
looping boolean Keep looping or not.
Source:
Returns:
object itself.
Type
lime.animation.KeyframeAnimation

updateAll()

Source: