Created
May 29, 2020 18:38
-
-
Save pomber/24b8286282ec10cc015a591d9f237b26 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
function slowmo(rate = 10) { | |
window._raf = window.requestAnimationFrame | |
window.requestAnimationFrame = f => window._raf(t => f(t/rate)) | |
Date._now = Date.now | |
Date.now = () => Date._now() / rate | |
performance._now = performance.now | |
performance.now = () => performance._now()/rate | |
} | |
slowmo() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment