requestAnimationFrame helper