diff --git a/Cargo.lock b/Cargo.lock index 96ed609..05a6a15 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,24 +20,24 @@ checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" [[package]] name = "accesskit" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704d532b1cd3d912bb37499c55a81ac748cc1afa737eedd100ba441acdd47d38" +checksum = "02c98a5d094590335462354da402d754fe2cb78f0e6ce5024611c28ed539c1de" [[package]] name = "accesskit_consumer" -version = "0.14.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ba8b23cfca3944012ee2e5c71c02077a400e034c720eed6bd927cb6b4d1fd9" +checksum = "ca541e0fdb600916d196a940228df99b86d804fd2e6ef13894d7814f2799db43" dependencies = [ "accesskit", ] [[package]] name = "accesskit_macos" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58d062544d6cc36f4213323b7cb3a0d74ddff4b0d2311ab5e7596f4278bb2cc9" +checksum = "4baea9413f0daf1cd4aab199bc09f8139cd726ce7673d523c27d186b8b878325" dependencies = [ "accesskit", "accesskit_consumer", @@ -47,9 +47,9 @@ dependencies = [ [[package]] name = "accesskit_windows" -version = "0.13.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaf5b3c3828397ee832ba4a72fb1a4ace10f781e31885f774cbd531014059115" +checksum = "e11c7f177739f23bd19bb856e4a64fdd96eb8638ec0a6a6dde9a7019a9e91c53" dependencies = [ "accesskit", "accesskit_consumer", @@ -61,9 +61,9 @@ dependencies = [ [[package]] name = "accesskit_winit" -version = "0.12.4" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbcb615217efc79c4bed3094c4ca76c4bc554751d1da16f3ed4ba0459b1e8f31" +checksum = "14f1bd64cd0b480cafb7bdd91eb489a1ff50f0f5702437b9efa32a25b8bb82a1" dependencies = [ "accesskit", "accesskit_macos", @@ -97,6 +97,18 @@ dependencies = [ "version_check", ] +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "version_check", +] + [[package]] name = "aho-corasick" version = "1.0.2" @@ -106,6 +118,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56fc6cf8dc8c4158eed8649f9b8b0ea1518eb62b544fe9490d66fa0b349eafe9" + [[package]] name = "alsa" version = "0.7.0" @@ -113,7 +131,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8512c9117059663fb5606788fbca3619e2a91dac0e3fe516242eab1fa6be5e44" dependencies = [ "alsa-sys", - "bitflags", + "bitflags 1.3.2", "libc", "nix 0.24.3", ] @@ -135,7 +153,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c77a0045eda8b888c76ea473c2b0515ba6f471d318f8927c5c72240937035a6" dependencies = [ "android-properties", - "bitflags", + "bitflags 1.3.2", "cc", "jni-sys", "libc", @@ -154,9 +172,9 @@ checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" [[package]] name = "android_log-sys" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85965b6739a430150bdd138e2374a98af0c3ee0d030b3bb7fc3bddff58d0102e" +checksum = "27f0fc03f560e1aebde41c2398b691cb98b5ea5996a6184a7a67bbbb77448969" [[package]] name = "android_system_properties" @@ -194,7 +212,7 @@ version = "0.37.3+1.3.251" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" dependencies = [ - "libloading", + "libloading 0.7.4", ] [[package]] @@ -266,18 +284,18 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "bevy" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b93f906133305915d63f04108e6873c1b93a6605fe374b8f3391f6bda093e396" +checksum = "04a90fe8e9c03fa2d30acf39a5178a48526df00c1ccea2fc43fa6d9ca4d8a168" dependencies = [ "bevy_internal", ] [[package]] name = "bevy_a11y" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037c4063f7dac1a5d596eb47f40782a04ca5838dc4274dbbadc90eb81efe5169" +checksum = "f758f437d9d862bf10a8e3a0f76b426095c19a87d118c945dcb935358d856076" dependencies = [ "accesskit", "bevy_app", @@ -287,9 +305,9 @@ dependencies = [ [[package]] name = "bevy_animation" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0dc19f21846ebf8ba4d96617c2517b5119038774aa5dbbaf1bff122332b359c" +checksum = "3d130cb8b7e2b81304591c5c8e511accd2df58b8d8185ab4836ed2f377e6a61f" dependencies = [ "bevy_app", "bevy_asset", @@ -298,6 +316,7 @@ dependencies = [ "bevy_hierarchy", "bevy_math", "bevy_reflect", + "bevy_render", "bevy_time", "bevy_transform", "bevy_utils", @@ -305,13 +324,14 @@ dependencies = [ [[package]] name = "bevy_app" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01db46963eb9486f7884121527ec69751d0e448f9e1d5329e80ea3424118a31a" +checksum = "1817e8d5b1146ea9e7730a7264d3470394840e0754d15abded26473f867967a0" dependencies = [ "bevy_derive", "bevy_ecs", "bevy_reflect", + "bevy_tasks", "bevy_utils", "downcast-rs", "wasm-bindgen", @@ -320,9 +340,9 @@ dependencies = [ [[package]] name = "bevy_asset" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98609b4b0694a23bde0628aed626644967991f167aad9db2afb68dacb0017540" +checksum = "4e12f951d4af2ad4ad230cd7bcb05248149c415eec17c34bf26731c4cd8b897f" dependencies = [ "anyhow", "bevy_app", @@ -348,13 +368,14 @@ dependencies = [ [[package]] name = "bevy_audio" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42b9f9b87b0d094268ce52bb75ff346ae0054573f7acc5d66bf032e2c88f748d" +checksum = "a6bade3f5389f9463e150af874aebe672b5101df4268d28b0109a66f9cdce56e" dependencies = [ "anyhow", "bevy_app", "bevy_asset", + "bevy_derive", "bevy_ecs", "bevy_math", "bevy_reflect", @@ -367,9 +388,9 @@ dependencies = [ [[package]] name = "bevy_core" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee53d7b4691b57207d72e996992c995a53f3e8d21ca7151ca3956d9ce7d232e" +checksum = "263b6a943ecba176c8390a1100615021f61a3b2d7a87e8eecf4009b6ed4457e0" dependencies = [ "bevy_app", "bevy_ecs", @@ -382,12 +403,13 @@ dependencies = [ [[package]] name = "bevy_core_pipeline" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "093ae5ced77251602ad6e43521e2acc1a5570bf85b80f232f1a7fdd43b50f8d8" +checksum = "50c70113b5c4106855b888f96d8574697eb9082713f976c9b6487c1f5ab28589" dependencies = [ "bevy_app", "bevy_asset", + "bevy_core", "bevy_derive", "bevy_ecs", "bevy_math", @@ -395,27 +417,27 @@ dependencies = [ "bevy_render", "bevy_transform", "bevy_utils", - "bitflags", + "bitflags 2.3.3", "radsort", "serde", ] [[package]] name = "bevy_derive" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff0add5ab4a6b2b7e86e18f9043bb48b6386faa3b56abaa0ed97a3d669a1992" +checksum = "e1477347b17df781756ba0dfd677e2975e57e930752cd3cd42e6cdd8fdaa3223" dependencies = [ "bevy_macro_utils", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] name = "bevy_diagnostic" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c778422643b0adee9e82abbd07e1e906eb9947c274a9b18e0f7fbf137d4c34" +checksum = "37a594f970c261007cdd3edeccd61651c2cb4513de3d0b8b35d93f5d9c32c059" dependencies = [ "bevy_app", "bevy_core", @@ -428,9 +450,9 @@ dependencies = [ [[package]] name = "bevy_ecs" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bed2f74687ccf13046c0f8e3b00dc61d7e656877b4a1380cf04635bb74d8e586" +checksum = "032c81ba7d919c1004b0abc33cc6c588c8f896a4d7c55a7c7aa1e46382242f43" dependencies = [ "async-channel", "bevy_ecs_macros", @@ -443,26 +465,27 @@ dependencies = [ "fixedbitset", "rustc-hash", "serde", + "thiserror", "thread_local", ] [[package]] name = "bevy_ecs_macros" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97fd126a0db7b30fb1833614b3a657b44ac88485741c33b2780e25de0f96d78" +checksum = "a15ff7fcafdb8fe464ddd300b4860a76d5c6f9d684472e4bf21852d6f0ff3991" dependencies = [ "bevy_macro_utils", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] name = "bevy_encase_derive" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c086ebdc1f5522787d63772943277cc74a279445fb65db4d58c2c5330654648e" +checksum = "6bdf808dbdc68a0c519e09026c627bda85250205a40ac02794866bff254d6b56" dependencies = [ "bevy_macro_utils", "encase_derive_impl", @@ -470,22 +493,45 @@ dependencies = [ [[package]] name = "bevy_gilrs" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f32eb07e8c9ea4be7195ccec10d8f9ad70200f3ae2e13adc4b84df9f50bb1c6" +checksum = "b877a371caa64edd6ec5d66b47c67b9e9e9acff2f3bcc51e31e175463e89f6ba" dependencies = [ "bevy_app", "bevy_ecs", "bevy_input", + "bevy_log", + "bevy_time", "bevy_utils", "gilrs", + "thiserror", +] + +[[package]] +name = "bevy_gizmos" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7938b43b4bdf9d039b7d3b310f871ed5ffa5a185e861a9c85731c40182019f8d" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_core", + "bevy_core_pipeline", + "bevy_ecs", + "bevy_math", + "bevy_pbr", + "bevy_reflect", + "bevy_render", + "bevy_sprite", + "bevy_transform", + "bevy_utils", ] [[package]] name = "bevy_gltf" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2707632208617c3660ea7a1d2ef2ccc84b59f217c2f01a1d0abe81db4ae7bbde" +checksum = "f09b699698a2f5843ef63064010a5e7783403f99a697a04f41a2f8141cb4245d" dependencies = [ "anyhow", "base64", @@ -507,14 +553,16 @@ dependencies = [ "bevy_utils", "gltf", "percent-encoding", + "serde", + "serde_json", "thiserror", ] [[package]] name = "bevy_hierarchy" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d04099865a13d1fd8bf3c044a80148cb3d23bfe8c3d5f082dda2ce091d85532" +checksum = "ba41e1bb0c367b31e59b53ab858de56764c78bee87c121843c1ff033efa0086c" dependencies = [ "bevy_app", "bevy_core", @@ -527,9 +575,9 @@ dependencies = [ [[package]] name = "bevy_input" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15d40aa636bb656967ac16ca36066ab7a7bb9179e1b0390c5705e54208e8fd7" +checksum = "7221091c7b219a63a1f3f019512e8b72bed673230b97c3fcbca37ba566b1cffb" dependencies = [ "bevy_app", "bevy_ecs", @@ -541,9 +589,9 @@ dependencies = [ [[package]] name = "bevy_internal" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "862b11931c5874cb00778ffb715fc526ee49e52a493d3bcf50e8010f301858b3" +checksum = "0f232e7bd2566abd05656789e3c6278a5ca2a24f1232dff525e5b0233a99a610" dependencies = [ "bevy_a11y", "bevy_animation", @@ -556,6 +604,7 @@ dependencies = [ "bevy_diagnostic", "bevy_ecs", "bevy_gilrs", + "bevy_gizmos", "bevy_gltf", "bevy_hierarchy", "bevy_input", @@ -579,9 +628,9 @@ dependencies = [ [[package]] name = "bevy_log" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25980c90ceaad34d09a53291e72ca56fcc754a974cd4654fffcf5b68b283b7a7" +checksum = "487dfd1fc75fada8f3f2f4773addf3fbba53a2a91cb913616e6dc6c26dd62995" dependencies = [ "android_log-sys", "bevy_app", @@ -595,20 +644,21 @@ dependencies = [ [[package]] name = "bevy_macro_utils" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b2fee53b2497cdc3bffff2ddf52afa751242424a5fd0d51d227d4dab081d0d9" +checksum = "fd3868e555723249fde3786891f35893b3001b2be4efb51f431467cb7fc378cd" dependencies = [ "quote", - "syn 1.0.109", + "rustc-hash", + "syn 2.0.18", "toml_edit", ] [[package]] name = "bevy_math" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da6a1109d06fe947990db032e719e162414cf9bf7a478dcc52742f1c7136c42a" +checksum = "25088c6598fe0b8ded992c781dc49e613993c7a4e6a731c0f2ab0408add6afdb" dependencies = [ "glam", "serde", @@ -616,18 +666,18 @@ dependencies = [ [[package]] name = "bevy_mikktspace" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39106bc2ee21fce9496d2e15e0ba7925dff63e3eae10f7c1fc0094b56ad9f2bb" +checksum = "99dde80034660f7dbb473141c31f0a746acc7229f5a06ce769aba5f16fd592ab" dependencies = [ "glam", ] [[package]] name = "bevy_pbr" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f507cef55812aa70c2ec2b30fb996eb285fa7497d974cf03f76ec49c77fbe27" +checksum = "3efec2ae4b4f9fd38b82b93350499dac2dc6f07e63ef50a03c00c52075e2dea8" dependencies = [ "bevy_app", "bevy_asset", @@ -640,22 +690,36 @@ dependencies = [ "bevy_transform", "bevy_utils", "bevy_window", - "bitflags", + "bitflags 2.3.3", "bytemuck", + "naga_oil", "radsort", ] [[package]] name = "bevy_ptr" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b88451d4c5a353bff67dbaa937b6886efd26ae114769c17f2b35099c7a4de" +checksum = "c74fcf37593a0053f539c3b088f34f268cbefed031d8eb8ff0fb10d175160242" + +[[package]] +name = "bevy_rapier3d" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12402872b857ba490f1040ab6212915bd9bf25f8584b31f2c43cef41b33f3be4" +dependencies = [ + "bevy", + "bitflags 1.3.2", + "log", + "nalgebra", + "rapier3d", +] [[package]] name = "bevy_reflect" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc3979471890e336f3ba87961ef3ecd45c331cf2cb2f582c885e541af228b48" +checksum = "362492a6b66f676176705cc06017b012320fa260a9cf4baf3513387e9c05693e" dependencies = [ "bevy_math", "bevy_ptr", @@ -668,28 +732,29 @@ dependencies = [ "parking_lot", "serde", "smallvec", + "smol_str", "thiserror", ] [[package]] name = "bevy_reflect_derive" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc7ea7c9bc2c531eb29ba5619976613d6680453ff5dd4a7fcd08848e8bec5ad" +checksum = "8e974d78eaf1b45e1b4146711b5c16e37c24234e12f3a52f5f2e28332c969d3c" dependencies = [ "bevy_macro_utils", "bit-set", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", "uuid", ] [[package]] name = "bevy_render" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee1e126226f0a4d439bf82fe07c1104f894a6a365888e3eba7356f9647e77a83" +checksum = "46e4b6a82c3a2be1c0d0cbecf62debb8251b72c0ae76285f66265aabc5bf2d37" dependencies = [ "anyhow", "async-channel", @@ -710,16 +775,18 @@ dependencies = [ "bevy_transform", "bevy_utils", "bevy_window", - "bitflags", + "bitflags 2.3.3", + "bytemuck", "codespan-reporting", "downcast-rs", "encase", "futures-lite", "hexasphere", "image", + "js-sys", "ktx2", "naga", - "once_cell", + "naga_oil", "parking_lot", "regex", "ruzstd", @@ -727,27 +794,29 @@ dependencies = [ "smallvec", "thiserror", "thread_local", + "wasm-bindgen", + "web-sys", "wgpu", "wgpu-hal", ] [[package]] name = "bevy_render_macros" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "652f8c4d9577c6e6a8b3dfd8a4ce331e8b6ecdbb99636a4b2701dec50104d6bc" +checksum = "07c4d937f966644f5e1e3c9157736acdd36286bcce06142ff9ad25cd71348c09" dependencies = [ "bevy_macro_utils", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] name = "bevy_scene" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1de59637d27726251091120ce6f63917328ffd60aaccbda4d65a615873aff631" +checksum = "cf1e00eb30e2053d9fff0802b2f557350b4e66bac58d531de30882048b4e3232" dependencies = [ "anyhow", "bevy_app", @@ -767,9 +836,9 @@ dependencies = [ [[package]] name = "bevy_sprite" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c110358fe3651a5796fd1c07989635680738f5b5c7e9b8a463dd50d12bb78410" +checksum = "03f64119444ef9788dcdd05012a60f0fa3b7ddb396d434ebcfc3edefd76c91b5" dependencies = [ "bevy_app", "bevy_asset", @@ -782,7 +851,7 @@ dependencies = [ "bevy_render", "bevy_transform", "bevy_utils", - "bitflags", + "bitflags 2.3.3", "bytemuck", "fixedbitset", "guillotiere", @@ -792,24 +861,23 @@ dependencies = [ [[package]] name = "bevy_tasks" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3de86364316e151aeb0897eaaa917c3ad5ee5ef1471a939023cf7f2d5ab76955" +checksum = "faab904296a3d6976bb8a12bc0f42f6c98fb6cd87a96244e0151d359f684ec2d" dependencies = [ "async-channel", "async-executor", "async-task", "concurrent-queue", "futures-lite", - "once_cell", "wasm-bindgen-futures", ] [[package]] name = "bevy_text" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "995188f59dc06da3fc951e1f58a105cde2c817d5330ae67ddc0a140f46482f6b" +checksum = "b52a19b3d0caf20acd1bdb47b6a00717accc834b46c4f204a63de15cea45ec4b" dependencies = [ "ab_glyph", "anyhow", @@ -830,9 +898,9 @@ dependencies = [ [[package]] name = "bevy_time" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3edbd605df1bced312eb9888d6be3d5a5fcac3d4140038bbe3233d218399eef" +checksum = "d09225ad2ffef14da000080143730b36ba225844ae479e4791cdb9d08066d06a" dependencies = [ "bevy_app", "bevy_ecs", @@ -844,9 +912,9 @@ dependencies = [ [[package]] name = "bevy_transform" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24383dfb97d8a14b17721ecfdf58556eff5ea9a4b2a3d91accf2b472783880b0" +checksum = "da8a0cd3780e120e20be333cc48d41cb74620d798dc61bc18eb2a82d3545e184" dependencies = [ "bevy_app", "bevy_ecs", @@ -857,9 +925,9 @@ dependencies = [ [[package]] name = "bevy_ui" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb597aeed4e1bf5e6913879c3e22a7d50a843b822a7f71a4a80ebdfdf79e68d4" +checksum = "bb85992eb5809936b3326940dc8d6e7b219af3dde1ecbca5948addd6a78694cc" dependencies = [ "bevy_a11y", "bevy_app", @@ -887,14 +955,14 @@ dependencies = [ [[package]] name = "bevy_utils" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a88ebbca55d360d72e9fe78df0d22e25cd419933c9559e79dae2757f7c4d066" +checksum = "10bfde141f0cdd15e07bca72f4439a9db80877c283738f581d061972ef483b1b" dependencies = [ - "ahash", + "ahash 0.8.3", "bevy_utils_proc_macros", "getrandom", - "hashbrown", + "hashbrown 0.14.0", "instant", "petgraph", "thiserror", @@ -904,20 +972,20 @@ dependencies = [ [[package]] name = "bevy_utils_proc_macros" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630b92e32fa5cd7917c7d4fdbf63a90af958b01e096239f71bc4f8f3cf40c0d2" +checksum = "9e37f2e885b0e8af59dc19871c313d3cf2a2495db35bb4d4ae0a61b3f87d5401" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] name = "bevy_window" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad31234754268fbe12050290b0496e2296252a16995a38f94bfb9680a4f09fda" +checksum = "0528832361e3d942df287c90537ef6fafb726c4934468a7c3a5d53d659bfbf54" dependencies = [ "bevy_app", "bevy_ecs", @@ -930,9 +998,9 @@ dependencies = [ [[package]] name = "bevy_winit" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf17bd6330f7e633b7c56754c776511a8f52cde4bf54c0278f34d7527548f253" +checksum = "24c6709dc70cfee1eb94d5f125d29612c4a9345dfc1a70dd3189af927b2fd503" dependencies = [ "accesskit_winit", "approx", @@ -943,10 +1011,10 @@ dependencies = [ "bevy_hierarchy", "bevy_input", "bevy_math", + "bevy_tasks", "bevy_utils", "bevy_window", "crossbeam-channel", - "once_cell", "raw-window-handle", "wasm-bindgen", "web-sys", @@ -959,7 +1027,7 @@ version = "0.64.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cexpr", "clang-sys", "lazy_static", @@ -994,6 +1062,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" + [[package]] name = "block" version = "0.1.6" @@ -1101,7 +1175,7 @@ checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" dependencies = [ "glob", "libc", - "libloading", + "libloading 0.7.4", ] [[package]] @@ -1161,6 +1235,21 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6051f239ecec86fde3410901ab7860d458d160371533842974fc61f96d15879b" +[[package]] +name = "const_soft_float" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ca1caa64ef4ed453e68bb3db612e51cf1b2f5b871337f0fcab1c8f87cc3dff" + +[[package]] +name = "constgebra" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd23e864550e6dafc1e41ac78ce4f1ccddc8672b40c403524a04ff3f0518420" +dependencies = [ + "const_soft_float", +] + [[package]] name = "core-foundation" version = "0.9.3" @@ -1189,7 +1278,7 @@ version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-graphics-types", "foreign-types", @@ -1202,7 +1291,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "foreign-types", "libc", @@ -1214,7 +1303,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb17e2d1795b1996419648915df94bc7103c28f7b48062d7acf4652fc371b2ff" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation-sys 0.6.2", "coreaudio-sys", ] @@ -1262,6 +1351,20 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2801af0d36612ae591caa9568261fddce32ce6e08a7275ea334a06a4ad021a2c" +dependencies = [ + "cfg-if", + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", +] + [[package]] name = "crossbeam-channel" version = "0.5.8" @@ -1272,6 +1375,40 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset", + "scopeguard", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.16" @@ -1287,8 +1424,8 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8f0de2f5a8e7bd4a9eec0e3c781992a4ce1724f68aec7d7a3715344de8b39da" dependencies = [ - "bitflags", - "libloading", + "bitflags 1.3.2", + "libloading 0.7.4", "winapi", ] @@ -1298,6 +1435,12 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c87e182de0887fd5361989c677c4e8f5000cd9491d6d563161a8f3a5519fc7f" +[[package]] +name = "data-encoding" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" + [[package]] name = "dispatch" version = "0.2.0" @@ -1310,11 +1453,17 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +[[package]] +name = "either" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" + [[package]] name = "encase" -version = "0.5.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6591f13a63571c4821802eb5b10fd1155b1290bce87086440003841c8c3909b" +checksum = "8fce2eeef77fd4a293a54b62aa00ac9daebfbcda4bf8998c5a815635b004aa1c" dependencies = [ "const_panic", "encase_derive", @@ -1324,22 +1473,22 @@ dependencies = [ [[package]] name = "encase_derive" -version = "0.5.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f1da6deed1f8b6f5909616ffa695f63a5de54d6a0f084fa715c70c8ed3abac9" +checksum = "0e520cde08cbf4f7cc097f61573ec06ce467019803de8ae82fb2823fa1554a0e" dependencies = [ "encase_derive_impl", ] [[package]] name = "encase_derive_impl" -version = "0.5.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae489d58959f3c4cdd1250866a05acfb341469affe4fced71aff3ba228be1693" +checksum = "3fe2568f851fd6144a45fa91cfed8fe5ca8fc0b56ba6797bfc1ed2771b90e37c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] @@ -1469,15 +1618,6 @@ dependencies = [ "waker-fn", ] -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "getrandom" version = "0.2.10" @@ -1532,9 +1672,9 @@ checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" [[package]] name = "glam" -version = "0.23.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e4afd9ad95555081e109fe1d21f2a30c691b5f0919c67dfa690a2e1eb6bd51c" +checksum = "42218cb640844e3872cc3c153dc975229e080a6c4733b34709ef445610550226" dependencies = [ "bytemuck", "serde", @@ -1610,7 +1750,7 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22beaafc29b38204457ea030f6fb7a84c9e4dd1b86e311ba0542533453d87f62" dependencies = [ - "bitflags", + "bitflags 1.3.2", "gpu-alloc-types", ] @@ -1620,7 +1760,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54804d0d6bc9d7f26db4eaec1ad10def69b599315f487d32c334a80d1efe67a5" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -1642,9 +1782,9 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b0c02e1ba0bdb14e965058ca34e09c020f8e507a760df1121728e0aef68d57a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "gpu-descriptor-types", - "hashbrown", + "hashbrown 0.12.3", ] [[package]] @@ -1653,7 +1793,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "363e3677e55ad168fef68cf9de3a4a310b53124c5e784c53a1d70e92d23f2126" dependencies = [ - "bitflags", + "bitflags 1.3.2", +] + +[[package]] +name = "grid" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0634107a3a005070dd73e27e74ecb691a94e9e5ba7829f434db7fbf73a6b5c47" +dependencies = [ + "no-std-compat", ] [[package]] @@ -1672,20 +1821,30 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash", + "ahash 0.7.6", +] + +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +dependencies = [ + "ahash 0.8.3", + "allocator-api2", "serde", ] [[package]] name = "hassle-rs" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90601c6189668c7345fc53842cb3f3a3d872203d523be1b3cb44a36a3e62fb85" +checksum = "1397650ee315e8891a0df210707f0fc61771b0cc518c3023896064c5407cb3b0" dependencies = [ - "bitflags", + "bitflags 1.3.2", "com-rs", "libc", - "libloading", + "libloading 0.7.4", "thiserror", "widestring", "winapi", @@ -1693,12 +1852,12 @@ dependencies = [ [[package]] name = "hexasphere" -version = "8.1.0" +version = "9.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd41d443f978bfa380a6dad58b62a08c43bcb960631f13e9d015b911eaf73588" +checksum = "7cb3df16a7bcb1b5bc092abd55e14f77ca70aea14445026e264586fc62889a10" dependencies = [ + "constgebra", "glam", - "once_cell", ] [[package]] @@ -1728,7 +1887,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", ] [[package]] @@ -1743,7 +1902,7 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" dependencies = [ - "bitflags", + "bitflags 1.3.2", "inotify-sys", "libc", ] @@ -1844,7 +2003,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" dependencies = [ "libc", - "libloading", + "libloading 0.7.4", "pkg-config", ] @@ -1864,7 +2023,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8367585489f01bc55dd27404dcf56b95e6da061a256a666ab23be9ba96a2e587" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libc", ] @@ -1874,7 +2033,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87d65e08a9ec02e409d27a0139eaa6b9756b4d81fe7cde71f6941a83730ce838" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -1916,6 +2075,22 @@ dependencies = [ "winapi", ] +[[package]] +name = "libloading" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d580318f95776505201b28cf98eb1fa5e4be3b689633ba6a3e6cd880ff22d8cb" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "libm" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" + [[package]] name = "libudev-sys" version = "0.1.4" @@ -1969,19 +2144,38 @@ dependencies = [ "regex-automata", ] +[[package]] +name = "matrixmultiply" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77" +dependencies = [ + "autocfg", + "rawpointer", +] + [[package]] name = "memchr" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + [[package]] name = "metal" version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de11355d1f6781482d027a3b4d4de7825dcedb197bf573e0596d00008402d060" dependencies = [ - "bitflags", + "bitflags 1.3.2", "block", "core-graphics-types", "foreign-types", @@ -2031,22 +2225,22 @@ name = "monologue-trees" version = "0.1.0" dependencies = [ "bevy", + "bevy_rapier3d", ] [[package]] name = "naga" -version = "0.11.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c3d4269bcb7d50121097702fde1afb75f4ea8083aeb7a55688dcf289a853271" +checksum = "bbcc2e0513220fd2b598e6068608d4462db20322c0e77e47f6f488dfcfc279cb" dependencies = [ "bit-set", - "bitflags", + "bitflags 1.3.2", "codespan-reporting", "hexf-parse", "indexmap", "log", "num-traits", - "petgraph", "pp-rs", "rustc-hash", "spirv", @@ -2055,13 +2249,61 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "naga_oil" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d9c27fc9c84580434af75123d13ad98d9a56e16d033b16dcfa6940728c8c225" +dependencies = [ + "bit-set", + "codespan-reporting", + "data-encoding", + "indexmap", + "naga", + "once_cell", + "regex", + "regex-syntax 0.6.29", + "rustc-hash", + "thiserror", + "tracing", + "unicode-ident", +] + +[[package]] +name = "nalgebra" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" +dependencies = [ + "approx", + "glam", + "matrixmultiply", + "nalgebra-macros", + "num-complex", + "num-rational", + "num-traits", + "simba", + "typenum", +] + +[[package]] +name = "nalgebra-macros" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "ndk" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" dependencies = [ - "bitflags", + "bitflags 1.3.2", "jni-sys", "ndk-sys", "num_enum", @@ -2090,7 +2332,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "libc", ] @@ -2101,12 +2343,18 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "libc", "static_assertions", ] +[[package]] +name = "no-std-compat" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" + [[package]] name = "nom" version = "7.1.3" @@ -2119,11 +2367,11 @@ dependencies = [ [[package]] name = "notify" -version = "5.2.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729f63e1ca555a43fe3efa4f3efdf4801c479da85b432242a7b726f353c88486" +checksum = "5738a2795d57ea20abec2d6d76c6081186709c0024187cd5977265eda6598b51" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crossbeam-channel", "filetime", "fsevent-sys", @@ -2154,6 +2402,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "num-complex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" +dependencies = [ + "num-traits", +] + [[package]] name = "num-derive" version = "0.3.3" @@ -2193,6 +2450,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -2308,6 +2566,12 @@ version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +[[package]] +name = "optional" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978aa494585d3ca4ad74929863093e87cac9790d81fe7aba2b3dc2890643a0fc" + [[package]] name = "orbclient" version = "0.3.45" @@ -2361,6 +2625,27 @@ dependencies = [ "windows-targets 0.48.0", ] +[[package]] +name = "parry3d" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b55dc0e6db79bddbc5fd583569f7356cdcc63e1e9b2b93a9ab70dd8e717160e0" +dependencies = [ + "approx", + "arrayvec", + "bitflags 1.3.2", + "downcast-rs", + "either", + "nalgebra", + "num-derive", + "num-traits", + "rustc-hash", + "simba", + "slab", + "smallvec", + "spade", +] + [[package]] name = "paste" version = "1.0.12" @@ -2407,7 +2692,7 @@ version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59871cc5b6cce7eaccca5a802b4173377a1c2ba90654246789a8fa2334426d11" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crc32fast", "fdeflate", "flate2", @@ -2469,12 +2754,38 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab" +[[package]] +name = "rapier3d" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62a8a0bd9d3135f7b4eb45d0796540e7bab47b6b7c974f90567ccc5a0454f42b" +dependencies = [ + "approx", + "arrayvec", + "bit-vec", + "bitflags 1.3.2", + "crossbeam", + "downcast-rs", + "nalgebra", + "num-derive", + "num-traits", + "parry3d", + "rustc-hash", + "simba", +] + [[package]] name = "raw-window-handle" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + [[package]] name = "rectangle-pack" version = "0.4.2" @@ -2487,7 +2798,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -2496,7 +2807,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -2533,9 +2844,15 @@ checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" [[package]] name = "renderdoc-sys" -version = "0.7.1" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216080ab382b992234dda86873c18d4c48358f5cfcb70fd693d7f6f2131b628b" + +[[package]] +name = "robust" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1382d1f0a252c4bf97dc20d979a2fdd05b024acd7c2ed0f7595d7817666a157" +checksum = "e5864e7ef1a6b7bcf1d6ca3f655e65e724ed3b52546a0d0a663c991522f552ea" [[package]] name = "rodio" @@ -2554,7 +2871,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "300a51053b1cb55c80b7a9fde4120726ddf25ca241a1cbb926626f62fb136bff" dependencies = [ "base64", - "bitflags", + "bitflags 1.3.2", "serde", ] @@ -2572,11 +2889,12 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "ruzstd" -version = "0.2.4" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cada0ef59efa6a5f4dc5e491f93d9f31e3fc7758df421ff1de8a706338e1100" +checksum = "ac3ffab8f9715a0d455df4bbb9d21e91135aab3cd3ca187af0cd0c3c3f868fdc" dependencies = [ "byteorder", + "thiserror-core", "twox-hash", ] @@ -2586,6 +2904,15 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +[[package]] +name = "safe_arch" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62a7484307bd40f8f7ccbacccac730108f2cae119a3b11c74485b48aa9ea650f" +dependencies = [ + "bytemuck", +] + [[package]] name = "same-file" version = "1.0.6" @@ -2647,6 +2974,19 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +[[package]] +name = "simba" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "061507c94fc6ab4ba1c9a0305018408e312e17c041eb63bef8aa726fa33aceae" +dependencies = [ + "approx", + "num-complex", + "num-traits", + "paste", + "wide", +] + [[package]] name = "simd-adler32" version = "0.3.5" @@ -2680,13 +3020,34 @@ dependencies = [ "serde", ] +[[package]] +name = "smol_str" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74212e6bbe9a4352329b2f68ba3130c15a3f26fe88ff22dbdc6cdd58fa85e99c" +dependencies = [ + "serde", +] + +[[package]] +name = "spade" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88e65803986868d2372c582007c39ba89936a36ea5f236bf7a7728dc258f04f9" +dependencies = [ + "num-traits", + "optional", + "robust", + "smallvec", +] + [[package]] name = "spirv" version = "0.2.0+1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830" dependencies = [ - "bitflags", + "bitflags 1.3.2", "num-traits", ] @@ -2726,9 +3087,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.28.4" +version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c2f3ca6693feb29a89724516f016488e9aafc7f37264f898593ee4b942f31b" +checksum = "751e810399bba86e9326f5762b7f32ac5a085542df78da6a78d94e07d14d7c11" dependencies = [ "cfg-if", "core-foundation-sys 0.8.4", @@ -2745,6 +3106,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3540ec65df399929a04a485feb50144475735920cc47eaf8eba09c70b1df4055" dependencies = [ "arrayvec", + "grid", "num-traits", "slotmap", ] @@ -2767,6 +3129,26 @@ dependencies = [ "thiserror-impl", ] +[[package]] +name = "thiserror-core" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d97345f6437bb2004cd58819d8a9ef8e36cdd7661c2abc4bbde0a7c40d9f497" +dependencies = [ + "thiserror-core-impl", +] + +[[package]] +name = "thiserror-core-impl" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10ac1c5050e43014d16b2f94d0d2ce79e65ffdd8b38d8048f9c8f6a8a6da62ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "thiserror-impl" version = "1.0.40" @@ -2909,6 +3291,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + [[package]] name = "unicode-ident" version = "1.0.9" @@ -3066,9 +3454,9 @@ dependencies = [ [[package]] name = "wgpu" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d745a1b6d91d85c33defbb29f0eee0450e1d2614d987e14bf6baf26009d132d7" +checksum = "8aa4361a426ff9f028520da01e8fda28ab9bdb029e2a76901f1f88317e2796e9" dependencies = [ "arrayvec", "cfg-if", @@ -3090,20 +3478,20 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "0.15.1" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7131408d940e335792645a98f03639573b0480e9e2e7cddbbab74f7c6d9f3fff" +checksum = "8f478237b4bf0d5b70a39898a66fa67ca3a007d79f2520485b8b0c3dfc46f8c2" dependencies = [ "arrayvec", "bit-vec", - "bitflags", + "bitflags 2.3.3", "codespan-reporting", - "fxhash", "log", "naga", "parking_lot", "profiling", "raw-window-handle", + "rustc-hash", "smallvec", "thiserror", "web-sys", @@ -3113,20 +3501,19 @@ dependencies = [ [[package]] name = "wgpu-hal" -version = "0.15.4" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdcf61a283adc744bb5453dd88ea91f3f86d5ca6b027661c6c73c7734ae0288b" +checksum = "1ecb3258078e936deee14fd4e0febe1cfe9bbb5ffef165cb60218d2ee5eb4448" dependencies = [ "android_system_properties", "arrayvec", "ash", "bit-set", - "bitflags", + "bitflags 2.3.3", "block", "core-graphics-types", "d3d12", "foreign-types", - "fxhash", "glow", "gpu-alloc", "gpu-allocator", @@ -3135,7 +3522,7 @@ dependencies = [ "js-sys", "khronos-egl", "libc", - "libloading", + "libloading 0.8.0", "log", "metal", "naga", @@ -3145,6 +3532,7 @@ dependencies = [ "range-alloc", "raw-window-handle", "renderdoc-sys", + "rustc-hash", "smallvec", "thiserror", "wasm-bindgen", @@ -3155,20 +3543,30 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "0.15.2" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32444e121b0bd00cb02c0de32fde457a9491bd44e03e7a5db6df9b1da2f6f110" +checksum = "d0c153280bb108c2979eb5c7391cb18c56642dd3c072e55f52065e13e2a1252a" dependencies = [ - "bitflags", + "bitflags 2.3.3", "js-sys", "web-sys", ] +[[package]] +name = "wide" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40018623e2dba2602a9790faba8d33f2ebdebf4b86561b83928db735f8784728" +dependencies = [ + "bytemuck", + "safe_arch", +] + [[package]] name = "widestring" -version = "0.5.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983" +checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" [[package]] name = "winapi" @@ -3391,7 +3789,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "866db3f712fffba75d31bf0cdecf357c8aeafd158c5b7ab51dba2a2b2d47f196" dependencies = [ "android-activity", - "bitflags", + "bitflags 1.3.2", "cfg_aliases", "core-foundation", "core-graphics", diff --git a/Cargo.toml b/Cargo.toml index 3be8878..8bdafb8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,4 +29,13 @@ path = "bin/debug-info.rs" [dependencies] -bevy = "0.10" +bevy = "0.11" +bevy_rapier3d = "*" + +# From rapier docs +[profile.dev.package.bevy_rapier3d] +opt-level = 3 + +# From rapier docs +[profile.release] +codegen-units = 1 diff --git a/assets/fonts/BOUNCY GUM.otf b/assets/fonts/BOUNCY GUM.otf deleted file mode 100644 index cf62ac9..0000000 Binary files a/assets/fonts/BOUNCY GUM.otf and /dev/null differ diff --git a/assets/fonts/BOUNCY GUM.ttf b/assets/fonts/BOUNCY GUM.ttf new file mode 100644 index 0000000..08cd35e Binary files /dev/null and b/assets/fonts/BOUNCY GUM.ttf differ diff --git a/assets/fonts/Death Spirit.otf b/assets/fonts/Death Spirit.otf deleted file mode 100644 index ef34465..0000000 Binary files a/assets/fonts/Death Spirit.otf and /dev/null differ diff --git a/assets/fonts/Death Spirit.ttf b/assets/fonts/Death Spirit.ttf new file mode 100644 index 0000000..df0f1ef Binary files /dev/null and b/assets/fonts/Death Spirit.ttf differ diff --git a/assets/fonts/Roseblue.ttf b/assets/fonts/Roseblue.ttf new file mode 100644 index 0000000..d3cc306 Binary files /dev/null and b/assets/fonts/Roseblue.ttf differ diff --git a/bin/TODO.txt b/bin/TODO.txt new file mode 100644 index 0000000..f4b53b6 --- /dev/null +++ b/bin/TODO.txt @@ -0,0 +1,7 @@ +- [x] basic gltf inspector + - [x] with animation previews + - [ ] inspect specific models +- [x] basic text inspector + - [x] with simple text animation +- [ ] audio inspector +- [x] debug info (FPS) diff --git a/bin/gltf-inspect.rs b/bin/gltf-inspect.rs index 2b268e6..1ed2563 100644 --- a/bin/gltf-inspect.rs +++ b/bin/gltf-inspect.rs @@ -1,6 +1,6 @@ use bevy::{ core_pipeline::clear_color::ClearColorConfig, - gltf::Gltf, + gltf::{Gltf, GltfNode}, input::{ keyboard::KeyboardInput, mouse::{MouseMotion, MouseWheel}, @@ -13,32 +13,47 @@ use bevy::{ render_resource::{ Extent3d, TextureDescriptor, TextureDimension, TextureFormat, TextureUsages, }, + view::VisibleEntities, }, - utils::HashSet, + window::PrimaryWindow, }; +use bevy_rapier3d::{prelude::*, rapier::prelude::RigidBodyType}; +use monologue_trees::{debug::*, text::*}; fn main() { App::new() - .add_plugins(DefaultPlugins.set(WindowPlugin { - primary_window: Some(Window { - title: "GLTF Inspector".into(), - resolution: (640., 480.).into(), + .add_plugins(( + DefaultPlugins.set(WindowPlugin { + primary_window: Some(Window { + title: "GLTF Inspector".into(), + resolution: (640., 480.).into(), + ..default() + }), ..default() }), - ..default() - })) + DebugInfoPlugin, + RapierPhysicsPlugin::::default(), + RapierDebugRenderPlugin::default(), + )) .add_event::() - .add_startup_system(load_models) - .add_startup_system(spawn_base_scene) - .add_startup_system(spawn_base_ui) - .add_system(spawn_models) - .add_system(spawn_ui) - .add_system(control_animation) - .add_system(rotate_model) - .add_system(zoom_model) - .add_system(scroll) - .add_system(select) - .add_system(manage_active) + .add_event::() + .add_systems(PreStartup, load_models) + .add_systems(Startup, (spawn_base_scene, spawn_base_ui)) + .add_systems( + Update, + ( + spawn_models, + spawn_ui, + control_animation, + rotate_model, + zoom_model, + scroll, + select, + manage_active, + inspect_nodes, + selection, + ), + ) .run(); } @@ -74,9 +89,17 @@ struct Active; /// /// Event for managing which entities are tagged "Active" -#[derive(Debug)] +#[derive(Event, Debug)] struct ManageActive(Option); +/// +/// Event for tracking which entities are selected +#[derive(Event, Debug)] +enum Selected { + Hovered(Entity), + Selected(Entity), +} + /// /// Load all GLTF models on startup fn load_models(mut commands: Commands, ass: Res) { @@ -110,8 +133,9 @@ fn spawn_base_ui(mut commands: Commands) { NodeBundle { style: Style { justify_content: JustifyContent::Center, - size: Size::all(Val::Percent(90.0)), - overflow: Overflow::Hidden, + width: Val::Percent(90.0), + height: Val::Percent(90.0), + overflow: Overflow::clip(), ..default() }, ..default() @@ -125,8 +149,8 @@ fn spawn_base_ui(mut commands: Commands) { flex_wrap: FlexWrap::Wrap, flex_direction: FlexDirection::Row, justify_content: JustifyContent::SpaceAround, - size: Size::AUTO, - max_size: Size::UNDEFINED, + width: Val::Auto, + height: Val::Auto, ..default() }, ..default() @@ -271,6 +295,8 @@ fn spawn_models( scene: handle.clone(), ..default() }, + RigidBody::KinematicPositionBased, + Collider::cylinder(1.0, 1.0), Inspect, )); }); @@ -306,7 +332,8 @@ fn spawn_ui( .with_children(|parent| { parent.spawn(ImageBundle { style: Style { - size: Size::all(Val::Px(256.0)), + width: Val::Px(256.0), + height: Val::Px(256.0), padding: UiRect::all(Val::Px(5.0)), ..default() }, @@ -322,6 +349,15 @@ fn spawn_ui( } } +fn inspect_nodes(gltfs: Res>, nodes: Res>, mut done: Local) { + if !(*done) { + for gltf in gltfs.iter() { + // info!("Gltf {:#?}", gltf); + *done = true; + } + } +} + fn control_animation( mut key_evr: EventReader, mut active_evr: EventReader, @@ -425,7 +461,7 @@ fn zoom_model( mut wheel_evr: EventReader, mut transforms: Query<&mut Transform, (With, With, Without)>, ) { - if keys.pressed(KeyCode::LShift) { + if keys.pressed(KeyCode::ShiftLeft) { for ev in wheel_evr.iter() { for mut transform in transforms.iter_mut() { let scale = (Vec3::ONE * ev.y) / 100.0; @@ -444,7 +480,7 @@ fn scroll( // Only scroll if scene not selected if active.is_empty() { for mut s in query.iter_mut() { - s.position.top = match s.position.top { + s.top = match s.top { Val::Px(current) => Val::Px(current + (ev.y * 5.0)), _ => Val::Px(0.0), }; @@ -471,7 +507,7 @@ fn select( mut events: EventWriter, ) { for (interaction, selected_preview) in query.iter() { - if interaction == &Interaction::Clicked { + if interaction == &Interaction::Pressed { // Hide UI let mut ui_vis = selection_ui.single_mut(); *ui_vis = Visibility::Hidden; @@ -537,25 +573,23 @@ fn manage_active( mut events: EventReader, query: Query<&Children>, current: Query>, + names: Query<&Name>, ) { - for event in events.iter() { - info!("Setting active: {:?}", event); - match event { - ManageActive(None) => { + for ManageActive(inner) in events.iter() { + info!("Setting active: {:?}", inner); + match inner { + None => { for entity in current.iter() { if let Some(mut entity_commands) = commands.get_entity(entity) { entity_commands.remove::(); + entity_commands.remove::(); } } } - ManageActive(Some(entity)) => { + Some(entity) => { for child in query.iter_descendants(*entity) { if let Some(mut child_commands) = commands.get_entity(child) { - // info!( - // "Active entity components: {:?} {:?}", - // child, - // names.get(child) - // ); + // info!("Name: {:?}", names.get(child)); // child_commands.log_components(); child_commands.insert(Active); } @@ -564,3 +598,36 @@ fn manage_active( } } } + +fn selection( + mut commands: Commands, + windows: Query<&Window, With>, + mut mouse_events: EventReader, + camera_q: Query<(&Camera, &GlobalTransform, &VisibleEntities), With>, + rapier_context: Res, +) { + if !mouse_events.is_empty() { + let window = windows.single(); + for _ in mouse_events.iter() { + if let Some(cursor) = window.cursor_position() { + for (camera, camera_t, visible_entities) in camera_q.iter() { + if let Some(ray) = camera.viewport_to_world(camera_t, cursor) { + if let Some((entity, toi)) = rapier_context.cast_ray( + ray.origin, + ray.direction, + f32::MAX, + true, + QueryFilter::new() + .predicate(&|entity| visible_entities.entities.contains(&entity)), + ) { + if let Some(mut cmds) = commands.get_entity(entity) { + info!("hit! ({:?}@{})", entity, toi); + cmds.insert(ColliderDebugColor(Color::BLUE)); + } + } + } + } + } + } + } +} diff --git a/bin/text-inspect.rs b/bin/text-inspect.rs index 40bc4f1..5278a11 100644 --- a/bin/text-inspect.rs +++ b/bin/text-inspect.rs @@ -1,5 +1,3 @@ -use std::time::Duration; - use bevy::prelude::*; use monologue_trees::{debug::*, text::*}; @@ -14,23 +12,30 @@ const LOREM: [&str; 5] = [ fn main() { App::new() - .add_plugins(DefaultPlugins.set(WindowPlugin { - primary_window: Some(Window { - title: "Text Inspect".into(), - resolution: (640., 480.).into(), + .add_plugins(( + DefaultPlugins.set(WindowPlugin { + primary_window: Some(Window { + title: "Text Inspect".into(), + resolution: (640., 480.).into(), + ..default() + }), ..default() }), - ..default() - })) - .add_plugin(DebugInfoPlugin) - .add_plugin(AnimatedTextPlugin) - .add_startup_system(load_fonts) - .add_startup_system(init_ui) - .add_system(manage_buttons) - .add_system(manage_animation_button) - .add_system(manage_fonts) - .add_system(mouse_cursor) - .add_system(manage_animation) + DebugInfoPlugin, + AnimatedTextPlugin, + )) + .add_systems(PreStartup, load_fonts) + .add_systems(Startup, init_ui) + .add_systems( + Update, + ( + manage_buttons, + manage_animation_button, + manage_fonts, + mouse_cursor, + manage_animation, + ), + ) .run(); } @@ -65,7 +70,8 @@ fn init_ui(mut commands: Commands) { commands .spawn(NodeBundle { style: Style { - size: Size::all(Val::Percent(100.0)), + width: Val::Percent(100.0), + height: Val::Percent(100.0), ..default() }, background_color: BackgroundColor(Color::BLACK), @@ -77,10 +83,7 @@ fn init_ui(mut commands: Commands) { style: Style { flex_direction: FlexDirection::Column, align_items: AlignItems::Center, - size: Size { - width: Val::Px(200.0), - height: Val::Undefined, - }, + width: Val::Px(200.0), align_content: AlignContent::SpaceEvenly, ..default() }, @@ -108,10 +111,7 @@ fn init_ui(mut commands: Commands) { ..default() }, style: Style { - size: Size { - width: Val::Px(400.0), - ..default() - }, + width: Val::Px(400.0), ..default() }, ..default() @@ -127,15 +127,9 @@ fn init_ui(mut commands: Commands) { style: Style { align_self: AlignSelf::FlexEnd, position_type: PositionType::Absolute, - position: UiRect { - bottom: Val::Px(5.0), - left: Val::Px(5.0), - ..default() - }, - size: Size { - width: Val::Px(200.0), - ..default() - }, + bottom: Val::Px(5.0), + left: Val::Px(5.0), + width: Val::Px(200.0), ..default() }, background_color: BackgroundColor(Color::default().with_a(0.0)), @@ -187,8 +181,8 @@ fn manage_buttons( .split("/") .last() .expect("Extracting filename") - .strip_suffix(".otf") - .expect("Stripping prefix"); + .trim_end_matches(".otf") + .trim_end_matches(".ttf"); let style = TextStyle { font: font.clone(), @@ -226,7 +220,7 @@ fn manage_fonts( ) { for (i, f) in interaction.iter() { match (i, f) { - (Interaction::Clicked, FontButton(font)) => { + (Interaction::Pressed, FontButton(font)) => { texts.single_mut().sections.iter_mut().for_each(|section| { section.style.font = font.clone(); }); @@ -242,7 +236,7 @@ fn manage_animation_button( ) { for (i, f) in interaction.iter() { match (i, f) { - (Interaction::Clicked, FontButton(font)) => { + (Interaction::Pressed, FontButton(font)) => { animation_button .single_mut() .sections @@ -262,7 +256,7 @@ fn mouse_cursor( let mut window = windows.single_mut(); window.cursor.icon = match interaction { - Interaction::Hovered | Interaction::Clicked => CursorIcon::Hand, + Interaction::Hovered | Interaction::Pressed => CursorIcon::Hand, Interaction::None => CursorIcon::Arrow, } } @@ -270,15 +264,17 @@ fn mouse_cursor( fn manage_animation( mut animated_texts: Query<&mut AnimatedText, With>, - interactions: Query<&Interaction, (Changed, With)>, + interactions: Query<&Interaction, (Changed, With)>, ) { for interaction in interactions.iter() { match interaction { - Interaction::Clicked => { - let mut preview = animated_texts + Interaction::Pressed => { + info!("toggling animation"); + + let mut anim = animated_texts .get_single_mut() .expect("Loading animated text"); - preview.play(); + anim.toggle(); } _ => (), } diff --git a/src/debug.rs b/src/debug.rs index 524d486..15bf163 100644 --- a/src/debug.rs +++ b/src/debug.rs @@ -10,9 +10,8 @@ pub struct DebugInfoPlugin; impl Plugin for DebugInfoPlugin { fn build(&self, app: &mut App) { - app.add_startup_system(init) - .add_system(toggle) - .add_system(update); + app.add_systems(Startup, init) + .add_systems(Update, (toggle, update)); } } @@ -34,11 +33,8 @@ fn init(mut commands: Commands, server: Res) { visibility: Visibility::Hidden, style: Style { position_type: PositionType::Absolute, - position: UiRect { - top: Val::Px(0.0), - left: Val::Px(0.0), - ..default() - }, + top: Val::Px(0.0), + left: Val::Px(0.0), ..default() }, background_color: BackgroundColor(Color::GRAY), diff --git a/src/text.rs b/src/text.rs index baeea7a..67b5221 100644 --- a/src/text.rs +++ b/src/text.rs @@ -17,7 +17,7 @@ pub struct AnimatedTextPlugin; impl Plugin for AnimatedTextPlugin { fn build(&self, app: &mut App) { - app.add_system(manage_texts).add_system(animate_texts); + app.add_systems(Update, (manage_texts, animate_texts)); } } @@ -59,6 +59,14 @@ impl AnimatedText { self.animation_status = TextAnimationStatus::Stopped; self.animation_duration = None; } + + pub fn toggle(&mut self) { + use TextAnimationStatus::*; + self.animation_status = match self.animation_status { + Playing => Stopped, + Stopped => Playing, + } + } } #[derive(Debug)] @@ -68,9 +76,9 @@ pub enum TextAnimationType { #[derive(Default, Debug)] enum TextAnimationStatus { + Playing, #[default] Stopped, - Playing, } /// Manage individual text entities @@ -121,22 +129,41 @@ fn animate_texts(mut query: Query<(&mut Text, &mut AnimatedText)>, time: Res { animated_text.animation_duration = match animated_text.animation_duration { None | Some(Duration::ZERO) => { + // Set sections to alpha 0 before animation begins + text.sections.iter_mut().for_each(|section| { + section.style.color.set_a(0.0); + }); // We have just (re)started the animation, so set the duration to full Some(Duration::from_secs_f32(seconds)) } // FIXME: Why can't mutate inner on animation_duration? Some(inner) => { { - let percentage = 1.0 - (inner.as_secs_f32()) - seconds; - - let len_total = text - .sections - .iter() - .fold(0, |acc, curr| acc + curr.value.len()); - + // how far into the animation are we? + let percentage = 1.0 - (inner.as_secs_f32() / seconds); + + // Find the total number of characters to be processed + // let len_total = text + // .sections + // .iter() + // .fold(0, |acc, curr| acc + curr.value.len()); + // Backup version: + let len_total = text.sections.len(); + + // Find the farthest character into the string to show let target = (len_total as f32 * percentage) as usize; - for mut section in text.sections.iter_mut() {} + // Assign all segments an alpha of 0 or 1. + // TODO: Incremental updates only: Start at target, work backward + // until you get to one with alpha 1 and then break + text.sections + .iter_mut() + .take(target) + .rev() + .take_while(|section| section.style.color.a() != 1.0) + .for_each(|section| { + section.style.color.set_a(1.0); + }); } // We are continuing the animation, so decrement the remaining duration @@ -148,51 +175,3 @@ fn animate_texts(mut query: Query<(&mut Text, &mut AnimatedText)>, time: Res Duration::ZERO { -// *duration = duration.saturating_sub(time.delta()); -// -// let percentage = 1.0 - (duration.as_secs_f32() / 30.0); -// -// let mut text = texts.single_mut(); -// -// let len_total = desired.iter().fold(0, |acc, curr| acc + curr.len()); -// let mut len_total = ((len_total as f32 * percentage) as usize).min(len_total as usize); -// -// for (section, desired) in text.sections.iter_mut().zip(desired.iter()) { -// // This section is empty, initialize with capacity -// if len_total == 0 { -// break; -// -// // Total amount of remaining text is greater than this section -// // Set this text block to the full section -// } else if len_total >= desirted.len() { -// // info!("len_total >= desired.len()"); -// len_total -= desired.len(); -// if section.value.len() != desired.len() { -// // info!("value != desired"); -// section.value = desired.clone(); -// } -// -// // Total remaining text is less than this section -// // Set to a sub-string of text -// } else if len_total < desired.len() { -// // info!("len total < desired len"); -// // Difference between current value and desired length -// let diff = desired -// .split_at(section.value.len()) -// .1 -// .split_at(len_total - section.value.len()) -// .0 -// .into(); -// // info!("adding value {}", diff); -// section.value.push_str(diff); -// len_total = 0; -// -// // Undefined behavior -// } else { -// info!("Unexpected text animation situation"); -// } -// } -// } diff --git a/tmp b/tmp new file mode 100644 index 0000000..9d2c2b2 --- /dev/null +++ b/tmp @@ -0,0 +1,14 @@ + if *duration > Duration::ZERO { + let mut text = texts.single_mut(); + let total_sections = text.sections.len(); + + *duration = duration.saturating_sub(time.delta()); + + for (idx, section) in text.sections.iter_mut().enumerate() { + let ratio = ((idx + 1) as f32) / (total_sections as f32); + let cursor = 1.0 - ((*duration).as_secs_f32() / 30.0); + let alpha = if cursor > ratio { 1.0 } else { 0.0 }; + section.style.color.set_a(alpha); + } + } +