Skip to content

Commit 79aaf2d

Browse files
committed
fix: specify Three.js for mesh topology visualization in ADR-053
Use Three.js for the mesh topology view, consistent with existing visualization patterns in ui/observatory/js/ and ui/components/. Includes implementation details: MeshPhongMaterial for node status, BufferGeometry for dynamic updates, OrbitControls, raycasting. Co-Authored-By: claude-flow <ruv@ruv.net>
1 parent df7f9a5 commit 79aaf2d

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

docs/adr/ADR-053-ui-design-system.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ Status dot uses `--status-online/warning/error`. Card background shifts on hover
139139

140140
Progress bar uses `--accent` fill with subtle pulse animation during active writes.
141141

142-
#### 3. Mesh Topology View
142+
#### 3. Mesh Topology View (Three.js)
143143

144-
Interactive visualization of the entire sensing network as a force-directed graph. Each node is a circle. Edges represent signal paths. The coordinator node is visually distinct (larger, outlined).
144+
Interactive 3D visualization of the sensing network. Each node is a sphere. Edges are lines representing signal paths. The coordinator node is visually distinct (larger, outlined ring). Built with **Three.js**, consistent with the existing visualization stack in `ui/observatory/js/` and `ui/components/`.
145145

146146
```
147147
+-- Mesh Topology ------------------------------------------+
@@ -156,7 +156,15 @@ Interactive visualization of the entire sensing network as a force-directed grap
156156
+-----------------------------------------------------------+
157157
```
158158

159-
Force-directed graph using D3 or a lightweight canvas renderer. Nodes are color-coded by status (green/amber/red). Edge thickness indicates signal strength. Clicking a node opens its detail in the Inspector panel. The graph updates in real-time as nodes join, leave, or change status.
159+
**Three.js implementation details:**
160+
- Force-directed layout computed on CPU, rendered as `THREE.Group` with `THREE.Mesh` (spheres) and `THREE.Line` (edges)
161+
- Node spheres use `THREE.MeshPhongMaterial` with emissive color matching `--status-online/warning/error`
162+
- Edge lines use `THREE.LineBasicMaterial` with opacity mapped to signal strength
163+
- Coordinator node rendered with `THREE.RingGeometry` outline
164+
- Camera: `OrbitControls` for pan/zoom/rotate, reset button returns to default view
165+
- Follows existing patterns: `BufferGeometry` + `BufferAttribute` for dynamic updates (see `ui/observatory/js/subcarrier-manifold.js`)
166+
- Raycasting for node click → opens detail in Inspector panel
167+
- Real-time updates as nodes join, leave, or change status — geometry attributes updated per frame
160168

161169
#### 4. PropertyGrid (Unity Inspector-style)
162170

@@ -226,7 +234,7 @@ Minimal and purposeful:
226234
- Panel collapse/expand: 200ms ease-out
227235
- Node card health transition: 300ms (color fade, not flash)
228236
- Progress bar fill: smooth 60fps CSS transition
229-
- Mesh graph node movement: D3 spring simulation (no easing hacks)
237+
- Mesh graph: Three.js render loop at 60fps, force simulation on requestAnimationFrame
230238
- No loading spinners — use skeleton placeholders instead
231239

232240
### Branding
@@ -261,5 +269,6 @@ Minimal and purposeful:
261269

262270
- ADR-052: Tauri Desktop Frontend
263271
- Unity Editor UI Guidelines: https://docs.unity3d.com/Manual/UIE-USS.html
272+
- Three.js (existing project dependency): `ui/observatory/js/`, `ui/components/`
264273
- Inter font: https://rsms.me/inter/
265274
- JetBrains Mono: https://www.jetbrains.com/lp/mono/

0 commit comments

Comments
 (0)