wedge/web/index.html

31 lines
979 B
HTML
Raw Permalink Normal View History

2019-08-14 18:18:25 +00:00
<!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>