80 lines
2.1 KiB
HTML
80 lines
2.1 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8"/>
|
|
<title>${name}</title>
|
|
<style type="text/css">
|
|
body {
|
|
margin: 0;
|
|
background-color: black;
|
|
}
|
|
.game-title {
|
|
pointer-events: none;
|
|
position: absolute;
|
|
bottom: 10px;
|
|
margin-top: 0px;
|
|
padding-left: 10px;
|
|
color: white;
|
|
text-decoration: none;
|
|
z-index: 1;
|
|
text-align: left;
|
|
font-family: "Arial Black", Gadget, sans-serif;
|
|
font-size: 30px;
|
|
}
|
|
.game-menu-item {
|
|
pointer-events: auto;
|
|
font-size: 18px;
|
|
padding-left: 10px;
|
|
font-family: Arial, Helvetica, sans-serif;
|
|
}
|
|
.game-menu-link {
|
|
text-decoration: none;
|
|
color: white;
|
|
}
|
|
.game {
|
|
position: absolute;
|
|
top: 0px;
|
|
left: 0px;
|
|
margin: 0px;
|
|
border: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
display: block;
|
|
image-rendering: optimizeSpeed;
|
|
image-rendering: -moz-crisp-edges;
|
|
image-rendering: -o-crisp-edges;
|
|
image-rendering: -webkit-optimize-contrast;
|
|
image-rendering: optimize-contrast;
|
|
image-rendering: crisp-edges;
|
|
image-rendering: pixelated;
|
|
-ms-interpolation-mode: nearest-neighbor;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body style="background:black">
|
|
<div class="game-title">${name}
|
|
<span class="game-menu-item"><a class="game-menu-link" href="index.html">home</a></span>
|
|
</div>
|
|
<canvas class="game" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
|
|
<script type="text/javascript">
|
|
var Module = {
|
|
onRuntimeInitialized: function () {
|
|
const originalSet = HEAPU8.set.bind(HEAPU8);
|
|
HEAPU8.set = function(array, offset) {
|
|
if (typeof offset === 'bigint') {
|
|
offset = Number(offset);
|
|
}
|
|
return originalSet(array, offset);
|
|
};
|
|
},
|
|
preRun: [],
|
|
print: (...args) => console.log('[stdout]: ' + args.join(' ')),
|
|
printErr: (...args) => console.log('[stderr]: ' + args.join(' ')),
|
|
};
|
|
window.onerror = (event) => console.log('[onerror]: ' + event.message);
|
|
</script>
|
|
<script async type="text/javascript" src="index.js"></script>
|
|
</body>
|
|
</html>
|