2012
JS3 Animation Library

2012
JS3 Animation Library

JS3 is a fast & lightweight JavaScript drawing & animation library modeled after the Flash ActionScript API.

This project came about as I playing around with the HTML5 canvas element one weekend and found I needed a way to organize my visual assets into a hierarchy akin to the display list provided by Flash.

At the time only a few drawing libraries for the canvas existed however none of them implemented a mutable display list and many if not all of them were either poorly documented, had lousy performance or a cumbersome API.

So I started writing functions to draw, position and stack geometry and within a few hours the first iteration of the library was born. Shortly thereafter I added support for images, text, and mouse events to allow the visuals to be interactive. Once those were in place I implemented a full blown animation engine complete with Robert Penner's infamous easing equations to slide everything around.

The API intentionally mimics the Flash AS3 API making it dead simple to use for anyone coming over from Flash. However even without a Flash background the entire library can be mastered in less than 10 minutes.

While the library never really experienced widespread adoption, it was a really fun project to make and write the samples and documentation for.

If you decide to use it in a project I’d love to see what you create with it.