# akiaqui/bubble_p5 architecture

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

- Interactive diagram: https://gitdiagram.com/akiaqui/bubble_p5
- Repository: https://github.com/akiaqui/bubble_p5

## Overview

A small p5.js sketch renders an animated bubble made from spring-connected points. The user clicks to start or pause the simulation; while active, the draw loop updates the point positions and renders the bubble with colored points and gradient edges. The README provides no additional capability details, and the available source shows all runtime behavior in sketch.js.

Main entry points: [`sketch.js`](https://github.com/akiaqui/bubble_p5/blob/master/sketch.js) (p5 Sketch)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_sketch["p5 Sketch<br/>[sketch.js]"]
node_init["Bubble Setup<br/>[sketch.js]"]
node_physics["Bubble Physics<br/>[sketch.js]"]
node_spring["Spring Forces<br/>[sketch.js]"]
node_render["Bubble Renderer<br/>[sketch.js]"]
node_gradient["Gradient Lines<br/>[sketch.js]"]

node_user -->|"clicks"| node_sketch
node_sketch -->|"initializes"| node_init
node_sketch -->|"updates"| node_physics
node_sketch -->|"draws"| node_render
node_init -->|"creates springs"| node_spring
node_physics -->|"calculates forces"| node_spring
node_render -->|"draws edges"| node_gradient

click node_sketch "https://github.com/akiaqui/bubble_p5/blob/master/sketch.js"
click node_init "https://github.com/akiaqui/bubble_p5/blob/master/sketch.js"
click node_physics "https://github.com/akiaqui/bubble_p5/blob/master/sketch.js"
click node_spring "https://github.com/akiaqui/bubble_p5/blob/master/sketch.js"
click node_render "https://github.com/akiaqui/bubble_p5/blob/master/sketch.js"
click node_gradient "https://github.com/akiaqui/bubble_p5/blob/master/sketch.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_user toneBlue
class node_sketch,node_init,node_physics,node_spring,node_render,node_gradient toneTeal
```

## Components

### Other components

- **User**
- [p5 Sketch](https://github.com/akiaqui/bubble_p5/blob/master/sketch.js): `sketch.js`
- [Bubble Setup](https://github.com/akiaqui/bubble_p5/blob/master/sketch.js): `sketch.js`
- [Bubble Physics](https://github.com/akiaqui/bubble_p5/blob/master/sketch.js): `sketch.js`
- [Spring Forces](https://github.com/akiaqui/bubble_p5/blob/master/sketch.js): `sketch.js`
- [Bubble Renderer](https://github.com/akiaqui/bubble_p5/blob/master/sketch.js): `sketch.js`
- [Gradient Lines](https://github.com/akiaqui/bubble_p5/blob/master/sketch.js): `sketch.js`

## Connections

- User → p5 Sketch: clicks (evidence: `sketch.js`)
- p5 Sketch → Bubble Setup: initializes (evidence: `sketch.js`)
- p5 Sketch → Bubble Physics: updates (evidence: `sketch.js`)
- p5 Sketch → Bubble Renderer: draws (evidence: `sketch.js`)
- Bubble Setup → Spring Forces: creates springs (evidence: `sketch.js`)
- Bubble Physics → Spring Forces: calculates forces (evidence: `sketch.js`)
- Bubble Renderer → Gradient Lines: draws edges (evidence: `sketch.js`)
