Check out the live demo. Refresh the page to generate a new world.
Generates symmetrical Conway's Game of Life universes with torus typologies.
Made using Rust 🦀 and WebAssembly 🕸 and modified to optimize rendering performance.
Universes are horizontally and vertically symmetrical throughout the simulation.
The largest optimization was to render using WebAssembly.
Each cell is represented as a single pixel. Black is an alive cell and white is a dead cell.
The universe is rendered it into an Uint8ClampedArray and interpreted as ImageData. This ImageData is then displayed onto a canvas using putImageData().
- Run
wasm-pack build
inside project dictionary - Run
npm install
insidewww
folder - Finally run
npm run start
insidewww
and visit http://localhost:8080 to see the results
Licensed under either of these:
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)