When two render frames land in the same performance.now() tick, `currentTime - lastFrameTime === 0`, so `fps = 1000 / 0 = Infinity`, and `averageFps = averageFps * 0.9 + Infinity * 0.1 = Infinity` poisons the EMA forever after a single zero-dt tick. The UI then displays "Infinity FPS" until reload. Floor deltaTime at 1 ms before the division. That caps displayed FPS at 1000 (far above any real render rate so the cap is never observed in practice) but keeps the EMA finite. Reported in #519 ("Bug 2 — FPS shows Infinity") by @kapilsoni2013 on a 3-node ESP32-S3-WROOM multi-node setup with edge-tier 1 + 2. |
||
|---|---|---|
| .. | ||
| backend-detector.js | ||
| mock-server.js | ||
| pose-renderer.js | ||