Skip to main content
100%

Gist 147496

✓ Published0🌍 Public
XXXX
Last edited Jul 15, 2009
Created on Jul 15, 2009

This example renders a Processing sketch inside an HTML canvas using the HAML template engine. The code defines a helper method that outputs the text “HELLO!” and embeds it directly into the Processing source code via a `%script` tag with the `application/processing` MIME type, targeting a canvas named “login” with fixed 100-pixel dimensions. The Processing script, generated dynamically from the Ruby helper, draws onto that canvas. It demonstrates how to mix server-side template logic with client-side Processing rendering in a single page.

AI-generated description

Similar vizzes