Created
January 4, 2020 10:37
-
-
Save riffrain/dd08140be7eda740ecf242fe753acc09 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const animateFrame = ((callback) => { | |
return window.requestAnimationFrame | |
|| function (cb) { | |
return window.setTimeout(cb, 1000/60); | |
}; | |
})(); | |
export const cancelAnimateFrame = window.cancelAnimationFrame || window.clearTimeout; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment