-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
144 lines (143 loc) · 4.1 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
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<meta
name="description"
content="The best way to play Super Mario 64 on the go!"
/>
<meta name="robots" content="noindex" />
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin="anonymous"
/>
<title>Super Mario 64</title>
<script>
alert("CONTROLS; A - X, B - C, L - Q, Z - Space, C-Stick - WASD ");
</script>
<style>
#redirect {
position: fixed;
bottom: 10px;
left: 10px;
}
</style>
<button id="redirect" onclick="goToHomePage()"><image src="/img/DAC96524-23D1-4D33-B8DF-343E62276EB4.png" class="button1" style="width: 75px; height: 75px;" ></image></button>
<script>
function goToHomePage() {
window.location.href = '//' + window.location.hostname;
}
</script>
<style>
body,
html {
background-color: #000000;
image-rendering: pixelated;
scrollbar-width: none;
}
::-webkit-scrollbar {
display: none;
}
canvas {
width: 100vw;
height: 100vh;
}
</style>
</head>
<body>
<div class="container text-light" id="controls">
<figure>
<blockquote class="blockquote">
<h1 class="display-6"><strong>Keyboard Controls</strong></h1>
</blockquote>
<figcaption class="blockquote-footer">
You can use a controller!
</figcaption>
<figcaption class="blockquote-footer">
You can save! Save is stored in local storage.
</figcaption>
<figcaption class="blockquote-footer">
Press page down to hide these instructions.
</figcaption>
<figcaption class="blockquote-footer">
Press page up to see them again.
</figcaption>
</figure>
<table class="table table-sm text-light" id="keyboard">
<thead>
<th scope="col">GameCube-Controller</th>
<th scope="col">Keyboard</th>
</thead>
<tbody>
<tr>
<td>A</td>
<td>X</td>
</tr>
<tr>
<td>B</td>
<td>C</td>
</tr>
<tr>
<td>L</td>
<td>Q</td>
</tr>
<tr>
<td>Z</td>
<td>Space</td>
</tr>
<tr>
<td>Start</td>
<td>Enter</td>
</tr>
<tr>
<td>C-Stick</td>
<td>WASD</td>
</tr>
</tbody>
</table>
</div>
<div id="container">
<canvas class="emscripten" id="canvas"></canvas>
</div>
<script type="text/javascript">
var Module = {
preRun: [],
postRun: [],
print: (function () {
return function (text) {
if (arguments.length > 1)
text = Array.prototype.slice.call(arguments).join(" ");
console.log(text);
};
})(),
printErr: function (text) {
if (arguments.length > 1)
text = Array.prototype.slice.call(arguments).join(" ");
console.error(text);
},
canvas: (function () {
var canvas = document.getElementById("canvas");
canvas.width = window.innerWidth; // Todo: how to do this from c++
canvas.height = window.innerHeight;
canvas.addEventListener(
"webglcontextlost",
function (e) {
alert("WebGL context lost. You will need to reload the page.");
e.preventDefault();
},
false
);
return canvas;
})(),
setStatus: function (text) {},
};
</script>
<script async type="text/javascript" src="sm64.us.f3dex2e.js"></script>
<script></script>
</body>
</html>