Please visit the WebGPU Samples website to run the samples!
The WebGPU Samples are a set of samples and demos demonstrating the use of the WebGPU API. Please see the current implementation status and how to run WebGPU in your browser at webgpu.io.
webgpu-samples is built with Typescript
and bundled using Rollup. Building the project
requires an installation of Node.js.
- Install dependencies:
npm ci. - For development, start the dev server which will watch and recompile
sources:
npm start. You can navigate to http://localhost:8080 to view the project. - For production, compile the project:
npm run build. - To run a production server to serve the built assets, do
npm run serve.
Generate MSDF with:
./node_modules/.bin/msdf-bmfont -reuse -m 1024,1024 -f json -o public/assets/font/msdf.png -s 64 -r 4 -p 1 -t msdf public/assets/font/Corben-Regular.ttfNOTE: If you change -r, you'll need to update the shader. Also note that this uses an adjusted msdf-bmfont with up-to-date MSDF binary.