~theonlymrcat/polystrip-toy

A shadertoy clone using polystrip and WebGPU
Minor refactor of everything
Remove redundant cfg flag

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~theonlymrcat/polystrip-toy
read/write
git@git.sr.ht:~theonlymrcat/polystrip-toy

You can also use your local clone with git send-email.

#Polystrip toy

This is a small Shadertoy clone made to test out the capabilities of my graphics library polystrip. Like Shadertoy, it runs in the browser, but unlike Shadertoy, it has a backend of Rust and WebGPU.

For more information see the project website

#Building

#Nix flake

If you have Nix, you can just build this repository as a flake by cloning it and executing nix build '.?submodules=1'. There should also be a way to ask Nix to clone it for you, but I don't know what it is.

You can also run nix run '.?submodules=1' to have Nix start a python -m http.server on port 8000 which you can access through your web browser.

#Manually

Most relevant cargo settings have been set in ./.cargo/config, so cargo build will work without any --target parameters or RUSTFLAGS set. wasm-bindgen is used to create JavaScript bindings for the compiled WebAssembly module.

$ mkdir result
$ cargo build
$ wasm-bindgen --target=web --out-dir result target/wasm32-unknown-unknown/debug/polystrip_toy.wasm
$ cp static/* result

And then you can serve the contents of ./result as a static website.