Thibaut Lamanthe Thibaut Lamanthe - 1 year ago 135
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.

Answer Source

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;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download