summaryrefslogtreecommitdiff
path: root/templates/api/throwshade.html
blob: d65add63973cc171a379829efe3f777f21640b67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
        <title>LLLLColonq ShaderVerse Prime: The NEXTus (shado-realm)</title>
        <link rel="icon" href="./assets/mrgreen.png">
        <link rel="stylesheet" type="text/css" href="./main.css">
        <script type="module">
CONFIG_SUBST
         globalThis.mode = "throwshade";
        </script>
        <script type="module">
          import init, * as bindings from "./newton/throwshade.js";
          const wasm = await init({ module_or_path: "./newton/throwshade.wasm" });
          window.wasmBindings = bindings;
          console.log("initialized, starting...");
          window.wasmBindings.main_js();
          function resizeCanvas() {
              let canvas = document.getElementById("teleia-parent").firstChild;
              if (canvas) {
                  canvas.width = 1920;
                  canvas.height = 1080;
              } else {
                  setTimeout(resizeCanvas, 50);
              }
          }
          resizeCanvas();
        </script>
        <script type="module" src="./main.js"></script>
    </head>
    <body id="lcolonq-throwshade">
      <div id="teleia-parent" class="lcolonq-throwshade-canvas"></div>
      <div id="lcolonq-throwshade-bottom">
        <div id="lcolonq-throwshade-bottom-left">
          <textarea id="lcolonq-throwshade-textarea">
            vec4 shade(vec2 cs) {
            return vec4(0.0, 1.0, 0.0, 1.0);
            }
          </textarea>
        </div>
        <div id="lcolonq-throwshade-bottom-right">
          <img id="lcolonq-throwshade-button-test" src="./assets/test.gif"></img>
          <img id="lcolonq-throwshade-button-submit" src="./assets/upload.gif"></img>
        </div>
      </div>
    </body>
</html>