50 lines
1.5 KiB
HTML
50 lines
1.5 KiB
HTML
<!doctype html>
|
|
<html lang="en-us">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
|
|
<title>Minecraft</title>
|
|
<style>
|
|
body,
|
|
html {
|
|
margin: 0;
|
|
padding: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
background-color: black;
|
|
touch-action: none;
|
|
/* Prevent browser scroll/zoom on touch */
|
|
}
|
|
|
|
canvas.emscripten {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: block;
|
|
outline: none;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" tabindex="-1"></canvas>
|
|
|
|
<script type='text/javascript'>
|
|
var Module = {
|
|
canvas: (function () { return document.getElementById('canvas'); })()
|
|
};
|
|
|
|
// Prevent double tap zooming and default touch behaviors to allow pure game control
|
|
document.addEventListener('touchstart', function (e) {
|
|
// Do not preventDefault on input, textarea, button, or select elements
|
|
var t = e.target.tagName;
|
|
if (t !== 'INPUT' && t !== 'TEXTAREA' && t !== 'BUTTON' && t !== 'SELECT' && t !== 'OPTION') {
|
|
e.preventDefault();
|
|
}
|
|
}, { passive: false });
|
|
</script>
|
|
{{{ SCRIPT }}}
|
|
</body>
|
|
|
|
</html> |