Thibaut Lamanthe Thibaut Lamanthe - 2 months ago 28
Javascript Question

KineticJS easing

I created a shape in KineticJS and I animate it with tween.

var tween = new Kinetic.Tween({
node: rect,
duration: 1,
easing: Kinetic.Easings.BackEaseOut,
y: 100

During reverse is it possible to change the easing?

Currently I have do that : JSFiddle

Thanks a lot for your help.


This seems to work... But this is not really core func...

stage.on('mouseover', function() {
    tween.tween.func = Kinetic.Easings.BounceEaseOut;;

stage.on('mouseout', function() {
    tween.tween.func = Kinetic.Easings.BounceEaseIn;