We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a80ab2f commit 6401b0eCopy full SHA for 6401b0e
1 file changed
Scripts/CustomPrototypes.js
@@ -199,7 +199,8 @@ if (!document.elementsFromPoint) document.elementsFromPoint = function (point) {
199
200
if (!window.requestAnimationFrame) window.requestAnimationFrame = function(callback, element) {
201
var currTime = new Date().getTime();
202
- var timeToCall = Math.max(0, 16 - (currTime - lastTime));
+ var fps = 1;
203
+ var timeToCall = Math.max(0, 1000/fps - (currTime - lastTime));
204
var id = window.setTimeout(function() { callback(currTime + timeToCall); }, timeToCall);
205
lastTime = currTime + timeToCall;
206
return id;
0 commit comments