Skip to content

Code your own universe! Harness the power of Cellular Automata to create a virtual universe that you can tinker with, create the rules that govern how cells behave and influence their surroundings. Simulate patterns, viruses and more with Cellular Automata.

License

Notifications You must be signed in to change notification settings

Ethancatepete/CYOU

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CYOU

Code Your Own Universe

Static Badge

A scriptable cellular automata web simulator made with the Yew framework and scriptable through Rhai.script.

This software was developed as an interactive playground for the hackathon lecture on Cellular Automata: a crash course into discrete computational modelling at ESF CoCo 2023.

Introduction

In addition to this software, helpful materials can be found below:

Installation

If you don't already have it installed, it's time to install Rust: https://www.rust-lang.org/tools/install. The rest of this guide assumes a typical Rust installation which contains both rustup and Cargo.

To compile Rust to WASM, we need to have the wasm32-unknown-unknown target installed. If you don't already have it, install it with the following command:

rustup target add wasm32-unknown-unknown

Now that we have our basics covered, it's time to install the star of the show: [Trunk]. Simply run the following command to install it:

cargo install trunk wasm-bindgen-cli

That's it, we're done!

Running

trunk serve

Rebuilds the app whenever a change is detected and runs a local server to host it.

There's also the trunk watch command which does the same thing but without hosting it.

Release

trunk build --release

This builds the app in release mode similar to cargo build --release. You can also pass the --release flag to trunk serve if you need to get every last drop of performance.

Unless overwritten, the output will be located in the dist directory.

About

Code your own universe! Harness the power of Cellular Automata to create a virtual universe that you can tinker with, create the rules that govern how cells behave and influence their surroundings. Simulate patterns, viruses and more with Cellular Automata.

Resources

License

Stars

Watchers

Forks

Packages

No packages published