John Resig, of jQuery fame, released a port of the Processing visualization language for Javascript. Seriously, John is on fire:

The first portion of the project was writing a parser to dynamically convert code written in the Processing language, to JavaScript. This involves a lot of gnarly regular expressions chewing up the code, spitting it out in a format that the browser understands.

It works “fairly well” (in that it’s able to handle anything that the web site throws at it) but I’m sure its total scope is limited (until a proper parser is involved). I felt bad about tackling this using regular expressions until I found out that the original Processing code base did it in the same manner (they now use a real parser, naturally).

The full 2D API is implemented, with the exclusion of some features here and there between browsers (Firefox 3 is pretty full featured). You can interact with the Processing API directly from standard Javascript. This lets you make use of these drawing features by simply instantiating a Processing object, and then calling its various drawing methods.

Another capability is to write code natively in the Processing language. This allows you to make use of extended language features such as method overloading and classic inheritance, though it looks like type information is pretty much ignored.

John has many of the demos from working. Most of them are going to peg your CPU, but this is some seriously cool stuff to see working in a first release.

Javascript just got a lot more interesting.

Processing: open source data visualization language

0 thoughts on “Processing.js – visualization library for Javascript

  1. My Amiga was doing this in the late 1980s, what’s the big deal? Is this just yet more evidence that the Amiga was decades ahead of the rest?

  2. You can’t seriously be that stupid garga.

    If anything they just taped the sound over the video or somthing ….

    let me guess

    “This looks shopped, i can tell from some of the pixels in the screen and seen quite a few fotochopz in my time”


    Great post

    you have been stumbled upon, you have been liked upon

  3. Yep my Miggy was doing this an other tunes, it never broke the floppy but certainly annoyed my brother.

  4. I wouldn’t say it’s a flame war. But it’s true. They developed a way for the Commodore 1541 drive to do this long before the Amiga drives would do it.

    They always put the warning “Don’t do this too often in case it breaks your drive!”. I’ve also heard people use printer motors in a similar fashion.

    All you have to do is figure out which commands to send to the drive to get the note you want and then put all the commands in sequence. I think it was probably more tricky on the commodore 64 because the 1541 had its own motherboard and processor.

    google “1541 stepper motor music” and you’ll see what I’m talking about though…

  5. While figuring out how to do bitmapped graphics on my old 8-pin dot-matrix printer attached to an AppleII I realized how musical it was. Ended up removing the print ribbon, and hanging the paper from the ceiling to act as the soundboard. All done in BASIC. :)