Class: Animation

lime.animation.Animation

new lime.animation.Animation()

General object for running animations on nodes
Source:

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:

scope :string

Source:

<protected> targets :Array.<lime.Node>

Array of active target nodes
Source:

update

Update targets to new values
Source:

Methods

addTarget(target) → {lime.animation.Animation}

Add target node to animation
Parameters:
Name Type Description
target lime.Node Target node.
Source:
Returns:
object itself.
Type
lime.animation.Animation

<protected> cloneParam()

Clone animation parmaters from another animation
Source:

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:
Returns:
object itself.
Type
lime.animation.Animation

getDirector() → {lime.Director}

Get the director related to the animation targets.
Source:
Returns:
Director.
Type
lime.Director

getDuration() → {number}

Return duration of the animation in seconds
Source:
Returns:
Animation duration.
Type
number

getEasing() → {lime.animation.EasingFunction}

Return current easing function
Source:
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:
Returns:
Properties object.
Type
Object

initTarget(target)

Initalize the aniamtion for a target
Parameters:
Name Type Description
target lime.Node Target node.
Source:

makeTargetProp(target) → {Object}

Make property object for target that hold animation helper values.
Parameters:
Name Type Description
target lime.Node Target node.
Source:
Returns:
Properties object.
Type
Object

play()

Start playing the animation
Source:

removeTarget(target) → {lime.animation.Animation}

Remove target node from animation
Parameters:
Name Type Description
target lime.Node Node to be removed.
Source:
Returns:
object itself.
Type
lime.animation.Animation

reverse() → {lime.animation.Animation}

Return new animation with reveresed parameters from original
Source:
Throws:
No reverese animation possible.
Type
NotSupported
Returns:
New animation.
Type
lime.animation.Animation

setDuration(value) → {lime.animation.Animation}

Set the duration of the animation in seconds
Parameters:
Name Type Description
value number New duration.
Source:
Returns:
object itself.
Type
lime.animation.Animation

setEasing(ease) → {lime.animation.Animation}

Set easing function for current animation
Parameters:
Name Type Description
ease lime.animation.EasingFunction Easing function.
Source:
Returns:
object itself.
Type
lime.animation.Animation

<private> step_(dt)

Iterate time for animation
Parameters:
Name Type Description
dt number Time difference since last run.
Source:
Throws:
If easing function is not correct
Type
WrongParam

stop()

Stop playing the animstion
Source:

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:
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:
Returns:
Transitions are being used?
Type
boolean