# kuldeepjambhulkar/nothing-glyph architecture

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

- Interactive diagram: https://gitdiagram.com/kuldeepjambhulkar/nothing-glyph
- Repository: https://github.com/kuldeepjambhulkar/nothing-glyph

## Overview

Nothing Glyph is a browser-based animated pixel-glyph display. The user cycles through registered modes with the left and right arrow keys; the animation loop evaluates the selected mode for each point in a generated circular grid and draws the resulting brightness on a canvas. The graph preserves the distinct grid, mode-selection, animation, and rendering responsibilities. Edges reflect the shown setup and runtime calls; animation dispatch is dynamic through the selected registry entry.

Main entry points: [`src/main.js`](https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/main.js) (Animation Loop), [`src/controller.js`](https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/controller.js) (Arrow Controls), [`src/engine.js`](https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/engine.js) (Animation Registry), [`src/grid.js`](https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/grid.js) (Glyph Grid)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_display["Display Runtime"]
  node_main["Animation Loop<br/>[main.js]"]
  node_grid["Glyph Grid<br/>[grid.js]"]
  node_renderer["Canvas Renderer<br/>[renderer.js]"]
end

subgraph group_selection["Mode Selection"]
  node_engine["Animation Registry<br/>[engine.js]"]
  node_controller["Arrow Controls<br/>[controller.js]"]
end

subgraph group_modes["Animation Modes"]
  node_time["Clock Glyph<br/>[time.js]"]
  node_countdown["Countdown Glyph<br/>[countdown.js]"]
  node_bottle["Bottle Glyph<br/>[bottle.js]"]
  node_bounce["Bounce Simulation<br/>[bounce.js]"]
  node_neural["Neural Sparks<br/>[neuralSparks.js]"]
  node_spiral["Spiral Glyph<br/>[spiral.js]"]
end

node_user(("Keyboard User"))

node_user -->|"presses arrows"| node_controller
node_main -->|"generates grid"| node_grid
node_main -->|"resizes and draws"| node_renderer
node_main -->|"registers and selects"| node_engine
node_main -->|"sets up controls"| node_controller
node_controller -->|"advances registry"| node_engine
node_main -->|"registers and dispatches"| node_time
node_main -->|"registers and dispatches"| node_countdown
node_main -->|"registers and dispatches"| node_bottle
node_main -->|"registers and dispatches"| node_bounce
node_main -->|"registers and dispatches"| node_neural
node_main -->|"registers and dispatches"| node_spiral

click node_main "https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/main.js"
click node_grid "https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/grid.js"
click node_renderer "https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/renderer.js"
click node_engine "https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/engine.js"
click node_controller "https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/controller.js"
click node_time "https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/animations/time.js"
click node_countdown "https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/animations/countdown.js"
click node_bottle "https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/animations/bottle.js"
click node_bounce "https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/animations/bounce.js"
click node_neural "https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/animations/neuralSparks.js"
click node_spiral "https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/animations/spiral.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_main,node_grid,node_renderer,node_user toneBlue
class node_engine,node_controller toneAmber
class node_time,node_countdown,node_bottle,node_bounce,node_neural,node_spiral toneMint
```

## Components

### Display Runtime

- [Animation Loop](https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/main.js): `src/main.js`
- [Glyph Grid](https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/grid.js): `src/grid.js`
- [Canvas Renderer](https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/renderer.js): `src/renderer.js`

### Mode Selection

- [Animation Registry](https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/engine.js): `src/engine.js`
- [Arrow Controls](https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/controller.js): `src/controller.js`

### Animation Modes

- [Clock Glyph](https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/animations/time.js): `src/animations/time.js`
- [Countdown Glyph](https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/animations/countdown.js): `src/animations/countdown.js`
- [Bottle Glyph](https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/animations/bottle.js): `src/animations/bottle.js`
- [Bounce Simulation](https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/animations/bounce.js): `src/animations/bounce.js`
- [Neural Sparks](https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/animations/neuralSparks.js): `src/animations/neuralSparks.js`
- [Spiral Glyph](https://github.com/kuldeepjambhulkar/nothing-glyph/blob/master/src/animations/spiral.js): `src/animations/spiral.js`

### Other components

- **Keyboard User**

## Connections

- Keyboard User → Arrow Controls: presses arrows (evidence: `src/controller.js`)
- Animation Loop → Glyph Grid: generates grid (evidence: `src/main.js`)
- Animation Loop → Canvas Renderer: resizes and draws (evidence: `src/main.js`)
- Animation Loop → Animation Registry: registers and selects (evidence: `src/main.js`)
- Animation Loop → Arrow Controls: sets up controls (evidence: `src/main.js`)
- Arrow Controls → Animation Registry: advances registry (evidence: `src/controller.js`)
- Animation Loop → Clock Glyph: registers and dispatches (evidence: `src/main.js`)
- Animation Loop → Countdown Glyph: registers and dispatches (evidence: `src/main.js`)
- Animation Loop → Bottle Glyph: registers and dispatches (evidence: `src/main.js`)
- Animation Loop → Bounce Simulation: registers and dispatches (evidence: `src/main.js`)
- Animation Loop → Neural Sparks: registers and dispatches (evidence: `src/main.js`)
- Animation Loop → Spiral Glyph: registers and dispatches (evidence: `src/main.js`)
