new animation.Player(animation, options, onFrame) [source]
Create an animation player
Parameter | Type | Description |
---|---|---|
animation
|
function | animation framing function |
options
|
Object | animation options |
onFrame
|
function | callback function for animation steps |
Methods
play() [source]
Start or resume the animation
Returns:
Player: thispause() [source]
Pause the animation
Returns:
Player: thiscancel() [source]
Cancel the animation play and ready to play again
Returns:
Player: thisfinish() [source]
Finish the animation play, and can't be played any more.