Throttled animation speed

Request animation frame (RAF), is currently the best way to control animation. It respects the browser's resources and everything stops when a tab is in the background. Great news for mobile batteries!

You can't set the frames per second (fps), which defaults to about 60fps.

A check for elapsed time within the RAF loop allows finer control, which is what we see above.

Tested down to IE7.

Need higher resolution timing?

A high resolution timing method is possible for recent browsers only using

Interesting explaination of this method can be found here:
When milliseconds are not enough:

And this is a demo of throttling using