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 Konva.Easings
Example
// instantiate new tween which fully rotates a node in 1 second
var tween = new Konva.Tween({
node: node,
rotationDeg: 360,
duration: 1,
easing: Konva.Easings.EaseInOut
});
// play tween
tween.play();
// pause tween
tween.pause();
Methods
-
destroy()
-
destroy
-
finish() → {Tween}
-
finish
Returns:
- Type
- Tween
-
pause() → {Tween}
-
pause
Returns:
- Type
- Tween
-
play() → {Tween}
-
play
Returns:
- Type
- Tween
-
reset() → {Tween}
-
reset
Returns:
- Type
- Tween
-
reverse() → {Tween}
-
reverse
Returns:
- Type
- Tween
-
seek(t) → {Tween}
-
seek
Parameters:
Name Type Description t
Integer time in seconds between 0 and the duration Returns:
- Type
- Tween