I’ve been experimenting with JavaScript and the canvas element lately, something I wanted to do since a long time, and I must say it’s quite fun to play with. As a result, I submited a modest 322 bytes entry for JS1k (1k Javascript demo contest), which is a visual representation of a stripped-down bubble sort algorithm producing diagonal lines pattern.
You can see it in action here : http://js1k.com/demo/503
The code is embedded below :
1
| |
The contest is running until September 10th so should you be interested, I recommend the Canvas tutorial at Mozilla Developer Network and the Closure Compiler to help you minimize your JavaScript code. Good luck everyone, and have fun!