All checks were successful
Build & deploy web version / Build WebAssembly & deploy (push) Successful in 1m1s
65 lines
1.6 KiB
HTML
65 lines
1.6 KiB
HTML
<!doctype html>
|
|
<html lang="hu">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover">
|
|
<title>Platform játék</title>
|
|
<style>
|
|
html, body {
|
|
margin: 0;
|
|
height: 100%;
|
|
background: #1a0505;
|
|
color: #e8d5d5;
|
|
font: 16px/1.5 system-ui, sans-serif;
|
|
overflow: hidden;
|
|
overscroll-behavior: none;
|
|
}
|
|
|
|
#shell, canvas {
|
|
touch-action: none;
|
|
-webkit-user-select: none;
|
|
user-select: none;
|
|
-webkit-touch-callout: none;
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
#shell {
|
|
position: fixed;
|
|
inset: 0;
|
|
}
|
|
|
|
canvas {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
cursor: none;
|
|
background: #280000;
|
|
outline: none;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="shell">
|
|
<canvas id="canvas" tabindex="-1" oncontextmenu="event.preventDefault()"></canvas>
|
|
</div>
|
|
<script>
|
|
var canvasElement = document.getElementById('canvas');
|
|
|
|
var Module = {
|
|
canvas: canvasElement,
|
|
preRun: [],
|
|
postRun: [function () {
|
|
canvasElement.focus();
|
|
}],
|
|
print: function (text) { console.log(text); },
|
|
printErr: function (text) { console.error(text); }
|
|
};
|
|
|
|
canvasElement.addEventListener('click', function () { canvasElement.focus(); });
|
|
window.addEventListener('keydown', function (event) {
|
|
if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', ' '].indexOf(event.key) >= 0) event.preventDefault();
|
|
});
|
|
</script>
|
|
{{{ SCRIPT }}}
|
|
</body>
|
|
</html>
|