Freeze The Fall Of Emiri Top -
function stopPhysicsLoop() if (animationId) cancelAnimationFrame(animationId); animationId = null;
function startPhysicsLoop() lastTs = performance.now(); if (!animationId) animationId = requestAnimationFrame(loop); freeze the fall of emiri top
function loop(ts: number) const dt = (ts - lastTs) / 1000; lastTs = ts; if (!state.isFrozen) state.velocityY += gravity * dt; state.positionY += state.velocityY * dt; // collision/ground checks... updateDOM(); animationId = requestAnimationFrame(loop); animationId = null
Gentle Reminder
This website began in 1995 as a personal project by Emily Ezust, who has
been working on it full-time without a salary since 2008. Our research has
never had any government or institutional funding, so if you
found
the information here useful, please consider making a
donation.
Your help is greatly appreciated!
–Emily Ezust, Founder
We use cookies for internal analytics and to earn much-needed advertising revenue. (Did you know you can help support us by turning off ad-blockers?) To learn more, see our Privacy Policy . To learn how to opt out of cookies, please visit this site .
I acknowledge the use of cookies