How paulrobinson07/cave_generation_test works
A small browser-based cave-generation demo: it initializes a random cell grid, repeatedly applies cellular-automaton rules, and draws each frame on a canvas. Resizing rebuilds the grid for the new dimensions. The only source file is excerpted, so the graph reflects its visible calls and browser APIs.
Main entry points: main.js World update
Components 8
Other components
- Browser runtime
- Simulation canvas
- World grids
main.js - Random initialization
main.js - World update
main.js - Cell rules
main.js - Canvas renderer
main.js - Resize handler
main.js
Connections 12
- Browser runtime → Simulation canvas: provides element
- Browser runtime → World update: schedules every 250ms
main.js - World update → Canvas renderer: draws current grid
main.js - World update → Cell rules: checks each cell
main.js - Cell rules → World grids: reads and writes grids
main.js - Random initialization → World grids: fills current grid
main.js - World update → World grids: swaps grids
main.js - Canvas renderer → Simulation canvas: draws cells
main.js - Browser runtime → Resize handler: dispatches resize
main.js - Resize handler → Simulation canvas: resizes canvas
main.js - Resize handler → World grids: recreates grids
main.js - Resize handler → Random initialization: reinitializes world
main.js