cleanup and reogranization
This commit is contained in:
parent
8ae620633f
commit
2a5fb8ca69
5
build.sh
5
build.sh
@ -7,7 +7,8 @@ llvm-strip --strip-all pkg/integral_site_bg.wasm
|
||||
|
||||
rm -fr tmp | true #delete tmp folder if exists
|
||||
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/
|
||||
|
||||
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)"
|
||||
@ -1,33 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!-- Disable zooming: -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
||||
<!-- Disable zooming: -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Integral Demonstration</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Integral Demonstration</title>
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<noscript>Please enable Javascript, this page uses both WebAssembly and Javascript to run.</noscript>
|
||||
|
||||
<canvas id="canvas"></canvas>
|
||||
<div class="centered" id="loading">
|
||||
<p style="font-size:16px">
|
||||
Loading…
|
||||
</p>
|
||||
<div class="lds-dual-ring"></div>
|
||||
</div>
|
||||
<canvas id="canvas"></canvas>
|
||||
<div class="centered" id="loading">
|
||||
<p style="font-size: 16px;">
|
||||
Loading…
|
||||
</p>
|
||||
<div class="lds-dual-ring"></div>
|
||||
</div>
|
||||
|
||||
<script type="module">
|
||||
import init, { start } from '../pkg/integral_site.js';
|
||||
|
||||
async function run() {
|
||||
await init();
|
||||
document.getElementById("loading").remove();
|
||||
start("canvas");
|
||||
}
|
||||
run();
|
||||
</script>
|
||||
<script type="module">
|
||||
import init, { start } from "./integral_site.js";
|
||||
|
||||
async function run() {
|
||||
await init();
|
||||
document.getElementById("loading").remove();
|
||||
start("canvas");
|
||||
}
|
||||
run();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user