Shad Amethyst
b6f3a2b858
|
2 years ago | |
---|---|---|
simulator | 2 years ago | |
src | 2 years ago | |
.gitignore | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 2 years ago | |
index.html | 2 years ago | |
package-lock.json | 2 years ago | |
package.json | 2 years ago | |
tsconfig.json | 2 years ago | |
vite.config.ts | 2 years ago |
README.md
chaos-toy
A small web app to play around with your own rules for chaos game
Building
To build this project, you will need the rust toolchain and wasm-pack
, which you can download here (or just run cargo install wasm-pack
).
Then, run wasm-pack build simulator
to build the rust simulator.
If you wish to build the simulator with the debug profile, then run wasm-pack build simulator --dev
or npm run prepare-dev
.
Re-running these commands should work with Vite's auto-reload.
If wasm-pack
fails to download wasm-opt
, then you can try installing it manually (brew install binaryen
, pacman -S binaryen
).
Alternatively, you can disable wasm-opt
by uncommenting the relevant lines in simulator/Cargo.toml
.
At this point, you can now run npm install
, which will symlink simulator/pkg/
to node_modules/chaos-toy-rs
.
Running
To run in development mode, simply run npm run dev
or yarn dev
.