From c620439d1bc54b4c8bc9585369bdcd1b111afaad Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Sun, 5 Jan 2025 21:05:45 -0800 Subject: [PATCH] try again --- .github/workflows/build.yml | 9 +++++---- README.md | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8aaf682..88a5e15 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -150,12 +150,13 @@ jobs: npm ci node build/prep-for-publish.js + - name: Publish to NPM 📖 + uses: JS-DevTools/npm-publish@v2 + with: + token: ${{ secrets.NPM_TOKEN }} + - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@v4 with: folder: . - - name: Publish to NPM 📖 - uses: JS-DevTools/npm-publish@v2 - with: - token: ${{ secrets.NPM_TOKEN }} diff --git a/README.md b/README.md index 19d12bf..f5bb567 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,25 @@ Object.assign(globalThis, globals); globalThis.navigator = { gpu: create([]) }; ... + +// do some webgpu +const device = await(await navigator.gpu.requestAdapter()).requestDevice(); ``` +You can pass dawn options in `create` + +```js +let navigator = { + gpu: create([ + "enable-dawn-features=allow_unsafe_apis,dump_shaders,disable_symbol_renaming", + ]), +}; +``` + +There is both `enable-dawn-features=comma,separated,toggles` and `disable-dawn-features=comma,separated,toggles`. + +The available options are listed [here](https://dawn.googlesource.com/dawn/+/refs/heads/chromium-gpu-experimental/src/dawn_native/Toggles.cpp) + ## Notes This package provides a WebGPU implementation it node. That said, if you are making a webpage