…drawing with canvas

For Safari 3, Webkit, or Firefox

In a very experimental mode, I started writing a drawing tool in html canvas and javascript from scratch. I hooked up the mouse events to the drawing loop and figured out how to keep track of the mouse coordinates when resizing the browser window.

The sketch is here to play with, much in the spirit of my early Processing experiments, and the following are a bunch of screenshots from when I was messing with the style parameters as I was fixing bugs in the event handler and the calls to draw.

canvas_0.pngcanvas_1.pngcanvas_3.pngcanvas_5.png

The next are screenshots of a modification I made to Rafael Robayna’s Painter tool. He has implemented a nice Widget class for canvas that anyone could extend, and a playback control that lets you sit and see how you made your drawing. An interesting exercise in memorization that is relevant to my concerns about virtual representations of time.

dibujo_1a.pngdibujo_2a.png

Leave a Reply