this.tick_duration = 25;
....
this.now = new Date().getTime();
// Drawing...
this.time_to_paint = (new Date().getTime()) - this.now;
this.load = Math.round((this.time_to_paint / this.tick_duration) * 100);I like how he can fall off the ledge into an infinite drop.
This downside of Canvas also means it may become a dead-end for high-performance 2D, unless we discover some way of making all manipulations go completely on-GPU. Canvas is presently best suited for creation of individual textures and sprites, while other methods(CSS, SVG, WebGL) are better to render and transform them.
Performance
The HTML backend has received a particular attention to be as efficient as possible.I made a prototype a while ago just to demo some sprite movement while messing around with Node.js (it's concurrent multi-user): http://rpg.sleeperbot.com/