Very interesting read, arithma.
I tried grepping through the jQuery source for setInterval() and setTimeout() and I noticed that they weren't present in the animate() function, but it does call the custom() function which prefers requestAnimationFrame() over setInterval(), but falls back to it if it's the former isn't available.
requestAnimationFrame = window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame;
From the
Mozilla Docs:
Tells the browser that you wish to perform an animation; this requests that the browser schedule a repaint of the window for the next animation frame.
You can use this method in two ways:
Specify a callback routine to be called when it's time to update your animation.
Firefox only: Don't specify a callback. In this case, Firefox will deliver a MozBeforePaint event before the repaint that occurs when it's time for your next animation frame, so you can update your animation. The timeStamp property of the event will be the animation sampling time.
I don't actually know any Javascript, but this stuff is awesome. I like the pretty little sinusoidal boxes. :)