https://github.com/deadronos/gpu-conway-life
https://github.com/deadronos/gpu-conway-life
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/deadronos/gpu-conway-life
- Owner: deadronos
- Created: 2026-01-06T00:24:57.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-01-22T20:31:37.000Z (4 months ago)
- Last Synced: 2026-01-23T06:13:53.260Z (4 months ago)
- Language: TypeScript
- Size: 854 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
# gpu-conway-life
GPU-accelerated Conway's Game of Life experiments using Three.js + @react-three/fiber.
The default demo is **Neon Micro-City**: it renders alive cells as instanced "buildings" whose height/glow/color are driven by a GPU simulation texture.
## Run it
- `npm install`
- `npm run dev`
## Demos
### Neon Micro-City (default)
- `/`
### Sim-on-mesh (project the sim onto an arbitrary mesh)
- `/?demo=mesh`
## Examples (multi-page)
- Rotating primitives (cube + sphere + dodecahedron): `/examples/rotating-primitives/`
## Reusable sim module (`src/neon-sim/`)
The goal is to make the simulation and sampling reusable for other R3F / Three apps.
For a step-by-step guide (including copying into another app), see:
- `docs/neon-sim/README.md`
### Rules (Life / HighLife / Custom)
Rule variants are supported by the **simulation** (runner/pass) and change what gets written into the state texture.
The **material** only visualizes `uState` and does not need to know the rule.
Supported presets:
- `rule: 'life'` (B3/S23)
- `rule: 'highlife'` (B36/S23)
- `rule: 'custom'` with `ruleString: 'B.../S...'`
## Notes
- The simulation requires float render targets (`EXT_color_buffer_float`). Unsupported environments show a full-screen fallback.
This demo uses the reusable simulation module under `src/neon-sim/`.