Processing.js – visualization library for Javascript



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. Nosey Nick says:

    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. Hiddensoul says:

    And the commodore 64 was doing it before the amiga

  3. John Wesley says:

    Are you guys really starting a commodore-amiga flame war? Sheesh…

  4. garga l says:

    totally photoshopped! obbiously!

  5. TyLLy_4 says:

    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

  6. trace says:

    You can’t seriously be that stupid TyLLy_4.

    The “OMG FAKE PHOTOSHOPPED THE REFLECTIONS ARE WRONG!” is one of the most common joke comments period.


  7. Scot says:

    That’s Bigfoot’s floppy. I want to believe.

  8. Malcolm Harnden says:

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

  9. arleas says:

    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…

  10. James M says:

    He is right, try google for “stepper motor music”

    Or try the following link

  11. Upshaw says:

    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. :)

  12. kailashkumar says:

    Basically, a Floppy Drive reads and writes knowledge to a little, circular piece of metal-coated plastic just like audio tape.

Discuss this article with the rest of the community on our Discord server!


Maker Faire Bay Area 2023 - Mare Island, CA

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).