Skip to content

Commit

Permalink
Deploying to gh-pages from @ efa5a41 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed May 14, 2024
1 parent efd35ee commit a6db22c
Show file tree
Hide file tree
Showing 30 changed files with 928 additions and 46 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,8 @@ import { createTextureFromImage } from 'webgpu-utils';
* [cube-map](examples/cube-map.html)
* [instancing](examples/instancing.html)
* [primitives](examples/primitives.html)
* [stencil](examples/stencil.html)
* [stencil-cube](examples/stencil-cube.html)

## Development

Expand Down
2 changes: 1 addition & 1 deletion dist/1.x/webgpu-utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/1.x/webgpu-utils.module.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ <h2>webgpu-utils</h2></div>
<li><a href="examples/cube-map.html">cube-map</a></li>
<li><a href="examples/instancing.html">instancing</a></li>
<li><a href="examples/primitives.html">primitives</a></li>
<li><a href="examples/stencil.html">stencil</a></li>
<li><a href="examples/stencil-cube.html">stencil-cube</a></li>
</ul>
<a id="md:development" class="tsd-anchor"></a><h2><a href="#md:development">Development</a></h2><pre><code><span class="hl-2">git</span><span class="hl-1"> </span><span class="hl-2">clone</span><span class="hl-1"> </span><span class="hl-9">https</span><span class="hl-1">:</span><span class="hl-7">//github.com/greggman/webgpu-utils.git</span><br/><span class="hl-2">cd</span><span class="hl-1"> </span><span class="hl-2">webgpu</span><span class="hl-1">-</span><span class="hl-2">utils</span><br/><span class="hl-2">npm</span><span class="hl-1"> </span><span class="hl-2">ci</span><br/><span class="hl-2">npm</span><span class="hl-1"> </span><span class="hl-2">start</span>
</code><button>Copy</button></pre>
Expand Down
1 change: 1 addition & 0 deletions examples/2d-array.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<body>
<canvas></canvas>
<div id="b"><a href="https://github.com/greggman/webgpu-utils.org">webgpu-utils</a> - 2d-array texture</div>
<div id="fail" style="display: none;"><div id="fail-msg"></div></div>
<script type="module" src="2d-array.js"></script>
</body>
</html>
8 changes: 4 additions & 4 deletions examples/2d-array.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,10 @@ async function main() {
}

function fail(msg) {
const elem = document.createElement('p');
elem.textContent = msg;
elem.style.color = 'red';
document.body.appendChild(elem);
const elem = document.querySelector('#fail');
elem.style.display = '';
elem.children[0].textContent = msg;
}


main();
1 change: 1 addition & 0 deletions examples/background.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
</head>
<body>
<canvas></canvas>
<div id="fail" style="display: none;"><div id="fail-msg"></div></div>
<script type="module" src="background.js"></script>
</body>
</html>
8 changes: 4 additions & 4 deletions examples/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,10 @@ async function main() {
}

function fail(msg) {
const elem = document.createElement('p');
elem.textContent = msg;
elem.style.color = 'red';
document.body.appendChild(elem);
const elem = document.querySelector('#fail');
elem.style.display = '';
elem.children[0].textContent = msg;
}


main();
1 change: 1 addition & 0 deletions examples/bind-group-layouts.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<body>
<canvas></canvas>
<div id="b"><a href="https://github.com/greggman/webgpu-utils.org">webgpu-utils</a> - 2d-array texture</div>
<div id="fail" style="display: none;"><div id="fail-msg"></div></div>
<script type="module" src="bind-group-layouts.js"></script>
</body>
</html>
8 changes: 4 additions & 4 deletions examples/bind-group-layouts.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,10 @@ async function main() {
}

function fail(msg) {
const elem = document.createElement('p');
elem.textContent = msg;
elem.style.color = 'red';
document.body.appendChild(elem);
const elem = document.querySelector('#fail');
elem.style.display = '';
elem.children[0].textContent = msg;
}


main();
1 change: 1 addition & 0 deletions examples/cube-map.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<body>
<canvas></canvas>
<div id="b"><a href="https://github.com/greggman/webgpu-utils.org">webgpu-utils</a> - cube-map</div>
<div id="fail" style="display: none;"><div id="fail-msg"></div></div>
<script type="module" src="cube-map.js"></script>
</body>
</html>
8 changes: 4 additions & 4 deletions examples/cube-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ async function main() {
}

function fail(msg) {
const elem = document.createElement('p');
elem.textContent = msg;
elem.style.color = 'red';
document.body.appendChild(elem);
const elem = document.querySelector('#fail');
elem.style.display = '';
elem.children[0].textContent = msg;
}


main();
1 change: 1 addition & 0 deletions examples/cube.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<body>
<canvas></canvas>
<div id="b"><a href="https://github.com/greggman/webgpu-utils.org">webgpu-utils</a> - cube</div>
<div id="fail" style="display: none;"><div id="fail-msg"></div></div>
<script type="module" src="cube.js"></script>
</body>
</html>
8 changes: 4 additions & 4 deletions examples/cube.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ async function main() {
}

function fail(msg) {
const elem = document.createElement('p');
elem.textContent = msg;
elem.style.color = 'red';
document.body.appendChild(elem);
const elem = document.querySelector('#fail');
elem.style.display = '';
elem.children[0].textContent = msg;
}


main();
12 changes: 12 additions & 0 deletions examples/examples.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,16 @@ canvas {
width: 100%;
top: 1em;
left: 0;
}

#fail {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
color: red;
}
1 change: 1 addition & 0 deletions examples/instancing-size-only.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<body>
<canvas></canvas>
<div id="b"><a href="https://github.com/greggman/webgpu-utils.org">webgpu-utils</a> - instancing (size only)</div>
<div id="fail" style="display: none;"><div id="fail-msg"></div></div>
<script type="module" src="instancing-size-only.js"></script>
</body>
</html>
8 changes: 4 additions & 4 deletions examples/instancing-size-only.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,10 @@ async function main() {
}

function fail(msg) {
const elem = document.createElement('p');
elem.textContent = msg;
elem.style.color = 'red';
document.body.appendChild(elem);
const elem = document.querySelector('#fail');
elem.style.display = '';
elem.children[0].textContent = msg;
}


main();
1 change: 1 addition & 0 deletions examples/instancing.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<body>
<canvas></canvas>
<div id="b"><a href="https://github.com/greggman/webgpu-utils.org">webgpu-utils</a> - instancing</div>
<div id="fail" style="display: none;"><div id="fail-msg"></div></div>
<script type="module" src="instancing.js"></script>
</body>
</html>
7 changes: 3 additions & 4 deletions examples/instancing.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,9 @@ async function main() {
}

function fail(msg) {
const elem = document.createElement('p');
elem.textContent = msg;
elem.style.color = 'red';
document.body.appendChild(elem);
const elem = document.querySelector('#fail');
elem.style.display = '';
elem.children[0].textContent = msg;
}

main();
1 change: 1 addition & 0 deletions examples/primitives.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<body>
<canvas></canvas>
<div id="b"><a href="https://github.com/greggman/webgpu-utils.org">webgpu-utils</a> - primitives</div>
<div id="fail" style="display: none;"><div id="fail-msg"></div></div>
<script type="module" src="primitives.js"></script>
</body>
</html>
7 changes: 3 additions & 4 deletions examples/primitives.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,9 @@ async function main() {
}

function fail(msg) {
const elem = document.createElement('p');
elem.textContent = msg;
elem.style.color = 'red';
document.body.appendChild(elem);
const elem = document.querySelector('#fail');
elem.style.display = '';
elem.children[0].textContent = msg;
}

main();
13 changes: 13 additions & 0 deletions examples/stencil-cube.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<title>webgpu-utils - stencil cube</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="examples.css">
</head>
<body>
<canvas></canvas>
<div id="b"><a href="https://github.com/greggman/webgpu-utils.org">webgpu-utils</a> - stencil cube</div>
<script type="module" src="stencil-cube.js"></script>
</body>
</html>
Loading

0 comments on commit a6db22c

Please sign in to comment.