Wrapped updates in requestAnimationFrame() to prevent jitter.