failed
+ // to connect. Show actionable guidance instead of leaving the
+ // user staring at a "demo" badge wondering why their ESP32
+ // feed isn't visible.
+ if (data._backendUnreachable) {
+ var nextSec = Math.round((data._retryInMs || 1000) / 1000);
+ html += ''
+ + '● ' + data._backendUrl + ' unreachable'
+ + '
' + (data._backendError || "connection failed") + ''
+ + '
retry in ' + nextSec + 's'
+ + '
start the server:'
+ + '
cargo run -p wifi-densepose-pointcloud --release \\
-- serve --bind 127.0.0.1:9880'
+ + '
';
+ }
+
// CSI frame rate
html += ''
+ 'CSI Rate: '
@@ -676,8 +733,9 @@
});
})();
+ // fetchCloud self-schedules via setTimeout — no setInterval to avoid
+ // overlapping calls on slow networks and to support exponential backoff.
fetchCloud();
- setInterval(fetchCloud, 100); // 10 Hz — denser updates so face mesh feels live and the spiral animates smoothly
function updateSplats(splats) {
if (pointsMesh) scene.remove(pointsMesh);