⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

Fix Your Timestep: JS Animation Loop Simulator

Every interactive JavaScript animation — a CSS-driven transition, a canvas particle system, a physics-based spring — runs on top of requestAnimationFrame, and the interval between frames is never perfectly constant. This simulator drops three physically identical bouncing balls under the same simulated jittery, dropped-frame conditions, but integrates each one with a different animation-loop strategy: a naive position += velocity * dt update with no safeguards, a clamped-dt version that caps the worst spikes, and a fixed-timestep accumulator that decouples simulation stepping from rendering. Sliders control how severe the frame jitter and FPS throttling are, plus the underlying gravity and bounce restitution, while live readouts track each ball's energy-conservation error against the physically correct fixed-timestep result — making visible exactly why real animation and game loops are built the way they are.