-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
30 lines (29 loc) · 834 Bytes
/
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Maix's pixel engine examples</title>
</head>
<body>
<script>
let bank = "simple";
let url =new URL(window.location.href);
let s = url.searchParams.get("bank");
if (s !== null && s !== undefined) {
bank = s;
}
let run = "lines";
let ns = url.searchParams.get("run");
if (s !== null && s !== undefined) {
run = ns;
}
import(`./wasm/${bank}.js`).then( async (mod) => {
let wasm = await mod.default();
console.log(wasm)
wasm[run]();
})
</script>
</body>
</html>