Class: Tween

Kinetic. Tween

Constructor

new Tween()

Tween constructor. Tweens enable you to animate a node between the current state and a new state. You can play, pause, reverse, seek, reset, and finish tweens. By default, tweens are animated using a linear easing. For more tweening options, check out Kinetic.Easings
Source:
Example
// instantiate new tween which fully rotates a node in 1 second
var tween = new Kinetic.Tween({<br>
  node: node,<br>
  rotationDeg: 360,<br>
  duration: 1,<br>
  easing: Kinetic.Easings.EaseInOut<br>
});<br><br>

// play tween<br>
tween.play();<br><br>

// pause tween<br>
tween.pause();

Methods

destroy()

destroy
Source:

finish() → {Tween}

finish
Source:
Returns:
Type
Tween

pause() → {Tween}

pause
Source:
Returns:
Type
Tween

play() → {Tween}

play
Source:
Returns:
Type
Tween

reset() → {Tween}

reset
Source:
Returns:
Type
Tween

reverse() → {Tween}

reverse
Source:
Returns:
Type
Tween

seek(t) → {Tween}

seek
Parameters:
Name Type Description
t Integer time in seconds between 0 and the duration
Source:
Returns:
Type
Tween