new lime.animation.Animation()
General object for running animations on nodes
- Source:
- animation/animation.js, line 18
Extends
- goog.events.EventTarget
Summary
Members |
||
---|---|---|
<private> |
isPlaying_ :boolean
Animation is playing?
|
|
scope :string
|
||
<protected> |
targets :Array.<lime.Node>
Array of active target nodes
|
|
update
Update targets to new values
|
Methods |
||
---|---|---|
addTarget (target) → {lime.animation.Animation}
Add target node to animation
|
||
<protected> |
cloneParam ()
Clone animation parmaters from another animation
|
|
enableOptimizations (opt_value) → {lime.animation.Animation}
Enable CSS3 transitions to make animation. Usually performes better
but is limited to single parallel transform action.
|
||
getDirector () → {lime.Director}
Get the director related to the animation targets.
|
||
getDuration () → {number}
Return duration of the animation in seconds
|
||
getEasing () → {lime.animation.EasingFunction}
Return current easing function
|
||
getTargetProp (target) → {Object}
Get properties object for target.
|
||
initTarget (target)
Initalize the aniamtion for a target
|
||
makeTargetProp (target) → {Object}
Make property object for target that hold animation helper values.
|
||
play ()
Start playing the animation
|
||
removeTarget (target) → {lime.animation.Animation}
Remove target node from animation
|
||
reverse () → {lime.animation.Animation}
Return new animation with reveresed parameters from original
|
||
setDuration (value) → {lime.animation.Animation}
Set the duration of the animation in seconds
|
||
setEasing (ease) → {lime.animation.Animation}
Set easing function for current animation
|
||
<private> |
step_ (dt)
Iterate time for animation
|
|
stop ()
Stop playing the animstion
|
||
updateAll (t, targets) → {number}
Update all targets to new values.
|
||
useTransitions () → {boolean}
Returns true if CSS transitions are used to make the animation.
Performes better on iOS devices.
|
Members
-
<private> isPlaying_ :boolean
-
Animation is playing?
- Source:
- animation/animation.js, line 36
-
scope :string
-
- Source:
- animation/animation.js, line 50
-
<protected> targets :Array.<lime.Node>
-
Array of active target nodes
- Source:
- animation/animation.js, line 26
-
update
-
Update targets to new values
- Source:
- animation/animation.js, line 279
Methods
-
addTarget(target) → {lime.animation.Animation}
-
Add target node to animation
Parameters:
Name Type Description target
lime.Node Target node. - Source:
- animation/animation.js, line 106
Returns:
object itself. -
<protected> cloneParam()
-
Clone animation parmaters from another animation
- Source:
- animation/animation.js, line 285
-
enableOptimizations(opt_value) → {lime.animation.Animation}
-
Enable CSS3 transitions to make animation. Usually performes better but is limited to single parallel transform action.
Parameters:
Name Type Argument Description opt_value
boolean <optional>
Enable or disable. - Source:
- animation/animation.js, line 268
Returns:
object itself. -
getDirector() → {lime.Director}
-
Get the director related to the animation targets.
- Source:
- animation/animation.js, line 198
Returns:
Director.- Type
- lime.Director
-
getDuration() → {number}
-
Return duration of the animation in seconds
- Source:
- animation/animation.js, line 69
Returns:
Animation duration.- Type
- number
-
getEasing() → {lime.animation.EasingFunction}
-
Return current easing function
- Source:
- animation/animation.js, line 97
Returns:
Easing function.- Type
- lime.animation.EasingFunction
-
getTargetProp(target) → {Object}
-
Get properties object for target.
Parameters:
Name Type Description target
lime.Node Target node. - Source:
- animation/animation.js, line 171
Returns:
Properties object.- Type
- Object
-
initTarget(target)
-
Initalize the aniamtion for a target
Parameters:
Name Type Description target
lime.Node Target node. - Source:
- animation/animation.js, line 184
-
makeTargetProp(target) → {Object}
-
Make property object for target that hold animation helper values.
Parameters:
Name Type Description target
lime.Node Target node. - Source:
- animation/animation.js, line 162
Returns:
Properties object.- Type
- Object
-
play()
-
Start playing the animation
- Source:
- animation/animation.js, line 125
-
removeTarget(target) → {lime.animation.Animation}
-
Remove target node from animation
Parameters:
Name Type Description target
lime.Node Node to be removed. - Source:
- animation/animation.js, line 116
Returns:
object itself. -
reverse() → {lime.animation.Animation}
-
Return new animation with reveresed parameters from original
- Source:
- animation/animation.js, line 294
Throws:
No reverese animation possible.- Type
- NotSupported
Returns:
New animation. -
setDuration(value) → {lime.animation.Animation}
-
Set the duration of the animation in seconds
Parameters:
Name Type Description value
number New duration. - Source:
- animation/animation.js, line 78
Returns:
object itself. -
setEasing(ease) → {lime.animation.Animation}
-
Set easing function for current animation
Parameters:
Name Type Description ease
lime.animation.EasingFunction Easing function. - Source:
- animation/animation.js, line 88
Returns:
object itself. -
<private> step_(dt)
-
Iterate time for animation
Parameters:
Name Type Description dt
number Time difference since last run. - Source:
- animation/animation.js, line 208
Throws:
If easing function is not correct- Type
- WrongParam
-
stop()
-
Stop playing the animstion
- Source:
- animation/animation.js, line 138
-
updateAll(t, targets) → {number}
-
Update all targets to new values.
Parameters:
Name Type Description t
number Time position of animation[0-1]. targets
Array.<lime.Node> All target nodes to update. - Source:
- animation/animation.js, line 234
Returns:
New time position(eased value).- Type
- number
-
useTransitions() → {boolean}
-
Returns true if CSS transitions are used to make the animation. Performes better on iOS devices.
- Source:
- animation/animation.js, line 252
Returns:
Transitions are being used?- Type
- boolean