mirror of
https://github.com/emilk/egui.git
synced 2026-06-27 23:13:13 -04:00
Initial commit: Closed loop of TS->Rust->TS
This commit is contained in:
44
docs/index.html
Normal file
44
docs/index.html
Normal file
@@ -0,0 +1,44 @@
|
||||
<!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>
|
||||
|
||||
Reference in New Issue
Block a user