Industrial Digital Twins
Connect live sensor data to 3D objects. A temperature sensor drives an object's emissive glow; a position sensor moves a crane arm; a pressure gauge scales a dial.
Status: planned. This feature is not currently in the codebase (prototype removed 2026-07).
The sections below describe the intended design. The useTwinStore / TwinPanel prototype was removed; the live ROS 2 stack (ros/, robotics/) is the natural foundation for a future twins vertical.
Architecture
Physical Sensor → MQTT Broker → Cloud Run Bridge → Firebase RTDB
│
▼
sensors/{id}/latest
│
▼
useSensorSubscriptions hook
│
▼
(planned twin-store binding)
│
▼
useSceneStore.updateObject()
│
▼
Three.js re-render
Bindings
A TwinBinding maps a sensor reading to a scene object property:
| Field | Type | Description |
|---|---|---|
objectId | string | The scene object to drive |
sensorId | string | The sensor to subscribe to |
property | enum | What to drive: position.y, rotation.x, material.emissiveIntensity, material.color, scale.x/y/z |
mapping.inputMin/Max | number | Sensor value range |
mapping.outputMin/Max | number/string | Object property range |
Numeric properties are linearly interpolated. material.color interpolates RGB channels between two hex colors.
Planned Setup
- Add
/sensors/*rules back todatabase.rules.json(removed in the 2026-07 cleanup) and deploy:firebase deploy --only database - Build an MQTT→RTDB bridge that writes to
sensors/{id}/latest - Rebuild the twin panel + binding UI (the prototype was removed 2026-07)
- Select an object and add a sensor→property binding
- Sensor readings flow into the scene via the subscription pipeline