cleanup and reogranization

This commit is contained in:
Simon Gardling 2022-03-01 09:26:51 -05:00
parent 8ae620633f
commit 2a5fb8ca69
2 changed files with 26 additions and 25 deletions

View File

@ -7,7 +7,8 @@ llvm-strip --strip-all pkg/integral_site_bg.wasm
rm -fr tmp | true #delete tmp folder if exists rm -fr tmp | true #delete tmp folder if exists
mkdir tmp tmp/pkg mkdir tmp tmp/pkg
cp -r pkg/integral_site_bg.wasm pkg/integral_site.js tmp/pkg/ cp -r pkg/integral_site_bg.wasm pkg/integral_site.js tmp/
cp www/index.html www/style.css tmp/ cp www/index.html www/style.css tmp/
sed -i 's/\.\.\/pkg/\.\/pkg/g' tmp/index.html echo "Total size: $(du -sb tmp)"
echo "Binary size: $(du -sb tmp/integral_site_bg.wasm)"

View File

@ -1,33 +1,33 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<!-- Disable zooming: --> <!-- Disable zooming: -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8" />
<title>Integral Demonstration</title> <title>Integral Demonstration</title>
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css" />
</head> </head>
<body> <body>
<noscript>Please enable Javascript, this page uses both WebAssembly and Javascript to run.</noscript> <noscript>Please enable Javascript, this page uses both WebAssembly and Javascript to run.</noscript>
<canvas id="canvas"></canvas> <canvas id="canvas"></canvas>
<div class="centered" id="loading"> <div class="centered" id="loading">
<p style="font-size:16px"> <p style="font-size: 16px;">
Loading… Loading…
</p> </p>
<div class="lds-dual-ring"></div> <div class="lds-dual-ring"></div>
</div> </div>
<script type="module"> <script type="module">
import init, { start } from '../pkg/integral_site.js'; import init, { start } from "./integral_site.js";
async function run() { async function run() {
await init(); await init();
document.getElementById("loading").remove(); document.getElementById("loading").remove();
start("canvas"); start("canvas");
} }
run(); run();
</script> </script>
</body> </body>
</html> </html>