-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
52 lines (46 loc) · 1.26 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
42
43
44
45
46
47
48
49
50
51
52
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>WASM Experiment</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
html, body {
height: 100%;
width: 100%;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
margin: 0;
padding: 0;
}
* {
box-sizing: border-box;
}
canvas {
max-width: 100%;
}
.container {
display: flex;
justify-content: flex-start;
align-items: center;
flex-direction: column;
}
.text {
text-align: center;
margin: 1em;
}
</style>
</head>
<body>
<div class="container">
<canvas width="600" height="400"></canvas>
<h3 class="text">Rendered by your CPU 😞 with WebAssembly (C++) 😃</h3>
<h4 class="text">Check out the <a href="https://github.com/nickpisacane/wasm-experiment">repo</a> for more info.</h4>
</div>
<script>
window.$ctx = document.querySelector('canvas').getContext('2d');
</script>
<script src="./a.out.js"></script>
</body>
</html>