# sly-codes/morphe architecture

> Architecture diagram of the GitHub repository sly-codes/morphe, 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/sly-codes/morphe
- Repository: https://github.com/sly-codes/morphe

## Overview

Morphe is a scroll-driven, interactive WebGL point-cloud experience. Visitors scroll through five forms while the scene morphs between them; pointer movement steers the view and clicks trigger a pulse. The map follows the documented page, scroll, shape, morph, and render responsibilities. The excerpts show the JavaScript wiring; HTML and CSS responsibilities come from the README, so those relationships are limited to documented behavior.

Main entry points: [`js/main.js`](https://github.com/sly-codes/morphe/blob/main/js/main.js) (App entry and state), [`index.html`](https://github.com/sly-codes/morphe/blob/main/index.html) (Page sections), [`js/scroll.js`](https://github.com/sly-codes/morphe/blob/main/js/scroll.js) (Scroll and reveal), [`js/scene.js`](https://github.com/sly-codes/morphe/blob/main/js/scene.js) (Morph and render)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_page["Page and presentation"]
  node_page["Page sections<br/>[index.html]"]
  node_styles["Layout and styles<br/>[style.css]"]
end

subgraph group_interaction["Interaction and navigation"]
  node_entry["App entry and state<br/>[main.js]"]
  node_scroll["Scroll and reveal<br/>[scroll.js]"]
end

subgraph group_forms["Point forms"]
  node_shapes["Seeds and five forms<br/>[shapes.js]"]
end

subgraph group_visualization["Scene visualization"]
  node_scene["Morph and render<br/>[scene.js]"]
end

node_visitor(("Visitor"))
node_p5["p5.js WebGL"]

node_visitor -->|"scrolls"| node_scroll
node_visitor -->|"moves and clicks"| node_entry
node_entry -->|"tracks and reveals"| node_scroll
node_entry -->|"creates scene"| node_scene
node_entry -->|"queries sections"| node_page
node_scene -->|"evaluates forms"| node_shapes
node_entry -->|"instantiates sketch"| node_p5
node_page -.->|"styled by"| node_styles
node_page -->|"sections drive progress"| node_scroll

click node_page "https://github.com/sly-codes/morphe/blob/main/index.html"
click node_styles "https://github.com/sly-codes/morphe/blob/main/css/style.css"
click node_entry "https://github.com/sly-codes/morphe/blob/main/js/main.js"
click node_scroll "https://github.com/sly-codes/morphe/blob/main/js/scroll.js"
click node_shapes "https://github.com/sly-codes/morphe/blob/main/js/shapes.js"
click node_scene "https://github.com/sly-codes/morphe/blob/main/js/scene.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_page,node_styles toneBlue
class node_entry,node_scroll toneAmber
class node_shapes toneMint
class node_scene toneRose
class node_visitor,node_p5 toneIndigo
```

## Components

### Page and presentation

- [Page sections](https://github.com/sly-codes/morphe/blob/main/index.html): `index.html`
- [Layout and styles](https://github.com/sly-codes/morphe/blob/main/css/style.css): `css/style.css`

### Interaction and navigation

- [App entry and state](https://github.com/sly-codes/morphe/blob/main/js/main.js): `js/main.js`
- [Scroll and reveal](https://github.com/sly-codes/morphe/blob/main/js/scroll.js): `js/scroll.js`

### Point forms

- [Seeds and five forms](https://github.com/sly-codes/morphe/blob/main/js/shapes.js): `js/shapes.js`

### Scene visualization

- [Morph and render](https://github.com/sly-codes/morphe/blob/main/js/scene.js): `js/scene.js`

### Other components

- **Visitor**
- **p5.js WebGL**

## Connections

- Visitor → Scroll and reveal: scrolls (evidence: `js/scroll.js`)
- Visitor → App entry and state: moves and clicks (evidence: `js/main.js`)
- App entry and state → Scroll and reveal: tracks and reveals (evidence: `js/main.js`)
- App entry and state → Morph and render: creates scene (evidence: `js/main.js`)
- App entry and state → Page sections: queries sections (evidence: `js/main.js`)
- Morph and render → Seeds and five forms: evaluates forms (evidence: `js/scene.js`)
- App entry and state → p5.js WebGL: instantiates sketch (evidence: `README.md`)
- Page sections → Layout and styles: styled by (evidence: `README.md`)
- Page sections → Scroll and reveal: sections drive progress (evidence: `README.md`)
