Replace setTimeout with requestAnimationFrame.

requestAnimationFrame is [nice](https://developer.mozilla.org/en-US/docs/Web/API/window.requestAnimationFrame).

Here's a [requestAnimationFrame polyfill](https://gist.github.com/paulirish/1579671) for older browsers, which just falls back to setTimeout.