Class enchant.Timeline
Time-line class. Class for managing the action. For one node to manipulate the timeline of one must correspond. Time-line class has a method to add a variety of actions to himself, entities can be animated and various operations by using these briefly. You can choose time based and frame based(default) animation.
- Defined in: enchant.js
- Extends enchant.EventTarget
Constructor Attributes | Constructor Name and Description |
---|---|
enchant.Timeline(node)
|
Method Summary
Method Attributes | Method Name and Description |
---|---|
action(params)
|
|
add(action)
|
|
and()
|
|
clear()
|
|
cue(cue)
|
|
delay(time)
|
|
exec(func)
|
|
fadeIn(time, easing)
|
|
fadeOut(time, easing)
|
|
fadeTo(opacity, time, easing)
|
|
hide()
|
|
loop()
|
|
moveBy(x, y, time, easing)
|
|
moveTo(x, y, time, easing)
|
|
moveX(x, time, easing)
|
|
moveY(y, time, easing)
|
|
next(remainingTime)
|
|
pause()
|
|
repeat(func, time)
|
|
resume()
|
|
rotateBy(deg, time, easing)
|
|
rotateTo(deg, time, easing)
|
|
scaleBy(scaleX, scaleY, time, easing)
|
|
scaleTo(scaleX, scaleY, time, easing)
|
|
show()
|
|
skip(frames)
|
|
then(func)
|
|
tick(elapsed)
|
|
tween(params)
|
|
unloop()
|
|
waitUntil(func)
|
- Methods borrowed from class enchant.EventTarget:
- addEventListener
- clearEventListener
- dispatchEvent
- on
- removeEventListener
Method Detail
-
{enchant.Timeline} action(params)
- Parameters:
- {Object} params
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} add(action)
- Parameters:
- {enchant.Action} action
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} and()
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} clear()
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} cue(cue)
- Parameters:
- {Object} cue
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} delay(time)
- Parameters:
- {Number} time
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} exec(func)
- Parameters:
- {Function} func
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} fadeIn(time, easing)
- Parameters:
- {Number} time
- {Function} easing Optional, Default: enchant.Easing.LINEAR
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} fadeOut(time, easing)
- Parameters:
- {Number} time
- {Function} easing Optional, Default: enchant.Easing.LINEAR
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} fadeTo(opacity, time, easing)
- Parameters:
- {Number} opacity
- {Number} time
- {Function} easing Optional, Default: enchant.Easing.LINEAR
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} hide()
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} loop()
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} moveBy(x, y, time, easing)
- Parameters:
- {Number} x
- {Number} y
- {Number} time
- {Function} easing Optional, Default: enchant.Easing.LINEAR
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} moveTo(x, y, time, easing)
- Parameters:
- {Number} x
- {Number} y
- {Number} time
- {Function} easing Optional, Default: enchant.Easing.LINEAR
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} moveX(x, time, easing)
- Parameters:
- {Number} x
- {Number} time
- {Function} easing Optional, Default: enchant.Easing.LINEAR
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} moveY(y, time, easing)
- Parameters:
- {Number} y
- {Number} time
- {Function} easing Optional, Default: enchant.Easing.LINEAR
- Returns:
- {enchant.Timeline}
-
next(remainingTime)
- Parameters:
- remainingTime
-
{enchant.Timeline} pause()
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} removeFromScene()
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} repeat(func, time)
- Parameters:
- {Function} func
- {Number} time
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} resume()
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} rotateBy(deg, time, easing)
- Parameters:
- {Number} deg
- {Number} time
- {Function} easing Optional, Default: enchant.Easing.LINEAR
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} rotateTo(deg, time, easing)
- Parameters:
- {Number} deg
- {Number} time
- {Function} easing Optional, Default: enchant.Easing.LINEAR
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} scaleBy(scaleX, scaleY, time, easing)
- Parameters:
- {Number} scaleX
- {Number} scaleY Optional
- {Number} time
- {Function} easing Optional, Default: enchant.Easing.LINEAR
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} scaleTo(scaleX, scaleY, time, easing)
- Parameters:
- {Number} scaleX
- {Number} scaleY Optional
- {Number} time
- {Function} easing Optional, Default: enchant.Easing.LINEAR
- Returns:
- {enchant.Timeline}
-
setFrameBased()
-
setTimeBased()
-
{enchant.Timeline} show()
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} skip(frames)
- Parameters:
- {Number} frames
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} then(func)
- Parameters:
- {Function} func
- Returns:
- {enchant.Timeline}
-
tick(elapsed)
- Parameters:
- {Number} elapsed
-
{enchant.Timeline} tween(params)
- Parameters:
- {Object} params
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} unloop()
- Returns:
- {enchant.Timeline}
-
{enchant.Timeline} waitUntil(func)
- Parameters:
- {Function} func
- Returns:
- {enchant.Timeline}