Skip to main content

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:

FieldTypeDescription
objectIdstringThe scene object to drive
sensorIdstringThe sensor to subscribe to
propertyenumWhat to drive: position.y, rotation.x, material.emissiveIntensity, material.color, scale.x/y/z
mapping.inputMin/MaxnumberSensor value range
mapping.outputMin/Maxnumber/stringObject property range

Numeric properties are linearly interpolated. material.color interpolates RGB channels between two hex colors.

Planned Setup

  1. Add /sensors/* rules back to database.rules.json (removed in the 2026-07 cleanup) and deploy: firebase deploy --only database
  2. Build an MQTT→RTDB bridge that writes to sensors/{id}/latest
  3. Rebuild the twin panel + binding UI (the prototype was removed 2026-07)
  4. Select an object and add a sensor→property binding
  5. Sensor readings flow into the scene via the subscription pipeline