Switch to requestAnimationFrame().