new lime.animation.KeyframeAnimation()
Keyframe Animation object.
Keyframe Animation contains images that are changed on targets.
Similar to GIF effect.
- Source:
- animation/keyframeanimation.js, line 15
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.
|
Methods |
||
---|---|---|
addFrame (frame) → {lime.animation.KeyframeAnimation}
Add frame to the current animation
|
||
<private> |
frameLoadedHandler_ ()
Handler to be called on every loaded frame image
|
|
getDelay () → {number}
Returns the delay in seconds between frames.
|
||
play ()
|
||
setDelay (value) → {lime.animation.KeyframeAnimation}
Set the delay between frames to specific value.
|
||
setFrames (frames) → {lime.animation.KeyframeAnimation}
Set array of frames to be used in the animation
|
||
setLooping (looping) → {lime.animation.KeyframeAnimation}
Set the keyframe animation to keep loopoing or just play the animation once.
|
||
updateAll ()
|
Inherited
lime.animation.Animation.addTarget,  lime.animation.Animation.cloneParam,  lime.animation.Animation.enableOptimizations,  lime.animation.Animation.getDirector,  lime.animation.Animation.getDuration,  lime.animation.Animation.getEasing,  lime.animation.Animation.getTargetProp,  lime.animation.Animation.initTarget,  lime.animation.Animation.makeTargetProp,  lime.animation.Animation.removeTarget,  lime.animation.Animation.reverse,  lime.animation.Animation.setDuration,  lime.animation.Animation.setEasing,  lime.animation.Animation.step_,  lime.animation.Animation.stop,  lime.animation.Animation.useTransitions
Members
-
<private> currentFrame_ :number
-
Current frame index of the playhead
- Source:
- animation/keyframeanimation.js, line 53
-
delay :number
-
Delay in seconds between frames
- Source:
- animation/keyframeanimation.js, line 59
-
<private> frames_ :Array.<Image>
-
Array of frame images
- Source:
- animation/keyframeanimation.js, line 23
-
looping :boolean
-
Should the animation keep looping or stop when frame animation done. Setting loopoing to true, this is deafault behaviour.
- Source:
- animation/keyframeanimation.js, line 66
-
<private> numFramesLoaded_ :number
-
Number of frame images loaded
- Source:
- animation/keyframeanimation.js, line 30
-
scope
-
- Source:
- animation/keyframeanimation.js, line 72
-
<private> usesBackgroundCanvas_ :boolean
-
Animation is using Background Canvas to make the changes. Faster if there are many targets but only supported on Webkit.
- Source:
- animation/keyframeanimation.js, line 46
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:
- animation/keyframeanimation.js, line 123
Returns:
object itself. -
<private> frameLoadedHandler_()
-
Handler to be called on every loaded frame image
- Source:
- animation/keyframeanimation.js, line 144
-
getDelay() → {number}
-
Returns the delay in seconds between frames.
- Source:
- animation/keyframeanimation.js, line 78
Returns:
Delay between frames.- Type
- number
-
play()
-
- Source:
- animation/keyframeanimation.js, line 153
-
setDelay(value) → {lime.animation.KeyframeAnimation}
-
Set the delay between frames to specific value.
Parameters:
Name Type Description value
number New delay value. - Source:
- animation/keyframeanimation.js, line 87
Returns:
object itself. -
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:
- animation/keyframeanimation.js, line 97
Returns:
object itself. -
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:
- animation/keyframeanimation.js, line 113
Returns:
object itself. -
updateAll()
-
- Source:
- animation/keyframeanimation.js, line 163