This is the code behind https://optozorax.github.io/space_bending/
- install Rust using https://rustup.rs/
cd wasmcargo install wasm-packinstall the wasm buildercargo install miniserveinstall a webserver to serve local fileswasm-pack build --target webbuild rust code into a wasm.js fileminiserve ..host a webserver that has index.html at the root- Open http://localhost:8080/index.html in your browser
When you make code changes, you can leave miniserve running, in another terminal tab
re-run only wasm-pack build --target web.
Then refresh your browser to see the new version.
- The UI and render loop is defined in JavaScript as part of index.html
- The Mesh creation and simulation is implemented in rust in the wasm directory.