iphone processing
A port of Processing based on javascript, Processing.js and a custom built canvas-object running on the iPhone.
I was as impressed with the Processing.js implementation by John Resig as everyone else. And I naturally looked into the code to figure out how he had managed to do it. As he explains on his site, its all built around the browser canvas-object, and specifically the CanvasRenderingContext2D -object.
I had a look at the specification for the context object and the methods that Processing.js are using and realized that there were only about 8-10 methods needed.
So, I downloaded the JavaScript engine SpiderMonkey from Mozilla. With some inspiration from the Jiggy-project I configured and compiled it for the iphone. Then hooked it up with Processing.js, and wrote my own version of the context-object using OpenGL ES.
During this process I had to rewrite parts of Processing.js in ObjC for performance reasons.
Results? A hack of processing running on the iPhone with reasonable speed.
Examples shown in this video are StoringInput, BouncyBubbles (changed to use iphone accelerometer) and Substrate.















whats with the last one?
Really cool!
Lol, if i had an iPhone i could get hours doing that xD
Great stuff! Is this available for download somewhere? Would be cool to run custom processing sketches on the iphone.
yeah me too.. what was the last one about ?
Meh, I implemented the “Substrate” in C# and it slows down after about 3 seconds to a hault. Will re-creating it in ObjC with a UIView be unreasonable because of speed?
Great work. It inspired me to take on processing, and gave me enough enthusiasm to learn OpenGL ES to get enough speed for processing’s algorithm. Any tips?
22 year old female wanting to play with a bad? boy msn me or profile Z
good stuff, are you available for contract work?
idont get the last one …wat is it sapposesd to do or b
do you have fun?
hey anyone, i want to make an iphone game so i need to buy books. what books would u say i need? also should it be on objective-c or opengl es book?
Thanks!
Any chance of getting at your code? One specific thing I really want to try out is using something like those accelerometer bouncy balls as midi controls, like one mode of the Lemur.
this is really awesome!
Will the code for this be released?
Any chance of this going open source?
:-____________)
That’s my jaw dropping to the floor. Now I’m out of excuses for not having an iPhone.
AMAZING but excuse me.. WTF are you doing there o.O
sick i hope this goes public i’m sure tons of ppl would love to use it
No, this is based purely on the SpiderMonkey engine with my own graphics-backend in OpenGL. To make it clear, I have only implemented the drawing functionality that Processing.js is using.
I’m sure it would be possible to use the WebKit-code as well in some way. The big questions is if it would be fast enough.
Most excellent! But I thought some of the Processing.js demos already work in Safari or latest WebKit. Surely you’re using some of Safari/WebKit to do this.
looks great! can’t wait till you can release the code.
Excellent! Nice work.