HTML5 Canvas KineticJS Rotation Animation Tutorial

To animate a shape's rotation with KineticJS, we can create a new animation with Kinetic.Animation, and define a function which modifies the shape's rotation with each animation frame.

In this tutorial, we'll rotate a blue rectangle about the top left corner, a yellow rectangle about its center, and a red rectangle about an outside point.

Open in new window

Code Editor

Modified on April 9th, 2013 by Eric Rowell
comments powered by Disqus