mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-25 10:37:11 -06:00
apps/lightcraft-web runs the egui UI in the browser (eframe web, glow/WebGL2): procedural demo library on load; in-memory imports via file picker (Cmd+Shift+I) and drag-and-drop (MemStore + bytes-based engine hooks); export goes through app.export and downloads in the browser; `?bench` logs first-frame and slider latency. `cargo xtask web [--serve [port]] [--dev]` builds with the matching wasm-bindgen CLI into <target>/web/; the web app is part of the CI wasm check. Wasm fixes: lazy profiling Instant in pipeline, web-time clocks in ui-egui (render timings were 0 on wasm). Docs: docs/web.md. No persistence on web yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
1.4 KiB
HTML
34 lines
1.4 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>LightCraft</title>
|
|
<link rel="icon" href="data:,">
|
|
<meta name="description" content="LightCraft: open-source photo library and raw developer, running in your browser (WASM).">
|
|
<style>
|
|
:root { color-scheme: dark; }
|
|
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #1c1c1c; }
|
|
canvas#lightcraft_canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
|
|
#lightcraft_loading {
|
|
position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
|
|
color: #b8b8b8; font: 15px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; pointer-events: none;
|
|
}
|
|
#lightcraft_status { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; overflow: hidden; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<canvas id="lightcraft_canvas"></canvas>
|
|
<div id="lightcraft_loading">Loading LightCraft…</div>
|
|
<div id="lightcraft_status" aria-live="polite"></div>
|
|
<script type="module">
|
|
import init from "./lightcraft_web.js";
|
|
init().catch((e) => {
|
|
console.error(e);
|
|
const el = document.getElementById("lightcraft_loading");
|
|
if (el) el.textContent = "LightCraft failed to load: " + e;
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|