diff --git a/make_wasm.py b/make_wasm.py index 4d9c2a9..209c31a 100755 --- a/make_wasm.py +++ b/make_wasm.py @@ -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) diff --git a/main.js b/webfront/euler/euler.js similarity index 97% rename from main.js rename to webfront/euler/euler.js index 52cdda0..0feddfa 100644 --- a/main.js +++ b/webfront/euler/euler.js @@ -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; diff --git a/index.html b/webfront/euler/index.html similarity index 73% rename from index.html rename to webfront/euler/index.html index 01b490a..4a2d8e8 100644 --- a/index.html +++ b/webfront/euler/index.html @@ -5,9 +5,9 @@ - SBP waves - - + Euler solver (ΣBP) + + diff --git a/style.css b/webfront/style.css similarity index 100% rename from style.css rename to webfront/style.css