14 lines
622 B
JavaScript
14 lines
622 B
JavaScript
export const requestAnimationFrame = window.requestAnimationFrame ||
|
|
window.webkitRequestAnimationFrame ||
|
|
window.mozRequestAnimationFrame ||
|
|
window.oRequestAnimationFrame ||
|
|
window.msRequestAnimationFrame ||
|
|
function (callback) { callback.timter = window.setTimeout(callback, 1000 / 60); };
|
|
|
|
export const cancelRequestAnimFrame = window.cancelAnimationFrame ||
|
|
window.webkitCancelRequestAnimationFrame ||
|
|
window.mozCancelRequestAnimationFrame ||
|
|
window.oCancelRequestAnimationFrame ||
|
|
window.msCancelRequestAnimationFrame ||
|
|
function (callback) { window.clearTimeout(callback); };
|