From 9746d255ff864c58384e8cb1042953bc7b886ea7 Mon Sep 17 00:00:00 2001 From: Deploy Bot Date: Tue, 28 Apr 2026 15:20:23 -0400 Subject: [PATCH] feat(ui): 3D stick figure visualization with COCO-17 joints + smooth animations - Add ui/spatial.html: Three.js 3D renderer for spatial dashboard - COCO-17 keypoint definitions inline; 18 bone pairs (STANDING_KEYPOINTS) - Three pose variants: standing (green), sitting (yellow), lying (blue) - Persistent figure map (no recreate-on-every-frame) via FigureState class - Position lerp (factor 0.1) for smooth interpolation between ticks - Posture-transition keypoint blending over ~1s (poseBlend 0->1 at +0.03/frame) - Breathing animation: torso Y-scale at detected BR rate from /api/v1/vital-signs - Activity-based sway: still=0.01m, moderate=0.03m, active=0.08m - Opacity fadeout for disappearing bodies (quality field decrements at -0.05/tick) - WS subscription to spatial_update + body_cluster_update; falls back to polling - Fallback: single standing figure from voxel centroid when no cluster data Depends on /api/v1/spatial/clusters endpoint from body tracking PR (#487). --- CHANGELOG.md | 9 + ui/spatial.html | 1276 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1285 insertions(+) create mode 100644 ui/spatial.html diff --git a/CHANGELOG.md b/CHANGELOG.md index eb52f0697..641051168 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added +- **3D stick figure visualization for spatial dashboard** (`ui/spatial.html`) — + Renders COCO-17 keypoint skeletons from `/api/v1/spatial/clusters` body cluster + centroids using Three.js. Three pose variants: standing (green), sitting (yellow), + lying (blue). Persistent figure map with position lerp (factor 0.1), smooth + posture-transition keypoint blending (~1s), breathing-rate Y-scale animation, + activity-based sway (still=0.01m, moderate=0.03m, active=0.08m), and opacity + fadeout for disappearing bodies. Falls back to polling `/api/v1/spatial/clusters` + every 2s when WebSocket is unavailable. Depends on body tracking endpoints + provided by the body tracking PR (#487). - **`nvsim` crate — deterministic NV-diamond magnetometer pipeline simulator** (ADR-089) — New standalone leaf crate at `v2/crates/nvsim` modeling a forward-only magnetic sensing path: scene → source synthesis (Biot–Savart, dipole, diff --git a/ui/spatial.html b/ui/spatial.html new file mode 100644 index 000000000..176209495 --- /dev/null +++ b/ui/spatial.html @@ -0,0 +1,1276 @@ + + + + + +RuView Spatial View + + + + + + + +
Waiting for spatial pipeline...
+ +
+
RuView Spatialβ
+
RF Tomography Visualization
+
RF tomography preview. Voxel clustering is a single-blob demo — multi-body resolution pending ADR-044.
+
+ +
-- FPS
+ +
+ + + + + + + +
+ +
+

Spatial Status

+
Status--
+
Active Nodes--
+
Links--
+
Reconstructions--
+
Resolution--
+
Residual--
+
+
Presence (coarse)β0
+
Breathingβ--
+
Heart Rateβ--
+
⚠ Tomography is currently a single-cluster blob (ADR-044)
+
+ +
+

Voxel Density

+
Low (0.01-0.3)
+
Medium (0.3-0.6)
+
High (0.6-1.0)
+
Sensor Node
+
Standing
+
Sitting
+
Lying
+
+ + + + + +