# afonsoscheufele/digital-twin-3d architecture

> Architecture diagram of the GitHub repository afonsoscheufele/digital-twin-3d, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/afonsoscheufele/digital-twin-3d
- Repository: https://github.com/afonsoscheufele/digital-twin-3d

## Overview

This is a browser-based industrial digital-twin visualization. Users inspect a Three.js scene, select equipment, adjust its controls, and observe simulated equipment state in the scene and live metrics. The sampled source places the runtime in one large module; the README documents additional capabilities whose internal wiring was not sampled, so those links are cited to the README rather than inferred from module structure.

Main entry points: [`main.js`](https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js) (Animation Loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scene["3D Scene"]
  node_scene_runtime["Scene Runtime<br/>[main.js]"]
  node_rendering["Rendering Effects<br/>[main.js]"]
  node_camera["Camera Controls<br/>[main.js]"]
end

subgraph group_equipment["Equipment Simulation"]
  node_pipelines["Pipeline Simulation<br/>[main.js]"]
  node_machines["Machine Simulation<br/>[main.js]"]
  node_conveyors["Conveyor Simulation<br/>[main.js]"]
  node_sensors["Sensor Physics<br/>[main.js]"]
  node_physics["Physics Engine<br/>[main.js]"]
  node_simulation["Animation Loop<br/>[main.js]"]
end

subgraph group_interaction["Interaction and Controls"]
  node_selection["Object Selection<br/>[main.js]"]
  node_equipment_controls["Equipment Controls<br/>[main.js]"]
  node_scene_controls["Scene Controls<br/>[main.js]"]
end

subgraph group_monitoring["Metrics and Monitoring"]
  node_metrics["Live Metrics<br/>[main.js]"]
  node_charts["Metric Graphs<br/>[main.js]"]
  node_alerts["Temperature Alerts<br/>[main.js]"]
  node_minimap["Mini Map<br/>[main.js]"]
  node_performance["Performance Monitor<br/>[main.js]"]
end

node_user(("User"))

node_user -->|"selects objects"| node_selection
node_selection -->|"shows controls"| node_equipment_controls
node_equipment_controls -->|"adjusts flow"| node_pipelines
node_equipment_controls -->|"adjusts RPM"| node_machines
node_equipment_controls -->|"adjusts speed"| node_conveyors
node_equipment_controls -->|"resets sensors"| node_sensors
node_user -->|"moves camera"| node_camera
node_user -->|"adjusts scene"| node_scene_controls
node_scene_controls -->|"sets simulation"| node_simulation
node_scene_runtime -->|"renders scene"| node_rendering
node_scene_runtime -->|"configures camera"| node_camera
node_simulation -->|"updates flow"| node_pipelines
node_simulation -->|"updates temperature"| node_machines
node_simulation -->|"animates belts"| node_conveyors
node_simulation -->|"simulates physics"| node_sensors
node_simulation -->|"uses engine"| node_physics
node_simulation -->|"refreshes metrics"| node_metrics
node_metrics -->|"updates graphs"| node_charts
node_metrics -->|"checks temperature"| node_alerts
node_scene_runtime -->|"updates view"| node_minimap
node_scene_runtime -->|"tracks performance"| node_performance

click node_scene_runtime "https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js"
click node_rendering "https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js"
click node_camera "https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js"
click node_pipelines "https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js"
click node_machines "https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js"
click node_conveyors "https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js"
click node_sensors "https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js"
click node_physics "https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js"
click node_selection "https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js"
click node_equipment_controls "https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js"
click node_scene_controls "https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js"
click node_simulation "https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js"
click node_metrics "https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js"
click node_charts "https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js"
click node_alerts "https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js"
click node_minimap "https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js"
click node_performance "https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_scene_runtime,node_rendering,node_camera,node_user toneBlue
class node_pipelines,node_machines,node_conveyors,node_sensors,node_physics,node_simulation toneAmber
class node_selection,node_equipment_controls,node_scene_controls toneMint
class node_metrics,node_charts,node_alerts,node_minimap,node_performance toneRose
```

## Components

### 3D Scene

- [Scene Runtime](https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js): `main.js`
- [Rendering Effects](https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js): `main.js`
- [Camera Controls](https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js): `main.js`

### Equipment Simulation

- [Pipeline Simulation](https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js): `main.js`
- [Machine Simulation](https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js): `main.js`
- [Conveyor Simulation](https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js): `main.js`
- [Sensor Physics](https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js): `main.js`
- [Physics Engine](https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js): `main.js`
- [Animation Loop](https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js): `main.js`

### Interaction and Controls

- [Object Selection](https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js): `main.js`
- [Equipment Controls](https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js): `main.js`
- [Scene Controls](https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js): `main.js`

### Metrics and Monitoring

- [Live Metrics](https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js): `main.js`
- [Metric Graphs](https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js): `main.js`
- [Temperature Alerts](https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js): `main.js`
- [Mini Map](https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js): `main.js`
- [Performance Monitor](https://github.com/afonsoscheufele/digital-twin-3d/blob/main/main.js): `main.js`

### Other components

- **User**

## Connections

- User → Object Selection: selects objects (evidence: `README.md`)
- Object Selection → Equipment Controls: shows controls (evidence: `README.md`)
- Equipment Controls → Pipeline Simulation: adjusts flow (evidence: `README.md`)
- Equipment Controls → Machine Simulation: adjusts RPM (evidence: `README.md`)
- Equipment Controls → Conveyor Simulation: adjusts speed (evidence: `README.md`)
- Equipment Controls → Sensor Physics: resets sensors (evidence: `README.md`)
- User → Camera Controls: moves camera (evidence: `README.md`)
- User → Scene Controls: adjusts scene (evidence: `README.md`)
- Scene Controls → Animation Loop: sets simulation (evidence: `README.md`)
- Scene Runtime → Rendering Effects: renders scene (evidence: `main.js`)
- Scene Runtime → Camera Controls: configures camera (evidence: `main.js`)
- Animation Loop → Pipeline Simulation: updates flow (evidence: `main.js`)
- Animation Loop → Machine Simulation: updates temperature (evidence: `main.js`)
- Animation Loop → Conveyor Simulation: animates belts (evidence: `README.md`)
- Animation Loop → Sensor Physics: simulates physics (evidence: `README.md`)
- Animation Loop → Physics Engine: uses engine (evidence: `README.md`)
- Animation Loop → Live Metrics: refreshes metrics (evidence: `README.md`)
- Live Metrics → Metric Graphs: updates graphs (evidence: `README.md`)
- Live Metrics → Temperature Alerts: checks temperature (evidence: `main.js`)
- Scene Runtime → Mini Map: updates view (evidence: `README.md`)
- Scene Runtime → Performance Monitor: tracks performance (evidence: `README.md`)
