45 lines
No EOL
842 B
HTML
45 lines
No EOL
842 B
HTML
<!doctype html>
|
|
<title>Game</title>
|
|
<meta name=viewport content="width=device-width, maximum-scale=1.0, user-scalable=no, viewport-fit=cover, interactive-widget=resizes-content">
|
|
|
|
<style>
|
|
:root, body {
|
|
margin: 0;
|
|
padding: 0;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
contain: strict;
|
|
}
|
|
canvas {
|
|
width: 100%;
|
|
height: 100%;
|
|
border: 0;
|
|
background: black;
|
|
}
|
|
</style>
|
|
|
|
<canvas id=canvas></canvas>
|
|
|
|
<script>
|
|
let canvas = window.canvas
|
|
|
|
function updateCanvasSize() {
|
|
const box = canvas.getBoundingClientRect()
|
|
canvas.width = box.width * devicePixelRatio
|
|
canvas.height = box.height * devicePixelRatio
|
|
}
|
|
|
|
updateCanvasSize()
|
|
addEventListener('resize', updateCanvasSize)
|
|
|
|
Module = {
|
|
canvas,
|
|
arguments: location.hash.slice(1).split(' '),
|
|
}
|
|
|
|
onerror = (...args) => {
|
|
alert(JSON.stringify(args))
|
|
}
|
|
</script>
|
|
|
|
{{{ SCRIPT }}} |