wedge/web/index.html
2019-08-14 13:18:25 -05:00

30 lines
979 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>wedge</title>
</head>
<body>
<canvas id="canvas" oncontextmenu="event.preventDefault()"></canvas>
<script type="text/javascript">
var data;
var Module = {
canvas: (function() {
var canvas = document.getElementById("canvas");
canvas.addEventListener("webglcontextlost", e => {
alert("WebGL context lost. You will need to reload the page.");
e.preventDefault();
}, false);
return canvas;
})()
};
fetch("/pkg/wedge_web_bg.wasm")
.then(response => response.arrayBuffer())
.then(buffer => WebAssembly.instantiate(buffer, {}))
.then(result => {
console.log(result);
});
</script>
</body>
</html>