Recently I've been looking at Povray, pyprocessing, and cfdg (version 3.0) as tools for creating digital images. I have branched two separate blogs where I mainly explore jruby + processing and

Monday, 1 December 2008

Processing Applets can be Implemented using Javascript

Yes you don't even need a jvm to get your applet to run in a web browser, see my example here. To find out all about it, click on the processing.js heading... That takes you to the 'processing.js' authors (John Resig) website.
You can get the required enabling javascript code here the code comes bundled with many examples from the processing website.

A requirement for this script to work is support for the once controversial html element <canvas>, which is proprietary to Apple who have agreed to release it, should it become a web standard (this is scheduled for html 5). It is probably also controversial as in some ways it could be seen as replacement for SVG, and lacks namespace. I have now modified my web page to alert non-canvas enable browsers, I have just checked in Google Chrome it displays both image and my alert, IE8 just displays the alert...(revision as of 23 December 2008). However only firefox 3.0+ can display the text, haven't tried safari or opera (w3m correctly displays alt information).

Conclusion best viewed in Firefox 3 (works on earlier versions eg Firefox except for text display).
Update 23 Feb 2009 just found this interesting link to a talk given by John Resig

1 comment:

  1. That's a cunning plan there... I'll have to look that up to try it for myself.



Blog Archive

About Me

My photo
Pembrokeshire, United Kingdom
I have developed JRubyArt and propane new versions of ruby-processing for JRuby- and processing-3.2.2