background preloader

RequestAnimationFrame for smart animating

RequestAnimationFrame for smart animating
If you’ve never written code to animate inside the browser, you can stop reading :) What is requestAnimationFrame? In your animation work, you’ve used a timer loop to make changes every few milliseconds. Good for us: browser vendors have decided, “hey, why don’t we just give you an API for that, because we can probably optimize some things for you.” Why should I use it? The browser can optimize concurrent animations together into a single reflow and repaint cycle, leading to higher fidelity animation. OMG I can brag about having a site with battery-friendly animations? Yeah bro. How should I use this? Note: I am using ‘requestAnimFrame` here because since the spec is still in flux, I don’t want to make a straight polyfill, yet. 2012.01.07: The spec has gotten some fixes and settled down. A robust polyfill Opera engineer Erik Möller wrote about rAF and developed a polyfill that better handles browsers without native support. I have this polyfill available as a gist as well. Is it ready?

sole/tween.js jQuery: The Write Less, Do More, JavaScript Library Columnizer jQuery Plugin The Columnizer jQuery Plugin will automatically layout your content in newspaper column format. You can specify either column width or a static number of columns. And, of course, it’s easy to use! Get the source Available on Github at Stable Version: 1.6.0 Download It Here Quick Start To use columnizer, just call the columnize() function on your jQuery selection, and that’s it! Release Candidate New Features! Now you can manually specify line breaks for some or all of your columns! Stable Version New Features Stable Release Bug Fixes Columnizer is now backwards compatible with older versions of jQueryFixed `lastNeverTallest` sometimes leaving a tall last columnAdded a class to nodes that are split between columns. Demos Sample 1: Simple text only columns. Documentation Documentation is available on the Github repository’s wiki. Helpful Hints License Columnizer by Adam Wulf is licensed under a Creative Commons Attribution 3.0 United States License.

Related: