If you’re curious about the new requestAnimationFrame API, here’s a demo along with a code walk-through:
The requestAnimationFrame API is a replacement for setTimeout and setInterval in the context of HTML animations. It has two primary advantages over timer functions:
- It is synchronized with the browser’s repaint loop which allows for more highly optimized animations.
- Since it’s specifically designed and intended to be used for animation rather than being a general purpose timer, the browser knows that it’s safe to throttle it back when the tab isn’t active. Throttling back animations means freeing up CPU cycles, and reducing unnecessary battery drain on mobile devices.
If you want to see this animation in action (and/or check out the code), it’s available here (Hint: if it’s running slowly, try making your browser window smaller). Thanks to Chris Georgenes for the “rocker girl” animation. And finally, here are the resources I used to learn about requestAnimationFrame:

Pingback: Adobe touts tools for Flash-to-HTML conversion | Brian's Blog Site
Pingback: Adobe touts tools for Flash-to-HTML conversion |
Pingback: Adobe touts tools for Flash-to-HTML conversion | BussinessTree NewsBussiness Tree
Pingback: Adobe touts tools for Flash-to-HTML conversion | Flash To HTML5,convert Flash to HTML,flash to html5 migration