mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-01 06:16:46 -06:00
wasm32 can't catch a panic, so the command and frame guards do nothing in the browser and a panic ended the page with its unsaved changes. The page now follows its files with unsaved changes after every frame; its panic hook writes them to local storage as .figcraft copies (as many as fit) and says on the page that it stopped. The next page opens them again as unsaved files: file.recover also takes the copy as base64 data. The recovery-copy helpers move from the desktop app into figcraft_engine::branches so both share them.
34 lines
1.2 KiB
TOML
34 lines
1.2 KiB
TOML
[package]
|
|
name = "figcraft-web"
|
|
description = "FigCraft in the browser (eframe web runner, WebGPU with WebGL2 fallback)"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
publish = false
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[[bin]]
|
|
name = "figcraft-web"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
figcraft-engine = { workspace = true }
|
|
figcraft-format = { workspace = true }
|
|
figcraft-ui-egui = { workspace = true }
|
|
figcraft-collab-net = { workspace = true }
|
|
figcraft-text = { workspace = true }
|
|
base64 = { workspace = true }
|
|
egui = { workspace = true }
|
|
log = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
# `wgpu` pulls egui-wgpu's defaults: WebGPU plus the WebGL2 fallback.
|
|
eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit"] }
|
|
wasm-bindgen = "0.2"
|
|
js-sys = "0.3"
|
|
wasm-bindgen-futures = "0.4"
|
|
web-sys = { version = "0.3", features = ["Window", "Document", "Element", "HtmlCanvasElement", "HtmlElement", "HtmlAnchorElement", "Node", "Blob", "BlobPropertyBag", "File", "FileList", "HtmlInputElement", "EventTarget", "Url", "Location", "MediaQueryList", "Navigator", "Gamepad", "GamepadButton", "GamepadMappingType", "Storage"] }
|