Viewing File: /home/ubuntu/route-and-root-frontend-base/node_modules/framesync/dist/es/on-next-frame.js

var defaultTimestep = (1 / 60) * 1000;
var getCurrentTime = typeof performance !== "undefined"
    ? function () { return performance.now(); }
    : function () { return Date.now(); };
var onNextFrame = typeof window !== "undefined"
    ? function (callback) {
        return window.requestAnimationFrame(callback);
    }
    : function (callback) {
        return setTimeout(function () { return callback(getCurrentTime()); }, defaultTimestep);
    };

export { defaultTimestep, onNextFrame };
Back to Directory File Manager