Skip to content

Instantly share code, notes, and snippets.

@marcelaraujo
Created May 21, 2014 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcelaraujo/2ce3d1390f8661dc4c71 to your computer and use it in GitHub Desktop.
Save marcelaraujo/2ce3d1390f8661dc4c71 to your computer and use it in GitHub Desktop.
request animation
var requestAnimFrame = (function () {
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function (/* function */ callback, /* DOMElement */ element) {
window.setTimeout( callback, 16.667 );
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment