83 lines
1.9 KiB
HTML
83 lines
1.9 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Kryon Example</title>
|
|
<style>
|
|
html,
|
|
body {
|
|
height: 100%;
|
|
margin: 0;
|
|
overflow: hidden;
|
|
background: #111815;
|
|
color: #eef7f3;
|
|
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
}
|
|
|
|
body {
|
|
display: grid;
|
|
place-items: center;
|
|
}
|
|
|
|
.canvas-stage {
|
|
width: 100%;
|
|
height: 100vh;
|
|
height: 100dvh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-sizing: border-box;
|
|
padding: 12px;
|
|
}
|
|
|
|
.canvas-frame {
|
|
width: min(100vw - 24px, 800px);
|
|
aspect-ratio: 4 / 3;
|
|
max-height: calc(100vh - 24px);
|
|
max-height: calc(100dvh - 24px);
|
|
position: relative;
|
|
}
|
|
|
|
canvas.emscripten {
|
|
position: absolute;
|
|
inset: 0;
|
|
width: 100% !important;
|
|
height: 100% !important;
|
|
max-width: none !important;
|
|
max-height: none !important;
|
|
border: 0;
|
|
outline: 0;
|
|
background: #f7f7f4;
|
|
}
|
|
|
|
#status {
|
|
position: fixed;
|
|
left: 16px;
|
|
bottom: 14px;
|
|
z-index: 2;
|
|
color: rgba(238, 247, 243, 0.78);
|
|
font-size: 13px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="canvas-stage">
|
|
<div class="canvas-frame" id="canvas-frame">
|
|
<canvas class="emscripten" id="canvas" width="800" height="600" oncontextmenu="event.preventDefault()" tabindex="-1"></canvas>
|
|
</div>
|
|
</div>
|
|
<div id="status">Loading...</div>
|
|
<script>
|
|
var Module = {
|
|
canvas: document.getElementById("canvas"),
|
|
setStatus: function(text) {
|
|
var status = document.getElementById("status");
|
|
if(status) status.textContent = text || "";
|
|
}
|
|
};
|
|
</script>
|
|
{{{ SCRIPT }}}
|
|
</body>
|
|
</html>
|