-
Notifications
You must be signed in to change notification settings - Fork 12
/
index.html
102 lines (101 loc) · 3.06 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
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Super Mario 64 PC Web! 🎩</title>
<link rel="stylesheet" href="style.css" />
<link rel="icon" type="x-icon" href="images/favicon.ico">
<img src="images/SuperMario64.png"<alt="Super Mario 64" width="250" height="100"> </center>
<style>
body, html{
margin: 0;
padding: 0;
scrollbar-width: none;
}
::-webkit-scrollbar {
display: none;
}
#container {
width: 100vw;
height: 100vh;
display: flex;
align-items:center;
justify-content: center;
}
canvas {
width: 100vw;
height: 100vh;
}
#controls {
display: flex;
align-items: right;
}
#controller, #dmca {
padding-left: 4em;
}
</style>
</head>
<body>
<div id="controls">
<div id="keyboard">
<h1>Welcome</h1>
<h3>Keyboard Controls (These Can be changed in game)</h3>
<li>Movement: WASD</li>
<li>A: L</li>
<li>B: ,</li>
<li>L: .</li>
<li>R: Shift</li>
<li>Z: K</li>
<li>Start: Space</li>
<li>C-stick: Arrow Keys</li>
<h1> </h1>
</ul>
</div>
<div id="controller">
<h3>You can use a controller!</h>
<h4>You can save!</h4>
<h4><a href="https://notan127.github.io/SM64-PC-Port-WebGL/classic/" target="_blank">Click Here to Play Classic</a></h3>
<h4>Scroll down to hide these instructions and to start playing the game.</h4>
<h4>Make sure to remember these keybinds.</h3>
<h3>___________________________________________________________</h4>
<h4>Press Alt + ↑ to see instrctions again</h3>
</div>
</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="game/sm64.us.f3dex2e.js"></script>
<script>
</script>
</body>
</html>