51 lines
1.3 KiB
HTML
51 lines
1.3 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>DESI Explorer</title>
|
|
<meta name="viewport" content="width=device-width">
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
overflow: hidden;
|
|
background: #05050f;
|
|
}
|
|
canvas {
|
|
display: block;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<canvas id="canvas" tabindex="-1" oncontextmenu="event.preventDefault()"></canvas>
|
|
|
|
<!-- Odin's JS runtime glue; required by the generated wasm module. -->
|
|
<script src="odin.js"></script>
|
|
|
|
<script>
|
|
var odinMemoryInterface = new odin.WasmMemoryInterface();
|
|
odinMemoryInterface.setIntSize(4);
|
|
var odinImports = odin.setupDefaultImports(odinMemoryInterface);
|
|
|
|
var Module = {
|
|
instantiateWasm: function(imports, successCallback) {
|
|
var newImports = Object.assign({}, odinImports, imports);
|
|
return WebAssembly.instantiateStreaming(fetch("index.wasm"), newImports).then(
|
|
function(output) {
|
|
var e = output.instance.exports;
|
|
odinMemoryInterface.setExports(e);
|
|
odinMemoryInterface.setMemory(e.memory);
|
|
return successCallback(output.instance);
|
|
}
|
|
);
|
|
},
|
|
onRuntimeInitialized: function() {
|
|
var e = wasmExports;
|
|
if (e._start) { e._start(); }
|
|
},
|
|
canvas: document.getElementById("canvas")
|
|
};
|
|
</script>
|
|
{{{ SCRIPT }}}
|
|
</body>
|
|
</html>
|