# mp3pintyo/livingpainting architecture

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

- Interactive diagram: https://gitdiagram.com/mp3pintyo/livingpainting
- Repository: https://github.com/mp3pintyo/livingpainting

## Overview

LivingPainting is a browser-based three.js experience that lets visitors travel by horse cart through a world inspired by Csontváry’s painting. The visitor enters the game, explores and steers the cart, encounters animated animals and landmarks, and sees the world rendered in a painterly style. The graph includes the documented exhibition-site iframe and major game modules; unsampled internals limit some runtime connections, so only evidenced or documented links are shown.

Main entry points: [`game/src/main.js`](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/main.js) (Game runtime), [`game/src/paint.js`](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/paint.js) (Paint materials), [`game/src/world.js`](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/world.js) (World builder), [`game/src/animals.js`](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/animals.js) (Animal assets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and play"]
  node_showcase["Exhibition site<br/>[site.js]"]
  node_game["Game runtime<br/>[main.js]"]
end

subgraph group_world["World and inhabitants"]
  node_worldbuild["World builder<br/>[world.js]"]
  node_cart["Horse cart<br/>[cart.js]"]
  node_fauna["Wildlife and riders<br/>[fauna.js]"]
  node_animals["Animal assets<br/>[animals.js]"]
  node_models["World models<br/>[models.js]"]
  node_models2["Additional models<br/>[models2.js]"]
end

subgraph group_interface["Navigation and HUD"]
  node_roadroute["Road routing<br/>[route.js]"]
  node_touch["Touch controls<br/>[touch.js]"]
  node_minimap["Minimap<br/>[minimap.js]"]
  node_highlights["Nearby landmarks<br/>[highlights.js]"]
  node_board["Game board<br/>[board.js]"]
  node_audio["Game audio<br/>[audio.js]"]
end

subgraph group_render["Painterly rendering"]
  node_paint["Paint materials<br/>[paint.js]"]
  node_brush["Brush patterns<br/>[brush.js]"]
  node_animaldabs["Animal brushwork<br/>[animaldabs.js]"]
  node_post["Post-processing<br/>[post.js]"]
  node_lights["Scene lighting<br/>[lights.js]"]
  node_sky["Sky effects<br/>[sky.js]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_showcase
node_showcase -->|"embeds game"| node_game
node_visitor -->|"plays"| node_game
node_game -->|"builds world"| node_worldbuild
node_game -->|"loads animals"| node_animals
node_game -->|"creates inhabitants"| node_fauna
node_game -->|"creates cart"| node_cart
node_game -->|"binds controls"| node_touch
node_game -->|"creates brushwork"| node_animaldabs
node_game -->|"creates lights"| node_lights
node_game -->|"uses minimap"| node_minimap
node_game -->|"uses landmarks"| node_highlights
node_game -->|"uses board"| node_board
node_game -->|"uses routing"| node_roadroute
node_game -->|"uses audio"| node_audio
node_game -->|"uses post effects"| node_post
node_game -->|"uses sky"| node_sky
node_worldbuild -->|"creates materials"| node_paint
node_worldbuild -.->|"builds geometry"| node_models
node_worldbuild -.->|"uses models"| node_models2
node_fauna -->|"creates animals"| node_animals
node_fauna -->|"uses materials"| node_paint
node_cart -->|"builds cart"| node_models
node_cart -->|"uses materials"| node_paint
node_animals -->|"uses models"| node_models
node_animals -->|"uses materials"| node_paint
node_paint -->|"uses brush sheet"| node_brush
node_animaldabs -->|"uses paint"| node_paint
node_animaldabs -->|"uses brush"| node_brush
node_post -->|"uses shaders"| node_paint
node_lights -->|"uses materials"| node_paint
node_sky -->|"uses shared paint"| node_paint
node_models2 -->|"uses models"| node_models

click node_showcase "https://github.com/mp3pintyo/livingpainting/blob/main/site/js/site.js"
click node_game "https://github.com/mp3pintyo/livingpainting/blob/main/game/src/main.js"
click node_worldbuild "https://github.com/mp3pintyo/livingpainting/blob/main/game/src/world.js"
click node_cart "https://github.com/mp3pintyo/livingpainting/blob/main/game/src/cart.js"
click node_fauna "https://github.com/mp3pintyo/livingpainting/blob/main/game/src/fauna.js"
click node_animals "https://github.com/mp3pintyo/livingpainting/blob/main/game/src/animals.js"
click node_models "https://github.com/mp3pintyo/livingpainting/blob/main/game/src/models.js"
click node_models2 "https://github.com/mp3pintyo/livingpainting/blob/main/game/src/models2.js"
click node_roadroute "https://github.com/mp3pintyo/livingpainting/blob/main/game/src/route.js"
click node_touch "https://github.com/mp3pintyo/livingpainting/blob/main/game/src/touch.js"
click node_minimap "https://github.com/mp3pintyo/livingpainting/blob/main/game/src/minimap.js"
click node_highlights "https://github.com/mp3pintyo/livingpainting/blob/main/game/src/highlights.js"
click node_board "https://github.com/mp3pintyo/livingpainting/blob/main/game/src/board.js"
click node_audio "https://github.com/mp3pintyo/livingpainting/blob/main/game/src/audio.js"
click node_paint "https://github.com/mp3pintyo/livingpainting/blob/main/game/src/paint.js"
click node_brush "https://github.com/mp3pintyo/livingpainting/blob/main/game/src/brush.js"
click node_animaldabs "https://github.com/mp3pintyo/livingpainting/blob/main/game/src/animaldabs.js"
click node_post "https://github.com/mp3pintyo/livingpainting/blob/main/game/src/post.js"
click node_lights "https://github.com/mp3pintyo/livingpainting/blob/main/game/src/lights.js"
click node_sky "https://github.com/mp3pintyo/livingpainting/blob/main/game/src/sky.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_showcase,node_game toneBlue
class node_worldbuild,node_cart,node_fauna,node_animals,node_models,node_models2 toneAmber
class node_roadroute,node_touch,node_minimap,node_highlights,node_board,node_audio toneMint
class node_paint,node_brush,node_animaldabs,node_post,node_lights,node_sky toneRose
class node_visitor toneIndigo
```

## Components

### Entry and play

- [Exhibition site](https://github.com/mp3pintyo/livingpainting/blob/main/site/js/site.js): `site/js/site.js`
- [Game runtime](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/main.js): `game/src/main.js`

### World and inhabitants

- [World builder](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/world.js): `game/src/world.js`
- [Horse cart](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/cart.js): `game/src/cart.js`
- [Wildlife and riders](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/fauna.js): `game/src/fauna.js`
- [Animal assets](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/animals.js): `game/src/animals.js`
- [World models](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/models.js): `game/src/models.js`
- [Additional models](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/models2.js): `game/src/models2.js`

### Navigation and HUD

- [Road routing](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/route.js): `game/src/route.js`
- [Touch controls](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/touch.js): `game/src/touch.js`
- [Minimap](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/minimap.js): `game/src/minimap.js`
- [Nearby landmarks](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/highlights.js): `game/src/highlights.js`
- [Game board](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/board.js): `game/src/board.js`
- [Game audio](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/audio.js): `game/src/audio.js`

### Painterly rendering

- [Paint materials](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/paint.js): `game/src/paint.js`
- [Brush patterns](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/brush.js): `game/src/brush.js`
- [Animal brushwork](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/animaldabs.js): `game/src/animaldabs.js`
- [Post-processing](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/post.js): `game/src/post.js`
- [Scene lighting](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/lights.js): `game/src/lights.js`
- [Sky effects](https://github.com/mp3pintyo/livingpainting/blob/main/game/src/sky.js): `game/src/sky.js`

### Other components

- **Visitor**

## Connections

- Visitor → Exhibition site: opens (evidence: `README.md`)
- Exhibition site → Game runtime: embeds game (evidence: `README.md`)
- Visitor → Game runtime: plays (evidence: `game/src/main.js`)
- Game runtime → World builder: builds world (evidence: `game/src/main.js`)
- Game runtime → Animal assets: loads animals (evidence: `game/src/main.js`)
- Game runtime → Wildlife and riders: creates inhabitants (evidence: `game/src/main.js`)
- Game runtime → Horse cart: creates cart (evidence: `game/src/main.js`)
- Game runtime → Touch controls: binds controls (evidence: `game/src/main.js`)
- Game runtime → Animal brushwork: creates brushwork (evidence: `game/src/main.js`)
- Game runtime → Scene lighting: creates lights (evidence: `game/src/main.js`)
- Game runtime → Minimap: uses minimap (evidence: `game/src/main.js`)
- Game runtime → Nearby landmarks: uses landmarks (evidence: `game/src/main.js`)
- Game runtime → Game board: uses board (evidence: `game/src/main.js`)
- Game runtime → Road routing: uses routing (evidence: `game/src/main.js`)
- Game runtime → Game audio: uses audio (evidence: `game/src/main.js`)
- Game runtime → Post-processing: uses post effects (evidence: `game/src/main.js`)
- Game runtime → Sky effects: uses sky (evidence: `game/src/main.js`)
- World builder → Paint materials: creates materials (evidence: `game/src/world.js`)
- World builder → World models: builds geometry (evidence: `game/src/world.js`)
- World builder → Additional models: uses models (evidence: `game/src/world.js`)
- Wildlife and riders → Animal assets: creates animals (evidence: `game/src/fauna.js`)
- Wildlife and riders → Paint materials: uses materials (evidence: `game/src/fauna.js`)
- Horse cart → World models: builds cart (evidence: `game/src/cart.js`)
- Horse cart → Paint materials: uses materials (evidence: `game/src/cart.js`)
- Animal assets → World models: uses models (evidence: `game/src/animals.js`)
- Animal assets → Paint materials: uses materials (evidence: `game/src/animals.js`)
- Paint materials → Brush patterns: uses brush sheet (evidence: `game/src/paint.js`)
- Animal brushwork → Paint materials: uses paint (evidence: `game/src/animaldabs.js`)
- Animal brushwork → Brush patterns: uses brush (evidence: `game/src/animaldabs.js`)
- Post-processing → Paint materials: uses shaders (evidence: `game/src/post.js`)
- Scene lighting → Paint materials: uses materials (evidence: `game/src/lights.js`)
- Sky effects → Paint materials: uses shared paint (evidence: `game/src/sky.js`)
- Additional models → World models: uses models (evidence: `game/src/models2.js`)
