AtlatestRepositorysigil-graphics

sigil-graphics / tree / test / test-shader-limitsindex.template.html

1<!doctype html>
2<html lang="en">
3<head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 <title>test-shader-limits</title>
7 <link rel="icon" href="data:,">
8 <link rel="stylesheet" href="styles.css">
9</head>
10<body>
11 <main>
12 <!-- 640x480 CSS pixels, the scene's virtual viewport, so the buffer
13 (CSS size times devicePixelRatio) has the same aspect and no
14 letterbox: verify.mjs maps virtual pixels by one scale. -->
15 <canvas id="stage" width="640" height="480"></canvas>
16 <div id="status"></div>
17 </main>
18 <script>
19 // The page's parameters, dispatched to the app before its first frame
20 // (a dispatch made before the runtime starts is queued by the loader):
21 // grid=N cells per side (64)
22 // steps=N generations before the ready line (8)
23 // bench never settle; print frame-ms every 120 frames
24 // rule=life|reaction, substeps=N the rule and generations per frame
25 (function () {
26 "use strict";
27 function withApp(fn) {
28 if (globalThis.SigilWebApp) { fn(globalThis.SigilWebApp); return; }
29 document.addEventListener("sigil-web-app-ready", function (e) { fn(e.detail); }, { once: true });
30 }
31 withApp(function (app) {
32 var params = new URLSearchParams(location.search);
33 if (params.has("grid")) app.dispatch("grid", params.get("grid"));
34 if (params.has("steps")) app.dispatch("steps", params.get("steps"));
35 if (params.has("bench")) app.dispatch("bench", "on");
36 if (params.has("rule")) app.dispatch("rule", params.get("rule"));
37 if (params.has("substeps")) app.dispatch("substeps", params.get("substeps"));
38 });
39 })();
40 </script>
41 <!--sigil:app-->
42</body>
43</html>