This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Updated requestAnimationFrame polyfill that uses new high-resolution timestamp | |
// | |
// References: | |
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// https://gist.github.com/1579671 | |
// http://updates.html5rocks.com/2012/05/requestAnimationFrame-API-now-with-sub-millisecond-precision | |
// | |
// Note: this is my initial stab at it, *requires additional testing* | |
(function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* requestAnimationFrame polyfill by Erik Möller & Paul Irish et. al. | |
* https://gist.github.com/1866474 | |
* | |
* http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
* http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
**/ | |
/*jshint asi: false, browser: true, curly: true, eqeqeq: true, forin: false, newcap: true, noempty: true, strict: true, undef: true */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
NewerOlder