Ruby-Processing on the Web
Most Ruby-Processing sketches can be exported as Java applets, to be viewed on the web. Ruby-Processing includes an applet exporter, which packs up your sketch and all of its dependencies, and generates an HTML page, so that you can just drop the folder on your server. To use it, just do a script/applet path/to/my_sketch.rb That will create an “applets” folder with your exported sketch stored inside. Exports respect the width, height, and title of your sketch, and also will add a description, like so:
# Description: # This description will be extracted and printed in the HTML at the bottom # of the generated gallery page. Cool. The width and height will set the # dimensions of the applet, and the title will become the title of the page. # Code goes here... Sketch.new :width => 700, :height => 500, :title => "Wow, I'm on the Web."
Stumbling Block: Applet export is still a dark art — sketches which use Java Native libraries will not run (apart from OpenGL), due to applets’ security restrictions.
Check out the Gallery, for some live applets.
Last edited by jashkenas, 2 months ago
Versions:
