-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex_template.html
90 lines (68 loc) · 7.41 KB
/
index_template.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>WebAssembly App</title>
<style>
* {
width: 100%;
height: 100%;
margin: 0;
border: 0;
padding: 0;
overflow: hidden;
}
body {
background-color: DeepSkyBlue;
}
#canvasdiv {
display: none;
}
#canvas {
display: block;
}
#vrbutton {
cursor: default;
display: none;
margin: 8px;
position: absolute;
width: 48px;
height: 24px;
bottom: 0;
right: 0;
}
</style>
</head>
<body>
<div id="canvasdiv">
<canvas id="canvas" tabindex="-1" oncontextmenu="event.preventDefault()"></canvas>
<image id="vrbutton"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALYAAABhCAYAAAB7y1uTAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAhdEVYdENyZWF0aW9uIFRpbWUAMjAyMjowODoxOCAxMDo0MToxOYu0C2EAABBHSURBVHhe7Z17kBTFHce7ex67CwQNAj7ii0gi4gPLxBhfZVLBVCpSlbLgYkj+0iSmooUkFJbEJB7rAy5iKJWHBisarVIS78BSMRVjDGggVeCjIoYrLPFBQEgOiEDgdnd2pie/b8/0scJxvG7ndmf6w+3u7Mzs9PR3vvObX0/PDJz1QktLi9Xe3h7EX1lLa6vLtjG3Mri71/kNhiTI7R0UshHMay8WvXjUAV7VfMKora2tolgsSgxPntY63PMrk1jIx3MWnss4HyElc7gIaarxtyFZQvonQlFlXG4LQ76Oh/yvjus8vXhucTum13oX9Di0dsLEKTOmc85vtd38SCxSBg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ZMGs19W5PhnyOZGfIVqPqTMrIMSiEMBJpMCmRNcrlzdV8/6vMa2e0VqDqI3G6dJ5s5dLX3bkcgVBB1mftpBu92d229RCIqicGtuLjKyGabPNwTQYmz8zb3aH71Xac4MKNsXsaty6xBsEzIyIECoWS90BQKM4x2O/QvaT5+bM+V8S0Xp/KAmZXq2Ud9qCwlEYmTtehcxsl15QmyrSQr2qbqFA6WKlPe5f2Pd0VR64N1TKpTdoBpfigh/1fNGEKICrIQykEezxUAoKob70zRdC8Fy+IKqVyswl82cvrcPpvT7RXe1LF96zkdboOmq/MmHZNq1bFU19dXAl9mUomQDVxhZSW0tGvbNVN19wK6XuNy3ycDyfitih2mgLi3t87o6vVkp/cXMFh0SkaaQmpeLq91hEtEwI2fQvelN1iT4Bw5PrcM1HiGtBKFJzr7x3xtL50XXW9ToL0hfYkWDuJfPa/kyr9fUgqP7XzecdFalC7tOKq5uF1VZBneLP1L2whVA9ZUNKnEPyJHmT2vSCTO2QqV/2Re5r8DC8jN+oIAUwQm+8iVNmTKej8a22mx+J7xK3LykLoJwUQrkZnklHOzML/Crz/WC1YOFt6IjBVHoNaMVhbpj8uh///DTflnNojb5NwQdnIWnbUOxJ63bZH9pOyKOxnYDvlbuohX1fx/xZKq+u9XCPsWN6NuLkadOGe5X8JC7C8aTbWFrgSMmlw6mprvorD/hps0F1IAlCdFGFrJv28U1MyNfDQDy7dMGsFzGHNpSafYCpXZeWqbdfSMFrEoXty2jbjA6ZGEqtAjo200SqT7rAdqKakudEKKj9F3aR9TopD6HMItexeG5xO+aqNTVjjP0fTrwtpsJuLuIAAAAASUVORK5CYII="
alt="Enter VR"></image>
</div>
<script>
const canvasEl = document.getElementById("canvas");
var Module = {
canvas: canvasEl,
preRun: [() => {
document.getElementById("canvasdiv").style.display = "block";
canvasEl.focus();
}],
setStatus: function (text) {
console.log("### WebAssembly module status:", text);
}
};
window.addEventListener('resize', (event) => {
// Resize buffer size when client size changes
canvasEl.width = canvasEl.clientWidth;
canvasEl.height = canvasEl.clientHeight;
}, false);
canvasEl.addEventListener("webglcontextlost", (event) => {
alert('WebGL context lost. You will need to reload the page.');
console.log("WebGL context lost.");
event.preventDefault();
}, false);
</script>
{{{ SCRIPT }}}
</body>
</html>