Class: Player

Player

An Web Animation API style animation player

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: this
  • pause() [source]

  • Pause the animation
    Returns:
    Player: this
  • cancel() [source]

  • Cancel the animation play and ready to play again
    Returns:
    Player: this
  • finish() [source]

  • Finish the animation play, and can't be played any more.
    Returns:
    Player: this