I hereby decree

by David LeMieux

 

I've been doing some experiments with JavaScript and the Canvas tag. Here are some results:

Starry Blocks
Starry Blocks

Launch Pad Quads
Launch Pad Quads

The first just traverses an image and chunks it in to blocks of a configurable size and displays the average color for the block. The second recursively subdivides the image based on color threshold and size and then, again, displays the average color if the rules are met.

You can see them compute live here and here. (Google Chrome or a very modern browser recommended)

The code isn't completely optimized, and I have found some interesting irregularities while working with the Canvas Context object, but in all it seems like a straightforward piece of technology.

For more Canvas fun, check out EasleJS by Grant Skinner (not used here). He has essentially taken a lot of the vocabulary and paradigms from Flash and ported them over in to a performant Canvas render engine.

 

blog comments powered by Disqus