mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
Game of Life Example
This example boasts a complete implementation of Conway's Game of Life. You can manually toggle cells by clicking on them or create a random layout by pressing the "Random" button.
Running
This example is quite resource intensive; it's recommended that you only use it with the --release flag:
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' trunk serve --release
Concepts
- Uses
gloo_timerto automatically step the simulation. - Logs to the console using the
weblogcrate.
Running
Run this application with the trunk development server:
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' trunk serve --open