
From the beginning, Lily has used Firefox's SVG capabilities for various shape primitive externals ("circle", "rect", etc) and to draw connections between objects, but until this weekend, it lacked a straightforward way to use SVG's capabilities for animation and graphics. To address this, I've added a new UI object, "svg" that provides a resizable SVG canvas to draw to. As an added bonus, the drawing API is compatible with the Processing API, meaning that "svg" can run most of the 2-D examples on the Processing site with minimal modification. "svg" drawing commands can be messages from other objects sent via connections or run from an external script file. It's also possible for an external script to define a method that can be called with parameters from an input message. Scripts can also output messages from outlets.
As you'd expect with a Javascript-based SVG implementation, there are some limitations- there's no 3-D yet (though this could be added), no support for OpenGL, no reading & writing pixels directly, etc. There are performance limits as well, though this really only becomes an issue for animations that need to manipulate hundreds (or thousands) of objects many times a second. And with Tarmarin on the way, this should become less of an issue. There are even a couple of advantages- there's no compilation, so programs can be switched in and out instantly at runtime, and unlike an applet, SVG is completely transparent and interoperable with the web page it's embedded in. "svg" will be included in Beta 4 which should be ready sometime in next month. Interested in testing? Let us know.