1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 05:10:03 -04:00

Add example_web app

This commit is contained in:
Emil Ernerfeldt
2020-11-17 23:24:14 +01:00
parent 7e9b5de250
commit 0cb3bb791b
14 changed files with 272 additions and 64 deletions

View File

@@ -29,7 +29,7 @@
<body>
<!-- The WASM code will resize this to cover the entire screen -->
<canvas id="canvas"></canvas>
<canvas id="the_canvas_id"></canvas>
<script>
// The `--no-modules`-generated JS from `wasm-bindgen` attempts to use
@@ -55,7 +55,8 @@
.then(on_wasm_loaded)["catch"](console.error);
function on_wasm_loaded() {
wasm_bindgen.start("canvas");
// This call installs a bunch of callbacks and then return
wasm_bindgen.start("the_canvas_id");
}
</script>
</body>