mirror of https://github.com/emilk/egui.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.3 KiB
44 lines
1.3 KiB
<!DOCTYPE html>
|
|
<html>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<head>
|
|
<title>Gui Experiment</title>
|
|
|
|
<style>
|
|
html {
|
|
/* Remove touch delay: */
|
|
touch-action: manipulation;
|
|
}
|
|
|
|
body {
|
|
background: #111111;
|
|
color: #bbbbbb;
|
|
max-width: 480px;
|
|
margin: auto;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
// The `--no-modules`-generated JS from `wasm-bindgen` attempts to use
|
|
// `WebAssembly.instantiateStreaming` to instantiate the wasm module,
|
|
// but this doesn't work with `file://` urls. This example is frequently
|
|
// viewed by simply opening `index.html` in a browser (with a `file://`
|
|
// url), so it would fail if we were to call this function!
|
|
//
|
|
// Work around this for now by deleting the function to ensure that the
|
|
// `no_modules.js` script doesn't have access to it. You won't need this
|
|
// hack when deploying over HTTP.
|
|
delete WebAssembly.instantiateStreaming;
|
|
</script>
|
|
|
|
<!-- this is the JS generated by the `wasm-bindgen` CLI tool -->
|
|
<script src="emgui.js"></script>
|
|
|
|
<script src="frontend.js" type="module"></script>
|
|
|
|
<!-- TODO: make this cover the entire screen, with resize and all -->
|
|
<canvas id="canvas" width="480" height="800"></canvas>
|
|
</body>
|
|
</html>
|
|
|
|
|