new lime.animation.MoveBy(delta, opt_y)
Move elemenet by offset
Also accepts two numbers (x and y)
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
delta |
goog.math.Coordinate | number | Offset to move. | |
opt_y |
number |
<optional> |
Optionaly use x,y |
- Source:
- animation/moveby.js, line 19
Example
var moveleft = new lime.animation.MoveBy(100,0);
sprite.runAction(moveleft);
Extends
Summary
Members |
||
---|---|---|
scope
|
Inherited
Methods |
||
---|---|---|
<private> |
calcDurationFromSpeed_ ()
Calculate animations duration based on its speed.
|
|
clearTransition (target)
Clear previously set transition values.
|
||
makeTargetProp ()
|
||
reverse ()
|
||
setSpeed (speed) → {lime.animation.MoveBy}
Helper function that sets tha animation duration
based on the size of the delta. 1 unit means 100px/sec.
|
||
update ()
|
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.play,  lime.animation.Animation.removeTarget,  lime.animation.Animation.setDuration,  lime.animation.Animation.setEasing,  lime.animation.Animation.step_,  lime.animation.Animation.stop,  lime.animation.Animation.updateAll,  lime.animation.Animation.useTransitions
Members
-
scope
-
- Source:
- animation/moveby.js, line 33
Methods
-
<private> calcDurationFromSpeed_()
-
Calculate animations duration based on its speed.
- Source:
- animation/moveby.js, line 67
-
clearTransition(target)
-
Clear previously set transition values.
Parameters:
Name Type Description target
lime.Node Target node. - Source:
- animation/moveby.js, line 94
-
makeTargetProp()
-
- Source:
- animation/moveby.js, line 51
- See:
-
reverse()
-
- Source:
- animation/moveby.js, line 108
- See:
-
setSpeed(speed) → {lime.animation.MoveBy}
-
Helper function that sets tha animation duration based on the size of the delta. 1 unit means 100px/sec.
Parameters:
Name Type Description speed
number Speed value. - Source:
- animation/moveby.js, line 41
Returns:
Object itself. -
update()
-
- Source:
- animation/moveby.js, line 80
- See: