Class: Tween

Konva. Tween

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

Source:
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

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
Konva Copyright © 2015 The contributors to the Konva project.
Documentation generated by JSDoc 3.2.2 on Tue Jan 27th 2015 using the DocStrap template.