Skip to content

Instantly share code, notes, and snippets.

View miladj3's full-sized avatar
💭
I loved microsoft

milad jafari miladj3

💭
I loved microsoft
View GitHub Profile
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()