Merge pull request #1829 from hannobraun/gui

Remove GUI code from `fj-window`
This commit is contained in:
Hanno Braun 2023-05-22 12:23:18 +02:00 committed by GitHub
commit 8270f5abb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 1063 deletions

632
Cargo.lock generated
View File

@ -2,22 +2,6 @@
# It is not intended for manual editing.
version = 3
[[package]]
name = "ab_glyph"
version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5110f1c78cf582855d895ecd0746b653db010cec6d9f5575293f27934d980a39"
dependencies = [
"ab_glyph_rasterizer",
"owned_ttf_parser",
]
[[package]]
name = "ab_glyph_rasterizer"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046"
[[package]]
name = "addr2line"
version = "0.19.0"
@ -168,102 +152,6 @@ dependencies = [
"libloading",
]
[[package]]
name = "ashpd"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6dcc8ed0b5211687437636d8c95f6a608f4281d142101b3b5d314b38bfadd40f"
dependencies = [
"enumflags2",
"futures",
"rand",
"serde",
"serde_repr",
"zbus",
]
[[package]]
name = "async-broadcast"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d26004fe83b2d1cd3a97609b21e39f9a31535822210fe83205d2ce48866ea61"
dependencies = [
"event-listener",
"futures-core",
"parking_lot",
]
[[package]]
name = "async-channel"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833"
dependencies = [
"concurrent-queue",
"event-listener",
"futures-core",
]
[[package]]
name = "async-executor"
version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb"
dependencies = [
"async-lock",
"async-task",
"concurrent-queue",
"fastrand",
"futures-lite",
"slab",
]
[[package]]
name = "async-io"
version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af"
dependencies = [
"async-lock",
"autocfg",
"cfg-if",
"concurrent-queue",
"futures-lite",
"log",
"parking",
"polling",
"rustix",
"slab",
"socket2",
"waker-fn",
]
[[package]]
name = "async-lock"
version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7"
dependencies = [
"event-listener",
]
[[package]]
name = "async-recursion"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7d78656ba01f1b93024b7c3a0467f1608e4be67d725749fdcd7d2c7678fd7a2"
dependencies = [
"proc-macro2",
"quote",
"syn 1.0.109",
]
[[package]]
name = "async-task"
version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae"
[[package]]
name = "async-trait"
version = "0.1.68"
@ -275,12 +163,6 @@ dependencies = [
"syn 2.0.16",
]
[[package]]
name = "atomic_refcell"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79d6dc922a2792b006573f60b2648076355daeae5ce9cb59507e5908c9625d31"
[[package]]
name = "autocfg"
version = "1.1.0"
@ -567,15 +449,6 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf43edc576402991846b093a7ca18a3477e0ef9c588cde84964b5d3e43016642"
[[package]]
name = "concurrent-queue"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "core-foundation"
version = "0.9.3"
@ -662,49 +535,12 @@ dependencies = [
"serde_derive",
]
[[package]]
name = "derivative"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
dependencies = [
"proc-macro2",
"quote",
"syn 1.0.109",
]
[[package]]
name = "diff"
version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8"
[[package]]
name = "dirs"
version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
dependencies = [
"dirs-sys",
]
[[package]]
name = "dirs-sys"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
dependencies = [
"libc",
"redox_users",
"winapi",
]
[[package]]
name = "dispatch"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b"
[[package]]
name = "doc-comment"
version = "0.3.3"
@ -717,54 +553,12 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650"
[[package]]
name = "ecolor"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f99fe3cac305af9d6d92971af60d0f7ea4d783201ef1673571567b6699964d9"
dependencies = [
"bytemuck",
]
[[package]]
name = "egui"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6412a21e0bde7c0918f7fb44bbbb86b5e1f88e63c026a4e747cc7af02f76dfbe"
dependencies = [
"ahash 0.8.3",
"epaint",
"nohash-hasher",
]
[[package]]
name = "egui-wgpu"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1678d8f30181193e78c15dddae16e6027c6058fdda9631950ade511b8a4b26f5"
dependencies = [
"bytemuck",
"epaint",
"tracing",
"type-map",
"wgpu",
]
[[package]]
name = "either"
version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91"
[[package]]
name = "emath"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8ecd80612937e0267909d5351770fe150004e24dab93954f69ca62eecd3f77e"
dependencies = [
"bytemuck",
]
[[package]]
name = "encoding_rs"
version = "0.8.32"
@ -774,27 +568,6 @@ dependencies = [
"cfg-if",
]
[[package]]
name = "enumflags2"
version = "0.7.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2"
dependencies = [
"enumflags2_derive",
"serde",
]
[[package]]
name = "enumflags2_derive"
version = "0.7.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.16",
]
[[package]]
name = "env_logger"
version = "0.10.0"
@ -808,22 +581,6 @@ dependencies = [
"termcolor",
]
[[package]]
name = "epaint"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12e78b5c58a1f7f621f9d546add2adce20636422c9b251e29f749e8a2f713c95"
dependencies = [
"ab_glyph",
"ahash 0.8.3",
"atomic_refcell",
"bytemuck",
"ecolor",
"emath",
"nohash-hasher",
"parking_lot",
]
[[package]]
name = "errno"
version = "0.3.1"
@ -845,12 +602,6 @@ dependencies = [
"libc",
]
[[package]]
name = "event-listener"
version = "2.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
[[package]]
name = "export-validator"
version = "0.1.0"
@ -943,15 +694,12 @@ version = "0.46.0"
dependencies = [
"bytemuck",
"chrono",
"egui",
"egui-wgpu",
"fj-interop",
"fj-math",
"getrandom",
"image",
"nalgebra",
"raw-window-handle",
"rfd",
"thiserror",
"tobj",
"tracing",
@ -1046,21 +794,6 @@ version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964"
[[package]]
name = "futures-lite"
version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce"
dependencies = [
"fastrand",
"futures-core",
"futures-io",
"memchr",
"parking",
"pin-project-lite",
"waker-fn",
]
[[package]]
name = "futures-macro"
version = "0.3.28"
@ -1258,12 +991,6 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
[[package]]
name = "hex"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
[[package]]
name = "hexf-parse"
version = "0.2.1"
@ -1621,15 +1348,6 @@ version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
[[package]]
name = "memoffset"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
dependencies = [
"autocfg",
]
[[package]]
name = "metal"
version = "0.24.0"
@ -1746,25 +1464,6 @@ dependencies = [
"tempfile",
]
[[package]]
name = "nix"
version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f3790c00a0150112de0f4cd161e3d7fc4b2d8a5542ffc35f099a2562aecb35c"
dependencies = [
"bitflags",
"cc",
"cfg-if",
"libc",
"memoffset",
]
[[package]]
name = "nohash-hasher"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451"
[[package]]
name = "num-bigint"
version = "0.4.3"
@ -1847,17 +1546,6 @@ dependencies = [
"objc_exception",
]
[[package]]
name = "objc-foundation"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9"
dependencies = [
"block",
"objc",
"objc_id",
]
[[package]]
name = "objc_exception"
version = "0.1.2"
@ -1867,15 +1555,6 @@ dependencies = [
"cc",
]
[[package]]
name = "objc_id"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b"
dependencies = [
"objc",
]
[[package]]
name = "object"
version = "0.30.3"
@ -1978,16 +1657,6 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "978aa494585d3ca4ad74929863093e87cac9790d81fe7aba2b3dc2890643a0fc"
[[package]]
name = "ordered-stream"
version = "0.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44630c059eacfd6e08bdaa51b1db2ce33119caa4ddc1235e923109aa5f25ccb1"
dependencies = [
"futures-core",
"pin-project-lite",
]
[[package]]
name = "os_pipe"
version = "0.9.2"
@ -2007,21 +1676,6 @@ dependencies = [
"winapi",
]
[[package]]
name = "owned_ttf_parser"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "706de7e2214113d63a8238d1910463cfce781129a6f263d13fdb09ff64355ba4"
dependencies = [
"ttf-parser",
]
[[package]]
name = "parking"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e"
[[package]]
name = "parking_lot"
version = "0.12.1"
@ -2159,34 +1813,6 @@ dependencies = [
"miniz_oxide 0.7.1",
]
[[package]]
name = "polling"
version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce"
dependencies = [
"autocfg",
"bitflags",
"cfg-if",
"concurrent-queue",
"libc",
"log",
"pin-project-lite",
"windows-sys 0.48.0",
]
[[package]]
name = "pollster"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2"
[[package]]
name = "ppv-lite86"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
name = "pretty_assertions"
version = "1.3.0"
@ -2199,16 +1825,6 @@ dependencies = [
"yansi",
]
[[package]]
name = "proc-macro-crate"
version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"
dependencies = [
"once_cell",
"toml_edit",
]
[[package]]
name = "proc-macro-error"
version = "1.0.4"
@ -2267,36 +1883,6 @@ dependencies = [
"proc-macro2",
]
[[package]]
name = "rand"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc",
"rand_chacha",
"rand_core",
]
[[package]]
name = "rand_chacha"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
"rand_core",
]
[[package]]
name = "rand_core"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
"getrandom",
]
[[package]]
name = "range-alloc"
version = "0.1.3"
@ -2333,17 +1919,6 @@ dependencies = [
"bitflags",
]
[[package]]
name = "redox_users"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
dependencies = [
"getrandom",
"redox_syscall 0.2.16",
"thiserror",
]
[[package]]
name = "regex"
version = "1.8.1"
@ -2423,31 +1998,6 @@ dependencies = [
"winreg",
]
[[package]]
name = "rfd"
version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7cb2988ec50c9bcdb0c012b89643a6094a35a785a37897211ee62e1639342f7b"
dependencies = [
"ashpd",
"async-io",
"block",
"dispatch",
"futures-util",
"js-sys",
"log",
"objc",
"objc-foundation",
"objc_id",
"pollster",
"raw-window-handle",
"urlencoding",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
"windows 0.44.0",
]
[[package]]
name = "ring"
version = "0.16.20"
@ -2674,17 +2224,6 @@ dependencies = [
"serde",
]
[[package]]
name = "serde_repr"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.16",
]
[[package]]
name = "serde_urlencoded"
version = "0.7.1"
@ -2697,21 +2236,6 @@ dependencies = [
"serde",
]
[[package]]
name = "sha1"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770"
dependencies = [
"sha1_smol",
]
[[package]]
name = "sha1_smol"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012"
[[package]]
name = "signal-hook-registry"
version = "1.4.1"
@ -3070,23 +2594,6 @@ dependencies = [
"tracing",
]
[[package]]
name = "toml_datetime"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622"
[[package]]
name = "toml_edit"
version = "0.19.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13"
dependencies = [
"indexmap",
"toml_datetime",
"winnow",
]
[[package]]
name = "tower"
version = "0.4.13"
@ -3174,12 +2681,6 @@ version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed"
[[package]]
name = "ttf-parser"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44dcf002ae3b32cd25400d6df128c5babec3927cd1eb7ce813cfff20eb6c3746"
[[package]]
name = "type-map"
version = "0.5.0"
@ -3195,16 +2696,6 @@ version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
[[package]]
name = "uds_windows"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce65604324d3cce9b966701489fbd0cf318cb1f7bd9dd07ac9a4ee6fb791930d"
dependencies = [
"tempfile",
"winapi",
]
[[package]]
name = "unicode-bidi"
version = "0.3.13"
@ -3256,12 +2747,6 @@ dependencies = [
"serde",
]
[[package]]
name = "urlencoding"
version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8db7427f936968176eaa7cdf81b7f98b980b18495ec28f1b5791ac3bfe3eea9"
[[package]]
name = "utf8parse"
version = "0.2.1"
@ -3280,12 +2765,6 @@ version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]]
name = "waker-fn"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca"
[[package]]
name = "want"
version = "0.3.0"
@ -3702,15 +3181,6 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
[[package]]
name = "winnow"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699"
dependencies = [
"memchr",
]
[[package]]
name = "winreg"
version = "0.10.1"
@ -3726,70 +3196,6 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec"
[[package]]
name = "zbus"
version = "2.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d8f1a037b2c4a67d9654dc7bdfa8ff2e80555bbefdd3c1833c1d1b27c963a6b"
dependencies = [
"async-broadcast",
"async-channel",
"async-executor",
"async-io",
"async-lock",
"async-recursion",
"async-task",
"async-trait",
"byteorder 1.4.3",
"derivative",
"dirs",
"enumflags2",
"event-listener",
"futures-core",
"futures-sink",
"futures-util",
"hex",
"lazy_static",
"nix",
"once_cell",
"ordered-stream",
"rand",
"serde",
"serde_repr",
"sha1",
"static_assertions",
"tracing",
"uds_windows",
"winapi",
"zbus_macros",
"zbus_names",
"zvariant",
]
[[package]]
name = "zbus_macros"
version = "2.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f8fb5186d1c87ae88cf234974c240671238b4a679158ad3b94ec465237349a6"
dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
"regex",
"syn 1.0.109",
]
[[package]]
name = "zbus_names"
version = "2.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82441e6033be0a741157a72951a3e4957d519698f3a824439cc131c5ba77ac2a"
dependencies = [
"serde",
"static_assertions",
"zvariant",
]
[[package]]
name = "zeroize"
version = "1.6.0"
@ -3807,41 +3213,3 @@ dependencies = [
"crossbeam-utils",
"flate2",
]
[[package]]
name = "zvariant"
version = "3.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5cb36cd95352132911c9c99fdcc1635de5c2c139bd34cbcf6dfb8350ee8ff6a7"
dependencies = [
"byteorder 1.4.3",
"enumflags2",
"libc",
"serde",
"static_assertions",
"zvariant_derive",
]
[[package]]
name = "zvariant_derive"
version = "3.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b34951e1ac64f3a1443fe7181256b9ed6a811a1631917566c3d5ca718d8cf33"
dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
"syn 1.0.109",
"zvariant_utils",
]
[[package]]
name = "zvariant_utils"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53b22993dbc4d128a17a3b6c92f1c63872dd67198537ee728d8b5d7c40640a8b"
dependencies = [
"proc-macro2",
"quote",
"syn 1.0.109",
]

View File

@ -11,10 +11,7 @@ keywords.workspace = true
categories.workspace = true
[dependencies]
bytemuck = "1.13.1"
chrono = "0.4.24"
egui = "0.21.0"
egui-wgpu = "0.21.0"
fj-interop.workspace = true
fj-math.workspace = true
nalgebra = "0.32.2"
@ -23,16 +20,15 @@ raw-window-handle = "0.5.2"
thiserror = "1.0.40"
tracing = "0.1.37"
[dependencies.bytemuck]
version = "1.13.1"
features = ["derive"]
[dependencies.image]
version = "0.24"
default-features = false
features = ["png", "jpeg"]
[dependencies.rfd]
version = "0.11.3"
default_features = false
features = ["xdg-portal"]
[dependencies.wgpu]
version = "0.15.1"
features = ["webgl"]

View File

@ -6,7 +6,6 @@ use wgpu::util::DeviceExt as _;
use crate::{
camera::Camera,
gui::Gui,
screen::{Screen, ScreenSize},
};
@ -213,10 +212,6 @@ impl Renderer {
})
}
pub(crate) fn init_gui(&self) -> Gui {
Gui::new(&self.device, self.surface_config.format)
}
/// Updates the geometry of the model being rendered.
pub fn update_geometry(&mut self, mesh: Vertices, lines: Vertices) {
self.geometries = Geometries::new(&self.device, &mesh, &lines);
@ -243,8 +238,6 @@ impl Renderer {
&mut self,
camera: &Camera,
config: &DrawConfig,
scale_factor: f32,
gui: &mut Gui,
) -> Result<(), DrawError> {
let aspect_ratio = f64::from(self.surface_config.width)
/ f64::from(self.surface_config.height);
@ -281,20 +274,6 @@ impl Renderer {
&wgpu::CommandEncoderDescriptor { label: None },
);
let screen_descriptor = egui_wgpu::renderer::ScreenDescriptor {
size_in_pixels: [
self.surface_config.width,
self.surface_config.height,
],
pixels_per_point: scale_factor,
};
let clipped_primitives = gui.prepare_draw(
&self.device,
&self.queue,
&mut encoder,
&screen_descriptor,
);
// Need this block here, as a render pass only takes effect once it's
// dropped.
{
@ -339,8 +318,6 @@ impl Renderer {
drawables.lines.draw(&mut render_pass);
}
}
gui.draw(&mut render_pass, &clipped_primitives, &screen_descriptor);
}
self.navigation_cube_renderer.draw(

View File

@ -1,365 +0,0 @@
//! GUI-related code
//!
//! If at some point you use `Painter` or similar and you get this error:
//!
//! `VK_ERROR_NATIVE_WINDOW_IN_USE_KHR`
//!
//! and/or:
//!
//! `wgpu_core::device: surface configuration failed: Native window is in use`
//!
//! it's *probably(?)* because the swap chain has already been created for the
//! window (e.g. by an integration) and *not* because of a regression of this
//! issue (probably):
//!
//! <https://github.com/gfx-rs/wgpu/issues/1492>
use std::path::PathBuf;
#[cfg(not(target_arch = "wasm32"))]
use std::env::current_dir;
#[cfg(not(target_arch = "wasm32"))]
use rfd::FileDialog;
use fj_math::{Aabb, Scalar};
use crate::{
graphics::{DrawConfig, DEPTH_FORMAT, SAMPLE_COUNT},
StatusReport,
};
/// The GUI
pub struct Gui {
context: egui::Context,
renderer: egui_wgpu::Renderer,
options: Options,
egui_output: Option<egui::FullOutput>,
}
impl Gui {
pub(crate) fn new(
device: &wgpu::Device,
texture_format: wgpu::TextureFormat,
) -> Self {
// The implementation of the integration with `egui` is likely to need
// to change "significantly" depending on what architecture approach is
// chosen going forward.
//
// The current implementation is somewhat complicated by virtue of
// "sitting somewhere in the middle" in relation to being neither a
// standalone integration nor fully using `egui` as a framework.
//
// This is a result of a combination of the current integration being
// "proof of concept" level, and using `egui-winit` & `egui-wgpu`, which
// are both relatively new additions to the core `egui` ecosystem.
//
// It is recommended to read the following for additional helpful
// context for choosing an architecture:
//
// - https://github.com/emilk/egui/blob/eeae485629fca24a81a7251739460b671e1420f7/README.md#what-is-the-difference-between-egui-and-eframe
// - https://github.com/emilk/egui/blob/eeae485629fca24a81a7251739460b671e1420f7/README.md#how-do-i-render-3d-stuff-in-an-egui-area
let context = egui::Context::default();
let renderer = egui_wgpu::Renderer::new(
device,
texture_format,
Some(DEPTH_FORMAT),
SAMPLE_COUNT,
);
Self {
context,
renderer,
options: Options::default(),
egui_output: None,
}
}
/// Access the egui context
pub fn context(&self) -> &egui::Context {
&self.context
}
pub(crate) fn update(
&mut self,
pixels_per_point: f32,
egui_input: egui::RawInput,
config: &mut DrawConfig,
aabb: &Aabb<3>,
line_drawing_available: bool,
state: GuiState,
) -> Option<PathBuf> {
self.context.set_pixels_per_point(pixels_per_point);
self.context.begin_frame(egui_input);
let bounding_box_size = {
let [x, y, z] = aabb.size().components.map(Scalar::into_f32);
format!("Model bounding box size:\n{x:0.1} {y:0.1} {z:0.1}")
};
egui::SidePanel::left("fj-left-panel").show(&self.context, |ui| {
ui.add_space(16.0);
ui.group(|ui| {
ui.checkbox(&mut config.draw_model, "Render model")
.on_hover_text_at_pointer("Toggle with 1");
ui.add_enabled(line_drawing_available, egui::Checkbox::new(&mut config.draw_mesh, "Render mesh"))
.on_hover_text_at_pointer("Toggle with 2")
.on_disabled_hover_text(
"Rendering device does not have line rendering feature support",
);
ui.add_enabled(line_drawing_available, egui::Checkbox::new(&mut config.draw_debug, "Render debug"))
.on_hover_text_at_pointer("Toggle with 3")
.on_disabled_hover_text(
"Rendering device does not have line rendering feature support"
);
ui.add_space(16.0);
ui.strong(bounding_box_size);
});
ui.add_space(16.0);
{
ui.group(|ui| {
ui.checkbox(
&mut self.options.show_settings_ui,
"Show egui settings UI",
);
if self.options.show_settings_ui {
self.context.settings_ui(ui);
}
});
ui.add_space(16.0);
ui.group(|ui| {
ui.checkbox(
&mut self.options.show_inspection_ui,
"Show egui inspection UI",
);
if self.options.show_inspection_ui {
ui.indent("indent-inspection-ui", |ui| {
self.context.inspection_ui(ui);
});
}
});
}
ui.add_space(16.0);
{
//
// Originally this was only meant to be a simple demonstration
// of the `egui` `trace!()` macro...
//
// ...but it seems the trace feature can't be enabled
// separately from the layout debug feature, which all
// gets a bit messy...
//
// ...so, this instead shows one possible way to implement
// "trace only" style debug text on hover.
//
ui.group(|ui| {
let label_text = format!(
"Show debug text demo.{}",
if self.options.show_debug_text_example {
" (Hover me.)"
} else {
""
}
);
ui.style_mut().wrap = Some(false);
if ui
.checkbox(
&mut self.options.show_debug_text_example,
label_text,
)
.hovered()
&& self.options.show_debug_text_example
{
let hover_pos =
ui.input(|input| input.pointer.hover_pos().unwrap_or_default());
ui.painter().debug_text(
hover_pos,
egui::Align2::LEFT_TOP,
egui::Color32::DEBUG_COLOR,
format!("{:#?}", &config),
);
}
});
}
ui.add_space(16.0);
{
//
// Demonstration of the `egui` layout debug functionality.
//
ui.group(|ui| {
//
if ui
.checkbox(
&mut self.options.show_layout_debug_on_hover,
"Show layout debug on hover.",
)
.changed()
{
ui.ctx().set_debug_on_hover(
self.options.show_layout_debug_on_hover,
);
}
ui.scope(|ui| {
if self.options.show_trace {
egui::trace!(ui, format!("{:?}", &config));
}
});
ui.indent("indent-show-trace", |ui| {
ui.set_enabled(
self.options.show_layout_debug_on_hover,
);
ui.checkbox(
&mut self.options.show_trace,
"Also show egui trace.",
);
//
});
});
}
ui.add_space(16.0);
});
egui::Window::new("Status")
.min_width(400.0)
.min_height(200.0)
.collapsible(true)
.resizable(true)
.show(&self.context, |ui| {
egui::ScrollArea::both().show(ui, |ui| {
ui.add(egui::Label::new(
egui::RichText::new(state.status.status())
.monospace()
.color(egui::Color32::WHITE),
))
});
});
let mut new_model_path = None;
if !state.model_available {
egui::Area::new("ask-model")
.anchor(egui::Align2::CENTER_CENTER, [0_f32, -5_f32])
.show(&self.context, |ui| {
ui.vertical_centered(|ui| {
ui.label(egui::RichText::new(
"No model selected please choose a model to view.",
).color(egui::Color32::BLACK)
.background_color(egui::Color32::WHITE));
if ui
.button(egui::RichText::new("Pick a model"))
.clicked()
{
new_model_path = show_file_dialog();
}
})
});
}
// Even though the output is not used here, `end_frame` must be called
// at the end of this function. If we don't, and we get into a situation
// where `update` is called, but `prepare_draw` isn't for a while, the
// context will keep accumulating output.
//
// That might end up being too much output to handle. This can lead to
// a crash, because a index/vertex buffer gets too full.
self.egui_output = Some(self.context.end_frame());
new_model_path
}
pub(crate) fn prepare_draw(
&mut self,
device: &wgpu::Device,
queue: &wgpu::Queue,
encoder: &mut wgpu::CommandEncoder,
screen_descriptor: &egui_wgpu::renderer::ScreenDescriptor,
) -> Vec<egui::ClippedPrimitive> {
let Some(egui_output) = self.egui_output.take() else {
return Vec::new()
};
let clipped_primitives = self.context.tessellate(egui_output.shapes);
for (id, image_delta) in &egui_output.textures_delta.set {
self.renderer
.update_texture(device, queue, *id, image_delta);
}
for id in &egui_output.textures_delta.free {
self.renderer.free_texture(id);
}
self.renderer.update_buffers(
device,
queue,
encoder,
&clipped_primitives,
screen_descriptor,
);
clipped_primitives
}
pub(crate) fn draw<'s: 'r, 'r>(
&'s mut self,
render_pass: &mut wgpu::RenderPass<'r>,
clipped_primitives: &[egui::ClippedPrimitive],
screen_descriptor: &egui_wgpu::renderer::ScreenDescriptor,
) {
self.renderer.render(
render_pass,
clipped_primitives,
screen_descriptor,
);
}
}
fn show_file_dialog() -> Option<PathBuf> {
#[cfg(not(target_arch = "wasm32"))]
return FileDialog::new()
.set_directory(current_dir().unwrap_or_else(|_| PathBuf::from("/")))
.pick_folder();
#[cfg(target_arch = "wasm32")]
todo!("Picking folders does not work on wasm32")
}
impl std::fmt::Debug for Gui {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("Gui {}")
}
}
#[derive(Default)]
pub struct Options {
pub show_trace: bool,
pub show_layout_debug_on_hover: bool,
pub show_debug_text_example: bool,
pub show_settings_ui: bool,
pub show_inspection_ui: bool,
}
/// The current status of the GUI
pub struct GuiState<'a> {
/// Reference to the status messages
pub status: &'a StatusReport,
/// Indicates whether a model is currently available
pub model_available: bool,
}

View File

@ -17,7 +17,6 @@
mod assets;
mod camera;
mod graphics;
mod gui;
mod input;
mod screen;
mod status_report;
@ -26,7 +25,6 @@ mod viewer;
pub use self::{
camera::Camera,
graphics::{DrawConfig, Renderer, RendererInitError},
gui::{Gui, GuiState},
input::{InputEvent, InputHandler},
screen::{NormalizedScreenPosition, Screen, ScreenSize},
status_report::StatusReport,

View File

@ -1,13 +1,10 @@
use std::path::PathBuf;
use fj_interop::processed_shape::ProcessedShape;
use fj_math::Aabb;
use tracing::warn;
use crate::{
camera::FocusPoint, gui::Gui, Camera, DrawConfig, GuiState, InputEvent,
InputHandler, NormalizedScreenPosition, Renderer, RendererInitError,
Screen, ScreenSize,
camera::FocusPoint, Camera, DrawConfig, InputEvent, InputHandler,
NormalizedScreenPosition, Renderer, RendererInitError, Screen, ScreenSize,
};
/// The Fornjot model viewer
@ -24,9 +21,6 @@ pub struct Viewer {
/// The focus point
pub focus_point: Option<FocusPoint>,
/// The GUI
pub gui: Gui,
/// The input handler
pub input_handler: InputHandler,
@ -41,14 +35,12 @@ impl Viewer {
/// Construct a new instance of `Viewer`
pub async fn new(screen: &impl Screen) -> Result<Self, RendererInitError> {
let renderer = Renderer::new(screen).await?;
let gui = renderer.init_gui();
Ok(Self {
camera: Camera::default(),
cursor: None,
draw_config: DrawConfig::default(),
focus_point: None,
gui,
input_handler: InputHandler::default(),
renderer,
shape: None,
@ -114,12 +106,7 @@ impl Viewer {
}
/// Draw the graphics
pub fn draw(
&mut self,
pixels_per_point: f32,
egui_input: egui::RawInput,
gui_state: GuiState,
) -> Option<PathBuf> {
pub fn draw(&mut self) {
let aabb = self
.shape
.as_ref()
@ -128,24 +115,8 @@ impl Viewer {
self.camera.update_planes(&aabb);
let new_model_path = self.gui.update(
pixels_per_point,
egui_input,
&mut self.draw_config,
&aabb,
self.renderer.is_line_drawing_available(),
gui_state,
);
if let Err(err) = self.renderer.draw(
&self.camera,
&self.draw_config,
pixels_per_point,
&mut self.gui,
) {
if let Err(err) = self.renderer.draw(&self.camera, &self.draw_config) {
warn!("Draw error: {}", err);
}
new_model_path
}
}