Skip to content

Commit

Permalink
Deploying to gh-pages from @ 78b57b3 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Mar 11, 2024
1 parent 50594cf commit 5e824c8
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 23 deletions.
1 change: 1 addition & 0 deletions css/SampleLayout.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
height: 100%;
border: none;
display: block;
background-color: #fff;
}

.sampleCategory {
Expand Down
13 changes: 0 additions & 13 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,6 @@ <h1>
</a>
<hr>
<div id="samplelist"></div>
<hr>
<h3 style="margin-bottom: 5px">Other Pages</h3>
<ul class="exampleList">
<li>
<a
rel="noreferrer"
target="_blank"
href="./workload-simulator.html"
>
Workload Simulator ↗️
</a>
</li>
</ul>
</div>
</nav>

Expand Down
20 changes: 16 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,14 @@ var worker = {
],
};

var workloadSimulator = {
name: 'Workload Simulator',
description: `Test various ways of rendering (WebGPU, WebGL, Canvas2D, DOM) and measures performance`,
openInNewTab: true,
filename: "sample/workloadSimulator",
sources: [],
};

const pageCategories = [
// Samples that implement basic rendering functionality using the WebGPU API.
{
Expand Down Expand Up @@ -610,6 +618,7 @@ const pageCategories = [
description: 'WebGPU Performance Benchmarks',
samples: {
animometer,
workloadSimulator,
},
},
];
Expand Down Expand Up @@ -32575,10 +32584,13 @@ for (const { title, description, samples } of pageCategories) {
...Object.entries(samples).map(([key, sampleInfo]) => createElem('li', {}, [
createElem('a', {
href: sampleInfo.filename,
onClick: (e) => {
setSampleIFrameURL(e, sampleInfo);
},
textContent: sampleInfo.tocName || key,
...(!sampleInfo.openInNewTab && {
onClick: (e) => {
setSampleIFrameURL(e, sampleInfo);
},
}),
textContent: `${sampleInfo.tocName || key}${sampleInfo.openInNewTab ? ' ↗️' : ''}`,
...(sampleInfo.openInNewTab && { target: '_blank' }),
}),
])),
]),
Expand Down
2 changes: 1 addition & 1 deletion main.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,8 @@ <h2 style=margin-top:0>Drag the logo, or choose "Animate".</h2>
<h2><center>Web graphics workload simulator</center></h2>
</div>

<script>
'use strict';

<script type="module">
/* eslint-disable */

/************\
* Options UI *
Expand Down Expand Up @@ -474,8 +473,7 @@ <h2><center>Web graphics workload simulator</center></h2>
}
}
if (useRaf.checked && rafPending == 0) {
(window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame)(function() { render(true); });
window.requestAnimationFrame(function() { render(true); });
rafPending++;
}
if (useSetTimeout.checked) {
Expand Down
7 changes: 7 additions & 0 deletions sample/workloadSimulator/meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default {
name: 'Workload Simulator',
description: `Test various ways of rendering (WebGPU, WebGL, Canvas2D, DOM) and measures performance`,
openInNewTab: true,
filename: __DIRNAME__,
sources: [],
};
9 changes: 9 additions & 0 deletions samples/workloadSimulator/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta
http-equiv="refresh"
content="0;URL='../../?sample=workloadSimulator'"
></meta>
</head>
</html>

0 comments on commit 5e824c8

Please sign in to comment.