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: Scaffolded + panel mounted. Needs MQTT bridge and RTDB rules deployed.
Architecture
Physical Sensor → MQTT Broker → Cloud Run Bridge → Firebase RTDB
│
▼
sensors/{id}/latest
│
▼
useSensorSubscriptions hook
│
▼
useTwinStore.pushReading()
│
▼
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.
Getting Started
- Deploy RTDB rules:
firebase deploy --only database - Build an MQTT→RTDB bridge that writes to
sensors/{id}/latest - Open the TwinPanel in the right column
- Select an object, click "+" to add a binding
- Sensor readings flow automatically via the subscription hook