HTML5 Canvas and requestAnimationFrame in action