New JavaScript Library Creates Amazing Animations

Share

New JavaScript Library Creates Amazing Animations

John Resig, JavaScript Evangelist for Mozilla and creator of the JQuery library, has ported the Processing visualization language to JavaScript. We cover a lot of language and software developments here at Compiler, but this might be the most impressive thing we've ever seen.

If, like me, you've never head of the Processing language until today, here's a quick overview: Processing is an open source programming language for people who want to work with images, animation, and interactions.

Processing has three components, the language, the drawing API and the implementation (typically through Java). Resig's port uses regular expressions to convert the Processing language to JavaScript for display in your browser. The second part of his project handles the full 2D Processing API.

The result enables you to take advantage of the Processing language without ever needing to write a line of code in it, which is pretty amazing (and you can pass in Processing commands directly if you want to).

Of course Resig's JavaScript port only works with a few browsers, namely Firefox 3, WebKit nightly builds and Opera 9.5 — all beta browsers. Obviously that limits the audience too much for mainstream sites, but if you're looking for a way to push the envelope a bit, here's your chance.

As Resign writes, "I wanted something that would be capable of pushing the edge of what a browser is able to render — giving them something to strive for in their upcoming releases.”

Also note, as Resig cautions, "lot of these demos will peg your CPU… I'm trying to squeeze the most out of the browser, as possible — be ready for it!” And I can vouch that. After testing a few demos in Firefox 3, my MacBook's fan was running at full speed and overall performance was bit sluggish while the animations were in progress.

Still, very impressive stuff. If you've got Firefox 3 installed head over and check out the amazing demos. And if that isn't impressive enough, the source code for all this compresses down to less than 10kb. You can grab a copy from Resig's site.