Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
brendan-duncan committed May 13, 2024
1 parent 4f2988d commit edc889e
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,25 @@ This can be used to diagnose issues with WebGPU rendering by eliminating everyth

## Usage

### Load From CDN
### Loading and Starting the WebGPU Recorder

You can load the script through a CDN so you don't have to store it locally and make sure you're always using the latest version of the recorder.
The WebGPU Recorder script is an ES6 module and can be loaded via

```html
<script id="webgpu_recorder" type="module">
import {WebGPURecorder} from "https://cdn.jsdelivr.net/gh/brendan-duncan/webgpu_recorder/webgpu_recorder.js";
new WebGPURecorder({
"frames": 100,
"export": "test"
});
import {WebGPURecorder} from "webgpu_recorder.js";
new WebGPURecorder(); // Create and start the WebGPU Recorder
</script>
````

### Load From Local Script Reference
### Load From CDN

If you prefer to host your own version, copy the script to your project and load it by adding the following to your project's HTML.
The webgpu_recorder.js script can be loaded from a CDN so you don't have to store it locally and make sure you're always using the latest version of the recorder.

```html
<script id="webgpu_recorder" type="module">
import {WebGPURecorder} from "webgpu_recorder.js";
new WebGPURecorder({
"frames": 100,
"export": "test"
});
import {WebGPURecorder} from "https://cdn.jsdelivr.net/gh/brendan-duncan/webgpu_recorder/webgpu_recorder.js";
new WebGPURecorder(); // Create and start the WebGPU Recorder
</script>
````

Expand Down

0 comments on commit edc889e

Please sign in to comment.