We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e949a1 commit c655bc3Copy full SHA for c655bc3
requestAnimationFrame兼容.js
@@ -18,7 +18,7 @@ if (!Date.now)
18
var lastTime = 0;
19
window.requestAnimationFrame = function(callback) {
20
var now = Date.now();
21
- var nextTime = Math.max(lastTime + 16, now);
+ var nextTime = Math.max(lastTime + (1000 / 60), now);
22
return setTimeout(function() { callback(lastTime = nextTime); },
23
nextTime - now);
24
};
0 commit comments