change structure of webfrontend

This commit is contained in:
Magnus Ulimoen 2020-01-28 22:02:37 +01:00
parent 38e9797ff7
commit 037d1b3ff9
4 changed files with 8 additions and 9 deletions

View File

@ -2,7 +2,7 @@
from argparse import ArgumentParser
from subprocess import check_call
from shutil import copyfile
from shutil import copyfile, copytree
import tempfile
import pathlib
@ -61,5 +61,4 @@ if __name__ == "__main__":
print("wasm-opt not found, not optimising further")
pass
for f in ["index.html", "main.js", "style.css"]:
copyfile(f, publish.joinpath(f))
copytree("webfront", publish, dirs_exist_ok=True)

View File

@ -1,11 +1,11 @@
import { EulerUniverse, MaxwellUniverse, default as init, set_panic_hook as setPanicHook } from "./sbp.js";
import { EulerUniverse, default as init, set_panic_hook as setPanicHook } from "../sbp.js";
/**
* Initialises and runs the Maxwell solver,
* Initialises and runs the Euler solver,
* plotting the solution to a canvas using webgl
*/
(async function run() {
const wasm = await init("./sbp_bg.wasm");
const wasm = await init("../sbp_bg.wasm");
setPanicHook();
const DIAMOND = false;
const UPWIND = true;

View File

@ -5,9 +5,9 @@
<meta charset="utf-8" />
<meta name="generator" content="by-hand" />
<meta name="viewpost" context="width=device-width, inital-scale=1.0, user-scalable=yes" />
<title>SBP waves</title>
<link rel="stylesheet" type="text/css" href="style.css">
<script async type="module" src="main.js"></script>
<title>Euler solver (ΣBP)</title>
<link rel="stylesheet" type="text/css" href="../style.css">
<script async type="module" src="euler.js"></script>
</head>
<body>
<canvas id="glCanvas"></canvas>