Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

iphone processing

Loading...

Sign in or sign up now!
76,475
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on May 31, 2008

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.

Category:

Science & Technology

Tags:

License:

Standard YouTube License

Link to this comment:

Share to:

Uploader Comments (mqwaq)

  • 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.

  • 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.

Top Comments

  • Any chance of this going open source?

  • You should definitely share this framework. Right?

    :D

see all

All Comments (43)

Sign In or Sign Up now to post a comment!
  • wonderful!! very interesting :D

  • A nice and simple tutorial. Thanks a? lot

  • @ElRodri

    What, fake? How the hell could that be fake? It's even more difficult to fake it than to write the code...

    Think before you post such silly comments.

  • FAKE

  • that is nice very nice processing is my favorite language for graphics

  • excellent work!

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more