# zl7027/projection-team-project architecture

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

- Interactive diagram: https://gitdiagram.com/zl7027/projection-team-project
- Repository: https://github.com/zl7027/projection-team-project

## Overview

This is a browser-based p5.js projection-mapping artwork: setup creates mapped quads and offscreen graphics, loads a saved mapping and assets, and initializes a keyboard-controlled worm; the sketch’s visuals are drawn into buffers for display. The excerpt also shows separate mushroom, nighttime Halloween, and platform-style scene drawing. The HTML entry point and mapping configuration are present in the tree, but their contents and the main draw loop were not sampled, so those connections are limited to what the excerpt supports.

Main entry points: [`proj_map.js`](https://github.com/zl7027/projection-team-project/blob/main/proj_map.js) (Sketch Setup), [`index.html`](https://github.com/zl7027/projection-team-project/blob/main/index.html) (Web Sketch), [`map.json`](https://github.com/zl7027/projection-team-project/blob/main/map.json) (Saved Mapping)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sketch["p5.js Artwork"]
  node_entry["Web Sketch<br/>[index.html]"]
  node_runtime["Sketch Setup<br/>[proj_map.js]"]
  node_worm["Worm Character<br/>[proj_map.js]"]
end

subgraph group_scenes["Animated Scenes"]
  node_mushrooms["Mushroom Scene<br/>[proj_map.js]"]
  node_night["Halloween Scene<br/>[proj_map.js]"]
  node_platform["Platform Scene<br/>[proj_map.js]"]
end

subgraph group_mapping["Projection Mapping"]
  node_mapper["Projection Mapper<br/>[proj_map.js]"]
  node_mappingdata["Saved Mapping<br/>[map.json]"]
end

node_viewer(("Viewer"))

node_viewer -->|"opens"| node_entry
node_entry -.->|"hosts"| node_runtime
node_runtime -->|"creates"| node_mapper
node_runtime -->|"loads"| node_mappingdata
node_runtime -->|"initializes"| node_worm
node_runtime -.->|"draws"| node_mushrooms
node_runtime -.->|"draws"| node_night
node_runtime -.->|"draws"| node_platform

click node_entry "https://github.com/zl7027/projection-team-project/blob/main/index.html"
click node_runtime "https://github.com/zl7027/projection-team-project/blob/main/proj_map.js"
click node_worm "https://github.com/zl7027/projection-team-project/blob/main/proj_map.js"
click node_mushrooms "https://github.com/zl7027/projection-team-project/blob/main/proj_map.js"
click node_night "https://github.com/zl7027/projection-team-project/blob/main/proj_map.js"
click node_platform "https://github.com/zl7027/projection-team-project/blob/main/proj_map.js"
click node_mapper "https://github.com/zl7027/projection-team-project/blob/main/proj_map.js"
click node_mappingdata "https://github.com/zl7027/projection-team-project/blob/main/map.json"

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_entry,node_runtime,node_worm,node_viewer toneBlue
class node_mushrooms,node_night,node_platform toneAmber
class node_mapper,node_mappingdata toneMint
```

## Components

### p5.js Artwork

- [Web Sketch](https://github.com/zl7027/projection-team-project/blob/main/index.html): `index.html`
- [Sketch Setup](https://github.com/zl7027/projection-team-project/blob/main/proj_map.js): `proj_map.js`
- [Worm Character](https://github.com/zl7027/projection-team-project/blob/main/proj_map.js): `proj_map.js`

### Animated Scenes

- [Mushroom Scene](https://github.com/zl7027/projection-team-project/blob/main/proj_map.js): `proj_map.js`
- [Halloween Scene](https://github.com/zl7027/projection-team-project/blob/main/proj_map.js): `proj_map.js`
- [Platform Scene](https://github.com/zl7027/projection-team-project/blob/main/proj_map.js): `proj_map.js`

### Projection Mapping

- [Projection Mapper](https://github.com/zl7027/projection-team-project/blob/main/proj_map.js): `proj_map.js`
- [Saved Mapping](https://github.com/zl7027/projection-team-project/blob/main/map.json): `map.json`

### Other components

- **Viewer**

## Connections

- Viewer → Web Sketch: opens
- Web Sketch → Sketch Setup: hosts
- Sketch Setup → Projection Mapper: creates (evidence: `proj_map.js`)
- Sketch Setup → Saved Mapping: loads (evidence: `proj_map.js`)
- Sketch Setup → Worm Character: initializes (evidence: `proj_map.js`)
- Sketch Setup → Mushroom Scene: draws (evidence: `proj_map.js`)
- Sketch Setup → Halloween Scene: draws (evidence: `proj_map.js`)
- Sketch Setup → Platform Scene: draws (evidence: `proj_map.js`)
