frontend/sm64/index.html

87 lines
2.4 KiB
HTML

<!Doctype html>
<html lang="en-us">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XVTVBR1D5V"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XVTVBR1D5V');
</script>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Super Mario 64</title>
<link rel="icon" href="logo.png">
<style>
body, html{
margin: 0;
padding: 0;
width: 100vw;
min-height: 100vh;
font-family: Arial, Helvetica, sans-serif;
color: white;
background-color: black;
image-rendering: pixelated;
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;
}
</style>
</head>
<body>
<div id="container">
<canvas class="emscripten" id="canvas"></canvas>
</div>
<script type='text/javascript'>
alert('Controls:\nMovement: Arrow Keys\nA: X\nB: C\nR: Q\nZ: Space\nStart: Enter\nC-stick: WASD\nGo to https://1.e-gamepass.pages.dev/sm64/controls to see these again.')
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>
</body>
</html>