iphone processing
mqwaq -
39,404 views
- 1 year ago
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.
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.
0UN2iYrZmEY