-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
41 lines (32 loc) · 1.06 KB
/
index.html
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
<html>
<head>
<title>Plasm - plot your functions WASM fast!</title>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"/>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<script type="module">
const queryString = window.location.search;
const query = new URLSearchParams(queryString).get('q');
if (query)
document.getElementById('input').value = query;
import init from './pkg/web.js';
async function run() {
await init('./pkg/web_bg.wasm');
}
run();
</script>
<div class="input_div">
<label for="input">Input function</label><br>
<input class="input" id="input" type="text" name="input" value="sin(x)+sin(y)"/>
</div>
<div class="canvas_div">
<canvas id="canvas" height="720" width="1280" />
</div>
<footer class="footer">
<a href="https://github.com/Franciman/plasm"> GitHub repo </a> <br>
Copyright © 2020 by Frankplus & Franciman <br>
All Rights Reserved.
</footer>
</body>
</html>