Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.requestNextAnimationFrame = (function () {
- var self = this;
- return window.requestAnimationFrame ||
- window.webkitRequestAnimationFrame ||
- window.mozRequestAnimationFrame ||
- window.oRequestAnimationFrame ||
- window.msRequestAnimationFrame ||
- function (callback, element) {
- var start, finish;
- window.setTimeout(function () {
- start = +new Date();
- callback(start);
- finish = +new Date();
- self.timeout = 1000 / 60 - (finish - start);
- }, self.timeout);
- };
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement