requestAnimationFrame to smooth progress