diff --git a/Cargo.lock b/Cargo.lock index 747bf455..a23c45a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -519,7 +519,6 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd310426290cec560221f9750c2f4484be4a8eeea7de3483c423329b465c40e" dependencies = [ - "bevy_dylib", "bevy_internal 0.18.1", ] @@ -630,7 +629,7 @@ dependencies = [ "downcast-rs 2.0.2", "log", "thiserror 2.0.18", - "variadics_please", + "variadics_please 1.1.0", "wasm-bindgen", "web-sys", ] @@ -653,7 +652,7 @@ dependencies = [ "downcast-rs 2.0.2", "log", "thiserror 2.0.18", - "variadics_please", + "variadics_please 1.1.0", "wasm-bindgen", "web-sys", ] @@ -889,15 +888,6 @@ dependencies = [ "sysinfo", ] -[[package]] -name = "bevy_dylib" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f142f72bbbc1a61338bf6da5dc7cf6dcf223683b9d53bcd635ebff4bfeb5308f" -dependencies = [ - "bevy_internal 0.18.1", -] - [[package]] name = "bevy_easings" version = "0.18.0" @@ -942,7 +932,7 @@ dependencies = [ "serde", "smallvec", "thiserror 2.0.18", - "variadics_please", + "variadics_please 1.1.0", ] [[package]] @@ -970,7 +960,7 @@ dependencies = [ "slotmap", "smallvec", "thiserror 2.0.18", - "variadics_please", + "variadics_please 1.1.0", ] [[package]] @@ -1009,23 +999,23 @@ dependencies = [ [[package]] name = "bevy_enhanced_input" -version = "0.24.3" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd528e0238ebc77e1e4737e55aa8f51188b7405eebc281f2498a627ae51a2e3" +checksum = "c8d637e6cecb97d800bc53035643bbee59d2a2adf433a4617fbeb4d2734d3a41" dependencies = [ "bevy", "bevy_enhanced_input_macros", "bitflags 2.11.1", "log", "smallvec", - "variadics_please", + "variadics_please 2.0.0", ] [[package]] name = "bevy_enhanced_input_macros" -version = "0.24.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ee73d4e362e2eb15ac58331c94e5076f6b5065761f008ca7dc930d446d205b" +checksum = "6edfb436db5809c97042e5e7a0f2c1bf5ea397a256da1089f1a43258c61a9240" dependencies = [ "proc-macro2", "quote", @@ -1441,12 +1431,12 @@ dependencies = [ "glam 0.29.3", "itertools 0.14.0", "libm", - "rand 0.8.5", + "rand 0.8.6", "rand_distr 0.4.3", "serde", "smallvec", "thiserror 2.0.18", - "variadics_please", + "variadics_please 1.1.0", ] [[package]] @@ -1466,7 +1456,7 @@ dependencies = [ "rand_distr 0.5.1", "serde", "thiserror 2.0.18", - "variadics_please", + "variadics_please 1.1.0", ] [[package]] @@ -1675,7 +1665,7 @@ dependencies = [ "smol_str", "thiserror 2.0.18", "uuid", - "variadics_please", + "variadics_please 1.1.0", "wgpu-types 24.0.0", ] @@ -1704,7 +1694,7 @@ dependencies = [ "smol_str", "thiserror 2.0.18", "uuid", - "variadics_please", + "variadics_please 1.1.0", "wgpu-types 27.0.1", ] @@ -1804,7 +1794,7 @@ dependencies = [ "smallvec", "thiserror 2.0.18", "tracing", - "variadics_please", + "variadics_please 1.1.0", "wasm-bindgen", "web-sys", "wgpu", @@ -1866,9 +1856,9 @@ dependencies = [ [[package]] name = "bevy_rerecast_editor_integration" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "159a74df828813210ac43df3a3055cfe1a42264753af3fe9bebbcce5916fa225" +checksum = "ece187e9c3b25f34e73a9ecb437efe57f15956cdc2d043f1fea518d1d1e4d121" dependencies = [ "anyhow", "base64", @@ -1890,7 +1880,6 @@ dependencies = [ "bevy_tasks 0.18.1", "bevy_transform 0.18.1", "bincode", - "cosmic-text 0.14.2", "flate2", "rerecast", "serde", @@ -2041,7 +2030,7 @@ dependencies = [ "bevy_state_macros", "bevy_utils 0.18.1", "log", - "variadics_please", + "variadics_please 1.1.0", ] [[package]] @@ -2091,7 +2080,7 @@ dependencies = [ "crossbeam-queue", "derive_more 2.1.1", "futures-lite", - "heapless 0.9.2", + "heapless 0.9.3", "pin-project", ] @@ -2112,7 +2101,7 @@ dependencies = [ "bevy_platform 0.18.1", "bevy_reflect 0.18.1", "bevy_utils 0.18.1", - "cosmic-text 0.16.0", + "cosmic-text", "serde", "smallvec", "sys-locale", @@ -2266,7 +2255,7 @@ checksum = "390917ea8e68505bd94f29c4ce8ec337a011b5ccd48a3ac7378961ca6c59de45" dependencies = [ "arboard", "bevy", - "cosmic-text 0.16.0", + "cosmic-text", "cosmic_undo_2", "once_cell", "sys-locale", @@ -2408,7 +2397,7 @@ dependencies = [ "bitflags 2.11.1", "cexpr", "clang-sys", - "itertools 0.13.0", + "itertools 0.10.5", "proc-macro2", "quote", "regex", @@ -2450,9 +2439,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.8.4" +version = "1.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d2d5991425dfd0785aed03aedcf0b321d61975c9b5b3689c774a2610ae0b51e" +checksum = "0aa83c34e62843d924f905e0f5c866eb1dd6545fc4d719e803d9ba6030371fce" dependencies = [ "arrayref", "arrayvec", @@ -2596,9 +2585,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.60" +version = "1.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20" +checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98" dependencies = [ "find-msvc-tools", "jobserver", @@ -2782,11 +2771,12 @@ checksum = "32b13ea120a812beba79e34316b3942a857c86ec1593cb34f27bb28272ce2cca" [[package]] name = "const_format" -version = "0.2.35" +version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7faa7469a93a566e9ccc1c73fe783b4a65c274c5ace346038dca9c39fe0030ad" +checksum = "4481a617ad9a412be3b97c5d403fef8ed023103368908b9c50af598ff467cc1e" dependencies = [ "const_format_proc_macros", + "konst", ] [[package]] @@ -2929,29 +2919,6 @@ dependencies = [ "bindgen 0.72.1", ] -[[package]] -name = "cosmic-text" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da46a9d5a8905cc538a4a5bceb6a4510de7a51049c5588c0114efce102bcbbe8" -dependencies = [ - "bitflags 2.11.1", - "fontdb 0.16.2", - "log", - "rangemap", - "rustc-hash 1.1.0", - "rustybuzz", - "self_cell", - "smol_str", - "swash", - "sys-locale", - "ttf-parser 0.21.1", - "unicode-bidi", - "unicode-linebreak", - "unicode-script", - "unicode-segmentation", -] - [[package]] name = "cosmic-text" version = "0.16.0" @@ -2959,7 +2926,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4cadaea21e24c49c0c82116f2b465ae6a49d63c90e428b0f8d9ae1f638ac91f" dependencies = [ "bitflags 2.11.1", - "fontdb 0.23.0", + "fontdb", "harfrust", "linebender_resource_handle", "log", @@ -3145,7 +3112,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0b1fab2ae45819af2d0731d60f2afe17227ebb1a1538a236da84c93e9a60162" dependencies = [ "dispatch2", - "nix 0.31.2", + "nix 0.31.3", "windows-sys 0.61.2", ] @@ -3163,9 +3130,9 @@ checksum = "0c87e182de0887fd5361989c677c4e8f5000cd9491d6d563161a8f3a5519fc7f" [[package]] name = "data-encoding" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" +checksum = "a4ae5f15dda3c708c0ade84bfee31ccab44a3da4f88015ed22f63732abe300c8" [[package]] name = "derivative" @@ -3234,15 +3201,15 @@ dependencies = [ [[package]] name = "dioxus-cli-config" -version = "0.7.4" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86a13d42c5defcea333bdbae1dc5d64d078acd0fda1d8a1441c37e06be5146e3" +checksum = "c000f584ddf608e2b272b3074bf11512a474eeeb2eb85a1915f276ce5c4a8615" [[package]] name = "dioxus-core" -version = "0.7.4" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb3dd61889e6a09daec93d44db86047fb8e6603beedcf9351b8528582254e075" +checksum = "45887100ff0cf89abeb8b659808294fda48cd53f3b424e36407dedffcfea830b" dependencies = [ "anyhow", "const_format", @@ -3262,15 +3229,15 @@ dependencies = [ [[package]] name = "dioxus-core-types" -version = "0.7.4" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b99d7d199aad72431b549759550002e7d72c8a257eba500dca9fbdb2122de103" +checksum = "36963eab106b169737762f9cd5ee5fd97f585989dcb2d8e30a596e97a6999009" [[package]] name = "dioxus-devtools" -version = "0.7.4" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d27e7212436a581ce058d7554f1383916bd18a68ebd6015b0b4c2e9ecb0d5535" +checksum = "2349cedbdf1b429df1f1bea61fdee0ad3dae7b2548eedfbeca82710122a57da0" dependencies = [ "dioxus-cli-config", "dioxus-core", @@ -3286,9 +3253,9 @@ dependencies = [ [[package]] name = "dioxus-devtools-types" -version = "0.7.4" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aa24ed651b97e0b423270bf07a0f1b7dc0e0fa1f1dc26407cd2a118d6bf9de5" +checksum = "0ab9b0f7565d1916b70915f59b89ea8054ef0a9d67a364a32bbee68ef5f3818d" dependencies = [ "dioxus-core", "serde", @@ -3297,9 +3264,9 @@ dependencies = [ [[package]] name = "dioxus-signals" -version = "0.7.4" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "409bf65d243443416650945f22cd6caf2a6bb13ae0347a50ec5852adb1961072" +checksum = "3705754f5e043deec9fc7af0d159f18e5b21c02c47d255c7e477f31368f0b6d2" dependencies = [ "dioxus-core", "futures-channel", @@ -3442,9 +3409,9 @@ dependencies = [ [[package]] name = "either" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" [[package]] name = "ena" @@ -3595,23 +3562,9 @@ checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" [[package]] name = "fax" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f05de7d48f37cd6730705cbca900770cab77a89f413d23e100ad7fad7795a0ab" -dependencies = [ - "fax_derive", -] - -[[package]] -name = "fax_derive" -version = "0.2.0" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0aca10fb742cb43f9e7bb8467c91aa9bcb8e3ffbc6a6f7389bb93ffc920577d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] +checksum = "caf1079563223d5d59d83c85886a56e586cfd5c1a26292e971a0fa266531ac5a" [[package]] name = "fdeflate" @@ -3698,19 +3651,6 @@ dependencies = [ "roxmltree", ] -[[package]] -name = "fontdb" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0299020c3ef3f60f526a4f64ab4a3d4ce116b1acbf24cdd22da0068e5d81dc3" -dependencies = [ - "log", - "memmap2", - "slotmap", - "tinyvec", - "ttf-parser 0.20.0", -] - [[package]] name = "fontdb" version = "0.23.0" @@ -3722,7 +3662,7 @@ dependencies = [ "memmap2", "slotmap", "tinyvec", - "ttf-parser 0.25.1", + "ttf-parser", ] [[package]] @@ -3838,9 +3778,9 @@ dependencies = [ [[package]] name = "generational-box" -version = "0.7.4" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ede46ff252793f9b6ef752c506ba8600c69d73cad2ef9bbf2e6dee85019a3bc" +checksum = "8cd0d825b8d339701ad330dbcd6399519ced4d143484954daf6e3185dace4f77" dependencies = [ "parking_lot", "tracing", @@ -3941,7 +3881,7 @@ dependencies = [ "vec_map", "wasm-bindgen", "web-sys", - "windows 0.62.2", + "windows 0.58.0", ] [[package]] @@ -4127,9 +4067,9 @@ dependencies = [ [[package]] name = "grid" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9e2d4c0a8296178d8802098410ca05d86b17a10bb5ab559b3fb404c1f948220" +checksum = "b40ca9252762c466af32d0b1002e91e4e1bc5398f77455e55474deb466355ff5" [[package]] name = "guillotiere" @@ -4201,9 +4141,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.17.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" [[package]] name = "heapless" @@ -4218,9 +4158,9 @@ dependencies = [ [[package]] name = "heapless" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2af2455f757db2b292a9b1768c4b70186d443bcb3b316252d6b540aec1cd89ed" +checksum = "25ba4bd83f9415b58b4ed8dc5714c76e626a105be4646c02630ad730ad3b5aa4" dependencies = [ "hash32", "portable-atomic", @@ -4428,9 +4368,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" dependencies = [ "icu_normalizer", "icu_properties", @@ -4457,7 +4397,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown 0.17.0", + "hashbrown 0.17.1", "serde", "serde_core", ] @@ -4555,12 +4495,35 @@ dependencies = [ "arboard", "avian3d", "base64", - "bevy", + "bevy_app 0.18.1", + "bevy_asset", + "bevy_color", + "bevy_derive 0.18.1", + "bevy_ecs 0.18.1", "bevy_enhanced_input", + "bevy_feathers", + "bevy_gizmos", + "bevy_image", "bevy_infinite_grid", + "bevy_input 0.18.1", + "bevy_input_focus", + "bevy_light", + "bevy_log 0.18.1", + "bevy_math 0.18.1", + "bevy_mesh", "bevy_monitors", + "bevy_picking", + "bevy_platform 0.18.1", + "bevy_reflect 0.18.1", + "bevy_remote", + "bevy_render", "bevy_rerecast", "bevy_simple_subsecond_system", + "bevy_tasks 0.18.1", + "bevy_ui", + "bevy_ui_widgets", + "bevy_utils 0.18.1", + "bevy_window", "bincode", "ctrlc", "dirs", @@ -4586,6 +4549,7 @@ dependencies = [ "jackdaw_terrain", "jackdaw_widgets", "notify", + "parry3d", "pathdiff", "regex", "rfd", @@ -4599,7 +4563,21 @@ dependencies = [ name = "jackdaw_animation" version = "0.4.1" dependencies = [ - "bevy", + "bevy_animation", + "bevy_app 0.18.1", + "bevy_asset", + "bevy_color", + "bevy_ecs 0.18.1", + "bevy_gltf", + "bevy_input 0.18.1", + "bevy_log 0.18.1", + "bevy_math 0.18.1", + "bevy_picking", + "bevy_reflect 0.18.1", + "bevy_text", + "bevy_transform 0.18.1", + "bevy_ui", + "bevy_utils 0.18.1", "jackdaw_commands", "jackdaw_feathers", "jackdaw_jsn", @@ -4612,8 +4590,9 @@ dependencies = [ name = "jackdaw_api" version = "0.4.1" dependencies = [ - "bevy", + "bevy_ecs 0.18.1", "bevy_enhanced_input", + "bevy_feathers", "jackdaw_api_internal", "jackdaw_api_macros", "jackdaw_commands", @@ -4627,8 +4606,15 @@ dependencies = [ name = "jackdaw_api_internal" version = "0.4.1" dependencies = [ - "bevy", + "bevy_app 0.18.1", + "bevy_derive 0.18.1", + "bevy_ecs 0.18.1", "bevy_enhanced_input", + "bevy_log 0.18.1", + "bevy_platform 0.18.1", + "bevy_reflect 0.18.1", + "bevy_state", + "bevy_utils 0.18.1", "dirs", "jackdaw_api_macros", "jackdaw_commands", @@ -4652,14 +4638,29 @@ name = "jackdaw_avian_integration" version = "0.4.1" dependencies = [ "avian3d", - "bevy", + "bevy_app 0.18.1", + "bevy_camera", + "bevy_color", + "bevy_ecs 0.18.1", + "bevy_gizmos", + "bevy_math 0.18.1", + "bevy_platform 0.18.1", + "bevy_reflect 0.18.1", + "bevy_time 0.18.1", + "bevy_transform 0.18.1", ] [[package]] name = "jackdaw_camera" version = "0.4.1" dependencies = [ - "bevy", + "bevy_app 0.18.1", + "bevy_camera", + "bevy_ecs 0.18.1", + "bevy_input 0.18.1", + "bevy_math 0.18.1", + "bevy_time 0.18.1", + "bevy_transform 0.18.1", "jackdaw_commands", ] @@ -4667,7 +4668,8 @@ dependencies = [ name = "jackdaw_commands" version = "0.4.1" dependencies = [ - "bevy", + "bevy_ecs 0.18.1", + "bevy_input 0.18.1", "serde", ] @@ -4675,7 +4677,9 @@ dependencies = [ name = "jackdaw_csg" version = "0.4.1" dependencies = [ - "bevy", + "bevy_asset", + "bevy_math 0.18.1", + "bevy_pbr", "jackdaw_geometry", "jackdaw_jsn", "manifold-csg", @@ -4694,10 +4698,32 @@ dependencies = [ name = "jackdaw_feathers" version = "0.4.1" dependencies = [ - "bevy", + "bevy_app 0.18.1", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_derive 0.18.1", "bevy_easings", + "bevy_ecs 0.18.1", + "bevy_feathers", + "bevy_input 0.18.1", + "bevy_input_focus", + "bevy_internal 0.18.1", + "bevy_log 0.18.1", + "bevy_math 0.18.1", "bevy_monitors", + "bevy_picking", + "bevy_reflect 0.18.1", + "bevy_render", + "bevy_shader", + "bevy_text", + "bevy_time 0.18.1", + "bevy_ui", + "bevy_ui_render", "bevy_ui_text_input", + "bevy_ui_widgets", + "bevy_utils 0.18.1", + "bevy_window", "jackdaw_fuzzy", "jackdaw_jsn", "jackdaw_widgets", @@ -4715,7 +4741,13 @@ dependencies = [ name = "jackdaw_geometry" version = "0.4.1" dependencies = [ - "bevy", + "bevy_app 0.18.1", + "bevy_asset", + "bevy_ecs 0.18.1", + "bevy_math 0.18.1", + "bevy_pbr", + "bevy_reflect 0.18.1", + "bevy_utils 0.18.1", "bitflags 2.11.1", "cdt", "earcutr", @@ -4728,7 +4760,22 @@ dependencies = [ name = "jackdaw_jsn" version = "0.4.1" dependencies = [ - "bevy", + "bevy_app 0.18.1", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_derive 0.18.1", + "bevy_ecs 0.18.1", + "bevy_image", + "bevy_log 0.18.1", + "bevy_math 0.18.1", + "bevy_mesh", + "bevy_pbr", + "bevy_reflect 0.18.1", + "bevy_render", + "bevy_scene", + "bevy_transform 0.18.1", + "bevy_utils 0.18.1", "jackdaw_geometry", "serde", "serde_json", @@ -4739,7 +4786,9 @@ dependencies = [ name = "jackdaw_loader" version = "0.4.1" dependencies = [ - "bevy", + "bevy_app 0.18.1", + "bevy_ecs 0.18.1", + "bevy_log 0.18.1", "dirs", "jackdaw_api_internal", "libloading", @@ -4749,9 +4798,26 @@ dependencies = [ name = "jackdaw_node_graph" version = "0.4.1" dependencies = [ - "bevy", + "bevy_app 0.18.1", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_ecs 0.18.1", "bevy_enhanced_input", + "bevy_input 0.18.1", + "bevy_internal 0.18.1", + "bevy_log 0.18.1", + "bevy_math 0.18.1", "bevy_monitors", + "bevy_picking", + "bevy_reflect 0.18.1", + "bevy_render", + "bevy_shader", + "bevy_text", + "bevy_ui", + "bevy_ui_render", + "bevy_utils 0.18.1", + "bevy_window", "jackdaw_commands", "jackdaw_feathers", "jackdaw_jsn", @@ -4763,7 +4829,21 @@ dependencies = [ name = "jackdaw_panels" version = "0.4.1" dependencies = [ - "bevy", + "bevy_app 0.18.1", + "bevy_asset", + "bevy_color", + "bevy_ecs 0.18.1", + "bevy_feathers", + "bevy_input 0.18.1", + "bevy_input_focus", + "bevy_log 0.18.1", + "bevy_math 0.18.1", + "bevy_picking", + "bevy_text", + "bevy_time 0.18.1", + "bevy_ui", + "bevy_utils 0.18.1", + "bevy_window", "jackdaw_feathers", "jackdaw_widgets", "lucide-icons", @@ -4775,7 +4855,13 @@ dependencies = [ name = "jackdaw_remote" version = "0.4.1" dependencies = [ - "bevy", + "bevy_app 0.18.1", + "bevy_asset", + "bevy_ecs 0.18.1", + "bevy_log 0.18.1", + "bevy_reflect 0.18.1", + "bevy_remote", + "bevy_transform 0.18.1", "serde", "serde_json", ] @@ -4784,7 +4870,18 @@ dependencies = [ name = "jackdaw_runtime" version = "0.4.1" dependencies = [ - "bevy", + "bevy_app 0.18.1", + "bevy_asset", + "bevy_camera", + "bevy_derive 0.18.1", + "bevy_ecs 0.18.1", + "bevy_image", + "bevy_internal 0.18.1", + "bevy_log 0.18.1", + "bevy_math 0.18.1", + "bevy_reflect 0.18.1", + "bevy_scene", + "bevy_transform 0.18.1", "jackdaw_geometry", "jackdaw_jsn", "serde", @@ -4804,7 +4901,6 @@ dependencies = [ name = "jackdaw_sdk" version = "0.4.1" dependencies = [ - "bevy", "jackdaw_api", ] @@ -4821,9 +4917,15 @@ dependencies = [ name = "jackdaw_widgets" version = "0.4.1" dependencies = [ - "bevy", + "bevy_app 0.18.1", + "bevy_ecs 0.18.1", "bevy_enhanced_input", + "bevy_feathers", + "bevy_input 0.18.1", "bevy_monitors", + "bevy_picking", + "bevy_ui", + "bevy_window", ] [[package]] @@ -4912,9 +5014,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.95" +version = "0.3.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca" +checksum = "67df7112613f8bfd9150013a0314e196f4800d3201ae742489d999db2f979f08" dependencies = [ "cfg-if", "futures-util", @@ -4939,6 +5041,21 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" +[[package]] +name = "konst" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128133ed7824fcd73d6e7b17957c5eb7bacb885649bd8c69708b2331a10bcefb" +dependencies = [ + "konst_macro_rules", +] + +[[package]] +name = "konst_macro_rules" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37" + [[package]] name = "kqueue" version = "1.1.1" @@ -4951,11 +5068,11 @@ dependencies = [ [[package]] name = "kqueue-sys" -version = "1.0.4" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" +checksum = "07293a4e297ac234359b510362495713f75ea345d5307140414f20c69ffeb087" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.11.1", "libc", ] @@ -4993,9 +5110,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.185" +version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "libloading" @@ -5022,7 +5139,7 @@ dependencies = [ "bitflags 2.11.1", "libc", "plain", - "redox_syscall 0.7.4", + "redox_syscall 0.7.5", ] [[package]] @@ -5225,6 +5342,12 @@ dependencies = [ "pxfm", ] +[[package]] +name = "mutants" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc0287524726960e07b119cebd01678f852f147742ae0d925e6a520dca956126" + [[package]] name = "naga" version = "27.0.3" @@ -5342,9 +5465,9 @@ dependencies = [ [[package]] name = "nix" -version = "0.31.2" +version = "0.31.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d0705320c1e6ba1d912b5e37cf18071b6c2e9b7fa8215a1e8a7651966f5d3" +checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" dependencies = [ "bitflags 2.11.1", "cfg-if", @@ -5359,7 +5482,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6da45c8333f2e152fc665d78a380be060eb84fad8ca4c9f7ac8ca29216cff0cc" dependencies = [ "num-traits", - "rand 0.8.5", + "rand 0.8.6", "rand_xorshift", ] @@ -5875,9 +5998,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "orbclient" -version = "0.3.51" +version = "0.3.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59aed3b33578edcfa1bc96a321d590d31832b6ad55a26f0313362ce687e9abd6" +checksum = "a570f6bca41d29acb2139229a7c873ec99bc9a313bd10804081d89bfac8ff329" dependencies = [ "libc", "libredox", @@ -5918,7 +6041,7 @@ version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" dependencies = [ - "ttf-parser 0.25.1", + "ttf-parser", ] [[package]] @@ -5952,9 +6075,9 @@ dependencies = [ [[package]] name = "parry3d" -version = "0.26.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e04d21bda5249438b5695e7f08f1655524a6025bcdb186c324b7a66562f2d61" +checksum = "8598fd0fa548d469b6ca4f9e90b446434fb879c12494a91e41c341d8f0f558d8" dependencies = [ "approx", "arrayvec", @@ -6017,18 +6140,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.11" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.11" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" dependencies = [ "proc-macro2", "quote", @@ -6133,9 +6256,9 @@ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" [[package]] name = "portable-atomic-util" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "091397be61a01d4be58e7841595bd4bfedb15f1cd54977d79b8271e94ed799a3" +checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618" dependencies = [ "portable-atomic", ] @@ -6225,15 +6348,15 @@ dependencies = [ [[package]] name = "profiling" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773" +checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5" [[package]] name = "pxfm" -version = "0.1.28" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a041e753da8b807c9255f28de81879c78c876392ff2469cde94799b2896b9d" +checksum = "e0c5ccf5294c6ccd63a74f1565028353830a9c2f5eb0c682c355c471726a6e3f" [[package]] name = "quick-error" @@ -6243,9 +6366,9 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quick-xml" -version = "0.39.2" +version = "0.39.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958f21e8e7ceb5a1aa7fa87fab28e7c75976e0bfe7e23ff069e0a260f894067d" +checksum = "cdcc8dd4e2f670d309a5f0e83fe36dfdc05af317008fea29144da1a2ac858e5e" dependencies = [ "memchr", ] @@ -6279,9 +6402,9 @@ checksum = "019b4b213425016d7d84a153c4c73afb0946fbb4840e4eece7ba8848b9d6da22" [[package]] name = "rand" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" dependencies = [ "libc", "rand_chacha 0.3.1", @@ -6343,7 +6466,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" dependencies = [ "num-traits", - "rand 0.8.5", + "rand 0.8.6", ] [[package]] @@ -6464,9 +6587,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f450ad9c3b1da563fb6948a8e0fb0fb9269711c9c73d9ea1de5058c79c8d643a" +checksum = "4666a1a60d8412eab19d94f6d13dcc9cea0a5ef4fdf6a5db306537413c661b1b" dependencies = [ "bitflags 2.11.1", ] @@ -6676,9 +6799,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.38" +version = "0.23.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f9466fb2c14ea04357e91413efb882e2a6d4a406e625449bc0a5d360d53a21" +checksum = "ef86cd5876211988985292b91c96a8f2d298df24e75989a43a3c73f2d4d8168b" dependencies = [ "log", "once_cell", @@ -6691,18 +6814,18 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" +checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9" dependencies = [ "zeroize", ] [[package]] name = "rustls-webpki" -version = "0.103.12" +version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8279bb85272c9f10811ae6a6c547ff594d6a7f3c6c6b02ee9726d1d0dcfcdd06" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ "ring", "rustls-pki-types", @@ -6715,28 +6838,11 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" -[[package]] -name = "rustybuzz" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfb9cf8877777222e4a3bc7eb247e398b56baba500c38c1c46842431adc8b55c" -dependencies = [ - "bitflags 2.11.1", - "bytemuck", - "libm", - "smallvec", - "ttf-parser 0.21.1", - "unicode-bidi-mirroring", - "unicode-ccc", - "unicode-properties", - "unicode-script", -] - [[package]] name = "ruzstd" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ff0cc5e135c8870a775d3320910cd9b564ec036b4dc0b8741629020be63f01" +checksum = "a7c1c839d570d835527c9a5e4db7cb2198683a988cb9d7293fc8674e6bd58fc8" dependencies = [ "twox-hash", ] @@ -7102,9 +7208,9 @@ checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" [[package]] name = "subsecond" -version = "0.7.4" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dbb9f2928b6654ccc28d4ddfef5213e97ed66afed4907774d049b376c62a838" +checksum = "9cc79674bd55726e6b123204403389400229a95fe4a3b2c5453dada70b06ca95" dependencies = [ "js-sys", "libc", @@ -7121,9 +7227,9 @@ dependencies = [ [[package]] name = "subsecond-types" -version = "0.7.4" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388bb28e6ddbee717745963b8932d9a6e24a5d3c93350655f733e938de04d81f" +checksum = "e9798bfed58797aed51c672aa99810aac30a50d3120ecfdcf28c13784e9a8f1c" dependencies = [ "serde", ] @@ -7395,9 +7501,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.52.0" +version = "1.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91135f59b1cbf38c91e73cf3386fca9bb77915c45ce2771460c9d92f0f3d776" +checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe" dependencies = [ "pin-project-lite", ] @@ -7458,7 +7564,7 @@ dependencies = [ "indexmap", "toml_datetime 1.1.1+spec-1.1.0", "toml_parser", - "winnow 1.0.1", + "winnow 1.0.3", ] [[package]] @@ -7467,7 +7573,7 @@ version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ - "winnow 1.0.1", + "winnow 1.0.3", ] [[package]] @@ -7580,18 +7686,6 @@ dependencies = [ "petgraph", ] -[[package]] -name = "ttf-parser" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" - -[[package]] -name = "ttf-parser" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8" - [[package]] name = "ttf-parser" version = "0.25.1" @@ -7632,9 +7726,9 @@ checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" [[package]] name = "typenum" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" +checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" [[package]] name = "typewit" @@ -7659,18 +7753,6 @@ version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" -[[package]] -name = "unicode-bidi-mirroring" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23cb788ffebc92c5948d0e997106233eeb1d8b9512f93f41651f52b6c5f5af86" - -[[package]] -name = "unicode-ccc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df77b101bcc4ea3d78dafc5ad7e4f58ceffe0b2b16bf446aeb50b6cb4157656" - [[package]] name = "unicode-ident" version = "1.0.24" @@ -7683,12 +7765,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" -[[package]] -name = "unicode-properties" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" - [[package]] name = "unicode-script" version = "0.5.8" @@ -7713,6 +7789,17 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +[[package]] +name = "unsynn" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501a7adf1a4bd9951501e5c66621e972ef8874d787628b7f90e64f936ef7ec0a" +dependencies = [ + "mutants", + "proc-macro2", + "rustc-hash 2.1.2", +] + [[package]] name = "untrusted" version = "0.9.0" @@ -7774,9 +7861,9 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "uuid" -version = "1.23.0" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ac8b6f42ead25368cf5b098aeb3dc8a1a2c05a3eee8a9a1a68c640edbfc79d9" +checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" dependencies = [ "getrandom 0.4.2", "js-sys", @@ -7801,6 +7888,16 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "variadics_please" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b53d0f7f2d0182759a549f1f313ce16b07d8f9ba93098157b5fa10ee3e61117f" +dependencies = [ + "quote", + "unsynn", +] + [[package]] name = "vec_map" version = "0.8.2" @@ -7871,11 +7968,11 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.2+wasi-0.2.9" +version = "1.0.3+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" dependencies = [ - "wit-bindgen", + "wit-bindgen 0.57.1", ] [[package]] @@ -7884,14 +7981,14 @@ version = "0.4.0+wasi-0.3.0-rc-2026-01-06" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" dependencies = [ - "wit-bindgen", + "wit-bindgen 0.51.0", ] [[package]] name = "wasm-bindgen" -version = "0.2.118" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89" +checksum = "49ace1d07c165b0864824eee619580c4689389afa9dc9ed3a4c75040d82e6790" dependencies = [ "cfg-if", "once_cell", @@ -7902,9 +7999,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.68" +version = "0.4.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f371d383f2fb139252e0bfac3b81b265689bf45b6874af544ffa4c975ac1ebf8" +checksum = "96492d0d3ffba25305a7dc88720d250b1401d7edca02cc3bcd50633b424673b8" dependencies = [ "js-sys", "wasm-bindgen", @@ -7912,9 +8009,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.118" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed" +checksum = "8e68e6f4afd367a562002c05637acb8578ff2dea1943df76afb9e83d177c8578" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -7922,9 +8019,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.118" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904" +checksum = "d95a9ec35c64b2a7cb35d3fead40c4238d0940c86d107136999567a4703259f2" dependencies = [ "bumpalo", "proc-macro2", @@ -7935,9 +8032,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.118" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129" +checksum = "c4e0100b01e9f0d03189a92b96772a1fb998639d981193d7dbab487302513441" dependencies = [ "unicode-ident", ] @@ -8087,9 +8184,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.95" +version = "0.3.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2dfbb17949fa2088e5d39408c48368947b86f7834484e87b73de55bc14d97d" +checksum = "4b572dff8bcf38bad0fa19729c89bb5748b2b9b1d8be70cf90df697e3a8f32aa" dependencies = [ "js-sys", "wasm-bindgen", @@ -8111,14 +8208,14 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.6", + "webpki-roots 1.0.7", ] [[package]] name = "webpki-roots" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfaf3c063993ff62e73cb4311efde4db1efb31ab78a3e5c457939ad5cc0bed" +checksum = "52f5ee44c96cf55f1b349600768e3ece3a8f26010c05265ab73f945bb1a2eb9d" dependencies = [ "rustls-pki-types", ] @@ -8359,23 +8456,11 @@ version = "0.61.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" dependencies = [ - "windows-collections 0.2.0", + "windows-collections", "windows-core 0.61.2", - "windows-future 0.2.1", + "windows-future", "windows-link 0.1.3", - "windows-numerics 0.2.0", -] - -[[package]] -name = "windows" -version = "0.62.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" -dependencies = [ - "windows-collections 0.3.2", - "windows-core 0.62.2", - "windows-future 0.3.2", - "windows-numerics 0.3.1", + "windows-numerics", ] [[package]] @@ -8387,15 +8472,6 @@ dependencies = [ "windows-core 0.61.2", ] -[[package]] -name = "windows-collections" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" -dependencies = [ - "windows-core 0.62.2", -] - [[package]] name = "windows-core" version = "0.54.0" @@ -8432,19 +8508,6 @@ dependencies = [ "windows-strings 0.4.2", ] -[[package]] -name = "windows-core" -version = "0.62.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" -dependencies = [ - "windows-implement 0.60.2", - "windows-interface 0.59.3", - "windows-link 0.2.1", - "windows-result 0.4.1", - "windows-strings 0.5.1", -] - [[package]] name = "windows-future" version = "0.2.1" @@ -8453,18 +8516,7 @@ checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" dependencies = [ "windows-core 0.61.2", "windows-link 0.1.3", - "windows-threading 0.1.0", -] - -[[package]] -name = "windows-future" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" -dependencies = [ - "windows-core 0.62.2", - "windows-link 0.2.1", - "windows-threading 0.2.1", + "windows-threading", ] [[package]] @@ -8533,16 +8585,6 @@ dependencies = [ "windows-link 0.1.3", ] -[[package]] -name = "windows-numerics" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" -dependencies = [ - "windows-core 0.62.2", - "windows-link 0.2.1", -] - [[package]] name = "windows-result" version = "0.1.2" @@ -8570,15 +8612,6 @@ dependencies = [ "windows-link 0.1.3", ] -[[package]] -name = "windows-result" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" -dependencies = [ - "windows-link 0.2.1", -] - [[package]] name = "windows-strings" version = "0.1.0" @@ -8598,15 +8631,6 @@ dependencies = [ "windows-link 0.1.3", ] -[[package]] -name = "windows-strings" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" -dependencies = [ - "windows-link 0.2.1", -] - [[package]] name = "windows-sys" version = "0.45.0" @@ -8709,15 +8733,6 @@ dependencies = [ "windows-link 0.1.3", ] -[[package]] -name = "windows-threading" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" -dependencies = [ - "windows-link 0.2.1", -] - [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -8919,9 +8934,9 @@ dependencies = [ [[package]] name = "winnow" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09dac053f1cd375980747450bfc7250c264eaae0583872e845c0c7cd578872b5" +checksum = "0592e1c9d151f854e6fd382574c3a0855250e1d9b2f99d9281c6e6391af352f1" dependencies = [ "memchr", ] @@ -8935,6 +8950,12 @@ dependencies = [ "wit-bindgen-rust-macro", ] +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + [[package]] name = "wit-bindgen-core" version = "0.51.0" @@ -9132,9 +9153,9 @@ dependencies = [ [[package]] name = "zbus" -version = "5.14.0" +version = "5.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca82f95dbd3943a40a53cfded6c2d0a2ca26192011846a1810c4256ef92c60bc" +checksum = "c3bcbf15c8708d7fc1be0c993622e0a5cbd5e8b52bfa40afa4c3e0cd8d724ac1" dependencies = [ "async-broadcast", "async-executor", @@ -9159,7 +9180,7 @@ dependencies = [ "uds_windows", "uuid", "windows-sys 0.61.2", - "winnow 0.7.15", + "winnow 1.0.3", "zbus_macros", "zbus_names", "zvariant", @@ -9167,9 +9188,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "5.14.0" +version = "5.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897e79616e84aac4b2c46e9132a4f63b93105d54fe8c0e8f6bffc21fa8d49222" +checksum = "51fa5406ad9175a8c825a931f8cf347116b531b3634fcb0b627c290f1f2516ff" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9182,12 +9203,12 @@ dependencies = [ [[package]] name = "zbus_names" -version = "4.3.1" +version = "4.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffd8af6d5b78619bab301ff3c560a5bd22426150253db278f164d6cf3b72c50f" +checksum = "7074f3e50b894eac91750142016d30d0a89be8e67dbfd9704fb875825760e52d" dependencies = [ "serde", - "winnow 0.7.15", + "winnow 1.0.3", "zvariant", ] @@ -9219,9 +9240,9 @@ dependencies = [ [[package]] name = "zerofrom" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" dependencies = [ "zerofrom-derive", ] @@ -9300,24 +9321,24 @@ dependencies = [ [[package]] name = "zvariant" -version = "5.10.0" +version = "5.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5708299b21903bbe348e94729f22c49c55d04720a004aa350f1f9c122fd2540b" +checksum = "1c1567a6ec68df868cbbfde844cfc6d81649fe5109a62b116b19fabd53e618ee" dependencies = [ "endi", "enumflags2", "serde", "url", - "winnow 0.7.15", + "winnow 1.0.3", "zvariant_derive", "zvariant_utils", ] [[package]] name = "zvariant_derive" -version = "5.10.0" +version = "5.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b59b012ebe9c46656f9cc08d8da8b4c726510aef12559da3e5f1bf72780752c" +checksum = "c7d5b780599bbde114e39d9a0799577fad1ced5105d38515745f7b3099d8ceda" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9328,13 +9349,13 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "3.3.0" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f75c23a64ef8f40f13a6989991e643554d9bef1d682a281160cf0c1bc389c5e9" +checksum = "6d464f5733ffa07a3164d656f18533caace9d0638596721355d73256a410d691" dependencies = [ "proc-macro2", "quote", "serde", "syn 2.0.117", - "winnow 0.7.15", + "winnow 1.0.3", ] diff --git a/Cargo.toml b/Cargo.toml index 6b82d917..09bdfb00 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,11 @@ include = [ default-run = "jackdaw" [features] -default = [] +default = ["navmesh", "avian"] +navmesh = ["dep:bevy_rerecast"] +avian = ["dep:avian3d", "dep:jackdaw_avian_integration"] +dynamic_linking = [] + hot-reload = ["dep:bevy_simple_subsecond_system"] # Experimental dylib-based extension flow. Enables Bevy's # `dynamic_linking` plus jackdaw's `bevy_dylib`-style facade so @@ -67,7 +71,6 @@ members = [ ] [dependencies] -bevy.workspace = true jackdaw_jsn.workspace = true jackdaw_geometry.workspace = true jackdaw_csg.workspace = true @@ -81,7 +84,8 @@ jackdaw_terrain.workspace = true jackdaw_remote.workspace = true jackdaw_node_graph.workspace = true jackdaw_animation.workspace = true -jackdaw_avian_integration.workspace = true +jackdaw_avian_integration = { workspace = true, optional = true } +parry3d.workspace = true jackdaw_panels.workspace = true jackdaw_api.workspace = true # The editor crate uses `jackdaw_api` the same way third-party @@ -116,9 +120,9 @@ jackdaw_rustc_wrapper.workspace = true bevy_enhanced_input.workspace = true serde.workspace = true serde_json.workspace = true -avian3d.workspace = true +avian3d = { workspace = true, optional = true } rfd.workspace = true -bevy_rerecast.workspace = true +bevy_rerecast = { workspace = true, optional = true } ehttp.workspace = true bincode.workspace = true base64.workspace = true @@ -132,8 +136,68 @@ ctrlc = "3" bevy_simple_subsecond_system = { version = "0.2", optional = true } winit.workspace = true image.workspace = true +bevy_ecs.workspace = true +bevy_app.workspace = true +bevy_feathers.workspace = true +bevy_input.workspace = true +bevy_input_focus.workspace = true +bevy_picking.workspace = true +bevy_platform.workspace = true +bevy_ui_widgets.workspace = true +bevy_ui.workspace = true +bevy_window.workspace = true +bevy_log.workspace = true +bevy_asset.workspace = true +bevy_image.workspace = true +bevy_light.workspace = true +bevy_mesh.workspace = true +bevy_reflect.workspace = true +bevy_math.workspace = true +bevy_gizmos.workspace = true +bevy_remote.workspace = true +bevy_tasks.workspace = true +bevy_derive.workspace = true +bevy_utils.workspace = true +bevy_render.workspace = true +bevy_color.workspace = true [workspace.dependencies] +bevy_ecs = "0.18" +bevy_app = "0.18" +bevy_feathers = "0.18" +bevy_reflect = "0.18" +bevy_color = "0.18" +bevy_transform = "0.18" +bevy_animation = "0.18" +bevy_gizmos = "0.18" +bevy_camera = "0.18" +bevy_platform = "0.18" +bevy_math = "0.18" +bevy_time = "0.18" +bevy_ui = "0.18" +bevy_ui_widgets = "0.18" +bevy_picking = "0.18" +bevy_asset = "0.18" +bevy_pbr = "0.18" +bevy_utils = "0.18" +bevy_scene = "0.18" +bevy_log = "0.18" +bevy_derive = "0.18" +bevy_mesh = "0.18" +bevy_image = "0.18" +bevy_render = "0.18" +bevy_remote = "0.18" +bevy_internal = "0.18" +bevy_window = "0.18" +bevy_input_focus = "0.18" +bevy_shader = "0.18" +bevy_ui_render = "0.18" +bevy_text = "0.18" +bevy_state = "0.18" +bevy_gltf = "0.18" +bevy_light = "0.18" +bevy_tasks = "0.18" +bevy_input = { version = "0.18", features = ["serialize"] } bevy = { version = "0.18", features = [ "experimental_bevy_feathers", "serialize", @@ -178,7 +242,10 @@ jackdaw_dylib = { version = "0.4.1", path = "crates/jackdaw_dylib" } jackdaw_loader = { version = "0.4.1", path = "crates/jackdaw_loader" } jackdaw_sdk = { version = "0.4.1", path = "crates/jackdaw_sdk" } jackdaw_rustc_wrapper = { version = "0.4.1", path = "crates/jackdaw_rustc_wrapper" } -bevy_enhanced_input = "0.24" +# TODO: This is only used for its `convex_hull` method, which is a bit of a waste +# find out how to handle that with e.g. manifold, or vendor the function in question +parry3d = "0.26" +bevy_enhanced_input = "0.25" rfd = "0.15" bevy_rerecast = { version = "0.4", default-features = true } ehttp = { version = "0.5", default-features = false, features = [ @@ -228,7 +295,7 @@ redundant_closure_for_method_calls = "warn" # undocumented_unsafe_blocks = "warn" [dev-dependencies] -bevy = { workspace = true, features = ["dynamic_linking"] } +#bevy = { workspace = true, features = ["dynamic_linking"] } jackdaw_runtime.workspace = true # Pulled in so cargo builds the fixture cdylib as part of the # workspace test-target graph. `tests/dylib_loading.rs` dlopens the @@ -322,3 +389,9 @@ doc-scrape-examples = true name = "modal" path = "examples/extension/modal.rs" doc-scrape-examples = true + +[[example]] +name = "navmesh_server" +path = "examples/navmesh_server.rs" +doc-scrape-examples = true +required-features = ["navmesh"] diff --git a/crates/jackdaw_animation/Cargo.toml b/crates/jackdaw_animation/Cargo.toml index 68f27414..dc10e9d0 100644 --- a/crates/jackdaw_animation/Cargo.toml +++ b/crates/jackdaw_animation/Cargo.toml @@ -8,7 +8,22 @@ repository = "https://github.com/jbuehler23/jackdaw" include = ["src/**/*", "Cargo.toml", "LICENSE*"] [dependencies] -bevy.workspace = true +bevy_ecs.workspace = true +bevy_app.workspace = true +bevy_reflect.workspace = true +bevy_math.workspace = true +bevy_color.workspace = true +bevy_gltf.workspace = true +bevy_ui.workspace = true +bevy_text.workspace = true +bevy_picking.workspace = true +bevy_utils.workspace = true +bevy_log.workspace = true +bevy_asset.workspace = true +bevy_transform.workspace = true +bevy_input.workspace = true + +bevy_animation.workspace = true jackdaw_feathers.workspace = true jackdaw_commands.workspace = true jackdaw_node_graph.workspace = true diff --git a/crates/jackdaw_animation/src/blend_graph.rs b/crates/jackdaw_animation/src/blend_graph.rs index 985e8976..ac68bda6 100644 --- a/crates/jackdaw_animation/src/blend_graph.rs +++ b/crates/jackdaw_animation/src/blend_graph.rs @@ -9,7 +9,9 @@ //! another clip), `anim.blend`, `anim.additive`, and `anim.output`. //! Currently only single-clip passthrough compiles (`ClipRef` -> Output). -use bevy::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_reflect::prelude::*; use serde::{Deserialize, Serialize}; /// Marker on a `Clip` entity whose source is a node-canvas blend tree. diff --git a/crates/jackdaw_animation/src/clip.rs b/crates/jackdaw_animation/src/clip.rs index 73c416fd..45089966 100644 --- a/crates/jackdaw_animation/src/clip.rs +++ b/crates/jackdaw_animation/src/clip.rs @@ -24,7 +24,9 @@ //! //! [`compile_clips`]: crate::compile_clips -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_math::prelude::*; +use bevy_reflect::prelude::*; use serde::{Deserialize, Serialize}; /// Top-level component on a clip entity. diff --git a/crates/jackdaw_animation/src/compile.rs b/crates/jackdaw_animation/src/compile.rs index 7a063b80..dd27ba5c 100644 --- a/crates/jackdaw_animation/src/compile.rs +++ b/crates/jackdaw_animation/src/compile.rs @@ -11,13 +11,18 @@ use std::cmp::Ordering; use std::collections::HashSet; -use bevy::animation::{ +use bevy_animation::prelude::*; +use bevy_animation::{ AnimationClip, AnimationTargetId, animated_field, animation_curves::{AnimatableCurve, AnimatableKeyframeCurve}, graph::{AnimationGraph, AnimationNodeIndex}, }; -use bevy::gltf::Gltf; -use bevy::prelude::*; +use bevy_asset::prelude::*; +use bevy_ecs::prelude::*; +use bevy_gltf::Gltf; +use bevy_log::prelude::*; +use bevy_math::prelude::*; +use bevy_transform::prelude::*; use crate::blend_graph::{AnimationBlendGraph, ClipNodeRef, OutputNode}; use crate::clip::{ @@ -187,7 +192,7 @@ pub fn compile_clips( /// un-compiled until a later phase adds the proper tree walker. /// /// [`AnimationBlendGraph`]: crate::blend_graph::AnimationBlendGraph -/// [`AnimationGraph`]: bevy::animation::graph::AnimationGraph +/// [`AnimationGraph`]: bevy_animation::graph::AnimationGraph pub fn compile_blend_graphs( blend_graphs: Query<(Entity, Option<&Children>), (With, With)>, existing_compiled: Query<&CompiledClip>, diff --git a/crates/jackdaw_animation/src/lib.rs b/crates/jackdaw_animation/src/lib.rs index 2f1e43aa..dd972c0d 100644 --- a/crates/jackdaw_animation/src/lib.rs +++ b/crates/jackdaw_animation/src/lib.rs @@ -9,7 +9,8 @@ //! All mutations go through `SpawnEntity` / `SetJsnField` / //! `DespawnEntity`. No custom `EditorCommand` types. -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; pub mod blend_graph; pub mod clip; diff --git a/crates/jackdaw_animation/src/player.rs b/crates/jackdaw_animation/src/player.rs index 52d1432c..5da43a74 100644 --- a/crates/jackdaw_animation/src/player.rs +++ b/crates/jackdaw_animation/src/player.rs @@ -3,10 +3,8 @@ //! `AnimationTargetId`, `AnimatedBy`) based on engagement state. //! None of these are persisted. -use bevy::animation::{ - AnimatedBy, AnimationPlayer, AnimationTargetId, graph::AnimationGraphHandle, -}; -use bevy::prelude::*; +use bevy_animation::{AnimatedBy, AnimationPlayer, AnimationTargetId, graph::AnimationGraphHandle}; +use bevy_ecs::prelude::*; use crate::blend_graph::{AnimationBlendGraph, ClipNodeRef, OutputNode}; use crate::clip::{Clip, GltfClipRef, SelectedClip}; diff --git a/crates/jackdaw_animation/src/timeline.rs b/crates/jackdaw_animation/src/timeline.rs index 3c6cca9c..2dbf9288 100644 --- a/crates/jackdaw_animation/src/timeline.rs +++ b/crates/jackdaw_animation/src/timeline.rs @@ -10,9 +10,17 @@ //! main editor's existing `SpawnEntity` / `SetJsnField` / `DespawnEntity` //! command primitives; see [`crate::commands`] for the rationale. -use bevy::prelude::*; -use bevy::ui::ComputedNode; -use bevy::ui::ui_transform::UiGlobalTransform; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_input::prelude::*; +use bevy_log::prelude::*; +use bevy_picking::prelude::*; +use bevy_text::prelude::*; +use bevy_transform::prelude::*; +use bevy_ui::ComputedNode; +use bevy_ui::prelude::*; +use bevy_ui::ui_transform::UiGlobalTransform; +use bevy_utils::prelude::*; use jackdaw_feathers::button::{ ButtonClickEvent, ButtonProps, ButtonSize, ButtonVariant, IconButtonProps, button, icon_button, }; diff --git a/crates/jackdaw_api/Cargo.toml b/crates/jackdaw_api/Cargo.toml index b7dfa177..84620de2 100644 --- a/crates/jackdaw_api/Cargo.toml +++ b/crates/jackdaw_api/Cargo.toml @@ -21,16 +21,18 @@ repository = "https://github.com/jbuehler23/jackdaw" # the editor's. dynamic_linking = [ "dep:jackdaw_dylib", - "bevy/dynamic_linking", - "bevy/experimental_bevy_feathers", - "bevy/serialize", - "bevy/debug", - "bevy/bevy_remote", - "bevy/file_watcher", + #"bevy/dynamic_linking", + "dep:bevy_feathers", + #"bevy/serialize", + #"bevy/debug", + #"bevy/bevy_remote", + #"bevy/file_watcher", ] [dependencies] -bevy.workspace = true +bevy_ecs.workspace = true +bevy_feathers = { workspace = true, optional = true } + bevy_enhanced_input.workspace = true jackdaw_api_internal.workspace = true jackdaw_api_macros.workspace = true diff --git a/crates/jackdaw_api/src/lib.rs b/crates/jackdaw_api/src/lib.rs index d4cf1ebf..16c8e29c 100644 --- a/crates/jackdaw_api/src/lib.rs +++ b/crates/jackdaw_api/src/lib.rs @@ -146,7 +146,7 @@ pub mod prelude { WindowDescriptor, operator, }; - /// Helper [`SystemParam`](bevy::ecs::system::SystemParam) for + /// Helper [`SystemParam`](bevy_ecs::system::SystemParam) for /// operators that need to read or cancel the active modal. pub use jackdaw_api_internal::lifecycle::ActiveModalQuery; @@ -161,5 +161,5 @@ pub mod prelude { /// Re-exported so manual [`Operator`] impls don't need an extra /// bevy import. - pub use bevy::ecs::system::SystemId; + pub use bevy_ecs::system::SystemId; } diff --git a/crates/jackdaw_api_internal/Cargo.toml b/crates/jackdaw_api_internal/Cargo.toml index 835e91cc..d60f286a 100644 --- a/crates/jackdaw_api_internal/Cargo.toml +++ b/crates/jackdaw_api_internal/Cargo.toml @@ -7,7 +7,15 @@ license = "MIT OR Apache-2.0" repository = "https://github.com/jbuehler23/jackdaw" [dependencies] -bevy.workspace = true +bevy_ecs.workspace = true +bevy_app.workspace = true +bevy_state.workspace = true +bevy_log.workspace = true +bevy_derive.workspace = true +bevy_reflect.workspace = true +bevy_utils.workspace = true +bevy_platform.workspace = true + bevy_enhanced_input.workspace = true jackdaw_panels.workspace = true jackdaw_commands.workspace = true diff --git a/crates/jackdaw_api_internal/src/extensions_config.rs b/crates/jackdaw_api_internal/src/extensions_config.rs index 2635ea2f..938d49ad 100644 --- a/crates/jackdaw_api_internal/src/extensions_config.rs +++ b/crates/jackdaw_api_internal/src/extensions_config.rs @@ -4,7 +4,9 @@ use std::{collections::BTreeMap, path::PathBuf}; -use bevy::{platform::collections::HashSet, prelude::*}; +use bevy_derive::{Deref, DerefMut}; +use bevy_ecs::prelude::*; +use bevy_platform::collections::HashSet; use serde::{Deserialize, Serialize}; use crate::paths::config_dir; diff --git a/crates/jackdaw_api_internal/src/ffi.rs b/crates/jackdaw_api_internal/src/ffi.rs index 415ed6e1..faf8273a 100644 --- a/crates/jackdaw_api_internal/src/ffi.rs +++ b/crates/jackdaw_api_internal/src/ffi.rs @@ -103,7 +103,7 @@ pub const REFLECT_REGISTER_SYMBOL: &[u8] = b"jackdaw_register_reflect_types_v1\0 /// sound because both sides share `TypeRegistry`'s type layout /// through `libjackdaw_sdk.so` (via `bevy/dynamic_linking` plus /// jackdaw's rustc wrapper). -pub type ReflectRegisterFn = unsafe extern "Rust" fn(&mut bevy::reflect::TypeRegistry); +pub type ReflectRegisterFn = unsafe extern "Rust" fn(&mut bevy_reflect::TypeRegistry); /// Shape returned by every dylib extension's entry function. /// @@ -161,6 +161,6 @@ pub struct GameEntry { pub bevy_version: *const c_char, pub profile: *const c_char, pub name: *const c_char, - pub build: unsafe extern "C" fn(*mut bevy::ecs::world::World), - pub teardown: unsafe extern "C" fn(*mut bevy::ecs::world::World), + pub build: unsafe extern "C" fn(*mut bevy_ecs::world::World), + pub teardown: unsafe extern "C" fn(*mut bevy_ecs::world::World), } diff --git a/crates/jackdaw_api_internal/src/lib.rs b/crates/jackdaw_api_internal/src/lib.rs index 10d6dfba..1ae9a39f 100644 --- a/crates/jackdaw_api_internal/src/lib.rs +++ b/crates/jackdaw_api_internal/src/lib.rs @@ -57,9 +57,12 @@ pub mod snapshot; use std::borrow::Cow; use std::sync::Arc; -use bevy::ecs::{system::IntoObserverSystem, world::EntityWorldMut}; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_ecs::{system::IntoObserverSystem, world::EntityWorldMut}; use bevy_enhanced_input::prelude::{Action, Fire}; +use bevy_log::prelude::*; +use bevy_utils::prelude::*; use jackdaw_panels::{ DockWindowDescriptor, WindowRegistry, WorkspaceDescriptor, WorkspaceRegistry, }; @@ -110,7 +113,7 @@ pub mod prelude { // BEI types extension authors need for `actions!` / `bindings!` / observers. pub use bevy_enhanced_input::prelude::*; // Re-export Bevy's SystemId here so Operator impls don't need to import it. - pub use bevy::ecs::system::SystemId; + pub use bevy_ecs::system::SystemId; } /// Trait implemented by every extension. Declares the extension's name @@ -294,7 +297,7 @@ impl<'a> ExtensionContext<'a> { let ext = self.extension_entity; let (execute, invoke, availability_check, cancel) = { - let mut queue = bevy::ecs::world::CommandQueue::default(); + let mut queue = bevy_ecs::world::CommandQueue::default(); let mut commands = Commands::new(&mut queue, self.world); let execute = O::register_execute(&mut commands); let invoke = O::register_invoke(&mut commands); diff --git a/crates/jackdaw_api_internal/src/lifecycle.rs b/crates/jackdaw_api_internal/src/lifecycle.rs index b07b1187..4c411f7d 100644 --- a/crates/jackdaw_api_internal/src/lifecycle.rs +++ b/crates/jackdaw_api_internal/src/lifecycle.rs @@ -16,9 +16,12 @@ use std::sync::Arc; use crate::extensions_config::init_extension; use crate::operator::cancel_active_modal; use crate::{TopLevelMenu, prelude::*}; -use bevy::ecs::component::ComponentId; -use bevy::ecs::system::{SystemId, SystemParam}; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_derive::{Deref, DerefMut}; +use bevy_ecs::component::ComponentId; +use bevy_ecs::prelude::*; +use bevy_ecs::system::{SystemId, SystemParam}; +use bevy_log::prelude::*; pub(super) fn plugin(app: &mut App) { app.init_resource::() diff --git a/crates/jackdaw_api_internal/src/operator.rs b/crates/jackdaw_api_internal/src/operator.rs index 64ff23bb..4c7c17ad 100644 --- a/crates/jackdaw_api_internal/src/operator.rs +++ b/crates/jackdaw_api_internal/src/operator.rs @@ -1,8 +1,13 @@ use std::{borrow::Cow, collections::BTreeMap}; -use bevy::ecs::system::{SystemId, SystemState}; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_derive::{Deref, DerefMut}; +use bevy_ecs::prelude::*; +use bevy_ecs::system::{SystemId, SystemState}; use bevy_enhanced_input::prelude::InputAction; +use bevy_log::prelude::*; +use bevy_reflect::prelude::*; +use bevy_utils::prelude::*; use jackdaw_commands::{CommandHistory, EditorCommand}; use jackdaw_jsn::PropertyValue; diff --git a/crates/jackdaw_api_internal/src/pie.rs b/crates/jackdaw_api_internal/src/pie.rs index df3edacd..f9e0bcdc 100644 --- a/crates/jackdaw_api_internal/src/pie.rs +++ b/crates/jackdaw_api_internal/src/pie.rs @@ -23,7 +23,7 @@ //! buttons); those stay editor-private because they depend on the //! editor's scene representation. -use bevy::prelude::*; +use bevy_state::prelude::*; /// Three-state transport controlled by the editor's Play / Pause / /// Stop buttons. diff --git a/crates/jackdaw_api_internal/src/registries.rs b/crates/jackdaw_api_internal/src/registries.rs index 91281f37..d0057eee 100644 --- a/crates/jackdaw_api_internal/src/registries.rs +++ b/crates/jackdaw_api_internal/src/registries.rs @@ -5,7 +5,8 @@ use std::{borrow::Cow, collections::HashMap}; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; pub(super) fn plugin(app: &mut App) { app.init_resource::(); diff --git a/crates/jackdaw_api_internal/src/runtime.rs b/crates/jackdaw_api_internal/src/runtime.rs index 903fbd42..5551f98f 100644 --- a/crates/jackdaw_api_internal/src/runtime.rs +++ b/crates/jackdaw_api_internal/src/runtime.rs @@ -49,12 +49,11 @@ use std::any::TypeId; use std::collections::HashMap; -use bevy::ecs::intern::Interned; -use bevy::ecs::schedule::{IntoScheduleConfigs, ScheduleLabel, Schedules, SystemSet}; -use bevy::ecs::system::ScheduleSystem; -use bevy::ecs::world::World; -use bevy::prelude::{AppTypeRegistry, Component}; -use bevy::reflect::GetTypeRegistration; +use bevy_ecs::prelude::*; +use bevy_ecs::schedule::ScheduleLabel; +use bevy_ecs::system::ScheduleSystem; +use bevy_ecs::{intern::Interned, system::IntoObserverSystem}; +use bevy_reflect::GetTypeRegistration; /// `SystemSet` marker for every system the game registers. Parameterised /// by the game's static name so multiple games can coexist without @@ -86,7 +85,7 @@ pub struct GameBookkeeping { /// Registry mapping game name -> bookkeeping. Lives as a `World` /// resource so teardown can always find it. -#[derive(Default, Debug, bevy::prelude::Resource)] +#[derive(Default, Debug, Resource)] pub struct GameRegistry { games: HashMap, } @@ -162,7 +161,7 @@ impl<'w> GameApp<'w> { let set = GameSystems(self.name); let configured = systems.in_set(set); let interned = schedule.clone().intern(); - bevy::log::debug!( + bevy_log::debug!( "GameApp::add_systems called by `{}` into schedule {:?}", self.name, interned @@ -183,7 +182,7 @@ impl<'w> GameApp<'w> { /// Insert a resource. Records the resource's `TypeId` so /// teardown can remove it. - pub fn insert_resource(&mut self, res: R) -> &mut Self { + pub fn insert_resource(&mut self, res: R) -> &mut Self { let id = TypeId::of::(); self.world.insert_resource(res); let entry = self @@ -199,7 +198,7 @@ impl<'w> GameApp<'w> { /// Initialise a resource from `Default`. Same tracking as /// `insert_resource`. - pub fn init_resource(&mut self) -> &mut Self { + pub fn init_resource(&mut self) -> &mut Self { let id = TypeId::of::(); self.world.init_resource::(); let entry = self @@ -262,7 +261,7 @@ impl<'w> GameApp<'w> { // `resource_scope` moves `Schedules` out of the World so // `remove_systems_in_set` gets disjoint `&mut World` and // `&mut Schedules` access. - use bevy::ecs::schedule::{ScheduleCleanupPolicy, Schedules}; + use bevy_ecs::schedule::{ScheduleCleanupPolicy, Schedules}; let name = self.name; let schedule_labels: Vec<_> = book.schedules.clone(); self.world @@ -274,12 +273,12 @@ impl<'w> GameApp<'w> { world, ScheduleCleanupPolicy::RemoveSystemsOnly, ) { - Ok(count) => bevy::log::debug!( + Ok(count) => bevy_log::debug!( "teardown: removed {count} systems from GameSystems({name}) \ in schedule {:?}", label ), - Err(e) => bevy::log::warn!( + Err(e) => bevy_log::warn!( "teardown: remove_systems_in_set for GameSystems({name}) \ in schedule {:?} failed: {e:?}", label @@ -290,9 +289,7 @@ impl<'w> GameApp<'w> { // 2) Observer entities tagged with `GameRegistered(name)`. let mut to_despawn = Vec::new(); - let mut q = self - .world - .query::<(bevy::prelude::Entity, &GameRegistered)>(); + let mut q = self.world.query::<(Entity, &GameRegistered)>(); for (entity, tag) in q.iter(self.world) { if tag.0 == name { to_despawn.push(entity); @@ -344,8 +341,8 @@ impl<'w> GameApp<'w> { observer: impl IntoObserverSystemBoxed, ) -> &mut Self where - E: bevy::prelude::Event, - B: bevy::prelude::Bundle, + E: Event, + B: Bundle, { let tag = GameRegistered(self.name); let observer = observer.into_boxed_observer(); @@ -360,16 +357,16 @@ impl<'w> GameApp<'w> { /// (function) or a pre-built `Observer`. Monomorphised into the /// same path. pub trait IntoObserverSystemBoxed: 'static { - fn into_boxed_observer(self) -> bevy::prelude::Observer; + fn into_boxed_observer(self) -> Observer; } impl IntoObserverSystemBoxed for S where - E: bevy::prelude::Event, - B: bevy::prelude::Bundle, - S: bevy::ecs::system::IntoObserverSystem + 'static, + E: Event, + B: Bundle, + S: IntoObserverSystem + 'static, { - fn into_boxed_observer(self) -> bevy::prelude::Observer { - bevy::prelude::Observer::new(self) + fn into_boxed_observer(self) -> Observer { + Observer::new(self) } } diff --git a/crates/jackdaw_api_internal/src/snapshot.rs b/crates/jackdaw_api_internal/src/snapshot.rs index b2a886f2..4cbda309 100644 --- a/crates/jackdaw_api_internal/src/snapshot.rs +++ b/crates/jackdaw_api_internal/src/snapshot.rs @@ -7,7 +7,8 @@ use std::any::Any; -use bevy::prelude::*; +use bevy_derive::{Deref, DerefMut}; +use bevy_ecs::prelude::*; /// A point-in-time representation of the editor scene. pub trait SceneSnapshot: Any + Send + Sync + 'static { diff --git a/crates/jackdaw_api_macros/src/lib.rs b/crates/jackdaw_api_macros/src/lib.rs index 00c0e43f..511420b6 100644 --- a/crates/jackdaw_api_macros/src/lib.rs +++ b/crates/jackdaw_api_macros/src/lib.rs @@ -183,8 +183,8 @@ pub fn operator(attr: TokenStream, item: TokenStream) -> TokenStream { let availability_impl = is_available.map(|path| { quote! { fn register_availability_check( - commands: &mut ::bevy::ecs::system::Commands, - ) -> ::core::option::Option<::bevy::ecs::system::SystemId<(), bool>> { + commands: &mut ::bevy_ecs::system::Commands, + ) -> ::core::option::Option<::bevy_ecs::system::SystemId<(), bool>> { ::core::option::Option::Some(commands.register_system(#path)) } } @@ -193,8 +193,8 @@ pub fn operator(attr: TokenStream, item: TokenStream) -> TokenStream { let cancel_impl = cancel.map(|path| { quote! { fn register_cancel( - commands: &mut ::bevy::ecs::system::Commands, - ) -> ::core::option::Option<::bevy::ecs::system::SystemId<()>> { + commands: &mut ::bevy_ecs::system::Commands, + ) -> ::core::option::Option<::bevy_ecs::system::SystemId<()>> { ::core::option::Option::Some(commands.register_system(#path)) } } @@ -221,7 +221,7 @@ pub fn operator(attr: TokenStream, item: TokenStream) -> TokenStream { #parameters_const fn register_execute( - commands: &mut ::bevy::ecs::system::Commands, + commands: &mut ::bevy_ecs::system::Commands, ) -> ::jackdaw_api::prelude::OperatorSystemId { commands.register_system(#fn_name) } diff --git a/crates/jackdaw_avian_integration/Cargo.toml b/crates/jackdaw_avian_integration/Cargo.toml index 161ff264..53bdd0ff 100644 --- a/crates/jackdaw_avian_integration/Cargo.toml +++ b/crates/jackdaw_avian_integration/Cargo.toml @@ -7,7 +7,16 @@ license = "MIT OR Apache-2.0" repository = "https://github.com/jbuehler23/jackdaw" [dependencies] -bevy.workspace = true +bevy_ecs.workspace = true +bevy_app.workspace = true +bevy_reflect.workspace = true +bevy_color.workspace = true +bevy_transform.workspace = true +bevy_gizmos.workspace = true +bevy_camera.workspace = true +bevy_platform.workspace = true +bevy_math.workspace = true +bevy_time.workspace = true # `debug-plugin` enables avian's `PhysicsGizmoExt::draw_collider` and the # `PhysicsGizmos` config group used by the editor's collider overlay. avian3d = { workspace = true, features = ["debug-plugin"] } diff --git a/crates/jackdaw_avian_integration/src/lib.rs b/crates/jackdaw_avian_integration/src/lib.rs index b4bfdb06..34782633 100644 --- a/crates/jackdaw_avian_integration/src/lib.rs +++ b/crates/jackdaw_avian_integration/src/lib.rs @@ -8,7 +8,12 @@ use std::marker::PhantomData; use avian3d::debug_render::{PhysicsGizmoExt, PhysicsGizmos}; use avian3d::prelude::*; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_camera::prelude::*; +use bevy_ecs::prelude::*; +use bevy_gizmos::prelude::*; +use bevy_reflect::prelude::*; +use bevy_transform::prelude::*; pub mod simulation; @@ -29,7 +34,7 @@ pub mod simulation; pub struct AvianCollider(pub ColliderConstructor); pub mod physics_colors { - use bevy::prelude::Color; + use bevy_color::prelude::*; pub const COLLIDER_WIREFRAME: Color = Color::srgba(0.0, 1.0, 0.5, 0.7); pub const SENSOR_WIREFRAME: Color = Color::srgba(0.0, 0.8, 1.0, 0.5); @@ -86,7 +91,7 @@ impl Plugin for PhysicsOverlaysPlugin { PostUpdate, // TODO: Use `JackdawDrawSystems` here (draw_collider_gizmos::, draw_hierarchy_arrows::) - .after(bevy::transform::TransformSystems::Propagate), + .after(bevy_transform::TransformSystems::Propagate), ); let mut store = app.world_mut().resource_mut::(); @@ -160,7 +165,7 @@ fn draw_collider_gizmos( return; } - let mut highlighted = bevy::ecs::entity::EntityHashSet::default(); + let mut highlighted = bevy_ecs::entity::EntityHashSet::default(); for body_entity in &selected_bodies { collect_descendant_colliders( body_entity, @@ -206,7 +211,7 @@ fn draw_hierarchy_arrows( for (body_entity, body_tf) in &selected_bodies { let body_pos = body_tf.translation(); - let mut descendants = bevy::ecs::entity::EntityHashSet::default(); + let mut descendants = bevy_ecs::entity::EntityHashSet::default(); collect_descendant_colliders( body_entity, &children_query, @@ -233,7 +238,7 @@ fn collect_descendant_colliders( entity: Entity, children_query: &Query<&Children>, collider_check: &Query<(), With>, - out: &mut bevy::ecs::entity::EntityHashSet, + out: &mut bevy_ecs::entity::EntityHashSet, ) { if let Ok(children) = children_query.get(entity) { for child in children.iter() { diff --git a/crates/jackdaw_avian_integration/src/simulation.rs b/crates/jackdaw_avian_integration/src/simulation.rs index bb574239..393c9f40 100644 --- a/crates/jackdaw_avian_integration/src/simulation.rs +++ b/crates/jackdaw_avian_integration/src/simulation.rs @@ -12,9 +12,13 @@ //! stays jackdaw-agnostic and only provides the avian hookup + state types. use avian3d::prelude::*; -use bevy::ecs::entity::EntityHashSet; -use bevy::platform::collections::HashMap; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::entity::EntityHashSet; +use bevy_ecs::prelude::*; +use bevy_math::prelude::*; +use bevy_platform::collections::HashMap; +use bevy_time::prelude::*; +use bevy_transform::prelude::*; /// Resource for the editor's Physics tool. Owned + mutated by tool systems /// in the main crate; exposed here because we need the type in the diff --git a/crates/jackdaw_camera/Cargo.toml b/crates/jackdaw_camera/Cargo.toml index b544b095..4d73f23a 100644 --- a/crates/jackdaw_camera/Cargo.toml +++ b/crates/jackdaw_camera/Cargo.toml @@ -7,7 +7,13 @@ license = "MIT OR Apache-2.0" repository = "https://github.com/jbuehler23/jackdaw" [dependencies] -bevy.workspace = true +bevy_ecs.workspace = true +bevy_app.workspace = true +bevy_input.workspace = true +bevy_time.workspace = true +bevy_camera.workspace = true +bevy_transform.workspace = true +bevy_math.workspace = true jackdaw_commands.workspace = true [lints] diff --git a/crates/jackdaw_camera/src/lib.rs b/crates/jackdaw_camera/src/lib.rs index 09d090f9..fc126c7a 100644 --- a/crates/jackdaw_camera/src/lib.rs +++ b/crates/jackdaw_camera/src/lib.rs @@ -1,7 +1,12 @@ -use bevy::{ - input::mouse::{MouseMotion, MouseScrollUnit, MouseWheel}, - prelude::*, -}; +use bevy_app::prelude::*; +use bevy_camera::prelude::*; +use bevy_ecs::prelude::*; +use bevy_input::mouse::{MouseMotion, MouseScrollUnit, MouseWheel}; +use bevy_input::prelude::*; +use bevy_math::prelude::*; +use bevy_time::prelude::*; +use bevy_transform::prelude::*; + use jackdaw_commands::keybinds::{EditorAction, KeybindRegistry}; pub struct JackdawCameraPlugin; diff --git a/crates/jackdaw_commands/Cargo.toml b/crates/jackdaw_commands/Cargo.toml index aefcd0a6..c1fd75f6 100644 --- a/crates/jackdaw_commands/Cargo.toml +++ b/crates/jackdaw_commands/Cargo.toml @@ -7,7 +7,8 @@ license = "MIT OR Apache-2.0" repository = "https://github.com/jbuehler23/jackdaw" [dependencies] -bevy.workspace = true +bevy_ecs.workspace = true +bevy_input.workspace = true serde.workspace = true [lints] diff --git a/crates/jackdaw_commands/src/keybinds.rs b/crates/jackdaw_commands/src/keybinds.rs index f0402599..ddd926f3 100644 --- a/crates/jackdaw_commands/src/keybinds.rs +++ b/crates/jackdaw_commands/src/keybinds.rs @@ -1,7 +1,8 @@ use std::collections::HashMap; use std::fmt; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_input::prelude::*; use serde::{Deserialize, Serialize}; /// Every remappable editor action. diff --git a/crates/jackdaw_commands/src/lib.rs b/crates/jackdaw_commands/src/lib.rs index 119a5d73..e688ae8d 100644 --- a/crates/jackdaw_commands/src/lib.rs +++ b/crates/jackdaw_commands/src/lib.rs @@ -1,6 +1,6 @@ pub mod keybinds; -use bevy::prelude::*; +use bevy_ecs::prelude::*; pub trait EditorCommand: Send + Sync + 'static { fn execute(&mut self, world: &mut World); diff --git a/crates/jackdaw_csg/Cargo.toml b/crates/jackdaw_csg/Cargo.toml index 9542e263..5e764062 100644 --- a/crates/jackdaw_csg/Cargo.toml +++ b/crates/jackdaw_csg/Cargo.toml @@ -7,7 +7,9 @@ license = "MIT OR Apache-2.0" repository = "https://github.com/jbuehler23/jackdaw" [dependencies] -bevy.workspace = true +bevy_math.workspace = true +bevy_pbr.workspace = true +bevy_asset.workspace = true jackdaw_geometry.workspace = true # manifold-csg pulls in manifold3d (C++ via cmake). Build prereqs: # cmake, a C++ compiler, git. See the crate README for details. diff --git a/crates/jackdaw_csg/src/lib.rs b/crates/jackdaw_csg/src/lib.rs index 1c386b67..10549891 100644 --- a/crates/jackdaw_csg/src/lib.rs +++ b/crates/jackdaw_csg/src/lib.rs @@ -39,8 +39,9 @@ //! See `project_remote_game_integration.md` and the concave-by-default //! audit doc in MEMORY.md for the broader rollout plan. -use bevy::math::{Quat, Vec2, Vec3}; -use bevy::prelude::{Handle, StandardMaterial}; +use bevy_asset::prelude::*; +use bevy_math::{Quat, Vec2, Vec3}; +use bevy_pbr::prelude::*; use jackdaw_geometry::{ BrushFaceData, BrushPlane, BrushTopology, EPSILON, compute_face_tangent_axes, newell_normal, triangulate_face_polygon, triangulate_polygon_with_holes, diff --git a/crates/jackdaw_csg/tests/beveled_cube_subtract.rs b/crates/jackdaw_csg/tests/beveled_cube_subtract.rs index 80929944..6c5400bc 100644 --- a/crates/jackdaw_csg/tests/beveled_cube_subtract.rs +++ b/crates/jackdaw_csg/tests/beveled_cube_subtract.rs @@ -3,7 +3,7 @@ //! via `brush_difference_split`. Same call path as the editor's //! operator; verifies the round-trip survives without panic. -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_csg::{BooleanOp, CsgInput, brush_boolean, brush_difference_split}; use jackdaw_geometry::halfedge::{HalfedgeMesh, ops::edge_bevel::edge_bevel}; use jackdaw_jsn::{Brush, BrushFaceData}; @@ -141,7 +141,7 @@ fn material_handles_propagate_across_bevel_subtract() { // Sentinel uv_scale on the original +X face of the cube should // survive both the bevel and the subtract on the +X plane. let mut bevel = beveled_cube(1.0, 0.2); - bevel.faces[0].uv_scale = bevy::math::Vec2::new(11.0, 17.0); + bevel.faces[0].uv_scale = bevy_math::Vec2::new(11.0, 17.0); // Subtract a cube whose +X face overlaps but doesn't cover the // bevel's +X plane. The +X face of bevel should still exist on the // result with the sentinel uv_scale. @@ -158,7 +158,7 @@ fn material_handles_propagate_across_bevel_subtract() { }); let plus_x = found.expect("+X face should survive on at least one fragment"); assert!( - (plus_x.uv_scale - bevy::math::Vec2::new(11.0, 17.0)).length() < 1e-3, + (plus_x.uv_scale - bevy_math::Vec2::new(11.0, 17.0)).length() < 1e-3, "sentinel uv_scale should propagate; got {:?}", plus_x.uv_scale ); diff --git a/crates/jackdaw_csg/tests/box_cutter_against_concave.rs b/crates/jackdaw_csg/tests/box_cutter_against_concave.rs index 72b843a5..1f528c41 100644 --- a/crates/jackdaw_csg/tests/box_cutter_against_concave.rs +++ b/crates/jackdaw_csg/tests/box_cutter_against_concave.rs @@ -7,7 +7,7 @@ //! `subtract_brush` path bails on this concave target; mesh-CSG should //! split the cube into the expected fragments. -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_csg::{CsgInput, brush_difference_split}; use jackdaw_geometry::halfedge::{HalfedgeMesh, ops::edge_bevel::edge_bevel}; use jackdaw_jsn::Brush; diff --git a/crates/jackdaw_csg/tests/corner_bite_subtract.rs b/crates/jackdaw_csg/tests/corner_bite_subtract.rs index 7cee9f99..8e973b30 100644 --- a/crates/jackdaw_csg/tests/corner_bite_subtract.rs +++ b/crates/jackdaw_csg/tests/corner_bite_subtract.rs @@ -14,7 +14,7 @@ //! ballpark as in the editor), with the cutter overlapping a single //! corner of the target. The expected result is one solid L-shape. -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_csg::{CsgInput, brush_difference_split, brush_to_world}; use jackdaw_jsn::Brush; @@ -25,7 +25,7 @@ fn world_cuboid(half_x: f32, half_y: f32, half_z: f32, center: Vec3) -> Brush { let (world_faces, world_topo) = brush_to_world( &brush.faces, &brush.topology, - bevy::math::Quat::IDENTITY, + bevy_math::Quat::IDENTITY, center, ); Brush { diff --git a/crates/jackdaw_feathers/Cargo.toml b/crates/jackdaw_feathers/Cargo.toml index 28c8a4cb..b4ef26f6 100644 --- a/crates/jackdaw_feathers/Cargo.toml +++ b/crates/jackdaw_feathers/Cargo.toml @@ -8,7 +8,29 @@ license = "MIT OR Apache-2.0" include = ["Cargo.toml", "LICENSE*", "fonts/**/*", "src/**/*"] [dependencies] -bevy.workspace = true +bevy_app.workspace = true +bevy_ecs.workspace = true +bevy_feathers.workspace = true +bevy_math.workspace = true +bevy_ui.workspace = true +bevy_ui_render.workspace = true +bevy_ui_widgets.workspace = true +bevy_picking.workspace = true +bevy_color.workspace = true +bevy_window.workspace = true +bevy_reflect.workspace = true +bevy_render.workspace = true +bevy_shader.workspace = true +bevy_asset.workspace = true +bevy_text.workspace = true +bevy_utils.workspace = true +bevy_derive.workspace = true +bevy_input.workspace = true +bevy_log.workspace = true +bevy_camera.workspace = true +bevy_time.workspace = true + +bevy_input_focus.workspace = true bevy_easings.workspace = true bevy_monitors.workspace = true bevy_ui_text_input.workspace = true @@ -17,5 +39,8 @@ jackdaw_jsn.workspace = true jackdaw_widgets.workspace = true lucide-icons.workspace = true +[dev-dependencies] +bevy_internal.workspace = true + [lints] workspace = true diff --git a/crates/jackdaw_feathers/examples/picker.rs b/crates/jackdaw_feathers/examples/picker.rs index 08831ebf..18388d56 100644 --- a/crates/jackdaw_feathers/examples/picker.rs +++ b/crates/jackdaw_feathers/examples/picker.rs @@ -1,6 +1,10 @@ -use bevy::feathers::FeathersPlugins; -use bevy::input_focus::InputDispatchPlugin; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_camera::prelude::*; +use bevy_ecs::prelude::*; +use bevy_feathers::FeathersPlugins; +use bevy_input_focus::InputDispatchPlugin; +use bevy_internal::DefaultPlugins; +use bevy_log::prelude::*; use jackdaw_feathers::EditorFeathersPlugin; use jackdaw_feathers::picker::{ PickerItems, PickerProps, SelectInput, SpawnItemInput, match_text, picker_item, @@ -89,7 +93,7 @@ fn on_select(input: In, items: Query<&PickerItems>) -> fn main() -> AppExit { App::new() // log errors instead of panicking - .set_error_handler(bevy::ecs::error::error) + .set_error_handler(bevy_ecs::error::error) .add_plugins(( DefaultPlugins, // text edit enables InputDispatchPlugin unconditionally diff --git a/crates/jackdaw_feathers/examples/split_panels.rs b/crates/jackdaw_feathers/examples/split_panels.rs index f38a2afd..47af3237 100644 --- a/crates/jackdaw_feathers/examples/split_panels.rs +++ b/crates/jackdaw_feathers/examples/split_panels.rs @@ -1,4 +1,8 @@ -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_camera::Camera2d; +use bevy_ecs::prelude::*; +use bevy_internal::DefaultPlugins; +use bevy_ui::prelude::*; use jackdaw_feathers::{EditorFeathersPlugin, split_panel}; fn main() -> AppExit { diff --git a/crates/jackdaw_feathers/src/alert.rs b/crates/jackdaw_feathers/src/alert.rs index 5cfc22fc..84d8af11 100644 --- a/crates/jackdaw_feathers/src/alert.rs +++ b/crates/jackdaw_feathers/src/alert.rs @@ -1,5 +1,10 @@ -use bevy::color::palettes::tailwind; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_color::palettes::tailwind; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; use crate::icons::EditorFont; use crate::tokens::{CORNER_RADIUS, TEXT_SIZE}; diff --git a/crates/jackdaw_feathers/src/button.rs b/crates/jackdaw_feathers/src/button.rs index da9a330d..0437d53f 100644 --- a/crates/jackdaw_feathers/src/button.rs +++ b/crates/jackdaw_feathers/src/button.rs @@ -1,6 +1,12 @@ -use bevy::input_focus::InputFocus; -use bevy::picking::hover::Hovered; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_asset::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_input_focus::InputFocus; +use bevy_picking::hover::Hovered; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; use jackdaw_jsn::PropertyValue; use lucide_icons::Icon; use std::borrow::Cow; @@ -148,7 +154,7 @@ pub enum ButtonSize { impl ButtonVariant { pub fn bg_color(&self, hovered: bool) -> Srgba { - use bevy::color::palettes::tailwind; + use bevy_color::palettes::tailwind; match self { Self::Default => tailwind::ZINC_700, Self::Ghost | Self::ActiveAlt | Self::Disabled => TEXT_BODY_COLOR, @@ -204,7 +210,7 @@ impl ButtonVariant { } } pub fn border_color(&self) -> Srgba { - use bevy::color::palettes::tailwind; + use bevy_color::palettes::tailwind; match self { Self::Default | Self::Ghost | Self::Disabled => tailwind::ZINC_700, Self::Primary | Self::Active => PRIMARY_COLOR, @@ -398,7 +404,7 @@ pub(crate) fn button_base( variant, size, Hovered::default(), - HoverCursor(bevy::window::SystemCursorIcon::Pointer), + HoverCursor(bevy_window::SystemCursorIcon::Pointer), Node { width: if align_left { percent(100) diff --git a/crates/jackdaw_feathers/src/checkbox.rs b/crates/jackdaw_feathers/src/checkbox.rs index 9295993c..450eb108 100644 --- a/crates/jackdaw_feathers/src/checkbox.rs +++ b/crates/jackdaw_feathers/src/checkbox.rs @@ -1,5 +1,11 @@ -use bevy::picking::hover::Hovered; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_asset::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_picking::hover::Hovered; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; use lucide_icons::Icon; use crate::tokens::{BORDER_COLOR, TEXT_BODY_COLOR, TEXT_SIZE}; diff --git a/crates/jackdaw_feathers/src/collapsible.rs b/crates/jackdaw_feathers/src/collapsible.rs index 3cad06e9..b2d418f9 100644 --- a/crates/jackdaw_feathers/src/collapsible.rs +++ b/crates/jackdaw_feathers/src/collapsible.rs @@ -1,4 +1,9 @@ -use bevy::{feathers::theme::ThemedText, prelude::*}; +use bevy_asset::prelude::*; +use bevy_ecs::prelude::*; +use bevy_feathers::theme::ThemedText; +use bevy_picking::prelude::*; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; use jackdaw_widgets::collapsible::{ CollapsibleBody, CollapsibleHeader, CollapsibleSection, ToggleCollapsible, }; diff --git a/crates/jackdaw_feathers/src/color_picker/controls.rs b/crates/jackdaw_feathers/src/color_picker/controls.rs index 934d0e78..c6dab7de 100644 --- a/crates/jackdaw_feathers/src/color_picker/controls.rs +++ b/crates/jackdaw_feathers/src/color_picker/controls.rs @@ -1,6 +1,10 @@ -use bevy::picking::events::{DragEnd, DragStart, Press, Release}; -use bevy::prelude::*; -use bevy::ui::UiGlobalTransform; +use bevy_ecs::prelude::*; +use bevy_math::prelude::*; +use bevy_picking::events::{DragEnd, DragStart, Press, Release}; +use bevy_picking::prelude::*; +use bevy_ui::prelude::*; + +use bevy_ui::UiGlobalTransform; use super::{ AlphaSlider, ColorPickerChangeEvent, ColorPickerCommitEvent, ColorPickerState, HsvRectangle, diff --git a/crates/jackdaw_feathers/src/color_picker/input_fields.rs b/crates/jackdaw_feathers/src/color_picker/input_fields.rs index 05de43bf..c59f5732 100644 --- a/crates/jackdaw_feathers/src/color_picker/input_fields.rs +++ b/crates/jackdaw_feathers/src/color_picker/input_fields.rs @@ -1,7 +1,10 @@ -use bevy::input_focus::InputFocus; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_input_focus::InputFocus; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; use bevy_ui_text_input::TextInputQueue; use bevy_ui_text_input::actions::{TextInputAction, TextInputEdit}; +use bevy_utils::prelude::*; use super::color_math::{parse_hex, rgb_to_hsv}; use super::{ diff --git a/crates/jackdaw_feathers/src/color_picker/materials.rs b/crates/jackdaw_feathers/src/color_picker/materials.rs index 2e06d7fc..73f77da7 100644 --- a/crates/jackdaw_feathers/src/color_picker/materials.rs +++ b/crates/jackdaw_feathers/src/color_picker/materials.rs @@ -1,7 +1,10 @@ -use bevy::prelude::*; -use bevy::reflect::TypePath; -use bevy::render::render_resource::*; -use bevy::shader::ShaderRef; +use bevy_asset::prelude::*; +use bevy_ecs::prelude::*; +use bevy_math::prelude::*; +use bevy_reflect::TypePath; +use bevy_render::render_resource::*; +use bevy_shader::ShaderRef; +use bevy_ui_render::prelude::*; const SHADER_HSV_RECT_PATH: &str = "embedded://jackdaw_feathers/color_picker/shaders/color_picker_hsv_rect.wgsl"; diff --git a/crates/jackdaw_feathers/src/color_picker/mod.rs b/crates/jackdaw_feathers/src/color_picker/mod.rs index 9f36e383..e844918b 100644 --- a/crates/jackdaw_feathers/src/color_picker/mod.rs +++ b/crates/jackdaw_feathers/src/color_picker/mod.rs @@ -5,8 +5,13 @@ pub mod materials; mod setup; mod visuals; -use bevy::asset::embedded_asset; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_asset::embedded_asset; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_ui::prelude::*; +use bevy_ui_render::prelude::*; +use bevy_utils::prelude::*; use color_math::{hsv_to_rgb, rgb_to_hsv}; pub use materials::{ diff --git a/crates/jackdaw_feathers/src/color_picker/setup.rs b/crates/jackdaw_feathers/src/color_picker/setup.rs index d417b0bf..a94e9cf5 100644 --- a/crates/jackdaw_feathers/src/color_picker/setup.rs +++ b/crates/jackdaw_feathers/src/color_picker/setup.rs @@ -1,5 +1,11 @@ -use bevy::picking::prelude::Pickable; -use bevy::prelude::*; +use bevy_asset::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_math::prelude::*; +use bevy_picking::prelude::Pickable; +use bevy_ui::prelude::*; +use bevy_ui_render::prelude::*; +use bevy_utils::prelude::*; use super::color_math::hsv_to_rgb; use super::controls::{ diff --git a/crates/jackdaw_feathers/src/color_picker/visuals.rs b/crates/jackdaw_feathers/src/color_picker/visuals.rs index 30f9ea58..b9a6a099 100644 --- a/crates/jackdaw_feathers/src/color_picker/visuals.rs +++ b/crates/jackdaw_feathers/src/color_picker/visuals.rs @@ -1,4 +1,9 @@ -use bevy::prelude::*; +use bevy_asset::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_math::prelude::*; +use bevy_ui::prelude::*; +use bevy_ui_render::prelude::*; use super::color_math::hsv_to_rgb; use super::materials::{AlphaSliderMaterial, CheckerboardMaterial, HsvRectMaterial}; diff --git a/crates/jackdaw_feathers/src/combobox.rs b/crates/jackdaw_feathers/src/combobox.rs index 2c597b02..ce065acf 100644 --- a/crates/jackdaw_feathers/src/combobox.rs +++ b/crates/jackdaw_feathers/src/combobox.rs @@ -1,4 +1,7 @@ -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; use lucide_icons::Icon; use crate::button::{ diff --git a/crates/jackdaw_feathers/src/context_menu.rs b/crates/jackdaw_feathers/src/context_menu.rs index 3612f2aa..38c678b4 100644 --- a/crates/jackdaw_feathers/src/context_menu.rs +++ b/crates/jackdaw_feathers/src/context_menu.rs @@ -1,4 +1,7 @@ -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_math::prelude::*; +use bevy_ui::prelude::*; use jackdaw_widgets::context_menu::{ContextMenuAction, ContextMenuItem}; use crate::button::{ButtonClickEvent, ButtonOperatorCall, ButtonProps, ButtonVariant, button}; diff --git a/crates/jackdaw_feathers/src/cursor.rs b/crates/jackdaw_feathers/src/cursor.rs index 068075db..6b2f0858 100644 --- a/crates/jackdaw_feathers/src/cursor.rs +++ b/crates/jackdaw_feathers/src/cursor.rs @@ -1,6 +1,9 @@ -use bevy::picking::hover::Hovered; -use bevy::prelude::*; -use bevy::window::{CursorIcon, SystemCursorIcon}; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_picking::hover::Hovered; +use bevy_ui::prelude::*; +use bevy_window::prelude::*; +use bevy_window::{CursorIcon, SystemCursorIcon}; pub fn plugin(app: &mut App) { app.init_resource::() diff --git a/crates/jackdaw_feathers/src/dialog.rs b/crates/jackdaw_feathers/src/dialog.rs index b7b7953c..bffc7ece 100644 --- a/crates/jackdaw_feathers/src/dialog.rs +++ b/crates/jackdaw_feathers/src/dialog.rs @@ -1,4 +1,12 @@ -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_asset::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_input::prelude::*; +use bevy_picking::prelude::*; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; use lucide_icons::Icon; use crate::button::{ diff --git a/crates/jackdaw_feathers/src/file_browser.rs b/crates/jackdaw_feathers/src/file_browser.rs index 15e8d66a..e85faabc 100644 --- a/crates/jackdaw_feathers/src/file_browser.rs +++ b/crates/jackdaw_feathers/src/file_browser.rs @@ -1,4 +1,8 @@ -use bevy::{feathers::theme::ThemedText, prelude::*}; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_feathers::theme::ThemedText; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; use jackdaw_widgets::file_browser::FileBrowserItem; use lucide_icons::Icon; diff --git a/crates/jackdaw_feathers/src/icons.rs b/crates/jackdaw_feathers/src/icons.rs index 01d5b476..b4e46c34 100644 --- a/crates/jackdaw_feathers/src/icons.rs +++ b/crates/jackdaw_feathers/src/icons.rs @@ -1,4 +1,11 @@ -use bevy::{asset::AssetId, prelude::*}; +use bevy_app::prelude::*; +use bevy_asset::AssetId; +use bevy_asset::prelude::*; +use bevy_color::prelude::*; +use bevy_derive::{Deref, DerefMut}; +use bevy_ecs::prelude::*; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; pub use lucide_icons::Icon; /// Resource holding the loaded Lucide icon font handle. diff --git a/crates/jackdaw_feathers/src/inspector_field.rs b/crates/jackdaw_feathers/src/inspector_field.rs index 67f65eea..48be1c84 100644 --- a/crates/jackdaw_feathers/src/inspector_field.rs +++ b/crates/jackdaw_feathers/src/inspector_field.rs @@ -1,4 +1,9 @@ -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_asset::prelude::*; +use bevy_ecs::prelude::*; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; use crate::checkbox::{CheckboxProps, checkbox}; use crate::combobox::{ComboBoxOptionData, combobox}; diff --git a/crates/jackdaw_feathers/src/lib.rs b/crates/jackdaw_feathers/src/lib.rs index aa46d777..ddad7805 100644 --- a/crates/jackdaw_feathers/src/lib.rs +++ b/crates/jackdaw_feathers/src/lib.rs @@ -30,12 +30,12 @@ pub mod utils; pub mod variant_edit; pub mod vector_edit; -use bevy::app::Plugin; +use bevy_app::Plugin; pub struct EditorFeathersPlugin; impl Plugin for EditorFeathersPlugin { - fn build(&self, app: &mut bevy::app::App) { + fn build(&self, app: &mut bevy_app::App) { // text_edit::plugin adds TextInputPlugin which adds InputDispatchPlugin, // so we must not add InputDispatchPlugin ourselves. app.add_plugins(( diff --git a/crates/jackdaw_feathers/src/list_view.rs b/crates/jackdaw_feathers/src/list_view.rs index 4ff9e736..594cbfc9 100644 --- a/crates/jackdaw_feathers/src/list_view.rs +++ b/crates/jackdaw_feathers/src/list_view.rs @@ -1,4 +1,11 @@ -use bevy::{prelude::*, ui_widgets::observe}; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_picking::prelude::*; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; +use bevy_ui_widgets::observe; +use bevy_utils::prelude::*; + use jackdaw_widgets::list_view::{ListItem, ListItemContent, ListView}; use crate::tokens; diff --git a/crates/jackdaw_feathers/src/menu_bar.rs b/crates/jackdaw_feathers/src/menu_bar.rs index 228c0e18..630641ec 100644 --- a/crates/jackdaw_feathers/src/menu_bar.rs +++ b/crates/jackdaw_feathers/src/menu_bar.rs @@ -1,4 +1,10 @@ -use bevy::{feathers::theme::ThemedText, prelude::*, ui::ui_transform::UiGlobalTransform}; +use bevy_app::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_feathers::theme::ThemedText; +use bevy_picking::prelude::*; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; use jackdaw_widgets::menu_bar::{ MenuAction, MenuBar, MenuBarDropdown, MenuBarDropdownItem, MenuBarItem, MenuBarState, }; diff --git a/crates/jackdaw_feathers/src/panel_header.rs b/crates/jackdaw_feathers/src/panel_header.rs index 981da7b2..5c0c4ff7 100644 --- a/crates/jackdaw_feathers/src/panel_header.rs +++ b/crates/jackdaw_feathers/src/panel_header.rs @@ -1,4 +1,8 @@ -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; use lucide_icons::Icon; use crate::{icons::IconFont, tokens}; diff --git a/crates/jackdaw_feathers/src/panel_section.rs b/crates/jackdaw_feathers/src/panel_section.rs index e8f637f3..06bacae2 100644 --- a/crates/jackdaw_feathers/src/panel_section.rs +++ b/crates/jackdaw_feathers/src/panel_section.rs @@ -1,4 +1,10 @@ -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_asset::prelude::*; +use bevy_ecs::prelude::*; +use bevy_math::prelude::*; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; use lucide_icons::Icon; use crate::button::{ButtonClickEvent, ButtonVariant, IconButtonProps, icon_button}; diff --git a/crates/jackdaw_feathers/src/picker.rs b/crates/jackdaw_feathers/src/picker.rs index 8fd3e895..8a8aa9a8 100644 --- a/crates/jackdaw_feathers/src/picker.rs +++ b/crates/jackdaw_feathers/src/picker.rs @@ -30,17 +30,23 @@ //! } //! ``` -use bevy::ecs::lifecycle::HookContext; -use bevy::ecs::relationship::RelatedSpawner; -use bevy::ecs::system::SystemId; -use bevy::ecs::world::DeferredWorld; -use bevy::feathers::font_styles::InheritableFont; -use bevy::feathers::handle_or_path::HandleOrPath; -use bevy::feathers::theme::ThemedText; -use bevy::input_focus::InputFocus; -use bevy::input_focus::tab_navigation::{TabGroup, TabIndex}; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_derive::Deref; +use bevy_ecs::lifecycle::HookContext; +use bevy_ecs::prelude::*; +use bevy_ecs::relationship::RelatedSpawner; +use bevy_ecs::system::SystemId; +use bevy_ecs::world::DeferredWorld; +use bevy_feathers::font_styles::InheritableFont; +use bevy_feathers::handle_or_path::HandleOrPath; +use bevy_feathers::theme::ThemedText; +use bevy_input_focus::InputFocus; +use bevy_input_focus::tab_navigation::{TabGroup, TabIndex}; +use bevy_log::prelude::*; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; use bevy_ui_text_input::SubmitText; +use bevy_utils::prelude::*; use jackdaw_fuzzy::FuzzyMatcher; pub use jackdaw_fuzzy::{Category, Match, Matchable, MatchedStr}; use lucide_icons::Icon; diff --git a/crates/jackdaw_feathers/src/popover.rs b/crates/jackdaw_feathers/src/popover.rs index 03138ff3..edbba656 100644 --- a/crates/jackdaw_feathers/src/popover.rs +++ b/crates/jackdaw_feathers/src/popover.rs @@ -1,7 +1,15 @@ -use bevy::picking::hover::Hovered; -use bevy::prelude::*; -use bevy::ui::UiGlobalTransform; -use bevy::window::PrimaryWindow; +use bevy_app::prelude::*; +use bevy_asset::prelude::*; +use bevy_camera::prelude::*; +use bevy_ecs::prelude::*; +use bevy_input::prelude::*; +use bevy_math::prelude::*; +use bevy_picking::hover::Hovered; +use bevy_text::prelude::*; +use bevy_ui::UiGlobalTransform; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; +use bevy_window::{PrimaryWindow, prelude::*}; use lucide_icons::Icon; use crate::button::{ diff --git a/crates/jackdaw_feathers/src/progress.rs b/crates/jackdaw_feathers/src/progress.rs index 758a80a7..64a0110f 100644 --- a/crates/jackdaw_feathers/src/progress.rs +++ b/crates/jackdaw_feathers/src/progress.rs @@ -5,7 +5,9 @@ //! or indeterminate (unknown total; bar stays at 0%, caller //! typically shows a spinner separately or leaves the bar empty). -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; use crate::tokens; diff --git a/crates/jackdaw_feathers/src/scroll.rs b/crates/jackdaw_feathers/src/scroll.rs index 6ca7c68e..55c48143 100644 --- a/crates/jackdaw_feathers/src/scroll.rs +++ b/crates/jackdaw_feathers/src/scroll.rs @@ -1,7 +1,12 @@ -use bevy::color::palettes::tailwind; -use bevy::input::mouse::{MouseScrollUnit, MouseWheel}; -use bevy::picking::hover::{HoverMap, Hovered}; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_camera::prelude::*; +use bevy_color::palettes::tailwind; +use bevy_ecs::prelude::*; +use bevy_input::mouse::{MouseScrollUnit, MouseWheel}; +use bevy_math::prelude::*; +use bevy_picking::hover::{HoverMap, Hovered}; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; const SCROLL_SPEED: f32 = 24.0; diff --git a/crates/jackdaw_feathers/src/separator.rs b/crates/jackdaw_feathers/src/separator.rs index ed4acbad..f972df88 100644 --- a/crates/jackdaw_feathers/src/separator.rs +++ b/crates/jackdaw_feathers/src/separator.rs @@ -1,4 +1,7 @@ -use bevy::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; use crate::tokens::TEXT_BODY_COLOR; diff --git a/crates/jackdaw_feathers/src/split_panel.rs b/crates/jackdaw_feathers/src/split_panel.rs index 39c394b7..54769165 100644 --- a/crates/jackdaw_feathers/src/split_panel.rs +++ b/crates/jackdaw_feathers/src/split_panel.rs @@ -1,7 +1,9 @@ -use bevy::{ - ecs::{query::QueryFilter, spawn::SpawnableList}, - prelude::*, -}; +use bevy_app::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::{prelude::*, query::QueryFilter, spawn::SpawnableList}; +use bevy_picking::prelude::*; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; use jackdaw_widgets::split_panel::{Panel, PanelGroup, PanelHandle}; const HANDLE_SIZE: f32 = 3.0; diff --git a/crates/jackdaw_feathers/src/status_bar.rs b/crates/jackdaw_feathers/src/status_bar.rs index 5be1037e..d4fae994 100644 --- a/crates/jackdaw_feathers/src/status_bar.rs +++ b/crates/jackdaw_feathers/src/status_bar.rs @@ -1,4 +1,7 @@ -use bevy::{feathers::theme::ThemedText, prelude::*}; +use bevy_ecs::prelude::*; +use bevy_feathers::theme::ThemedText; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; use crate::tokens; diff --git a/crates/jackdaw_feathers/src/text_edit.rs b/crates/jackdaw_feathers/src/text_edit.rs index 2a7e657e..ebf8d1e2 100644 --- a/crates/jackdaw_feathers/src/text_edit.rs +++ b/crates/jackdaw_feathers/src/text_edit.rs @@ -1,11 +1,18 @@ -use bevy::input_focus::InputFocus; -use bevy::picking::hover::Hovered; -use bevy::prelude::*; -use bevy::text::{FontFeatureTag, FontFeatures}; +use bevy_app::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_input::prelude::*; +use bevy_input_focus::InputFocus; +use bevy_picking::hover::Hovered; +use bevy_text::prelude::*; +use bevy_text::{FontFeatureTag, FontFeatures}; +use bevy_ui::prelude::*; use bevy_ui_text_input::actions::{TextInputAction, TextInputEdit}; use bevy_ui_text_input::*; +use bevy_utils::prelude::*; // Re-export key types from bevy_ui_text_input for consumers pub use bevy_ui_text_input::{TextInputBuffer, TextInputNode, TextInputQueue}; +use bevy_window::Window; use crate::cursor::{ActiveCursor, HoverCursor}; use crate::icons::{EditorFont, IconFont}; @@ -405,30 +412,30 @@ fn setup_text_edit_input( }]), Interaction::None, Hovered::default(), - HoverCursor(bevy::window::SystemCursorIcon::Text), + HoverCursor(bevy_window::SystemCursorIcon::Text), )) .observe( - |mut ev: On>| { + |mut ev: On>| { ev.propagate(false); }, ) .observe( - |mut ev: On>| { + |mut ev: On>| { ev.propagate(false); }, ) .observe( - |mut ev: On>| { + |mut ev: On>| { ev.propagate(false); }, ) .observe( - |mut ev: On>| { + |mut ev: On>| { ev.propagate(false); }, ) .observe( - |mut ev: On>| { + |mut ev: On>| { ev.propagate(false); }, ) @@ -463,7 +470,7 @@ fn setup_text_edit_input( ZIndex(10), Interaction::None, Hovered::default(), - HoverCursor(bevy::window::SystemCursorIcon::ColResize), + HoverCursor(bevy_window::SystemCursorIcon::ColResize), )) .id(); crate::utils::attach_or_despawn(&mut commands, wrapper_entity, hitbox); @@ -925,7 +932,7 @@ fn handle_drag_value( hitbox.start_value = parse_numeric_value(&buffer.get_text(), suffix); commands .entity(entity) - .insert(ActiveCursor(bevy::window::SystemCursorIcon::ColResize)); + .insert(ActiveCursor(bevy_window::SystemCursorIcon::ColResize)); commands.entity(child_of.parent()).insert(TextEditDragging); } diff --git a/crates/jackdaw_feathers/src/toast.rs b/crates/jackdaw_feathers/src/toast.rs index 05fd664b..bc315818 100644 --- a/crates/jackdaw_feathers/src/toast.rs +++ b/crates/jackdaw_feathers/src/toast.rs @@ -1,7 +1,14 @@ use std::time::Duration; -use bevy::color::palettes::tailwind; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_asset::prelude::*; +use bevy_color::palettes::tailwind; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_text::prelude::*; +use bevy_time::prelude::*; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; use lucide_icons::Icon; use crate::button::{ButtonClickEvent, ButtonVariant, IconButtonProps, icon_button}; diff --git a/crates/jackdaw_feathers/src/tokens.rs b/crates/jackdaw_feathers/src/tokens.rs index f3c2ef95..6670c292 100644 --- a/crates/jackdaw_feathers/src/tokens.rs +++ b/crates/jackdaw_feathers/src/tokens.rs @@ -1,5 +1,6 @@ -use bevy::color::palettes::tailwind; -use bevy::prelude::*; +use bevy_color::palettes::tailwind; +use bevy_color::prelude::*; +use bevy_ui::prelude::*; // --------------------------------------------------------------------------- // Corner radii diff --git a/crates/jackdaw_feathers/src/tooltip.rs b/crates/jackdaw_feathers/src/tooltip.rs index 278d9b47..c9fa523f 100644 --- a/crates/jackdaw_feathers/src/tooltip.rs +++ b/crates/jackdaw_feathers/src/tooltip.rs @@ -1,7 +1,7 @@ //! Generic hover-tooltip primitive. //! //! Any UI entity that carries a [`Tooltip`] component plus -//! [`bevy::picking::hover::Hovered`] gets a Blender-style popover +//! [`bevy_picking::hover::Hovered`] gets a Blender-style popover //! after a short delay: bold title, optional wrapped description, //! optional dim footer (operator signature, type path, etc.). //! @@ -18,7 +18,14 @@ use std::time::Duration; -use bevy::{picking::hover::Hovered, prelude::*, window::PrimaryWindow}; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_picking::hover::Hovered; +use bevy_text::prelude::*; +use bevy_time::prelude::*; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; +use bevy_window::{PrimaryWindow, prelude::*}; use crate::{ popover::{self, PopoverPlacement, PopoverProps}, @@ -195,7 +202,7 @@ fn tick_tooltip( // confirm. `Pickable::IGNORE` makes the popover // hit-test transparent so pointer events fall // through to whatever is underneath. - bevy::picking::Pickable::IGNORE, + bevy_picking::Pickable::IGNORE, )) .id(); spawn_title(&mut commands, popover_entity, tip); @@ -237,7 +244,7 @@ fn spawn_title(commands: &mut Commands, popover: Entity, tip: &Tooltip) { ..default() }, TextColor(tokens::TEXT_PRIMARY), - bevy::picking::Pickable::IGNORE, + bevy_picking::Pickable::IGNORE, ChildOf(popover), )); return; @@ -250,7 +257,7 @@ fn spawn_title(commands: &mut Commands, popover: Entity, tip: &Tooltip) { column_gap: Val::Px(tokens::SPACING_MD), ..default() }, - bevy::picking::Pickable::IGNORE, + bevy_picking::Pickable::IGNORE, ChildOf(popover), )) .with_child(( @@ -261,7 +268,7 @@ fn spawn_title(commands: &mut Commands, popover: Entity, tip: &Tooltip) { ..default() }, TextColor(tokens::TEXT_PRIMARY), - bevy::picking::Pickable::IGNORE, + bevy_picking::Pickable::IGNORE, )) .with_child(( Text::new(tip.keybind.clone()), @@ -270,7 +277,7 @@ fn spawn_title(commands: &mut Commands, popover: Entity, tip: &Tooltip) { ..default() }, TextColor(tokens::TEXT_SECONDARY), - bevy::picking::Pickable::IGNORE, + bevy_picking::Pickable::IGNORE, )); } @@ -287,7 +294,7 @@ fn spawn_body(commands: &mut Commands, popover: Entity, tip: &Tooltip) { ..default() }, TextColor(tokens::TEXT_PRIMARY), - bevy::picking::Pickable::IGNORE, + bevy_picking::Pickable::IGNORE, ChildOf(popover), )); } @@ -299,7 +306,7 @@ fn spawn_body(commands: &mut Commands, popover: Entity, tip: &Tooltip) { ..default() }, TextColor(tokens::TEXT_SECONDARY), - bevy::picking::Pickable::IGNORE, + bevy_picking::Pickable::IGNORE, ChildOf(popover), )); } diff --git a/crates/jackdaw_feathers/src/tree_view.rs b/crates/jackdaw_feathers/src/tree_view.rs index ce42c865..8e7f14cc 100644 --- a/crates/jackdaw_feathers/src/tree_view.rs +++ b/crates/jackdaw_feathers/src/tree_view.rs @@ -1,5 +1,14 @@ -use bevy::{feathers::theme::ThemedText, prelude::*, ui_widgets::observe}; +use bevy_asset::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_feathers::theme::ThemedText; +use bevy_input::prelude::*; use bevy_monitors::prelude::{MonitorSelf, Mutation, NotifyChanged}; +use bevy_picking::prelude::*; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; +use bevy_ui_widgets::observe; +use bevy_utils::prelude::*; use jackdaw_widgets::tree_view::{ EntityCategory, TreeChildrenPopulated, TreeFocused, TreeNode, TreeNodeExpandToggle, TreeNodeExpanded, TreeRowChildren, TreeRowClicked, TreeRowContent, TreeRowDot, TreeRowDropped, @@ -504,7 +513,7 @@ pub fn tree_keyboard_navigation( node_query: Query<&Node>, mut commands: Commands, tree_node_query: Query<&TreeNode>, - input_focus: Res, + input_focus: Res, ) { // Skip tree keyboard navigation when a text input is focused // to avoid Enter/arrow keys interfering with text editing. diff --git a/crates/jackdaw_feathers/src/utils.rs b/crates/jackdaw_feathers/src/utils.rs index 832f7168..3732f4da 100644 --- a/crates/jackdaw_feathers/src/utils.rs +++ b/crates/jackdaw_feathers/src/utils.rs @@ -1,4 +1,4 @@ -use bevy::prelude::*; +use bevy_ecs::prelude::*; /// Attach `child` as a child of `parent` at `Commands` flush time, /// cleanly despawning `child` if `parent` has gone away by then. diff --git a/crates/jackdaw_feathers/src/variant_edit.rs b/crates/jackdaw_feathers/src/variant_edit.rs index 3966f273..1e958dd1 100644 --- a/crates/jackdaw_feathers/src/variant_edit.rs +++ b/crates/jackdaw_feathers/src/variant_edit.rs @@ -1,5 +1,9 @@ -use bevy::picking::hover::Hovered; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_picking::hover::Hovered; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; use lucide_icons::Icon; use crate::button::{ButtonClickEvent, ButtonProps, ButtonVariant, EditorButton, button}; diff --git a/crates/jackdaw_feathers/src/vector_edit.rs b/crates/jackdaw_feathers/src/vector_edit.rs index 539611c2..bacc8484 100644 --- a/crates/jackdaw_feathers/src/vector_edit.rs +++ b/crates/jackdaw_feathers/src/vector_edit.rs @@ -1,6 +1,7 @@ -use bevy::prelude::*; - -use bevy::color::Color; +use bevy_color::Color; +use bevy_ecs::prelude::*; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; use crate::text_edit::{TextEditPrefix, TextEditProps, text_edit}; use crate::tokens::{self, TEXT_SIZE, TEXT_SIZE_SM}; diff --git a/crates/jackdaw_geometry/Cargo.toml b/crates/jackdaw_geometry/Cargo.toml index da21ce56..6241a820 100644 --- a/crates/jackdaw_geometry/Cargo.toml +++ b/crates/jackdaw_geometry/Cargo.toml @@ -7,7 +7,13 @@ license = "MIT OR Apache-2.0" repository = "https://github.com/jbuehler23/jackdaw" [dependencies] -bevy.workspace = true +bevy_ecs.workspace = true +bevy_app.workspace = true +bevy_reflect.workspace = true +bevy_math.workspace = true +bevy_asset.workspace = true +bevy_pbr.workspace = true +bevy_utils.workspace = true slotmap = "1.0" earcutr = "0.5" cdt = "0.1" diff --git a/crates/jackdaw_geometry/src/halfedge/lift.rs b/crates/jackdaw_geometry/src/halfedge/lift.rs index 1cc7cfe4..3a41ebf9 100644 --- a/crates/jackdaw_geometry/src/halfedge/lift.rs +++ b/crates/jackdaw_geometry/src/halfedge/lift.rs @@ -44,7 +44,7 @@ impl HalfedgeMesh { material_idx: face_idx as u32, loop_first: LoopKey::default(), // patched below loop_count: total as u32, - normal_cache: bevy::math::Vec3::ZERO, + normal_cache: bevy_math::Vec3::ZERO, }); let loop_keys: Vec = face_loops_topology @@ -80,7 +80,7 @@ impl HalfedgeMesh { mesh.faces[face_key].loop_first = loop_keys[0]; // Cache normal (Newell over ring). - let positions: Vec = (0..total) + let positions: Vec = (0..total) .map(|i| t.vertices[face_loops_topology[i].vert as usize].position) .collect(); mesh.faces[face_key].normal_cache = newell_normal(&positions); diff --git a/crates/jackdaw_geometry/src/halfedge/ops/bisect_plane.rs b/crates/jackdaw_geometry/src/halfedge/ops/bisect_plane.rs index 23605465..8078c83a 100644 --- a/crates/jackdaw_geometry/src/halfedge/ops/bisect_plane.rs +++ b/crates/jackdaw_geometry/src/halfedge/ops/bisect_plane.rs @@ -15,7 +15,7 @@ use std::collections::{HashMap, HashSet}; -use bevy::math::Vec3; +use bevy_math::Vec3; use crate::BrushPlane; use crate::halfedge::ops::edge_split::split_edge; diff --git a/crates/jackdaw_geometry/src/halfedge/ops/dissolve_edges.rs b/crates/jackdaw_geometry/src/halfedge/ops/dissolve_edges.rs index 136dbc07..78f54cb9 100644 --- a/crates/jackdaw_geometry/src/halfedge/ops/dissolve_edges.rs +++ b/crates/jackdaw_geometry/src/halfedge/ops/dissolve_edges.rs @@ -108,7 +108,7 @@ fn dissolve_one_edge(mesh: &mut HalfedgeMesh, edge: EdgeKey) -> bool { mesh.faces[f_a].loop_count = f_a_new_count; // Re-cache normal via Newell's method. - let mut ring_positions: Vec = Vec::with_capacity(f_a_new_count as usize); + let mut ring_positions: Vec = Vec::with_capacity(f_a_new_count as usize); { let mut cur = f_a_first; for _ in 0..f_a_new_count { diff --git a/crates/jackdaw_geometry/src/halfedge/ops/dissolve_verts.rs b/crates/jackdaw_geometry/src/halfedge/ops/dissolve_verts.rs index a7ab091c..19744db9 100644 --- a/crates/jackdaw_geometry/src/halfedge/ops/dissolve_verts.rs +++ b/crates/jackdaw_geometry/src/halfedge/ops/dissolve_verts.rs @@ -362,18 +362,18 @@ fn dissolve_valence_n_fallback( .unwrap_or(0); // Compute expected outward normal: average of incident face normals. - let mut expected_normal = bevy::math::Vec3::ZERO; + let mut expected_normal = bevy_math::Vec3::ZERO; for &face in &incident_faces { expected_normal += mesh.faces[face].normal_cache; } let expected_normal = expected_normal.normalize_or_zero(); // Compute the proposed ring's Newell normal and centroid. - let ring_positions: Vec = + let ring_positions: Vec = outer_ring.iter().map(|&k| mesh.verts[k].co).collect(); let ring_normal = crate::newell_normal(&ring_positions); - let ring_centroid: bevy::math::Vec3 = - ring_positions.iter().copied().sum::() / ring_positions.len() as f32; + let ring_centroid: bevy_math::Vec3 = + ring_positions.iter().copied().sum::() / ring_positions.len() as f32; // Determine whether to reverse the ring's winding. let should_reverse = if expected_normal.length_squared() > 0.5 { @@ -383,7 +383,7 @@ fn dissolve_valence_n_fallback( // Symmetric-normal case (e.g. dissolving across a cube edge between // opposing faces): fall back to the brush interior centroid as reference. // The merged face's normal should point AWAY from the interior centroid. - let mut brush_centroid_sum = bevy::math::Vec3::ZERO; + let mut brush_centroid_sum = bevy_math::Vec3::ZERO; let mut count = 0u32; for (k, vert) in mesh.verts.iter() { if k == v { diff --git a/crates/jackdaw_geometry/src/halfedge/ops/edge_bevel.rs b/crates/jackdaw_geometry/src/halfedge/ops/edge_bevel.rs index 3a0a4614..90f4fd44 100644 --- a/crates/jackdaw_geometry/src/halfedge/ops/edge_bevel.rs +++ b/crates/jackdaw_geometry/src/halfedge/ops/edge_bevel.rs @@ -223,7 +223,7 @@ fn bevel_one_edge( } if let Ok(face) = create_face_from_verts_with_material(mesh, ring, Some(*mat)) { // Re-cache normal. - let positions: Vec = ring.iter().map(|&k| mesh.verts[k].co).collect(); + let positions: Vec = ring.iter().map(|&k| mesh.verts[k].co).collect(); mesh.faces[face].normal_cache = newell_normal(&positions); } } @@ -244,7 +244,7 @@ fn bevel_one_edge( // can end up wound clockwise viewed from outside, the face renders as a // backface, and the chamfer looks dark / inverted. let candidate_ring: [VertKey; 4] = [v0_a, v0_b, v1_b, v1_a]; - let candidate_positions: Vec = + let candidate_positions: Vec = candidate_ring.iter().map(|&k| mesh.verts[k].co).collect(); let candidate_normal = newell_normal(&candidate_positions); let chamfer_ring: [VertKey; 4] = if outward_expected.length_squared() > 1e-6 @@ -260,7 +260,7 @@ fn bevel_one_edge( else { return; }; - let positions: Vec = chamfer_ring.iter().map(|&k| mesh.verts[k].co).collect(); + let positions: Vec = chamfer_ring.iter().map(|&k| mesh.verts[k].co).collect(); mesh.faces[chamfer_face].normal_cache = newell_normal(&positions); new_faces.push(chamfer_face); @@ -285,10 +285,10 @@ fn bevel_one_edge( fn walk_dir_along_edge_in_face( mesh: &HalfedgeMesh, lp_at_v0: LoopKey, - v0_pos: bevy::math::Vec3, - v1_pos: bevy::math::Vec3, + v0_pos: bevy_math::Vec3, + v1_pos: bevy_math::Vec3, e: EdgeKey, -) -> bevy::math::Vec3 { +) -> bevy_math::Vec3 { if mesh.loops[lp_at_v0].edge == e { // The face's walk leaves v0 along e, heading toward v1. v1_pos - v0_pos diff --git a/crates/jackdaw_geometry/src/halfedge/ops/edge_slide.rs b/crates/jackdaw_geometry/src/halfedge/ops/edge_slide.rs index 85291aec..1150edd7 100644 --- a/crates/jackdaw_geometry/src/halfedge/ops/edge_slide.rs +++ b/crates/jackdaw_geometry/src/halfedge/ops/edge_slide.rs @@ -10,7 +10,7 @@ use std::collections::{HashMap, HashSet}; -use bevy::math::Vec3; +use bevy_math::Vec3; use crate::halfedge::cycles::radial_walk; use crate::halfedge::types::*; diff --git a/crates/jackdaw_geometry/src/halfedge/ops/extrude_face_region.rs b/crates/jackdaw_geometry/src/halfedge/ops/extrude_face_region.rs index 6f4616a2..b6de5a45 100644 --- a/crates/jackdaw_geometry/src/halfedge/ops/extrude_face_region.rs +++ b/crates/jackdaw_geometry/src/halfedge/ops/extrude_face_region.rs @@ -4,7 +4,7 @@ //! //! Single-face MVP -- multi-face region merging deferred. -use bevy::math::Vec3; +use bevy_math::Vec3; use crate::halfedge::cycles::{disk_insert_edge, radial_insert_loop}; use crate::halfedge::types::*; diff --git a/crates/jackdaw_geometry/src/halfedge/ops/face_create.rs b/crates/jackdaw_geometry/src/halfedge/ops/face_create.rs index ffcc6af0..2c4e998e 100644 --- a/crates/jackdaw_geometry/src/halfedge/ops/face_create.rs +++ b/crates/jackdaw_geometry/src/halfedge/ops/face_create.rs @@ -52,7 +52,7 @@ pub fn create_face_from_verts_with_material( material_idx, loop_first: LoopKey::default(), loop_count: n as u32, - normal_cache: bevy::math::Vec3::ZERO, + normal_cache: bevy_math::Vec3::ZERO, }); // Allocate loops. @@ -86,7 +86,7 @@ pub fn create_face_from_verts_with_material( mesh.faces[face].loop_first = loops[0]; // Cache normal. - let positions: Vec = verts.iter().map(|&k| mesh.verts[k].co).collect(); + let positions: Vec = verts.iter().map(|&k| mesh.verts[k].co).collect(); mesh.faces[face].normal_cache = newell_normal(&positions); Ok(face) diff --git a/crates/jackdaw_geometry/src/halfedge/ops/face_poke.rs b/crates/jackdaw_geometry/src/halfedge/ops/face_poke.rs index b65f83e8..ee17ccb4 100644 --- a/crates/jackdaw_geometry/src/halfedge/ops/face_poke.rs +++ b/crates/jackdaw_geometry/src/halfedge/ops/face_poke.rs @@ -23,7 +23,7 @@ //! - `Degenerate` if the face has fewer than 3 loops. //! - `PointNotInFacePlane` if `|face.normal_cache.dot(point - centroid)| > 1e-3`. -use bevy::math::Vec3; +use bevy_math::Vec3; use crate::halfedge::cycles::radial_remove_loop; use crate::halfedge::ops::face_create::create_face_from_verts_with_material; diff --git a/crates/jackdaw_geometry/src/halfedge/ops/face_retriangulate.rs b/crates/jackdaw_geometry/src/halfedge/ops/face_retriangulate.rs index 689b4189..3ca3130c 100644 --- a/crates/jackdaw_geometry/src/halfedge/ops/face_retriangulate.rs +++ b/crates/jackdaw_geometry/src/halfedge/ops/face_retriangulate.rs @@ -34,7 +34,7 @@ //! - All constraint edges lie on the face plane (caller projects). //! - Interior points are on or near the face plane (caller ensures). -use bevy::math::{Vec2, Vec3}; +use bevy_math::{Vec2, Vec3}; use crate::compute_face_tangent_axes; use crate::halfedge::cycles::radial_remove_loop; diff --git a/crates/jackdaw_geometry/src/halfedge/ops/inset_face.rs b/crates/jackdaw_geometry/src/halfedge/ops/inset_face.rs index 096a88cb..a1270355 100644 --- a/crates/jackdaw_geometry/src/halfedge/ops/inset_face.rs +++ b/crates/jackdaw_geometry/src/halfedge/ops/inset_face.rs @@ -8,7 +8,7 @@ //! - N wall edges (`old[i]` -> `new[i]`) //! - N side-quad faces (CCW from outside): \[`old[i]`, `old[i+1]`, `new[i+1]`, `new[i]`\] -use bevy::math::Vec3; +use bevy_math::Vec3; use crate::halfedge::cycles::{disk_insert_edge, radial_insert_loop}; use crate::halfedge::types::*; diff --git a/crates/jackdaw_geometry/src/halfedge/ops/remove_doubles.rs b/crates/jackdaw_geometry/src/halfedge/ops/remove_doubles.rs index 5780c409..44646b0a 100644 --- a/crates/jackdaw_geometry/src/halfedge/ops/remove_doubles.rs +++ b/crates/jackdaw_geometry/src/halfedge/ops/remove_doubles.rs @@ -35,7 +35,7 @@ pub fn remove_doubles(mesh: &mut HalfedgeMesh, distance: f32) -> Result = + let mut keyed: Vec<(VertKey, bevy_math::Vec3)> = mesh.verts.iter().map(|(k, v)| (k, v.co)).collect(); keyed.sort_by_key(|(k, _)| { use slotmap::Key; diff --git a/crates/jackdaw_geometry/src/halfedge/ops/vertex_bevel.rs b/crates/jackdaw_geometry/src/halfedge/ops/vertex_bevel.rs index 06b2c573..01157212 100644 --- a/crates/jackdaw_geometry/src/halfedge/ops/vertex_bevel.rs +++ b/crates/jackdaw_geometry/src/halfedge/ops/vertex_bevel.rs @@ -22,7 +22,7 @@ use std::collections::HashSet; -use bevy::math::Vec3; +use bevy_math::Vec3; use crate::halfedge::cycles::{disk_remove_edge, disk_walk, radial_remove_loop, radial_walk}; use crate::halfedge::ops::face_create::create_face_from_verts_with_material; diff --git a/crates/jackdaw_geometry/src/halfedge/ops/vertex_slide.rs b/crates/jackdaw_geometry/src/halfedge/ops/vertex_slide.rs index 67f8f29c..d7318ba5 100644 --- a/crates/jackdaw_geometry/src/halfedge/ops/vertex_slide.rs +++ b/crates/jackdaw_geometry/src/halfedge/ops/vertex_slide.rs @@ -33,7 +33,7 @@ pub fn vertex_slide( // Snapshot start positions and target positions FIRST (before mutating). If we mutate // a vert that's used as a target by another vert in the selection, we'd corrupt the // remaining slides. - let mut moves: Vec<(VertKey, bevy::math::Vec3)> = Vec::with_capacity(verts.len()); + let mut moves: Vec<(VertKey, bevy_math::Vec3)> = Vec::with_capacity(verts.len()); for &v in verts { let Some(vert) = mesh.verts.get(v) else { continue; diff --git a/crates/jackdaw_geometry/src/halfedge/types.rs b/crates/jackdaw_geometry/src/halfedge/types.rs index 185f0ea0..b631e867 100644 --- a/crates/jackdaw_geometry/src/halfedge/types.rs +++ b/crates/jackdaw_geometry/src/halfedge/types.rs @@ -1,4 +1,4 @@ -use bevy::math::Vec3; +use bevy_math::Vec3; use bitflags::bitflags; use slotmap::{SlotMap, new_key_type}; diff --git a/crates/jackdaw_geometry/src/lib.rs b/crates/jackdaw_geometry/src/lib.rs index 852c5498..77632b5c 100644 --- a/crates/jackdaw_geometry/src/lib.rs +++ b/crates/jackdaw_geometry/src/lib.rs @@ -1,6 +1,10 @@ use std::collections::HashMap; -use bevy::prelude::*; +use bevy_asset::prelude::*; +use bevy_math::prelude::*; +use bevy_pbr::prelude::*; +use bevy_reflect::prelude::*; +use bevy_utils::prelude::*; pub mod topology; pub use topology::{ diff --git a/crates/jackdaw_geometry/src/newell.rs b/crates/jackdaw_geometry/src/newell.rs index 131b8eda..f649660d 100644 --- a/crates/jackdaw_geometry/src/newell.rs +++ b/crates/jackdaw_geometry/src/newell.rs @@ -2,7 +2,7 @@ //! Sums (yi + yi+1)(zi - zi+1) etc. across all edges; works for //! non-planar polygons and is stable on near-degenerate inputs. -use bevy::math::Vec3; +use bevy_math::Vec3; pub fn newell_normal(ring: &[Vec3]) -> Vec3 { let n = ring.len(); diff --git a/crates/jackdaw_geometry/src/topology.rs b/crates/jackdaw_geometry/src/topology.rs index c402ffc0..b5248a5f 100644 --- a/crates/jackdaw_geometry/src/topology.rs +++ b/crates/jackdaw_geometry/src/topology.rs @@ -5,9 +5,9 @@ use std::borrow::Cow; use std::collections::HashMap; -use bevy::math::{Vec2, Vec3}; -use bevy::prelude::*; -use bevy::reflect::Reflect; +use bevy_ecs::prelude::*; +use bevy_math::{Vec2, Vec3}; +use bevy_reflect::Reflect; use bitflags::bitflags; use serde::{Deserialize, Serialize}; diff --git a/crates/jackdaw_geometry/src/topology_convexity.rs b/crates/jackdaw_geometry/src/topology_convexity.rs index bd3a9b43..d2ca5b07 100644 --- a/crates/jackdaw_geometry/src/topology_convexity.rs +++ b/crates/jackdaw_geometry/src/topology_convexity.rs @@ -2,7 +2,7 @@ //! Tests whether every vertex lies on or inside every face's plane (within EPSILON). //! O(verts * faces). For typical brush sizes this is sub-millisecond. -use bevy::math::Vec3; +use bevy_math::Vec3; use crate::topology::BrushTopology; diff --git a/crates/jackdaw_geometry/src/triangulate.rs b/crates/jackdaw_geometry/src/triangulate.rs index e5d85d39..b6cd20d4 100644 --- a/crates/jackdaw_geometry/src/triangulate.rs +++ b/crates/jackdaw_geometry/src/triangulate.rs @@ -3,7 +3,7 @@ //! Projects the 3D ring onto its plane (via `compute_face_tangent_axes`), //! runs earcut in 2D, returns triangles indexed back into the original ring. -use bevy::math::Vec3; +use bevy_math::Vec3; use crate::compute_face_tangent_axes; diff --git a/crates/jackdaw_geometry/tests/diagnose_dissolve_render.rs b/crates/jackdaw_geometry/tests/diagnose_dissolve_render.rs index 89491caa..ca9cf3eb 100644 --- a/crates/jackdaw_geometry/tests/diagnose_dissolve_render.rs +++ b/crates/jackdaw_geometry/tests/diagnose_dissolve_render.rs @@ -3,7 +3,7 @@ reason = "diagnostic test prints geometry to stdout for inspection" )] -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::halfedge::{ HalfedgeMesh, ops::{dissolve_verts::dissolve_verts, subdivide::subdivide}, diff --git a/crates/jackdaw_geometry/tests/halfedge_bisect_plane.rs b/crates/jackdaw_geometry/tests/halfedge_bisect_plane.rs index 8e487712..26b28125 100644 --- a/crates/jackdaw_geometry/tests/halfedge_bisect_plane.rs +++ b/crates/jackdaw_geometry/tests/halfedge_bisect_plane.rs @@ -1,7 +1,7 @@ //! Tests for `bisect_plane`: split an `HalfedgeMesh` along a plane, //! verify cap polygon and side classification. -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::BrushPlane; use jackdaw_geometry::halfedge::HalfedgeMesh; use jackdaw_geometry::halfedge::ops::bisect_plane::{BisectKeep, bisect_plane}; diff --git a/crates/jackdaw_geometry/tests/halfedge_bridge.rs b/crates/jackdaw_geometry/tests/halfedge_bridge.rs index c9b0c043..82be0f23 100644 --- a/crates/jackdaw_geometry/tests/halfedge_bridge.rs +++ b/crates/jackdaw_geometry/tests/halfedge_bridge.rs @@ -1,4 +1,4 @@ -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::halfedge::ops::bridge_edge_loops::bridge_edge_loops; use jackdaw_geometry::halfedge::{HalfedgeMesh, ops::edge_create::create_edge}; diff --git a/crates/jackdaw_geometry/tests/halfedge_contextual_create.rs b/crates/jackdaw_geometry/tests/halfedge_contextual_create.rs index 9cffe2fb..8353cd4f 100644 --- a/crates/jackdaw_geometry/tests/halfedge_contextual_create.rs +++ b/crates/jackdaw_geometry/tests/halfedge_contextual_create.rs @@ -1,4 +1,4 @@ -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::halfedge::{ HalfedgeMesh, ops::contextual_create::{ContextualResult, contextual_create}, diff --git a/crates/jackdaw_geometry/tests/halfedge_cycles.rs b/crates/jackdaw_geometry/tests/halfedge_cycles.rs index 48bf1e7f..7780a815 100644 --- a/crates/jackdaw_geometry/tests/halfedge_cycles.rs +++ b/crates/jackdaw_geometry/tests/halfedge_cycles.rs @@ -1,4 +1,4 @@ -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::halfedge::{ EdgeFlag, EdgeKey, HalfedgeEdge, HalfedgeMesh, cycles::{disk_insert_edge, disk_walk}, diff --git a/crates/jackdaw_geometry/tests/halfedge_dissolve_edges.rs b/crates/jackdaw_geometry/tests/halfedge_dissolve_edges.rs index 424bf948..224f8845 100644 --- a/crates/jackdaw_geometry/tests/halfedge_dissolve_edges.rs +++ b/crates/jackdaw_geometry/tests/halfedge_dissolve_edges.rs @@ -24,8 +24,8 @@ fn dissolve_a_loop_cut_edge_merges_two_quads_back_into_one() { fn dissolve_boundary_edge_errors() { // A boundary edge has only 1 incident loop. We can't merge two faces if there's only one. let mut mesh = HalfedgeMesh::default(); - let v0 = mesh.add_vert(bevy::math::Vec3::ZERO); - let v1 = mesh.add_vert(bevy::math::Vec3::X); + let v0 = mesh.add_vert(bevy_math::Vec3::ZERO); + let v1 = mesh.add_vert(bevy_math::Vec3::X); let e = jackdaw_geometry::halfedge::ops::edge_create::create_edge(&mut mesh, v0, v1); // No face on this edge. let result = dissolve_edges(&mut mesh, &[e]); diff --git a/crates/jackdaw_geometry/tests/halfedge_dissolve_verts.rs b/crates/jackdaw_geometry/tests/halfedge_dissolve_verts.rs index a5339d2b..c99fd3bc 100644 --- a/crates/jackdaw_geometry/tests/halfedge_dissolve_verts.rs +++ b/crates/jackdaw_geometry/tests/halfedge_dissolve_verts.rs @@ -10,7 +10,7 @@ fn dissolve_midpoint_vert_from_edge_split_restores_original_edge() { // Build a two-quad mesh (two quads sharing an edge) and split the shared edge. // The split produces a valence-2 midpoint vert; dissolving it restores the original. let mut mesh = HalfedgeMesh::default(); - use bevy::math::Vec3; + use bevy_math::Vec3; // Quad A: (0,0,0)-(1,0,0)-(1,1,0)-(0,1,0) let v0 = mesh.add_vert(Vec3::new(0.0, 0.0, 0.0)); let v1 = mesh.add_vert(Vec3::new(1.0, 0.0, 0.0)); @@ -82,7 +82,7 @@ fn dissolve_corner_produces_outward_facing_merged_face() { incident_faces.insert(mesh.loops[lp].face); } } - let mut expected = bevy::math::Vec3::ZERO; + let mut expected = bevy_math::Vec3::ZERO; for f in &incident_faces { expected += mesh.faces[*f].normal_cache; } diff --git a/crates/jackdaw_geometry/tests/halfedge_edge_bevel.rs b/crates/jackdaw_geometry/tests/halfedge_edge_bevel.rs index cbe613dc..f4e4ee90 100644 --- a/crates/jackdaw_geometry/tests/halfedge_edge_bevel.rs +++ b/crates/jackdaw_geometry/tests/halfedge_edge_bevel.rs @@ -1,4 +1,4 @@ -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::halfedge::{ HalfedgeMesh, ops::edge_bevel::{BevelError, edge_bevel}, diff --git a/crates/jackdaw_geometry/tests/halfedge_edge_slide.rs b/crates/jackdaw_geometry/tests/halfedge_edge_slide.rs index c3844f85..b3c7d957 100644 --- a/crates/jackdaw_geometry/tests/halfedge_edge_slide.rs +++ b/crates/jackdaw_geometry/tests/halfedge_edge_slide.rs @@ -1,4 +1,4 @@ -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::halfedge::ops::loop_cut::loop_cut; use jackdaw_geometry::halfedge::{HalfedgeMesh, ops::edge_slide::edge_slide}; use jackdaw_jsn::Brush; diff --git a/crates/jackdaw_geometry/tests/halfedge_extrude.rs b/crates/jackdaw_geometry/tests/halfedge_extrude.rs index 82b61ee3..3d289f89 100644 --- a/crates/jackdaw_geometry/tests/halfedge_extrude.rs +++ b/crates/jackdaw_geometry/tests/halfedge_extrude.rs @@ -1,4 +1,4 @@ -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::halfedge::{HalfedgeMesh, ops::extrude_face_region::extrude_face_region}; use jackdaw_jsn::Brush; diff --git a/crates/jackdaw_geometry/tests/halfedge_face_poke.rs b/crates/jackdaw_geometry/tests/halfedge_face_poke.rs index 422e4694..a77f31f7 100644 --- a/crates/jackdaw_geometry/tests/halfedge_face_poke.rs +++ b/crates/jackdaw_geometry/tests/halfedge_face_poke.rs @@ -1,4 +1,4 @@ -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::halfedge::{ FaceKey, HalfedgeMesh, ops::face_poke::{PokeError, face_poke}, diff --git a/crates/jackdaw_geometry/tests/halfedge_face_retriangulate.rs b/crates/jackdaw_geometry/tests/halfedge_face_retriangulate.rs index 0ba5899b..2cffae06 100644 --- a/crates/jackdaw_geometry/tests/halfedge_face_retriangulate.rs +++ b/crates/jackdaw_geometry/tests/halfedge_face_retriangulate.rs @@ -7,7 +7,7 @@ //! Steiner points and constraint edges, and verifies the resulting //! topology. -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::halfedge::{ FaceKey, HalfedgeMesh, VertKey, ops::face_retriangulate::{RetriangulateError, face_retriangulate}, diff --git a/crates/jackdaw_geometry/tests/halfedge_flatten.rs b/crates/jackdaw_geometry/tests/halfedge_flatten.rs index b0d66d4b..d68071c4 100644 --- a/crates/jackdaw_geometry/tests/halfedge_flatten.rs +++ b/crates/jackdaw_geometry/tests/halfedge_flatten.rs @@ -14,7 +14,7 @@ fn cuboid_round_trip_preserves_counts_and_positions() { // Vertex positions preserved (compare as sorted set; order may differ). let mut orig_pos: Vec<_> = original.vertices.iter().map(|v| v.position).collect(); let mut flat_pos: Vec<_> = flattened.vertices.iter().map(|v| v.position).collect(); - let cmp = |a: &bevy::math::Vec3, b: &bevy::math::Vec3| { + let cmp = |a: &bevy_math::Vec3, b: &bevy_math::Vec3| { a.x.partial_cmp(&b.x) .unwrap() .then(a.y.partial_cmp(&b.y).unwrap()) diff --git a/crates/jackdaw_geometry/tests/halfedge_knife.rs b/crates/jackdaw_geometry/tests/halfedge_knife.rs index 59d300e6..4eebfc82 100644 --- a/crates/jackdaw_geometry/tests/halfedge_knife.rs +++ b/crates/jackdaw_geometry/tests/halfedge_knife.rs @@ -12,7 +12,7 @@ //! step; the operator code lives in `src/brush/topology_ops/knife.rs` //! in the editor crate. -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::halfedge::{ EdgeKey, FaceKey, HalfedgeMesh, VertKey, ops::{edge_split::split_edge, face_poke::face_poke, face_split::split_face}, diff --git a/crates/jackdaw_geometry/tests/halfedge_lift.rs b/crates/jackdaw_geometry/tests/halfedge_lift.rs index 9108fe7f..51bc8e97 100644 --- a/crates/jackdaw_geometry/tests/halfedge_lift.rs +++ b/crates/jackdaw_geometry/tests/halfedge_lift.rs @@ -22,22 +22,22 @@ fn cuboid_lift_each_face_has_axis_aligned_normal_cache() { let mut found_pos_y = false; let mut found_neg_y = false; for (_, face) in mesh.faces.iter() { - if face.normal_cache.distance(bevy::math::Vec3::Z) < 1e-3 { + if face.normal_cache.distance(bevy_math::Vec3::Z) < 1e-3 { found_pos_z = true; } - if face.normal_cache.distance(bevy::math::Vec3::NEG_Z) < 1e-3 { + if face.normal_cache.distance(bevy_math::Vec3::NEG_Z) < 1e-3 { found_neg_z = true; } - if face.normal_cache.distance(bevy::math::Vec3::X) < 1e-3 { + if face.normal_cache.distance(bevy_math::Vec3::X) < 1e-3 { found_pos_x = true; } - if face.normal_cache.distance(bevy::math::Vec3::NEG_X) < 1e-3 { + if face.normal_cache.distance(bevy_math::Vec3::NEG_X) < 1e-3 { found_neg_x = true; } - if face.normal_cache.distance(bevy::math::Vec3::Y) < 1e-3 { + if face.normal_cache.distance(bevy_math::Vec3::Y) < 1e-3 { found_pos_y = true; } - if face.normal_cache.distance(bevy::math::Vec3::NEG_Y) < 1e-3 { + if face.normal_cache.distance(bevy_math::Vec3::NEG_Y) < 1e-3 { found_neg_y = true; } } diff --git a/crates/jackdaw_geometry/tests/halfedge_loop_cut.rs b/crates/jackdaw_geometry/tests/halfedge_loop_cut.rs index f80e2bde..9ce63dd7 100644 --- a/crates/jackdaw_geometry/tests/halfedge_loop_cut.rs +++ b/crates/jackdaw_geometry/tests/halfedge_loop_cut.rs @@ -1,4 +1,4 @@ -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::halfedge::{HalfedgeMesh, ops::loop_cut::loop_cut}; use jackdaw_jsn::Brush; diff --git a/crates/jackdaw_geometry/tests/halfedge_types.rs b/crates/jackdaw_geometry/tests/halfedge_types.rs index da15463b..7081fa59 100644 --- a/crates/jackdaw_geometry/tests/halfedge_types.rs +++ b/crates/jackdaw_geometry/tests/halfedge_types.rs @@ -1,4 +1,4 @@ -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::halfedge::{HalfedgeMesh, VertFlag}; #[test] diff --git a/crates/jackdaw_geometry/tests/halfedge_vertex_bevel.rs b/crates/jackdaw_geometry/tests/halfedge_vertex_bevel.rs index bd1f0214..940d62fe 100644 --- a/crates/jackdaw_geometry/tests/halfedge_vertex_bevel.rs +++ b/crates/jackdaw_geometry/tests/halfedge_vertex_bevel.rs @@ -1,4 +1,4 @@ -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::halfedge::{ HalfedgeMesh, ops::vertex_bevel::{VertexBevelError, vertex_bevel}, diff --git a/crates/jackdaw_geometry/tests/halfedge_vertex_slide.rs b/crates/jackdaw_geometry/tests/halfedge_vertex_slide.rs index 90789e39..651f1975 100644 --- a/crates/jackdaw_geometry/tests/halfedge_vertex_slide.rs +++ b/crates/jackdaw_geometry/tests/halfedge_vertex_slide.rs @@ -1,4 +1,4 @@ -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::halfedge::{HalfedgeMesh, ops::vertex_slide::vertex_slide}; use jackdaw_jsn::Brush; diff --git a/crates/jackdaw_geometry/tests/newell.rs b/crates/jackdaw_geometry/tests/newell.rs index 99bc55f4..70ce7293 100644 --- a/crates/jackdaw_geometry/tests/newell.rs +++ b/crates/jackdaw_geometry/tests/newell.rs @@ -1,4 +1,4 @@ -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::newell::newell_normal; #[test] diff --git a/crates/jackdaw_geometry/tests/topology_basics.rs b/crates/jackdaw_geometry/tests/topology_basics.rs index 9a24ddd3..3c8235ff 100644 --- a/crates/jackdaw_geometry/tests/topology_basics.rs +++ b/crates/jackdaw_geometry/tests/topology_basics.rs @@ -1,4 +1,4 @@ -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::{ AttributeStack, BrushTopology, EdgeFlag, MeshEdge, MeshLoop, MeshPoly, MeshVert, }; diff --git a/crates/jackdaw_geometry/tests/topology_convexity.rs b/crates/jackdaw_geometry/tests/topology_convexity.rs index 2cacdadb..2ffacf2b 100644 --- a/crates/jackdaw_geometry/tests/topology_convexity.rs +++ b/crates/jackdaw_geometry/tests/topology_convexity.rs @@ -1,4 +1,4 @@ -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::is_convex_topology; use jackdaw_jsn::Brush; diff --git a/crates/jackdaw_geometry/tests/triangulate.rs b/crates/jackdaw_geometry/tests/triangulate.rs index d56a80e6..908267c9 100644 --- a/crates/jackdaw_geometry/tests/triangulate.rs +++ b/crates/jackdaw_geometry/tests/triangulate.rs @@ -1,4 +1,4 @@ -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::{newell_normal, triangulate::triangulate_polygon}; #[test] diff --git a/crates/jackdaw_jsn/Cargo.toml b/crates/jackdaw_jsn/Cargo.toml index 66e7c86e..09b1d93c 100644 --- a/crates/jackdaw_jsn/Cargo.toml +++ b/crates/jackdaw_jsn/Cargo.toml @@ -7,7 +7,23 @@ license = "MIT OR Apache-2.0" repository = "https://github.com/jbuehler23/jackdaw" [dependencies] -bevy.workspace = true +bevy_ecs.workspace = true +bevy_app.workspace = true +bevy_reflect.workspace = true +bevy_asset.workspace = true +bevy_scene.workspace = true +bevy_math.workspace = true +bevy_camera.workspace = true +bevy_transform.workspace = true +bevy_log.workspace = true +bevy_utils.workspace = true +bevy_image.workspace = true +bevy_mesh.workspace = true +bevy_pbr.workspace = true +bevy_color.workspace = true +bevy_derive.workspace = true +bevy_render.workspace = true + jackdaw_geometry.workspace = true serde = { workspace = true, features = ["derive"] } serde_json.workspace = true diff --git a/crates/jackdaw_jsn/src/ast.rs b/crates/jackdaw_jsn/src/ast.rs index d24faf58..823a9c7e 100644 --- a/crates/jackdaw_jsn/src/ast.rs +++ b/crates/jackdaw_jsn/src/ast.rs @@ -1,7 +1,7 @@ use std::collections::{HashMap, HashSet}; -use bevy::reflect::{TypeRegistry, UnnamedField}; -use bevy::{prelude::*, reflect::NamedField}; +use bevy_ecs::prelude::*; +use bevy_reflect::{NamedField, TypeRegistry, UnnamedField}; use crate::format::{JsnAssets, JsnEntity, JsnMetadata, JsnScene}; @@ -239,7 +239,7 @@ impl SceneJsnAst { // named fields to array indices when the JSON value is an array (e.g., Vec3 // serializes as [x, y, z] but reflection paths use `translation.x`). -use bevy::reflect::{EnumInfo, TypeInfo, TypeRegistration, VariantInfo}; +use bevy_reflect::{EnumInfo, TypeInfo, TypeRegistration, VariantInfo}; /// Resolve a field name to an array index using type info. /// Returns `None` if the type doesn't have named fields or the name isn't found. diff --git a/crates/jackdaw_jsn/src/editor_meta.rs b/crates/jackdaw_jsn/src/editor_meta.rs index 2501dd05..721db6ec 100644 --- a/crates/jackdaw_jsn/src/editor_meta.rs +++ b/crates/jackdaw_jsn/src/editor_meta.rs @@ -17,7 +17,8 @@ //! `jackdaw_runtime` and `jackdaw` re-export both newtypes //! through their preludes. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_reflect::prelude::*; use std::borrow::Cow; /// Picker grouping for a component. Attach via diff --git a/crates/jackdaw_jsn/src/format.rs b/crates/jackdaw_jsn/src/format.rs index ac1df217..558a29b9 100644 --- a/crates/jackdaw_jsn/src/format.rs +++ b/crates/jackdaw_jsn/src/format.rs @@ -1,6 +1,9 @@ use std::collections::HashMap; -use bevy::prelude::*; +use bevy_camera::prelude::*; +use bevy_ecs::prelude::*; +use bevy_math::prelude::*; +use bevy_transform::prelude::*; use serde::{Deserialize, Serialize}; fn is_zero(n: &usize) -> bool { diff --git a/crates/jackdaw_jsn/src/lib.rs b/crates/jackdaw_jsn/src/lib.rs index f4242521..c3fbfe6b 100644 --- a/crates/jackdaw_jsn/src/lib.rs +++ b/crates/jackdaw_jsn/src/lib.rs @@ -5,8 +5,9 @@ mod loader; pub mod mesh_rebuild; pub mod types; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_asset::AssetApp as _; // Re-export core types for consumer convenience pub use editor_meta::{EditorCategory, EditorDescription, EditorHidden, SkipSerialization}; pub use types::{ diff --git a/crates/jackdaw_jsn/src/loader.rs b/crates/jackdaw_jsn/src/loader.rs index 009f0353..ce25bc56 100644 --- a/crates/jackdaw_jsn/src/loader.rs +++ b/crates/jackdaw_jsn/src/loader.rs @@ -1,13 +1,12 @@ -use bevy::{ - asset::{AssetLoader, LoadContext, io::Reader}, - ecs::{ - reflect::AppTypeRegistry, - world::{FromWorld, World}, - }, - prelude::*, - reflect::{TypeRegistryArc, serde::TypedReflectDeserializer}, - scene::DynamicScene, +use bevy_asset::{AssetLoader, LoadContext, io::Reader}; +use bevy_ecs::prelude::*; +use bevy_ecs::{ + reflect::AppTypeRegistry, + world::{FromWorld, World}, }; +use bevy_log::prelude::*; +use bevy_reflect::{TypeRegistryArc, prelude::*, serde::TypedReflectDeserializer}; +use bevy_scene::{DynamicScene, DynamicSceneBuilder}; use serde::de::DeserializeSeed; use crate::format::{JsnEntity, JsnScene, JsnSceneV2}; diff --git a/crates/jackdaw_jsn/src/mesh_rebuild.rs b/crates/jackdaw_jsn/src/mesh_rebuild.rs index 4131c8b5..08e23626 100644 --- a/crates/jackdaw_jsn/src/mesh_rebuild.rs +++ b/crates/jackdaw_jsn/src/mesh_rebuild.rs @@ -1,12 +1,16 @@ -use bevy::{ - asset::{embedded_asset, load_embedded_asset}, - image::{ImageAddressMode, ImageFilterMode, ImageLoaderSettings}, - math::Affine2, - mesh::{Indices, PrimitiveTopology}, - prelude::*, -}; - use crate::types::Brush; +use bevy_app::prelude::*; +use bevy_asset::{embedded_asset, load_embedded_asset, prelude::*}; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_image::{ImageAddressMode, ImageFilterMode, ImageLoaderSettings}; +use bevy_math::{Affine2, prelude::*}; +use bevy_mesh::{Indices, PrimitiveTopology, prelude::*}; +use bevy_pbr::prelude::*; +use bevy_render::alpha::AlphaMode; +use bevy_transform::prelude::*; +use bevy_utils::prelude::*; + use jackdaw_geometry::{ compute_brush_geometry_from_planes, compute_face_tangent_axes, compute_face_uvs, triangulate_polygon, diff --git a/crates/jackdaw_jsn/src/types.rs b/crates/jackdaw_jsn/src/types.rs index 56c731a0..fa97edf4 100644 --- a/crates/jackdaw_jsn/src/types.rs +++ b/crates/jackdaw_jsn/src/types.rs @@ -3,7 +3,12 @@ use std::{ collections::{BTreeMap, HashMap}, }; -use bevy::prelude::*; +use bevy_color::prelude::*; +use bevy_derive::{Deref, DerefMut}; +use bevy_ecs::prelude::*; +use bevy_math::prelude::*; +use bevy_reflect::prelude::*; +use bevy_utils::prelude::*; use serde::{Deserialize, Serialize}; // Re-export geometry types so consumers see them from jackdaw_jsn diff --git a/crates/jackdaw_jsn/tests/brush_bevel_pipeline.rs b/crates/jackdaw_jsn/tests/brush_bevel_pipeline.rs index 3d965c46..b659ac88 100644 --- a/crates/jackdaw_jsn/tests/brush_bevel_pipeline.rs +++ b/crates/jackdaw_jsn/tests/brush_bevel_pipeline.rs @@ -9,7 +9,7 @@ //! match the Newell normal of that ring, and the chamfer's `material_idx` //! should land at the slot index the renderer expects. -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::halfedge::{HalfedgeMesh, ops::edge_bevel::edge_bevel}; use jackdaw_jsn::Brush; diff --git a/crates/jackdaw_jsn/tests/brush_constructors.rs b/crates/jackdaw_jsn/tests/brush_constructors.rs index d13480c3..7425c3a4 100644 --- a/crates/jackdaw_jsn/tests/brush_constructors.rs +++ b/crates/jackdaw_jsn/tests/brush_constructors.rs @@ -1,4 +1,4 @@ -use bevy::math::Vec3; +use bevy_math::Vec3; use jackdaw_geometry::compute_brush_topology; use jackdaw_jsn::{Brush, BrushTopology}; diff --git a/crates/jackdaw_loader/Cargo.toml b/crates/jackdaw_loader/Cargo.toml index 776990f3..636d869f 100644 --- a/crates/jackdaw_loader/Cargo.toml +++ b/crates/jackdaw_loader/Cargo.toml @@ -7,7 +7,10 @@ license = "MIT OR Apache-2.0" repository = "https://github.com/jbuehler23/jackdaw" [dependencies] -bevy.workspace = true +bevy_ecs.workspace = true +bevy_app.workspace = true +bevy_log.workspace = true + # Depend on the internal crate directly: the loader needs access to # the `ffi` module (ExtensionEntry, GameEntry layouts) and to # editor-only registration helpers that `jackdaw_api` deliberately diff --git a/crates/jackdaw_loader/src/lib.rs b/crates/jackdaw_loader/src/lib.rs index 3f9e434e..87082923 100644 --- a/crates/jackdaw_loader/src/lib.rs +++ b/crates/jackdaw_loader/src/lib.rs @@ -48,7 +48,9 @@ use std::ffi::CStr; use std::panic::AssertUnwindSafe; use std::path::{Path, PathBuf}; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_log::prelude::*; use jackdaw_api_internal::JackdawExtension; use jackdaw_api_internal::ffi::{ ENTRY_SYMBOL, ExtensionEntry, GAME_ENTRY_SYMBOL, GameEntry, JackdawExtensionPtr, @@ -75,8 +77,8 @@ pub struct GameCatalog { /// [`LoadedDylibs`]. #[derive(Clone, Copy, Debug)] pub struct LoadedGameEntry { - pub build: unsafe extern "C" fn(*mut bevy::ecs::world::World), - pub teardown: unsafe extern "C" fn(*mut bevy::ecs::world::World), + pub build: unsafe extern "C" fn(*mut World), + pub teardown: unsafe extern "C" fn(*mut World), } /// Sub-directory inside the platform config directory where the @@ -398,8 +400,8 @@ enum OpenedDylib { Game { lib: libloading::Library, name: String, - build: unsafe extern "C" fn(*mut bevy::ecs::world::World), - teardown: unsafe extern "C" fn(*mut bevy::ecs::world::World), + build: unsafe extern "C" fn(*mut bevy_ecs::world::World), + teardown: unsafe extern "C" fn(*mut bevy_ecs::world::World), }, } @@ -570,7 +572,7 @@ fn try_load(app: &mut App, path: &Path) -> Result { // v2 builds take `*mut World`. Call from an exclusive // context: we have `&mut App` here, so deriving // `&mut World` via `world_mut()` is fine. - let world_ptr: *mut bevy::ecs::world::World = std::ptr::from_mut(app.world_mut()); + let world_ptr: *mut bevy_ecs::world::World = std::ptr::from_mut(app.world_mut()); #[expect( clippy::disallowed_methods, reason = "FFI dylib boundary: unwinding across the C ABI is UB. \ @@ -693,7 +695,7 @@ pub fn load_from_path(world: &mut World, path: &Path) -> Result().entries.get(&name).copied(); if let Some(prior_entry) = prior { info!("Hot reload: tearing down prior version of `{name}`"); - let world_ptr: *mut bevy::ecs::world::World = std::ptr::from_mut(world); + let world_ptr: *mut bevy_ecs::world::World = std::ptr::from_mut(world); #[expect( clippy::disallowed_methods, reason = "FFI dylib boundary: unwinding across the C ABI is UB. \ @@ -712,7 +714,7 @@ pub fn load_from_path(world: &mut World, path: &Path) -> Result Result<(libloading::Library, OpenedK fn call_reflect_register_symbol(world: &mut World, lib: &libloading::Library) { use jackdaw_api_internal::ffi::{REFLECT_REGISTER_SYMBOL, ReflectRegisterFn}; - let Some(registry_res) = world.get_resource::() else { + let Some(registry_res) = world.get_resource::() else { debug!("reflect-register: AppTypeRegistry missing, skipping"); return; }; @@ -842,13 +844,13 @@ fn call_reflect_register_symbol(world: &mut World, lib: &libloading::Library) { /// [`ReflectComponent::register_component`] is idempotent, so this sweep /// is safe to run on every dlopen. fn register_derived_component_ids(world: &mut World) { - let reflect_components: Vec = { + let reflect_components: Vec = { let registry = world - .resource::() + .resource::() .read(); registry .iter() - .filter_map(|r| r.data::().cloned()) + .filter_map(|r| r.data::().cloned()) .collect() }; for rc in &reflect_components { diff --git a/crates/jackdaw_node_graph/Cargo.toml b/crates/jackdaw_node_graph/Cargo.toml index 478f6a27..ccc56765 100644 --- a/crates/jackdaw_node_graph/Cargo.toml +++ b/crates/jackdaw_node_graph/Cargo.toml @@ -8,7 +8,23 @@ repository = "https://github.com/jbuehler23/jackdaw" include = ["src/**/*", "Cargo.toml", "LICENSE*"] [dependencies] -bevy.workspace = true +bevy_ecs.workspace = true +bevy_app.workspace = true +bevy_asset.workspace = true +bevy_input.workspace = true +bevy_picking.workspace = true +bevy_ui.workspace = true +bevy_log.workspace = true +bevy_reflect.workspace = true +bevy_math.workspace = true +bevy_ui_render.workspace = true +bevy_color.workspace = true +bevy_utils.workspace = true +bevy_window.workspace = true +bevy_text.workspace = true +bevy_render.workspace = true +bevy_shader.workspace = true + bevy_monitors.workspace = true bevy_enhanced_input.workspace = true jackdaw_widgets.workspace = true @@ -17,5 +33,9 @@ jackdaw_commands.workspace = true jackdaw_jsn.workspace = true serde = { workspace = true, features = ["derive"] } +[dev-dependencies] +bevy_internal.workspace = true +bevy_camera.workspace = true + [lints] workspace = true diff --git a/crates/jackdaw_node_graph/examples/demo.rs b/crates/jackdaw_node_graph/examples/demo.rs index bed0e8eb..4115f95b 100644 --- a/crates/jackdaw_node_graph/examples/demo.rs +++ b/crates/jackdaw_node_graph/examples/demo.rs @@ -13,9 +13,16 @@ //! //! Run with: `cargo run -p jackdaw_node_graph --example demo` -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_camera::Camera2d; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_math::prelude::*; +use bevy_picking::prelude::*; +use bevy_ui::prelude::*; use bevy_enhanced_input::prelude::EnhancedInputPlugin; +use bevy_internal::DefaultPlugins; use jackdaw_feathers::{ EditorFeathersPlugin, text_edit::{self, TextEditProps, TextEditValue}, diff --git a/crates/jackdaw_node_graph/src/add_node_popover.rs b/crates/jackdaw_node_graph/src/add_node_popover.rs index fc5fc2a1..af6c1546 100644 --- a/crates/jackdaw_node_graph/src/add_node_popover.rs +++ b/crates/jackdaw_node_graph/src/add_node_popover.rs @@ -12,10 +12,18 @@ //! filtering and keyboard navigation to match Maya's quick-add UX //! more closely. -use bevy::picking::events::{Click, Pointer}; -use bevy::picking::pointer::PointerButton; -use bevy::prelude::*; -use bevy::ui::UiGlobalTransform; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_input::prelude::*; +use bevy_math::prelude::*; +use bevy_picking::events::{Click, Pointer}; +use bevy_picking::pointer::PointerButton; +use bevy_picking::prelude::*; +use bevy_text::prelude::*; +use bevy_ui::UiGlobalTransform; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; +use bevy_window::prelude::*; use jackdaw_commands::CommandHistory; use crate::canvas::{GraphCanvasViewport, GraphCanvasWorld}; @@ -329,7 +337,7 @@ pub fn on_entry_click( /// Hover highlighting for list entries. pub fn on_entry_over( - event: On>, + event: On>, mut bg: Query<&mut BackgroundColor, With>, ) { if let Ok(mut color) = bg.get_mut(event.event_target()) { @@ -338,7 +346,7 @@ pub fn on_entry_over( } pub fn on_entry_out( - event: On>, + event: On>, mut bg: Query<&mut BackgroundColor, With>, ) { if let Ok(mut color) = bg.get_mut(event.event_target()) { @@ -382,8 +390,8 @@ pub fn on_canvas_right_click( /// (Maya / Blender quick-add pattern). pub fn handle_tab_quick_add( keys: Res>, - windows: Query<&Window, With>, - hover_map: Res, + windows: Query<&Window, With>, + hover_map: Res, viewports: Query<&GraphCanvasViewport>, canvas_worlds: Query<(&GraphCanvasWorld, &UiGlobalTransform)>, registry: Res, diff --git a/crates/jackdaw_node_graph/src/canvas.rs b/crates/jackdaw_node_graph/src/canvas.rs index 47297313..e4da2a79 100644 --- a/crates/jackdaw_node_graph/src/canvas.rs +++ b/crates/jackdaw_node_graph/src/canvas.rs @@ -11,9 +11,14 @@ //! Pan uses middle-mouse drag; zoom uses the scroll wheel, both gated on //! cursor hover over the viewport. -use bevy::input::mouse::{MouseScrollUnit, MouseWheel}; -use bevy::picking::hover::HoverMap; -use bevy::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_input::mouse::{MouseScrollUnit, MouseWheel}; +use bevy_input::prelude::*; +use bevy_math::prelude::*; +use bevy_picking::{hover::HoverMap, prelude::*}; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; use crate::graph::{GraphCanvasView, MAX_ZOOM, MIN_ZOOM}; @@ -99,7 +104,7 @@ pub fn apply_canvas_view( pub fn handle_canvas_pan_zoom( hover_map: Res, mouse_buttons: Res>, - mut motion: MessageReader, + mut motion: MessageReader, mut wheel: MessageReader, viewports: Query<&GraphCanvasViewport>, mut graphs: Query<&mut GraphCanvasView>, diff --git a/crates/jackdaw_node_graph/src/commands.rs b/crates/jackdaw_node_graph/src/commands.rs index 8dca3483..3de81abf 100644 --- a/crates/jackdaw_node_graph/src/commands.rs +++ b/crates/jackdaw_node_graph/src/commands.rs @@ -4,7 +4,10 @@ //! `jackdaw_commands::CommandHistory` can undo/redo it. Commands mutate //! the data layer; UI is kept in sync by systems in `crate::sync`. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_log::prelude::*; +use bevy_math::prelude::*; + use jackdaw_commands::EditorCommand; use crate::graph::{Connection, GraphNode, Terminal, TerminalDirection}; diff --git a/crates/jackdaw_node_graph/src/connection.rs b/crates/jackdaw_node_graph/src/connection.rs index a31e671d..2888f37f 100644 --- a/crates/jackdaw_node_graph/src/connection.rs +++ b/crates/jackdaw_node_graph/src/connection.rs @@ -18,9 +18,16 @@ //! //! Stroke width is in screen pixels and does not scale with canvas zoom. -use bevy::ecs::relationship::Relationship; -use bevy::prelude::*; -use bevy::ui::UiGlobalTransform; +use bevy_asset::prelude::*; +use bevy_ecs::prelude::*; +use bevy_ecs::relationship::Relationship; +use bevy_input::prelude::*; +use bevy_math::prelude::*; +use bevy_picking::prelude::*; +use bevy_ui::UiGlobalTransform; +use bevy_ui::prelude::*; +use bevy_ui_render::prelude::*; +use bevy_utils::prelude::*; use std::collections::HashSet; use crate::canvas::GraphCanvasViewport; @@ -345,7 +352,7 @@ pub fn update_ghost_wire( /// alpha-switching logic this fades wires the user is about to delete. pub fn update_pending_remove_markers( mouse: Res>, - hover_map: Res, + hover_map: Res, terminal_views: Query<&GraphTerminalView>, connections: Query<(Entity, &Connection)>, marked: Query>, diff --git a/crates/jackdaw_node_graph/src/gesture.rs b/crates/jackdaw_node_graph/src/gesture.rs index 1290afee..8224a6f0 100644 --- a/crates/jackdaw_node_graph/src/gesture.rs +++ b/crates/jackdaw_node_graph/src/gesture.rs @@ -3,7 +3,8 @@ //! Exposes the enum and a default-`Idle` resource. Pointer observers //! drive transitions (pan, node move, rect-select, connection drag). -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_math::prelude::*; use std::collections::HashMap; /// Where a drag-to-connect gesture started. diff --git a/crates/jackdaw_node_graph/src/graph.rs b/crates/jackdaw_node_graph/src/graph.rs index 55c52d92..c86c2a5e 100644 --- a/crates/jackdaw_node_graph/src/graph.rs +++ b/crates/jackdaw_node_graph/src/graph.rs @@ -5,7 +5,10 @@ //! `Entity` fields which the JSN serializer rewrites to scene-local indices //! on save and resolves back to live entities on load. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_math::prelude::*; +use bevy_reflect::prelude::*; + use serde::{Deserialize, Serialize}; /// Root marker for a node graph. An entity with this component owns diff --git a/crates/jackdaw_node_graph/src/interaction.rs b/crates/jackdaw_node_graph/src/interaction.rs index e5af4abc..2be689d6 100644 --- a/crates/jackdaw_node_graph/src/interaction.rs +++ b/crates/jackdaw_node_graph/src/interaction.rs @@ -14,10 +14,13 @@ //! 3. `Pointer` -> compute `(old, new)` diffs, queue a //! [`MoveGraphNodesCmd`] on `CommandHistory`, reset gesture to `Idle`. -use bevy::ecs::relationship::Relationship; -use bevy::picking::events::{Click, Drag, DragEnd, DragStart, Pointer}; -use bevy::picking::pointer::PointerButton; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_ecs::relationship::Relationship; +use bevy_input::prelude::*; +use bevy_math::prelude::*; +use bevy_picking::events::{Click, Drag, DragEnd, DragStart, Pointer}; +use bevy_picking::pointer::PointerButton; +use bevy_ui::prelude::*; use jackdaw_commands::CommandHistory; use std::collections::HashMap; diff --git a/crates/jackdaw_node_graph/src/lib.rs b/crates/jackdaw_node_graph/src/lib.rs index d4d100b9..16332f4e 100644 --- a/crates/jackdaw_node_graph/src/lib.rs +++ b/crates/jackdaw_node_graph/src/lib.rs @@ -27,6 +27,7 @@ pub mod registry; pub mod selection; pub mod sync; +use bevy_ui_render::UiMaterialPlugin; pub use canvas::{GraphCanvasViewport, GraphCanvasWorld, canvas, canvas_world}; pub use commands::{ AddGraphNodeCmd, CreateConnectionCmd, MoveGraphNodesCmd, RemoveConnectionCmd, @@ -44,8 +45,9 @@ pub use registry::{NodeTypeDescriptor, NodeTypeRegistry, TerminalDescriptor}; pub use selection::GraphSelection; pub use sync::CanvasWorldIndex; -use bevy::asset::embedded_asset; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_asset::embedded_asset; +use bevy_ecs::prelude::*; use jackdaw_commands::CommandHistory; /// Registers all node-graph types, resources, systems, and assets. @@ -119,7 +121,7 @@ impl Plugin for NodeGraphPlugin { connection::update_connection_endpoints, connection::update_ghost_wire, ) - .after(bevy::ui::UiSystems::Layout), + .after(bevy_ui::UiSystems::Layout), ); // Pointer observers for gesture handling. Terminal observers fire diff --git a/crates/jackdaw_node_graph/src/materials.rs b/crates/jackdaw_node_graph/src/materials.rs index 938ec855..a5df6f90 100644 --- a/crates/jackdaw_node_graph/src/materials.rs +++ b/crates/jackdaw_node_graph/src/materials.rs @@ -7,10 +7,13 @@ //! //! Pattern mirrors `jackdaw_feathers::color_picker::materials`. -use bevy::prelude::*; -use bevy::reflect::TypePath; -use bevy::render::render_resource::*; -use bevy::shader::ShaderRef; +use bevy_asset::prelude::*; +use bevy_ecs::prelude::*; +use bevy_math::prelude::*; +use bevy_reflect::TypePath; +use bevy_render::render_resource::*; +use bevy_shader::ShaderRef; +use bevy_ui_render::prelude::*; const SHADER_CONNECTION_PATH: &str = "embedded://jackdaw_node_graph/shaders/connection.wgsl"; diff --git a/crates/jackdaw_node_graph/src/node_widget.rs b/crates/jackdaw_node_graph/src/node_widget.rs index ccf40559..2b2089af 100644 --- a/crates/jackdaw_node_graph/src/node_widget.rs +++ b/crates/jackdaw_node_graph/src/node_widget.rs @@ -10,7 +10,12 @@ //! [`apply_node_position`] reading from //! [`GraphNode::position`]. -use bevy::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_picking::prelude::*; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; use crate::graph::{GraphNode, GraphNodeSelected, Terminal, TerminalDirection}; use crate::registry::NodeTypeDescriptor; diff --git a/crates/jackdaw_node_graph/src/registry.rs b/crates/jackdaw_node_graph/src/registry.rs index 77cce452..b48e21da 100644 --- a/crates/jackdaw_node_graph/src/registry.rs +++ b/crates/jackdaw_node_graph/src/registry.rs @@ -5,7 +5,8 @@ //! build node UI, populate the "Add Node" context menu, and validate //! connection compatibility. -use bevy::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; use std::collections::{BTreeMap, HashMap}; use crate::graph::TerminalDirection; diff --git a/crates/jackdaw_node_graph/src/selection.rs b/crates/jackdaw_node_graph/src/selection.rs index fee94297..58948249 100644 --- a/crates/jackdaw_node_graph/src/selection.rs +++ b/crates/jackdaw_node_graph/src/selection.rs @@ -5,7 +5,7 @@ //! selection. The API mirrors `src/selection.rs` (`select_single`, `toggle`, //! `extend`, `clear`) so interaction code reads the same. -use bevy::prelude::*; +use bevy_ecs::prelude::*; use crate::graph::GraphNodeSelected; diff --git a/crates/jackdaw_node_graph/src/sync.rs b/crates/jackdaw_node_graph/src/sync.rs index 44e7a888..e1cab2ee 100644 --- a/crates/jackdaw_node_graph/src/sync.rs +++ b/crates/jackdaw_node_graph/src/sync.rs @@ -11,8 +11,14 @@ //! * When a `GraphNode` is removed, despawn the UI entity that views it. //! * Same pattern for `Connection`. -use bevy::ecs::relationship::Relationship; -use bevy::prelude::*; +use bevy_asset::prelude::*; +use bevy_ecs::prelude::*; +use bevy_ecs::relationship::Relationship; +use bevy_log::prelude::*; +use bevy_picking::prelude::*; +use bevy_ui::prelude::*; +use bevy_ui_render::prelude::*; +use bevy_utils::prelude::*; use std::collections::HashMap; use crate::canvas::{GraphCanvasViewport, GraphCanvasWorld}; diff --git a/crates/jackdaw_panels/Cargo.toml b/crates/jackdaw_panels/Cargo.toml index 83223fd0..704546aa 100644 --- a/crates/jackdaw_panels/Cargo.toml +++ b/crates/jackdaw_panels/Cargo.toml @@ -7,7 +7,23 @@ license = "MIT OR Apache-2.0" repository = "https://github.com/jbuehler23/jackdaw" [dependencies] -bevy.workspace = true +bevy_app.workspace = true +bevy_ecs.workspace = true +bevy_ui.workspace = true +bevy_asset.workspace = true +bevy_math.workspace = true +bevy_picking.workspace = true +bevy_color.workspace = true +bevy_utils.workspace = true +bevy_text.workspace = true +bevy_log.workspace = true +bevy_window.workspace = true +bevy_feathers.workspace = true +bevy_input.workspace = true +bevy_input_focus.workspace = true +bevy_time.workspace = true + + serde.workspace = true jackdaw_feathers.workspace = true jackdaw_widgets.workspace = true diff --git a/crates/jackdaw_panels/src/add_window_popup.rs b/crates/jackdaw_panels/src/add_window_popup.rs index ab7fe2ad..19bd09d9 100644 --- a/crates/jackdaw_panels/src/add_window_popup.rs +++ b/crates/jackdaw_panels/src/add_window_popup.rs @@ -1,5 +1,10 @@ -use bevy::prelude::*; -use bevy::ui::UiGlobalTransform; +use bevy_app::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_picking::prelude::*; +use bevy_text::prelude::*; +use bevy_ui::{UiGlobalTransform, prelude::*}; +use bevy_utils::prelude::*; use jackdaw_feathers::tokens; use crate::{ diff --git a/crates/jackdaw_panels/src/area.rs b/crates/jackdaw_panels/src/area.rs index 6c9162c6..547f6eb4 100644 --- a/crates/jackdaw_panels/src/area.rs +++ b/crates/jackdaw_panels/src/area.rs @@ -1,4 +1,6 @@ -use bevy::prelude::*; +use bevy_asset::prelude::*; +use bevy_ecs::prelude::*; +use bevy_text::prelude::*; use serde::{Deserialize, Serialize}; use crate::tree::TabId; diff --git a/crates/jackdaw_panels/src/drag.rs b/crates/jackdaw_panels/src/drag.rs index 06064fe6..09f183b6 100644 --- a/crates/jackdaw_panels/src/drag.rs +++ b/crates/jackdaw_panels/src/drag.rs @@ -1,5 +1,13 @@ -use bevy::prelude::*; -use bevy::ui::UiGlobalTransform; +use bevy_app::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_input::prelude::*; +use bevy_log::prelude::*; +use bevy_math::prelude::*; +use bevy_picking::prelude::*; +use bevy_text::prelude::*; +use bevy_ui::{UiGlobalTransform, prelude::*}; +use bevy_utils::prelude::*; use jackdaw_feathers::tokens; use crate::area::{DockArea, DockTab}; diff --git a/crates/jackdaw_panels/src/layout.rs b/crates/jackdaw_panels/src/layout.rs index 4d347069..752fee0c 100644 --- a/crates/jackdaw_panels/src/layout.rs +++ b/crates/jackdaw_panels/src/layout.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use bevy::prelude::*; +use bevy_ecs::prelude::*; use serde::{Deserialize, Serialize}; use crate::area::{ActiveDockWindow, DockArea, DockTabContent}; diff --git a/crates/jackdaw_panels/src/lib.rs b/crates/jackdaw_panels/src/lib.rs index 71e911fe..6685260e 100644 --- a/crates/jackdaw_panels/src/lib.rs +++ b/crates/jackdaw_panels/src/lib.rs @@ -24,7 +24,7 @@ pub use workspace::{ WorkspaceTabStrip, WorkspacesPersist, }; -use bevy::prelude::*; +use bevy_app::prelude::*; pub struct DockPlugin; diff --git a/crates/jackdaw_panels/src/reconcile.rs b/crates/jackdaw_panels/src/reconcile.rs index a48a3f9d..7be03829 100644 --- a/crates/jackdaw_panels/src/reconcile.rs +++ b/crates/jackdaw_panels/src/reconcile.rs @@ -10,7 +10,12 @@ //! Drag/move/resize operations mutate the tree only; the reconciler //! rebuilds the affected entity sub-tree on the next frame. -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; use jackdaw_feathers::tokens; use crate::area::{ActiveDockWindow, DockArea, DockAreaStyle, DockTab, DockTabContent, DockWindow}; diff --git a/crates/jackdaw_panels/src/registry.rs b/crates/jackdaw_panels/src/registry.rs index 07859a3e..75d3b2a7 100644 --- a/crates/jackdaw_panels/src/registry.rs +++ b/crates/jackdaw_panels/src/registry.rs @@ -1,6 +1,6 @@ use std::{collections::HashMap, sync::Arc}; -use bevy::prelude::*; +use bevy_ecs::prelude::*; pub type DockWindowBuildFn = Arc; diff --git a/crates/jackdaw_panels/src/sidebar.rs b/crates/jackdaw_panels/src/sidebar.rs index 52117f54..597f3d24 100644 --- a/crates/jackdaw_panels/src/sidebar.rs +++ b/crates/jackdaw_panels/src/sidebar.rs @@ -1,5 +1,9 @@ -use bevy::picking::pointer::PointerButton; -use bevy::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_picking::{pointer::PointerButton, prelude::*}; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; use jackdaw_feathers::tokens; use crate::reconcile::LeafBinding; diff --git a/crates/jackdaw_panels/src/split.rs b/crates/jackdaw_panels/src/split.rs index ed9435fc..ed65854c 100644 --- a/crates/jackdaw_panels/src/split.rs +++ b/crates/jackdaw_panels/src/split.rs @@ -1,9 +1,12 @@ -use bevy::{ - ecs::{query::QueryFilter, spawn::SpawnableList}, - feathers::cursor::{CursorIconPlugin, EntityCursor, OverrideCursor}, - prelude::*, - window::SystemCursorIcon, -}; +use bevy_app::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_ecs::{query::QueryFilter, spawn::SpawnableList}; +use bevy_feathers::cursor::{CursorIconPlugin, EntityCursor, OverrideCursor}; +use bevy_picking::prelude::*; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; +use bevy_window::SystemCursorIcon; const HANDLE_SIZE: f32 = 3.0; const HANDLE_HOVER_COLOR: Color = Color::srgba(1.0, 1.0, 1.0, 0.12); diff --git a/crates/jackdaw_panels/src/tabs.rs b/crates/jackdaw_panels/src/tabs.rs index 9d9929a0..abe62581 100644 --- a/crates/jackdaw_panels/src/tabs.rs +++ b/crates/jackdaw_panels/src/tabs.rs @@ -1,4 +1,10 @@ -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_picking::prelude::*; +use bevy_text::prelude::*; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; use jackdaw_feathers::{icons::IconFont, tokens}; use lucide_icons::Icon; diff --git a/crates/jackdaw_panels/src/tree.rs b/crates/jackdaw_panels/src/tree.rs index a4750f43..628da7cb 100644 --- a/crates/jackdaw_panels/src/tree.rs +++ b/crates/jackdaw_panels/src/tree.rs @@ -18,7 +18,7 @@ use std::collections::HashMap; -use bevy::prelude::*; +use bevy_ecs::prelude::*; use serde::{Deserialize, Serialize}; use crate::area::DockAreaStyle; diff --git a/crates/jackdaw_panels/src/workspace.rs b/crates/jackdaw_panels/src/workspace.rs index 7cec4ab7..75905872 100644 --- a/crates/jackdaw_panels/src/workspace.rs +++ b/crates/jackdaw_panels/src/workspace.rs @@ -1,4 +1,5 @@ -use bevy::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; use serde::{Deserialize, Serialize}; use crate::layout::LayoutState; diff --git a/crates/jackdaw_panels/src/workspace_tabs.rs b/crates/jackdaw_panels/src/workspace_tabs.rs index 0bdfecca..406ab219 100644 --- a/crates/jackdaw_panels/src/workspace_tabs.rs +++ b/crates/jackdaw_panels/src/workspace_tabs.rs @@ -1,7 +1,14 @@ use std::collections::HashMap as StdHashMap; -use bevy::input_focus::InputFocus; -use bevy::prelude::*; +use bevy_asset::prelude::*; +use bevy_color::prelude::*; +use bevy_ecs::prelude::*; +use bevy_input_focus::InputFocus; +use bevy_picking::prelude::*; +use bevy_text::prelude::*; +use bevy_time::prelude::*; +use bevy_ui::prelude::*; +use bevy_utils::prelude::*; use jackdaw_feathers::text_edit::{ self, EditorTextEdit, TextEditCommitEvent, TextEditConfig, TextEditProps, }; diff --git a/crates/jackdaw_remote/Cargo.toml b/crates/jackdaw_remote/Cargo.toml index 94d28af2..5c60ffb9 100644 --- a/crates/jackdaw_remote/Cargo.toml +++ b/crates/jackdaw_remote/Cargo.toml @@ -7,7 +7,14 @@ license = "MIT OR Apache-2.0" repository = "https://github.com/jbuehler23/jackdaw" [dependencies] -bevy.workspace = true +bevy_ecs.workspace = true +bevy_app.workspace = true +bevy_asset.workspace = true +bevy_transform.workspace = true +bevy_remote.workspace = true +bevy_log.workspace = true +bevy_reflect.workspace = true + serde = { workspace = true, features = ["derive"] } serde_json.workspace = true diff --git a/crates/jackdaw_remote/src/lib.rs b/crates/jackdaw_remote/src/lib.rs index a7f014f1..6f2ea73a 100644 --- a/crates/jackdaw_remote/src/lib.rs +++ b/crates/jackdaw_remote/src/lib.rs @@ -2,10 +2,9 @@ mod methods; pub mod scene_snapshot; pub mod schema; -use bevy::{ - prelude::*, - remote::{RemotePlugin, http::RemoteHttpPlugin}, -}; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_remote::{RemotePlugin, http::RemoteHttpPlugin}; use methods::jackdaw_app_info_handler; use scene_snapshot::scene_snapshot_handler; @@ -90,7 +89,7 @@ impl Plugin for JackdawRemotePlugin { // If RemotePlugin was already added by the game before us, // inject our custom methods via the RemoteMethods resource. // We check if our method is already registered by attempting to get it. - use bevy::remote::RemoteMethods; + use bevy_remote::RemoteMethods; let world = app.world_mut(); @@ -108,14 +107,14 @@ impl Plugin for JackdawRemotePlugin { let system_id = world.register_system(jackdaw_app_info_handler); world.resource_mut::().insert( "jackdaw/app_info", - bevy::remote::RemoteMethodSystemId::Instant(system_id), + bevy_remote::RemoteMethodSystemId::Instant(system_id), ); } if needs_scene_snapshot { let system_id = world.register_system(scene_snapshot_handler); world.resource_mut::().insert( "jackdaw/scene_snapshot", - bevy::remote::RemoteMethodSystemId::Instant(system_id), + bevy_remote::RemoteMethodSystemId::Instant(system_id), ); } } diff --git a/crates/jackdaw_remote/src/methods.rs b/crates/jackdaw_remote/src/methods.rs index 141616aa..264da78e 100644 --- a/crates/jackdaw_remote/src/methods.rs +++ b/crates/jackdaw_remote/src/methods.rs @@ -1,4 +1,7 @@ -use bevy::{prelude::*, reflect::TypeRegistry, remote::BrpResult}; +use bevy_ecs::prelude::*; +use bevy_log::prelude::*; +use bevy_reflect::TypeRegistry; +use bevy_remote::BrpResult; use serde_json::Value; use std::path::Path; @@ -120,11 +123,11 @@ pub fn generate_component_definitions(type_registry: Res) { /// Build a `JsnComponentDef` from a Bevy `TypeInfo`. fn build_component_def( registry: &TypeRegistry, - type_info: &bevy::reflect::TypeInfo, + type_info: &bevy_reflect::TypeInfo, ) -> JsnComponentDef { let mut fields = std::collections::HashMap::new(); - if let bevy::reflect::TypeInfo::Struct(struct_info) = type_info { + if let bevy_reflect::TypeInfo::Struct(struct_info) = type_info { for i in 0..struct_info.field_len() { let field = struct_info.field_at(i).unwrap(); let field_name = field.name().to_string(); @@ -152,10 +155,10 @@ fn build_component_def( /// preserving hand-edits on existing fields. fn merge_fields_from_registry( registry: &TypeRegistry, - type_info: &bevy::reflect::TypeInfo, + type_info: &bevy_reflect::TypeInfo, existing: &mut JsnComponentDef, ) { - if let bevy::reflect::TypeInfo::Struct(struct_info) = type_info { + if let bevy_reflect::TypeInfo::Struct(struct_info) = type_info { for i in 0..struct_info.field_len() { let field = struct_info.field_at(i).unwrap(); let field_name = field.name(); diff --git a/crates/jackdaw_remote/src/scene_snapshot.rs b/crates/jackdaw_remote/src/scene_snapshot.rs index f0d1d6a8..946d15a2 100644 --- a/crates/jackdaw_remote/src/scene_snapshot.rs +++ b/crates/jackdaw_remote/src/scene_snapshot.rs @@ -1,16 +1,16 @@ use std::any::TypeId; use std::collections::HashMap; -use bevy::{ - asset::ReflectHandle, - ecs::reflect::AppTypeRegistry, - prelude::*, - reflect::{ - TypeRegistry, - serde::{ReflectSerializerProcessor, TypedReflectSerializer}, - }, - remote::BrpResult, +use bevy_asset::ReflectHandle; +use bevy_ecs::prelude::*; +use bevy_ecs::reflect::AppTypeRegistry; +use bevy_reflect::{ + PartialReflect, TypeRegistry, + serde::{ReflectSerializerProcessor, TypedReflectSerializer}, }; +use bevy_remote::BrpResult; +use bevy_transform::prelude::*; + use serde::{Serialize, Serializer}; use serde_json::Value; diff --git a/crates/jackdaw_runtime/Cargo.toml b/crates/jackdaw_runtime/Cargo.toml index 3481040f..32ebc3cd 100644 --- a/crates/jackdaw_runtime/Cargo.toml +++ b/crates/jackdaw_runtime/Cargo.toml @@ -7,12 +7,26 @@ license = "MIT OR Apache-2.0" repository = "https://github.com/jbuehler23/jackdaw" [dependencies] -bevy.workspace = true +bevy_ecs.workspace = true +bevy_app.workspace = true +bevy_reflect.workspace = true +bevy_image.workspace = true +bevy_asset.workspace = true +bevy_derive.workspace = true +bevy_transform.workspace = true +bevy_camera.workspace = true +bevy_log.workspace = true +bevy_scene.workspace = true + jackdaw_jsn.workspace = true jackdaw_geometry.workspace = true serde.workspace = true serde_json.workspace = true thiserror = "2" +[dev-dependencies] +bevy_internal.workspace = true +bevy_math.workspace = true + [lints] workspace = true diff --git a/crates/jackdaw_runtime/src/lib.rs b/crates/jackdaw_runtime/src/lib.rs index 3acac83e..228373d7 100644 --- a/crates/jackdaw_runtime/src/lib.rs +++ b/crates/jackdaw_runtime/src/lib.rs @@ -3,14 +3,21 @@ use std::collections::{HashMap, HashSet}; use std::fmt::{self, Formatter}; use std::path::{Path, PathBuf}; -use bevy::asset::{ - AssetLoader, LoadContext, ReflectAsset, ReflectHandle, UntypedHandle, io::Reader, +use bevy_app::prelude::*; +use bevy_asset::{ + AssetLoader, LoadContext, ReflectAsset, ReflectHandle, UntypedHandle, io::Reader, prelude::*, }; -use bevy::ecs::reflect::AppTypeRegistry; -use bevy::image::ImageLoaderSettings; -use bevy::prelude::*; -use bevy::reflect::serde::{ReflectDeserializerProcessor, TypedReflectDeserializer}; -use bevy::reflect::{TypeRegistration, TypeRegistry}; +use bevy_camera::prelude::*; +use bevy_derive::Deref; +use bevy_ecs::prelude::*; +use bevy_ecs::reflect::AppTypeRegistry; +use bevy_image::{Image, ImageLoaderSettings}; +use bevy_log::prelude::*; +use bevy_reflect::serde::{ReflectDeserializerProcessor, TypedReflectDeserializer}; +use bevy_reflect::std_traits::ReflectDefault; +use bevy_reflect::{PartialReflect, TypePath, TypeRegistration, TypeRegistry}; +use bevy_scene::prelude::*; +use bevy_transform::prelude::*; use jackdaw_jsn::JsnPlugin; use jackdaw_jsn::format::{JsnAssets, JsnCatalog, JsnScene, JsnSceneV2}; use serde::Deserializer; @@ -181,13 +188,13 @@ pub enum JackdawLoadError { /// asset content. Pair with Bevy's `file_watcher` feature to get /// hot reload of `assets/scene.jsn` in the standalone runner. fn clear_modified_scene_roots( - mut events: bevy::ecs::message::MessageReader>, + mut events: bevy_ecs::message::MessageReader>, roots: Query<(Entity, &JackdawSceneRoot, Option<&Children>), With>, mut commands: Commands, ) { - use bevy::asset::AssetEvent; + use bevy_asset::AssetEvent; - let modified: Vec> = events + let modified: Vec> = events .read() .filter_map(|event| match event { AssetEvent::Modified { id } | AssetEvent::LoadedWithDependencies { id } => Some(*id), @@ -314,13 +321,13 @@ fn spawn_scene_entities( if type_path == TRANSFORM_TYPE_PATH { if let Some(t) = - ::from_reflect(reflected.as_ref()) + ::from_reflect(reflected.as_ref()) { local_transform = t; } } else if type_path == VISIBILITY_TYPE_PATH { if let Some(v) = - ::from_reflect(reflected.as_ref()) + ::from_reflect(reflected.as_ref()) { local_visibility = v; } @@ -478,7 +485,7 @@ fn load_inline_assets( } } else { asset_server - .load::(&resolved) + .load::(&resolved) .untyped() }; local_assets.insert(name.clone(), handle); @@ -585,7 +592,7 @@ fn apply_catalog(world: &mut World, jsn: &JsnCatalog) { world.resource_mut::().handles = handles; } -/// Mirrors `bevy::asset::io::file::FileAssetReader::get_base_path` +/// Mirrors `bevy_asset::io::file::FileAssetReader::get_base_path` /// and returns the candidate catalog path. Falls back through /// `BEVY_ASSET_ROOT`, `CARGO_MANIFEST_DIR`, and the executable's /// directory. The catalog itself lives at `/.jsn/catalog.jsn`, diff --git a/crates/jackdaw_runtime/tests/catalog_loading.rs b/crates/jackdaw_runtime/tests/catalog_loading.rs index 93905ac4..19f72543 100644 --- a/crates/jackdaw_runtime/tests/catalog_loading.rs +++ b/crates/jackdaw_runtime/tests/catalog_loading.rs @@ -5,7 +5,8 @@ use std::path::PathBuf; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_internal::MinimalPlugins; use jackdaw_runtime::{JackdawCatalog, JackdawCatalogPath, JackdawPlugin}; #[test] @@ -34,10 +35,10 @@ fn project_catalog_populates_resource() { let mut app = App::new(); app.add_plugins(MinimalPlugins); - app.add_plugins(bevy::transform::TransformPlugin); - app.add_plugins(bevy::asset::AssetPlugin::default()); - app.add_plugins(bevy::scene::ScenePlugin); - app.add_plugins(bevy::image::ImagePlugin::default()); + app.add_plugins(bevy_transform::TransformPlugin); + app.add_plugins(bevy_asset::AssetPlugin::default()); + app.add_plugins(bevy_scene::ScenePlugin); + app.add_plugins(bevy_image::ImagePlugin::default()); app.insert_resource(JackdawCatalogPath(catalog_path.clone())); app.add_plugins(JackdawPlugin); @@ -62,9 +63,9 @@ fn project_catalog_populates_resource() { fn missing_catalog_leaves_resource_empty() { let mut app = App::new(); app.add_plugins(MinimalPlugins); - app.add_plugins(bevy::transform::TransformPlugin); - app.add_plugins(bevy::asset::AssetPlugin::default()); - app.add_plugins(bevy::scene::ScenePlugin); + app.add_plugins(bevy_transform::TransformPlugin); + app.add_plugins(bevy_asset::AssetPlugin::default()); + app.add_plugins(bevy_scene::ScenePlugin); app.insert_resource(JackdawCatalogPath(PathBuf::from( "/definitely/does/not/exist/catalog.jsn", ))); diff --git a/crates/jackdaw_runtime/tests/insert_observer_global_transform.rs b/crates/jackdaw_runtime/tests/insert_observer_global_transform.rs index d1085cc4..8ec283b2 100644 --- a/crates/jackdaw_runtime/tests/insert_observer_global_transform.rs +++ b/crates/jackdaw_runtime/tests/insert_observer_global_transform.rs @@ -6,8 +6,14 @@ use std::path::PathBuf; use std::sync::{Arc, Mutex}; -use bevy::prelude::*; -use bevy::reflect::TypePath; +use bevy_app::prelude::*; +use bevy_asset::Assets; +use bevy_ecs::prelude::*; +use bevy_internal::MinimalPlugins; +use bevy_math::prelude::*; +use bevy_reflect::TypePath; +use bevy_reflect::prelude::*; +use bevy_transform::prelude::*; use jackdaw_jsn::format::{JsnAssets, JsnEntity, JsnHeader, JsnMetadata, JsnScene}; use jackdaw_runtime::{JackdawPlugin, JackdawScene, JackdawSceneRoot}; use serde_json::json; @@ -30,9 +36,9 @@ struct InsertObservation(Arc>>); fn on_insert_observer_sees_propagated_global_transform() { let mut app = App::new(); app.add_plugins(MinimalPlugins); - app.add_plugins(bevy::transform::TransformPlugin); - app.add_plugins(bevy::asset::AssetPlugin::default()); - app.add_plugins(bevy::scene::ScenePlugin); + app.add_plugins(bevy_transform::TransformPlugin); + app.add_plugins(bevy_asset::AssetPlugin::default()); + app.add_plugins(bevy_scene::ScenePlugin); app.add_plugins(JackdawPlugin); app.register_type::(); diff --git a/crates/jackdaw_rustc_wrapper/src/lib.rs b/crates/jackdaw_rustc_wrapper/src/lib.rs index 3d40abd0..fdbbd1e9 100644 --- a/crates/jackdaw_rustc_wrapper/src/lib.rs +++ b/crates/jackdaw_rustc_wrapper/src/lib.rs @@ -9,7 +9,7 @@ //! * `--extern bevy=` becomes //! `--extern bevy=$JACKDAW_SDK_DYLIB`. The user's Cargo.toml still //! declares `bevy = "0.18"` so bevy's proc macros find it via -//! `CARGO_MANIFEST_DIR` and emit `::bevy::...` paths. Cargo compiles +//! `CARGO_MANIFEST_DIR` and emit `::bevy_...` paths. Cargo compiles //! real bevy into the user's target dir; the resulting rlib is //! ignored because the wrapper points the `--extern` at //! `libjackdaw_sdk.so`. The extra compile is a one-time cost that diff --git a/crates/jackdaw_sdk/Cargo.toml b/crates/jackdaw_sdk/Cargo.toml index d0ae45e2..94e82a50 100644 --- a/crates/jackdaw_sdk/Cargo.toml +++ b/crates/jackdaw_sdk/Cargo.toml @@ -14,7 +14,6 @@ repository = "https://github.com/jbuehler23/jackdaw" crate-type = ["lib", "dylib"] [dependencies] -bevy.workspace = true jackdaw_api.workspace = true [lints] diff --git a/crates/jackdaw_sdk/src/lib.rs b/crates/jackdaw_sdk/src/lib.rs index b43634a2..174ab20a 100644 --- a/crates/jackdaw_sdk/src/lib.rs +++ b/crates/jackdaw_sdk/src/lib.rs @@ -32,8 +32,6 @@ /// referencing those unqualified will need to disambiguate; globbing /// both is still the best UX since authors rarely touch the overlap. pub mod prelude { - // using the bevy-defined exports over the BEI-defined ones. - pub use bevy::prelude::{Cancel, Press, Release, *}; pub use jackdaw_api::prelude::*; } @@ -45,8 +43,3 @@ pub use jackdaw_api::{ ExtensionContext, ExtensionKind, ExtensionPoint, HierarchyWindow, InspectorWindow, JackdawExtension, MenuEntryDescriptor, PanelContext, WindowDescriptor, jsn, op, pie, runtime, }; - -/// Bevy root surface for extension code walking bevy paths beyond -/// the prelude. Safe to glob: none of the explicit `jackdaw_api` -/// re-exports above are items bevy defines at its root. -pub use bevy::*; diff --git a/crates/jackdaw_widgets/Cargo.toml b/crates/jackdaw_widgets/Cargo.toml index 96d95e7c..1d513385 100644 --- a/crates/jackdaw_widgets/Cargo.toml +++ b/crates/jackdaw_widgets/Cargo.toml @@ -7,7 +7,14 @@ license = "MIT OR Apache-2.0" repository = "https://github.com/jbuehler23/jackdaw" [dependencies] -bevy.workspace = true +bevy_ecs.workspace = true +bevy_app.workspace = true +bevy_input.workspace = true +bevy_window.workspace = true +bevy_ui.workspace = true +bevy_feathers.workspace = true +bevy_picking.workspace = true + bevy_monitors.workspace = true bevy_enhanced_input.workspace = true diff --git a/crates/jackdaw_widgets/src/collapsible.rs b/crates/jackdaw_widgets/src/collapsible.rs index 10b4c5ef..36625710 100644 --- a/crates/jackdaw_widgets/src/collapsible.rs +++ b/crates/jackdaw_widgets/src/collapsible.rs @@ -1,4 +1,6 @@ -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_ui::prelude::*; pub struct CollapsiblePlugin; diff --git a/crates/jackdaw_widgets/src/context_menu.rs b/crates/jackdaw_widgets/src/context_menu.rs index b349b499..da4fd42e 100644 --- a/crates/jackdaw_widgets/src/context_menu.rs +++ b/crates/jackdaw_widgets/src/context_menu.rs @@ -1,5 +1,7 @@ -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; use bevy_enhanced_input::prelude::{Press, *}; +use bevy_input::prelude::*; /// System set containing the context menu close systems. /// Order your context menu openers `.after(ContextMenuCloseSet)` to avoid @@ -37,12 +39,10 @@ pub struct ContextMenuDismissAction; fn spawn_context_menu_input_context(mut commands: Commands) { commands.spawn(( ContextMenuInputContext, - actions!( - ContextMenuInputContext[( - Action::::new(), - bindings!((KeyCode::Escape, Press::default())) - )] - ), + related!(Actions[( + Action::::new(), + related!(Bindings[IntoBindingBundle::into_binding_bundle((KeyCode::Escape, Press::default()))]) + )]), )); } diff --git a/crates/jackdaw_widgets/src/file_browser.rs b/crates/jackdaw_widgets/src/file_browser.rs index 869169b5..f28bd22b 100644 --- a/crates/jackdaw_widgets/src/file_browser.rs +++ b/crates/jackdaw_widgets/src/file_browser.rs @@ -1,4 +1,5 @@ -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; pub struct FileBrowserPlugin; diff --git a/crates/jackdaw_widgets/src/lib.rs b/crates/jackdaw_widgets/src/lib.rs index f43928b1..2a4c7a09 100644 --- a/crates/jackdaw_widgets/src/lib.rs +++ b/crates/jackdaw_widgets/src/lib.rs @@ -6,12 +6,12 @@ pub mod menu_bar; pub mod split_panel; pub mod tree_view; -use bevy::app::{PluginGroup, PluginGroupBuilder}; +use bevy_app::{PluginGroup, PluginGroupBuilder}; pub struct EditorWidgetsPlugins; impl PluginGroup for EditorWidgetsPlugins { - fn build(self) -> bevy::app::PluginGroupBuilder { + fn build(self) -> bevy_app::PluginGroupBuilder { PluginGroupBuilder::start::() .add(split_panel::SplitPanelPlugin) .add(tree_view::TreeViewPlugin) diff --git a/crates/jackdaw_widgets/src/list_view.rs b/crates/jackdaw_widgets/src/list_view.rs index e15e7583..a80dc3bf 100644 --- a/crates/jackdaw_widgets/src/list_view.rs +++ b/crates/jackdaw_widgets/src/list_view.rs @@ -1,4 +1,5 @@ -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; /// Marker for a list view container #[derive(Component)] diff --git a/crates/jackdaw_widgets/src/menu_bar.rs b/crates/jackdaw_widgets/src/menu_bar.rs index 0a3019ac..207c10f3 100644 --- a/crates/jackdaw_widgets/src/menu_bar.rs +++ b/crates/jackdaw_widgets/src/menu_bar.rs @@ -1,4 +1,6 @@ -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_input::prelude::*; pub struct MenuBarPlugin; diff --git a/crates/jackdaw_widgets/src/split_panel.rs b/crates/jackdaw_widgets/src/split_panel.rs index ee88e838..5aa11271 100644 --- a/crates/jackdaw_widgets/src/split_panel.rs +++ b/crates/jackdaw_widgets/src/split_panel.rs @@ -1,9 +1,10 @@ -use bevy::{ - feathers::cursor::{CursorIconPlugin, EntityCursor, OverrideCursor}, - prelude::*, - window::SystemCursorIcon, -}; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_feathers::cursor::{CursorIconPlugin, EntityCursor, OverrideCursor}; use bevy_monitors::prelude::{Mutation, NotifyChanged}; +use bevy_picking::prelude::*; +use bevy_ui::prelude::*; +use bevy_window::SystemCursorIcon; #[derive(Component)] pub struct PanelGroup { diff --git a/crates/jackdaw_widgets/src/tree_view.rs b/crates/jackdaw_widgets/src/tree_view.rs index f84a8232..e1845c83 100644 --- a/crates/jackdaw_widgets/src/tree_view.rs +++ b/crates/jackdaw_widgets/src/tree_view.rs @@ -1,4 +1,6 @@ -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_ui::prelude::*; /// Marker for the tree view container #[derive(Component)] diff --git a/examples/basic.rs b/examples/basic.rs index 8d223997..5f9c8045 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -1,13 +1,15 @@ -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw::prelude::*; fn main() -> AppExit { App::new() // log errors instead of panicking - .set_error_handler(bevy::ecs::error::error) + .set_error_handler(bevy_ecs::error::error) .add_plugins(( DefaultPlugins, EnhancedInputPlugin, + #[cfg(feature = "avian")] PhysicsPlugins::default(), EditorPlugins::default(), )) diff --git a/examples/components_in_editor.rs b/examples/components_in_editor.rs index 1bf8d47f..4b33fe84 100644 --- a/examples/components_in_editor.rs +++ b/examples/components_in_editor.rs @@ -8,20 +8,21 @@ //! //! Run: `cargo run --example components_in_editor` -use avian3d::prelude::PhysicsPlugins; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use bevy_enhanced_input::prelude::EnhancedInputPlugin; use jackdaw::prelude::*; fn main() -> AppExit { App::new() // log errors instead of panicking - .set_error_handler(bevy::ecs::error::error) + .set_error_handler(bevy_ecs::error::error) // Ambient plugins at the binary boundary. Editor crates // assert presence, so user plugins can add the same // plugins without a duplicate panic. .add_plugins(( DefaultPlugins, + #[cfg(feature = "avian")] PhysicsPlugins::default(), EnhancedInputPlugin, EditorPlugins::default(), diff --git a/examples/embedded_game.rs b/examples/embedded_game.rs index 954da36a..b58d5af4 100644 --- a/examples/embedded_game.rs +++ b/examples/embedded_game.rs @@ -17,15 +17,17 @@ //! scaffold will follow; keeping a working copy in-tree so the //! embedded path stays compile-checked as the extension API evolves. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw::prelude::*; fn main() -> AppExit { App::new() // log errors instead of panicking - .set_error_handler(bevy::ecs::error::error) + .set_error_handler(bevy_ecs::error::error) .add_plugins(( DefaultPlugins, + #[cfg(feature = "avian")] PhysicsPlugins::default(), EnhancedInputPlugin, EditorPlugins::default() diff --git a/examples/extension/add_operator.rs b/examples/extension/add_operator.rs index a00b4198..228d6a56 100644 --- a/examples/extension/add_operator.rs +++ b/examples/extension/add_operator.rs @@ -1,14 +1,16 @@ //! Shows how to register a minimal operator in a Jackdaw extension. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw::prelude::*; fn main() -> AppExit { App::new() // log errors instead of panicking - .set_error_handler(bevy::ecs::error::error) + .set_error_handler(bevy_ecs::error::error) .add_plugins(( DefaultPlugins, + #[cfg(feature = "avian")] PhysicsPlugins::default(), EnhancedInputPlugin, EditorPlugins::default() diff --git a/examples/extension/add_window.rs b/examples/extension/add_window.rs index 731f7d5e..b02b7bdd 100644 --- a/examples/extension/add_window.rs +++ b/examples/extension/add_window.rs @@ -1,6 +1,7 @@ //! Extends the `extend_panel` example by moving its contents into an own window. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw::prelude::*; use jackdaw_feathers::{ button::{ButtonProps, button}, @@ -10,9 +11,10 @@ use jackdaw_feathers::{ fn main() -> AppExit { App::new() // log errors instead of panicking - .set_error_handler(bevy::ecs::error::error) + .set_error_handler(bevy_ecs::error::error) .add_plugins(( DefaultPlugins, + #[cfg(feature = "avian")] PhysicsPlugins::default(), EnhancedInputPlugin, EditorPlugins::default() diff --git a/examples/extension/call_operator.rs b/examples/extension/call_operator.rs index abd7b288..714deccb 100644 --- a/examples/extension/call_operator.rs +++ b/examples/extension/call_operator.rs @@ -1,14 +1,16 @@ //! Shows how to call a builtin operator from a custom operator. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw::prelude::*; fn main() -> AppExit { App::new() // log errors instead of panicking - .set_error_handler(bevy::ecs::error::error) + .set_error_handler(bevy_ecs::error::error) .add_plugins(( DefaultPlugins, + #[cfg(feature = "avian")] PhysicsPlugins::default(), EnhancedInputPlugin, EditorPlugins::default() diff --git a/examples/extension/extend_window.rs b/examples/extension/extend_window.rs index 2afae3aa..bb06c2ed 100644 --- a/examples/extension/extend_window.rs +++ b/examples/extension/extend_window.rs @@ -1,6 +1,7 @@ //! Extends the `minimal_operator` example by adding new content to a panel. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw::prelude::*; use jackdaw_feathers::{ button::{ButtonProps, button}, @@ -10,9 +11,10 @@ use jackdaw_feathers::{ fn main() -> AppExit { App::new() // log errors instead of panicking - .set_error_handler(bevy::ecs::error::error) + .set_error_handler(bevy_ecs::error::error) .add_plugins(( DefaultPlugins, + #[cfg(feature = "avian")] PhysicsPlugins::default(), EnhancedInputPlugin, EditorPlugins::default() diff --git a/examples/extension/keybinding.rs b/examples/extension/keybinding.rs index e73d1e76..11d1cd4f 100644 --- a/examples/extension/keybinding.rs +++ b/examples/extension/keybinding.rs @@ -2,16 +2,18 @@ //! Keybindings in Jackdaw use `bevy_enhanced_input` (BEI), so before reading this example, //! you should take a look at its documentation at . -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use bevy_enhanced_input::prelude::{Press, *}; use jackdaw::prelude::*; fn main() -> AppExit { App::new() // log errors instead of panicking - .set_error_handler(bevy::ecs::error::error) + .set_error_handler(bevy_ecs::error::error) .add_plugins(( DefaultPlugins, + #[cfg(feature = "avian")] PhysicsPlugins::default(), EnhancedInputPlugin, EditorPlugins::default() diff --git a/examples/extension/menu_entry.rs b/examples/extension/menu_entry.rs index d6d7ed5c..294ffade 100644 --- a/examples/extension/menu_entry.rs +++ b/examples/extension/menu_entry.rs @@ -1,14 +1,16 @@ //! Adds a new entry to the "Add" menu that spawns a cone. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw::{brush::LastUsedMaterial, prelude::*}; fn main() -> AppExit { App::new() // log errors instead of panicking - .set_error_handler(bevy::ecs::error::error) + .set_error_handler(bevy_ecs::error::error) .add_plugins(( DefaultPlugins, + #[cfg(feature = "avian")] PhysicsPlugins::default(), EnhancedInputPlugin, EditorPlugins::default() diff --git a/examples/extension/minimal_extension.rs b/examples/extension/minimal_extension.rs index e85f0e8d..40cc9095 100644 --- a/examples/extension/minimal_extension.rs +++ b/examples/extension/minimal_extension.rs @@ -1,14 +1,16 @@ //! Shows how to create and register a minimal Jackdaw extension. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw::prelude::*; fn main() -> AppExit { App::new() // log errors instead of panicking - .set_error_handler(bevy::ecs::error::error) + .set_error_handler(bevy_ecs::error::error) .add_plugins(( DefaultPlugins, + #[cfg(feature = "avian")] PhysicsPlugins::default(), EnhancedInputPlugin, EditorPlugins::default() diff --git a/examples/extension/modal.rs b/examples/extension/modal.rs index 103c97f4..cbd8036c 100644 --- a/examples/extension/modal.rs +++ b/examples/extension/modal.rs @@ -1,14 +1,16 @@ //! Creates a new window chock-full of all our widgets. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw::prelude::*; fn main() -> AppExit { App::new() // log errors instead of panicking - .set_error_handler(bevy::ecs::error::error) + .set_error_handler(bevy_ecs::error::error) .add_plugins(( DefaultPlugins, + #[cfg(feature = "avian")] PhysicsPlugins::default(), EnhancedInputPlugin, EditorPlugins::default() diff --git a/examples/extension/widgets.rs b/examples/extension/widgets.rs index 3af87f97..3fc1fb5d 100644 --- a/examples/extension/widgets.rs +++ b/examples/extension/widgets.rs @@ -1,6 +1,7 @@ //! Creates a new window chock-full of all our widgets. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw::prelude::*; use jackdaw_feathers::{ button::{ButtonProps, button}, @@ -10,9 +11,10 @@ use jackdaw_feathers::{ fn main() -> AppExit { App::new() // log errors instead of panicking - .set_error_handler(bevy::ecs::error::error) + .set_error_handler(bevy_ecs::error::error) .add_plugins(( DefaultPlugins, + #[cfg(feature = "avian")] PhysicsPlugins::default(), EnhancedInputPlugin, EditorPlugins::default() diff --git a/examples/jsn_load.rs b/examples/jsn_load.rs index e749471f..11464a0d 100644 --- a/examples/jsn_load.rs +++ b/examples/jsn_load.rs @@ -7,13 +7,14 @@ //! The scene includes lights, brushes, and any other entities //! saved from the editor. You only need to provide a camera. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_runtime::prelude::*; fn main() -> AppExit { App::new() // log errors instead of panicking - .set_error_handler(bevy::ecs::error::error) + .set_error_handler(bevy_ecs::error::error) .add_plugins((DefaultPlugins, JackdawPlugin)) .add_systems(Startup, setup) .run() diff --git a/examples/navmesh_server.rs b/examples/navmesh_server.rs index d5450036..7dfdb038 100644 --- a/examples/navmesh_server.rs +++ b/examples/navmesh_server.rs @@ -12,7 +12,7 @@ use bevy_rerecast::{Mesh3dBackendPlugin, debug::DetailNavmeshGizmo, prelude::*}; fn main() -> AppExit { App::new() // log errors instead of panicking - .set_error_handler(bevy::ecs::error::error) + .set_error_handler(bevy_ecs::error::error) .add_plugins(DefaultPlugins) .add_plugins((RemotePlugin::default(), RemoteHttpPlugin::default())) .add_plugins((NavmeshPlugins::default(), Mesh3dBackendPlugin::default())) diff --git a/examples/remote_game.rs b/examples/remote_game.rs index c2d6bb5a..07973de6 100644 --- a/examples/remote_game.rs +++ b/examples/remote_game.rs @@ -9,13 +9,14 @@ //! //! Run with: `cargo run --example remote_game` -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_remote::prelude::*; fn main() -> AppExit { App::new() // log errors instead of panicking - .set_error_handler(bevy::ecs::error::error) + .set_error_handler(bevy_ecs::error::error) .add_plugins(DefaultPlugins.set(WindowPlugin { primary_window: Some(Window { title: "Jackdaw Remote Test Game".to_string(), diff --git a/src/add_entity_picker.rs b/src/add_entity_picker.rs index bf911478..d9ec4b77 100644 --- a/src/add_entity_picker.rs +++ b/src/add_entity_picker.rs @@ -3,7 +3,8 @@ //! plus extension-contributed `RegisteredMenuEntry` rows under //! `menu == "Add"`. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_api::prelude::*; use jackdaw_feathers::picker::{ Category, Matchable, PickerItems, PickerProps, SelectInput, SpawnItemInput, match_text, @@ -11,10 +12,12 @@ use jackdaw_feathers::picker::{ }; use jackdaw_feathers::tooltip::Tooltip; +#[cfg(feature = "navmesh")] +use crate::entity_ops::EntityAddNavmeshOp; use crate::entity_ops::{ EntityAddCameraOp, EntityAddCubeOp, EntityAddDirectionalLightOp, EntityAddEmptyOp, - EntityAddNavmeshOp, EntityAddPointLightOp, EntityAddPrefabOp, EntityAddSphereOp, - EntityAddSpotLightOp, EntityAddTerrainOp, + EntityAddPointLightOp, EntityAddPrefabOp, EntityAddSphereOp, EntityAddSpotLightOp, + EntityAddTerrainOp, }; /// Marker for the scene-tree Add Entity button. @@ -107,6 +110,7 @@ fn builtin_groups() -> Vec { label: "Empty".into(), category: cameras_entities, }, + #[cfg(feature = "navmesh")] AddMenuItem { action: op_action::(), label: "Navmesh Region".into(), diff --git a/src/alignment_guides.rs b/src/alignment_guides.rs index f0a858f7..6c776175 100644 --- a/src/alignment_guides.rs +++ b/src/alignment_guides.rs @@ -1,4 +1,7 @@ -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_gizmos::prelude::*; +use bevy_reflect::prelude::*; use crate::brush::BrushMeshCache; use crate::default_style; diff --git a/src/app_ops.rs b/src/app_ops.rs index 6492ed00..7ad364ae 100644 --- a/src/app_ops.rs +++ b/src/app_ops.rs @@ -3,7 +3,9 @@ //! home screen. None have keybinds currently; they exist so menus (and //! a future command palette) can dispatch them uniformly. -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_log::prelude::*; use jackdaw_api::prelude::*; pub(crate) fn add_to_extension(ctx: &mut ExtensionContext) { diff --git a/src/asset_browser.rs b/src/asset_browser.rs index d7598776..f406ef93 100644 --- a/src/asset_browser.rs +++ b/src/asset_browser.rs @@ -1,15 +1,14 @@ use std::path::{Path, PathBuf}; use std::sync::{Mutex, mpsc}; -use bevy::{ - asset::RenderAssetUsages, - image::{CompressedImageFormats, ImageSampler, ImageType}, - picking::hover::Hovered, - prelude::*, - render::render_resource::{Extent3d, TextureDimension, TextureSampleType}, - tasks::{AsyncComputeTaskPool, Task, futures_lite::future}, - window::{PrimaryWindow, RawHandleWrapper}, -}; +use bevy_asset::RenderAssetUsages; +use bevy_ecs::prelude::*; +use bevy_image::{CompressedImageFormats, ImageSampler, ImageType}; +use bevy_log::prelude::*; +use bevy_picking::hover::Hovered; +use bevy_render::render_resource::{Extent3d, TextureDimension, TextureSampleType}; +use bevy_tasks::{AsyncComputeTaskPool, Task, futures_lite::future}; +use bevy_window::{PrimaryWindow, RawHandleWrapper}; use jackdaw_feathers::button::ButtonOperatorCall; use jackdaw_feathers::text_edit::TextEditValue; use jackdaw_feathers::tooltip::Tooltip; @@ -693,7 +692,7 @@ fn remove_incompatible_image_nodes( image_nodes: Query<(Entity, &ImageNode)>, images: Res>, ) { - use bevy::render::render_resource::TextureSampleType; + use bevy_render::render_resource::TextureSampleType; for (entity, image_node) in &image_nodes { if let Some(image) = images.get(&image_node.image) { let sample = image.texture_descriptor.format.sample_type(None, None); diff --git a/src/asset_catalog.rs b/src/asset_catalog.rs index b8331025..8ee63a71 100644 --- a/src/asset_catalog.rs +++ b/src/asset_catalog.rs @@ -1,7 +1,10 @@ use std::collections::HashMap; -use bevy::asset::UntypedAssetId; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_asset::UntypedAssetId; +use bevy_ecs::prelude::*; +use bevy_log::prelude::*; + use jackdaw_jsn::format::{JsnAssets, JsnCatalog, JsnHeader}; /// Project-level asset catalog for cross-scene deduplication. diff --git a/src/brush/edit_mode_systems.rs b/src/brush/edit_mode_systems.rs index 4a7dafad..305383a5 100644 --- a/src/brush/edit_mode_systems.rs +++ b/src/brush/edit_mode_systems.rs @@ -6,7 +6,7 @@ //! not lift an `HalfedgeMesh` (it operates on the plane representation directly //! until A.4.x). -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_geometry::halfedge::{FaceKey, HalfedgeMesh, VertKey}; use jackdaw_jsn::Brush; diff --git a/src/brush/gizmo_overlay.rs b/src/brush/gizmo_overlay.rs index 06886e38..48e4721e 100644 --- a/src/brush/gizmo_overlay.rs +++ b/src/brush/gizmo_overlay.rs @@ -1,4 +1,4 @@ -use bevy::prelude::*; +use bevy_ecs::prelude::*; use super::interaction::{ BrushDragState, EdgeDragState, FaceExtrudeMode, VertexDragConstraint, VertexDragState, diff --git a/src/brush/hull.rs b/src/brush/hull.rs index a20bf033..37a74e8d 100644 --- a/src/brush/hull.rs +++ b/src/brush/hull.rs @@ -1,7 +1,8 @@ use std::collections::HashSet; -use avian3d::parry::transformation::convex_hull; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_math::prelude::*; +use parry3d::transformation::convex_hull; use jackdaw_geometry::{EPSILON, compute_brush_topology, sort_face_vertices_by_winding}; use jackdaw_jsn::{Brush, BrushFaceData, BrushPlane}; diff --git a/src/brush/interaction.rs b/src/brush/interaction.rs index fe57551a..e7b85e55 100644 --- a/src/brush/interaction.rs +++ b/src/brush/interaction.rs @@ -1,4 +1,5 @@ -use bevy::{input_focus::InputFocus, prelude::*}; +use bevy_ecs::prelude::*; +use bevy_input_focus::InputFocus; use crate::default_style; use crate::{ diff --git a/src/brush/knife_mode.rs b/src/brush/knife_mode.rs index f2f70760..16111966 100644 --- a/src/brush/knife_mode.rs +++ b/src/brush/knife_mode.rs @@ -62,9 +62,10 @@ //! Cut-through (project the cut through the whole brush //! so the back face is cut simultaneously) is filed as task #97. -use bevy::prelude::*; -use bevy::ui::ui_transform::UiGlobalTransform; -use bevy::window::PrimaryWindow; +use bevy_ecs::prelude::*; +use bevy_log::prelude::*; +use bevy_ui::ui_transform::UiGlobalTransform; +use bevy_window::PrimaryWindow; use jackdaw_geometry::halfedge::ops::edge_split::split_edge; use jackdaw_geometry::halfedge::ops::face_poke::face_poke; use jackdaw_geometry::halfedge::ops::face_split::split_face; diff --git a/src/brush/mesh.rs b/src/brush/mesh.rs index 0a026714..61934998 100644 --- a/src/brush/mesh.rs +++ b/src/brush/mesh.rs @@ -1,11 +1,9 @@ -use bevy::{ - asset::{embedded_asset, load_embedded_asset}, - image::{ImageAddressMode, ImageFilterMode, ImageLoaderSettings}, - light::{NotShadowCaster, NotShadowReceiver}, - math::Affine2, - mesh::{Indices, PrimitiveTopology}, - prelude::*, -}; +use bevy_asset::{embedded_asset, load_embedded_asset}; +use bevy_ecs::prelude::*; +use bevy_image::{ImageAddressMode, ImageFilterMode, ImageLoaderSettings}; +use bevy_light::{NotShadowCaster, NotShadowReceiver}; +use bevy_math::Affine2; +use bevy_mesh::{Indices, PrimitiveTopology}; use super::{BrushFaceEntity, BrushMaterialPalette, BrushMeshCache, BrushPreview}; use crate::default_style; diff --git a/src/brush/mod.rs b/src/brush/mod.rs index baeabb2b..aeb05c49 100644 --- a/src/brush/mod.rs +++ b/src/brush/mod.rs @@ -10,7 +10,8 @@ pub mod preview; pub mod topology_migration; pub mod topology_ops; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_reflect::prelude::*; use crate::commands::EditorCommand; diff --git a/src/brush/preview.rs b/src/brush/preview.rs index 0cdc9d2c..c070c35a 100644 --- a/src/brush/preview.rs +++ b/src/brush/preview.rs @@ -8,8 +8,9 @@ //! When `ActivePreview.brush_entity` is `None`, any existing preview mesh //! entity is despawned. -use bevy::math::Vec3; -use bevy::prelude::*; +use bevy_math::Vec3; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_geometry::{BrushTopology, triangulate_polygon}; @@ -111,12 +112,12 @@ fn update_preview_mesh( } let mut mesh = Mesh::new( - bevy::mesh::PrimitiveTopology::TriangleList, - bevy::asset::RenderAssetUsages::default(), + bevy_mesh::PrimitiveTopology::TriangleList, + bevy_asset::RenderAssetUsages::default(), ); mesh.insert_attribute(Mesh::ATTRIBUTE_POSITION, mesh_positions); mesh.insert_attribute(Mesh::ATTRIBUTE_NORMAL, mesh_normals); - mesh.insert_indices(bevy::mesh::Indices::U32(mesh_indices)); + mesh.insert_indices(bevy_mesh::Indices::U32(mesh_indices)); let mesh_handle = meshes.add(mesh); diff --git a/src/brush/topology_migration.rs b/src/brush/topology_migration.rs index e2b7de84..08426140 100644 --- a/src/brush/topology_migration.rs +++ b/src/brush/topology_migration.rs @@ -4,7 +4,8 @@ //! //! Runs once per brush at insertion time via the change-detection filter. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_geometry::compute_brush_topology; use jackdaw_jsn::Brush; @@ -32,7 +33,7 @@ pub fn migrate_legacy_brush_topology( #[cfg(test)] mod tests { use super::*; - use bevy::app::App; + use bevy_app::App; use jackdaw_geometry::topology::BrushTopology; use jackdaw_jsn::Brush; diff --git a/src/brush/topology_ops/bridge_edge_loops.rs b/src/brush/topology_ops/bridge_edge_loops.rs index be411f60..1fa1d05e 100644 --- a/src/brush/topology_ops/bridge_edge_loops.rs +++ b/src/brush/topology_ops/bridge_edge_loops.rs @@ -2,7 +2,8 @@ use std::collections::{HashMap, HashSet}; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_math::prelude::*; use jackdaw_api::prelude::*; use jackdaw_geometry::halfedge::ops::bridge_edge_loops::bridge_edge_loops; use jackdaw_geometry::halfedge::{EdgeKey, HalfedgeMesh, VertKey}; diff --git a/src/brush/topology_ops/connect_verts.rs b/src/brush/topology_ops/connect_verts.rs index c021612a..2d58c304 100644 --- a/src/brush/topology_ops/connect_verts.rs +++ b/src/brush/topology_ops/connect_verts.rs @@ -1,6 +1,7 @@ //! `brush.mesh.connect_verts` operator. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_math::prelude::*; use jackdaw_api::prelude::*; use jackdaw_geometry::halfedge::ops::connect_verts::connect_verts; use jackdaw_geometry::halfedge::{HalfedgeMesh, VertKey}; diff --git a/src/brush/topology_ops/dissolve_edges.rs b/src/brush/topology_ops/dissolve_edges.rs index 7e60a8bc..b4349649 100644 --- a/src/brush/topology_ops/dissolve_edges.rs +++ b/src/brush/topology_ops/dissolve_edges.rs @@ -1,6 +1,7 @@ //! `brush.mesh.dissolve_edges` operator. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_math::prelude::*; use jackdaw_api::prelude::*; use jackdaw_geometry::halfedge::ops::dissolve_edges::dissolve_edges; use jackdaw_geometry::halfedge::{EdgeKey, HalfedgeMesh, VertKey}; diff --git a/src/brush/topology_ops/dissolve_faces.rs b/src/brush/topology_ops/dissolve_faces.rs index 395bd76e..d114fb73 100644 --- a/src/brush/topology_ops/dissolve_faces.rs +++ b/src/brush/topology_ops/dissolve_faces.rs @@ -1,6 +1,6 @@ //! `brush.mesh.dissolve_faces` operator. -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_api::prelude::*; use jackdaw_geometry::halfedge::ops::dissolve_faces::dissolve_faces; use jackdaw_geometry::halfedge::{FaceKey, HalfedgeMesh}; diff --git a/src/brush/topology_ops/dissolve_verts.rs b/src/brush/topology_ops/dissolve_verts.rs index 470e7d7d..6ff1d1ab 100644 --- a/src/brush/topology_ops/dissolve_verts.rs +++ b/src/brush/topology_ops/dissolve_verts.rs @@ -1,6 +1,6 @@ //! `brush.mesh.dissolve_verts` operator. -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_api::prelude::*; use jackdaw_geometry::halfedge::ops::dissolve_verts::dissolve_verts; use jackdaw_geometry::halfedge::{HalfedgeMesh, VertKey}; diff --git a/src/brush/topology_ops/edge_bevel.rs b/src/brush/topology_ops/edge_bevel.rs index 0acd3be7..9aed1505 100644 --- a/src/brush/topology_ops/edge_bevel.rs +++ b/src/brush/topology_ops/edge_bevel.rs @@ -6,9 +6,11 @@ //! frame so the user sees the live chamfer as they drag. LMB commits; Esc / //! RMB cancels and restores the pre-modal mesh. -use bevy::prelude::*; -use bevy::window::PrimaryWindow; +use bevy_ecs::prelude::*; use bevy_enhanced_input::prelude::{Press, *}; +use bevy_input::prelude::*; +use bevy_math::prelude::*; +use bevy_window::PrimaryWindow; use jackdaw_api::prelude::*; use jackdaw_api_internal::lifecycle::ActiveModalOperator; use jackdaw_geometry::halfedge::ops::edge_bevel::edge_bevel; @@ -55,10 +57,12 @@ pub(crate) fn add_to_extension(ctx: &mut ExtensionContext) { world.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![( - KeyCode::KeyB.with_mod_keys(ModKeys::CONTROL), - Press::default(), - )], + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + KeyCode::KeyB.with_mod_keys(ModKeys::CONTROL), + Press::default(), + ))] + ), )); }); } diff --git a/src/brush/topology_ops/edge_slide.rs b/src/brush/topology_ops/edge_slide.rs index 0b7aee23..6a9a39c5 100644 --- a/src/brush/topology_ops/edge_slide.rs +++ b/src/brush/topology_ops/edge_slide.rs @@ -1,6 +1,7 @@ //! `brush.mesh.edge_slide` operator. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_math::prelude::*; use jackdaw_api::prelude::*; use jackdaw_geometry::halfedge::ops::edge_slide::edge_slide; use jackdaw_geometry::halfedge::{EdgeKey, HalfedgeMesh, VertKey}; diff --git a/src/brush/topology_ops/edge_slide_modal.rs b/src/brush/topology_ops/edge_slide_modal.rs index 1ec439d6..60bf9b7a 100644 --- a/src/brush/topology_ops/edge_slide_modal.rs +++ b/src/brush/topology_ops/edge_slide_modal.rs @@ -10,10 +10,10 @@ //! Coexists with the non-modal `brush.mesh.edge_slide` operator (which slides //! by a fixed amount) -- this is a separate entry point. -use bevy::prelude::*; -use bevy::ui::ui_transform::UiGlobalTransform; -use bevy::window::PrimaryWindow; +use bevy_ecs::prelude::*; use bevy_enhanced_input::prelude::{Press, *}; +use bevy_ui::ui_transform::UiGlobalTransform; +use bevy_window::PrimaryWindow; use jackdaw_api::prelude::*; use jackdaw_api_internal::lifecycle::ActiveModalOperator; use jackdaw_geometry::halfedge::cycles::radial_walk; @@ -74,10 +74,12 @@ pub(crate) fn add_to_extension(ctx: &mut ExtensionContext) { world.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![( - KeyCode::KeyE.with_mod_keys(ModKeys::SHIFT), - Press::default(), - )], + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + KeyCode::KeyE.with_mod_keys(ModKeys::SHIFT), + Press::default(), + ))] + ), )); }); } diff --git a/src/brush/topology_ops/extrude.rs b/src/brush/topology_ops/extrude.rs index 7b585f57..3ad67807 100644 --- a/src/brush/topology_ops/extrude.rs +++ b/src/brush/topology_ops/extrude.rs @@ -11,10 +11,10 @@ //! chained selection behavior: post-commit, `BrushSelection.faces` is updated //! to the new top face indices. -use bevy::prelude::*; -use bevy::ui::ui_transform::UiGlobalTransform; -use bevy::window::PrimaryWindow; +use bevy_ecs::prelude::*; use bevy_enhanced_input::prelude::{Press, *}; +use bevy_ui::ui_transform::UiGlobalTransform; +use bevy_window::PrimaryWindow; use jackdaw_api::prelude::*; use jackdaw_api_internal::lifecycle::ActiveModalOperator; use jackdaw_geometry::halfedge::ops::extrude_face_region::extrude_face_region; @@ -704,7 +704,10 @@ pub(crate) fn add_to_extension(ctx: &mut ExtensionContext) { world.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![(KeyCode::KeyE, Press::default())], + related!( + Bindings + [IntoBindingBundle::into_binding_bundle((KeyCode::KeyE, Press::default(),))] + ), )); }); } diff --git a/src/brush/topology_ops/inset.rs b/src/brush/topology_ops/inset.rs index d7ec2c54..4ce0d58f 100644 --- a/src/brush/topology_ops/inset.rs +++ b/src/brush/topology_ops/inset.rs @@ -6,9 +6,9 @@ //! edit. Ctrl snaps to the translate grid increment. LMB commits; Esc / RMB //! cancels and restores the pre-modal mesh. -use bevy::prelude::*; -use bevy::window::PrimaryWindow; +use bevy_ecs::prelude::*; use bevy_enhanced_input::prelude::{Press, *}; +use bevy_window::PrimaryWindow; use jackdaw_api::prelude::*; use jackdaw_api_internal::lifecycle::ActiveModalOperator; use jackdaw_geometry::halfedge::ops::inset_face::inset_face; @@ -94,7 +94,9 @@ pub(crate) fn add_to_extension(ctx: &mut ExtensionContext) { world.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![(KeyCode::KeyI, Press::default())], + related!( + Bindings[IntoBindingBundle::into_binding_bundle((KeyCode::KeyI, Press::default()))] + ), )); }); } diff --git a/src/brush/topology_ops/loop_cut.rs b/src/brush/topology_ops/loop_cut.rs index c47a0b9d..85bb4b01 100644 --- a/src/brush/topology_ops/loop_cut.rs +++ b/src/brush/topology_ops/loop_cut.rs @@ -1,9 +1,9 @@ //! `brush.mesh.loop_cut` operator. -use bevy::prelude::*; -use bevy::ui::ui_transform::UiGlobalTransform; -use bevy::window::PrimaryWindow; +use bevy_ecs::prelude::*; use bevy_enhanced_input::prelude::{Press, *}; +use bevy_ui::ui_transform::UiGlobalTransform; +use bevy_window::PrimaryWindow; use jackdaw_api::prelude::*; use jackdaw_api_internal::lifecycle::ActiveModalOperator; use jackdaw_geometry::halfedge::ops::loop_cut::loop_cut; @@ -32,10 +32,12 @@ pub(crate) fn add_to_extension(ctx: &mut ExtensionContext) { world.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![( - KeyCode::KeyR.with_mod_keys(ModKeys::CONTROL), - Press::default(), - )], + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + KeyCode::KeyR.with_mod_keys(ModKeys::CONTROL), + Press::default(), + ))] + ), )); }); } diff --git a/src/brush/topology_ops/make_edge_face.rs b/src/brush/topology_ops/make_edge_face.rs index 250e6b30..cfdc67cc 100644 --- a/src/brush/topology_ops/make_edge_face.rs +++ b/src/brush/topology_ops/make_edge_face.rs @@ -1,6 +1,6 @@ //! `brush.mesh.make_edge_face` operator. -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_api::prelude::*; use jackdaw_geometry::halfedge::VertKey; use jackdaw_geometry::halfedge::ops::contextual_create::{ContextualResult, contextual_create}; diff --git a/src/brush/topology_ops/merge_by_distance.rs b/src/brush/topology_ops/merge_by_distance.rs index 8f8538a0..9ea299c1 100644 --- a/src/brush/topology_ops/merge_by_distance.rs +++ b/src/brush/topology_ops/merge_by_distance.rs @@ -1,6 +1,6 @@ //! `brush.mesh.merge_by_distance` operator. -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_api::prelude::*; use jackdaw_geometry::halfedge::HalfedgeMesh; use jackdaw_geometry::halfedge::ops::remove_doubles::remove_doubles; diff --git a/src/brush/topology_ops/reconvexify.rs b/src/brush/topology_ops/reconvexify.rs index 49ac0bfa..2ced0231 100644 --- a/src/brush/topology_ops/reconvexify.rs +++ b/src/brush/topology_ops/reconvexify.rs @@ -3,7 +3,7 @@ //! produced an unwanted result, or as a prerequisite for CSG (which only //! supports convex inputs in this PR). -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_api::prelude::*; use jackdaw_geometry::halfedge::HalfedgeMesh; use jackdaw_geometry::{compute_brush_geometry_from_planes, compute_brush_topology}; diff --git a/src/brush/topology_ops/select_invert.rs b/src/brush/topology_ops/select_invert.rs index 55063ff6..0f69c1de 100644 --- a/src/brush/topology_ops/select_invert.rs +++ b/src/brush/topology_ops/select_invert.rs @@ -2,7 +2,7 @@ //! complement: full set of element keys (in current edit mode) minus current //! selection. Works in Vertex, Edge, or Face mode. -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_api::prelude::*; use crate::brush::{BrushEditMode, BrushHalfedge, BrushSelection, EditMode}; diff --git a/src/brush/topology_ops/select_less.rs b/src/brush/topology_ops/select_less.rs index be6d7eed..8ffd1fa0 100644 --- a/src/brush/topology_ops/select_less.rs +++ b/src/brush/topology_ops/select_less.rs @@ -3,7 +3,7 @@ use std::collections::HashSet; -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_api::prelude::*; use jackdaw_geometry::halfedge::VertKey; use jackdaw_geometry::halfedge::cycles::{disk_walk, radial_walk}; diff --git a/src/brush/topology_ops/select_linked.rs b/src/brush/topology_ops/select_linked.rs index ae9aff42..aab6b0e1 100644 --- a/src/brush/topology_ops/select_linked.rs +++ b/src/brush/topology_ops/select_linked.rs @@ -4,7 +4,7 @@ use std::collections::HashSet; -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_api::prelude::*; use jackdaw_geometry::halfedge::FaceKey; use jackdaw_geometry::halfedge::select::linked_walk::linked_walk; diff --git a/src/brush/topology_ops/select_loop.rs b/src/brush/topology_ops/select_loop.rs index 055c1731..584d0590 100644 --- a/src/brush/topology_ops/select_loop.rs +++ b/src/brush/topology_ops/select_loop.rs @@ -3,7 +3,7 @@ use std::collections::HashSet; -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_api::prelude::*; use jackdaw_geometry::halfedge::select::loop_walk::loop_walk; use jackdaw_geometry::halfedge::{EdgeKey, HalfedgeMesh, VertKey}; diff --git a/src/brush/topology_ops/select_more.rs b/src/brush/topology_ops/select_more.rs index 8a78431c..505c1447 100644 --- a/src/brush/topology_ops/select_more.rs +++ b/src/brush/topology_ops/select_more.rs @@ -4,7 +4,7 @@ use std::collections::HashSet; -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_api::prelude::*; use jackdaw_geometry::halfedge::VertKey; use jackdaw_geometry::halfedge::cycles::{disk_walk, radial_walk}; diff --git a/src/brush/topology_ops/select_ring.rs b/src/brush/topology_ops/select_ring.rs index 2ad1701d..c1e44147 100644 --- a/src/brush/topology_ops/select_ring.rs +++ b/src/brush/topology_ops/select_ring.rs @@ -3,7 +3,7 @@ use std::collections::HashSet; -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_api::prelude::*; use jackdaw_geometry::halfedge::select::ring_walk::ring_walk; use jackdaw_geometry::halfedge::{EdgeKey, HalfedgeMesh, VertKey}; diff --git a/src/brush/topology_ops/subdivide.rs b/src/brush/topology_ops/subdivide.rs index 894ca5ea..05df023a 100644 --- a/src/brush/topology_ops/subdivide.rs +++ b/src/brush/topology_ops/subdivide.rs @@ -1,6 +1,6 @@ //! `brush.mesh.subdivide` operator. -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_api::prelude::*; use jackdaw_geometry::halfedge::ops::subdivide::subdivide; use jackdaw_geometry::halfedge::{EdgeKey, HalfedgeMesh, VertKey}; diff --git a/src/brush/topology_ops/uv_align_to_edge.rs b/src/brush/topology_ops/uv_align_to_edge.rs index 6c24dc09..ceea4c6b 100644 --- a/src/brush/topology_ops/uv_align_to_edge.rs +++ b/src/brush/topology_ops/uv_align_to_edge.rs @@ -1,6 +1,6 @@ //! `brush.face.uv.align_to_edge` operator. -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_api::prelude::*; use jackdaw_jsn::Brush; diff --git a/src/brush/topology_ops/uv_fit_to_face.rs b/src/brush/topology_ops/uv_fit_to_face.rs index 6578dd24..3073ee95 100644 --- a/src/brush/topology_ops/uv_fit_to_face.rs +++ b/src/brush/topology_ops/uv_fit_to_face.rs @@ -1,6 +1,6 @@ //! `brush.face.uv.fit_to_face` operator. -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_api::prelude::*; use jackdaw_jsn::Brush; diff --git a/src/brush/topology_ops/uv_reset_axes.rs b/src/brush/topology_ops/uv_reset_axes.rs index aad17f02..937d3b4a 100644 --- a/src/brush/topology_ops/uv_reset_axes.rs +++ b/src/brush/topology_ops/uv_reset_axes.rs @@ -1,6 +1,6 @@ //! `brush.face.uv.reset_axes` operator. -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_api::prelude::*; use jackdaw_jsn::Brush; diff --git a/src/brush/topology_ops/uv_rotate_90.rs b/src/brush/topology_ops/uv_rotate_90.rs index b59ddab8..68bc0be9 100644 --- a/src/brush/topology_ops/uv_rotate_90.rs +++ b/src/brush/topology_ops/uv_rotate_90.rs @@ -1,6 +1,6 @@ //! `brush.face.uv.rotate_90` operator. -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_api::prelude::*; use jackdaw_jsn::Brush; diff --git a/src/brush/topology_ops/uv_texel_density.rs b/src/brush/topology_ops/uv_texel_density.rs index 54e7c95b..882f7356 100644 --- a/src/brush/topology_ops/uv_texel_density.rs +++ b/src/brush/topology_ops/uv_texel_density.rs @@ -1,6 +1,6 @@ //! `brush.face.uv.texel_density` operator. -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_api::prelude::*; use jackdaw_jsn::Brush; diff --git a/src/brush/topology_ops/uv_world_aligned.rs b/src/brush/topology_ops/uv_world_aligned.rs index fd694d90..e42b9c8e 100644 --- a/src/brush/topology_ops/uv_world_aligned.rs +++ b/src/brush/topology_ops/uv_world_aligned.rs @@ -1,6 +1,6 @@ //! `brush.face.uv.world_aligned` operator. -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_api::prelude::*; use jackdaw_jsn::Brush; diff --git a/src/brush/topology_ops/vertex_bevel.rs b/src/brush/topology_ops/vertex_bevel.rs index 0e1fbb29..3b23f2e5 100644 --- a/src/brush/topology_ops/vertex_bevel.rs +++ b/src/brush/topology_ops/vertex_bevel.rs @@ -6,9 +6,10 @@ //! each frame so the user sees the live N-gon bevel as they drag. LMB //! commits; Esc / RMB cancels and restores the pre-modal mesh. -use bevy::prelude::*; -use bevy::window::PrimaryWindow; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; use bevy_enhanced_input::prelude::{Press, *}; +use bevy_window::PrimaryWindow; use jackdaw_api::prelude::*; use jackdaw_api_internal::lifecycle::ActiveModalOperator; use jackdaw_geometry::halfedge::cycles::disk_walk; @@ -55,10 +56,12 @@ pub(crate) fn add_to_extension(ctx: &mut ExtensionContext) { world.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![( - KeyCode::KeyB.with_mod_keys(ModKeys::CONTROL), - Press::default(), - )], + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + KeyCode::KeyB.with_mod_keys(ModKeys::CONTROL), + Press::default(), + ))] + ), )); }); } diff --git a/src/brush/topology_ops/vertex_slide.rs b/src/brush/topology_ops/vertex_slide.rs index e55a1bab..378708f8 100644 --- a/src/brush/topology_ops/vertex_slide.rs +++ b/src/brush/topology_ops/vertex_slide.rs @@ -1,6 +1,6 @@ //! `brush.mesh.vertex_slide` operator. -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_api::prelude::*; use jackdaw_geometry::halfedge::ops::vertex_slide::vertex_slide; use jackdaw_geometry::halfedge::{HalfedgeMesh, VertKey}; diff --git a/src/brush/topology_ops/vertex_slide_modal.rs b/src/brush/topology_ops/vertex_slide_modal.rs index 33d26ce2..cc7bad53 100644 --- a/src/brush/topology_ops/vertex_slide_modal.rs +++ b/src/brush/topology_ops/vertex_slide_modal.rs @@ -12,10 +12,10 @@ //! slides by a fixed amount along the first disk-cycle edge) -- this is a //! separate entry point. -use bevy::prelude::*; -use bevy::ui::ui_transform::UiGlobalTransform; -use bevy::window::PrimaryWindow; +use bevy_ecs::prelude::*; use bevy_enhanced_input::prelude::{Press, *}; +use bevy_ui::ui_transform::UiGlobalTransform; +use bevy_window::PrimaryWindow; use jackdaw_api::prelude::*; use jackdaw_api_internal::lifecycle::ActiveModalOperator; use jackdaw_geometry::halfedge::cycles::disk_walk; @@ -83,10 +83,12 @@ pub(crate) fn add_to_extension(ctx: &mut ExtensionContext) { world.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![( - KeyCode::KeyV.with_mod_keys(ModKeys::SHIFT), - Press::default(), - )], + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + KeyCode::KeyV.with_mod_keys(ModKeys::SHIFT), + Press::default(), + ))] + ), )); }); } diff --git a/src/brush/topology_ops/weld_selected.rs b/src/brush/topology_ops/weld_selected.rs index 344605d1..79c5d3a0 100644 --- a/src/brush/topology_ops/weld_selected.rs +++ b/src/brush/topology_ops/weld_selected.rs @@ -3,7 +3,7 @@ //! to "merge these specific verts into one". Different from "Merge by Distance" //! which only welds verts that are already coincident within a threshold. -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_api::prelude::*; use jackdaw_geometry::halfedge::HalfedgeMesh; use jackdaw_geometry::halfedge::ops::remove_doubles::remove_doubles; diff --git a/src/brush_drag_ops.rs b/src/brush_drag_ops.rs index dbca3f44..627bcd8b 100644 --- a/src/brush_drag_ops.rs +++ b/src/brush_drag_ops.rs @@ -9,7 +9,8 @@ //! inline in the operator body. Escape goes through the global //! `modal.cancel` chain. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_api::prelude::*; use jackdaw_api_internal::lifecycle::ActiveModalOperator; use jackdaw_jsn::Brush; @@ -409,7 +410,7 @@ pub fn brush_face_drag( if let Ok(mut halfedge) = halfedge_q.get_mut(brush_entity) { // HalfedgeMesh path: translate each selected face's ring vertices along the face normal. let face_keys = halfedge.face_keys.clone(); - let start_positions: Vec = + let start_positions: Vec = if !start.topology.vertices.is_empty() { start.topology.vertices.iter().map(|v| v.position).collect() } else { @@ -469,7 +470,7 @@ pub fn brush_face_drag( } // Sync brush.faces[i].plane and brush.topology. let new_topology = halfedge.mesh.flatten_to_topology(); - let positions: Vec = + let positions: Vec = new_topology.vertices.iter().map(|v| v.position).collect(); for (face_idx, face_data) in brush.faces.iter_mut().enumerate() { if face_idx < new_topology.polygons.len() { diff --git a/src/brush_element_ops.rs b/src/brush_element_ops.rs index 5f1b3cd0..9dc90b6c 100644 --- a/src/brush_element_ops.rs +++ b/src/brush_element_ops.rs @@ -8,7 +8,8 @@ use std::collections::HashSet; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; use bevy_enhanced_input::prelude::{Press, *}; use jackdaw_api::prelude::*; use jackdaw_jsn::Brush; @@ -31,20 +32,30 @@ pub(crate) fn add_to_extension(ctx: &mut ExtensionContext) { world.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![ - (KeyCode::Delete, Press::default()), - (KeyCode::Backspace, Press::default()), - ], + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + (KeyCode::Delete, Press::default()), + (KeyCode::Backspace, Press::default()), + ))] + ), )); world.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![(KeyCode::PageUp, Press::default())], + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + (KeyCode::PageUp, Press::default()), + ))] + ), )); world.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![(KeyCode::PageDown, Press::default())], + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + (KeyCode::PageDown, Press::default()), + ))] + ), )); }); } diff --git a/src/build_status.rs b/src/build_status.rs index 0943ebe2..2dea0f11 100644 --- a/src/build_status.rs +++ b/src/build_status.rs @@ -20,7 +20,8 @@ use std::path::PathBuf; use std::sync::{Arc, Mutex}; use std::time::Instant; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use crate::ext_build::BuildProgress; diff --git a/src/builtin_extensions.rs b/src/builtin_extensions.rs index 2b78cf38..649f5247 100644 --- a/src/builtin_extensions.rs +++ b/src/builtin_extensions.rs @@ -3,7 +3,8 @@ //! same API third-party authors do. Disable one in File > Extensions //! to remove its windows from the layout. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_api::{ DefaultArea, ExtensionPoint, HierarchyWindow, InspectorWindow, prelude::{ExtensionContext, ExtensionKind, JackdawExtension, WindowDescriptor}, diff --git a/src/clip_ops.rs b/src/clip_ops.rs index da072fc2..160beb21 100644 --- a/src/clip_ops.rs +++ b/src/clip_ops.rs @@ -6,8 +6,11 @@ //! Default keybinds: LMB places a point, Tab cycles mode, Enter //! applies, Escape clears. -use bevy::{prelude::*, ui::ui_transform::UiGlobalTransform, window::PrimaryWindow}; +use bevy_ecs::prelude::*; use bevy_enhanced_input::prelude::{Press, *}; +use bevy_log::prelude::*; +use bevy_ui::ui_transform::UiGlobalTransform; +use bevy_window::PrimaryWindow; use jackdaw_api::prelude::*; use jackdaw_jsn::{Brush, BrushFaceData, BrushGroup, BrushPlane}; @@ -39,17 +42,28 @@ pub(crate) fn add_to_extension(ctx: &mut ExtensionContext) { world.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![(KeyCode::Tab, Press::default())], + related!( + Bindings + [IntoBindingBundle::into_binding_bundle(((KeyCode::Tab, Press::default()),))] + ), )); world.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![(KeyCode::Enter, Press::default())], + related!( + Bindings + [IntoBindingBundle::into_binding_bundle(((KeyCode::Enter, Press::default()),))] + ), )); world.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![(KeyCode::Escape, Press::default())], + related!( + Bindings[IntoBindingBundle::into_binding_bundle((( + KeyCode::Escape, + Press::default() + ),))] + ), )); }); } diff --git a/src/command_palette.rs b/src/command_palette.rs index 4c913cce..5d62866a 100644 --- a/src/command_palette.rs +++ b/src/command_palette.rs @@ -1,4 +1,6 @@ -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_log::prelude::*; use jackdaw_api::prelude::*; use jackdaw_api_internal::lifecycle::{OperatorAction, OperatorEntity}; use jackdaw_feathers::icons::EditorFont; @@ -21,13 +23,16 @@ pub(crate) fn add_to_extension(ctx: &mut ExtensionContext) { ctx.entity_mut() .with_related::>(( Action::::new(), - bindings![ - ( + related!(Bindings[ + IntoBindingBundle::into_binding_bundle(( KeyCode::Space.with_mod_keys(ModKeys::CONTROL), bevy_enhanced_input::prelude::Press::default() - ), - (KeyCode::F3, bevy_enhanced_input::prelude::Press::default()) - ], + )), + IntoBindingBundle::into_binding_bundle(( + KeyCode::F3, + bevy_enhanced_input::prelude::Press::default() + ))] + ), )); } diff --git a/src/commands.rs b/src/commands.rs index 7595ae21..1d726c91 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -1,12 +1,12 @@ use std::any::TypeId; -use bevy::{ - ecs::{ - component::ComponentId, - reflect::{AppTypeRegistry, ReflectComponent}, - }, +use bevy_ecs::{ + component::ComponentId, prelude::*, + reflect::{AppTypeRegistry, ReflectComponent}, }; +use bevy_log::prelude::*; + use serde::de::DeserializeSeed; // Re-export the core command framework from the jackdaw_commands crate @@ -308,7 +308,7 @@ impl EditorCommand for AddComponent { // `set_component` is a silent no-op. Same UX // consequence as above. let serializer = - bevy::reflect::serde::TypedReflectSerializer::new(default_value.as_ref(), ®istry); + bevy_reflect::serde::TypedReflectSerializer::new(default_value.as_ref(), ®istry); match serde_json::to_value(&serializer) { Ok(json_value) => { drop(registry); @@ -343,7 +343,7 @@ impl EditorCommand for AddComponent { // so we can remove them from the ECS as well as the AST. let registry = world.resource::().clone(); let reg = registry.read(); - let promoted_component_ids: Vec = self + let promoted_component_ids: Vec = self .promoted_components .iter() .filter_map(|type_path| { @@ -508,7 +508,7 @@ impl EditorCommand for DespawnEntity { fn undo(&mut self, world: &mut World) { // Re-build the scene from scratch and write it back let scene = snapshot_rebuild(&self.scene_snapshot); - let mut entity_map = bevy::ecs::entity::hash_map::EntityHashMap::default(); + let mut entity_map = bevy_ecs::entity::hash_map::EntityHashMap::default(); let _ = scene.write_to_world(world, &mut entity_map); if let Some(&new_id) = entity_map.get(&self.entity) { self.entity = new_id; @@ -579,7 +579,7 @@ pub(crate) fn snapshot_rebuild(scene: &DynamicScene) -> DynamicScene { entities: scene .entities .iter() - .map(|e| bevy::scene::DynamicEntity { + .map(|e| bevy_scene::DynamicEntity { entity: e.entity, components: e.components.iter().map(|c| c.to_dynamic()).collect(), }) @@ -694,7 +694,7 @@ fn apply_jsn_field_to_ecs( // - Components removed externally (e.g. avian removing ColliderConstructor) // - Normal mutable components (insert replaces in-place) let deserializer = - bevy::reflect::serde::TypedReflectDeserializer::new(registration, ®istry); + bevy_reflect::serde::TypedReflectDeserializer::new(registration, ®istry); if let Ok(reflected) = deserializer.deserialize(value) { reflect_component.insert(&mut world.entity_mut(entity), reflected.as_ref(), ®istry); } @@ -713,9 +713,9 @@ fn apply_jsn_field_to_ecs( /// Falls back to Bevy's typed deserialization for complex types (enums, structs) /// that can't be handled by simple primitive downcasts. fn apply_json_to_reflect( - field: &mut dyn bevy::reflect::PartialReflect, + field: &mut dyn bevy_reflect::PartialReflect, value: &serde_json::Value, - registry: &bevy::reflect::TypeRegistry, + registry: &bevy_reflect::TypeRegistry, ) { match value { serde_json::Value::Number(n) => { @@ -768,9 +768,9 @@ fn apply_json_to_reflect( /// Look up the field's `TypeRegistration` via its represented type info and run /// `TypedReflectDeserializer` on the JSON, then apply the result. fn try_typed_deserialize( - field: &mut dyn bevy::reflect::PartialReflect, + field: &mut dyn bevy_reflect::PartialReflect, value: &serde_json::Value, - registry: &bevy::reflect::TypeRegistry, + registry: &bevy_reflect::TypeRegistry, ) { let Some(type_info) = field.get_represented_type_info() else { return; @@ -778,14 +778,14 @@ fn try_typed_deserialize( let Some(registration) = registry.get(type_info.type_id()) else { return; }; - let deserializer = bevy::reflect::serde::TypedReflectDeserializer::new(registration, registry); + let deserializer = bevy_reflect::serde::TypedReflectDeserializer::new(registration, registry); if let Ok(reflected) = deserializer.deserialize(value) { field.apply(reflected.as_ref()); } } /// Serialize a component to JSON and store it in the AST. -pub fn sync_component_to_ast( +pub fn sync_component_to_ast( world: &mut World, entity: Entity, type_path: &str, @@ -795,7 +795,7 @@ pub fn sync_component_to_ast( let registry = registry.read(); let processor = crate::scene_io::AstSerializerProcessor; let serializer = - bevy::reflect::serde::TypedReflectSerializer::with_processor(value, ®istry, &processor); + bevy_reflect::serde::TypedReflectSerializer::with_processor(value, ®istry, &processor); if let Ok(json_value) = serde_json::to_value(&serializer) { drop(registry); world @@ -867,7 +867,7 @@ pub fn sync_required_to_ast(world: &mut World, entity: Entity) -> Vec { let Some(component) = reflect_component.reflect(entity_ref) else { continue; }; - let serializer = bevy::reflect::serde::TypedReflectSerializer::with_processor( + let serializer = bevy_reflect::serde::TypedReflectSerializer::with_processor( component, ®, &processor, ); if let Ok(value) = serde_json::to_value(&serializer) { diff --git a/src/core_extension.rs b/src/core_extension.rs index 0cfad9cf..e6a1d5da 100644 --- a/src/core_extension.rs +++ b/src/core_extension.rs @@ -1,5 +1,7 @@ -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; use bevy_enhanced_input::prelude::{Press, *}; +use bevy_log::prelude::*; use jackdaw_api::prelude::*; use jackdaw_api_internal::lifecycle::ExtensionAppExt as _; use jackdaw_feathers::{ @@ -92,12 +94,15 @@ impl JackdawExtension for JackdawCoreExtension { fn register(&self, ctx: &mut ExtensionContext) { ctx.entity_mut().insert(( CoreExtensionInputContext, - actions!( - CoreExtensionInputContext[( - Action::::new(), - bindings!((KeyCode::Escape, Press::default())) - )] - ), + related!(Actions[( + Action::::new(), + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + KeyCode::Escape, + Press::default() + ))] + ) + )]), )); ctx.register_operator::(); @@ -122,10 +127,10 @@ impl JackdawExtension for JackdawCoreExtension { ctx.spawn(( Action::::new(), ActionOf::::new(core_ext), - bindings![ - (KeyCode::Delete, Press::default()), - (KeyCode::Backspace, Press::default()), - ], + related!(Bindings[ + IntoBindingBundle::into_binding_bundle((KeyCode::Delete, Press::default())), + IntoBindingBundle::into_binding_bundle((KeyCode::Backspace, Press::default())) + ]), )); // No `Press` on Step Left / Right: holding an arrow scrubs // the timeline frame-by-frame. Shift+Arrow keyframe jumps @@ -133,54 +138,71 @@ impl JackdawExtension for JackdawCoreExtension { ctx.spawn(( Action::::new(), ActionOf::::new(core_ext), - bindings![KeyCode::ArrowLeft], + related!(Bindings[ + IntoBindingBundle::into_binding_bundle(KeyCode::ArrowLeft), + ]), )); ctx.spawn(( Action::::new(), ActionOf::::new(core_ext), - bindings![KeyCode::ArrowRight], + related!(Bindings[ + IntoBindingBundle::into_binding_bundle(KeyCode::ArrowRight), + ]), )); ctx.spawn(( Action::::new(), ActionOf::::new(core_ext), - bindings![( - KeyCode::ArrowLeft.with_mod_keys(ModKeys::SHIFT), - Press::default(), - )], + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + KeyCode::ArrowLeft.with_mod_keys(ModKeys::SHIFT), + Press::default(), + ))] + ), )); ctx.spawn(( Action::::new(), ActionOf::::new(core_ext), - bindings![( - KeyCode::ArrowRight.with_mod_keys(ModKeys::SHIFT), - Press::default(), - )], + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + KeyCode::ArrowRight.with_mod_keys(ModKeys::SHIFT), + Press::default(), + ))] + ), )); ctx.spawn(( Action::::new(), ActionOf::::new(core_ext), - bindings![(KeyCode::Home, Press::default())], + related!( + Bindings + [IntoBindingBundle::into_binding_bundle((KeyCode::Home, Press::default(),))] + ), )); ctx.spawn(( Action::::new(), ActionOf::::new(core_ext), - bindings![(KeyCode::End, Press::default())], + related!( + Bindings[IntoBindingBundle::into_binding_bundle((KeyCode::End, Press::default(),))] + ), )); ctx.spawn(( Action::::new(), ActionOf::::new(core_ext), - bindings![( - KeyCode::KeyC.with_mod_keys(ModKeys::CONTROL), - Press::default(), - )], + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + KeyCode::KeyC.with_mod_keys(ModKeys::CONTROL), + Press::default(), + ))] + ), )); ctx.spawn(( Action::::new(), ActionOf::::new(core_ext), - bindings![( - KeyCode::KeyV.with_mod_keys(ModKeys::CONTROL), - Press::default(), - )], + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + KeyCode::KeyV.with_mod_keys(ModKeys::CONTROL), + Press::default(), + ))] + ), )); crate::draw_brush::add_to_extension(ctx); crate::measure_tool::add_to_extension(ctx); @@ -195,6 +217,7 @@ impl JackdawExtension for JackdawCoreExtension { crate::edit_mode_ops::add_to_extension(ctx); crate::entity_ops::add_to_extension(ctx); crate::transform_ops::add_to_extension(ctx); + #[cfg(feature = "avian")] crate::physics_tool::add_to_extension(ctx); crate::hierarchy::add_to_extension(ctx); crate::viewport_select::add_to_extension(ctx); @@ -234,6 +257,7 @@ impl JackdawExtension for JackdawCoreExtension { crate::brush::topology_ops::reconvexify::add_to_extension(ctx); crate::gizmos::add_to_extension(ctx); crate::terrain::sculpt::add_to_extension(ctx); + #[cfg(feature = "navmesh")] crate::navmesh::ops::add_to_extension(ctx); crate::pie::add_to_extension(ctx); crate::terrain::ops::add_to_extension(ctx); diff --git a/src/custom_properties.rs b/src/custom_properties.rs index 92366022..0d08e49f 100644 --- a/src/custom_properties.rs +++ b/src/custom_properties.rs @@ -1,4 +1,5 @@ -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; // Re-export types from jackdaw_jsn pub use jackdaw_jsn::{CustomProperties, PropertyValue}; diff --git a/src/default_style.rs b/src/default_style.rs index 0450d6e7..820484b9 100644 --- a/src/default_style.rs +++ b/src/default_style.rs @@ -1,7 +1,5 @@ -use bevy::{ - gizmos::config::{GizmoLineConfig, GizmoLineJoint, GizmoLineStyle}, - prelude::Color, -}; +use bevy_color::Color; +use bevy_gizmos::config::{GizmoLineConfig, GizmoLineJoint, GizmoLineStyle}; // -- Axis colors (Blender default theme, X = red, Y = green, Z = blue) -- pub const AXIS_X: Color = Color::srgba(1.0, 0.2, 0.32, 0.6); diff --git a/src/document_ops.rs b/src/document_ops.rs index 07ca2dcd..77171a85 100644 --- a/src/document_ops.rs +++ b/src/document_ops.rs @@ -1,7 +1,9 @@ use std::{fs::File, path::PathBuf}; use crate::prelude::*; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_log::prelude::*; use jackdaw_api_internal::lifecycle::OperatorEntity; pub(crate) fn add_to_extension(ctx: &mut ExtensionContext) { diff --git a/src/draw_brush.rs b/src/draw_brush.rs index 2efdf370..10dfa3c1 100644 --- a/src/draw_brush.rs +++ b/src/draw_brush.rs @@ -13,13 +13,13 @@ use crate::{ snapping::SnapSettings, viewport::ViewportCursor, }; -use bevy::{ - input_focus::InputFocus, - light::{NotShadowCaster, NotShadowReceiver}, - mesh::{Indices, PrimitiveTopology}, - picking::mesh_picking::ray_cast::{MeshRayCast, MeshRayCastSettings, RayCastVisibility}, - prelude::*, -}; +use bevy_ecs::prelude::*; +use bevy_input_focus::InputFocus; +use bevy_light::{NotShadowCaster, NotShadowReceiver}; +use bevy_log::prelude::*; +use bevy_mesh::{Indices, PrimitiveTopology}; +use bevy_picking::mesh_picking::ray_cast::{MeshRayCast, MeshRayCastSettings, RayCastVisibility}; + use bevy_enhanced_input::prelude::Press; use jackdaw_geometry::{ brush_planes_to_world, clean_degenerate_faces, compute_brush_geometry_from_planes, @@ -62,74 +62,101 @@ pub(crate) fn add_to_extension(ctx: &mut ExtensionContext) { ctx.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![(MouseButton::Left, Press::default()),], + related!( + Bindings[IntoBindingBundle::into_binding_bundle((MouseButton::Left, Press::default()))] + ), )); ctx.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![ - (MouseButton::Back, Press::default()), - (KeyCode::KeyB, Press::default()), - ], + related!(Bindings[ + IntoBindingBundle::into_binding_bundle((MouseButton::Back, Press::default())), + IntoBindingBundle::into_binding_bundle((KeyCode::KeyB, Press::default())), + ]), )); ctx.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![(KeyCode::KeyJ, Press::default())], + related!( + Bindings[IntoBindingBundle::into_binding_bundle((KeyCode::KeyJ, Press::default()))] + ), )); ctx.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![( - KeyCode::KeyK.with_mod_keys(ModKeys::CONTROL), - Press::default(), - )], + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + KeyCode::KeyK.with_mod_keys(ModKeys::CONTROL), + Press::default(), + ))] + ), )); ctx.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![( - KeyCode::KeyK.with_mod_keys(ModKeys::CONTROL | ModKeys::SHIFT), - Press::default(), - )], + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + KeyCode::KeyK.with_mod_keys(ModKeys::CONTROL | ModKeys::SHIFT), + Press::default(), + ))] + ), )); ctx.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![( - KeyCode::KeyE.with_mod_keys(ModKeys::CONTROL), - Press::default(), - )], + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + KeyCode::KeyE.with_mod_keys(ModKeys::CONTROL), + Press::default(), + ))] + ), )); ctx.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![(KeyCode::Tab, Press::default())], + related!( + Bindings[IntoBindingBundle::into_binding_bundle((KeyCode::Tab, Press::default()))] + ), )); ctx.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![(KeyCode::Enter, Press::default())], + related!( + Bindings[IntoBindingBundle::into_binding_bundle((KeyCode::Enter, Press::default()))] + ), )); ctx.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![(KeyCode::Backspace, Press::default())], + related!( + Bindings + [IntoBindingBundle::into_binding_bundle((KeyCode::Backspace, Press::default()))] + ), )); ctx.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![(MouseButton::Right, Press::default())], + related!( + Bindings + [IntoBindingBundle::into_binding_bundle((MouseButton::Right, Press::default()))] + ), )); ctx.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![(KeyCode::KeyB.with_mod_keys(ModKeys::ALT), Press::default(),)], + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + KeyCode::KeyB.with_mod_keys(ModKeys::ALT), + Press::default() + ))] + ), )); ctx.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![(KeyCode::KeyC, Press::default())], + related!( + Bindings[IntoBindingBundle::into_binding_bundle((KeyCode::KeyC, Press::default()))] + ), )); ctx.register_operator::() .register_operator::() @@ -1449,7 +1476,7 @@ fn append_to_brush(active: &ActiveDraw, commands: &mut Commands) { }; commands.queue(move |world: &mut World| { - use avian3d::parry::transformation::convex_hull; + use parry3d::transformation::convex_hull; let Some(brush) = world.get::(target_entity) else { return; @@ -2782,7 +2809,7 @@ pub(crate) fn join_selected_brushes_impl(world: &mut World) { let others: Vec = selected_brushes[1..].to_vec(); { - use avian3d::parry::transformation::convex_hull; + use parry3d::transformation::convex_hull; // Read primary brush data let Some(primary_brush) = world.get::(primary_entity) else { diff --git a/src/entity_ops.rs b/src/entity_ops.rs index 511306e3..470aea0e 100644 --- a/src/entity_ops.rs +++ b/src/entity_ops.rs @@ -11,7 +11,7 @@ use crate::{ commands::{CommandHistory, DespawnEntity, EditorCommand}, selection::{Selected, Selection}, }; -use bevy::input_focus::InputFocus; +use bevy_input_focus::InputFocus; /// System clipboard for copy/paste of entities as JSN text. /// On Linux/X11 the clipboard is ownership-based: data is only available while @@ -193,7 +193,7 @@ pub fn create_entity( is_active: false, ..default() }, - bevy::camera::RenderTarget::None { + bevy_camera::RenderTarget::None { size: UVec2::splat(1), }, Transform::from_xyz(0.0, 2.0, 5.0).looking_at(Vec3::ZERO, Vec3::Y), @@ -1122,9 +1122,10 @@ pub(crate) fn add_to_extension(ctx: &mut ExtensionContext) { .register_operator::() .register_operator::() .register_operator::() - .register_operator::() .register_operator::() .register_operator::(); + #[cfg(feature = "navmesh")] + ctx.register_operator::(); let ext = ctx.id(); ctx.entity_mut().world_scope(|world| { @@ -1377,6 +1378,7 @@ pub(crate) fn entity_add_empty( OperatorResult::Finished } +#[cfg(feature = "navmesh")] #[operator(id = "entity.add.navmesh", label = "Navmesh")] pub(crate) fn entity_add_navmesh( _: In, diff --git a/src/ext_build.rs b/src/ext_build.rs index 4d231db7..cded7d0f 100644 --- a/src/ext_build.rs +++ b/src/ext_build.rs @@ -161,7 +161,7 @@ fn discover_sdk() -> Result { // it before giving up so the first scaffold-then-build flow // just works. if let Some(checkout) = crate::new_project::jackdaw_dev_checkout() { - bevy::log::info!( + bevy_log::info!( "Auto-building jackdaw_rustc_wrapper from dev checkout at {}", checkout.display() ); diff --git a/src/extension_lifecycle.rs b/src/extension_lifecycle.rs index 4c2a256a..7623b86a 100644 --- a/src/extension_lifecycle.rs +++ b/src/extension_lifecycle.rs @@ -1,4 +1,5 @@ -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_api_internal::lifecycle::enable_extension; use crate::extension_resolution::resolve_enabled_list; diff --git a/src/extension_watcher.rs b/src/extension_watcher.rs index 555eac2b..f5789735 100644 --- a/src/extension_watcher.rs +++ b/src/extension_watcher.rs @@ -23,7 +23,8 @@ use std::path::{Path, PathBuf}; use std::sync::{Arc, Mutex}; use std::time::{Duration, Instant}; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_loader::{ DEFAULT_EXTENSIONS_SUBDIR, DEFAULT_GAMES_SUBDIR, ENV_EXTENSIONS_PATH, ENV_GAMES_PATH, }; diff --git a/src/face_grid.rs b/src/face_grid.rs index 53620fad..e11f9274 100644 --- a/src/face_grid.rs +++ b/src/face_grid.rs @@ -1,6 +1,7 @@ use std::collections::HashSet; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_jsn::BrushGroup; @@ -11,6 +12,8 @@ use crate::snapping::SnapSettings; use crate::viewport_overlays::OverlaySettings; use crate::viewport_select::GroupEditState; use crate::{JackdawDrawSystems, default_style}; +use bevy_gizmos::prelude::*; +use bevy_reflect::prelude::*; /// Gizmo group for face grid lines. Rendered slightly in front of geometry. #[derive(Default, Reflect, GizmoConfigGroup)] diff --git a/src/gizmo_ops.rs b/src/gizmo_ops.rs index c5c90c30..8152024e 100644 --- a/src/gizmo_ops.rs +++ b/src/gizmo_ops.rs @@ -8,7 +8,8 @@ //! Default keybinds: R=rotate, T=scale, Escape=translate, X=space //! toggle. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use bevy_enhanced_input::prelude::{Press, *}; use jackdaw_api::prelude::*; diff --git a/src/gizmos.rs b/src/gizmos.rs index d90cac10..871c5276 100644 --- a/src/gizmos.rs +++ b/src/gizmos.rs @@ -1,8 +1,9 @@ -use bevy::{ - prelude::*, - ui::UiGlobalTransform, - window::{CursorGrabMode, CursorOptions}, -}; +use bevy_ecs::prelude::*; +use bevy_gizmos::prelude::*; +use bevy_reflect::prelude::*; +use bevy_ui::UiGlobalTransform; +use bevy_window::{CursorGrabMode, CursorOptions}; + use jackdaw_api::prelude::*; use jackdaw_api_internal::lifecycle::ActiveModalOperator; diff --git a/src/grid_ops.rs b/src/grid_ops.rs index 8641d87d..b4619591 100644 --- a/src/grid_ops.rs +++ b/src/grid_ops.rs @@ -5,7 +5,8 @@ //! path for grid resize lives alongside the modifier-gated scroll //! handler in [`crate::snapping`]. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use bevy_enhanced_input::prelude::{Press, *}; use jackdaw_api::prelude::*; diff --git a/src/history_ops.rs b/src/history_ops.rs index 08ec79ed..ab5ddd16 100644 --- a/src/history_ops.rs +++ b/src/history_ops.rs @@ -9,8 +9,9 @@ //! under the modal, leaving its `ActiveModalOperator` marker + per-op //! state stale. -use bevy::input::ButtonInput; -use bevy::prelude::*; +use bevy_input::ButtonInput; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use bevy_enhanced_input::prelude::{Press, *}; use jackdaw_api::prelude::*; diff --git a/src/hot_reload.rs b/src/hot_reload.rs index 5e8d7da4..ca08f4e5 100644 --- a/src/hot_reload.rs +++ b/src/hot_reload.rs @@ -17,7 +17,8 @@ use std::path::PathBuf; use std::sync::{Arc, Mutex}; use std::time::{Duration, Instant}; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use notify::{Event, EventKind, RecommendedWatcher, RecursiveMode, Watcher}; use crate::ext_build::artifact_file_name; @@ -112,11 +113,11 @@ fn start_watcher( let event = match res { Ok(e) => e, Err(e) => { - bevy::log::warn!("HotReload watcher error: {e}"); + bevy_log::warn!("HotReload watcher error: {e}"); return; } }; - bevy::log::trace!( + bevy_log::trace!( "HotReload event: kind={:?} paths={:?}", event.kind, event.paths diff --git a/src/inspector/anim_diamond.rs b/src/inspector/anim_diamond.rs index 2ee10f7e..07a72209 100644 --- a/src/inspector/anim_diamond.rs +++ b/src/inspector/anim_diamond.rs @@ -6,7 +6,8 @@ //! need one entry in `ANIMATABLE_FIELDS` plus matching arms in //! `spawn_typed_keyframe` and `compile::build_curve_for_track`. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_log::prelude::*; use jackdaw_animation::{ AnimationTrack, Clip, F32Keyframe, QuatKeyframe, SelectedClip, TimelineCursor, TimelineDirty, Vec3Keyframe, diff --git a/src/inspector/brush_display.rs b/src/inspector/brush_display.rs index 829146bd..c79448d8 100644 --- a/src/inspector/brush_display.rs +++ b/src/inspector/brush_display.rs @@ -3,8 +3,8 @@ use crate::brush::{Brush, BrushEditMode, BrushFaceData, BrushSelection, EditMode use crate::commands::CommandHistory; use crate::selection::Selection; -use bevy::picking::hover::Hovered; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_picking::hover::Hovered; use jackdaw_api::prelude::*; use jackdaw_feathers::{ button::ButtonOperatorCall, diff --git a/src/inspector/component_display.rs b/src/inspector/component_display.rs index 2e5d52a9..38e393da 100644 --- a/src/inspector/component_display.rs +++ b/src/inspector/component_display.rs @@ -5,16 +5,15 @@ use crate::prelude::*; use crate::selection::{Selected, Selection}; use std::any::TypeId; -use bevy::ecs::component::ComponentInfo; -use bevy::{ - ecs::{ - archetype::Archetype, - component::{ComponentId, Components}, - reflect::{AppTypeRegistry, ReflectComponent}, - }, +use bevy_ecs::component::ComponentInfo; +use bevy_ecs::{ + archetype::Archetype, + component::{ComponentId, Components}, prelude::*, - reflect::serde::TypedReflectSerializer, + reflect::{AppTypeRegistry, ReflectComponent}, }; +use bevy_log::prelude::*; +use bevy_reflect::serde::TypedReflectSerializer; use jackdaw_feathers::{ button::ButtonOperatorCall, icons::{EditorFont, Icon, IconFont}, @@ -29,17 +28,19 @@ use std::collections::HashSet; use bevy_monitors::prelude::{Addition, Monitor, NotifyAdded}; +#[cfg(feature = "avian")] use jackdaw_avian_integration::AvianCollider; +#[cfg(feature = "avian")] use jackdaw_geometry::is_convex_topology; use jackdaw_runtime::EditorCategory; use super::{ AddComponentButton, ComponentDisplay, ComponentDisplayBody, ComponentName, ComponentPicker, Inspector, InspectorDirty, InspectorGroupSection, InspectorSearch, InspectorTarget, - ReflectDisplayable, brush_display, component_tooltip::ReflectedTypeTooltip, - custom_props_display, extract_module_group, material_display, reflect_fields, + brush_display, component_tooltip::ReflectedTypeTooltip, custom_props_display, + extract_module_group, material_display, reflect_fields, }; -use bevy::picking::hover::Hovered; +use bevy_picking::hover::Hovered; pub(crate) fn add_component_displays( _: On, @@ -170,7 +171,7 @@ pub(crate) fn build_inspector_displays( } // AST filter: hide Bevy-internal components that // aren't tracked in the scene file. User-defined - // components (anything outside the `bevy::*`, + // components (anything outside the `bevy_*`, // `core::*`, `std::*`, and `jackdaw_*` namespaces) // are always shown so the inspector reflects the // actual ECS state. Without this exception, a user @@ -194,9 +195,9 @@ pub(crate) fn build_inspector_displays( let short = table.short_path().to_string(); let info = registration.type_info(); let attrs = match info { - bevy::reflect::TypeInfo::Struct(s) => Some(s.custom_attributes()), - bevy::reflect::TypeInfo::TupleStruct(s) => Some(s.custom_attributes()), - bevy::reflect::TypeInfo::Enum(e) => Some(e.custom_attributes()), + bevy_reflect::TypeInfo::Struct(s) => Some(s.custom_attributes()), + bevy_reflect::TypeInfo::TupleStruct(s) => Some(s.custom_attributes()), + bevy_reflect::TypeInfo::Enum(e) => Some(e.custom_attributes()), _ => None, }; let module_group = if let Some(cat) = attrs @@ -237,13 +238,24 @@ pub(crate) fn build_inspector_displays( // for most when iterating on physics; ordering it alphabetically // (where it'd sit under `RigidBody` in the Avian3d group) buries // it under runtime-state components. - let group_pin_priority = |type_path: &str| -> u8 { - if type_path == "jackdaw_avian_integration::AvianCollider" { - 0 - } else { - 1 + + let group_pin_priority = { + #[cfg(feature = "avian")] + { + |type_path: &str| -> u8 { + if type_path == "jackdaw_avian_integration::AvianCollider" { + 0 + } else { + 1 + } + } + } + #[cfg(not(feature = "avian"))] + { + |_: &str| -> u8 { 1 } } }; + comp_list.sort_by(|a, b| { let a_custom = custom_groups.contains(&a.1); let b_custom = custom_groups.contains(&b.1); @@ -397,6 +409,7 @@ pub(crate) fn build_inspector_displays( // forces TriMesh regardless of the user's AvianCollider setting. Show a // read-only note so the change is visible in the inspector. // CONVEX_FUNCTIONAL: different behavior is intentional (mirrors collider-type choice in physics_brush_bridge) + #[cfg(feature = "avian")] if entity_ref.contains::() && let Some(brush) = entity_ref.get::() && !is_convex_topology(&brush.topology) @@ -782,7 +795,7 @@ pub(crate) fn spawn_component_display( Hovered::default(), bo_call, ChildOf(header), - bevy::ui_widgets::observe(move |_: On>, mut commands: Commands| { + bevy_ui_widgets::observe(move |_: On>, mut commands: Commands| { commands .operator(super::ops::ComponentRevertBaselineOp::ID) .param("entity", entity_param) @@ -809,7 +822,7 @@ pub(crate) fn spawn_component_display( Hovered::default(), remove_call, ChildOf(header), - bevy::ui_widgets::observe(move |_: On>, mut commands: Commands| { + bevy_ui_widgets::observe(move |_: On>, mut commands: Commands| { commands .operator(super::ops::ComponentRemoveOp::ID) .param("entity", entity_param) @@ -894,8 +907,8 @@ pub(crate) fn revert_component_to_baseline( In((entity, component_id)): In<(Entity, ComponentId)>, world: &mut World, ) { - use bevy::ecs::reflect::AppTypeRegistry; - use bevy::reflect::serde::TypedReflectDeserializer; + use bevy_ecs::reflect::AppTypeRegistry; + use bevy_reflect::serde::TypedReflectDeserializer; use serde::de::DeserializeSeed; let Some(baseline) = world.get::(entity).cloned() else { diff --git a/src/inspector/component_picker.rs b/src/inspector/component_picker.rs index 695a2100..5cd248ba 100644 --- a/src/inspector/component_picker.rs +++ b/src/inspector/component_picker.rs @@ -3,10 +3,10 @@ use crate::selection::{Selected, Selection}; use std::any::TypeId; use std::collections::HashSet; -use bevy::ecs::archetype::Archetype; -use bevy::ecs::component::Components; -use bevy::ecs::reflect::{AppTypeRegistry, ReflectComponent}; -use bevy::prelude::*; +use bevy_ecs::archetype::Archetype; +use bevy_ecs::component::Components; +use bevy_ecs::prelude::*; +use bevy_ecs::reflect::{AppTypeRegistry, ReflectComponent}; use jackdaw_api::prelude::*; use jackdaw_feathers::picker::{ Category, Matchable, PickerItems, PickerProps, SelectInput, SpawnItemInput, match_text, @@ -14,7 +14,7 @@ use jackdaw_feathers::picker::{ }; use jackdaw_feathers::tokens; -use bevy::reflect::{TypeInfo, attributes::CustomAttributes}; +use bevy_reflect::{TypeInfo, attributes::CustomAttributes}; use jackdaw_feathers::tooltip::Tooltip; use jackdaw_runtime::{EditorCategory, EditorDescription, EditorHidden}; @@ -170,7 +170,7 @@ pub struct PickableComponent { /// /// [`build_reflective_default`]: crate::reflect_default::build_reflective_default pub fn enumerate_pickable_components( - registry: &bevy::reflect::TypeRegistry, + registry: &bevy_reflect::TypeRegistry, existing_types: &HashSet, denylist: &PickerDenylist, ) -> Vec { @@ -279,7 +279,7 @@ pub(crate) fn on_add_component_button_click( .filter_map(|cid| { components .get_info(cid) - .and_then(bevy::ecs::component::ComponentInfo::type_id) + .and_then(bevy_ecs::component::ComponentInfo::type_id) }) .collect(); diff --git a/src/inspector/component_tooltip.rs b/src/inspector/component_tooltip.rs index 89497fe3..eb0b855a 100644 --- a/src/inspector/component_tooltip.rs +++ b/src/inspector/component_tooltip.rs @@ -11,7 +11,7 @@ use std::borrow::Cow; -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_feathers::tooltip::Tooltip; use jackdaw_runtime::EditorDescription; @@ -61,9 +61,9 @@ fn auto_attach_reflected_type_tooltip( // `custom_attributes()` lives on the variant types // (StructInfo / EnumInfo / ...), so reach in via a match. let attrs = match info { - bevy::reflect::TypeInfo::Struct(s) => Some(s.custom_attributes()), - bevy::reflect::TypeInfo::TupleStruct(s) => Some(s.custom_attributes()), - bevy::reflect::TypeInfo::Enum(e) => Some(e.custom_attributes()), + bevy_reflect::TypeInfo::Struct(s) => Some(s.custom_attributes()), + bevy_reflect::TypeInfo::TupleStruct(s) => Some(s.custom_attributes()), + bevy_reflect::TypeInfo::Enum(e) => Some(e.custom_attributes()), _ => None, }; let description = attrs diff --git a/src/inspector/custom_props_display.rs b/src/inspector/custom_props_display.rs index bc44b012..8ca2888c 100644 --- a/src/inspector/custom_props_display.rs +++ b/src/inspector/custom_props_display.rs @@ -1,10 +1,10 @@ use crate::commands::{CommandHistory, EditorCommand}; use crate::custom_properties::{CustomProperties, PropertyValue, SetCustomProperties}; -use bevy::ecs::system::SystemState; -use bevy::picking::hover::Hovered; -use bevy::prelude::*; -use bevy::ui_widgets::observe; +use bevy_ecs::prelude::*; +use bevy_ecs::system::SystemState; +use bevy_picking::hover::Hovered; +use bevy_ui_widgets::observe; use jackdaw_feathers::combobox::{ComboBoxSelectedIndex, combobox_with_selected}; use jackdaw_feathers::tooltip::Tooltip; use jackdaw_feathers::{ diff --git a/src/inspector/material_display.rs b/src/inspector/material_display.rs index acd31dab..d787cf15 100644 --- a/src/inspector/material_display.rs +++ b/src/inspector/material_display.rs @@ -1,4 +1,4 @@ -use bevy::prelude::*; +use bevy_ecs::prelude::*; use jackdaw_feathers::{ text_edit::{self, TextEditCommitEvent, TextEditProps}, tokens, diff --git a/src/inspector/mod.rs b/src/inspector/mod.rs index 7cfa3807..1e1e0103 100644 --- a/src/inspector/mod.rs +++ b/src/inspector/mod.rs @@ -6,13 +6,19 @@ pub(crate) mod component_tooltip; mod custom_props_display; mod material_display; pub(crate) mod ops; +#[cfg(feature = "avian")] pub(crate) mod physics_display; pub(crate) mod reflect_fields; +// Editor display metadata as Bevy reflect custom attributes. +// Newtypes live in `jackdaw_jsn`, re-exported here. +pub use jackdaw_runtime::{EditorCategory, EditorDescription, EditorHidden, SkipSerialization}; use crate::EditorEntity; -use bevy::ecs::archetype::ArchetypeId; -use bevy::prelude::*; +use bevy_ecs::archetype::ArchetypeId; +use bevy_ecs::prelude::*; +use bevy_log::prelude::*; +use bevy_reflect::prelude::*; const MAX_REFLECT_DEPTH: usize = 4; @@ -60,10 +66,6 @@ fn extract_module_group(module_path: Option<&str>) -> String { } } -// Editor display metadata as Bevy reflect custom attributes. -// Newtypes live in `jackdaw_jsn`, re-exported here. -pub use jackdaw_runtime::{EditorCategory, EditorDescription, EditorHidden, SkipSerialization}; - #[reflect_trait] pub trait Displayable { fn display(&self, entity: &mut EntityCommands, source: Entity); @@ -133,7 +135,7 @@ impl Plugin for InspectorPlugin { /// Needed so that undo/redo and external edits are reflected in the UI without /// having to deselect and reselect the entity. fn refresh_name_field(world: &mut World) { - use bevy::input_focus::InputFocus; + use bevy_input_focus::InputFocus; use jackdaw_feathers::text_edit::{ TextEditDragging, TextEditValue, TextInputQueue, set_text_input_value, }; diff --git a/src/inspector/ops.rs b/src/inspector/ops.rs index 7fbb111b..1be0dd2d 100644 --- a/src/inspector/ops.rs +++ b/src/inspector/ops.rs @@ -2,12 +2,14 @@ //! and the small set of typed actions (`physics.enable` / `physics.disable`, //! `animation.toggle_keyframe`). -use bevy::ecs::component::ComponentId; -use bevy::ecs::reflect::{AppTypeRegistry, ReflectComponent}; -use bevy::prelude::*; +use bevy_ecs::component::ComponentId; +use bevy_ecs::prelude::*; +use bevy_ecs::reflect::{AppTypeRegistry, ReflectComponent}; +use bevy_log::prelude::*; use jackdaw_api::prelude::*; use super::component_display::revert_component_to_baseline; +#[cfg(feature = "avian")] use super::physics_display::{DisablePhysics, enable_physics}; use crate::commands::{AddComponent, CommandHistory, EditorCommand}; use crate::selection::Selection; @@ -16,13 +18,14 @@ pub(crate) fn add_to_extension(ctx: &mut ExtensionContext) { ctx.register_operator::() .register_operator::() .register_operator::() - .register_operator::() - .register_operator::() .register_operator::() .register_operator::() .register_operator::() .register_operator::() .register_operator::(); + #[cfg(feature = "avian")] + ctx.register_operator::() + .register_operator::(); } /// Inspector operators all act on the inspected entity (the primary @@ -195,6 +198,7 @@ pub(crate) fn component_revert_baseline( /// Add `RigidBody` and `AvianCollider` to the entity so it participates /// in the physics simulation. No-op if those components are already /// present. +#[cfg(feature = "avian")] #[operator( id = "physics.enable", label = "Enable Physics", @@ -220,6 +224,7 @@ pub(crate) fn physics_enable( /// Remove physics components from the entity, capturing the pre-disable /// state so undo restores them. +#[cfg(feature = "avian")] #[operator( id = "physics.disable", label = "Disable Physics", diff --git a/src/inspector/physics_display.rs b/src/inspector/physics_display.rs index ddd044e9..44606baa 100644 --- a/src/inspector/physics_display.rs +++ b/src/inspector/physics_display.rs @@ -5,7 +5,7 @@ //! command palette can still toggle the canonical bundle in one shot. use avian3d::prelude::*; -use bevy::{ecs::reflect::AppTypeRegistry, prelude::*}; +use bevy_ecs::prelude::*; use jackdaw_avian_integration::AvianCollider; use crate::commands::{AddComponent, CommandGroup, CommandHistory, EditorCommand}; @@ -86,13 +86,13 @@ impl EditorCommand for DisablePhysics { continue; }; let Some(reflect_component) = - registration.data::() + registration.data::() else { continue; }; // Deserialize JSON -> reflected value -> insert into ECS let deserializer = - bevy::reflect::serde::TypedReflectDeserializer::new(registration, ®); + bevy_reflect::serde::TypedReflectDeserializer::new(registration, ®); use serde::de::DeserializeSeed; let Ok(reflected) = deserializer.deserialize(value) else { continue; diff --git a/src/inspector/reflect_fields.rs b/src/inspector/reflect_fields.rs index 75d81cef..79135373 100644 --- a/src/inspector/reflect_fields.rs +++ b/src/inspector/reflect_fields.rs @@ -1,16 +1,15 @@ use crate::commands::{CommandGroup, CommandHistory, EditorCommand, SetJsnField}; use crate::selection::Selection; -use bevy::reflect::{NamedField, UnnamedField}; -use bevy::{ - ecs::reflect::{AppTypeRegistry, ReflectComponent}, - feathers::theme::ThemedText, - input_focus::InputFocus, - math::Vec3A, - prelude::*, - reflect::ReflectRef, - ui_widgets::observe, -}; +use bevy_ecs::prelude::*; +use bevy_ecs::reflect::{AppTypeRegistry, ReflectComponent}; +use bevy_feathers::theme::ThemedText; +use bevy_input_focus::InputFocus; +use bevy_math::prelude::*; +use bevy_reflect::ReflectRef; +use bevy_ui_widgets::observe; + +use bevy_reflect::{NamedField, UnnamedField}; use jackdaw_feathers::{ checkbox::{CheckboxCommitEvent, CheckboxProps, CheckboxState, checkbox}, color_picker::{ColorPickerCommitEvent, ColorPickerProps, color_picker}, @@ -1965,7 +1964,7 @@ pub(crate) fn refresh_enum_variants( // `Without` makes this query disjoint from `hosts` so the // two queries can coexist -- we only ever need to read the selected source // entity, never a UI container. - entity_query: Query>, + entity_query: Query>, dirty_sources: Query<(), With>, ) { let Some(primary) = selection.primary() else { @@ -1998,7 +1997,7 @@ pub(crate) fn refresh_enum_variants( continue; }; - let enum_partial: &dyn bevy::reflect::PartialReflect = if host.field_path.is_empty() { + let enum_partial: &dyn bevy_reflect::PartialReflect = if host.field_path.is_empty() { reflected.as_partial_reflect() } else { let Ok(field) = reflected.reflect_path(host.field_path.as_str()) else { @@ -2097,7 +2096,7 @@ fn is_opaque_type(value: &dyn PartialReflect) -> bool { fn spawn_enum_field( commands: &mut Commands, parent: Entity, - enum_ref: &dyn bevy::reflect::Enum, + enum_ref: &dyn bevy_reflect::Enum, depth: usize, field_path: String, source_entity: Entity, @@ -2119,7 +2118,7 @@ fn spawn_enum_field( ); return; }; - let bevy::reflect::TypeInfo::Enum(enum_info) = type_info else { + let bevy_reflect::TypeInfo::Enum(enum_info) = type_info else { spawn_text_row( commands, parent, @@ -2154,7 +2153,7 @@ fn spawn_enum_field( let all_unit = (0..enum_info.variant_len()).all(|i| { enum_info .variant_at(i) - .map(|v| matches!(v, bevy::reflect::VariantInfo::Unit(_))) + .map(|v| matches!(v, bevy_reflect::VariantInfo::Unit(_))) .unwrap_or(false) }); @@ -2250,7 +2249,7 @@ pub(super) fn spawn_variant_contents( commands: &mut Commands, container: Entity, host: &super::EnumVariantHost, - enum_ref: &dyn bevy::reflect::Enum, + enum_ref: &dyn bevy_reflect::Enum, entity_names: &Query<&Name>, type_registry: &AppTypeRegistry, editor_font: &Handle, @@ -2260,7 +2259,7 @@ pub(super) fn spawn_variant_contents( let Some(type_info) = enum_ref.get_represented_type_info() else { return; }; - let bevy::reflect::TypeInfo::Enum(enum_info) = type_info else { + let bevy_reflect::TypeInfo::Enum(enum_info) = type_info else { return; }; @@ -2403,9 +2402,9 @@ fn apply_enum_variant_with_undo( fn resolve_enum_info<'a>( type_path: &str, field_path: &str, - registry: &'a bevy::reflect::TypeRegistry, -) -> Option<&'a bevy::reflect::EnumInfo> { - use bevy::reflect::TypeInfo; + registry: &'a bevy_reflect::TypeRegistry, +) -> Option<&'a bevy_reflect::EnumInfo> { + use bevy_reflect::TypeInfo; let mut current_reg = registry.get_with_type_path(type_path)?; let mut current_info = current_reg.type_info(); @@ -2434,11 +2433,11 @@ fn resolve_enum_info<'a>( /// default of the named enum variant. Returns `None` if any field type lacks /// `ReflectDefault`. fn build_variant_default_json( - enum_info: &bevy::reflect::EnumInfo, + enum_info: &bevy_reflect::EnumInfo, variant_name: &str, - registry: &bevy::reflect::TypeRegistry, + registry: &bevy_reflect::TypeRegistry, ) -> Option { - use bevy::reflect::{VariantInfo, prelude::ReflectDefault, serde::TypedReflectSerializer}; + use bevy_reflect::{VariantInfo, prelude::ReflectDefault, serde::TypedReflectSerializer}; let variant = enum_info.variant(variant_name)?; diff --git a/src/keybind_focus.rs b/src/keybind_focus.rs index c5c10cac..23424ad4 100644 --- a/src/keybind_focus.rs +++ b/src/keybind_focus.rs @@ -1,7 +1,7 @@ //! Decide whether a keybind/operator gate should refuse because the //! user is typing into a UI text input. //! -//! Why a wrapper exists: Bevy's [`bevy::input_focus::InputFocus`] +//! Why a wrapper exists: Bevy's [`bevy_input_focus::InputFocus`] //! `set_initial_focus` system runs in `PostStartup` and assigns the //! `PrimaryWindow` entity as the focused entity when nothing else has //! claimed focus yet. A gate written as `input_focus.0.is_none()` @@ -14,9 +14,10 @@ //! [`KeybindFocus`] returns `is_typing()` only when the focused entity //! has a [`TextInputNode`]. -use bevy::ecs::system::SystemParam; -use bevy::input_focus::InputFocus; -use bevy::prelude::*; +use bevy_ecs::system::SystemParam; +use bevy_input_focus::InputFocus; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_api::prelude::ActionSources; use jackdaw_feathers::text_edit::TextInputNode; diff --git a/src/keybind_settings.rs b/src/keybind_settings.rs index dd357668..3273706d 100644 --- a/src/keybind_settings.rs +++ b/src/keybind_settings.rs @@ -1,6 +1,7 @@ use std::collections::HashMap; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_commands::keybinds::{EditorAction, Keybind, KeybindRegistry}; use jackdaw_feathers::{ button::{ButtonClickEvent, ButtonProps, ButtonVariant, button}, diff --git a/src/keybinds.rs b/src/keybinds.rs index 0779c6a9..850c5444 100644 --- a/src/keybinds.rs +++ b/src/keybinds.rs @@ -1,4 +1,5 @@ -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_api_internal::paths::keybinds_path; use serde_json::{Map, Value}; diff --git a/src/layout.rs b/src/layout.rs index 6f3f8833..26af8551 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -1,4 +1,6 @@ -use bevy::{picking::hover::Hovered, prelude::*, ui_widgets::observe}; +use bevy_ecs::prelude::*; +use bevy_picking::hover::Hovered; +use bevy_ui_widgets::observe; use jackdaw_api::prelude::*; use jackdaw_feathers::{ button::{self, ButtonOperatorCall, ButtonSize, ButtonVariant}, @@ -22,11 +24,13 @@ use crate::{ hierarchy::{HierarchyPanel, HierarchyShowAllButton, HierarchyTreeContainer}, inspector::Inspector, measure_tool::MeasureDistanceOp, - physics_tool::PhysicsActivateOp, remote::ConnectionManager, viewport::SceneViewport, }; +#[cfg(feature = "avian")] +use crate::physics_tool::PhysicsActivateOp; + /// Discriminator for the header tab kinds the editor knows how to host. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Default)] pub enum TabKind { @@ -423,6 +427,25 @@ pub fn project_files_panel_content() -> impl Bundle { /// "center" leaf in one go. Public to the crate because it's spawned /// by the viewport plugin, not by `editor_layout` directly. pub(crate) fn viewport_with_toolbar() -> impl Bundle { + let children = { + #[cfg(feature = "navmesh")] + { + children![ + toolbar(), + crate::navmesh::toolbar::navmesh_toolbar(), + crate::terrain::toolbar::terrain_toolbar(), + scene_view(), + ] + } + #[cfg(not(feature = "navmesh"))] + { + children![ + toolbar(), + crate::terrain::toolbar::terrain_toolbar(), + scene_view(), + ] + } + }; ( EditorEntity, Node { @@ -434,12 +457,7 @@ pub(crate) fn viewport_with_toolbar() -> impl Bundle { ..Default::default() }, BackgroundColor(tokens::PANEL_BG), - children![ - toolbar(), - crate::navmesh::toolbar::navmesh_toolbar(), - crate::terrain::toolbar::terrain_toolbar(), - scene_view(), - ], + children, ) } @@ -453,6 +471,52 @@ fn toolbar() -> impl Bundle { // // Sizing matches the Figma viewport-toolbar spec: 30px tall, 1px // border, top corners rounded against the panel below. + let children = { + #[cfg(feature = "avian")] + { + children![ + toolbar_op_button::(Icon::Move3d), + toolbar_op_button::(Icon::Rotate3d), + toolbar_op_button::(Icon::Scale3d), + separator::separator(separator::SeparatorProps::vertical()), + // Gizmo space toggle. Active highlight = `Local`; default + // = `World`. Tooltip is the discoverability path. + toolbar_op_button::(Icon::Globe), + separator::separator(separator::SeparatorProps::vertical()), + toolbar_op_button::(Icon::MousePointer2), + toolbar_op_button::(Icon::Box), + toolbar_op_button::(Icon::RulerDimensionLine), + toolbar_op_button::(Icon::CircleDot), + toolbar_op_button::(Icon::GitCommitHorizontal), + toolbar_op_button::(Icon::Hexagon), + toolbar_op_button::(Icon::ScissorsLineDashed), + separator::separator(separator::SeparatorProps::vertical()), + toolbar_op_button::(Icon::Zap), + ] + } + + #[cfg(not(feature = "avian"))] + { + children![ + toolbar_op_button::(Icon::Move3d), + toolbar_op_button::(Icon::Rotate3d), + toolbar_op_button::(Icon::Scale3d), + separator::separator(separator::SeparatorProps::vertical()), + // Gizmo space toggle. Active highlight = `Local`; default + // = `World`. Tooltip is the discoverability path. + toolbar_op_button::(Icon::Globe), + separator::separator(separator::SeparatorProps::vertical()), + toolbar_op_button::(Icon::MousePointer2), + toolbar_op_button::(Icon::Box), + toolbar_op_button::(Icon::RulerDimensionLine), + toolbar_op_button::(Icon::CircleDot), + toolbar_op_button::(Icon::GitCommitHorizontal), + toolbar_op_button::(Icon::Hexagon), + toolbar_op_button::(Icon::ScissorsLineDashed), + separator::separator(separator::SeparatorProps::vertical()), + ] + } + }; ( Toolbar, EditorEntity, @@ -480,25 +544,7 @@ fn toolbar() -> impl Bundle { }, BackgroundColor(tokens::PANEL_HEADER_BG), BorderColor::all(tokens::TOOLBAR_BORDER), - children![ - toolbar_op_button::(Icon::Move3d), - toolbar_op_button::(Icon::Rotate3d), - toolbar_op_button::(Icon::Scale3d), - separator::separator(separator::SeparatorProps::vertical()), - // Gizmo space toggle. Active highlight = `Local`; default - // = `World`. Tooltip is the discoverability path. - toolbar_op_button::(Icon::Globe), - separator::separator(separator::SeparatorProps::vertical()), - toolbar_op_button::(Icon::MousePointer2), - toolbar_op_button::(Icon::Box), - toolbar_op_button::(Icon::RulerDimensionLine), - toolbar_op_button::(Icon::CircleDot), - toolbar_op_button::(Icon::GitCommitHorizontal), - toolbar_op_button::(Icon::Hexagon), - toolbar_op_button::(Icon::ScissorsLineDashed), - separator::separator(separator::SeparatorProps::vertical()), - toolbar_op_button::(Icon::Zap), - ], + children, ) } @@ -741,10 +787,18 @@ pub fn update_toolbar_button_variants( *edit_mode == EditMode::BrushEdit(BrushEditMode::Clip) } else if call.id == EditModeKnifeOp::ID { *edit_mode == EditMode::BrushEdit(BrushEditMode::Knife) - } else if call.id == PhysicsActivateOp::ID { - *edit_mode == EditMode::Physics } else { - false + #[cfg(feature = "avian")] + if call.id == PhysicsActivateOp::ID { + *edit_mode == EditMode::Physics + } else { + false + } + + #[cfg(not(feature = "avian"))] + { + false + } }; // Inactive toolbar buttons fall back to `Ghost` (transparent) // so only the active one stands out as solid grey. Using @@ -855,7 +909,7 @@ fn editor_status_bar() -> impl Bundle { font_size: tokens::FONT_SM, ..Default::default() }, - bevy::feathers::theme::ThemedText, + bevy_feathers::theme::ThemedText, ), ( status_bar::StatusBarCenter, diff --git a/src/lib.rs b/src/lib.rs index d1a2be04..bd9efd5a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -46,10 +46,13 @@ pub mod material_browser; pub mod material_preview; pub mod measure_tool; pub mod modal_transform; +#[cfg(feature = "navmesh")] pub mod navmesh; pub mod new_project; pub mod operator_tooltip; +#[cfg(feature = "avian")] pub mod physics_brush_bridge; +#[cfg(feature = "avian")] pub mod physics_tool; pub mod pie; pub mod prefab_picker; @@ -77,16 +80,15 @@ pub mod viewport_select; pub mod viewport_util; pub mod workspace_dropdown; -use bevy::{ - app::PluginGroupBuilder, - ecs::system::SystemState, - feathers::{FeathersPlugins, dark_theme::create_dark_theme, theme::UiTheme}, - input::mouse::{MouseScrollUnit, MouseWheel}, - input_focus::InputDispatchPlugin, - picking::hover::HoverMap, - platform::collections::HashMap, - prelude::*, -}; +use bevy_app::PluginGroupBuilder; +use bevy_ecs::prelude::*; +use bevy_ecs::system::SystemState; +use bevy_feathers::{FeathersPlugins, dark_theme::create_dark_theme, theme::UiTheme}; +use bevy_input::mouse::{MouseScrollUnit, MouseWheel}; +use bevy_input_focus::InputDispatchPlugin; +use bevy_log::prelude::*; +use bevy_picking::hover::HoverMap; +use bevy_platform::collections::HashMap; use jackdaw_api::prelude::*; use jackdaw_api_internal::{ ToAnchorId as _, @@ -111,6 +113,7 @@ pub mod prelude { // without direct deps on avian3d / bevy_enhanced_input. // Editor plugins assert presence rather than adding, so user // code can add the same plugins without conflict. + #[cfg(feature = "avian")] pub use avian3d::prelude::PhysicsPlugins; pub use bevy_enhanced_input::prelude::EnhancedInputPlugin; } @@ -294,16 +297,22 @@ impl Plugin for EditorCorePlugin { draw_brush::DrawBrushPlugin, face_grid::FaceGridPlugin, alignment_guides::AlignmentGuidesPlugin, + #[cfg(feature = "navmesh")] navmesh::NavmeshPlugin, terrain::TerrainPlugin, remote::RemoteConnectionPlugin, )) - .add_plugins(jackdaw_avian_integration::PhysicsOverlaysPlugin::< - selection::Selected, - >::new()) - .add_plugins(jackdaw_avian_integration::simulation::PhysicsSimulationPlugin) - .add_plugins(physics_brush_bridge::PhysicsBrushBridgePlugin) - .add_plugins(physics_tool::PhysicsToolPlugin) + .add_plugins( + #[cfg(feature = "avian")] + ( + jackdaw_avian_integration::PhysicsOverlaysPlugin::::new(), + jackdaw_avian_integration::simulation::PhysicsSimulationPlugin, + physics_brush_bridge::PhysicsBrushBridgePlugin, + physics_tool::PhysicsToolPlugin, + ), + #[cfg(not(feature = "avian"))] + (), + ) .add_plugins(operator_tooltip::OperatorTooltipPlugin) .add_plugins(jackdaw_node_graph::NodeGraphPlugin) .add_plugins(jackdaw_animation::AnimationPlugin) @@ -320,7 +329,7 @@ impl Plugin for EditorCorePlugin { // the same shutdown behaviour. .add_systems( Last, - |mut events: bevy::ecs::message::MessageReader| { + |mut events: bevy_ecs::message::MessageReader| { if let Some(exit) = events.read().next() { let code = match exit { AppExit::Success => 0, @@ -340,8 +349,8 @@ impl Plugin for EditorCorePlugin { .configure_sets( PostUpdate, JackdawDrawSystems - .after(bevy::transform::TransformSystems::Propagate) - .after(bevy::camera::visibility::VisibilitySystems::VisibilityPropagate) + .after(bevy_transform::TransformSystems::Propagate) + .after(bevy_camera::visibility::VisibilitySystems::VisibilityPropagate) .run_if(in_state(crate::AppState::Editor)), ) .insert_resource(UiTheme(create_dark_theme())) @@ -1154,11 +1163,11 @@ pub(crate) fn clip_delete_keyframes( } fn has_selected_keyframes( - input_focus: Res, + input_focus: Res, selection: Res, keyframes: Query< (), - bevy::ecs::query::Or<( + bevy_ecs::query::Or<( With, With, With, @@ -1172,7 +1181,7 @@ fn has_selected_keyframes( } fn timeline_with_clip( - input_focus: Res, + input_focus: Res, active: ActiveModalQuery, tree: Res, selected_clip: Res, @@ -1187,7 +1196,7 @@ fn timeline_with_clip( } fn timeline_paste_available( - input_focus: Res, + input_focus: Res, active: ActiveModalQuery, tree: Res, selected_clip: Res, @@ -1928,7 +1937,7 @@ fn discover_gltf_clips( sources: Query<(Entity, &jackdaw_jsn::GltfSource, Option<&Children>)>, existing_refs: Query<(), With>, asset_server: Res, - gltfs: Res>, + gltfs: Res>, mut commands: Commands, ) { for (entity, source, children) in &sources { @@ -1943,7 +1952,7 @@ fn discover_gltf_clips( } let asset_path = crate::entity_ops::to_asset_path(&source.path); - let handle: Handle = asset_server.load(asset_path); + let handle: Handle = asset_server.load(asset_path); let Some(gltf) = gltfs.get(&handle) else { continue; }; @@ -2129,7 +2138,9 @@ fn populate_menu( op_entry::("Toggle Brush Wireframe"), op_entry::("Toggle Brush Outline"), op_entry::("Toggle Alignment Guides"), + #[cfg(feature = "avian")] op_entry::("Toggle Collider Gizmos"), + #[cfg(feature = "avian")] op_entry::("Toggle Hierarchy Arrows"), op_entry::("Toggle Perspective / Orthographic"), op_entry::("Frame Selected"), diff --git a/src/main.rs b/src/main.rs index d460a033..e22a50fc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -102,6 +102,7 @@ fn main() -> AppExit { // assert presence, so user `MyGamePlugin`s can add the // same plugins without conflict. .add_plugins(( + #[cfg(feature = "avian")] avian3d::prelude::PhysicsPlugins::default(), bevy_enhanced_input::prelude::EnhancedInputPlugin, )) @@ -149,8 +150,8 @@ fn error_handler(error: BevyError, ctx: ErrorContext) { let msg = format!("{error}"); if msg.contains("Note that interacting with a despawned entity is the most common cause of this error but there are others") { // TODO: Ideally these should not happen. But as-is, we get a lot of them and they are benign, so let's not flood the logs - bevy::ecs::error::debug(error, ctx); + bevy_ecs::error::debug(error, ctx); return; } - bevy::ecs::error::error(error, ctx); + bevy_ecs::error::error(error, ctx); } diff --git a/src/material_browser.rs b/src/material_browser.rs index 7eb31603..1f50d2d7 100644 --- a/src/material_browser.rs +++ b/src/material_browser.rs @@ -1,14 +1,12 @@ use std::collections::HashMap; use std::path::{Path, PathBuf}; -use bevy::{ - feathers::theme::ThemedText, - image::ImageLoaderSettings, - picking::hover::Hovered, - prelude::*, - tasks::{AsyncComputeTaskPool, Task, futures_lite::future}, - window::{PrimaryWindow, RawHandleWrapper}, -}; +use bevy_ecs::prelude::*; +use bevy_feathers::theme::ThemedText; +use bevy_image::ImageLoaderSettings; +use bevy_picking::hover::Hovered; +use bevy_tasks::{AsyncComputeTaskPool, Task, futures_lite::future}; +use bevy_window::{PrimaryWindow, RawHandleWrapper}; use jackdaw_feathers::{ button::{ButtonOperatorCall, ButtonVariant, IconButtonProps, icon_button}, icons, @@ -230,7 +228,7 @@ impl TextureSlot { if mat.max_parallax_layer_count == 0.0 { mat.max_parallax_layer_count = 32.0; } - mat.parallax_mapping_method = bevy::pbr::ParallaxMappingMethod::Occlusion; + mat.parallax_mapping_method = bevy_pbr::ParallaxMappingMethod::Occlusion; } else { mat.parallax_depth_scale = 0.0; mat.max_parallax_layer_count = 0.0; @@ -401,7 +399,7 @@ fn detect_and_create_materials( metallic: if has_mr { 1.0 } else { 0.0 }, perceptual_roughness: if has_mr { 1.0 } else { 0.5 }, parallax_depth_scale: if has_depth { 0.05 } else { 0.0 }, - parallax_mapping_method: bevy::pbr::ParallaxMappingMethod::Occlusion, + parallax_mapping_method: bevy_pbr::ParallaxMappingMethod::Occlusion, max_parallax_layer_count: if has_depth { 32.0 } else { 0.0 }, ..default() }); @@ -1726,7 +1724,7 @@ pub(crate) fn material_rescan( pub fn material_select_folder( _: In, mut commands: Commands, - raw_handle: Query<&bevy::window::RawHandleWrapper, With>, + raw_handle: Query<&bevy_window::RawHandleWrapper, With>, ) -> OperatorResult { let mut dialog = AsyncFileDialog::new().set_title("Select materials directory"); if let Ok(rh) = raw_handle.single() { @@ -1737,7 +1735,7 @@ pub fn material_select_folder( dialog = dialog.set_parent(&handle); } let task = - bevy::tasks::AsyncComputeTaskPool::get().spawn(async move { dialog.pick_folder().await }); + bevy_tasks::AsyncComputeTaskPool::get().spawn(async move { dialog.pick_folder().await }); commands.insert_resource(MaterialBrowserFolderTask(task)); OperatorResult::Finished } diff --git a/src/material_preview.rs b/src/material_preview.rs index 1114807a..c9e4e409 100644 --- a/src/material_preview.rs +++ b/src/material_preview.rs @@ -1,9 +1,7 @@ -use bevy::{ - asset::{embedded_asset, load_embedded_asset}, - camera::{RenderTarget, visibility::RenderLayers}, - prelude::*, - render::render_resource::TextureFormat, -}; +use bevy_asset::{embedded_asset, load_embedded_asset}; +use bevy_camera::{RenderTarget, visibility::RenderLayers}; +use bevy_ecs::prelude::*; +use bevy_render::render_resource::TextureFormat; use crate::default_style; diff --git a/src/modal_transform.rs b/src/modal_transform.rs index 23ec4f7f..bd1a23a5 100644 --- a/src/modal_transform.rs +++ b/src/modal_transform.rs @@ -1,9 +1,7 @@ -use bevy::{ - picking::mesh_picking::ray_cast::{MeshRayCast, MeshRayCastSettings, RayCastVisibility}, - prelude::*, - ui::UiGlobalTransform, - window::{CursorGrabMode, CursorOptions}, -}; +use bevy_ecs::prelude::*; +use bevy_picking::mesh_picking::ray_cast::{MeshRayCast, MeshRayCastSettings, RayCastVisibility}; +use bevy_ui::UiGlobalTransform; +use bevy_window::{CursorGrabMode, CursorOptions}; use crate::{ commands::{CommandHistory, SetTransform}, diff --git a/src/navmesh/brp_client.rs b/src/navmesh/brp_client.rs index 6c2ded0b..06d885ac 100644 --- a/src/navmesh/brp_client.rs +++ b/src/navmesh/brp_client.rs @@ -1,12 +1,12 @@ use anyhow::anyhow; -use bevy::{ - asset::RenderAssetUsages, - mesh::{Indices, PrimitiveTopology}, - platform::collections::HashMap, - prelude::*, - remote::BrpRequest, - tasks::{AsyncComputeTaskPool, IoTaskPool, Task, futures_lite::future}, -}; +use bevy_asset::RenderAssetUsages; +use bevy_ecs::prelude::*; +use bevy_log::prelude::*; +use bevy_mesh::{Indices, PrimitiveTopology}; +use bevy_platform::collections::HashMap; +use bevy_remote::BrpRequest; +use bevy_tasks::{AsyncComputeTaskPool, IoTaskPool, Task, futures_lite::future}; + use bevy_rerecast::editor_integration::{ brp::{ BRP_GENERATE_EDITOR_INPUT, BRP_POLL_EDITOR_INPUT, GenerateEditorInputParams, diff --git a/src/navmesh/build.rs b/src/navmesh/build.rs index abcd150d..f8b9f8c8 100644 --- a/src/navmesh/build.rs +++ b/src/navmesh/build.rs @@ -1,4 +1,6 @@ -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_log::prelude::*; use bevy_rerecast::prelude::*; use jackdaw_api::prelude::*; diff --git a/src/navmesh/mod.rs b/src/navmesh/mod.rs index 4a2cb8a3..a4094aa7 100644 --- a/src/navmesh/mod.rs +++ b/src/navmesh/mod.rs @@ -5,7 +5,9 @@ pub mod save_load; pub mod toolbar; mod visualization; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_derive::{Deref, DerefMut}; +use bevy_ecs::prelude::*; use bevy_rerecast::{TriMeshFromBevyMesh as _, prelude::*, rerecast::TriMesh}; use crate::EditorEntity; diff --git a/src/navmesh/ops.rs b/src/navmesh/ops.rs index bf81d21a..570745d6 100644 --- a/src/navmesh/ops.rs +++ b/src/navmesh/ops.rs @@ -4,7 +4,8 @@ //! defined alongside their state in [`super::brp_client`], //! [`super::build`], and [`super::save_load`]. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_api::prelude::*; use super::brp_client::NavmeshFetchOp; diff --git a/src/navmesh/save_load.rs b/src/navmesh/save_load.rs index 13fc4f6e..8c2a391b 100644 --- a/src/navmesh/save_load.rs +++ b/src/navmesh/save_load.rs @@ -1,11 +1,11 @@ use std::{fs::File, io}; -use bevy::{ - prelude::*, - tasks::{AsyncComputeTaskPool, Task, futures_lite::future}, - window::{PrimaryWindow, RawHandleWrapper}, -}; +use bevy_derive::{Deref, DerefMut}; +use bevy_ecs::prelude::*; +use bevy_log::prelude::*; use bevy_rerecast::Navmesh; +use bevy_tasks::{AsyncComputeTaskPool, Task, futures_lite::future}; +use bevy_window::{PrimaryWindow, RawHandleWrapper}; use jackdaw_api::prelude::*; use rfd::{AsyncFileDialog, FileHandle}; diff --git a/src/navmesh/toolbar.rs b/src/navmesh/toolbar.rs index b12a1875..dd707c1c 100644 --- a/src/navmesh/toolbar.rs +++ b/src/navmesh/toolbar.rs @@ -1,4 +1,5 @@ -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_api::prelude::*; use jackdaw_feathers::{ button::{self, ButtonProps, ButtonVariant}, diff --git a/src/navmesh/visualization.rs b/src/navmesh/visualization.rs index f292c8fb..6e5f3019 100644 --- a/src/navmesh/visualization.rs +++ b/src/navmesh/visualization.rs @@ -1,9 +1,7 @@ -use bevy::{ - asset::RenderAssetUsages, - light::{NotShadowCaster, NotShadowReceiver}, - mesh::{Indices, PrimitiveTopology}, - prelude::*, -}; +use bevy_asset::RenderAssetUsages; +use bevy_ecs::prelude::*; +use bevy_light::{NotShadowCaster, NotShadowReceiver}; +use bevy_mesh::{Indices, PrimitiveTopology}; use crate::default_style; use bevy_rerecast::{ diff --git a/src/new_project.rs b/src/new_project.rs index 2bc23871..2dd37edf 100644 --- a/src/new_project.rs +++ b/src/new_project.rs @@ -17,7 +17,7 @@ use std::borrow::Cow; use std::path::{Path, PathBuf}; use std::process::Command; -use bevy::log::{info, warn}; +use bevy_log::{info, warn}; use crate::sdk_paths::SdkPaths; diff --git a/src/operator_tooltip.rs b/src/operator_tooltip.rs index 41860261..01c61695 100644 --- a/src/operator_tooltip.rs +++ b/src/operator_tooltip.rs @@ -18,7 +18,8 @@ //! `src/inspector/component_tooltip.rs` for the reflection-driven //! counterpart. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use bevy_enhanced_input::prelude::{Binding, Bindings}; use jackdaw_api_internal::lifecycle::{OperatorAction, OperatorEntity}; use jackdaw_commands::keybinds::key_display_name; diff --git a/src/physics_brush_bridge.rs b/src/physics_brush_bridge.rs index 3d976602..c44650d7 100644 --- a/src/physics_brush_bridge.rs +++ b/src/physics_brush_bridge.rs @@ -8,7 +8,8 @@ //! `init_collider_constructors` system never fires and can't interfere. use avian3d::prelude::*; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_avian_integration::AvianCollider; use jackdaw_geometry::is_convex_topology; @@ -117,10 +118,10 @@ fn brush_mesh_from_cache(cache: &BrushMeshCache) -> Option { } } let mut m = Mesh::new( - bevy::mesh::PrimitiveTopology::TriangleList, - bevy::asset::RenderAssetUsages::default(), + bevy_mesh::PrimitiveTopology::TriangleList, + bevy_asset::RenderAssetUsages::default(), ); m.insert_attribute(Mesh::ATTRIBUTE_POSITION, positions); - m.insert_indices(bevy::mesh::Indices::U32(indices)); + m.insert_indices(bevy_mesh::Indices::U32(indices)); Some(m) } diff --git a/src/physics_tool.rs b/src/physics_tool.rs index 7a0d1955..8d60c976 100644 --- a/src/physics_tool.rs +++ b/src/physics_tool.rs @@ -391,7 +391,7 @@ fn physics_tool_drag( let grab_offset = entity_tf.translation - hit_point; // Capture starting positions of ALL selected RigidBody entities - let mut start_positions = bevy::platform::collections::HashMap::default(); + let mut start_positions = bevy_platform::collections::HashMap::default(); for &sel_entity in &selection.entities { if rb_check.contains(sel_entity) && let Ok(sel_tf) = transforms.get(sel_entity) @@ -486,13 +486,13 @@ fn commit_physics_transforms(world: &mut World) { } let registry = registry_res.read(); - let old_ser = bevy::reflect::serde::TypedReflectSerializer::with_processor( + let old_ser = bevy_reflect::serde::TypedReflectSerializer::with_processor( old_tf, ®istry, &processor, ); let Ok(old_json) = serde_json::to_value(&old_ser) else { continue; }; - let new_ser = bevy::reflect::serde::TypedReflectSerializer::with_processor( + let new_ser = bevy_reflect::serde::TypedReflectSerializer::with_processor( &new_tf, ®istry, &processor, ); let Ok(new_json) = serde_json::to_value(&new_ser) else { diff --git a/src/pie.rs b/src/pie.rs index 48c52fc0..858251a7 100644 --- a/src/pie.rs +++ b/src/pie.rs @@ -24,7 +24,8 @@ //! surfaces (keybinds, menu entries) want to trigger PIE //! transitions without going through a button. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_api::pie::PlayState; use jackdaw_api::prelude::*; use jackdaw_jsn::SceneJsnAst; diff --git a/src/prefab_picker.rs b/src/prefab_picker.rs index c72db2dc..8cf987a2 100644 --- a/src/prefab_picker.rs +++ b/src/prefab_picker.rs @@ -2,7 +2,8 @@ use std::path::PathBuf; use crate::EditorEntity; use crate::project::ProjectRoot; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_feathers::icons::{EditorFont, Icon, IconFont, icon}; use jackdaw_feathers::picker::{ Matchable, PickerItems, PickerProps, SelectInput, SpawnItemInput, match_text, picker_item, diff --git a/src/project.rs b/src/project.rs index b2d53a71..3b87c5d8 100644 --- a/src/project.rs +++ b/src/project.rs @@ -3,7 +3,8 @@ use std::{ path::{Path, PathBuf}, }; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_api_internal::paths::recent_file_path; use jackdaw_jsn::format::{JsnHeader, JsnProject, JsnProjectConfig}; use serde::{Deserialize, Serialize}; diff --git a/src/project_files.rs b/src/project_files.rs index 343f8c25..63a2ccbf 100644 --- a/src/project_files.rs +++ b/src/project_files.rs @@ -3,7 +3,8 @@ use std::path::{Path, PathBuf}; use std::sync::{Mutex, mpsc}; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_feathers::{ file_browser, icons::{Icon, IconFont}, @@ -165,7 +166,7 @@ fn refresh_project_tree( /// Handle directory expansion: lazily populate children. fn handle_directory_expand( - event: On>, + event: On>, toggle_query: Query<&ChildOf, With>, content_query: Query<&ChildOf, With>, mut tree_nodes: Query<( diff --git a/src/project_select.rs b/src/project_select.rs index 1f74df40..a8cd09ca 100644 --- a/src/project_select.rs +++ b/src/project_select.rs @@ -2953,7 +2953,7 @@ pub(crate) fn do_handoff(world: &mut World, bin: &Path, project_root: &Path) { match spawn_result { Ok(_child) => { info!("Static editor spawned; exiting launcher"); - world.write_message(bevy::app::AppExit::Success); + world.write_message(bevy_app::AppExit::Success); } Err(e) => { warn!( diff --git a/src/reflect_default.rs b/src/reflect_default.rs index 794c4b82..64282715 100644 --- a/src/reflect_default.rs +++ b/src/reflect_default.rs @@ -17,8 +17,8 @@ use std::any::TypeId; -use bevy::reflect::std_traits::ReflectDefault; -use bevy::reflect::{ +use bevy_reflect::std_traits::ReflectDefault; +use bevy_reflect::{ DynamicEnum, DynamicStruct, DynamicTuple, DynamicTupleStruct, DynamicVariant, PartialReflect, Reflect, TypeInfo, TypeRegistry, VariantInfo, }; @@ -102,6 +102,6 @@ pub fn build_reflective_default( // Materialise a typed `Box` from the dynamic // form via `FromReflect`. - let reflect_from_reflect = registration.data::()?; + let reflect_from_reflect = registration.data::()?; reflect_from_reflect.from_reflect(dynamic.as_ref()) } diff --git a/src/remote/brp.rs b/src/remote/brp.rs index 24bfa2b0..2db47e0d 100644 --- a/src/remote/brp.rs +++ b/src/remote/brp.rs @@ -1,5 +1,6 @@ use anyhow::anyhow; -use bevy::{remote::BrpRequest, tasks::IoTaskPool}; +use bevy_remote::BrpRequest; +use bevy_tasks::IoTaskPool; /// Send a BRP JSON-RPC 2.0 request and return the result as a background task. /// @@ -9,7 +10,7 @@ pub fn brp_request( endpoint: &str, method: &str, params: Option, -) -> bevy::tasks::Task> { +) -> bevy_tasks::Task> { let req = BrpRequest { jsonrpc: String::from("2.0"), method: String::from(method), diff --git a/src/remote/connection.rs b/src/remote/connection.rs index 2b79d844..95e50b92 100644 --- a/src/remote/connection.rs +++ b/src/remote/connection.rs @@ -1,4 +1,6 @@ -use bevy::{prelude::*, tasks::Task, tasks::futures_lite::future}; +use bevy_ecs::prelude::*; +use bevy_log::prelude::*; +use bevy_tasks::{Task, futures_lite::future}; use jackdaw_remote::{JackdawAppInfo, schema::JsnRegistry}; use super::brp; diff --git a/src/remote/entity_browser.rs b/src/remote/entity_browser.rs index 64963891..a5b12397 100644 --- a/src/remote/entity_browser.rs +++ b/src/remote/entity_browser.rs @@ -1,6 +1,9 @@ use std::collections::{HashMap, HashSet}; -use bevy::{prelude::*, tasks::Task, tasks::futures_lite::future}; +use bevy_ecs::prelude::*; +use bevy_log::prelude::*; +use bevy_tasks::{Task, futures_lite::future}; + use bevy_monitors::prelude::{Mutation, NotifyChanged}; use jackdaw_feathers::{ panel_header, tokens, diff --git a/src/remote/mod.rs b/src/remote/mod.rs index e2115e66..907ce7ff 100644 --- a/src/remote/mod.rs +++ b/src/remote/mod.rs @@ -5,7 +5,8 @@ pub mod panel; mod registry_fetch; pub mod remote_inspector; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; pub use connection::{ConnectionManager, ConnectionState}; diff --git a/src/remote/panel.rs b/src/remote/panel.rs index c8f7f631..32a3c17a 100644 --- a/src/remote/panel.rs +++ b/src/remote/panel.rs @@ -1,4 +1,5 @@ -use bevy::{prelude::*, ui_widgets::observe}; +use bevy_ecs::prelude::*; +use bevy_ui_widgets::observe; use jackdaw_feathers::{popover, tokens}; use super::connection::{ConnectionManager, ConnectionState}; diff --git a/src/remote/registry_fetch.rs b/src/remote/registry_fetch.rs index ea8ecd2c..4b5b569e 100644 --- a/src/remote/registry_fetch.rs +++ b/src/remote/registry_fetch.rs @@ -1,4 +1,7 @@ -use bevy::{prelude::*, tasks::Task, tasks::futures_lite::future}; +use bevy_ecs::prelude::*; +use bevy_log::prelude::*; +use bevy_tasks::{Task, futures_lite::future}; + use jackdaw_remote::schema::JsnRegistry; use super::brp; diff --git a/src/remote/remote_inspector.rs b/src/remote/remote_inspector.rs index 9b35db60..2d3a0dfd 100644 --- a/src/remote/remote_inspector.rs +++ b/src/remote/remote_inspector.rs @@ -1,12 +1,11 @@ -use bevy::{ - ecs::{ - archetype::Archetype, - component::{ComponentId, Components}, - reflect::{AppTypeRegistry, ReflectComponent}, - }, + +use bevy_ecs::{ + archetype::Archetype, + component::{ComponentId, Components}, prelude::*, - reflect::serde::TypedReflectDeserializer, + reflect::{AppTypeRegistry, ReflectComponent}, }; +use bevy_reflect::serde::TypedReflectDeserializer; use jackdaw_feathers::{ icons::{EditorFont, Icon, IconFont}, panel_header, tokens, diff --git a/src/restart.rs b/src/restart.rs index f7186a3f..40b65edf 100644 --- a/src/restart.rs +++ b/src/restart.rs @@ -30,7 +30,7 @@ use std::path::PathBuf; use std::process::Command; -use bevy::log::{info, warn}; +use bevy_log::{info, warn}; /// Env var the parent process sets before respawning, signalling /// to the child "the game you're about to load was just rebuilt diff --git a/src/scene_io.rs b/src/scene_io.rs index 5d946dde..97fc0177 100644 --- a/src/scene_io.rs +++ b/src/scene_io.rs @@ -6,10 +6,6 @@ use std::fmt::{self, Formatter}; use std::path::{Path, PathBuf}; use std::result::Result; -use bevy::asset::{ReflectAsset, ReflectHandle, UntypedAssetId}; -use bevy::image::ImageLoaderSettings; -use bevy::reflect::serde::{ReflectDeserializerProcessor, ReflectSerializerProcessor}; -use bevy::reflect::{TypeRegistration, TypeRegistry}; use bevy::{ asset::AssetPath, ecs::reflect::AppTypeRegistry, @@ -18,6 +14,10 @@ use bevy::{ tasks::{AsyncComputeTaskPool, IoTaskPool, Task, futures_lite::future}, window::{PrimaryWindow, RawHandleWrapper}, }; +use bevy_asset::{ReflectAsset, ReflectHandle, UntypedAssetId}; +use bevy_image::ImageLoaderSettings; +use bevy_reflect::serde::{ReflectDeserializerProcessor, ReflectSerializerProcessor}; +use bevy_reflect::{TypeRegistration, TypeRegistry}; use jackdaw_jsn::format::{JsnAssets, JsnEntity, JsnHeader, JsnMetadata, JsnScene}; use rfd::{AsyncFileDialog, FileHandle}; use serde::de::{DeserializeSeed, Visitor}; @@ -931,7 +931,7 @@ fn collect_handles_from_reflect( // Recurse into struct/tuple/list/map fields match value.reflect_ref() { - bevy::reflect::ReflectRef::Struct(s) => { + bevy_reflect::ReflectRef::Struct(s) => { for i in 0..s.field_len() { if let Some(field) = s.field_at(i) { collect_handles_from_reflect( @@ -947,7 +947,7 @@ fn collect_handles_from_reflect( } } } - bevy::reflect::ReflectRef::TupleStruct(ts) => { + bevy_reflect::ReflectRef::TupleStruct(ts) => { for i in 0..ts.field_len() { if let Some(field) = ts.field(i) { collect_handles_from_reflect( @@ -963,7 +963,7 @@ fn collect_handles_from_reflect( } } } - bevy::reflect::ReflectRef::Tuple(t) => { + bevy_reflect::ReflectRef::Tuple(t) => { for i in 0..t.field_len() { if let Some(field) = t.field(i) { collect_handles_from_reflect( @@ -979,7 +979,7 @@ fn collect_handles_from_reflect( } } } - bevy::reflect::ReflectRef::List(l) => { + bevy_reflect::ReflectRef::List(l) => { for i in 0..l.len() { if let Some(item) = l.get(i) { collect_handles_from_reflect( @@ -995,7 +995,7 @@ fn collect_handles_from_reflect( } } } - bevy::reflect::ReflectRef::Array(a) => { + bevy_reflect::ReflectRef::Array(a) => { for i in 0..a.len() { if let Some(item) = a.get(i) { collect_handles_from_reflect( @@ -1011,7 +1011,7 @@ fn collect_handles_from_reflect( } } } - bevy::reflect::ReflectRef::Map(m) => { + bevy_reflect::ReflectRef::Map(m) => { for (_k, v) in m.iter() { collect_handles_from_reflect( v, @@ -1025,7 +1025,7 @@ fn collect_handles_from_reflect( ); } } - bevy::reflect::ReflectRef::Set(s) => { + bevy_reflect::ReflectRef::Set(s) => { for item in s.iter() { collect_handles_from_reflect( item, @@ -1039,7 +1039,7 @@ fn collect_handles_from_reflect( ); } } - bevy::reflect::ReflectRef::Enum(e) => { + bevy_reflect::ReflectRef::Enum(e) => { for i in 0..e.field_len() { if let Some(field) = e.field_at(i) { collect_handles_from_reflect( @@ -1055,7 +1055,7 @@ fn collect_handles_from_reflect( } } } - bevy::reflect::ReflectRef::Opaque(_) => {} + bevy_reflect::ReflectRef::Opaque(_) => {} } } @@ -1259,7 +1259,7 @@ fn finish_load_scene(world: &mut World, chosen: &std::path::Path) { let registry = world.resource::().clone(); let registry = registry.read(); - use bevy::scene::serde::SceneDeserializer; + use bevy_scene::serde::SceneDeserializer; let scene_deserializer = SceneDeserializer { type_registry: ®istry, }; @@ -1429,7 +1429,7 @@ pub fn load_inline_assets( "External asset entry '{name}' has unknown type '{type_path}' -- loading untyped" ); asset_server - .load::(&asset_path) + .load::(&asset_path) .untyped() }; local_assets.insert(name.clone(), handle); diff --git a/src/scene_ops.rs b/src/scene_ops.rs index 0661c3f2..892031b5 100644 --- a/src/scene_ops.rs +++ b/src/scene_ops.rs @@ -7,7 +7,8 @@ //! usual Ctrl+N / Ctrl+O / Ctrl+S / Ctrl+Shift+S keybinds are attached //! here. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use bevy_enhanced_input::prelude::{Press, *}; use jackdaw_api::prelude::*; diff --git a/src/scenes/confirm_dialog.rs b/src/scenes/confirm_dialog.rs index 58628cc5..1b67ed8f 100644 --- a/src/scenes/confirm_dialog.rs +++ b/src/scenes/confirm_dialog.rs @@ -8,8 +8,10 @@ //! full `rfd::FileDialog` sub-flow for that case is deferred to a //! follow-up task. -use bevy::picking::events::{Click, Pointer}; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_log::prelude::*; +use bevy_picking::events::{Click, Pointer}; use jackdaw_feathers::{icons::EditorFont, tokens}; /// Holds the pending tab index when the user tried to close a dirty tab @@ -386,13 +388,13 @@ pub fn on_quit_dialog_button_click( ConfirmQuitButton::SaveAll => { crate::scenes::operators::scene_save_all_system(world); world - .resource_mut::>() - .write(bevy::app::AppExit::Success); + .resource_mut::>() + .write(bevy_app::AppExit::Success); } ConfirmQuitButton::DiscardAll => { world - .resource_mut::>() - .write(bevy::app::AppExit::Success); + .resource_mut::>() + .write(bevy_app::AppExit::Success); } ConfirmQuitButton::Cancel => { // Nothing to do; dialog is already despawned. diff --git a/src/scenes/mod.rs b/src/scenes/mod.rs index 83b5597e..75532173 100644 --- a/src/scenes/mod.rs +++ b/src/scenes/mod.rs @@ -9,7 +9,9 @@ pub mod ui; use std::path::PathBuf; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_log::prelude::*; use jackdaw_jsn::format::JsnScene; use crate::commands::CommandHistory; @@ -42,8 +44,8 @@ impl Plugin for ScenesPlugin { /// confirm-quit dialog and consume the event. Otherwise emit `AppExit::Success` /// so the normal X-click flow still works. pub fn intercept_window_close( - mut close_events: bevy::ecs::message::MessageReader, - mut exit: bevy::ecs::message::MessageWriter, + mut close_events: bevy_ecs::message::MessageReader, + mut exit: bevy_ecs::message::MessageWriter, scenes: Res, mut commands: Commands, mut pending: ResMut, @@ -58,7 +60,7 @@ pub fn intercept_window_close( let any_dirty = scenes.tabs.iter().any(|t| t.dirty); if !any_dirty { - exit.write(bevy::app::AppExit::Success); + exit.write(bevy_app::AppExit::Success); return; } @@ -188,7 +190,7 @@ pub struct ViewState { /// Optional projection matrix. `None` means use the editor's default /// perspective on restore. Stored as a `Mat4` so we don't have to /// reflect the entire `Projection` enum across tab swaps. - pub camera_projection: Option, + pub camera_projection: Option, pub edit_mode: crate::brush::EditMode, /// Object-level selection stored as stable IDs so it survives the /// despawn / respawn cycle of a tab swap. `BrushStableId` lives in @@ -210,7 +212,7 @@ impl ViewState { pub fn with_default_camera() -> Self { Self { camera_transform: Transform::from_xyz(0.0, 4.0, 8.0) - .looking_at(bevy::math::Vec3::ZERO, bevy::math::Vec3::Y), + .looking_at(bevy_math::Vec3::ZERO, bevy_math::Vec3::Y), ..Self::default() } } diff --git a/src/scenes/operators.rs b/src/scenes/operators.rs index bc1a77ba..c36e8108 100644 --- a/src/scenes/operators.rs +++ b/src/scenes/operators.rs @@ -1,9 +1,11 @@ //! Multi-scene operators. Each is a Bevy system that mutates the //! `Scenes` resource and (where appropriate) triggers a tab swap. -use bevy::input::ButtonInput; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; use bevy_enhanced_input::prelude::{Press, *}; +use bevy_input::ButtonInput; +use bevy_log::prelude::*; use jackdaw_api::prelude::*; use crate::scene_io::{SceneDirtyState, SceneFilePath}; @@ -33,34 +35,42 @@ pub(crate) fn add_to_extension(ctx: &mut ExtensionContext) { w.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![( - KeyCode::KeyT.with_mod_keys(ModKeys::CONTROL), - Press::default(), - )], + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + KeyCode::KeyT.with_mod_keys(ModKeys::CONTROL), + Press::default(), + ))] + ), )); w.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![( - KeyCode::KeyW.with_mod_keys(ModKeys::CONTROL), - Press::default(), - )], + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + KeyCode::KeyW.with_mod_keys(ModKeys::CONTROL), + Press::default(), + ))] + ), )); w.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![( - KeyCode::Tab.with_mod_keys(ModKeys::CONTROL), - Press::default(), - )], + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + KeyCode::Tab.with_mod_keys(ModKeys::CONTROL), + Press::default(), + ))] + ), )); w.spawn(( Action::::new(), ActionOf::::new(ext), - bindings![( - KeyCode::Tab.with_mod_keys(ModKeys::CONTROL | ModKeys::SHIFT), - Press::default(), - )], + related!( + Bindings[IntoBindingBundle::into_binding_bundle(( + KeyCode::Tab.with_mod_keys(ModKeys::CONTROL | ModKeys::SHIFT), + Press::default(), + ))] + ), )); }); } diff --git a/src/scenes/swap.rs b/src/scenes/swap.rs index 09dc3ee0..49837520 100644 --- a/src/scenes/swap.rs +++ b/src/scenes/swap.rs @@ -4,7 +4,9 @@ use std::collections::HashMap; use std::path::Path; -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_log::prelude::*; use jackdaw_api::prelude::*; use crate::commands::CommandHistory; diff --git a/src/scenes/ui.rs b/src/scenes/ui.rs index 0446dfb0..0bc3985c 100644 --- a/src/scenes/ui.rs +++ b/src/scenes/ui.rs @@ -4,9 +4,10 @@ //! the tab list grows or shrinks. Active highlight and dirty-dot //! updates happen in place so click observers survive normal editing. -use bevy::picking::hover::Hovered; -use bevy::picking::pointer::PointerButton; -use bevy::prelude::*; +use bevy_picking::hover::Hovered; +use bevy_picking::pointer::PointerButton; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_feathers::{ context_menu::spawn_context_menu, icons::{EditorFont, Icon, IconFont}, diff --git a/src/selection.rs b/src/selection.rs index 1fafe4d3..ead51398 100644 --- a/src/selection.rs +++ b/src/selection.rs @@ -1,4 +1,5 @@ -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; pub struct SelectionPlugin; diff --git a/src/snapping.rs b/src/snapping.rs index 57d97673..9520f69a 100644 --- a/src/snapping.rs +++ b/src/snapping.rs @@ -1,7 +1,6 @@ -use bevy::{ - input::mouse::{MouseScrollUnit, MouseWheel}, - prelude::*, -}; +use bevy_ecs::prelude::*; +use bevy_input::mouse::{MouseScrollUnit, MouseWheel}; + use bevy_infinite_grid::{InfiniteGrid, InfiniteGridSettings}; use jackdaw_api::op::{Operator, OperatorCommandsExt as _}; diff --git a/src/status_bar.rs b/src/status_bar.rs index e22fe4ac..6ddbaae9 100644 --- a/src/status_bar.rs +++ b/src/status_bar.rs @@ -1,4 +1,6 @@ -use bevy::prelude::*; +use bevy_app::prelude::*; +use bevy_ecs::prelude::*; +use bevy_log::prelude::*; use jackdaw_feathers::status_bar::{StatusBarCenter, StatusBarLeft, StatusBarRight}; use crate::{ @@ -180,7 +182,7 @@ fn update_status_right( .find(|l| !l.trim().is_empty()) .unwrap_or("see terminal for details"); text.0 = format!("Build failed: {head}"); - color.0 = bevy::color::Color::srgb(0.95, 0.4, 0.4); + color.0 = bevy_color::Color::srgb(0.95, 0.4, 0.4); return; } BuildState::Idle => { diff --git a/src/terrain/inspector.rs b/src/terrain/inspector.rs index dc7a92b0..c80539e0 100644 --- a/src/terrain/inspector.rs +++ b/src/terrain/inspector.rs @@ -1,5 +1,6 @@ -use bevy::input_focus::InputFocus; -use bevy::prelude::*; +use bevy_input_focus::InputFocus; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_api::prelude::*; use jackdaw_feathers::{ button::{self, ButtonProps, ButtonVariant}, diff --git a/src/terrain/mesh.rs b/src/terrain/mesh.rs index 002feaff..0f3dc1ba 100644 --- a/src/terrain/mesh.rs +++ b/src/terrain/mesh.rs @@ -1,5 +1,6 @@ -use bevy::mesh::{Indices, PrimitiveTopology}; -use bevy::prelude::*; +use bevy_mesh::{Indices, PrimitiveTopology}; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use super::{CHUNK_SIZE, TerrainChunk, TerrainDirtyChunks}; diff --git a/src/terrain/mod.rs b/src/terrain/mod.rs index 7ad80f6a..234f3358 100644 --- a/src/terrain/mod.rs +++ b/src/terrain/mod.rs @@ -6,7 +6,8 @@ pub mod toolbar; use std::collections::HashSet; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; pub use toolbar::TerrainToolbar; diff --git a/src/terrain/ops.rs b/src/terrain/ops.rs index 0d92f4f1..75cb514f 100644 --- a/src/terrain/ops.rs +++ b/src/terrain/ops.rs @@ -1,6 +1,7 @@ //! Operators for the terrain contextual toolbar and inspector. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_api::prelude::*; use super::inspector::TerrainGenerateState; diff --git a/src/terrain/sculpt.rs b/src/terrain/sculpt.rs index a020b578..cf2de40c 100644 --- a/src/terrain/sculpt.rs +++ b/src/terrain/sculpt.rs @@ -1,7 +1,5 @@ -use bevy::{ - input::mouse::{MouseScrollUnit, MouseWheel}, - prelude::*, -}; +use bevy_ecs::prelude::*; +use bevy_input::mouse::{MouseScrollUnit, MouseWheel}; use jackdaw_api::prelude::*; use jackdaw_api_internal::lifecycle::ActiveModalOperator; diff --git a/src/terrain/toolbar.rs b/src/terrain/toolbar.rs index 9f403cdb..b589066e 100644 --- a/src/terrain/toolbar.rs +++ b/src/terrain/toolbar.rs @@ -1,4 +1,5 @@ -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_api::prelude::*; use jackdaw_feathers::{ button::{self, ButtonProps, ButtonVariant}, diff --git a/src/transform_ops.rs b/src/transform_ops.rs index c3a2e62f..8ca5d308 100644 --- a/src/transform_ops.rs +++ b/src/transform_ops.rs @@ -10,8 +10,9 @@ //! Alt+G/R/S for reset, Alt+Arrow and Alt+PageUp/Down for `rotate_90`, //! plain Arrow and PageUp/Down for nudge. -use bevy::{input_focus::InputFocus, prelude::*}; +use bevy_ecs::prelude::*; use bevy_enhanced_input::prelude::{Press, *}; +use bevy_input_focus::InputFocus; use jackdaw_api::prelude::*; use crate::core_extension::CoreExtensionInputContext; diff --git a/src/undo_snapshot.rs b/src/undo_snapshot.rs index 909e540f..62e4acbf 100644 --- a/src/undo_snapshot.rs +++ b/src/undo_snapshot.rs @@ -12,8 +12,10 @@ use std::any::Any; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw_api_internal::snapshot::{ActiveSnapshotter, SceneSnapshot, SceneSnapshotter}; +#[cfg(feature = "avian")] use jackdaw_avian_integration::PhysicsOverlayConfig; use jackdaw_jsn::SceneJsnAst; @@ -88,6 +90,7 @@ struct EditorStateSnapshot { snap_settings: SnapSettings, view_mode: ViewModeSettings, overlays: OverlaySettings, + #[cfg(feature = "avian")] physics_overlays: PhysicsOverlayConfig, /// Active `BrushGroup` for group-edit mode. The entity id is /// validated against the live world on `apply` because @@ -105,6 +108,7 @@ impl EditorStateSnapshot { snap_settings: world.resource::().clone(), view_mode: world.resource::().clone(), overlays: world.resource::().clone(), + #[cfg(feature = "avian")] physics_overlays: world.resource::().clone(), active_group: world.resource::().active_group, } @@ -117,7 +121,10 @@ impl EditorStateSnapshot { *world.resource_mut::() = self.snap_settings.clone(); *world.resource_mut::() = self.view_mode.clone(); *world.resource_mut::() = self.overlays.clone(); - *world.resource_mut::() = self.physics_overlays.clone(); + #[cfg(feature = "avian")] + { + *world.resource_mut::() = self.physics_overlays.clone(); + } let valid_group = self.active_group.filter(|e| world.get_entity(*e).is_ok()); world.resource_mut::().active_group = valid_group; } diff --git a/src/view_modes.rs b/src/view_modes.rs index b18b6028..1a75b6b6 100644 --- a/src/view_modes.rs +++ b/src/view_modes.rs @@ -1,4 +1,5 @@ -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; pub struct ViewModesPlugin; diff --git a/src/view_ops.rs b/src/view_ops.rs index 42fc0ac2..fbd5659e 100644 --- a/src/view_ops.rs +++ b/src/view_ops.rs @@ -9,7 +9,8 @@ //! so quad-view / stacked viewport setups respond to whichever //! panel the cursor is in. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use bevy_enhanced_input::prelude::{Press, *}; use jackdaw_api::prelude::*; @@ -25,13 +26,15 @@ pub(crate) fn add_to_extension(ctx: &mut ExtensionContext) { .register_operator::() .register_operator::() .register_operator::() - .register_operator::() - .register_operator::() .register_operator::() .register_operator::() .register_operator::() .register_operator::(); + #[cfg(feature = "avian")] + ctx.register_operator::() + .register_operator::(); + let ext = ctx.id(); ctx.entity_mut().world_scope(|world| { world.spawn(( @@ -130,6 +133,7 @@ pub(crate) fn view_toggle_alignment_guides( OperatorResult::Finished } +#[cfg(feature = "avian")] #[operator(id = "view.toggle_collider_gizmos", label = "Toggle Collider Gizmos")] pub(crate) fn view_toggle_collider_gizmos( _: In, @@ -139,6 +143,7 @@ pub(crate) fn view_toggle_collider_gizmos( OperatorResult::Finished } +#[cfg(feature = "avian")] #[operator(id = "view.toggle_hierarchy_arrows", label = "Toggle Hierarchy Arrows")] pub(crate) fn view_toggle_hierarchy_arrows( _: In, @@ -178,7 +183,7 @@ fn perspective_default() -> Projection { fn orthographic_default() -> Projection { Projection::Orthographic(OrthographicProjection { - scaling_mode: bevy::camera::ScalingMode::FixedVertical { + scaling_mode: bevy_camera::ScalingMode::FixedVertical { viewport_height: ORTHO_VIEWPORT_HEIGHT, }, scale: 1.0, @@ -415,7 +420,7 @@ pub(crate) fn view_frame_all( pub(crate) fn axis_view_keys( keyboard: Res>, modal: Res, - input_focus: Res, + input_focus: Res, mut commands: Commands, ) { if modal.active.is_some() || input_focus.0.is_some() { diff --git a/src/viewport.rs b/src/viewport.rs index fc0efbd7..9c6b2f19 100644 --- a/src/viewport.rs +++ b/src/viewport.rs @@ -13,7 +13,7 @@ use bevy_infinite_grid::{InfiniteGridBundle, InfiniteGridPlugin}; use jackdaw_api::prelude::*; use jackdaw_camera::{JackdawCameraPlugin, JackdawCameraSettings}; -use bevy::ecs::system::SystemParam; +use bevy_ecs::system::SystemParam; use crate::core_extension::CoreExtensionInputContext; use crate::selection::{Selected, Selection}; @@ -619,7 +619,7 @@ fn update_active_viewport( mut active: ResMut, mut camera_query: Query<(Entity, &mut JackdawCameraSettings)>, modal: Res, - input_focus: Res, + input_focus: Res, blockers: Query<(), With>, mouse: Res>, mut fly_state: ResMut, diff --git a/src/viewport_overlays.rs b/src/viewport_overlays.rs index a232e459..5766a94e 100644 --- a/src/viewport_overlays.rs +++ b/src/viewport_overlays.rs @@ -5,10 +5,11 @@ use crate::entity_ops::EmptyEntity; use crate::selection::Selected; use crate::viewport::{AxisIndicator, SceneViewport}; use crate::{JackdawDrawSystems, default_style}; -use avian3d::parry::transformation::convex_hull; -use bevy::prelude::*; -use bevy::ui::widget::ViewportNode; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; +use bevy_ui::widget::ViewportNode; use jackdaw_jsn::BrushGroup; +use parry3d::transformation::convex_hull; #[derive(Component)] struct AxisLabel; @@ -43,7 +44,7 @@ impl Plugin for ViewportOverlaysPlugin { draw_camera_gizmo, draw_empty_entity_marker, ) - .after(bevy::camera::visibility::VisibilitySystems::VisibilityPropagate) + .after(bevy_camera::visibility::VisibilitySystems::VisibilityPropagate) .run_if(in_state(crate::AppState::Editor)), ) .add_systems( @@ -519,7 +520,7 @@ fn ensure_axis_labels( /// Position each viewport's axis indicator in front of its own camera /// and update the matching label positions. /// -/// The indicator itself is a retained [`bevy::gizmos::retained::Gizmo`] +/// The indicator itself is a retained [`bevy_gizmos::retained::Gizmo`] /// entity carrying the viewport's private `RenderLayers`, spawned in /// `viewport::build_viewport_panel`. Per-camera `RenderLayers` gating /// is what keeps each indicator scoped to one viewport: an immediate diff --git a/src/viewport_select.rs b/src/viewport_select.rs index 7be03d53..1951fc64 100644 --- a/src/viewport_select.rs +++ b/src/viewport_select.rs @@ -8,14 +8,14 @@ use crate::{ viewport::{InteractionGuards, SceneViewport, ViewportCursor}, viewport_util::window_to_viewport_cursor_for, }; -use bevy::input_focus::InputFocus; -use bevy::ui::ui_transform::UiGlobalTransform; use bevy::{ picking::mesh_picking::ray_cast::{MeshRayCast, MeshRayCastSettings, RayCastVisibility}, picking::prelude::Pickable, prelude::*, }; use bevy_enhanced_input::prelude::{Press, *}; +use bevy_input_focus::InputFocus; +use bevy_ui::ui_transform::UiGlobalTransform; use jackdaw_api::prelude::*; use jackdaw_jsn::{Brush, BrushGroup}; diff --git a/src/window_icon.rs b/src/window_icon.rs index 98369229..718361a8 100644 --- a/src/window_icon.rs +++ b/src/window_icon.rs @@ -20,7 +20,7 @@ fn load_icon_png() -> Option { let image = match image::load_from_memory(WINDOW_ICON_PNG) { Ok(image) => image.into_rgba8(), Err(error) => { - bevy::log::warn_once!( + bevy_log::warn_once!( "jackdaw: failed to decode embedded window icon PNG: {:?}", error ); @@ -33,7 +33,7 @@ fn load_icon_png() -> Option { let icon = match Icon::from_rgba(rgba, width, height) { Ok(icon) => icon, Err(error) => { - bevy::log::warn_once!( + bevy_log::warn_once!( "jackdaw: failed to create window icon from embedded PNG: {:?}", error ); @@ -55,7 +55,7 @@ fn apply_window_icon_on_window_created( WINIT_WINDOWS.with(|windows_cell| { let winit_windows = windows_cell.borrow(); let Some(backend_window) = winit_windows.get_window(event.window) else { - bevy::log::warn_once!( + bevy_log::warn_once!( "jackdaw: winit backend window missing when applying decoration icon ({:?}); ignoring", event.window, ); diff --git a/src/workspace_dropdown.rs b/src/workspace_dropdown.rs index a18e26e8..7d61e5d5 100644 --- a/src/workspace_dropdown.rs +++ b/src/workspace_dropdown.rs @@ -14,9 +14,10 @@ //! NOT surfaced here; per user request, workspaces are views you //! switch between, not files you close. -use bevy::picking::pointer::PointerButton; -use bevy::prelude::*; -use bevy::ui::ui_transform::UiGlobalTransform; +use bevy_picking::pointer::PointerButton; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; +use bevy_ui::ui_transform::UiGlobalTransform; use jackdaw_feathers::icons::{EditorFont, Icon, IconFont}; use jackdaw_feathers::tokens; use jackdaw_panels::workspace::{WorkspaceChanged, WorkspaceRegistry, WorkspaceTab}; diff --git a/templates/extension-static/src/lib.rs.template b/templates/extension-static/src/lib.rs.template index 4fd7acfe..38314fb4 100644 --- a/templates/extension-static/src/lib.rs.template +++ b/templates/extension-static/src/lib.rs.template @@ -7,7 +7,8 @@ //! and calling: //! //! ```ignore -//! use bevy::prelude::*; +//! use bevy_ecs::prelude::*; +use bevy_app::prelude::*; //! use jackdaw::prelude::*; //! //! fn main() { @@ -26,7 +27,8 @@ use std::sync::Arc; -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw::prelude::*; /// The extension's entry point. Register it with diff --git a/templates/extension-static/src/main.rs.template b/templates/extension-static/src/main.rs.template index c2b6a2a8..a6547880 100644 --- a/templates/extension-static/src/main.rs.template +++ b/templates/extension-static/src/main.rs.template @@ -13,7 +13,8 @@ //! [`{{crate_name}}::{{crate_name | pascal_case}}`] the same way this //! launcher does. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; use jackdaw::prelude::*; fn main() -> AppExit { diff --git a/templates/extension/Cargo.toml.template b/templates/extension/Cargo.toml.template index 1e72aec9..cd93d60e 100644 --- a/templates/extension/Cargo.toml.template +++ b/templates/extension/Cargo.toml.template @@ -13,7 +13,7 @@ publish = false crate-type = ["cdylib"] # `bevy` is a plain crates.io dep so bevy's derive macros find it -# in the manifest and emit correct `::bevy::…` paths. When jackdaw +# in the manifest and emit correct `::bevy_…` paths. When jackdaw # builds this project via **File > Extensions > Build from project # folder…** it sets `RUSTC_WRAPPER=jackdaw-rustc-wrapper`, which # rewrites `--extern bevy=` at the editor's `libjackdaw_sdk.so` so diff --git a/templates/extension/README.md.template b/templates/extension/README.md.template index 9497e31a..01763e72 100644 --- a/templates/extension/README.md.template +++ b/templates/extension/README.md.template @@ -43,6 +43,7 @@ rustc wrapper rewrites `--extern bevy=` to point at editor's. `jackdaw_api` isn't declared in Cargo.toml — the wrapper injects -its `--extern` flag unconditionally. `use bevy::prelude::*;` +its `--extern` flag unconditionally. `use bevy_ecs::prelude::*; +use bevy_app::prelude::*;` reaches both bevy and jackdaw extension APIs through a single unified prelude. diff --git a/templates/extension/src/lib.rs.template b/templates/extension/src/lib.rs.template index 2e9b67f9..22a6c7d8 100644 --- a/templates/extension/src/lib.rs.template +++ b/templates/extension/src/lib.rs.template @@ -7,7 +7,8 @@ use std::sync::Arc; // (`JackdawExtension`, `ExtensionContext`, `WindowDescriptor`, …) // through a single unified prelude. No need for a separate // `use jackdaw_api::prelude::*;`. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; pub struct {{crate_name | pascal_case}}; diff --git a/templates/game-static/src/bin/editor.rs.template b/templates/game-static/src/bin/editor.rs.template index e676d59d..96ca0d28 100644 --- a/templates/game-static/src/bin/editor.rs.template +++ b/templates/game-static/src/bin/editor.rs.template @@ -38,7 +38,7 @@ fn main() -> AppExit { .unwrap_or_else(|| "assets".to_string()); let mut app = App::new(); - app.set_error_handler(bevy::ecs::error::error) + app.set_error_handler(bevy_ecs::error::error) .add_plugins( DefaultPlugins .set(AssetPlugin { diff --git a/templates/game-static/src/lib.rs.template b/templates/game-static/src/lib.rs.template index 75d27d93..4011ce96 100644 --- a/templates/game-static/src/lib.rs.template +++ b/templates/game-static/src/lib.rs.template @@ -17,7 +17,8 @@ //! 6. Click Stop. The authored entity is preserved. //! 7. `cargo run` launches the same game without the editor. -use bevy::prelude::*; +use bevy_ecs::prelude::*; +use bevy_app::prelude::*; // Brings `EditorCategory` and `EditorDescription` into scope so // `#[reflect(@EditorCategory::new("..."))]` resolves without a // fully-qualified path. @@ -65,7 +66,7 @@ fn spin_cube(time: Res