HTML5 Canvas KineticJS Tweening Tutorial

To tween properties with KineticJS, we can instantiate a Kinetic.Tween object and then start the tween by calling play().  Any numeric property of a Shape, Group, Layer, or Stage can be transitioned, such as x, y, rotation, width, height, radius, strokeWidth, opacity, scaleX, offsetX, etc.  For performance reasons, it's important to set the onUpdate property to a function that batch draws the layer containing the node that's being tweened.

Open in new window

Code Editor

Modified on May 11th, 2013 by Eric Rowell
comments powered by Disqus