This is a demonstration of FlockStorm running on the basic WebGPU engine demonstrated in the earlier demos.
This also (incidentally) demonstrates packaging for native platforms with Electron, and building those packages in CI steps. Those parts aren't necessary for the main demo, however.
For the other demos, see:
- https://github.com/Armchair-Software/webgpu-demo
- https://github.com/Armchair-Software/webgpu-demo2
- https://github.com/Armchair-Software/webgpu-shader-demo
- https://github.com/Armchair-Software/chatgpt-emscripten-demo
Live demo: https://armchair-software.github.io/boids-webgpu-demo/
This requires Firefox Nightly, or a recent version of Chrome or Chromium, with webgpu and Vulkan support explicitly enabled. On mobile, Chrome Canary is confirmed to work on phones that support Vulkan 1.3 upwards.
- FlockStorm (included)
- Emscripten
- CMake
- VectorStorm (included)
- LogStorm (included)
- MemoryStorm (included)
- magic_enum (included)
- dear imgui with the proposed
imgui_impl_emscripten
backend (included)
The easiest way to assemble everything (including in-tree shader resource assembly) is to use the included build script:
./build.sh
To launch a local server and bring up a browser:
./run.sh
For manual builds with CMake, and to adjust how the example is run locally, inspect the build.sh
and run.sh
scripts.