diff --git a/Cargo.lock b/Cargo.lock index 34a9a26f..e726c60a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -41,7 +41,7 @@ checksum = "cd3b6ae1eabbfbced10e840fd3fce8a93ae84f174b3e4ba892ab7bcb42e477a7" dependencies = [ "accesskit", "accesskit_consumer", - "objc2", + "objc2 0.3.0-beta.3.patch-leaks.3", "once_cell", ] @@ -61,13 +61,14 @@ dependencies = [ [[package]] name = "accesskit_winit" -version = "0.15.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88e39fcec2e10971e188730b7a76bab60647dacc973d4591855ebebcadfaa738" +checksum = "45f8f7c9f66d454d5fd8e344c8c8c7324b57194e1041b955519fc58a01e77a25" dependencies = [ "accesskit", "accesskit_macos", "accesskit_windows", + "raw-window-handle 0.6.0", "winit", ] @@ -358,20 +359,23 @@ dependencies = [ [[package]] name = "android-activity" -version = "0.4.3" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64529721f27c2314ced0890ce45e469574a73e5e6fdd6e9da1860eb29285f5e0" +checksum = "ee91c0c2905bae44f84bfa4e044536541df26b7703fd0888deeb9060fcc44289" dependencies = [ "android-properties", - "bitflags 1.3.2", + "bitflags 2.4.2", "cc", + "cesu8", + "jni 0.21.1", "jni-sys", "libc", "log", - "ndk", + "ndk 0.8.0", "ndk-context", - "ndk-sys", - "num_enum 0.6.1", + "ndk-sys 0.5.0+25.2.9519653", + "num_enum 0.7.2", + "thiserror", ] [[package]] @@ -482,6 +486,12 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" + [[package]] name = "ash" version = "0.37.3+1.3.251" @@ -579,14 +589,13 @@ dependencies = [ [[package]] name = "async-fs" -version = "1.6.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +checksum = "bc19683171f287921f2405677dd2ed2549c3b3bda697a563ebc3a121ace2aba1" dependencies = [ - "async-lock 2.8.0", - "autocfg", + "async-lock 3.3.0", "blocking", - "futures-lite 1.13.0", + "futures-lite 2.2.0", ] [[package]] @@ -826,18 +835,18 @@ dependencies = [ [[package]] name = "bevy" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4bc7e09282a82a48d70ade0c4c1154b0fd7882a735a39c66766a5d0f4718ea9" +checksum = "611dd99f412e862610adb43e2243b16436c6d8009f6d9dbe8ce3d6d840b34029" dependencies = [ "bevy_internal", ] [[package]] name = "bevy_a11y" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68080288c932634f6563d3a8299efe0ddc9ea6787539c4c771ba250d089a94f0" +checksum = "5bf80cd6d0dca4073f9b34b16f1d187a4caa035fd841892519431783bbc9e287" dependencies = [ "accesskit", "bevy_app", @@ -847,9 +856,9 @@ dependencies = [ [[package]] name = "bevy_animation" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aa37683b1281e1ba8cf285644e6e3f0704f14b3901c5ee282067ff7ff6f4a56" +checksum = "aa4ef4c35533df3f0c4e938cf6a831456ea563775bab799336f74331140c7665" dependencies = [ "bevy_app", "bevy_asset", @@ -866,9 +875,9 @@ dependencies = [ [[package]] name = "bevy_app" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d41731817993f92e4363dd3335558e779e290bc71eefc0b5547052b85810907e" +checksum = "8bce3544afc010ffed39c136f6d5a9322d20d38df1394d468ba9106caa0434cb" dependencies = [ "bevy_derive", "bevy_ecs", @@ -882,13 +891,13 @@ dependencies = [ [[package]] name = "bevy_asset" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "935984568f75867dd7357133b06f4b1502cd2be55e4642d483ce597e46e63bff" +checksum = "ac185d8e29c7eb0194f8aae7af3f7234f7ca7a448293be1d3d0d8fef435f65ec" dependencies = [ "async-broadcast", "async-fs", - "async-lock 2.8.0", + "async-lock 3.3.0", "bevy_app", "bevy_asset_macros", "bevy_ecs", @@ -901,7 +910,7 @@ dependencies = [ "crossbeam-channel", "downcast-rs", "futures-io", - "futures-lite 1.13.0", + "futures-lite 2.2.0", "js-sys", "parking_lot 0.12.1", "ron", @@ -914,9 +923,9 @@ dependencies = [ [[package]] name = "bevy_asset_macros" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f48b9bbe4ec605e4910b5cd1e1a0acbfbe0b80af5f3bcc4489a9fdd1e80058c" +checksum = "cb82d1aac8251378c45a8d0ad788d1bf75f54db28c1750f84f1fd7c00127927a" dependencies = [ "bevy_macro_utils", "proc-macro2", @@ -926,9 +935,9 @@ dependencies = [ [[package]] name = "bevy_audio" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a69889e1bfa4dbac4e641536b94f91c441da55796ad9832e77836b8264688b" +checksum = "f4fe7f952e5e0a343fbde43180db7b8e719ad78594480c91b26876623944a3a1" dependencies = [ "bevy_app", "bevy_asset", @@ -944,9 +953,9 @@ dependencies = [ [[package]] name = "bevy_core" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3daa24502a14839509f02407bc7e48299fe84d260877de23b60662de0f4f4b6c" +checksum = "f7b1b340b8d08f48ecd51b97589d261f5023a7b073d25e300382c49146524103" dependencies = [ "bevy_app", "bevy_ecs", @@ -959,9 +968,9 @@ dependencies = [ [[package]] name = "bevy_core_pipeline" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b77c4fca6e90edbe2e72da7bc9aa7aed7dfdfded0920ae0a0c845f5e11084a" +checksum = "626a5aaadbdd69eae020c5856575d2d0113423ae1ae1351377e20956d940052c" dependencies = [ "bevy_app", "bevy_asset", @@ -981,9 +990,9 @@ dependencies = [ [[package]] name = "bevy_derive" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f484318350462c58ba3942a45a656c1fd6b6e484a6b6b7abc3a787ad1a51e500" +checksum = "028ae2a34678055185d7f1beebb1ebe6a8dcf3733e139e4ee1383a7f29ae8ba6" dependencies = [ "bevy_macro_utils", "quote", @@ -992,9 +1001,9 @@ dependencies = [ [[package]] name = "bevy_diagnostic" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa38ca5967d335cc1006a0e0f1a86c350e2f15fd1878449f61d04cd57a7c4060" +checksum = "01a104acfdc5280accd01a3524810daf3bda72924e3da0c8a9ec816a57eef4e3" dependencies = [ "bevy_app", "bevy_core", @@ -1002,23 +1011,23 @@ dependencies = [ "bevy_log", "bevy_time", "bevy_utils", + "const-fnv1a-hash", "sysinfo", ] [[package]] name = "bevy_ecs" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7709fbd22f81fb681534cd913c41e1cd18b17143368743281195d7f024b61aea" +checksum = "b85406d5febbbdbcac4444ef61cd9a816f2f025ed692a3fc5439a32153070304" dependencies = [ - "async-channel 1.9.0", + "async-channel 2.2.0", "bevy_ecs_macros", "bevy_ptr", "bevy_reflect", "bevy_tasks", "bevy_utils", "downcast-rs", - "event-listener 2.5.3", "fixedbitset", "rustc-hash", "serde", @@ -1028,9 +1037,9 @@ dependencies = [ [[package]] name = "bevy_ecs_macros" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8843aa489f159f25cdcd9fee75cd7d221a7098a71eaa72cb2d6b40ac4e3f1ba" +checksum = "9a3ce4b65d7c5f1990e729df75cec2ea6e2241b4a0c37b31c281a04c59c11b7b" dependencies = [ "bevy_macro_utils", "proc-macro2", @@ -1040,9 +1049,9 @@ dependencies = [ [[package]] name = "bevy_encase_derive" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5328a3715e933ebbff07d0e99528dc423c4f7a53590ed1ac19a120348b028990" +checksum = "6c3d301922e76b16819e17c8cc43b34e92c13ccd06ad19dfa3e52a91a0e13e5c" dependencies = [ "bevy_macro_utils", "encase_derive_impl", @@ -1050,9 +1059,9 @@ dependencies = [ [[package]] name = "bevy_gilrs" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b81ca2ebf66cbc7f998f1f142b15038ffe3c4ae1d51f70adda26dcf51b0c4ca" +checksum = "96364a1875ee4545fcf825c78dc065ddb9a3b2a509083ef11142f9de0eb8aa17" dependencies = [ "bevy_app", "bevy_ecs", @@ -1066,15 +1075,17 @@ dependencies = [ [[package]] name = "bevy_gizmos" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db232274ddca2ae452eb2731b98267b795d133ddd14013121bc7daddde1c7491" +checksum = "bdca80b7b4db340eb666d69374a0195b3935759120d0b990fcef8b27d0fb3680" dependencies = [ "bevy_app", "bevy_asset", "bevy_core", "bevy_core_pipeline", "bevy_ecs", + "bevy_gizmos_macros", + "bevy_log", "bevy_math", "bevy_pbr", "bevy_reflect", @@ -1084,13 +1095,25 @@ dependencies = [ "bevy_utils", ] +[[package]] +name = "bevy_gizmos_macros" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a949eb8b4538a6e4d875321cda2b63dc0fb0317cf18c8245ca5a32f24f6d26d" +dependencies = [ + "bevy_macro_utils", + "proc-macro2", + "quote", + "syn 2.0.50", +] + [[package]] name = "bevy_gltf" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85adc6b1fc86687bf67149e0bafaa4d6da432232fa956472d1b37f19121d3ace" +checksum = "031d0c2a7c0353bb9ac08a5130e58b9a2de3cdaa3c31b5da00b22a9e4732a155" dependencies = [ - "base64 0.13.1", + "base64 0.21.7", "bevy_animation", "bevy_app", "bevy_asset", @@ -1116,9 +1139,9 @@ dependencies = [ [[package]] name = "bevy_hierarchy" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06bd477152ce2ae1430f5e0a4f19216e5785c22fee1ab23788b5982dc59d1a55" +checksum = "a9f9f843e43d921f07658c24eae74285efc7a335c87998596f3f365155320c69" dependencies = [ "bevy_app", "bevy_core", @@ -1126,28 +1149,28 @@ dependencies = [ "bevy_log", "bevy_reflect", "bevy_utils", - "smallvec", ] [[package]] name = "bevy_input" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab9a599189b2a694c182d60cd52219dd9364f9892ff542d87799b8e45d9e6dc" +checksum = "a9cb5b2f3747ffb00cf7e3d6b52f7384476921cd31f0cfd3d1ddff31f83d9252" dependencies = [ "bevy_app", "bevy_ecs", "bevy_math", "bevy_reflect", "bevy_utils", + "smol_str", "thiserror", ] [[package]] name = "bevy_internal" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f124bece9831afd80897815231072d51bfe3ac58c6bb58eca8880963b6d0487c" +checksum = "7af89c7083830b1d65fcf0260c3d2537c397fe8ce871471b6e97198a4704f23e" dependencies = [ "bevy_a11y", "bevy_animation", @@ -1184,9 +1207,9 @@ dependencies = [ [[package]] name = "bevy_kira_audio" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a9678086759e54871faab0829592423492e19f8de5076127315cf892ae56f33" +checksum = "1bf58fed4b6fd13df35e77002821cf459948131de4ac262c3b6a175d8fe28fd3" dependencies = [ "anyhow", "bevy", @@ -1198,9 +1221,9 @@ dependencies = [ [[package]] name = "bevy_log" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc10ba1d225a8477b9e80a1bf797d8a8b8274e83c9b24fb4d9351aec9229755" +checksum = "cfd5bcc3531f8008897fb03cc8751b86d0d29ef94f8fd38b422f9603b7ae80d0" dependencies = [ "android_log-sys", "bevy_app", @@ -1214,41 +1237,41 @@ dependencies = [ [[package]] name = "bevy_macro_utils" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e566640c6b6dced73d2006c764c2cffebe1a82be4809486c4a5d7b4b50efed4d" +checksum = "ac4401c25b197e7c1455a4875a90b61bba047a9e8d290ce029082c818ab1a21c" dependencies = [ "proc-macro2", "quote", "rustc-hash", "syn 2.0.50", - "toml_edit 0.20.7", + "toml_edit 0.21.1", ] [[package]] name = "bevy_math" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ddc2b76783939c530178f88e5711a1b01044d7b02db4033e2eb8b43b6cf4ec" +checksum = "6f312b1b8aa6d3965b65040b08e33efac030db3071f20b44f9da9c4c3dfcaf76" dependencies = [ - "glam 0.24.2", + "glam", "serde", ] [[package]] name = "bevy_mikktspace" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ec4962977a746d870170532fc92759e04d3dbcae8b7b82e7ca3bb83b1d75277" +checksum = "3075c01f2b1799945892d5310fc1836e47c045dfe6af5878a304a475931a0c5f" dependencies = [ - "glam 0.24.2", + "glam", ] [[package]] name = "bevy_pbr" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520bfd2a898c74f84ea52cfb8eb061f37373ad15e623489d5f75d27ebd6138fe" +checksum = "c31c72bf12e50ff76c9ed9a7c51ceb88bfea9865d00f24d95b12344fffe1e270" dependencies = [ "bevy_app", "bevy_asset", @@ -1264,7 +1287,6 @@ dependencies = [ "bitflags 2.4.2", "bytemuck", "fixedbitset", - "naga_oil", "radsort", "smallvec", "thread_local", @@ -1272,15 +1294,15 @@ dependencies = [ [[package]] name = "bevy_ptr" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77ec20c8fafcdc196508ef5ccb4f0400a8d193cb61f7b14a36ed9a25ad423cf" +checksum = "86afa4a88ee06b10fe1e6f28a796ba2eedd16804717cbbb911df0cbb0cd6677b" [[package]] name = "bevy_reflect" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7921f15fc944c9c8ad01d7dbcea6505b8909c6655cd9382bab1407181556038" +checksum = "133dfab8d403d0575eeed9084e85780bbb449dcf75dd687448439117789b40a2" dependencies = [ "bevy_math", "bevy_ptr", @@ -1288,18 +1310,17 @@ dependencies = [ "bevy_utils", "downcast-rs", "erased-serde", - "glam 0.24.2", + "glam", "serde", - "smallvec", "smol_str", "thiserror", ] [[package]] name = "bevy_reflect_derive" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4a8c5475f216e751ef4452a1306b00711f33d2d04d9f149e4c845dfeb6753a0" +checksum = "ce1679a4dfdb2c9ff24ca590914c3cec119d7c9e1b56fa637776913acc030386" dependencies = [ "bevy_macro_utils", "proc-macro2", @@ -1310,11 +1331,11 @@ dependencies = [ [[package]] name = "bevy_render" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdefdd3737125b0d94a6ff20bb70fa8cfe9d7d5dcd72ba4dfe6c5f1d30d9f6e4" +checksum = "d3b194b7029b7541ef9206ac3cb696d3cb37f70bd3260d293fc00d378547e892" dependencies = [ - "async-channel 1.9.0", + "async-channel 2.2.0", "bevy_app", "bevy_asset", "bevy_core", @@ -1337,7 +1358,7 @@ dependencies = [ "codespan-reporting", "downcast-rs", "encase", - "futures-lite 1.13.0", + "futures-lite 2.2.0", "hexasphere", "image", "js-sys", @@ -1346,7 +1367,6 @@ dependencies = [ "naga_oil", "ruzstd", "serde", - "smallvec", "thiserror", "thread_local", "wasm-bindgen", @@ -1356,9 +1376,9 @@ dependencies = [ [[package]] name = "bevy_render_macros" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d86bfc5a1e7fbeeaec0c4ceab18155530f5506624670965db3415f75826bea" +checksum = "4aa6d99b50375bb7f63be2c3055dfe2f926f7b3c4db108bb0b1181b4f02766aa" dependencies = [ "bevy_macro_utils", "proc-macro2", @@ -1368,9 +1388,9 @@ dependencies = [ [[package]] name = "bevy_scene" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7df078b5e406e37c8a1c6ba0d652bf105fde713ce3c3efda7263fe27467eee5" +checksum = "2c3c82eaff0b22949183a75a7e2d7fc4ece808235918b34c5b282aab52c3563a" dependencies = [ "bevy_app", "bevy_asset", @@ -1381,7 +1401,6 @@ dependencies = [ "bevy_render", "bevy_transform", "bevy_utils", - "ron", "serde", "thiserror", "uuid", @@ -1389,9 +1408,9 @@ dependencies = [ [[package]] name = "bevy_sprite" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7cc0c9d946e17e3e0aaa202f182837bc796c4f862b2e5a805134f873f21cf7f" +checksum = "5ea977d7d7c48fc4ba283d449f09528c4e70db17c9048e32e99ecd9890d72223" dependencies = [ "bevy_app", "bevy_asset", @@ -1415,23 +1434,23 @@ dependencies = [ [[package]] name = "bevy_tasks" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fefa7fe0da8923525f7500e274f1bd60dbd79918a25cf7d0dfa0a6ba15c1cf" +checksum = "b20f243f6fc4c4ba10c2dbff891e947ddae947bb20b263f43e023558b35294bd" dependencies = [ - "async-channel 1.9.0", + "async-channel 2.2.0", "async-executor", "async-task", "concurrent-queue", - "futures-lite 1.13.0", + "futures-lite 2.2.0", "wasm-bindgen-futures", ] [[package]] name = "bevy_text" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a9a79d49ca06170d69149949b134c14e8b99ace1444c1ca2cd4743b19d5b055" +checksum = "006990d27551dbc339774178e833290952511621662fd5ca23a4e6e922ab2d9f" dependencies = [ "ab_glyph", "bevy_app", @@ -1451,9 +1470,9 @@ dependencies = [ [[package]] name = "bevy_time" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6250d76eed3077128b6a3d004f9f198b01107800b9824051e32bb658054e837" +checksum = "9738901b6b251d2c9250542af7002d6f671401fc3b74504682697c5ec822f210" dependencies = [ "bevy_app", "bevy_ecs", @@ -1465,9 +1484,9 @@ dependencies = [ [[package]] name = "bevy_transform" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d541e0c292edbd96afae816ee680e02247422423ccd5dc635c1e211a20ed64be" +checksum = "ba73744a95bc4b8683e91cea3e79b1ad0844c1d677f31fbbc1814c79a5b4f8f0" dependencies = [ "bevy_app", "bevy_ecs", @@ -1479,9 +1498,9 @@ dependencies = [ [[package]] name = "bevy_ui" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d785e3b75dabcb2a8ad0d50933f8f3446d59e512cabc2d2a145e28c2bb8792ba" +checksum = "fafe872906bac6d7fc8ecff166f56b4253465b2895ed88801499aa113548ccc6" dependencies = [ "bevy_a11y", "bevy_app", @@ -1501,35 +1520,34 @@ dependencies = [ "bevy_utils", "bevy_window", "bytemuck", - "serde", - "smallvec", "taffy", "thiserror", ] [[package]] name = "bevy_utils" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7915222f4a08ccc782e08d10b751b42e5f9d786e697d0cb3fd09333cb7e8b6ea" +checksum = "94a06aca1c1863606416b892f4c79e300dbc6211b6690953269051a431c2cca0" dependencies = [ "ahash 0.8.9", "bevy_utils_proc_macros", "getrandom", "hashbrown 0.14.3", - "instant", "nonmax", "petgraph", + "smallvec", "thiserror", "tracing", "uuid", + "web-time", ] [[package]] name = "bevy_utils_proc_macros" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aafecc952b6b8eb1a93c12590bd867d25df2f4ae1033a01dfdfc3c35ebccfff" +checksum = "31ae98e9c0c08b0f5c90e22cd713201f759b98d4fd570b99867a695f8641859a" dependencies = [ "proc-macro2", "quote", @@ -1538,9 +1556,9 @@ dependencies = [ [[package]] name = "bevy_window" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ee72bf7f974000e9b31bb971a89387f1432ba9413f35c4fef59fef49767260" +checksum = "cb627efd7622a61398ac0d3674f93c997cffe16f13c59fb8ae8a05c9e28de961" dependencies = [ "bevy_a11y", "bevy_app", @@ -1549,14 +1567,15 @@ dependencies = [ "bevy_math", "bevy_reflect", "bevy_utils", - "raw-window-handle", + "raw-window-handle 0.6.0", + "smol_str", ] [[package]] name = "bevy_winit" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1eb71f287eca9006dda998784c7b931e400ae2cc4c505da315882a8b082f21ad" +checksum = "55105324a201941ae587790f83f6d9caa327e0baa0205558ec41e5ee05a1f703" dependencies = [ "accesskit_winit", "approx", @@ -1571,7 +1590,7 @@ dependencies = [ "bevy_utils", "bevy_window", "crossbeam-channel", - "raw-window-handle", + "raw-window-handle 0.6.0", "wasm-bindgen", "web-sys", "winit", @@ -1680,7 +1699,16 @@ version = "0.1.0-beta.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" dependencies = [ - "objc-sys", + "objc-sys 0.2.0-beta.2", +] + +[[package]] +name = "block-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7" +dependencies = [ + "objc-sys 0.3.2", ] [[package]] @@ -1689,8 +1717,18 @@ version = "0.2.0-alpha.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" dependencies = [ - "block-sys", - "objc2-encode", + "block-sys 0.1.0-beta.1", + "objc2-encode 2.0.0-pre.2", +] + +[[package]] +name = "block2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" +dependencies = [ + "block-sys 0.2.1", + "objc2 0.4.1", ] [[package]] @@ -1788,6 +1826,20 @@ dependencies = [ "bytes", ] +[[package]] +name = "calloop" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" +dependencies = [ + "bitflags 2.4.2", + "log", + "polling 3.5.0", + "rustix 0.38.31", + "slab", + "thiserror", +] + [[package]] name = "cast" version = "0.3.0" @@ -1945,10 +1997,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] -name = "com-rs" -version = "0.2.1" +name = "com" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6" +dependencies = [ + "com_macros", +] + +[[package]] +name = "com_macros" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf43edc576402991846b093a7ca18a3477e0ef9c588cde84964b5d3e43016642" +checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5" +dependencies = [ + "com_macros_support", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "com_macros_support" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] name = "combine" @@ -1992,6 +2069,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "const-fnv1a-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b13ea120a812beba79e34316b3942a857c86ec1593cb34f27bb28272ce2cca" + [[package]] name = "const_panic" version = "0.2.8" @@ -2054,14 +2137,14 @@ checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core-graphics" -version = "0.22.3" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" +checksum = "970a29baf4110c26fedbc7f82107d42c23f7e88e404c4577ed73fe99ff85a212" dependencies = [ "bitflags 1.3.2", "core-foundation", "core-graphics-types", - "foreign-types 0.3.2", + "foreign-types 0.5.0", "libc", ] @@ -2110,7 +2193,7 @@ dependencies = [ "js-sys", "libc", "mach2", - "ndk", + "ndk 0.7.0", "ndk-context", "oboe", "once_cell", @@ -2255,11 +2338,17 @@ dependencies = [ "typenum", ] +[[package]] +name = "cursor-icon" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" + [[package]] name = "d3d12" -version = "0.7.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16e44ab292b1dddfdaf7be62cfd8877df52f2f3fde5858d95bab606be259f20" +checksum = "3e3d747f100290a1ca24b752186f61f6637e1deffe3bf6320de6fcb29510a307" dependencies = [ "bitflags 2.4.2", "libloading 0.8.1", @@ -2300,7 +2389,7 @@ dependencies = [ "de_objects", "de_pathing", "de_types", - "glam 0.24.2", + "glam", "parry3d", ] @@ -2335,7 +2424,7 @@ dependencies = [ "de_spawner", "de_terrain", "de_types", - "glam 0.24.2", + "glam", "parry3d", ] @@ -2351,7 +2440,6 @@ dependencies = [ "de_gui", "de_uom", "dirs", - "futures-lite 1.13.0", "iyes_progress", "paste", "serde", @@ -2422,7 +2510,7 @@ dependencies = [ "de_terrain", "de_types", "enum-map", - "glam 0.24.2", + "glam", "parry2d", "parry3d", ] @@ -2435,7 +2523,7 @@ dependencies = [ "bevy", "de_types", "dirs", - "glam 0.24.2", + "glam", "iyes_progress", "parry2d", "parry3d", @@ -2501,7 +2589,7 @@ dependencies = [ "de_objects", "de_test_utils", "de_types", - "glam 0.24.2", + "glam", "nalgebra", "parry2d", "parry3d", @@ -2521,7 +2609,6 @@ dependencies = [ "de_spawner", "de_terrain", "de_types", - "futures-lite 1.13.0", "iyes_progress", "tracing", ] @@ -2559,7 +2646,6 @@ dependencies = [ "de_conf", "de_core", "de_lobby_model", - "futures-lite 1.13.0", "iyes_progress", "reqwest", "serde", @@ -2598,7 +2684,7 @@ dependencies = [ "bevy", "de_types", "enum-map", - "glam 0.24.2", + "glam", "parry2d", "serde", "serde_json", @@ -2622,7 +2708,6 @@ dependencies = [ "de_messages", "de_multiplayer", "de_types", - "futures-lite 1.13.0", "thiserror", "tracing", ] @@ -2634,7 +2719,7 @@ dependencies = [ "bevy", "bincode", "de_types", - "glam 0.24.2", + "glam", "nalgebra", "thiserror", ] @@ -2653,7 +2738,7 @@ dependencies = [ "de_pathing", "de_types", "fastrand 1.9.0", - "glam 0.24.2", + "glam", "parry2d", "parry3d", ] @@ -2671,7 +2756,6 @@ dependencies = [ "de_messages", "de_net", "de_types", - "futures-lite 1.13.0", "iyes_progress", "tracing", ] @@ -2701,7 +2785,7 @@ dependencies = [ "de_types", "enum-iterator", "enum-map", - "glam 0.24.2", + "glam", "iyes_progress", "parry2d", "parry3d", @@ -2724,8 +2808,7 @@ dependencies = [ "de_objects", "de_test_utils", "de_types", - "futures-lite 1.13.0", - "glam 0.24.2", + "glam", "nalgebra", "ntest", "parry2d", @@ -2746,7 +2829,7 @@ dependencies = [ "de_objects", "de_terrain", "de_types", - "glam 0.24.2", + "glam", ] [[package]] @@ -2780,7 +2863,7 @@ dependencies = [ "de_map", "de_objects", "de_types", - "glam 0.24.2", + "glam", "itertools 0.11.0", "iyes_progress", "parry2d", @@ -2791,7 +2874,7 @@ dependencies = [ name = "de_test_utils" version = "0.1.0-dev" dependencies = [ - "glam 0.24.2", + "glam", ] [[package]] @@ -2801,7 +2884,7 @@ dependencies = [ "async-std", "clap", "de_map", - "glam 0.24.2", + "glam", "gltf", "parry3d", ] @@ -2813,7 +2896,7 @@ dependencies = [ "bincode", "enum-iterator", "enum-map", - "glam 0.24.2", + "glam", "nalgebra", "parry2d", "parry3d", @@ -2894,6 +2977,15 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" +[[package]] +name = "dlib" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" +dependencies = [ + "libloading 0.8.1", +] + [[package]] name = "doc-comment" version = "0.3.3" @@ -2920,30 +3012,30 @@ checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "encase" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fce2eeef77fd4a293a54b62aa00ac9daebfbcda4bf8998c5a815635b004aa1c" +checksum = "95ed933078d2e659745df651f4c180511cd582e5b9414ff896e7d50d207e3103" dependencies = [ "const_panic", "encase_derive", - "glam 0.24.2", + "glam", "thiserror", ] [[package]] name = "encase_derive" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e520cde08cbf4f7cc097f61573ec06ce467019803de8ae82fb2823fa1554a0e" +checksum = "f4ce1449c7d19eba6cc0abd231150ad81620a8dce29601d7f8d236e5d431d72a" dependencies = [ "encase_derive_impl", ] [[package]] name = "encase_derive_impl" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fe2568f851fd6144a45fa91cfed8fe5ca8fc0b56ba6797bfc1ed2771b90e37c" +checksum = "92959a9e8d13eaa13b8ae8c7b583c3bf1669ca7a8e7708a088d12587ba86effc" dependencies = [ "proc-macro2", "quote", @@ -3020,9 +3112,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "erased-serde" -version = "0.3.31" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" +checksum = "388979d208a049ffdfb22fa33b9c81942215b940910bccfe258caeb25d125cb3" dependencies = [ "serde", ] @@ -3370,6 +3462,16 @@ dependencies = [ "version_check", ] +[[package]] +name = "gethostname" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" +dependencies = [ + "libc", + "windows-targets 0.48.5", +] + [[package]] name = "getrandom" version = "0.2.12" @@ -3424,13 +3526,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] -name = "glam" -version = "0.24.2" +name = "gl_generator" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5418c17512bdf42730f9032c74e1ae39afc408745ebb2acf72fbc4691c17945" +checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" dependencies = [ - "bytemuck", - "serde", + "khronos_api", + "log", + "xml-rs", ] [[package]] @@ -3439,7 +3542,9 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "151665d9be52f9bb40fc7966565d39666f2d1e69233571b71b87791c7e0528b3" dependencies = [ + "bytemuck", "mint", + "serde", ] [[package]] @@ -3462,9 +3567,9 @@ dependencies = [ [[package]] name = "glow" -version = "0.12.3" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0fe580e4b60a8ab24a868bc08e2f03cbcb20d3d676601fa909386713333728" +checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" dependencies = [ "js-sys", "slotmap", @@ -3511,6 +3616,15 @@ dependencies = [ "serde_json", ] +[[package]] +name = "glutin_wgl_sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" +dependencies = [ + "gl_generator", +] + [[package]] name = "glyph_brush_layout" version = "0.2.3" @@ -3543,15 +3657,15 @@ dependencies = [ [[package]] name = "gpu-allocator" -version = "0.22.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce95f9e2e11c2c6fadfce42b5af60005db06576f231f5c92550fdded43c423e8" +checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884" dependencies = [ - "backtrace", "log", + "presser", "thiserror", "winapi", - "windows 0.44.0", + "windows 0.52.0", ] [[package]] @@ -3656,14 +3770,14 @@ dependencies = [ [[package]] name = "hassle-rs" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1397650ee315e8891a0df210707f0fc61771b0cc518c3023896064c5407cb3b0" +checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" dependencies = [ - "bitflags 1.3.2", - "com-rs", + "bitflags 2.4.2", + "com", "libc", - "libloading 0.7.4", + "libloading 0.8.1", "thiserror", "widestring", "winapi", @@ -3705,12 +3819,12 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hexasphere" -version = "9.1.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cb3df16a7bcb1b5bc092abd55e14f77ca70aea14445026e264586fc62889a10" +checksum = "f33ddb7f7143d9e703c072e88b98cd8b9719f174137a671429351bd2ee43c02a" dependencies = [ "constgebra", - "glam 0.24.2", + "glam", ] [[package]] @@ -3828,6 +3942,17 @@ dependencies = [ "cc", ] +[[package]] +name = "icrate" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319" +dependencies = [ + "block2 0.3.0", + "dispatch", + "objc2 0.4.1", +] + [[package]] name = "idna" version = "0.5.0" @@ -3905,9 +4030,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", ] [[package]] @@ -3983,9 +4105,9 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "iyes_progress" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ed260fda0df8ed859329f221a5eb24175d38fd7d10f586cf6468574e6385b79" +checksum = "66f07a423129ef5aa4a0fb0c5b28ca64622df06ee580977d20ca408dfebdd89e" dependencies = [ "bevy_app", "bevy_ecs", @@ -4020,6 +4142,22 @@ dependencies = [ "walkdir", ] +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", + "windows-sys 0.45.0", +] + [[package]] name = "jni-sys" version = "0.3.0" @@ -4066,15 +4204,21 @@ dependencies = [ [[package]] name = "khronos-egl" -version = "4.1.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" +checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" dependencies = [ "libc", - "libloading 0.7.4", + "libloading 0.8.1", "pkg-config", ] +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + [[package]] name = "kira" version = "0.8.7" @@ -4083,7 +4227,7 @@ checksum = "8968f1eda49cdf4f6406fd5ffe590c3ca2778a1b0e50b5684974b138a99dfb2f" dependencies = [ "atomic-arena", "cpal", - "glam 0.25.0", + "glam", "mint", "ringbuf", "send_wrapper", @@ -4303,9 +4447,9 @@ dependencies = [ [[package]] name = "metal" -version = "0.26.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "623b5e6cefd76e58f774bd3cc0c6f5c7615c58c03a97815245a25c3c9bdee318" +checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25" dependencies = [ "bitflags 2.4.2", "block", @@ -4358,15 +4502,15 @@ dependencies = [ [[package]] name = "naga" -version = "0.13.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ceaaa4eedaece7e4ec08c55c640ba03dbb73fb812a6570a59bcf1930d0f70e" +checksum = "8878eb410fc90853da3908aebfe61d73d26d4437ef850b70050461f939509899" dependencies = [ "bit-set", "bitflags 2.4.2", "codespan-reporting", "hexf-parse", - "indexmap 1.9.3", + "indexmap 2.2.3", "log", "num-traits", "pp-rs", @@ -4379,18 +4523,18 @@ dependencies = [ [[package]] name = "naga_oil" -version = "0.10.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ac54c77b3529887f9668d3dd81e955e58f252b31a333f836e3548c06460b958" +checksum = "c0ea62ae0f2787456afca7209ca180522b41f00cbe159ee369eba1e07d365cd1" dependencies = [ "bit-set", "codespan-reporting", "data-encoding", - "indexmap 1.9.3", + "indexmap 2.2.3", "naga", "once_cell", "regex", - "regex-syntax 0.7.5", + "regex-syntax 0.8.2", "rustc-hash", "thiserror", "tracing", @@ -4404,7 +4548,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4541eb06dce09c0241ebbaab7102f0a01a0c8994afed2e5d0d66775016e25ac2" dependencies = [ "approx", - "glam 0.24.2", + "glam", "matrixmultiply", "nalgebra-macros", "num-complex", @@ -4451,9 +4595,24 @@ checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" dependencies = [ "bitflags 1.3.2", "jni-sys", - "ndk-sys", + "ndk-sys 0.4.1+23.1.7779620", "num_enum 0.5.11", - "raw-window-handle", + "raw-window-handle 0.5.2", + "thiserror", +] + +[[package]] +name = "ndk" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" +dependencies = [ + "bitflags 2.4.2", + "jni-sys", + "log", + "ndk-sys 0.5.0+25.2.9519653", + "num_enum 0.7.2", + "raw-window-handle 0.6.0", "thiserror", ] @@ -4472,6 +4631,15 @@ dependencies = [ "jni-sys", ] +[[package]] +name = "ndk-sys" +version = "0.5.0+25.2.9519653" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" +dependencies = [ + "jni-sys", +] + [[package]] name = "nix" version = "0.24.3" @@ -4674,11 +4842,11 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.6.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" dependencies = [ - "num_enum_derive 0.6.1", + "num_enum_derive 0.7.2", ] [[package]] @@ -4695,9 +4863,9 @@ dependencies = [ [[package]] name = "num_enum_derive" -version = "0.6.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -4721,15 +4889,31 @@ version = "0.2.0-beta.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" +[[package]] +name = "objc-sys" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c71324e4180d0899963fc83d9d241ac39e699609fc1025a850aadac8257459" + [[package]] name = "objc2" version = "0.3.0-beta.3.patch-leaks.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468" dependencies = [ - "block2", - "objc-sys", - "objc2-encode", + "block2 0.2.0-alpha.6", + "objc-sys 0.2.0-beta.2", + "objc2-encode 2.0.0-pre.2", +] + +[[package]] +name = "objc2" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" +dependencies = [ + "objc-sys 0.3.2", + "objc2-encode 3.0.0", ] [[package]] @@ -4738,9 +4922,15 @@ version = "2.0.0-pre.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" dependencies = [ - "objc-sys", + "objc-sys 0.2.0-beta.2", ] +[[package]] +name = "objc2-encode" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" + [[package]] name = "objc_exception" version = "0.1.2" @@ -4766,7 +4956,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8868cc237ee02e2d9618539a23a8d228b9bb3fc2e7a5b11eed3831de77c395d0" dependencies = [ "jni 0.20.0", - "ndk", + "ndk 0.7.0", "ndk-context", "num-derive 0.3.3", "num-traits", @@ -5186,6 +5376,12 @@ dependencies = [ "termtree", ] +[[package]] +name = "presser" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" + [[package]] name = "priority-queue" version = "1.4.0" @@ -5278,6 +5474,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" +[[package]] +name = "raw-window-handle" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42a9830a0e1b9fb145ebb365b8bc4ccd75f290f98c0247deafbbe2c75cefb544" + [[package]] name = "rawpointer" version = "0.2.1" @@ -5386,12 +5588,6 @@ version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" -[[package]] -name = "regex-syntax" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" - [[package]] name = "regex-syntax" version = "0.8.2" @@ -5592,12 +5788,12 @@ dependencies = [ [[package]] name = "ruzstd" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3ffab8f9715a0d455df4bbb9d21e91135aab3cd3ca187af0cd0c3c3f868fdc" +checksum = "58c4eb8a81997cf040a091d1f7e1938aeab6749d3a0dfa73af43cdc32393483d" dependencies = [ "byteorder", - "thiserror-core", + "derive_more", "twox-hash", ] @@ -5913,12 +6109,11 @@ dependencies = [ [[package]] name = "spirv" -version = "0.2.0+1.5.4" +version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830" +checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 1.3.2", - "num-traits", + "bitflags 2.4.2", ] [[package]] @@ -6174,16 +6369,16 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "sysinfo" -version = "0.29.11" +version = "0.30.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd727fc423c2060f6c92d9534cef765c65a6ed3f428a03d7def74a8c4348e666" +checksum = "1fb4f3438c8f6389c864e61221cbc97e9bca98b4daf39a5beb7bea660f528bb2" dependencies = [ "cfg-if", "core-foundation-sys", "libc", "ntapi", "once_cell", - "winapi", + "windows 0.52.0", ] [[package]] @@ -6255,26 +6450,6 @@ dependencies = [ "thiserror-impl", ] -[[package]] -name = "thiserror-core" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c001ee18b7e5e3f62cbf58c7fe220119e68d902bb7443179c0c8aef30090e999" -dependencies = [ - "thiserror-core-impl", -] - -[[package]] -name = "thiserror-core-impl" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.50", -] - [[package]] name = "thiserror-impl" version = "1.0.57" @@ -6435,9 +6610,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.20.7" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap 2.2.3", "toml_datetime", @@ -6843,21 +7018,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" [[package]] -name = "wayland-scanner" -version = "0.29.5" +name = "web-sys" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" +checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" dependencies = [ - "proc-macro2", - "quote", - "xml-rs", + "js-sys", + "wasm-bindgen", ] [[package]] -name = "web-sys" -version = "0.3.68" +name = "web-time" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" +checksum = "aa30049b1c872b72c89866d458eae9f20380ab280ffd1b1e18df2d3e2d98cfe0" dependencies = [ "js-sys", "wasm-bindgen", @@ -6884,18 +7058,19 @@ dependencies = [ [[package]] name = "wgpu" -version = "0.17.2" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "752e44d3998ef35f71830dd1ad3da513e628e2e4d4aedb0ab580f850827a0b41" +checksum = "0bfe9a310dcf2e6b85f00c46059aaeaf4184caa8e29a1ecd4b7a704c3482332d" dependencies = [ "arrayvec", "cfg-if", + "cfg_aliases", "js-sys", "log", "naga", "parking_lot 0.12.1", "profiling", - "raw-window-handle", + "raw-window-handle 0.6.0", "smallvec", "static_assertions", "wasm-bindgen", @@ -6908,19 +7083,22 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "0.17.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f8a44dd301a30ceeed3c27d8c0090433d3da04d7b2a4042738095a424d12ae7" +checksum = "6b15e451d4060ada0d99a64df44e4d590213496da7c4f245572d51071e8e30ed" dependencies = [ "arrayvec", "bit-vec", "bitflags 2.4.2", + "cfg_aliases", "codespan-reporting", + "indexmap 2.2.3", "log", "naga", + "once_cell", "parking_lot 0.12.1", "profiling", - "raw-window-handle", + "raw-window-handle 0.6.0", "rustc-hash", "smallvec", "thiserror", @@ -6931,9 +7109,9 @@ dependencies = [ [[package]] name = "wgpu-hal" -version = "0.17.2" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a80bf0e3c77399bb52850cb0830af9bad073d5cfcb9dd8253bef8125c42db17" +checksum = "e3bb47856236bfafc0bc591a925eb036ac19cd987624a447ff353e7a7e7e6f72" dependencies = [ "android_system_properties", "arrayvec", @@ -6941,9 +7119,11 @@ dependencies = [ "bit-set", "bitflags 2.4.2", "block", + "cfg_aliases", "core-graphics-types", "d3d12", "glow", + "glutin_wgl_sys", "gpu-alloc", "gpu-allocator", "gpu-descriptor", @@ -6956,10 +7136,11 @@ dependencies = [ "metal", "naga", "objc", + "once_cell", "parking_lot 0.12.1", "profiling", "range-alloc", - "raw-window-handle", + "raw-window-handle 0.6.0", "renderdoc-sys", "rustc-hash", "smallvec", @@ -6972,9 +7153,9 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "0.17.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee64d7398d0c2f9ca48922c902ef69c42d000c759f3db41e355f4a570b052b67" +checksum = "895fcbeb772bfb049eb80b2d6e47f6c9af235284e9703c96fc0218a42ffd5af2" dependencies = [ "bitflags 2.4.2", "js-sys", @@ -7028,15 +7209,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows" version = "0.46.0" @@ -7298,32 +7470,42 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winit" -version = "0.28.7" +version = "0.29.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9596d90b45384f5281384ab204224876e8e8bf7d58366d9b795ad99aa9894b94" +checksum = "4c824f11941eeae66ec71111cc2674373c772f482b58939bb4066b642aa2ffcf" dependencies = [ "android-activity", - "bitflags 1.3.2", + "atomic-waker", + "bitflags 2.4.2", + "bytemuck", + "calloop", "cfg_aliases", "core-foundation", "core-graphics", - "dispatch", - "instant", + "cursor-icon", + "icrate", + "js-sys", "libc", "log", - "mio", - "ndk", - "objc2", + "ndk 0.8.0", + "ndk-sys 0.5.0+25.2.9519653", + "objc2 0.4.1", "once_cell", "orbclient", "percent-encoding", - "raw-window-handle", + "raw-window-handle 0.6.0", "redox_syscall 0.3.5", + "rustix 0.38.31", + "smol_str", + "unicode-segmentation", "wasm-bindgen", - "wayland-scanner", + "wasm-bindgen-futures", "web-sys", - "windows-sys 0.45.0", + "web-time", + "windows-sys 0.48.0", "x11-dl", + "x11rb", + "xkbcommon-dl", ] [[package]] @@ -7356,6 +7538,27 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "x11rb" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8f25ead8c7e4cba123243a6367da5d3990e0d3affa708ea19dce96356bd9f1a" +dependencies = [ + "as-raw-xcb-connection", + "gethostname", + "libc", + "libloading 0.8.1", + "once_cell", + "rustix 0.38.31", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e63e71c4b8bd9ffec2c963173a4dc4cbde9ee96961d4fcb4429db9929b606c34" + [[package]] name = "xattr" version = "0.2.3" @@ -7371,6 +7574,25 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a67300977d3dc3f8034dae89778f502b6ba20b269527b3223ba59c0cf393bb8a" +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.4.2", + "dlib", + "log", + "once_cell", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "054a8e68b76250b253f671d1268cb7f1ae089ec35e195b2efb2a4e9a836d0621" + [[package]] name = "xml-rs" version = "0.8.19" diff --git a/Cargo.toml b/Cargo.toml index 0fd914e9..85b805a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -119,7 +119,7 @@ assert_cmd = "2.0.10" async-compat = "0.2.1" async-std = "1.11" async-tar = "0.4.2" -bevy_kira_audio = { version = "0.18", features = ["mp3"] } +bevy_kira_audio = { version = "0.19", features = ["mp3"] } bincode = "2.0.0-rc.3" chrono = "0.4.24" clap = { version = "4.0", features = ["derive"] } @@ -131,13 +131,12 @@ fastrand = "1.9.0" fern = "0.6.2" flate2 = "1.0.26" futures = "0.3.28" -futures-lite = "1.13.0" -glam = "0.24" +glam = "0.25" gltf = "1.0" itertools = "0.11.0" -iyes_progress = "0.10.0" +iyes_progress = "0.11.0" log = "0.4.17" -nalgebra = { version = "0.32.3", features = ["convert-glam024"] } +nalgebra = { version = "0.32.4", features = ["convert-glam025"] } nix = "0.26.2" ntest = "0.9.0" parry2d = "0.13.1" @@ -164,15 +163,17 @@ url = { version = "2.3.1", features = ["serde"] } urlencoding = "2.1.2" [workspace.dependencies.bevy] -version = "0.12" +version = "0.13" default-features = false features = [ "animation", + "bevy_animation", "bevy_asset", "bevy_gilrs", "bevy_scene", "bevy_winit", "bevy_core_pipeline", + "bevy_debug_stepping", "bevy_pbr", "bevy_gltf", "bevy_render", diff --git a/assets/shaders/bar.wgsl b/assets/shaders/bar.wgsl index 9b81bcf7..c0bb8cd7 100644 --- a/assets/shaders/bar.wgsl +++ b/assets/shaders/bar.wgsl @@ -6,7 +6,7 @@ const BACKGROUND_COLOR = vec4(0., 0., 0., 0.75); const FOREGROUND_COLOR = vec4(0.6, 1., 0.6, 0.75); -@group(1) @binding(0) +@group(2) @binding(0) var value: f32; struct Vertex { diff --git a/assets/shaders/rally_point.wgsl b/assets/shaders/rally_point.wgsl index 1860f9a8..01b9915a 100644 --- a/assets/shaders/rally_point.wgsl +++ b/assets/shaders/rally_point.wgsl @@ -13,7 +13,7 @@ struct CustomMaterial { fade: f32, }; -@group(1) @binding(0) +@group(2) @binding(0) var material: CustomMaterial; const COLOR: vec4 = vec4(0.0, 0.5, 0.0, 0.8); diff --git a/assets/shaders/terrain.wgsl b/assets/shaders/terrain.wgsl index 71fe62a6..c180200b 100644 --- a/assets/shaders/terrain.wgsl +++ b/assets/shaders/terrain.wgsl @@ -34,11 +34,11 @@ struct Rectangles { count: u32, }; -@group(1) @binding(100) +@group(2) @binding(100) var uv_scale: f32; -@group(1) @binding(101) +@group(2) @binding(101) var circles: KdTree; -@group(1) @binding(102) +@group(2) @binding(102) var rectangles: Rectangles; fn mix_colors(base: vec4, cover: vec4) -> vec4 { let alpha = base.a * cover.a; diff --git a/assets/shaders/trail.wgsl b/assets/shaders/trail.wgsl index d0e29c83..e5a6e476 100644 --- a/assets/shaders/trail.wgsl +++ b/assets/shaders/trail.wgsl @@ -5,7 +5,7 @@ const COLOR = vec4(1., 0.85, 0.1, 0.7); -@group(1) @binding(0) +@group(2) @binding(0) var start_time: f32; @fragment diff --git a/crates/camera/src/camera.rs b/crates/camera/src/camera.rs index ccfd2613..04f940a2 100644 --- a/crates/camera/src/camera.rs +++ b/crates/camera/src/camera.rs @@ -87,11 +87,11 @@ impl Plugin for CameraPlugin { zoom.in_set(InternalCameraSet::Zoom), update_shadows .after(InternalCameraSet::Zoom) - .run_if(resource_exists_and_changed::()), + .run_if(resource_exists_and_changed::), pivot .run_if( - resource_exists_and_changed::() - .or_else(resource_exists_and_changed::()), + resource_exists_and_changed:: + .or_else(resource_exists_and_changed::), ) .in_set(InternalCameraSet::Pivot), move_horizontaly @@ -370,9 +370,10 @@ fn update_focus( camera_query: Query<&Transform, With>, ) { let camera_transform = camera_query.single(); + let forward = camera_transform.forward(); let ray = Ray::new( camera_transform.translation.into(), - camera_transform.forward().into(), + Vector::new(forward.x, forward.y, forward.z), ); let intersection = terrain @@ -408,7 +409,8 @@ fn update_translation_handler( mut camera_query: Query<&mut Transform, With>, ) { let mut transform = camera_query.single_mut(); - transform.translation = focus.point() + f32::from(focus.distance()) * transform.back(); + let back = Vec3::from(transform.back()); + transform.translation = focus.point() + f32::from(focus.distance()) * back; } fn move_horizontaly( @@ -475,7 +477,7 @@ fn zoom( } let mut transform = camera_query.single_mut(); - let delta_vec = f32::from(delta_scalar) * transform.forward(); + let delta_vec = f32::from(delta_scalar) * Vec3::from(transform.forward()); transform.translation += delta_vec; focus.update_distance(delta_scalar); } @@ -508,7 +510,8 @@ fn pivot( (desired_off_nadir.off_nadir() - Radian::FRAC_PI_2).into(), 0., ); - transform.translation = focus.point() - f32::from(focus.distance()) * transform.forward(); + let forward = Vec3::from(transform.forward()); + transform.translation = focus.point() - f32::from(focus.distance()) * forward; } fn handle_horizontal_events( diff --git a/crates/camera/src/skybox.rs b/crates/camera/src/skybox.rs index c6c5b5af..c3147126 100644 --- a/crates/camera/src/skybox.rs +++ b/crates/camera/src/skybox.rs @@ -74,7 +74,8 @@ fn setup_camera( if configured { return; } - commands - .entity(entity) - .insert(Skybox(skybox.handle.clone())); + commands.entity(entity).insert(Skybox { + image: skybox.handle.clone(), + brightness: 300., + }); } diff --git a/crates/combat/src/trail.rs b/crates/combat/src/trail.rs index 8dc1121e..7b11ca5f 100644 --- a/crates/combat/src/trail.rs +++ b/crates/combat/src/trail.rs @@ -6,6 +6,7 @@ use bevy::{ reflect::TypePath, render::{ mesh::{Indices, MeshVertexBufferLayout, PrimitiveTopology}, + render_asset::RenderAssetUsages, render_resource::{ AsBindGroup, RenderPipelineDescriptor, ShaderRef, SpecializedMeshPipelineError, }, @@ -256,10 +257,13 @@ fn generate_trail_mesh() -> Mesh { let indices = Indices::U16(vec![0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7]); - let mut mesh = Mesh::new(PrimitiveTopology::TriangleList); + let mut mesh = Mesh::new( + PrimitiveTopology::TriangleList, + RenderAssetUsages::RENDER_WORLD, + ); mesh.insert_attribute(Mesh::ATTRIBUTE_POSITION, positions); mesh.insert_attribute(Mesh::ATTRIBUTE_NORMAL, normals); mesh.insert_attribute(Mesh::ATTRIBUTE_UV_0, uvs); - mesh.set_indices(Some(indices)); + mesh.insert_indices(indices); mesh } diff --git a/crates/conf/Cargo.toml b/crates/conf/Cargo.toml index 32f1bc22..fb38e6de 100644 --- a/crates/conf/Cargo.toml +++ b/crates/conf/Cargo.toml @@ -25,7 +25,6 @@ anyhow.workspace = true async-std.workspace = true bevy.workspace = true dirs.workspace = true -futures-lite.workspace = true iyes_progress.workspace = true paste.workspace = true serde.workspace = true diff --git a/crates/conf/src/plugin.rs b/crates/conf/src/plugin.rs index 23496f4f..2ab43e8c 100644 --- a/crates/conf/src/plugin.rs +++ b/crates/conf/src/plugin.rs @@ -1,11 +1,10 @@ use bevy::{ prelude::*, - tasks::{IoTaskPool, Task}, + tasks::{futures_lite::future, IoTaskPool, Task}, }; use de_core::fs::conf_dir; use de_core::state::AppState; use de_gui::ToastEvent; -use futures_lite::future; use iyes_progress::prelude::*; use tracing::error; diff --git a/crates/controller/src/commands/handlers.rs b/crates/controller/src/commands/handlers.rs index 541f789e..98f5a307 100644 --- a/crates/controller/src/commands/handlers.rs +++ b/crates/controller/src/commands/handlers.rs @@ -54,8 +54,8 @@ pub(super) struct HandlersPlugin; impl HandlersPlugin { fn add_place_draft_systems(app: &mut App) { let key_map = enum_map! { - BuildingType::Base => KeyCode::B, - BuildingType::PowerHub => KeyCode::P, + BuildingType::Base => KeyCode::KeyB, + BuildingType::PowerHub => KeyCode::KeyP, }; for (building_type, &key) in key_map.iter() { @@ -108,11 +108,11 @@ impl Plugin for HandlersPlugin { .before(GameMenuSet::Toggle) .before(DraftSet::Discard), select_all - .run_if(KeyCondition::single(KeyCode::A).with_ctrl().build()) + .run_if(KeyCondition::single(KeyCode::KeyA).with_ctrl().build()) .before(SelectionSet::Update), select_all_visible .run_if( - KeyCondition::single(KeyCode::A) + KeyCondition::single(KeyCode::KeyA) .with_ctrl() .with_shift() .build(), @@ -164,7 +164,9 @@ fn right_click_handler( .map(|&player| !config.locals().is_playable(*player)) .unwrap_or(false) }) { - Some(enemy) => attack_events.send(GroupAttackEvent::new(enemy)), + Some(enemy) => { + attack_events.send(GroupAttackEvent::new(enemy)); + } None => { let Some(target) = pointer.terrain_point().map(|p| p.to_flat()) else { return; @@ -176,7 +178,7 @@ fn right_click_handler( } fn double_click_handler( - keys: Res>, + keys: Res>, pointer: Res, playable: Query<&ObjectTypeComponent, With>, drafts: Query<(), With>, @@ -211,18 +213,14 @@ fn move_camera_arrows_system( mut move_events: EventWriter, ) { for key_event in key_events.read() { - let Some(key_code) = key_event.key_code else { - continue; - }; - let mut direction = Vec2::ZERO; - if key_code == KeyCode::Left { + if key_event.key_code == KeyCode::ArrowLeft { direction = Vec2::new(-1., 0.); - } else if key_code == KeyCode::Right { + } else if key_event.key_code == KeyCode::ArrowRight { direction = Vec2::new(1., 0.); - } else if key_code == KeyCode::Down { + } else if key_event.key_code == KeyCode::ArrowDown { direction = Vec2::new(0., -1.); - } else if key_code == KeyCode::Up { + } else if key_event.key_code == KeyCode::ArrowUp { direction = Vec2::new(0., 1.); } @@ -287,8 +285,8 @@ fn zoom_camera( fn pivot_camera( conf: Res, - buttons: Res>, - keys: Res>, + buttons: Res>, + keys: Res>, mut mouse_event: EventReader, mut rotate_event: EventWriter, mut tilt_event: EventWriter, @@ -310,7 +308,7 @@ fn pivot_camera( fn left_click_handler( mut select_events: EventWriter, mut draft_events: EventWriter, - keys: Res>, + keys: Res>, pointer: Res, playable: Query<(), With>, drafts: Query<(), With>, @@ -385,7 +383,7 @@ fn select_all_visible(mut events: EventWriter) { } fn update_drags( - keys: Res>, + keys: Res>, mut drag_events: EventReader, mut ui_events: EventWriter, mut select_events: EventWriter, @@ -416,6 +414,6 @@ fn update_drags( } }; - ui_events.send(ui_event) + ui_events.send(ui_event); } } diff --git a/crates/controller/src/commands/keyboard.rs b/crates/controller/src/commands/keyboard.rs index 1b5d4b52..ad49e6f4 100644 --- a/crates/controller/src/commands/keyboard.rs +++ b/crates/controller/src/commands/keyboard.rs @@ -33,13 +33,13 @@ impl KeyCondition { self } - pub(super) fn build(self) -> impl Fn(Res>, EventReader) -> bool { - move |keys: Res>, mut events: EventReader| { + pub(super) fn build( + self, + ) -> impl Fn(Res>, EventReader) -> bool { + move |keys: Res>, mut events: EventReader| { let proper_key = events .read() - .filter(|k| { - k.state == ButtonState::Pressed && k.key_code.map_or(false, |c| c == self.key) - }) + .filter(|k| k.state == ButtonState::Pressed && k.key_code == self.key) .count() > 0; diff --git a/crates/controller/src/frustum.rs b/crates/controller/src/frustum.rs index 0aa0326d..8496ba95 100644 --- a/crates/controller/src/frustum.rs +++ b/crates/controller/src/frustum.rs @@ -53,7 +53,7 @@ impl<'w, 's> ScreenFrustum<'w, 's> { half_spaces[i] = HalfSpace::new(norm.extend(-transform.translation.dot(norm))); } - let forward = transform.forward(); + let forward = Vec3::from(transform.forward()); let near_dist = -forward.dot(transform.translation + projection.near * forward); let far_dist = -forward.dot(transform.translation + projection.far * forward); half_spaces[4] = HalfSpace::new(forward.extend(near_dist)); diff --git a/crates/controller/src/hud/actionbar.rs b/crates/controller/src/hud/actionbar.rs index 54224446..18ba6b3e 100644 --- a/crates/controller/src/hud/actionbar.rs +++ b/crates/controller/src/hud/actionbar.rs @@ -22,7 +22,7 @@ impl Plugin for ActionBarPlugin { ( detect_update.in_set(ActionBarSet::DetectUpdate), update - .run_if(resource_exists_and_changed::()) + .run_if(resource_exists_and_changed::) .after(ActionBarSet::DetectUpdate), ) .run_if(in_state(GameState::Playing)), diff --git a/crates/controller/src/hud/interaction.rs b/crates/controller/src/hud/interaction.rs index 4411f0b7..8a1d58e0 100644 --- a/crates/controller/src/hud/interaction.rs +++ b/crates/controller/src/hud/interaction.rs @@ -1,5 +1,5 @@ use bevy::{ - ecs::{query::ReadOnlyWorldQuery, system::SystemParam}, + ecs::{query::QueryFilter, system::SystemParam}, prelude::*, }; @@ -15,7 +15,7 @@ pub(crate) struct InteractionBlocker; #[derive(SystemParam)] pub(crate) struct HudNodes<'w, 's, F = With> where - F: ReadOnlyWorldQuery + Sync + Send + 'static, + F: QueryFilter + Sync + Send + 'static, { hud: Query< 'w, @@ -31,7 +31,7 @@ where impl<'w, 's, F> HudNodes<'w, 's, F> where - F: ReadOnlyWorldQuery + Sync + Send + 'static, + F: QueryFilter + Sync + Send + 'static, { /// See [`Self::relative_position`]. pub(crate) fn contains_point(&self, point: Vec2) -> bool { diff --git a/crates/controller/src/hud/minimap/nodes.rs b/crates/controller/src/hud/minimap/nodes.rs index c17466e0..dcbca756 100644 --- a/crates/controller/src/hud/minimap/nodes.rs +++ b/crates/controller/src/hud/minimap/nodes.rs @@ -1,6 +1,9 @@ use bevy::{ prelude::*, - render::render_resource::{Extent3d, TextureDimension, TextureFormat}, + render::{ + render_asset::RenderAssetUsages, + render_resource::{Extent3d, TextureDimension, TextureFormat}, + }, }; use de_core::{cleanup::DespawnOnGameExit, gamestate::GameState, schedule::PreMovement}; use de_map::size::MapBounds; @@ -101,5 +104,6 @@ fn new_image(resolution: UVec2) -> Image { TextureDimension::D2, data, format, + RenderAssetUsages::RENDER_WORLD | RenderAssetUsages::MAIN_WORLD, ) } diff --git a/crates/controller/src/mouse/input.rs b/crates/controller/src/mouse/input.rs index 0ac9d63f..d1b6e72d 100644 --- a/crates/controller/src/mouse/input.rs +++ b/crates/controller/src/mouse/input.rs @@ -27,7 +27,7 @@ impl Plugin for InputPlugin { ( update_position.in_set(MouseSet::Position), update_drags - .run_if(resource_exists_and_changed::()) + .run_if(resource_exists_and_changed::) .in_set(MouseSet::Drags) .after(MouseSet::Position), update_buttons diff --git a/crates/core/src/schedule.rs b/crates/core/src/schedule.rs index 41e5b676..0fd063bf 100644 --- a/crates/core/src/schedule.rs +++ b/crates/core/src/schedule.rs @@ -1,20 +1,37 @@ //! This module extends default Bevy schedules. -use bevy::{app::MainScheduleOrder, ecs::schedule::ScheduleLabel, prelude::*}; +use bevy::{ + app::MainScheduleOrder, + ecs::schedule::{ScheduleBuildSettings, ScheduleLabel}, + prelude::*, +}; pub struct GameSchedulesPlugin; -impl Plugin for GameSchedulesPlugin { - fn build(&self, app: &mut App) { - app.add_systems(Startup, setup); +impl GameSchedulesPlugin { + fn insert_schedule( + app: &mut App, + after: impl ScheduleLabel, + schedule_label: impl ScheduleLabel + Clone, + ) { + let mut schedule = Schedule::new(schedule_label.clone()); + schedule.set_build_settings(ScheduleBuildSettings { + auto_insert_apply_deferred: false, + ..default() + }); + app.add_schedule(schedule); + let mut main_schedule_order = app.world.resource_mut::(); + main_schedule_order.insert_after(after, schedule_label); } } -fn setup(mut main: ResMut) { - main.insert_after(First, InputSchedule); - main.insert_after(InputSchedule, PreMovement); - main.insert_after(PreMovement, Movement); - main.insert_after(Movement, PostMovement); +impl Plugin for GameSchedulesPlugin { + fn build(&self, app: &mut App) { + Self::insert_schedule(app, First, InputSchedule); + Self::insert_schedule(app, InputSchedule, PreMovement); + Self::insert_schedule(app, PreMovement, Movement); + Self::insert_schedule(app, Movement, PostMovement); + } } /// All user input is handled during this schedule. diff --git a/crates/core/src/transition.rs b/crates/core/src/transition.rs index 6b8dcf43..14cb4cf3 100644 --- a/crates/core/src/transition.rs +++ b/crates/core/src/transition.rs @@ -2,12 +2,14 @@ use bevy::{ecs::schedule::run_enter_schedule, prelude::*}; pub use paste; pub trait DeStateTransition { - /// This method is almost equal to Bevy's [`App::add_state`]. The only + /// This method is almost equal to Bevy's [`App::init_state`]. The only /// difference is that the state transition is added to an associated /// state. See [`StateWithSet`]. - fn add_state_with_set(&mut self) -> &mut Self; + fn add_state_with_set(&mut self) -> &mut Self; - fn add_child_state(&mut self) -> &mut Self; + fn add_child_state( + &mut self, + ) -> &mut Self; } pub trait StateWithSet { @@ -17,9 +19,10 @@ pub trait StateWithSet { } impl DeStateTransition for App { - fn add_state_with_set(&mut self) -> &mut Self { + fn add_state_with_set(&mut self) -> &mut Self { self.init_resource::>() .init_resource::>() + .add_event::>() .add_systems( StateTransition, ( @@ -32,7 +35,9 @@ impl DeStateTransition for App { self } - fn add_child_state(&mut self) -> &mut Self { + fn add_child_state( + &mut self, + ) -> &mut Self { self.add_state_with_set::(); self.configure_sets(StateTransition, (P::state_set(), S::state_set()).chain()); self diff --git a/crates/gui/src/body_text.rs b/crates/gui/src/body_text.rs index 352dde51..32559c4c 100644 --- a/crates/gui/src/body_text.rs +++ b/crates/gui/src/body_text.rs @@ -10,19 +10,19 @@ use crate::{GuiCommands, OuterStyle}; struct BodyText; pub trait BodyTextCommands<'w, 's> { - fn spawn_body_text<'a>( - &'a mut self, + fn spawn_body_text( + &mut self, size: OuterStyle, caption: impl Into, - ) -> EntityCommands<'w, 's, 'a>; + ) -> EntityCommands<'_>; } impl<'w, 's> BodyTextCommands<'w, 's> for GuiCommands<'w, 's> { - fn spawn_body_text<'a>( - &'a mut self, + fn spawn_body_text( + &mut self, style: OuterStyle, caption: impl Into, - ) -> EntityCommands<'w, 's, 'a> { + ) -> EntityCommands<'_> { let text_style = self.text_props().body_text_style(); let mut commands = self.spawn(( diff --git a/crates/gui/src/button.rs b/crates/gui/src/button.rs index fe57140c..7f5cc135 100644 --- a/crates/gui/src/button.rs +++ b/crates/gui/src/button.rs @@ -17,19 +17,15 @@ impl Plugin for ButtonPlugin { } pub trait ButtonCommands<'w, 's> { - fn spawn_button<'a>( - &'a mut self, - size: OuterStyle, - caption: impl Into, - ) -> EntityCommands<'w, 's, 'a>; + fn spawn_button(&mut self, size: OuterStyle, caption: impl Into) -> EntityCommands<'_>; } impl<'w, 's> ButtonCommands<'w, 's> for GuiCommands<'w, 's> { - fn spawn_button<'a>( - &'a mut self, + fn spawn_button( + &mut self, style: OuterStyle, caption: impl Into, - ) -> EntityCommands<'w, 's, 'a> { + ) -> EntityCommands<'_> { let text_style = self.text_props().button_text_style(); let mut commands = self.spawn(ButtonBundle { diff --git a/crates/gui/src/focus.rs b/crates/gui/src/focus.rs index 48e998a1..9c663f62 100644 --- a/crates/gui/src/focus.rs +++ b/crates/gui/src/focus.rs @@ -3,7 +3,7 @@ use bevy::{ ecs::{ - query::{ReadOnlyWorldQuery, WorldQuery}, + query::{QueryData, QueryFilter, QueryItem}, system::SystemParam, }, prelude::*, @@ -42,8 +42,8 @@ impl SetFocusEvent { #[derive(SystemParam)] pub(super) struct FocusedQuery<'w, 's, Q, F = ()> where - Q: WorldQuery + Sync + Send + 'static, - F: ReadOnlyWorldQuery + Sync + Send + 'static, + Q: QueryData + Sync + Send + 'static, + F: QueryFilter + Sync + Send + 'static, { focus: Res<'w, UiFocus>, query: Query<'w, 's, Q, F>, @@ -51,8 +51,8 @@ where impl<'w, 's, Q, F> FocusedQuery<'w, 's, Q, F> where - Q: WorldQuery + Sync + Send + 'static, - F: ReadOnlyWorldQuery + Sync + Send + 'static, + Q: QueryData + Sync + Send + 'static, + F: QueryFilter + Sync + Send + 'static, { pub(super) fn is_changed(&self) -> bool { self.focus.is_changed() @@ -60,16 +60,16 @@ where /// Returns the query item for previously selected entity, id est the /// entity selected before the current one. - pub(super) fn get_previous_mut(&mut self) -> Option<::Item<'_>> { + pub(super) fn get_previous_mut(&mut self) -> Option> { self.get_mut(self.focus.previous) } /// Returns the query item for currently selected entity. - pub(super) fn get_current_mut(&mut self) -> Option<::Item<'_>> { + pub(super) fn get_current_mut(&mut self) -> Option> { self.get_mut(self.focus.current) } - fn get_mut(&mut self, entity: Option) -> Option<::Item<'_>> { + fn get_mut(&mut self, entity: Option) -> Option> { match entity { Some(entity) => match self.query.get_mut(entity) { Ok(item) => Some(item), @@ -89,7 +89,7 @@ pub(super) struct UiFocus { fn focus_system( mut focus: ResMut, mut removals: RemovedComponents, - mouse: Res>, + mouse: Res>, touch: Res, interactions: Query<(Entity, &Interaction), Changed>, mut events: EventReader, diff --git a/crates/gui/src/label.rs b/crates/gui/src/label.rs index b621c38e..c550c1ee 100644 --- a/crates/gui/src/label.rs +++ b/crates/gui/src/label.rs @@ -3,19 +3,11 @@ use bevy::{ecs::system::EntityCommands, prelude::*}; use crate::{GuiCommands, OuterStyle}; pub trait LabelCommands<'w, 's> { - fn spawn_label<'a>( - &'a mut self, - size: OuterStyle, - caption: impl Into, - ) -> EntityCommands<'w, 's, 'a>; + fn spawn_label(&mut self, size: OuterStyle, caption: impl Into) -> EntityCommands<'_>; } impl<'w, 's> LabelCommands<'w, 's> for GuiCommands<'w, 's> { - fn spawn_label<'a>( - &'a mut self, - style: OuterStyle, - caption: impl Into, - ) -> EntityCommands<'w, 's, 'a> { + fn spawn_label(&mut self, style: OuterStyle, caption: impl Into) -> EntityCommands<'_> { let text_style = self.text_props().label_text_style(); let mut commands = self.spawn(NodeBundle { diff --git a/crates/gui/src/text.rs b/crates/gui/src/text.rs index 61adb381..d1c44f55 100644 --- a/crates/gui/src/text.rs +++ b/crates/gui/src/text.rs @@ -4,7 +4,7 @@ pub(crate) struct TextPlugin; impl Plugin for TextPlugin { fn build(&self, app: &mut App) { - app.add_systems(Update, setup.run_if(not(resource_exists::()))); + app.add_systems(Update, setup.run_if(not(resource_exists::))); } } diff --git a/crates/gui/src/textbox.rs b/crates/gui/src/textbox.rs index c834b3b2..21cb71c0 100644 --- a/crates/gui/src/textbox.rs +++ b/crates/gui/src/textbox.rs @@ -28,19 +28,11 @@ impl Plugin for TextBoxPlugin { } pub trait TextBoxCommands<'w, 's> { - fn spawn_text_box<'a>( - &'a mut self, - size: OuterStyle, - secret: bool, - ) -> EntityCommands<'w, 's, 'a>; + fn spawn_text_box(&mut self, size: OuterStyle, secret: bool) -> EntityCommands<'_>; } impl<'w, 's> TextBoxCommands<'w, 's> for GuiCommands<'w, 's> { - fn spawn_text_box<'a>( - &'a mut self, - style: OuterStyle, - secret: bool, - ) -> EntityCommands<'w, 's, 'a> { + fn spawn_text_box(&mut self, style: OuterStyle, secret: bool) -> EntityCommands<'_> { let text_style = self.text_props().input_text_style(); let mut commands = self.spawn(NodeBundle { @@ -63,8 +55,7 @@ impl<'w, 's> TextBoxCommands<'w, 's> for GuiCommands<'w, 's> { .insert(TextBox::new(secret)) .with_children(|builder| { builder.spawn( - TextBundle::from_section("", text_style) - .with_text_alignment(TextAlignment::Left), + TextBundle::from_section("", text_style).with_text_justify(JustifyText::Left), ); }); @@ -159,8 +150,10 @@ fn input_system( // FIXME: Fix ordering of multiple event streams once // https://github.com/bevyengine/bevy/issues/5984 is fixed. for event in characters.read() { - if !event.char.is_control() { - text_box.push(event.char); + if let Some(character) = event.char.chars().last() { + if !character.is_control() { + text_box.push(character); + } } } @@ -170,7 +163,7 @@ fn input_system( } match event.key_code { - Some(KeyCode::Back) => text_box.backspace(), + KeyCode::Backspace => text_box.backspace(), _ => continue, } } diff --git a/crates/index/src/precise/index.rs b/crates/index/src/precise/index.rs index 8cec2f81..5cc7a9a0 100644 --- a/crates/index/src/precise/index.rs +++ b/crates/index/src/precise/index.rs @@ -6,7 +6,7 @@ use std::cmp::Ordering; use ahash::AHashMap; use bevy::{ ecs::{ - query::{ReadOnlyWorldQuery, WorldQuery}, + query::{QueryData, QueryFilter, ROQueryItem}, system::SystemParam, }, prelude::*, @@ -113,8 +113,8 @@ impl Default for EntityIndex { #[derive(SystemParam)] pub struct SpatialQuery<'w, 's, Q, F = ()> where - Q: WorldQuery + Sync + Send + 'static, - F: ReadOnlyWorldQuery + Sync + Send + 'static, + Q: QueryData + Sync + Send + 'static, + F: QueryFilter + Sync + Send + 'static, { index: Res<'w, EntityIndex>, entities: Query<'w, 's, Q, F>, @@ -122,8 +122,8 @@ where impl<'w, 's, Q, F> SpatialQuery<'w, 's, Q, F> where - Q: WorldQuery + Sync + Send + 'static, - F: ReadOnlyWorldQuery + Sync + Send + 'static, + Q: QueryData + Sync + Send + 'static, + F: QueryFilter + Sync + Send + 'static, { /// Returns closest entity whose shape, as indexed by systems registered by /// [`super::PreciseIndexPlugin`], intersects a given ray. @@ -143,7 +143,7 @@ where ray: &Ray, max_toi: f32, ignore: Option, - ) -> Option::ReadOnly as WorldQuery>::Item<'_>>> { + ) -> Option>> { let candidate_sets = match self.index.cast_ray(ray, max_toi) { Some(candidates) => candidates, None => return None, @@ -250,8 +250,8 @@ impl Eq for RayEntityIntersection {} pub struct AabbQueryResults<'w, 's, 'a, 'b, Q, F = ()> where - Q: WorldQuery + Sync + Send + 'static, - F: ReadOnlyWorldQuery + Sync + Send + 'static, + Q: QueryData + Sync + Send + 'static, + F: QueryFilter + Sync + Send + 'static, { entities: &'a Query<'w, 's, Q, F>, index: &'a EntityIndex, @@ -264,8 +264,8 @@ where impl<'w, 's, 'a, 'b, Q, F> AabbQueryResults<'w, 's, 'a, 'b, Q, F> where - Q: WorldQuery + Sync + Send + 'static, - F: ReadOnlyWorldQuery + Sync + Send + 'static, + Q: QueryData + Sync + Send + 'static, + F: QueryFilter + Sync + Send + 'static, { fn new( entities: &'a Query<'w, 's, Q, F>, @@ -289,11 +289,11 @@ where impl<'w, 's, 'a, 'b, Q, F> Iterator for AabbQueryResults<'w, 's, 'a, 'b, Q, F> where - Q: WorldQuery + Sync + Send + 'static, - F: ReadOnlyWorldQuery + Sync + Send + 'static, + Q: QueryData + Sync + Send + 'static, + F: QueryFilter + Sync + Send + 'static, 'a: 'w, { - type Item = <::ReadOnly as WorldQuery>::Item<'a>; + type Item = ROQueryItem<'a, Q>; fn next(&mut self) -> Option { 'outer: loop { diff --git a/crates/loader/Cargo.toml b/crates/loader/Cargo.toml index b747c24c..617ccd0e 100644 --- a/crates/loader/Cargo.toml +++ b/crates/loader/Cargo.toml @@ -25,6 +25,5 @@ de_types.workspace = true # Other bevy.workspace = true -futures-lite.workspace = true iyes_progress.workspace = true tracing.workspace = true diff --git a/crates/loader/src/map.rs b/crates/loader/src/map.rs index 6ae979c3..96ed9ad3 100644 --- a/crates/loader/src/map.rs +++ b/crates/loader/src/map.rs @@ -1,6 +1,6 @@ use bevy::{ prelude::*, - tasks::{IoTaskPool, Task}, + tasks::{futures_lite::future, IoTaskPool, Task}, }; use de_camera::MoveFocusEvent; use de_core::{ @@ -16,7 +16,6 @@ use de_map::{ use de_spawner::{SpawnInactiveEvent, SpawnLocalActiveEvent, SpawnerSet}; use de_terrain::TerrainBundle; use de_types::objects::{ActiveObjectType, BuildingType}; -use futures_lite::future; use iyes_progress::prelude::*; pub(crate) struct MapLoaderPlugin; @@ -142,7 +141,7 @@ fn spawn_map( fn setup_light(commands: &mut Commands) { commands.insert_resource(AmbientLight { color: Color::WHITE, - brightness: 0.6, + brightness: 180., }); let mut transform = Transform::IDENTITY; @@ -152,7 +151,7 @@ fn setup_light(commands: &mut Commands) { DirectionalLightBundle { directional_light: DirectionalLight { color: Color::WHITE, - illuminance: 30000., + illuminance: 10_000., shadows_enabled: true, ..Default::default() }, diff --git a/crates/lobby_client/Cargo.toml b/crates/lobby_client/Cargo.toml index f0382d39..9529629b 100644 --- a/crates/lobby_client/Cargo.toml +++ b/crates/lobby_client/Cargo.toml @@ -22,7 +22,6 @@ ahash.workspace = true anyhow.workspace = true async-compat.workspace = true bevy.workspace = true -futures-lite.workspace = true iyes_progress.workspace = true reqwest.workspace = true serde.workspace = true diff --git a/crates/lobby_client/src/plugin.rs b/crates/lobby_client/src/plugin.rs index 45b66f55..4b846950 100644 --- a/crates/lobby_client/src/plugin.rs +++ b/crates/lobby_client/src/plugin.rs @@ -3,8 +3,7 @@ use std::marker::PhantomData; use ahash::AHashMap; pub use anyhow::Result; use bevy::prelude::*; -use bevy::tasks::Task; -use futures_lite::future; +use bevy::tasks::{futures_lite::future, Task}; use crate::{ client::AuthenticatedClient, @@ -119,7 +118,9 @@ fn fire( match result { Ok(task) => pending.register(event.id().to_owned(), task), - Err(error) => responses.send(ResponseEvent::new(event.id().to_owned(), Err(error))), + Err(error) => { + responses.send(ResponseEvent::new(event.id().to_owned(), Err(error))); + } } } } diff --git a/crates/menu/Cargo.toml b/crates/menu/Cargo.toml index a6ddf687..e6fd85b7 100644 --- a/crates/menu/Cargo.toml +++ b/crates/menu/Cargo.toml @@ -26,6 +26,5 @@ de_types.workspace = true # Other async-std.workspace = true bevy.workspace = true -futures-lite.workspace = true thiserror.workspace = true tracing.workspace = true diff --git a/crates/menu/src/mainmenu.rs b/crates/menu/src/mainmenu.rs index c89dd299..63b2c77f 100644 --- a/crates/menu/src/mainmenu.rs +++ b/crates/menu/src/mainmenu.rs @@ -79,7 +79,9 @@ fn button_system( if let Interaction::Pressed = interaction { match action { ButtonAction::SwithState(state) => next_state.set(state), - ButtonAction::Quit => exit.send(AppExit), + ButtonAction::Quit => { + exit.send(AppExit); + } }; } } diff --git a/crates/menu/src/mapselection.rs b/crates/menu/src/mapselection.rs index 3593049f..90544a54 100644 --- a/crates/menu/src/mapselection.rs +++ b/crates/menu/src/mapselection.rs @@ -3,7 +3,7 @@ use std::path::{Path, PathBuf}; use async_std::{fs, io, stream::StreamExt}; use bevy::{ prelude::*, - tasks::{IoTaskPool, Task}, + tasks::{futures_lite::future, IoTaskPool, Task}, }; use de_core::{assets::asset_path, log_full_error, state::AppState}; use de_gui::{ButtonCommands, GuiCommands, OuterStyle}; @@ -11,14 +11,13 @@ use de_map::{ io::{load_metadata, MapLoadingError, MAP_FILE_SUFFIX}, meta::MapMetadata, }; -use futures_lite::future; use thiserror::Error; pub(crate) struct MapSelectionPlugin; impl Plugin for MapSelectionPlugin { fn build(&self, app: &mut App) { - app.add_state::() + app.init_state::() .add_event::() .add_event::() .add_systems(OnEnter(MapState::On), setup) diff --git a/crates/menu/src/menu.rs b/crates/menu/src/menu.rs index 4933cc35..d895cf5b 100644 --- a/crates/menu/src/menu.rs +++ b/crates/menu/src/menu.rs @@ -16,8 +16,8 @@ impl Plugin for MenuPlugin { Update, ( hide_show_corner - .run_if(resource_exists::()) - .run_if(resource_changed::>()), + .run_if(resource_exists::) + .run_if(resource_changed::>), button_system.run_if(in_state(AppState::InMenu)), ), ); @@ -35,7 +35,7 @@ impl Plugin for ScreenStatePlugin { fn build(&self, app: &mut App) { app.add_systems( PreUpdate, - clean_up_root::.run_if(resource_exists::()), + clean_up_root::.run_if(resource_exists::), ); } } diff --git a/crates/menu/src/multiplayer/create.rs b/crates/menu/src/multiplayer/create.rs index 4d58315c..31f9c0e9 100644 --- a/crates/menu/src/multiplayer/create.rs +++ b/crates/menu/src/multiplayer/create.rs @@ -198,8 +198,12 @@ fn button_system( for (&interaction, &action) in interactions.iter() { if let Interaction::Pressed = interaction { match action { - ButtonAction::SelectMap => map_events.send(SelectMapEvent), - ButtonAction::Create => create_events.send(CreateGameEvent), + ButtonAction::SelectMap => { + map_events.send(SelectMapEvent); + } + ButtonAction::Create => { + create_events.send(CreateGameEvent); + } } } } diff --git a/crates/menu/src/multiplayer/gamelisting.rs b/crates/menu/src/multiplayer/gamelisting.rs index fc939342..21543258 100644 --- a/crates/menu/src/multiplayer/gamelisting.rs +++ b/crates/menu/src/multiplayer/gamelisting.rs @@ -179,7 +179,9 @@ fn list_games_system( commands.entity(table.0).add_child(row_id); } } - Err(error) => toasts.send(ToastEvent::new(error)), + Err(error) => { + toasts.send(ToastEvent::new(error)); + } } } diff --git a/crates/menu/src/multiplayer/signin.rs b/crates/menu/src/multiplayer/signin.rs index a0ad20a2..976ba6e8 100644 --- a/crates/menu/src/multiplayer/signin.rs +++ b/crates/menu/src/multiplayer/signin.rs @@ -21,7 +21,7 @@ impl Plugin for SignInPlugin { .add_systems( Update, ( - button_system.run_if(resource_exists::()), + button_system.run_if(resource_exists::), response_system::, response_system::, auth_system, diff --git a/crates/menu/src/singleplayer.rs b/crates/menu/src/singleplayer.rs index 36a6547a..04bb62b9 100644 --- a/crates/menu/src/singleplayer.rs +++ b/crates/menu/src/singleplayer.rs @@ -116,7 +116,9 @@ fn button_system( toasts.send(ToastEvent::new("No map selected.")); } }, - ButtonAction::SelectMap => map_events.send(SelectMapEvent), + ButtonAction::SelectMap => { + map_events.send(SelectMapEvent); + } }; } } diff --git a/crates/multiplayer/Cargo.toml b/crates/multiplayer/Cargo.toml index f6c13a8c..936691a4 100644 --- a/crates/multiplayer/Cargo.toml +++ b/crates/multiplayer/Cargo.toml @@ -24,6 +24,5 @@ ahash.workspace = true async-std.workspace = true bevy.workspace = true bincode.workspace = true -futures-lite.workspace = true iyes_progress.workspace = true tracing.workspace = true diff --git a/crates/multiplayer/src/netstate.rs b/crates/multiplayer/src/netstate.rs index ff156f11..5b4a03a7 100644 --- a/crates/multiplayer/src/netstate.rs +++ b/crates/multiplayer/src/netstate.rs @@ -5,7 +5,7 @@ pub(super) struct NetStatePlugin; impl Plugin for NetStatePlugin { fn build(&self, app: &mut App) { - app.add_state::().add_plugins(( + app.init_state::().add_plugins(( ProgressPlugin::new(NetState::Connecting).continue_to(NetState::Connected), ProgressPlugin::new(NetState::ShuttingDown).continue_to(NetState::None), )); diff --git a/crates/multiplayer/src/network.rs b/crates/multiplayer/src/network.rs index 3fa68447..5b9baee6 100644 --- a/crates/multiplayer/src/network.rs +++ b/crates/multiplayer/src/network.rs @@ -3,13 +3,12 @@ use std::ops::Deref; use async_std::channel::{TryRecvError, TrySendError}; use bevy::{ prelude::*, - tasks::{IoTaskPool, Task}, + tasks::{futures_lite::future, IoTaskPool, Task}, }; use de_core::schedule::PreMovement; use de_net::{ startup, ConnErrorReceiver, InPackage, OutPackage, PackageReceiver, PackageSender, Socket, }; -use futures_lite::future; use iyes_progress::prelude::*; use crate::{lifecycle::FatalErrorEvent, netstate::NetState}; @@ -28,24 +27,24 @@ impl Plugin for NetworkPlugin { Update, wait_for_network .track_progress() - .run_if(resource_exists::()), + .run_if(resource_exists::), ) .add_systems( PostUpdate, ( send_packages - .run_if(resource_exists::()) + .run_if(resource_exists::) .run_if(on_event::()) .in_set(NetworkSet::SendPackages), recv_errors - .run_if(resource_exists::()) + .run_if(resource_exists::) .in_set(NetworkSet::RecvErrors), ), ) .add_systems( PreMovement, recv_packages - .run_if(resource_exists::()) + .run_if(resource_exists::) .in_set(NetworkSet::RecvPackages), ); } @@ -177,7 +176,9 @@ fn recv_packages( ) { for _ in 0..MAX_RECV_PER_UPDATE { match receiver.try_recv() { - Ok(package) => events.send(PackageReceivedEvent(package)), + Ok(package) => { + events.send(PackageReceivedEvent(package)); + } Err(TryRecvError::Empty) => return, Err(TryRecvError::Closed) => { fatals.send(FatalErrorEvent::new( diff --git a/crates/pathing/Cargo.toml b/crates/pathing/Cargo.toml index 3d8070f9..e3edb780 100644 --- a/crates/pathing/Cargo.toml +++ b/crates/pathing/Cargo.toml @@ -24,7 +24,6 @@ de_types.workspace = true ahash.workspace = true approx.workspace = true bevy.workspace = true -futures-lite.workspace = true glam.workspace = true nalgebra.workspace = true parry2d.workspace = true diff --git a/crates/pathing/src/fplugin.rs b/crates/pathing/src/fplugin.rs index 748dd364..5ff1e771 100644 --- a/crates/pathing/src/fplugin.rs +++ b/crates/pathing/src/fplugin.rs @@ -2,7 +2,7 @@ use std::{ops::Deref, sync::Arc}; use bevy::{ prelude::*, - tasks::{AsyncComputeTaskPool, Task}, + tasks::{futures_lite::future, AsyncComputeTaskPool, Task}, }; use de_core::{ gamestate::GameState, @@ -12,7 +12,6 @@ use de_core::{ }; use de_map::size::MapBounds; use de_objects::SolidObjects; -use futures_lite::future; use crate::{exclusion::ExclusionArea, finder::PathFinder, triangulation::triangulate}; diff --git a/crates/pathing/src/pplugin.rs b/crates/pathing/src/pplugin.rs index 3bfddfe4..f6ccb2d0 100644 --- a/crates/pathing/src/pplugin.rs +++ b/crates/pathing/src/pplugin.rs @@ -1,7 +1,7 @@ use ahash::AHashMap; use bevy::{ prelude::*, - tasks::{AsyncComputeTaskPool, Task}, + tasks::{futures_lite::future, AsyncComputeTaskPool, Task}, }; use de_core::{ gamestate::GameState, @@ -10,7 +10,6 @@ use de_core::{ state::AppState, }; use de_types::{path::Path, projection::ToFlat}; -use futures_lite::future; use crate::{ fplugin::{FinderRes, FinderSet, PathFinderUpdatedEvent}, diff --git a/crates/signs/src/bars.rs b/crates/signs/src/bars.rs index 347d4e98..2fd344e3 100644 --- a/crates/signs/src/bars.rs +++ b/crates/signs/src/bars.rs @@ -6,6 +6,7 @@ use bevy::{ reflect::TypePath, render::{ mesh::{Indices, MeshVertexAttribute, MeshVertexBufferLayout}, + render_asset::RenderAssetUsages, render_resource::{ AsBindGroup, PrimitiveTopology, RenderPipelineDescriptor, ShaderRef, SpecializedMeshPipelineError, VertexFormat, @@ -298,7 +299,10 @@ fn update_visibility_timer( } fn bar_mesh(width: f32, height: f32) -> Mesh { - let mut mesh = Mesh::new(PrimitiveTopology::TriangleList); + let mut mesh = Mesh::new( + PrimitiveTopology::TriangleList, + RenderAssetUsages::RENDER_WORLD, + ); mesh.insert_attribute( ATTRIBUTE_POSITION, vec![ @@ -313,6 +317,6 @@ fn bar_mesh(width: f32, height: f32) -> Mesh { vec![[0., 0.], [0., 1.], [1., 1.], [1., 0.]], ); - mesh.set_indices(Some(Indices::U16(vec![0, 1, 2, 0, 2, 3]))); + mesh.insert_indices(Indices::U16(vec![0, 1, 2, 0, 2, 3])); mesh } diff --git a/crates/signs/src/line.rs b/crates/signs/src/line.rs index 89df70c9..0f806e5b 100644 --- a/crates/signs/src/line.rs +++ b/crates/signs/src/line.rs @@ -77,17 +77,20 @@ impl LineLocation { Self { start, end } } - /// A transform matrix from a plane with points at `(-0.5, 0. -0.5), (0.5, 0. -0.5), - /// (0.5, 0., 0.5), (-0.5, 0., -0.5)` to the line start and end with the `LINE_WIDTH`. + /// A transform matrix from a plane with points at `(-1, 0, -1), (1, 0, + /// -1), (1, 0, 1), (1, 0, -1)` to the line start and end with the + /// `LINE_WIDTH`. fn transform(&self) -> Transform { - let line_direction = self.end - self.start; - let perpendicular_direction = - Vec3::new(-line_direction.z, line_direction.y, line_direction.x).normalize() - * LINE_WIDTH; - let x_axis = line_direction.extend(0.); - let z_axis = perpendicular_direction.extend(0.); - let w_axis = (self.start + line_direction / 2. + LINE_OFFSET).extend(1.); - Transform::from_matrix(Mat4::from_cols(x_axis, Vec4::Y, z_axis, w_axis)) + let half_dir = 0.5 * (self.end - self.start); + let norm_perp_dir = Vec3::new(-half_dir.z, half_dir.y, half_dir.x).normalize(); + let half_perp_dir = 0.5 * LINE_WIDTH * norm_perp_dir; + + let x_axis = half_dir.extend(0.); + let y_axis = Vec4::Y; + let z_axis = half_perp_dir.extend(0.); + let w_axis = (self.start + half_dir + LINE_OFFSET).extend(1.); + + Transform::from_matrix(Mat4::from_cols(x_axis, y_axis, z_axis, w_axis)) } } @@ -143,7 +146,7 @@ fn setup( ) { commands.init_resource::(); commands.init_resource::(); - let line_mesh = meshes.add(shape::Plane::from_size(1.0).into()); + let line_mesh = meshes.add(Plane3d::default()); let line_material = materials.add(LineMaterial {}); commands.insert_resource(LineMesh(line_mesh, line_material)); } diff --git a/crates/signs/src/pole.rs b/crates/signs/src/pole.rs index 3ce03261..506dffef 100644 --- a/crates/signs/src/pole.rs +++ b/crates/signs/src/pole.rs @@ -26,7 +26,7 @@ impl Plugin for PolePlugin { .in_set(PolesSet::Despawned) .after(PolesSet::LocationEvents), update_poles - .run_if(resource_exists_and_changed::()) + .run_if(resource_exists_and_changed::) .after(PolesSet::LocationEvents) .after(PolesSet::VisibilityEvents) .after(PolesSet::Despawned) @@ -183,8 +183,12 @@ fn update_poles( for location in &desired { if !poles.0.contains_key(location) { match to_despawn.pop() { - Some(old) => move_events.send(MovePoleEvent(old, location.0)), - None => spawn_events.send(SpawnPoleEvent(location.0)), + Some(old) => { + move_events.send(MovePoleEvent(old, location.0)); + } + None => { + spawn_events.send(SpawnPoleEvent(location.0)); + } } } } diff --git a/crates/spawner/src/despawner.rs b/crates/spawner/src/despawner.rs index 45e6bd91..2ae0d7a8 100644 --- a/crates/spawner/src/despawner.rs +++ b/crates/spawner/src/despawner.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use bevy::ecs::query::{ReadOnlyWorldQuery, WorldQuery}; +use bevy::ecs::query::QueryFilter; use bevy::prelude::*; use de_audio::spatial::{PlaySpatialAudioEvent, Sound}; use de_core::gconfig::GameConfig; @@ -141,15 +141,18 @@ fn despawn(mut commands: Commands, mut despawning: EventReader) { } } -/// This plugin sends events with data of type `T` when entities with `Q` and -/// matching `F` are despawned. The events are send from systems in set -/// [`DespawnerSet::Events`]. +type DespData = ::Owned; + +/// This plugin sends events with data of type `DespData` when entities with +/// component `T` matching query `F` are despawned. The events are send from +/// systems in set [`DespawnerSet::Events`]. /// /// # Type Parameters /// -/// * `Q` - query for entities to watch for despawning. e.g `&Foo`. -/// * `T` - type of data to send (must be a single component contained in `Q`). e.g. `Foo`. -/// * `F` - filter for entities to watch for despawning. (optional, defaults to `()`). e.g. `With`. +/// * `T` - a component implementing ToOwned to be send as part of the despawn +/// events. +/// * `F` - filter for entities to watch for despawning. (optional, defaults to +/// `()`). e.g. `With`. /// /// # Usage /// @@ -163,24 +166,24 @@ fn despawn(mut commands: Commands, mut despawning: EventReader) { /// let mut app = App::new(); /// /// // watch for despawning of entities with `Bar` component -/// app.add_plugins(DespawnEventsPlugin::<&Bar, Bar>::default()); +/// app.add_plugins(DespawnEventsPlugin::::default()); /// ``` /// #[derive(Debug)] -pub struct DespawnEventsPlugin +pub struct DespawnEventsPlugin where - F: ReadOnlyWorldQuery + Send + Sync + 'static, - T: Send + Sync + 'static + Clone + Component, - Q: WorldQuery + Send + Sync + 'static, + T: Component + ToOwned, + DespData: Send + Sync, + F: QueryFilter + Send + Sync + 'static, { - _marker: PhantomData<(Q, F, T)>, + _marker: PhantomData<(T, F)>, } -impl< - Q: WorldQuery + Send + Sync + 'static, - T: Send + Sync + 'static + Clone + Component, - F: ReadOnlyWorldQuery + Send + Sync + 'static, - > Default for DespawnEventsPlugin +impl Default for DespawnEventsPlugin +where + T: Component + ToOwned, + DespData: Send + Sync, + F: QueryFilter + Send + Sync + 'static, { fn default() -> Self { Self { @@ -189,52 +192,51 @@ impl< } } -impl< - Q: WorldQuery + Send + Sync + 'static, - T: Send + Sync + Clone + Component + 'static, - F: ReadOnlyWorldQuery + Send + Sync + 'static, - > Plugin for DespawnEventsPlugin +impl Plugin for DespawnEventsPlugin +where + T: Component + ToOwned, + DespData: Send + Sync, + F: QueryFilter + Send + Sync + 'static, { fn build(&self, app: &mut App) { - app.add_event::>() + app.add_event::>>() .add_systems( Update, - send_data:: + send_data:: .after(DespawnerSet::Despawn) .in_set(DespawnerSet::Events), ); } } -/// This event is sent by [`DespawnEventsPlugin`] when a matching entity is being despawned. -#[derive(Debug, Event)] -pub struct DespawnedComponentsEvent +/// This event is sent by [`DespawnEventsPlugin`] when a matching entity is +/// being despawned. +#[derive(Event)] +pub struct DespawnedComponentsEvent where - T: Send + Sync + Component + 'static, - F: ReadOnlyWorldQuery + 'static, + D: Send + Sync, { pub entity: Entity, - pub data: T, - _filter_marker: PhantomData, + pub data: D, } -/// Send events with data of type `T` when entities with `Q` and matching `F` are despawned. +/// Sends events with data of type `DespData` when entities with component +/// `T` and matching query `F` are despawned. #[allow(unused)] -fn send_data<'w, Q, T, F>( +fn send_data( mut despawning: EventReader, - mut events: EventWriter>, - data: Query, + mut events: EventWriter>>, + data: Query<&T, F>, ) where - T: Clone + Component + Send + Sync + 'w, - Q: WorldQuery + Send + Sync + 'w, - F: ReadOnlyWorldQuery + Send + Sync + 'w, + T: Component + ToOwned, + DespData: Send + Sync, + F: QueryFilter + Send + Sync, { for DespawnEvent(entity) in despawning.read() { - if let Ok(data) = data.get_component::(*entity) { + if let Ok(data) = data.get(*entity) { events.send(DespawnedComponentsEvent { entity: *entity, - data: data.clone(), - _filter_marker: PhantomData, + data: data.to_owned(), }); } } @@ -242,8 +244,10 @@ fn send_data<'w, Q, T, F>( #[cfg(test)] mod tests { - use bevy::ecs::system::SystemState; - use bevy::log::{Level, LogPlugin}; + use bevy::{ + ecs::{schedule::ScheduleBuildSettings, system::SystemState}, + log::{Level, LogPlugin}, + }; use super::*; @@ -285,25 +289,27 @@ mod tests { let simple_entity = app.world.spawn((TestComponent { value: 1 },)).id(); trace!("Simple entity spawned -> {:?}", simple_entity); - app.add_plugins(DespawnEventsPlugin::<&TestComponent, TestComponent>::default()) - .add_plugins(DespawnEventsPlugin::< - &ComplexComponent, - ComplexComponent, - With, - >::default()) - .add_systems( - Update, - (despawn_all_test_system.before(DespawnerSet::Despawn),), - ) - .add_systems(Update, despawn.in_set(DespawnerSet::Despawn)) - .add_event::(); + app.edit_schedule(Update, |schedule| { + schedule.set_build_settings(ScheduleBuildSettings { + auto_insert_apply_deferred: false, + ..default() + }); + }) + .add_plugins(DespawnEventsPlugin::::default()) + .add_plugins(DespawnEventsPlugin::>::default()) + .add_systems( + Update, + (despawn_all_test_system.before(DespawnerSet::Despawn),), + ) + .add_systems(Update, despawn.in_set(DespawnerSet::Despawn)) + .add_event::(); let mut simple_events = SystemState::>>::new( &mut app.world, ); let mut complex_events = SystemState::< - EventReader>>, + EventReader>, >::new(&mut app.world); trace!("---------- App update #1 ----------"); diff --git a/crates/spawner/src/draft.rs b/crates/spawner/src/draft.rs index 43d6c666..8c2c9ecf 100644 --- a/crates/spawner/src/draft.rs +++ b/crates/spawner/src/draft.rs @@ -142,8 +142,8 @@ fn cleanup(mut commands: Commands) { fn insert_materials(mut commands: Commands, mut materials: ResMut>) { commands.insert_resource(DraftMaterials { - valid_placement: materials.add(VALID_PLACEMENT.into()), - invalid_placement: materials.add(INVALID_PLACEMENT.into()), + valid_placement: materials.add(VALID_PLACEMENT), + invalid_placement: materials.add(INVALID_PLACEMENT), }); } diff --git a/crates/terrain/src/terrain.rs b/crates/terrain/src/terrain.rs index de1826a2..9039fea9 100644 --- a/crates/terrain/src/terrain.rs +++ b/crates/terrain/src/terrain.rs @@ -1,7 +1,7 @@ use ahash::AHashMap; use bevy::{ prelude::{Bundle, Component, Mesh, Transform}, - render::{mesh::Indices, render_resource::PrimitiveTopology}, + render::{mesh::Indices, render_asset::RenderAssetUsages, render_resource::PrimitiveTopology}, utils::FloatOrd, }; use de_map::size::MapBounds; @@ -87,8 +87,11 @@ impl Terrain { } } - let mut mesh = Mesh::new(PrimitiveTopology::TriangleList); - mesh.set_indices(Some(Indices::U32(indices))); + let mut mesh = Mesh::new( + PrimitiveTopology::TriangleList, + RenderAssetUsages::RENDER_WORLD, + ); + mesh.insert_indices(Indices::U32(indices)); mesh.insert_attribute(Mesh::ATTRIBUTE_POSITION, positions); mesh.insert_attribute(Mesh::ATTRIBUTE_NORMAL, normals); mesh.insert_attribute(Mesh::ATTRIBUTE_UV_0, uvs);