Class Index | File Index

Classes


Class lime.animation.Animation


Defined in: animation.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
General object for running animations on nodes
Field Summary
Field Attributes Field Name and Description
<private>  
Animation is playing?
 
 
Array of active target nodes
 
Update targets to new values
Method Summary
Method Attributes Method Name and Description
 
addTarget(target)
Add target node to animation
 
cloneParam(origin)
Clone animation parmaters from another animation
 
Enable CSS3 transitions to make animation.
 
Get the director related to the animation targets.
 
Return duration of the animation in seconds
 
Return current easing function
 
getTargetProp(target)
Get properties object for target.
 
initTarget(target)
Initalize the aniamtion for a target
 
Make property object for target that hold animation helper values.
 
play()
Start playing the animation
 
removeTarget(target)
Remove target node from animation
 
Return new animation with reveresed parameters from original
 
setDuration(value)
Set the duration of the animation in seconds
 
setEasing(ease)
Set easing function for current animation
<private>  
step_(dt)
Iterate time for animation
 
stop()
Stop playing the animstion
 
updateAll(t, targets)
Update all targets to new values.
 
Returns true if CSS transitions are used to make the animation.
Class Detail
lime.animation.Animation()
General object for running animations on nodes
Field Detail
<private> isPlaying_
Animation is playing?

scope

targets
Array of active target nodes

update
Update targets to new values
Method Detail
{lime.animation.Animation} addTarget(target)
Add target node to animation
Parameters:
{lime.Node} target
Target node.
Returns:
{lime.animation.Animation} object itself.

cloneParam(origin)
Clone animation parmaters from another animation
Parameters:
origin

{lime.animation.Animation} enableOptimizations(opt_value)
Enable CSS3 transitions to make animation. Usually performes better but is limited to single parallel transform action.
Parameters:
{boolean=} opt_value
Enable or disable.
Returns:
{lime.animation.Animation} object itself.

{lime.Director} getDirector()
Get the director related to the animation targets.
Returns:
{lime.Director} Director.

{number} getDuration()
Return duration of the animation in seconds
Returns:
{number} Animation duration.

{lime.animation.EasingFunction} getEasing()
Return current easing function
Returns:
{lime.animation.EasingFunction} Easing function.

{Object} getTargetProp(target)
Get properties object for target.
Parameters:
{lime.Node} target
Target node.
Returns:
{Object} Properties object.

initTarget(target)
Initalize the aniamtion for a target
Parameters:
{lime.Node} target
Target node.

{Object} makeTargetProp(target)
Make property object for target that hold animation helper values.
Parameters:
{lime.Node} target
Target node.
Returns:
{Object} Properties object.

play()
Start playing the animation

{lime.animation.Animation} removeTarget(target)
Remove target node from animation
Parameters:
{lime.Node} target
Node to be removed.
Returns:
{lime.animation.Animation} object itself.

{?lime.animation.Animation} reverse()
Return new animation with reveresed parameters from original
Throws:
{NotSupported}
No reverese animation possible.
Returns:
{?lime.animation.Animation} New animation.

{lime.animation.Animation} setDuration(value)
Set the duration of the animation in seconds
Parameters:
{number} value
New duration.
Returns:
{lime.animation.Animation} object itself.

{lime.animation.Animation} setEasing(ease)
Set easing function for current animation
Parameters:
{lime.animation.EasingFunction} ease
Easing function.
Returns:
{lime.animation.Animation} object itself.

<private> step_(dt)
Iterate time for animation
Parameters:
{number} dt
Time difference since last run.
Throws:
{WrongParam}
If easing function is not correct

stop()
Stop playing the animstion

{number} updateAll(t, targets)
Update all targets to new values.
Parameters:
{number} t
Time position of animation[0-1].
{Array.} targets
All target nodes to update.
Returns:
{number} New time position(eased value).

{boolean} useTransitions()
Returns true if CSS transitions are used to make the animation. Performes better on iOS devices.
Returns:
{boolean} Transitions are being used?

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jun 30 2011 11:27:20 GMT+0300 (EEST)