update requestAnimationFrame