HTML5 Canvas and Animation Framework