A browser-based 3D visualization of Conway's Game of Life. Watch cellular automata evolve through time as a stunning three-dimensional structure, with each generation stacked vertically in 3D space.
R-Petomino pattern with edge color cycling enabled, showing 49 generations
- 3D Time Visualization: Each generation renders in the X-Y plane with the Z-axis representing time progression
- Interactive Camera: Full orbit, pan, zoom controls via mouse, keyboard, and touch
- Built-in Patterns: Glider, Blinker, Pulsar, Gosper's Glider Gun, and R-pentomino
- Custom Pattern Support: Load patterns in RLE (Run-Length Encoded) format
- Session Management: Save and load complete sessions with all generations
- Shareable Links: Copy a URL that restores patterns, rules, and display settings
- Visual Customization: Adjustable cell colors, padding, grid lines, and edge color cycling
- Starfield Background: Dynamic animated starfield with 5000 twinkling stars
- Performance Optimized: Handles grids up to 200x200 with 100+ generations at 30+ FPS
- Node.js (with npm)
- A modern web browser with WebGL support (Chrome, Firefox, or Edge from 2022 or newer)
# Clone the repository
git clone https://github.com/hybridmachine/ClaudeAssistedProjects.git
cd ClaudeAssistedProjects/GameOfLife3D
# Install dependencies
npm install# Build and start the development server (opens browser automatically)
npm run devThe application will open at http://localhost:8080.
# Build TypeScript to JavaScript
npm run build
# Watch mode (auto-recompile on changes)
npm run watch
# Start server only (assumes already built)
npm run serve
# Clean build artifacts
npm run clean- Select a Pattern: Choose from built-in patterns or load a custom RLE file
- Set Generations: Enter the number of generations to compute (1-1000)
- Compute: Click "Compute Generations" to generate the 3D structure
- Explore: Navigate through the 3D visualization using camera controls
- Customize: Adjust visual settings like cell color, padding, and grid lines
- Save: Export your session or patterns for later use
- Share: Use "Share Link" to copy a URL that restores your current setup
| Key | Action |
|---|---|
| W / Up Arrow | Pan forward |
| S / Down Arrow | Pan backward |
| A / Left Arrow | Pan left |
| D / Right Arrow | Pan right |
| Q | Rotate left around Y-axis |
| E | Rotate right around Y-axis |
| R | Move camera up |
| F | Move camera down |
| O | Orbit around Z-axis (counterclockwise) |
| P | Orbit around Z-axis (clockwise) |
| Action | Effect |
|---|---|
| Left-click drag | Orbit camera |
| Right-click drag | Pan camera |
| Scroll wheel | Zoom in/out |
| Gesture | Effect |
|---|---|
| Single finger drag | Orbit camera |
| Two finger drag | Pan camera |
| Pinch | Zoom in/out |
GameOfLife3D/
├── src/
│ ├── main.ts # Application entry point
│ ├── GameEngine.ts # Game of Life computation engine
│ ├── Renderer3D.ts # Three.js rendering system
│ ├── CameraController.ts # Camera controls (keyboard/mouse/touch)
│ ├── UIControls.ts # UI event handling
│ └── PatternLoader.ts # RLE format parsing and patterns
│ └── URLHandler.ts # URL parsing and sharing helpers
├── dist/ # Compiled JavaScript (generated)
├── index.html # Main HTML file
├── styles.css # Application styles
├── package.json # Dependencies and scripts
└── tsconfig.json # TypeScript configuration
| Pattern | Description |
|---|---|
| Glider | Simple spaceship that travels diagonally across the grid |
| Blinker | Period-2 oscillator (simplest oscillator) |
| Pulsar | Period-3 oscillator with beautiful symmetry (13x13) |
| Glider Gun | Gosper's Glider Gun - produces infinite stream of gliders |
| R-pentomino | Methuselah pattern that evolves for 1103+ generations |
Click "Share Link" in the controls panel to copy a URL that restores your current state. The link can include:
pattern: built-in pattern name (glider, blinker, pulsar, glider-gun, r-pentomino)rle: URL-encoded RLE for custom patternsgrid: grid size (25-200)rule: preset key or customB/Snotation (example:B36S23)gens: number of computed generationstoroidal:trueorfalsepadding: cell padding percentage (0-100)colors:trueorfalsefor face color cyclingrange: display range asmin-max
Example:
http://localhost:8080/?pattern=glider&grid=75&gens=120&toroidal=true&padding=15&colors=true&range=0-60
The application supports the standard Run-Length Encoded (RLE) format for Game of Life patterns:
#N Pattern Name
#C Comment line
x = 3, y = 3, rule = B3/S23
bo$2bo$3o!
Sessions are saved as JSON files containing:
- Grid dimensions
- All computed generations
- Cell states for each generation
- TypeScript - Type-safe JavaScript
- Three.js - WebGL-based 3D graphics
- HTML5/CSS3 - User interface
- http-server - Development server
- Recommended maximum grid size: 200x200
- Recommended maximum simultaneous generations: 100
- Uses InstancedMesh for efficient rendering of thousands of cubes
- Supports frustum culling for off-screen cells
- Chrome (2022+)
- Firefox (2022+)
- Edge (2022+)
Requires WebGL support.
This project is part of the ClaudeAssistedProjects repository.
Contributions are welcome! Please read the AGENTS.md file for coding guidelines and development practices.