summaryrefslogtreecommitdiff
path: root/crates/gipfel-web/serve-here.sh
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2026-10-27 11:37:41 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2026-10-27 11:37:41 +0100
commit21487476293a77518e81c91ecdc0fbd4c4b74a25 (patch)
treea73687a9ae1b1bf82af0ff367f0e3fdf26e7db52 /crates/gipfel-web/serve-here.sh
parent574655e57a3790c08659adc87d3a9c5a45da4f0d (diff)
web: W2 — hill DB, metadata-driven viewpoint, markers and auto-fit
- fetch gipfel.dat.gz at startup, gunzip (flate2, pure Rust) and load into a Panorama held in app state - image loads now also parse the gipfel JPEG comment / EXIF and set the viewpoint via apply_image_metadata (same path as desktop) - markers: click a visible-peak guide dot to mark it, drag to adjust, right-click to remove; refit (comp_params_with, distortion locked by default) after every change once >= 4 markers - sidebar: fit-distortion toggle, marker/zoom readout, fitted az/pitch/roll/scale line - canvas: guide dots for visible peaks, red crosses + shadowed labels - serve-here.sh: dev helper (cargo build --target wasm32 + wasm-bindgen + gzip the DB into the static dist dir) Verified: cargo check clean for wasm32; runtime to be confirmed in browser against a gipfel-saved photo (W2 acceptance: fit must match the desktop result on the same image).
Diffstat (limited to 'crates/gipfel-web/serve-here.sh')
-rwxr-xr-xcrates/gipfel-web/serve-here.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/crates/gipfel-web/serve-here.sh b/crates/gipfel-web/serve-here.sh
new file mode 100755
index 0000000..54038a6
--- /dev/null
+++ b/crates/gipfel-web/serve-here.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+# Build gipfel-web for wasm and refresh the static dist dir served from
+# /tmp/gipfel-web-dist (python http.server on :8090). Dev-only helper.
+set -e
+cd "$(dirname "$0")/../.."
+cargo build -p gipfel-web --target wasm32-unknown-unknown --release
+DIST=/tmp/gipfel-web-dist
+mkdir -p "$DIST"
+wasm-bindgen --target web --out-dir "$DIST" target/wasm32-unknown-unknown/release/gipfel-web.wasm
+cp crates/gipfel-web/www/style.css "$DIST/"
+gzip -9 -n -c gipfel.dat > "$DIST/gipfel.dat.gz"
+echo "dist refreshed: $(ls -la "$DIST" | awk '{s+=$5} END {print s" bytes"}')"