summaryrefslogtreecommitdiff
path: root/index.html
blob: 5499fd9f426d4c14320f26b9ac718726360695b1 (plain) (blame)
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
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    </head>
    <body>
        <pre>
        Koh fractal. Version: 0.1
        </pre>
        <script type='text/javascript'>
          var Module = {};
          fetch('index.wasm')
            .then(response =>
              response.arrayBuffer()
            ).then(buffer => {
              Module.canvas = document.getElementById("canvas");
              Module.wasmBinary = buffer;
              var script = document.createElement('script');
              script.src = "index.js";
              script.onload = function() {
                console.log("Emscripten boilerplate loaded.")
              }
              document.body.appendChild(script);
            });
        </script>
        <div align="center">
        <canvas id="canvas" ></canvas>
        </div>

        <pre>
          Supported keys:
          left,right,up,down - change position by 10 pixels
          r                  - reset the configuration
          '-'                - decrease amount of levels
          '+'                - increase amount of levels
          q                  - previous color pattern
          w                  - next color pattern
          a                  - decrease size
          s                  - increase size
        </pre>

    </body>
</html>