makepad-template/index.html

35 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>Makepad Template</title>
<script type='module'>
import {WasmWebGL} from "/makepad-template/platform/src/os/web/web_gl.js"
const wasm = await WasmWebGL.fetch_and_instantiate_wasm(
"makepad-template/target/wasm32-unknown-unknown/release/makepad-template.wasm"
);
class MyWasmApp {
constructor(wasm) {
let canvas = document.getElementsByClassName('full_canvas')[0];
this.webgl = new WasmWebGL (wasm, this, canvas);
}
}
let app = new MyWasmApp(wasm);
</script>
<script type='module' src='/makepad-template/platform/src/os/web/auto_reload.js'></script>
<link rel='stylesheet' type='text/css' href='/makepad-template/platform/src/os/web/full_canvas.css'>
</head>
<body>
<canvas class='full_canvas'></canvas>
<div class='canvas_loader' >
<div style=''>
Loading..
</div>
</div>
</body>
</html>