Html5 - "requestAnimationFrame" API for animation loop