-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.html
More file actions
75 lines (66 loc) · 2.54 KB
/
demo.html
File metadata and controls
75 lines (66 loc) · 2.54 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1, IE=edge">
<title>TMH Demo</title>
<style>
@font-face {
font-family: "EBGaramond";
src: url("./media/EBGaramond-Bold.ttf");
}
.prevent_select {
-webkit-user-select: none; /* Safari */
-ms-user-select: none; /* IE 10 and IE 11 */
user-select: none; /* Standard syntax */
}
#canvas {
width: 1280px;
height: 720px;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border-style: solid;
border-width: 10px;
border-color: black;
}
.loader {
width: 60px;
aspect-ratio: 4;
--_g: no-repeat radial-gradient(circle closest-side,#000 90%,#0000);
background:
var(--_g) 0% 50%,
var(--_g) 50% 50%,
var(--_g) 100% 50%;
background-size: calc(100%/3) 100%;
animation: l7 1s infinite linear;
}
@keyframes l7 {
33%{background-size:calc(100%/3) 0% ,calc(100%/3) 100%,calc(100%/3) 100%}
50%{background-size:calc(100%/3) 100%,calc(100%/3) 0% ,calc(100%/3) 100%}
66%{background-size:calc(100%/3) 100%,calc(100%/3) 100%,calc(100%/3) 0% }
}
</style>
</head>
<body style="background-color: #FFFFFF;">
<canvas id="canvas" oncontextmenu="event.preventDefault()"></canvas>
<div id="loader" class="loader" style="
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
"></div>
</body>
<script type="text/javascript">
var Module = {};
Module.canvas = document.getElementById('canvas');
history.pushState(null, null, window.top.location.pathname + window.top.location.search);
window.addEventListener('popstate', (e) => {
e.preventDefault();
// Module.back_button_pressed()
history.pushState(null, null, window.top.location.pathname + window.top.location.search);
});
</script>
<script async type="text/javascript" src="./bg_wasm.js"></script>
</html>