use requestAnimationFrame in client