rheh/HTML5-canvas-projects — pull request #1 by codepo8 (2012-10-27 08:56:37+00:00)
Title: Great little demo - I cleaned it up a bit to work around some issues

* added alternative text to the images in the HTML to help out with a11y
* removed the inline event handler on the body and moved the script to the bottom. The former is only needed for IE6 and that one has no canvas and the latter makes it faster
* changed the script to be inside the closure - right now all variables were global!
* simplified the random ball picking to use an object instead of the highly repetitive if statement
* sped up the loop by not re-evaluating the length of the balls array in every for iteration