Procedural Textures in HTML5 Canvas
asserttrue.blogspot.ca
asserttrue.blogspot.ca
I have no idea why the author didn't include a usable demo though. It would be nice to try out the texture generation without copy-and-pasting, saving and running the code.