Skip to content
This repository was archived by the owner on Dec 21, 2023. It is now read-only.

Commit 1f657c6

Browse files
committed
Testing new file
- `sm64.us.f3dex2e.js`
1 parent 90c37ca commit 1f657c6

File tree

5 files changed

+19136
-9515
lines changed

5 files changed

+19136
-9515
lines changed

_OLD_/index.html

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
2+
<!doctype html>
3+
<html lang="en-us">
4+
<head>
5+
<meta charset="utf-8">
6+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7+
<title>Super Mario 64 on the Web! 🐸</title>
8+
<style>
9+
body, html{
10+
margin: 0;
11+
padding: 0;
12+
width: 100vw;
13+
min-height: 100vh;
14+
background-color: #111;
15+
font-family: Arial, Helvetica, sans-serif;
16+
color: white;
17+
image-rendering: pixelated;
18+
scrollbar-width: none;
19+
}
20+
::-webkit-scrollbar {
21+
display: none;
22+
}
23+
#container {
24+
width: 100vw;
25+
height: 100vh;
26+
display: flex;
27+
align-items: center;
28+
justify-content: center;
29+
}
30+
canvas {
31+
width: 100vw;
32+
height: 100vh;
33+
}
34+
#controls {
35+
margin-left: 1em;
36+
display: flex;
37+
align-items: center;
38+
}
39+
#controller, #dmca {
40+
padding-left: 4em;
41+
}
42+
</style>
43+
</head>
44+
<body>
45+
<div id="controls">
46+
<div id="keyboard">
47+
<h2>Keyboard Controls</h2>
48+
<ul>
49+
<li>Movement: Arrow Keys</li>
50+
<li>A: X</li>
51+
<li>B: C</li>
52+
<li>L: Q</li>
53+
<li>Z: Space</li>
54+
<li>Start: Enter</li>
55+
<li>C-stick: WASD</li>
56+
</ul>
57+
</div>
58+
<div id="controller">
59+
<h2>You can use a controller!</h2>
60+
<h2>You can save!</h2>
61+
<h2>Press page down to hide these instructions.</h2>
62+
<h2>Press page up to see them again.</h2>
63+
</div>
64+
</div>
65+
<div id="container">
66+
<canvas class="emscripten" id="canvas"></canvas>
67+
</div>
68+
<script type='text/javascript'>
69+
var Module = {
70+
preRun: [],
71+
postRun: [],
72+
print: (function() {
73+
return function(text) {
74+
if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' ');
75+
console.log(text);
76+
};
77+
})(),
78+
printErr: function(text) {
79+
if (arguments.length > 1)
80+
text = Array.prototype.slice.call(arguments).join(' ');
81+
console.error(text);
82+
},
83+
canvas: (function() {
84+
var canvas = document.getElementById('canvas');
85+
canvas.width = window.innerWidth; // Todo: how to do this from c++
86+
canvas.height = window.innerHeight;
87+
canvas.addEventListener("webglcontextlost", function(e) {
88+
alert('WebGL context lost. You will need to reload the page.');
89+
e.preventDefault();
90+
}, false);
91+
return canvas;
92+
})(),
93+
setStatus: function(text) {
94+
}
95+
};
96+
</script>
97+
<script async type="text/javascript" src="sm64.us.f3dex2e.js"></script>
98+
<script>
99+
</script>
100+
</body>
101+
</html>
102+
103+
104+

0 commit comments

Comments
 (0)