Doodle.js — A Sprite Library for Canvas

I’ve been having a lot of fun with the HTML Canvas element and really look forward to utilizing the next-gen Javascript engines the browsers are starting to roll out.
However the drawing commands for it are a bit… basic. It can be difficult to work creatively when you have to constantly handle the “low level” details — that’s why I wanted to create a library that did it for me.

Doodle.js attempts to create a fun and easy way to interact with the Canvas that is lightweight, flexible, and functional. While it contains a few shape primitives it is not meant to be a full-fledged drawing api, rather a framework that allows you to build sprites and interact with them in an expressive way.


This is a 0.1 development release so please treat it accordingly. Bugs are sure to crop up so it’s best to test things out with your browser’s debug console open. I’ve been trying it on Chrome, Firefox 3.0.8, and IE 8 (using excanvas). Doodle.js is open source software and has been released under the MIT license, please feel free to poke around and submit code fixes :)

Here are a few demos I put together that you might want to take a look at before reading on.

Read more…

Comments (18)
Posted on April 8, 2009

Tags: , ,

Emacs todo-list-mode

Although it wasn’t on my todo-list, I really had a hankering to add some auto-color highlighting to mine. So I created a pretty basic major-mode for Emacs which I call todo-list-mode. My list is just a plain text file that I can sort the lines based on the assigned number in the first column. I created a few regexp’s to pick out these and change the formatting based on priority. It’s pretty simple and easy to extend, so if you want to add more numbers or change the colors — go nuts. It also supports hash style comments to tack on the end of a line.

Grab it: todo-list-mode.el,
or fork it: on GitHub

My current todo-list.
Read more…

Comments (0)
Posted on January 17, 2009

Tags:

Joy is an Insufferable Strain of Control

link to joyStrain demo

Typographic demo combining physics and 3D. A creative variation on the Papervision3D/Box2D method I demonstrated here.

Comments (4)
Posted on October 21, 2008

Tags: , ,

Papervision3D + Box2D

PaperBox2D image

In a recent project I wanted to incorporate some physics with a 3D environment. I decided on Box2DFlash (a port of Box2D), which is a great engine even if the syntax is a little awkward for an Actionscript 3 library.

See the PaperBox2D demo, and the source is available (or right-click on the demo). Hit the ‘d’ button during the simulation to toggle the debug regions for the 2d calculations and see how they are mapped to the objects in 3d space.


Updated 11.20.08, recent api changes in Box2DFlash.


Larry Lague has done a port of this demo using Away3D. Very nice!

Comments (11)
Posted

Tags: , ,

Type Around the Neighborhood

I brought my camera along for my daily constitutional and decided to take in some of the local signage. Gill Sans (aka “England’s Helvetica”) seems to be a popular typeface around Buffalo, which is fine but can be a bit tiresome. Kinda like a girl you had a fling with once and for some reason keeps popping up — you don’t really regret anything, but you’d rather try something else.

Read more…

Comments (0)
Posted on September 23, 2008

Tags: , ,