41 lines
1.1 KiB
HTML
41 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en-us">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Spacegame</title>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
background-color: #101010;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
}
|
|
canvas.emscripten {
|
|
border: 0px none;
|
|
background-color: black;
|
|
outline: none;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" tabindex="-1"></canvas>
|
|
|
|
<script type="text/javascript">
|
|
var Module = {
|
|
print: function(text) { console.log(text); },
|
|
printErr: function(text) { console.error(text); },
|
|
canvas: (function() {
|
|
var canvas = document.getElementById('canvas');
|
|
return canvas;
|
|
})()
|
|
};
|
|
</script>
|
|
<script async type="text/javascript" src="index.js"></script>
|
|
</body>
|
|
</html>
|