# blendi-remade/dioramas architecture

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

- Interactive diagram: https://gitdiagram.com/blendi-remade/dioramas
- Repository: https://github.com/blendi-remade/dioramas

## Overview

Dioramas is a framework and collection of 20 cinematic, interactive 3D websites. A visitor browses the gallery, opens an example, and interacts with its scroll-driven or pointer-driven scene. The shared engine supplies rendering and page services; the README also documents an asset-generation path from prompts through generated images and models to optimized models. The gallery and core links are supported by excerpts; some engine capabilities and asset-processing links are documented in the README rather than verified in source excerpts.

Main entry points: [`src/index/main.js`](https://github.com/blendi-remade/dioramas/blob/main/src/index/main.js) (World gallery), [`examples`](https://github.com/blendi-remade/dioramas/tree/main/examples) (20 interactive sites), [`scripts/gen.mjs`](https://github.com/blendi-remade/dioramas/blob/main/scripts/gen.mjs) (3D generation), [`src/core/engine.js`](https://github.com/blendi-remade/dioramas/blob/main/src/core/engine.js) (Render engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_asset["Asset creation"]
  node_prompts["Asset prompts"]
  node_imagegen["Image generation<br/>[gen.mjs]"]
  node_meshgen["3D generation<br/>[gen.mjs]"]
  node_falclient["fal client<br/>[fal.mjs]"]
  node_manifest["Generation manifest<br/>[manifest.json]"]
  node_modelstore[("Optimized models")]
end

subgraph group_engine["Shared engine"]
  node_enginecore["Render engine<br/>[engine.js]"]
  node_pointer["Pointer input<br/>[input.js]"]
  node_scroll["Scroll choreography<br/>[scroll.js]"]
  node_reflections["Planar reflections<br/>[reflector.js]"]
  node_textures["Procedural textures<br/>[textures.js]"]
  node_volumetrics["Volumetric lights<br/>[volumetric.js]"]
  node_assets["Scene asset loading<br/>[assets.js]"]
  node_pageui["Page chrome<br/>[ui.js]"]
end

subgraph group_worlds["Example worlds"]
  node_worldregistry["World registry<br/>[worlds.js]"]
  node_examples["20 interactive sites"]
end

subgraph group_gallery["Gallery"]
  node_gallery["World gallery<br/>[main.js]"]
end

node_visitor(("Visitor"))

node_visitor -->|"browses"| node_gallery
node_gallery -.->|"opens worlds"| node_examples
node_prompts -->|"supplies prompts"| node_imagegen
node_imagegen -->|"calls client"| node_falclient
node_meshgen -->|"calls client"| node_falclient
node_imagegen -->|"records results"| node_manifest
node_meshgen -->|"records jobs"| node_manifest
node_meshgen -->|"generates raw models"| node_modelstore
node_meshgen -.->|"optimized into"| node_modelstore
node_gallery -->|"creates engine"| node_enginecore
node_gallery -->|"reads input"| node_pointer
node_gallery -->|"uses scrolling"| node_scroll
node_gallery -->|"sets cursor"| node_pageui
node_gallery -->|"creates reflection"| node_reflections
node_gallery -->|"reads worlds"| node_worldregistry
node_pageui -->|"reads world list"| node_worldregistry
node_pointer -->|"uses damping"| node_enginecore
node_examples -.->|"build on engine"| node_enginecore
node_examples -.->|"use reflections"| node_reflections
node_examples -.->|"use textures"| node_textures
node_examples -.->|"use spotlights"| node_volumetrics
node_examples -.->|"load scene assets"| node_assets

click node_prompts "https://github.com/blendi-remade/dioramas/tree/main/assets/jobs"
click node_imagegen "https://github.com/blendi-remade/dioramas/blob/main/scripts/gen.mjs"
click node_meshgen "https://github.com/blendi-remade/dioramas/blob/main/scripts/gen.mjs"
click node_falclient "https://github.com/blendi-remade/dioramas/blob/main/scripts/fal.mjs"
click node_manifest "https://github.com/blendi-remade/dioramas/blob/main/assets/manifest.json"
click node_modelstore "https://github.com/blendi-remade/dioramas/tree/main/public/models"
click node_enginecore "https://github.com/blendi-remade/dioramas/blob/main/src/core/engine.js"
click node_pointer "https://github.com/blendi-remade/dioramas/blob/main/src/core/input.js"
click node_scroll "https://github.com/blendi-remade/dioramas/blob/main/src/core/scroll.js"
click node_reflections "https://github.com/blendi-remade/dioramas/blob/main/src/core/reflector.js"
click node_textures "https://github.com/blendi-remade/dioramas/blob/main/src/core/textures.js"
click node_volumetrics "https://github.com/blendi-remade/dioramas/blob/main/src/core/volumetric.js"
click node_assets "https://github.com/blendi-remade/dioramas/blob/main/src/core/assets.js"
click node_pageui "https://github.com/blendi-remade/dioramas/blob/main/src/core/ui.js"
click node_worldregistry "https://github.com/blendi-remade/dioramas/blob/main/src/core/worlds.js"
click node_examples "https://github.com/blendi-remade/dioramas/tree/main/examples"
click node_gallery "https://github.com/blendi-remade/dioramas/blob/main/src/index/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_prompts,node_imagegen,node_meshgen,node_falclient,node_manifest,node_modelstore toneBlue
class node_enginecore,node_pointer,node_scroll,node_reflections,node_textures,node_volumetrics,node_assets,node_pageui toneAmber
class node_worldregistry,node_examples toneMint
class node_gallery toneRose
class node_visitor toneIndigo
```

## Components

### Asset creation

- [Asset prompts](https://github.com/blendi-remade/dioramas/tree/main/assets/jobs): `assets/jobs`
- [Image generation](https://github.com/blendi-remade/dioramas/blob/main/scripts/gen.mjs): `scripts/gen.mjs`
- [3D generation](https://github.com/blendi-remade/dioramas/blob/main/scripts/gen.mjs): `scripts/gen.mjs`
- [fal client](https://github.com/blendi-remade/dioramas/blob/main/scripts/fal.mjs): `scripts/fal.mjs`
- [Generation manifest](https://github.com/blendi-remade/dioramas/blob/main/assets/manifest.json): `assets/manifest.json`
- [Optimized models](https://github.com/blendi-remade/dioramas/tree/main/public/models): `public/models`

### Shared engine

- [Render engine](https://github.com/blendi-remade/dioramas/blob/main/src/core/engine.js): `src/core/engine.js`
- [Pointer input](https://github.com/blendi-remade/dioramas/blob/main/src/core/input.js): `src/core/input.js`
- [Scroll choreography](https://github.com/blendi-remade/dioramas/blob/main/src/core/scroll.js): `src/core/scroll.js`
- [Planar reflections](https://github.com/blendi-remade/dioramas/blob/main/src/core/reflector.js): `src/core/reflector.js`
- [Procedural textures](https://github.com/blendi-remade/dioramas/blob/main/src/core/textures.js): `src/core/textures.js`
- [Volumetric lights](https://github.com/blendi-remade/dioramas/blob/main/src/core/volumetric.js): `src/core/volumetric.js`
- [Scene asset loading](https://github.com/blendi-remade/dioramas/blob/main/src/core/assets.js): `src/core/assets.js`
- [Page chrome](https://github.com/blendi-remade/dioramas/blob/main/src/core/ui.js): `src/core/ui.js`

### Example worlds

- [World registry](https://github.com/blendi-remade/dioramas/blob/main/src/core/worlds.js): `src/core/worlds.js`
- [20 interactive sites](https://github.com/blendi-remade/dioramas/tree/main/examples): `examples`

### Gallery

- [World gallery](https://github.com/blendi-remade/dioramas/blob/main/src/index/main.js): `src/index/main.js`

### Other components

- **Visitor**

## Connections

- Visitor → World gallery: browses (evidence: `README.md`)
- World gallery → 20 interactive sites: opens worlds (evidence: `README.md`)
- Asset prompts → Image generation: supplies prompts (evidence: `README.md`)
- Image generation → fal client: calls client (evidence: `scripts/gen.mjs`)
- 3D generation → fal client: calls client (evidence: `scripts/gen.mjs`)
- Image generation → Generation manifest: records results (evidence: `scripts/gen.mjs`)
- 3D generation → Generation manifest: records jobs (evidence: `scripts/gen.mjs`)
- 3D generation → Optimized models: generates raw models (evidence: `README.md`)
- 3D generation → Optimized models: optimized into (evidence: `README.md`)
- World gallery → Render engine: creates engine (evidence: `src/index/main.js`)
- World gallery → Pointer input: reads input (evidence: `src/index/main.js`)
- World gallery → Scroll choreography: uses scrolling (evidence: `src/index/main.js`)
- World gallery → Page chrome: sets cursor (evidence: `src/index/main.js`)
- World gallery → Planar reflections: creates reflection (evidence: `src/index/main.js`)
- World gallery → World registry: reads worlds (evidence: `src/index/main.js`)
- Page chrome → World registry: reads world list (evidence: `src/core/ui.js`)
- Pointer input → Render engine: uses damping (evidence: `src/core/input.js`)
- 20 interactive sites → Render engine: build on engine (evidence: `README.md`)
- 20 interactive sites → Planar reflections: use reflections (evidence: `README.md`)
- 20 interactive sites → Procedural textures: use textures (evidence: `README.md`)
- 20 interactive sites → Volumetric lights: use spotlights (evidence: `README.md`)
- 20 interactive sites → Scene asset loading: load scene assets (evidence: `README.md`)
