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({ node: node, rotationDeg: 360, duration: 1, easing: Kinetic.Easings.EaseInOut }); // play tween tween.play(); // pause tween 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