mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-14 19:26:56 -04:00
In the web build, now_ms() in crates/ui-egui/src/lib.rs returned 0.0. The status bar read "render 0.0 ms · ui 0.0 ms" however long a frame took, and the Layers panel's budget of 8 ms for the row thumbnails it renders in a frame never ran out, so only its limit of 16 thumbnails applied. now_ms() now returns the milliseconds since its first call, read from the browser's performance.now() through web-time, which the build already has through eframe. The desktop clock is unchanged. In Chrome, after a pan frame of 750 ms over a document of 50,000 paths, the status bar now reads "render 750.7 ms". The Layers panel now renders the thumbnails of 24 groups of 2,000 paths one per frame, where main rendered nine of them in one frame of 217 ms. The canvas has no render worker in the web build, so it still renders on the UI thread and draws the same pixels. Docs: docs/target-app-parity.md.
49 lines
1.6 KiB
TOML
49 lines
1.6 KiB
TOML
[package]
|
|
name = "vectorcraft-ui-egui"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "VectorCraft egui frontend (menus, panels, tools and canvas); swappable — nothing below depends on it"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
craft-ui = { workspace = true }
|
|
vectorcraft-geom = { workspace = true }
|
|
vectorcraft-color = { workspace = true }
|
|
vectorcraft-doc = { workspace = true }
|
|
vectorcraft-brush = { workspace = true }
|
|
vectorcraft-render = { workspace = true }
|
|
vectorcraft-text = { workspace = true }
|
|
vectorcraft-tools = { workspace = true }
|
|
vectorcraft-engine = { workspace = true }
|
|
vectorcraft-svg = { workspace = true }
|
|
vectorcraft-effects = { workspace = true }
|
|
vectorcraft-three-d = { workspace = true }
|
|
vectorcraft-plugins = { workspace = true }
|
|
vectorcraft-pdf = { workspace = true }
|
|
vectorcraft-cad = { workspace = true }
|
|
vectorcraft-eps = { workspace = true }
|
|
vectorcraft-format = { workspace = true }
|
|
egui = { workspace = true }
|
|
egui_extras = { workspace = true }
|
|
image = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
log = { workspace = true }
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
# `now_ms` (src/lib.rs) reads the page's `performance.now()` with this crate in the web build. It is
|
|
# MIT OR Apache-2.0 and already in the build through eframe.
|
|
web-time = "1"
|
|
|
|
[dev-dependencies]
|
|
egui_kittest = { workspace = true, features = ["wgpu", "snapshot"] }
|
|
vectorcraft-testkit = { workspace = true }
|
|
wat = { workspace = true }
|
|
|
|
[build-dependencies]
|
|
serde_json = { workspace = true }
|
|
toml = "1"
|