From 78a0d12ef82ae087a6cac256ea1c4362fdbc3dae Mon Sep 17 00:00:00 2001 From: Peter Hayman Date: Mon, 14 Oct 2024 18:11:53 +1100 Subject: [PATCH] feat: ik solver --- Cargo.lock | 2037 +++-------------- Cargo.toml | 18 +- .../src/components/follow_cursor.rs | 63 +- .../src/scenes/spatial/inverse_kinematics.rs | 91 + .../beet_examples/src/scenes/spatial/mod.rs | 3 + .../src/scenes/spatial/seek_3d.rs | 14 +- .../src/inverse_kinematics/ik_2dof.rs | 154 ++ .../inverse_kinematics/ik_2dof_transforms.rs | 83 + .../src/inverse_kinematics/ik_plugin.rs | 11 + .../src/inverse_kinematics/ik_segment.rs | 54 + .../src/inverse_kinematics/mod.rs | 12 + crates/beet_spatial/src/lib.rs | 6 +- .../beet_spatial/src/plugins/beet_plugins.rs | 3 +- examples/inverse_kinematics.rs | 14 + justfile | 2 +- 15 files changed, 874 insertions(+), 1691 deletions(-) create mode 100644 crates/beet_examples/src/scenes/spatial/inverse_kinematics.rs create mode 100644 crates/beet_spatial/src/inverse_kinematics/ik_2dof.rs create mode 100644 crates/beet_spatial/src/inverse_kinematics/ik_2dof_transforms.rs create mode 100644 crates/beet_spatial/src/inverse_kinematics/ik_plugin.rs create mode 100644 crates/beet_spatial/src/inverse_kinematics/ik_segment.rs create mode 100644 crates/beet_spatial/src/inverse_kinematics/mod.rs create mode 100644 examples/inverse_kinematics.rs diff --git a/Cargo.lock b/Cargo.lock index cfb2bcd6..9af7293d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,131 +2,59 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "ab_glyph" -version = "0.2.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3672c180e71eeaaac3a541fbbc5f5ad4def8b747c595ad30d674e43049f7b0" -dependencies = [ - "ab_glyph_rasterizer", - "owned_ttf_parser", -] - -[[package]] -name = "ab_glyph_rasterizer" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" - -[[package]] -name = "accesskit" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cf780eb737f2d4a49ffbd512324d53ad089070f813f7be7f99dbd5123a7f448" - [[package]] name = "accesskit" version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99b76d84ee70e30a4a7e39ab9018e2b17a6a09e31084176cc7c0b2dec036ba45" -[[package]] -name = "accesskit_consumer" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdfa1638ddd6eb9c752def95568df8b3ad832df252e9156d2eb783b201ca8a9" -dependencies = [ - "accesskit 0.14.0", - "immutable-chunkmap", -] - [[package]] name = "accesskit_consumer" version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a12dc159d52233c43d9fe5415969433cbdd52c3d6e0df51bda7d447427b9986" dependencies = [ - "accesskit 0.16.3", + "accesskit", "immutable-chunkmap", ] -[[package]] -name = "accesskit_macos" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c236a84ff1111defc280cee755eaa953d0b24398786851b9d28322c6d3bb1ebd" -dependencies = [ - "accesskit 0.14.0", - "accesskit_consumer 0.22.0", - "objc2", - "objc2-app-kit", - "objc2-foundation", - "once_cell", -] - [[package]] name = "accesskit_macos" version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49509c722e8da39e6c569f7d13ec51620208988913e738abbc67e3c65f06e6d5" dependencies = [ - "accesskit 0.16.3", - "accesskit_consumer 0.24.3", + "accesskit", + "accesskit_consumer", "objc2", "objc2-app-kit", "objc2-foundation", "once_cell", ] -[[package]] -name = "accesskit_windows" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d7f43d24b16b3e76bef248124fbfd2493c3a9860edb5aae1010c890e826de5e" -dependencies = [ - "accesskit 0.14.0", - "accesskit_consumer 0.22.0", - "paste", - "static_assertions", - "windows 0.54.0", -] - [[package]] name = "accesskit_windows" version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "974e96c347384d9133427167fb8a58c340cb0496988dacceebdc1ed27071023b" dependencies = [ - "accesskit 0.16.3", - "accesskit_consumer 0.24.3", + "accesskit", + "accesskit_consumer", "paste", "static_assertions", "windows 0.58.0", "windows-core 0.58.0", ] -[[package]] -name = "accesskit_winit" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "755535e6bf711a42dac28b888b884b10fc00ff4010d9d3bd871c5f5beae5aa78" -dependencies = [ - "accesskit 0.14.0", - "accesskit_macos 0.15.0", - "accesskit_windows 0.20.0", - "raw-window-handle", - "winit", -] - [[package]] name = "accesskit_winit" version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9987e852fe7e4e5a493f8c8af0b729b47da2750f0dea10a4c8984fe1117ebaec" dependencies = [ - "accesskit 0.16.3", - "accesskit_macos 0.17.3", - "accesskit_windows 0.23.2", + "accesskit", + "accesskit_macos", + "accesskit_windows", "raw-window-handle", "winit", ] @@ -330,15 +258,6 @@ 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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" -dependencies = [ - "libloading 0.7.4", -] - [[package]] name = "ash" version = "0.38.0+1.3.281" @@ -554,7 +473,7 @@ dependencies = [ "beet_ml", "beet_spatial", "beetmash", - "bevy 0.14.2", + "bevy", "console_log", "forky 0.2.0-rc.6", "log", @@ -575,7 +494,7 @@ dependencies = [ "beet_ml", "beet_spatial", "beetmash", - "bevy 0.14.2", + "bevy", "forky 0.2.0-rc.6", "log", "pretty_env_logger", @@ -589,7 +508,7 @@ dependencies = [ "anyhow", "beet_flow_macros", "beetmash", - "bevy 0.14.2", + "bevy", "extend", "heck 0.4.1", "log", @@ -622,7 +541,7 @@ dependencies = [ "beet_flow", "beet_spatial", "beetmash", - "bevy 0.14.2", + "bevy", "candle-core", "candle-nn", "candle-transformers", @@ -656,7 +575,7 @@ dependencies = [ "anyhow", "beet_flow", "beetmash", - "bevy 0.14.2", + "bevy", "forky 0.2.0-rc.6", "log", "pretty_env_logger", @@ -682,7 +601,7 @@ dependencies = [ "anyhow", "beetmash_net", "beetmash_scene", - "bevy 0.15.0-dev", + "bevy", "extend", "forky 0.2.0-rc.6", "log", @@ -695,7 +614,7 @@ name = "beetmash_net" version = "0.0.6-rc.7" dependencies = [ "anyhow", - "bevy 0.15.0-dev", + "bevy", "bincode", "extend", "flume", @@ -717,8 +636,8 @@ name = "beetmash_scene" version = "0.0.6-rc.7" dependencies = [ "anyhow", - "bevy 0.15.0-dev", - "bevy_reflect 0.15.0-dev", + "bevy", + "bevy_reflect", "extend", "forky 0.2.0-rc.6", "log", @@ -728,33 +647,12 @@ dependencies = [ "ts-rs", ] -[[package]] -name = "bevy" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043c9ad4b6fc4ca52d779873a8ca792a4e37842d07fce95363c9e17e36a1d8a0" -dependencies = [ - "bevy_internal 0.14.2", -] - [[package]] name = "bevy" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_internal 0.15.0-dev", -] - -[[package]] -name = "bevy_a11y" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a976cb539d6a5a3ff579cdb78187a6bcfbffa7e8224ea28f23d8b983d9389" -dependencies = [ - "accesskit 0.14.0", - "bevy_app 0.14.2", - "bevy_derive 0.14.2", - "bevy_ecs 0.14.2", + "bevy_internal", ] [[package]] @@ -762,41 +660,11 @@ name = "bevy_a11y" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "accesskit 0.16.3", - "bevy_app 0.15.0-dev", - "bevy_derive 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_reflect 0.15.0-dev", -] - -[[package]] -name = "bevy_animation" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93aef7d21a0342c24b05059493aa31d58f1798d34a2236569a8789b74df5a475" -dependencies = [ - "bevy_app 0.14.2", - "bevy_asset 0.14.2", - "bevy_color 0.14.3", - "bevy_core 0.14.2", - "bevy_derive 0.14.2", - "bevy_ecs 0.14.2", - "bevy_hierarchy 0.14.2", - "bevy_log 0.14.2", - "bevy_math 0.14.2", - "bevy_reflect 0.14.2", - "bevy_render 0.14.2", - "bevy_time 0.14.2", - "bevy_transform 0.14.2", - "bevy_utils 0.14.2", - "blake3", - "fixedbitset 0.5.7", - "petgraph", - "ron", - "serde", - "thiserror", - "thread_local", - "uuid", + "accesskit", + "bevy_app", + "bevy_derive", + "bevy_ecs", + "bevy_reflect", ] [[package]] @@ -805,20 +673,20 @@ version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ "bevy_animation_derive", - "bevy_app 0.15.0-dev", - "bevy_asset 0.15.0-dev", - "bevy_color 0.15.0-dev", - "bevy_core 0.15.0-dev", - "bevy_derive 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_hierarchy 0.15.0-dev", - "bevy_log 0.15.0-dev", - "bevy_math 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_render 0.15.0-dev", - "bevy_time 0.15.0-dev", - "bevy_transform 0.15.0-dev", - "bevy_utils 0.15.0-dev", + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_core", + "bevy_derive", + "bevy_ecs", + "bevy_hierarchy", + "bevy_log", + "bevy_math", + "bevy_reflect", + "bevy_render", + "bevy_time", + "bevy_transform", + "bevy_utils", "blake3", "petgraph", "ron", @@ -834,40 +702,22 @@ name = "bevy_animation_derive" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_macro_utils 0.15.0-dev", + "bevy_macro_utils", "proc-macro2", "quote", "syn 2.0.79", ] -[[package]] -name = "bevy_app" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5361d0f8a8677a5d0102cfe7321a7ecd2a8b9a4f887ce0dde1059311cf9cd42" -dependencies = [ - "bevy_derive 0.14.2", - "bevy_ecs 0.14.2", - "bevy_reflect 0.14.2", - "bevy_tasks 0.14.2", - "bevy_utils 0.14.2", - "console_error_panic_hook", - "downcast-rs", - "thiserror", - "wasm-bindgen", - "web-sys", -] - [[package]] name = "bevy_app" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_derive 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_tasks 0.15.0-dev", - "bevy_utils 0.15.0-dev", + "bevy_derive", + "bevy_ecs", + "bevy_reflect", + "bevy_tasks", + "bevy_utils", "console_error_panic_hook", "ctrlc", "downcast-rs", @@ -876,38 +726,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "bevy_asset" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60ec5ea257e1ebd3d411f669e29acf60beb715bebc7e1f374c17f49cd3aad46c" -dependencies = [ - "async-broadcast", - "async-fs", - "async-lock", - "bevy_app 0.14.2", - "bevy_asset_macros 0.14.2", - "bevy_ecs 0.14.2", - "bevy_reflect 0.14.2", - "bevy_tasks 0.14.2", - "bevy_utils 0.14.2", - "bevy_winit 0.14.2", - "blake3", - "crossbeam-channel", - "downcast-rs", - "futures-io", - "futures-lite", - "js-sys", - "parking_lot", - "ron", - "serde", - "thiserror", - "uuid", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "bevy_asset" version = "0.15.0-dev" @@ -917,13 +735,13 @@ dependencies = [ "async-fs", "async-lock", "atomicow", - "bevy_app 0.15.0-dev", - "bevy_asset_macros 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_tasks 0.15.0-dev", - "bevy_utils 0.15.0-dev", - "bevy_window 0.15.0-dev", + "bevy_app", + "bevy_asset_macros", + "bevy_ecs", + "bevy_reflect", + "bevy_tasks", + "bevy_utils", + "bevy_window", "bitflags 2.6.0", "blake3", "crossbeam-channel", @@ -944,79 +762,33 @@ dependencies = [ "web-sys", ] -[[package]] -name = "bevy_asset_macros" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9eb05ce838d282f09d83380b4d6432aec7519d421dee8c75cc20e6148237e6e" -dependencies = [ - "bevy_macro_utils 0.14.2", - "proc-macro2", - "quote", - "syn 2.0.79", -] - [[package]] name = "bevy_asset_macros" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_macro_utils 0.15.0-dev", + "bevy_macro_utils", "proc-macro2", "quote", "syn 2.0.79", ] -[[package]] -name = "bevy_audio" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee31312a0e67f288fe12a1d9aa679dd0ba8a49e1e6fe5fcd2ba1aa1ea34e5ed" -dependencies = [ - "bevy_app 0.14.2", - "bevy_asset 0.14.2", - "bevy_derive 0.14.2", - "bevy_ecs 0.14.2", - "bevy_hierarchy 0.14.2", - "bevy_math 0.14.2", - "bevy_reflect 0.14.2", - "bevy_transform 0.14.2", - "bevy_utils 0.14.2", - "cpal", - "rodio 0.18.1", -] - [[package]] name = "bevy_audio" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_app 0.15.0-dev", - "bevy_asset 0.15.0-dev", - "bevy_derive 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_hierarchy 0.15.0-dev", - "bevy_math 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_transform 0.15.0-dev", - "bevy_utils 0.15.0-dev", + "bevy_app", + "bevy_asset", + "bevy_derive", + "bevy_ecs", + "bevy_hierarchy", + "bevy_math", + "bevy_reflect", + "bevy_transform", + "bevy_utils", "cpal", - "rodio 0.19.0", -] - -[[package]] -name = "bevy_color" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04842e9d38a93f0c75ab46f7f404ea24ef57ad83dbd159e5b4b35318b02257bb" -dependencies = [ - "bevy_math 0.14.2", - "bevy_reflect 0.14.2", - "bytemuck", - "encase 0.8.0", - "serde", - "thiserror", - "wgpu-types 0.20.0", + "rodio", ] [[package]] @@ -1024,28 +796,13 @@ name = "bevy_color" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_math 0.15.0-dev", - "bevy_reflect 0.15.0-dev", + "bevy_math", + "bevy_reflect", "bytemuck", - "encase 0.10.0", + "encase", "serde", "thiserror", - "wgpu-types 22.0.0", -] - -[[package]] -name = "bevy_core" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de706862871a1fe99ea619bff2f99d73e43ad82f19ef866a9e19a14c957c8537" -dependencies = [ - "bevy_app 0.14.2", - "bevy_ecs 0.14.2", - "bevy_reflect 0.14.2", - "bevy_tasks 0.14.2", - "bevy_utils 0.14.2", - "serde", - "uuid", + "wgpu-types", ] [[package]] @@ -1053,57 +810,32 @@ name = "bevy_core" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_app 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_tasks 0.15.0-dev", - "bevy_utils 0.15.0-dev", + "bevy_app", + "bevy_ecs", + "bevy_reflect", + "bevy_tasks", + "bevy_utils", "serde", "uuid", ] -[[package]] -name = "bevy_core_pipeline" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f6e1e122ada4cd811442e083fb5ad3e325c59a87271d5ef57193f1c2cad7f8c" -dependencies = [ - "bevy_app 0.14.2", - "bevy_asset 0.14.2", - "bevy_color 0.14.3", - "bevy_core 0.14.2", - "bevy_derive 0.14.2", - "bevy_ecs 0.14.2", - "bevy_math 0.14.2", - "bevy_reflect 0.14.2", - "bevy_render 0.14.2", - "bevy_transform 0.14.2", - "bevy_utils 0.14.2", - "bitflags 2.6.0", - "nonmax", - "radsort", - "serde", - "smallvec", - "thiserror", -] - [[package]] name = "bevy_core_pipeline" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_app 0.15.0-dev", - "bevy_asset 0.15.0-dev", - "bevy_color 0.15.0-dev", - "bevy_core 0.15.0-dev", - "bevy_derive 0.15.0-dev", - "bevy_ecs 0.15.0-dev", + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_core", + "bevy_derive", + "bevy_ecs", "bevy_image", - "bevy_math 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_render 0.15.0-dev", - "bevy_transform 0.15.0-dev", - "bevy_utils 0.15.0-dev", + "bevy_math", + "bevy_reflect", + "bevy_render", + "bevy_transform", + "bevy_utils", "bitflags 2.6.0", "nonmax", "radsort", @@ -1112,77 +844,29 @@ dependencies = [ "thiserror", ] -[[package]] -name = "bevy_derive" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fbfc33a4c6b80760bb8bf850a2cc65a1e031da62fd3ca8b552189104dc98514" -dependencies = [ - "bevy_macro_utils 0.14.2", - "quote", - "syn 2.0.79", -] - [[package]] name = "bevy_derive" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_macro_utils 0.15.0-dev", + "bevy_macro_utils", "quote", "syn 2.0.79", ] -[[package]] -name = "bevy_diagnostic" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebb154e0cc78e3bbfbfdb42fb502b14c1cd47e72f16e6d4228dfe6233ba6cbd" -dependencies = [ - "bevy_app 0.14.2", - "bevy_core 0.14.2", - "bevy_ecs 0.14.2", - "bevy_tasks 0.14.2", - "bevy_time 0.14.2", - "bevy_utils 0.14.2", - "const-fnv1a-hash", - "sysinfo 0.30.13", -] - [[package]] name = "bevy_diagnostic" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_app 0.15.0-dev", - "bevy_core 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_tasks 0.15.0-dev", - "bevy_time 0.15.0-dev", - "bevy_utils 0.15.0-dev", + "bevy_app", + "bevy_core", + "bevy_ecs", + "bevy_tasks", + "bevy_time", + "bevy_utils", "const-fnv1a-hash", - "sysinfo 0.32.0", -] - -[[package]] -name = "bevy_ecs" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee4222406637f3c8e3991a99788cfcde76097bf997c311f1b6297364057483f" -dependencies = [ - "arrayvec", - "bevy_ecs_macros 0.14.2", - "bevy_ptr 0.14.2", - "bevy_reflect 0.14.2", - "bevy_tasks 0.14.2", - "bevy_utils 0.14.2", - "bitflags 2.6.0", - "concurrent-queue", - "fixedbitset 0.5.7", - "nonmax", - "petgraph", - "serde", - "thiserror", + "sysinfo", ] [[package]] @@ -1191,11 +875,11 @@ version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ "arrayvec", - "bevy_ecs_macros 0.15.0-dev", - "bevy_ptr 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_tasks 0.15.0-dev", - "bevy_utils 0.15.0-dev", + "bevy_ecs_macros", + "bevy_ptr", + "bevy_reflect", + "bevy_tasks", + "bevy_utils", "bitflags 2.6.0", "concurrent-queue", "disqualified", @@ -1207,61 +891,24 @@ dependencies = [ "thiserror", ] -[[package]] -name = "bevy_ecs_macros" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36b573430b67aff7bde8292257494f39343401379bfbda64035ba4918bba7b20" -dependencies = [ - "bevy_macro_utils 0.14.2", - "proc-macro2", - "quote", - "syn 2.0.79", -] - [[package]] name = "bevy_ecs_macros" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_macro_utils 0.15.0-dev", + "bevy_macro_utils", "proc-macro2", "quote", "syn 2.0.79", ] -[[package]] -name = "bevy_encase_derive" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06c9693847a2a6ea61d6b86288dd4d8b6a79f05d4bf6e27b96d4f5c8d552fe4" -dependencies = [ - "bevy_macro_utils 0.14.2", - "encase_derive_impl 0.8.0", -] - [[package]] name = "bevy_encase_derive" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_macro_utils 0.15.0-dev", - "encase_derive_impl 0.10.0", -] - -[[package]] -name = "bevy_gilrs" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0422ccb3ce0f79b264100cf064fdc5ef65cef5c7d51bf6378058f9b96fea4183" -dependencies = [ - "bevy_app 0.14.2", - "bevy_ecs 0.14.2", - "bevy_input 0.14.2", - "bevy_time 0.14.2", - "bevy_utils 0.14.2", - "gilrs 0.10.10", - "thiserror", + "bevy_macro_utils", + "encase_derive_impl", ] [[package]] @@ -1269,137 +916,71 @@ name = "bevy_gilrs" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_app 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_input 0.15.0-dev", - "bevy_time 0.15.0-dev", - "bevy_utils 0.15.0-dev", - "gilrs 0.11.0", + "bevy_app", + "bevy_ecs", + "bevy_input", + "bevy_time", + "bevy_utils", + "gilrs", "thiserror", ] -[[package]] -name = "bevy_gizmos" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfe32af0666d8d8a7fd6eb6b5e41eceefdc6f2e5441c74b812e8f0902a9d7f52" -dependencies = [ - "bevy_app 0.14.2", - "bevy_asset 0.14.2", - "bevy_color 0.14.3", - "bevy_core_pipeline 0.14.2", - "bevy_ecs 0.14.2", - "bevy_gizmos_macros 0.14.2", - "bevy_math 0.14.2", - "bevy_pbr 0.14.2", - "bevy_reflect 0.14.2", - "bevy_render 0.14.2", - "bevy_sprite 0.14.2", - "bevy_time 0.14.2", - "bevy_transform 0.14.2", - "bevy_utils 0.14.2", - "bytemuck", -] - [[package]] name = "bevy_gizmos" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_app 0.15.0-dev", - "bevy_asset 0.15.0-dev", - "bevy_color 0.15.0-dev", - "bevy_core_pipeline 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_gizmos_macros 0.15.0-dev", - "bevy_math 0.15.0-dev", - "bevy_pbr 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_render 0.15.0-dev", - "bevy_sprite 0.15.0-dev", - "bevy_time 0.15.0-dev", - "bevy_transform 0.15.0-dev", - "bevy_utils 0.15.0-dev", + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_core_pipeline", + "bevy_ecs", + "bevy_gizmos_macros", + "bevy_math", + "bevy_pbr", + "bevy_reflect", + "bevy_render", + "bevy_sprite", + "bevy_time", + "bevy_transform", + "bevy_utils", "bytemuck", ] -[[package]] -name = "bevy_gizmos_macros" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "906b052f8cf3f3983f0f6df625fb10cbd9b27d44e362a327dc1ed51300d362bc" -dependencies = [ - "bevy_macro_utils 0.14.2", - "proc-macro2", - "quote", - "syn 2.0.79", -] - [[package]] name = "bevy_gizmos_macros" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_macro_utils 0.15.0-dev", + "bevy_macro_utils", "proc-macro2", "quote", "syn 2.0.79", ] -[[package]] -name = "bevy_gltf" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6adbd325b90e3c700d0966b5404e226c7deec1b8bda8f36832788d7b435b9b8" -dependencies = [ - "base64 0.22.1", - "bevy_animation 0.14.2", - "bevy_app 0.14.2", - "bevy_asset 0.14.2", - "bevy_color 0.14.3", - "bevy_core 0.14.2", - "bevy_core_pipeline 0.14.2", - "bevy_ecs 0.14.2", - "bevy_hierarchy 0.14.2", - "bevy_math 0.14.2", - "bevy_pbr 0.14.2", - "bevy_reflect 0.14.2", - "bevy_render 0.14.2", - "bevy_scene 0.14.2", - "bevy_tasks 0.14.2", - "bevy_transform 0.14.2", - "bevy_utils 0.14.2", - "gltf", - "percent-encoding", - "serde", - "serde_json", - "smallvec", - "thiserror", -] - [[package]] name = "bevy_gltf" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ "base64 0.22.1", - "bevy_animation 0.15.0-dev", - "bevy_app 0.15.0-dev", - "bevy_asset 0.15.0-dev", - "bevy_color 0.15.0-dev", - "bevy_core 0.15.0-dev", - "bevy_core_pipeline 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_hierarchy 0.15.0-dev", + "bevy_animation", + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_core", + "bevy_core_pipeline", + "bevy_ecs", + "bevy_hierarchy", "bevy_image", - "bevy_math 0.15.0-dev", - "bevy_pbr 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_render 0.15.0-dev", - "bevy_scene 0.15.0-dev", - "bevy_tasks 0.15.0-dev", - "bevy_transform 0.15.0-dev", - "bevy_utils 0.15.0-dev", + "bevy_math", + "bevy_pbr", + "bevy_reflect", + "bevy_render", + "bevy_scene", + "bevy_tasks", + "bevy_transform", + "bevy_utils", "gltf", "percent-encoding", "serde", @@ -1408,30 +989,16 @@ dependencies = [ "thiserror", ] -[[package]] -name = "bevy_hierarchy" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a88b912b37e1bc4dbb2aa40723199f74c8b06c4fbb6da0bb4585131df28ef66e" -dependencies = [ - "bevy_app 0.14.2", - "bevy_core 0.14.2", - "bevy_ecs 0.14.2", - "bevy_reflect 0.14.2", - "bevy_utils 0.14.2", - "smallvec", -] - [[package]] name = "bevy_hierarchy" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_app 0.15.0-dev", - "bevy_core 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_utils 0.15.0-dev", + "bevy_app", + "bevy_core", + "bevy_ecs", + "bevy_reflect", + "bevy_utils", "disqualified", "smallvec", ] @@ -1441,11 +1008,11 @@ name = "bevy_image" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_asset 0.15.0-dev", - "bevy_color 0.15.0-dev", - "bevy_math 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_utils 0.15.0-dev", + "bevy_asset", + "bevy_color", + "bevy_math", + "bevy_reflect", + "bevy_utils", "bitflags 2.6.0", "bytemuck", "futures-lite", @@ -1454,23 +1021,7 @@ dependencies = [ "ruzstd", "serde", "thiserror", - "wgpu 22.1.0", -] - -[[package]] -name = "bevy_input" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd3a54e67cc3ba17971de7b1a7e64eda84493c1e7bb6bfa11c6cf8ac124377b" -dependencies = [ - "bevy_app 0.14.2", - "bevy_ecs 0.14.2", - "bevy_math 0.14.2", - "bevy_reflect 0.14.2", - "bevy_utils 0.14.2", - "serde", - "smol_str", - "thiserror", + "wgpu", ] [[package]] @@ -1478,113 +1029,57 @@ name = "bevy_input" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_app 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_math 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_utils 0.15.0-dev", + "bevy_app", + "bevy_ecs", + "bevy_math", + "bevy_reflect", + "bevy_utils", "serde", "smol_str", "thiserror", ] -[[package]] -name = "bevy_internal" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45d435cac77c568f3aef65f786a5fee0e53c81950c5258182dd2c1d6cd6c4fec" -dependencies = [ - "bevy_a11y 0.14.2", - "bevy_animation 0.14.2", - "bevy_app 0.14.2", - "bevy_asset 0.14.2", - "bevy_audio 0.14.2", - "bevy_color 0.14.3", - "bevy_core 0.14.2", - "bevy_core_pipeline 0.14.2", - "bevy_derive 0.14.2", - "bevy_diagnostic 0.14.2", - "bevy_ecs 0.14.2", - "bevy_gilrs 0.14.2", - "bevy_gizmos 0.14.2", - "bevy_gltf 0.14.2", - "bevy_hierarchy 0.14.2", - "bevy_input 0.14.2", - "bevy_log 0.14.2", - "bevy_math 0.14.2", - "bevy_pbr 0.14.2", - "bevy_ptr 0.14.2", - "bevy_reflect 0.14.2", - "bevy_render 0.14.2", - "bevy_scene 0.14.2", - "bevy_sprite 0.14.2", - "bevy_state 0.14.2", - "bevy_tasks 0.14.2", - "bevy_text 0.14.2", - "bevy_time 0.14.2", - "bevy_transform 0.14.2", - "bevy_ui 0.14.2", - "bevy_utils 0.14.2", - "bevy_window 0.14.2", - "bevy_winit 0.14.2", -] - [[package]] name = "bevy_internal" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_a11y 0.15.0-dev", - "bevy_animation 0.15.0-dev", - "bevy_app 0.15.0-dev", - "bevy_asset 0.15.0-dev", - "bevy_audio 0.15.0-dev", - "bevy_color 0.15.0-dev", - "bevy_core 0.15.0-dev", - "bevy_core_pipeline 0.15.0-dev", - "bevy_derive 0.15.0-dev", - "bevy_diagnostic 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_gilrs 0.15.0-dev", - "bevy_gizmos 0.15.0-dev", - "bevy_gltf 0.15.0-dev", - "bevy_hierarchy 0.15.0-dev", + "bevy_a11y", + "bevy_animation", + "bevy_app", + "bevy_asset", + "bevy_audio", + "bevy_color", + "bevy_core", + "bevy_core_pipeline", + "bevy_derive", + "bevy_diagnostic", + "bevy_ecs", + "bevy_gilrs", + "bevy_gizmos", + "bevy_gltf", + "bevy_hierarchy", "bevy_image", - "bevy_input 0.15.0-dev", - "bevy_log 0.15.0-dev", - "bevy_math 0.15.0-dev", - "bevy_pbr 0.15.0-dev", + "bevy_input", + "bevy_log", + "bevy_math", + "bevy_pbr", "bevy_picking", - "bevy_ptr 0.15.0-dev", - "bevy_reflect 0.15.0-dev", + "bevy_ptr", + "bevy_reflect", "bevy_remote", - "bevy_render 0.15.0-dev", - "bevy_scene 0.15.0-dev", - "bevy_sprite 0.15.0-dev", - "bevy_state 0.15.0-dev", - "bevy_tasks 0.15.0-dev", - "bevy_text 0.15.0-dev", - "bevy_time 0.15.0-dev", - "bevy_transform 0.15.0-dev", - "bevy_ui 0.15.0-dev", - "bevy_utils 0.15.0-dev", - "bevy_window 0.15.0-dev", - "bevy_winit 0.15.0-dev", -] - -[[package]] -name = "bevy_log" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67240c7596c8f0653e50fce35a60196516817449235193246599facba9002e02" -dependencies = [ - "android_log-sys", - "bevy_app 0.14.2", - "bevy_ecs 0.14.2", - "bevy_utils 0.14.2", - "tracing-log", - "tracing-subscriber", - "tracing-wasm", + "bevy_render", + "bevy_scene", + "bevy_sprite", + "bevy_state", + "bevy_tasks", + "bevy_text", + "bevy_time", + "bevy_transform", + "bevy_ui", + "bevy_utils", + "bevy_window", + "bevy_winit", ] [[package]] @@ -1593,26 +1088,14 @@ version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ "android_log-sys", - "bevy_app 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_utils 0.15.0-dev", + "bevy_app", + "bevy_ecs", + "bevy_utils", "tracing-log", "tracing-subscriber", "tracing-wasm", ] -[[package]] -name = "bevy_macro_utils" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfc65e570012e64a21f3546df68591aaede8349e6174fb500071677f54f06630" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", - "toml_edit", -] - [[package]] name = "bevy_macro_utils" version = "0.15.0-dev" @@ -1624,27 +1107,13 @@ dependencies = [ "toml_edit", ] -[[package]] -name = "bevy_math" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5421792749dda753ab3718e77d27bfce38443daf1850b836b97530b6245a4581" -dependencies = [ - "bevy_reflect 0.14.2", - "glam 0.27.0", - "rand", - "serde", - "smallvec", - "thiserror", -] - [[package]] name = "bevy_math" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_reflect 0.15.0-dev", - "glam 0.29.0", + "bevy_reflect", + "glam", "interpolation", "itertools 0.13.0", "rand", @@ -1659,30 +1128,21 @@ name = "bevy_mesh" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_asset 0.15.0-dev", - "bevy_derive 0.15.0-dev", - "bevy_ecs 0.15.0-dev", + "bevy_asset", + "bevy_derive", + "bevy_ecs", "bevy_image", - "bevy_math 0.15.0-dev", - "bevy_mikktspace 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_transform 0.15.0-dev", - "bevy_utils 0.15.0-dev", + "bevy_math", + "bevy_mikktspace", + "bevy_reflect", + "bevy_transform", + "bevy_utils", "bitflags 2.6.0", "bytemuck", - "hexasphere 15.0.0", + "hexasphere", "serde", - "thiserror", - "wgpu 22.1.0", -] - -[[package]] -name = "bevy_mikktspace" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66cf695a264b043f2c4edb92dd5c742e6892180d2b30dac870012d153f8557ea" -dependencies = [ - "glam 0.27.0", + "thiserror", + "wgpu", ] [[package]] @@ -1690,34 +1150,7 @@ name = "bevy_mikktspace" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "glam 0.29.0", -] - -[[package]] -name = "bevy_pbr" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccaa3c945f19834dcf7cd8eb358236dbf0fc4000dacbc7710564e7856714db" -dependencies = [ - "bevy_app 0.14.2", - "bevy_asset 0.14.2", - "bevy_color 0.14.3", - "bevy_core_pipeline 0.14.2", - "bevy_derive 0.14.2", - "bevy_ecs 0.14.2", - "bevy_math 0.14.2", - "bevy_reflect 0.14.2", - "bevy_render 0.14.2", - "bevy_transform 0.14.2", - "bevy_utils 0.14.2", - "bevy_window 0.14.2", - "bitflags 2.6.0", - "bytemuck", - "fixedbitset 0.5.7", - "nonmax", - "radsort", - "smallvec", - "static_assertions", + "glam", ] [[package]] @@ -1725,18 +1158,18 @@ name = "bevy_pbr" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_app 0.15.0-dev", - "bevy_asset 0.15.0-dev", - "bevy_color 0.15.0-dev", - "bevy_core_pipeline 0.15.0-dev", - "bevy_derive 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_math 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_render 0.15.0-dev", - "bevy_transform 0.15.0-dev", - "bevy_utils 0.15.0-dev", - "bevy_window 0.15.0-dev", + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_core_pipeline", + "bevy_derive", + "bevy_ecs", + "bevy_math", + "bevy_reflect", + "bevy_render", + "bevy_transform", + "bevy_utils", + "bevy_window", "bitflags 2.6.0", "bytemuck", "fixedbitset 0.5.7", @@ -1751,66 +1184,40 @@ name = "bevy_picking" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_app 0.15.0-dev", - "bevy_asset 0.15.0-dev", - "bevy_derive 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_hierarchy 0.15.0-dev", - "bevy_input 0.15.0-dev", - "bevy_math 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_render 0.15.0-dev", - "bevy_time 0.15.0-dev", - "bevy_transform 0.15.0-dev", - "bevy_utils 0.15.0-dev", - "bevy_window 0.15.0-dev", + "bevy_app", + "bevy_asset", + "bevy_derive", + "bevy_ecs", + "bevy_hierarchy", + "bevy_input", + "bevy_math", + "bevy_reflect", + "bevy_render", + "bevy_time", + "bevy_transform", + "bevy_utils", + "bevy_window", "uuid", ] -[[package]] -name = "bevy_ptr" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61baa1bdc1f4a7ac2c18217570a7cc04e1cd54d38456e91782f0371c79afe0a8" - [[package]] name = "bevy_ptr" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" -[[package]] -name = "bevy_reflect" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2508785a4a5809f25a237eec4fee2c91a4dbcf81324b2bbc2d6c52629e603781" -dependencies = [ - "bevy_ptr 0.14.2", - "bevy_reflect_derive 0.14.2", - "bevy_utils 0.14.2", - "downcast-rs", - "erased-serde", - "glam 0.27.0", - "petgraph", - "serde", - "smallvec", - "smol_str", - "thiserror", - "uuid", -] - [[package]] name = "bevy_reflect" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ "assert_type_match", - "bevy_ptr 0.15.0-dev", - "bevy_reflect_derive 0.15.0-dev", - "bevy_utils 0.15.0-dev", + "bevy_ptr", + "bevy_reflect_derive", + "bevy_utils", "disqualified", "downcast-rs", "erased-serde", - "glam 0.29.0", + "glam", "petgraph", "serde", "smallvec", @@ -1819,25 +1226,12 @@ dependencies = [ "uuid", ] -[[package]] -name = "bevy_reflect_derive" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "967d5da1882ec3bb3675353915d3da909cafac033cbf31e58727824a1ad2a288" -dependencies = [ - "bevy_macro_utils 0.14.2", - "proc-macro2", - "quote", - "syn 2.0.79", - "uuid", -] - [[package]] name = "bevy_reflect_derive" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_macro_utils 0.15.0-dev", + "bevy_macro_utils", "proc-macro2", "quote", "syn 2.0.79", @@ -1852,13 +1246,13 @@ dependencies = [ "anyhow", "async-channel", "async-io", - "bevy_app 0.15.0-dev", - "bevy_derive 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_hierarchy 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_tasks 0.15.0-dev", - "bevy_utils 0.15.0-dev", + "bevy_app", + "bevy_derive", + "bevy_ecs", + "bevy_hierarchy", + "bevy_reflect", + "bevy_tasks", + "bevy_utils", "http-body-util", "hyper", "serde", @@ -1866,89 +1260,41 @@ dependencies = [ "smol-hyper", ] -[[package]] -name = "bevy_render" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836cf8a513db013cbe7d55a331060088efd407e49fd5b05c8404700cd82e7619" -dependencies = [ - "async-channel", - "bevy_app 0.14.2", - "bevy_asset 0.14.2", - "bevy_color 0.14.3", - "bevy_core 0.14.2", - "bevy_derive 0.14.2", - "bevy_diagnostic 0.14.2", - "bevy_ecs 0.14.2", - "bevy_encase_derive 0.14.2", - "bevy_hierarchy 0.14.2", - "bevy_math 0.14.2", - "bevy_mikktspace 0.14.2", - "bevy_reflect 0.14.2", - "bevy_render_macros 0.14.2", - "bevy_tasks 0.14.2", - "bevy_time 0.14.2", - "bevy_transform 0.14.2", - "bevy_utils 0.14.2", - "bevy_window 0.14.2", - "bitflags 2.6.0", - "bytemuck", - "codespan-reporting", - "downcast-rs", - "encase 0.8.0", - "futures-lite", - "hexasphere 12.0.0", - "image", - "js-sys", - "ktx2", - "naga 0.20.0", - "naga_oil 0.14.0", - "nonmax", - "ruzstd", - "send_wrapper", - "serde", - "smallvec", - "thiserror", - "wasm-bindgen", - "web-sys", - "wgpu 0.20.1", -] - [[package]] name = "bevy_render" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ "async-channel", - "bevy_app 0.15.0-dev", - "bevy_asset 0.15.0-dev", - "bevy_color 0.15.0-dev", - "bevy_core 0.15.0-dev", - "bevy_derive 0.15.0-dev", - "bevy_diagnostic 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_encase_derive 0.15.0-dev", - "bevy_hierarchy 0.15.0-dev", + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_core", + "bevy_derive", + "bevy_diagnostic", + "bevy_ecs", + "bevy_encase_derive", + "bevy_hierarchy", "bevy_image", - "bevy_math 0.15.0-dev", + "bevy_math", "bevy_mesh", - "bevy_reflect 0.15.0-dev", - "bevy_render_macros 0.15.0-dev", - "bevy_tasks 0.15.0-dev", - "bevy_time 0.15.0-dev", - "bevy_transform 0.15.0-dev", - "bevy_utils 0.15.0-dev", - "bevy_window 0.15.0-dev", + "bevy_reflect", + "bevy_render_macros", + "bevy_tasks", + "bevy_time", + "bevy_transform", + "bevy_utils", + "bevy_window", "bytemuck", "codespan-reporting", "downcast-rs", - "encase 0.10.0", + "encase", "futures-lite", "image", "js-sys", "ktx2", - "naga 22.1.0", - "naga_oil 0.15.0", + "naga", + "naga_oil", "nonmax", "offset-allocator", "send_wrapper", @@ -1957,19 +1303,7 @@ dependencies = [ "thiserror", "wasm-bindgen", "web-sys", - "wgpu 22.1.0", -] - -[[package]] -name = "bevy_render_macros" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc24e0e95061a38a7744218b9c7e52e4c08b53f1499f33480e2b749f3864432" -dependencies = [ - "bevy_macro_utils 0.14.2", - "proc-macro2", - "quote", - "syn 2.0.79", + "wgpu", ] [[package]] @@ -1977,95 +1311,49 @@ name = "bevy_render_macros" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_macro_utils 0.15.0-dev", + "bevy_macro_utils", "proc-macro2", "quote", "syn 2.0.79", ] -[[package]] -name = "bevy_scene" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ec57a72d75273bdbb6154390688fd07ba79ae9f6f99476d1937f799c736c2da" -dependencies = [ - "bevy_app 0.14.2", - "bevy_asset 0.14.2", - "bevy_derive 0.14.2", - "bevy_ecs 0.14.2", - "bevy_hierarchy 0.14.2", - "bevy_reflect 0.14.2", - "bevy_render 0.14.2", - "bevy_transform 0.14.2", - "bevy_utils 0.14.2", - "serde", - "thiserror", - "uuid", -] - [[package]] name = "bevy_scene" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_app 0.15.0-dev", - "bevy_asset 0.15.0-dev", - "bevy_derive 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_hierarchy 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_render 0.15.0-dev", - "bevy_transform 0.15.0-dev", - "bevy_utils 0.15.0-dev", + "bevy_app", + "bevy_asset", + "bevy_derive", + "bevy_ecs", + "bevy_hierarchy", + "bevy_reflect", + "bevy_render", + "bevy_transform", + "bevy_utils", "serde", "thiserror", "uuid", ] -[[package]] -name = "bevy_sprite" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e045b4d8cc8e7422a4c29b1eadbe224f5cc42f170b88d43e7535892fcede3840" -dependencies = [ - "bevy_app 0.14.2", - "bevy_asset 0.14.2", - "bevy_color 0.14.3", - "bevy_core_pipeline 0.14.2", - "bevy_derive 0.14.2", - "bevy_ecs 0.14.2", - "bevy_math 0.14.2", - "bevy_reflect 0.14.2", - "bevy_render 0.14.2", - "bevy_transform 0.14.2", - "bevy_utils 0.14.2", - "bitflags 2.6.0", - "bytemuck", - "fixedbitset 0.5.7", - "guillotiere", - "radsort", - "rectangle-pack", - "thiserror", -] - [[package]] name = "bevy_sprite" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_app 0.15.0-dev", - "bevy_asset 0.15.0-dev", - "bevy_color 0.15.0-dev", - "bevy_core_pipeline 0.15.0-dev", - "bevy_derive 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_math 0.15.0-dev", + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_core_pipeline", + "bevy_derive", + "bevy_ecs", + "bevy_math", "bevy_picking", - "bevy_reflect 0.15.0-dev", - "bevy_render 0.15.0-dev", - "bevy_transform 0.15.0-dev", - "bevy_utils 0.15.0-dev", - "bevy_window 0.15.0-dev", + "bevy_reflect", + "bevy_render", + "bevy_transform", + "bevy_utils", + "bevy_window", "bitflags 2.6.0", "bytemuck", "fixedbitset 0.5.7", @@ -2077,43 +1365,17 @@ dependencies = [ "thiserror", ] -[[package]] -name = "bevy_state" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25335bfa58cc22371182335c3b133017293bc9b6d3308402fd4d1f978b83f937" -dependencies = [ - "bevy_app 0.14.2", - "bevy_ecs 0.14.2", - "bevy_hierarchy 0.14.2", - "bevy_reflect 0.14.2", - "bevy_state_macros 0.14.2", - "bevy_utils 0.14.2", -] - [[package]] name = "bevy_state" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_app 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_hierarchy 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_state_macros 0.15.0-dev", - "bevy_utils 0.15.0-dev", -] - -[[package]] -name = "bevy_state_macros" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee600b659c739f1911f997a81611fec0a1832cf731727956e5fa4e7532b4dd5" -dependencies = [ - "bevy_macro_utils 0.14.2", - "proc-macro2", - "quote", - "syn 2.0.79", + "bevy_app", + "bevy_ecs", + "bevy_hierarchy", + "bevy_reflect", + "bevy_state_macros", + "bevy_utils", ] [[package]] @@ -2121,25 +1383,12 @@ name = "bevy_state_macros" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_macro_utils 0.15.0-dev", + "bevy_macro_utils", "proc-macro2", "quote", "syn 2.0.79", ] -[[package]] -name = "bevy_tasks" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77865f310b1fc48fb05b7c4adbe76607ec01d0c14f8ab4caba4d714c86439946" -dependencies = [ - "async-channel", - "async-executor", - "concurrent-queue", - "futures-lite", - "wasm-bindgen-futures", -] - [[package]] name = "bevy_tasks" version = "0.15.0-dev" @@ -2154,46 +1403,23 @@ dependencies = [ "wasm-bindgen-futures", ] -[[package]] -name = "bevy_text" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b661db828fd423fc41a4ccf43aa4d1b8e50e75057ec40453317d0d761e8ad62d" -dependencies = [ - "ab_glyph", - "bevy_app 0.14.2", - "bevy_asset 0.14.2", - "bevy_color 0.14.3", - "bevy_ecs 0.14.2", - "bevy_math 0.14.2", - "bevy_reflect 0.14.2", - "bevy_render 0.14.2", - "bevy_sprite 0.14.2", - "bevy_transform 0.14.2", - "bevy_utils 0.14.2", - "bevy_window 0.14.2", - "glyph_brush_layout", - "serde", - "thiserror", -] - [[package]] name = "bevy_text" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_app 0.15.0-dev", - "bevy_asset 0.15.0-dev", - "bevy_color 0.15.0-dev", - "bevy_derive 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_math 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_render 0.15.0-dev", - "bevy_sprite 0.15.0-dev", - "bevy_transform 0.15.0-dev", - "bevy_utils 0.15.0-dev", - "bevy_window 0.15.0-dev", + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_derive", + "bevy_ecs", + "bevy_math", + "bevy_reflect", + "bevy_render", + "bevy_sprite", + "bevy_transform", + "bevy_utils", + "bevy_window", "cosmic-text", "serde", "sys-locale", @@ -2201,92 +1427,31 @@ dependencies = [ "unicode-bidi", ] -[[package]] -name = "bevy_time" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4e4d53ec32a1b16492396951d04de0d2d90e924bf9adcb8d1adacab5ab6c17c" -dependencies = [ - "bevy_app 0.14.2", - "bevy_ecs 0.14.2", - "bevy_reflect 0.14.2", - "bevy_utils 0.14.2", - "crossbeam-channel", - "serde", - "thiserror", -] - [[package]] name = "bevy_time" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_app 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_utils 0.15.0-dev", + "bevy_app", + "bevy_ecs", + "bevy_reflect", + "bevy_utils", "crossbeam-channel", "serde", "thiserror", ] -[[package]] -name = "bevy_transform" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5493dce84427d00a9266e8e4386d738a72ee8640423b62dfcecb6dfccbfe0d2" -dependencies = [ - "bevy_app 0.14.2", - "bevy_ecs 0.14.2", - "bevy_hierarchy 0.14.2", - "bevy_math 0.14.2", - "bevy_reflect 0.14.2", - "serde", - "thiserror", -] - [[package]] name = "bevy_transform" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_app 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_hierarchy 0.15.0-dev", - "bevy_math 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "serde", - "thiserror", -] - -[[package]] -name = "bevy_ui" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56d2cba6603b39a3765f043212ae530e25550af168a7eec6b23b9b93c19bc5f7" -dependencies = [ - "bevy_a11y 0.14.2", - "bevy_app 0.14.2", - "bevy_asset 0.14.2", - "bevy_color 0.14.3", - "bevy_core_pipeline 0.14.2", - "bevy_derive 0.14.2", - "bevy_ecs 0.14.2", - "bevy_hierarchy 0.14.2", - "bevy_input 0.14.2", - "bevy_math 0.14.2", - "bevy_reflect 0.14.2", - "bevy_render 0.14.2", - "bevy_sprite 0.14.2", - "bevy_text 0.14.2", - "bevy_transform 0.14.2", - "bevy_utils 0.14.2", - "bevy_window 0.14.2", - "bytemuck", - "nonmax", + "bevy_app", + "bevy_ecs", + "bevy_hierarchy", + "bevy_math", + "bevy_reflect", "serde", - "smallvec", - "taffy", "thiserror", ] @@ -2295,25 +1460,25 @@ name = "bevy_ui" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "bevy_a11y 0.15.0-dev", - "bevy_animation 0.15.0-dev", - "bevy_app 0.15.0-dev", - "bevy_asset 0.15.0-dev", - "bevy_color 0.15.0-dev", - "bevy_core_pipeline 0.15.0-dev", - "bevy_derive 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_hierarchy 0.15.0-dev", - "bevy_input 0.15.0-dev", - "bevy_math 0.15.0-dev", + "bevy_a11y", + "bevy_animation", + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_core_pipeline", + "bevy_derive", + "bevy_ecs", + "bevy_hierarchy", + "bevy_input", + "bevy_math", "bevy_picking", - "bevy_reflect 0.15.0-dev", - "bevy_render 0.15.0-dev", - "bevy_sprite 0.15.0-dev", - "bevy_text 0.15.0-dev", - "bevy_transform 0.15.0-dev", - "bevy_utils 0.15.0-dev", - "bevy_window 0.15.0-dev", + "bevy_reflect", + "bevy_render", + "bevy_sprite", + "bevy_text", + "bevy_transform", + "bevy_utils", + "bevy_window", "bytemuck", "nonmax", "serde", @@ -2322,28 +1487,13 @@ dependencies = [ "thiserror", ] -[[package]] -name = "bevy_utils" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb0ec333b5965771153bd746f92ffd8aeeb9d008a8620ffd9ed474859381a5e" -dependencies = [ - "ahash", - "bevy_utils_proc_macros 0.14.2", - "getrandom", - "hashbrown 0.14.5", - "thread_local", - "tracing", - "web-time", -] - [[package]] name = "bevy_utils" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ "ahash", - "bevy_utils_proc_macros 0.15.0-dev", + "bevy_utils_proc_macros", "getrandom", "hashbrown 0.14.5", "thread_local", @@ -2351,17 +1501,6 @@ dependencies = [ "web-time", ] -[[package]] -name = "bevy_utils_proc_macros" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f1ab8f2f6f58439d260081d89a42b02690e5fdd64f814edc9417d33fcf2857" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - [[package]] name = "bevy_utils_proc_macros" version = "0.15.0-dev" @@ -2372,91 +1511,45 @@ dependencies = [ "syn 2.0.79", ] -[[package]] -name = "bevy_window" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89e88a20db64ea8204540afb4699295947c454738fd50293f7b32ab8be857a6" -dependencies = [ - "bevy_a11y 0.14.2", - "bevy_app 0.14.2", - "bevy_ecs 0.14.2", - "bevy_math 0.14.2", - "bevy_reflect 0.14.2", - "bevy_utils 0.14.2", - "raw-window-handle", - "serde", - "smol_str", -] - [[package]] name = "bevy_window" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ "android-activity", - "bevy_a11y 0.15.0-dev", - "bevy_app 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_input 0.15.0-dev", - "bevy_math 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_utils 0.15.0-dev", + "bevy_a11y", + "bevy_app", + "bevy_ecs", + "bevy_input", + "bevy_math", + "bevy_reflect", + "bevy_utils", "raw-window-handle", "serde", "smol_str", ] -[[package]] -name = "bevy_winit" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0bef8ec3e4b45db943ad4d1c0bf59b09e382ce0651a706e2f33a70fa955303c" -dependencies = [ - "accesskit_winit 0.20.4", - "approx", - "bevy_a11y 0.14.2", - "bevy_app 0.14.2", - "bevy_derive 0.14.2", - "bevy_ecs 0.14.2", - "bevy_hierarchy 0.14.2", - "bevy_input 0.14.2", - "bevy_log 0.14.2", - "bevy_math 0.14.2", - "bevy_reflect 0.14.2", - "bevy_tasks 0.14.2", - "bevy_utils 0.14.2", - "bevy_window 0.14.2", - "cfg-if", - "crossbeam-channel", - "raw-window-handle", - "serde", - "wasm-bindgen", - "web-sys", - "winit", -] - [[package]] name = "bevy_winit" version = "0.15.0-dev" source = "git+https://github.com/bevyengine/bevy?rev=0c959f77007c29eead7f902bddd3342a1ecbca20#0c959f77007c29eead7f902bddd3342a1ecbca20" dependencies = [ - "accesskit_winit 0.22.3", + "accesskit_winit", "approx", - "bevy_a11y 0.15.0-dev", - "bevy_app 0.15.0-dev", - "bevy_asset 0.15.0-dev", - "bevy_derive 0.15.0-dev", - "bevy_ecs 0.15.0-dev", - "bevy_hierarchy 0.15.0-dev", + "bevy_a11y", + "bevy_app", + "bevy_asset", + "bevy_derive", + "bevy_ecs", + "bevy_hierarchy", "bevy_image", - "bevy_input 0.15.0-dev", - "bevy_log 0.15.0-dev", - "bevy_math 0.15.0-dev", - "bevy_reflect 0.15.0-dev", - "bevy_tasks 0.15.0-dev", - "bevy_utils 0.15.0-dev", - "bevy_window 0.15.0-dev", + "bevy_input", + "bevy_log", + "bevy_math", + "bevy_reflect", + "bevy_tasks", + "bevy_utils", + "bevy_window", "bytemuck", "cfg-if", "crossbeam-channel", @@ -2464,7 +1557,7 @@ dependencies = [ "serde", "wasm-bindgen", "web-sys", - "wgpu-types 22.0.0", + "wgpu-types", "winit", ] @@ -3264,17 +2357,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" -[[package]] -name = "d3d12" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b28bfe653d79bd16c77f659305b195b82bb5ce0c0eb2a4846b82ddbd77586813" -dependencies = [ - "bitflags 2.6.0", - "libloading 0.8.5", - "winapi", -] - [[package]] name = "d3d12" version = "22.0.0" @@ -3505,18 +2587,6 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" -[[package]] -name = "encase" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9299a95fa5671ddf29ecc22b00e121843a65cb9ff24911e394b4ae556baf36" -dependencies = [ - "const_panic", - "encase_derive 0.8.0", - "glam 0.27.0", - "thiserror", -] - [[package]] name = "encase" version = "0.10.0" @@ -3524,38 +2594,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0a05902cf601ed11d564128448097b98ebe3c6574bd7b6a653a3d56d54aa020" dependencies = [ "const_panic", - "encase_derive 0.10.0", - "glam 0.29.0", + "encase_derive", + "glam", "thiserror", ] -[[package]] -name = "encase_derive" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e09decb3beb1fe2db6940f598957b2e1f7df6206a804d438ff6cb2a9cddc10" -dependencies = [ - "encase_derive_impl 0.8.0", -] - [[package]] name = "encase_derive" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "181d475b694e2dd56ae919ce7699d344d1fd259292d590c723a50d1189a2ea85" dependencies = [ - "encase_derive_impl 0.10.0", -] - -[[package]] -name = "encase_derive_impl" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd31dbbd9743684d339f907a87fe212cb7b51d75b9e8e74181fe363199ee9b47" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", + "encase_derive_impl", ] [[package]] @@ -3876,7 +2926,7 @@ name = "forky_bevy" version = "0.2.0-rc.6" dependencies = [ "anyhow", - "bevy 0.15.0-dev", + "bevy", "extend", "forky_core 0.2.0-rc.6", "forky_web 0.2.0-rc.6", @@ -4273,51 +3323,17 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "gilrs" -version = "0.10.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a556964c6d62458084356ce9770676f5104bd667e12e9a795691076e8a17c5cf" -dependencies = [ - "fnv", - "gilrs-core 0.5.15", - "log", - "uuid", - "vec_map", -] - [[package]] name = "gilrs" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb2c998745a3c1ac90f64f4f7b3a54219fd3612d7705e7798212935641ed18f" -dependencies = [ - "fnv", - "gilrs-core 0.6.0", - "log", - "uuid", - "vec_map", -] - -[[package]] -name = "gilrs-core" -version = "0.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "732dadc05170599ddec9a89653f10d7a2af54da9181b3fa6e2bd49907ec8f7e4" -dependencies = [ - "core-foundation 0.9.4", - "inotify 0.10.2", - "io-kit-sys", - "js-sys", - "libc", - "libudev-sys", +checksum = "bbb2c998745a3c1ac90f64f4f7b3a54219fd3612d7705e7798212935641ed18f" +dependencies = [ + "fnv", + "gilrs-core", "log", - "nix", "uuid", "vec_map", - "wasm-bindgen", - "web-sys", - "windows 0.58.0", ] [[package]] @@ -4358,17 +3374,6 @@ dependencies = [ "xml-rs", ] -[[package]] -name = "glam" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e05e7e6723e3455f4818c7b26e855439f7546cf617ef669d1adedb8669e5cb9" -dependencies = [ - "bytemuck", - "rand", - "serde", -] - [[package]] name = "glam" version = "0.29.0" @@ -4468,15 +3473,6 @@ 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 = "glutin_wgl_sys" version = "0.6.0" @@ -4486,17 +3482,6 @@ dependencies = [ "gl_generator", ] -[[package]] -name = "glyph_brush_layout" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1e288bfd2f6c0313f78bf5aa538356ad481a3bb97e9b7f93220ab0066c5992" -dependencies = [ - "ab_glyph", - "approx", - "xi-unicode", -] - [[package]] name = "gpu-alloc" version = "0.6.0" @@ -4516,19 +3501,6 @@ dependencies = [ "bitflags 2.6.0", ] -[[package]] -name = "gpu-allocator" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884" -dependencies = [ - "log", - "presser", - "thiserror", - "winapi", - "windows 0.52.0", -] - [[package]] name = "gpu-allocator" version = "0.26.0" @@ -4663,16 +3635,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hexasphere" -version = "12.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edd6b038160f086b0a7496edae34169ae22f328793cbe2b627a5a3d8373748ec" -dependencies = [ - "constgebra", - "glam 0.27.0", -] - [[package]] name = "hexasphere" version = "15.0.0" @@ -4680,7 +3642,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "741ab88b8cc670443da777c3daab02cebf5a3caccfc04e3c052f55c94d1643fe" dependencies = [ "constgebra", - "glam 0.29.0", + "glam", ] [[package]] @@ -4866,17 +3828,6 @@ dependencies = [ "libc", ] -[[package]] -name = "inotify" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd168d97690d0b8c412d6b6c10360277f4d7ee495c5d0d5d5fe0854923255cc" -dependencies = [ - "bitflags 1.3.2", - "inotify-sys", - "libc", -] - [[package]] name = "inotify" version = "0.11.0" @@ -5397,21 +4348,6 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "metal" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5637e166ea14be6063a3f8ba5ccb9a4159df7d8f6d61c02fc3d480b1f90dcfcb" -dependencies = [ - "bitflags 2.6.0", - "block", - "core-graphics-types", - "foreign-types 0.5.0", - "log", - "objc", - "paste", -] - [[package]] name = "metal" version = "0.29.0" @@ -5488,28 +4424,6 @@ dependencies = [ "syn 2.0.79", ] -[[package]] -name = "naga" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e536ae46fcab0876853bd4a632ede5df4b1c2527a58f6c5a4150fe86be858231" -dependencies = [ - "arrayvec", - "bit-set 0.5.3", - "bitflags 2.6.0", - "codespan-reporting", - "hexf-parse", - "indexmap", - "log", - "num-traits", - "pp-rs", - "rustc-hash", - "spirv", - "termcolor", - "thiserror", - "unicode-xid", -] - [[package]] name = "naga" version = "22.1.0" @@ -5532,26 +4446,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "naga_oil" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "275d9720a7338eedac966141089232514c84d76a246a58ef501af88c5edf402f" -dependencies = [ - "bit-set 0.5.3", - "codespan-reporting", - "data-encoding", - "indexmap", - "naga 0.20.0", - "once_cell", - "regex", - "regex-syntax 0.8.5", - "rustc-hash", - "thiserror", - "tracing", - "unicode-ident", -] - [[package]] name = "naga_oil" version = "0.15.0" @@ -5562,7 +4456,7 @@ dependencies = [ "codespan-reporting", "data-encoding", "indexmap", - "naga 22.1.0", + "naga", "once_cell", "regex", "regex-syntax 0.8.5", @@ -6142,15 +5036,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" -[[package]] -name = "owned_ttf_parser" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec719bbf3b2a81c109a4e20b1f129b5566b7dce654bc3872f6a05abf82b2c4" -dependencies = [ - "ttf-parser 0.25.0", -] - [[package]] name = "pad-adapter" version = "0.1.1" @@ -6715,17 +5600,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rodio" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1fceb9d127d515af1586d8d0cc601e1245bdb0af38e75c865a156290184f5b3" -dependencies = [ - "cpal", - "lewton", - "thiserror", -] - [[package]] name = "rodio" version = "0.19.0" @@ -7304,7 +6178,7 @@ version = "0.2.0-rc.4" dependencies = [ "anyhow", "backtrace", - "bevy 0.15.0-dev", + "bevy", "clap", "colorize", "console_log", @@ -7409,20 +6283,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "sysinfo" -version = "0.30.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a5b4ddaee55fb2bea2bf0e5000747e5f5c0de765e5a5ff87f4cd106439f4bb3" -dependencies = [ - "cfg-if", - "core-foundation-sys", - "libc", - "ntapi", - "once_cell", - "windows 0.52.0", -] - [[package]] name = "sysinfo" version = "0.32.0" @@ -7725,12 +6585,6 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8" -[[package]] -name = "ttf-parser" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5902c5d130972a0000f60860bfbf46f7ca3db5391eddfedd1b8728bd9dc96c0e" - [[package]] name = "twox-hash" version = "1.6.3" @@ -8064,32 +6918,6 @@ dependencies = [ "rustls-pki-types", ] -[[package]] -name = "wgpu" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e37c7b9921b75dfd26dd973fdcbce36f13dfa6e2dc82aece584e0ed48c355c" -dependencies = [ - "arrayvec", - "cfg-if", - "cfg_aliases 0.1.1", - "document-features", - "js-sys", - "log", - "naga 0.20.0", - "parking_lot", - "profiling", - "raw-window-handle", - "smallvec", - "static_assertions", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "wgpu-core 0.21.1", - "wgpu-hal 0.21.1", - "wgpu-types 0.20.0", -] - [[package]] name = "wgpu" version = "22.1.0" @@ -8101,7 +6929,7 @@ dependencies = [ "document-features", "js-sys", "log", - "naga 22.1.0", + "naga", "parking_lot", "profiling", "raw-window-handle", @@ -8110,36 +6938,9 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "wgpu-core 22.1.0", - "wgpu-hal 22.0.0", - "wgpu-types 22.0.0", -] - -[[package]] -name = "wgpu-core" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50819ab545b867d8a454d1d756b90cd5f15da1f2943334ca314af10583c9d39" -dependencies = [ - "arrayvec", - "bit-vec 0.6.3", - "bitflags 2.6.0", - "cfg_aliases 0.1.1", - "codespan-reporting", - "document-features", - "indexmap", - "log", - "naga 0.20.0", - "once_cell", - "parking_lot", - "profiling", - "raw-window-handle", - "rustc-hash", - "smallvec", - "thiserror", - "web-sys", - "wgpu-hal 0.21.1", - "wgpu-types 0.20.0", + "wgpu-core", + "wgpu-hal", + "wgpu-types", ] [[package]] @@ -8155,61 +6956,16 @@ dependencies = [ "document-features", "indexmap", "log", - "naga 22.1.0", - "once_cell", - "parking_lot", - "profiling", - "raw-window-handle", - "rustc-hash", - "smallvec", - "thiserror", - "wgpu-hal 22.0.0", - "wgpu-types 22.0.0", -] - -[[package]] -name = "wgpu-hal" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "172e490a87295564f3fcc0f165798d87386f6231b04d4548bca458cbbfd63222" -dependencies = [ - "android_system_properties", - "arrayvec", - "ash 0.37.3+1.3.251", - "bit-set 0.5.3", - "bitflags 2.6.0", - "block", - "cfg_aliases 0.1.1", - "core-graphics-types", - "d3d12 0.20.0", - "glow", - "glutin_wgl_sys 0.5.0", - "gpu-alloc", - "gpu-allocator 0.25.0", - "gpu-descriptor", - "hassle-rs", - "js-sys", - "khronos-egl", - "libc", - "libloading 0.8.5", - "log", - "metal 0.28.0", - "naga 0.20.0", - "ndk-sys 0.5.0+25.2.9519653", - "objc", + "naga", "once_cell", "parking_lot", "profiling", - "range-alloc", "raw-window-handle", - "renderdoc-sys", "rustc-hash", "smallvec", "thiserror", - "wasm-bindgen", - "web-sys", - "wgpu-types 0.20.0", - "winapi", + "wgpu-hal", + "wgpu-types", ] [[package]] @@ -8220,17 +6976,17 @@ checksum = "f6bbf4b4de8b2a83c0401d9e5ae0080a2792055f25859a02bf9be97952bbed4f" dependencies = [ "android_system_properties", "arrayvec", - "ash 0.38.0+1.3.281", + "ash", "bit-set 0.6.0", "bitflags 2.6.0", "block", "cfg_aliases 0.1.1", "core-graphics-types", - "d3d12 22.0.0", + "d3d12", "glow", - "glutin_wgl_sys 0.6.0", + "glutin_wgl_sys", "gpu-alloc", - "gpu-allocator 0.26.0", + "gpu-allocator", "gpu-descriptor", "hassle-rs", "js-sys", @@ -8238,8 +6994,8 @@ dependencies = [ "libc", "libloading 0.7.4", "log", - "metal 0.29.0", - "naga 22.1.0", + "metal", + "naga", "ndk-sys 0.5.0+25.2.9519653", "objc", "once_cell", @@ -8253,21 +7009,10 @@ dependencies = [ "thiserror", "wasm-bindgen", "web-sys", - "wgpu-types 22.0.0", + "wgpu-types", "winapi", ] -[[package]] -name = "wgpu-types" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1353d9a46bff7f955a680577f34c69122628cc2076e1d6f3a9be6ef00ae793ef" -dependencies = [ - "bitflags 2.6.0", - "js-sys", - "web-sys", -] - [[package]] name = "wgpu-types" version = "22.0.0" @@ -8333,8 +7078,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" dependencies = [ "windows-core 0.54.0", - "windows-implement 0.53.0", - "windows-interface 0.53.0", "windows-targets 0.52.6", ] @@ -8373,24 +7116,13 @@ version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" dependencies = [ - "windows-implement 0.58.0", - "windows-interface 0.58.0", + "windows-implement", + "windows-interface", "windows-result 0.2.0", "windows-strings", "windows-targets 0.52.6", ] -[[package]] -name = "windows-implement" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942ac266be9249c84ca862f0a164a39533dc2f6f33dc98ec89c8da99b82ea0bd" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - [[package]] name = "windows-implement" version = "0.58.0" @@ -8402,17 +7134,6 @@ dependencies = [ "syn 2.0.79", ] -[[package]] -name = "windows-interface" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da33557140a288fae4e1d5f8873aaf9eb6613a9cf82c3e070223ff177f598b60" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - [[package]] name = "windows-interface" version = "0.58.0" @@ -8751,12 +7472,6 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" -[[package]] -name = "xi-unicode" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a67300977d3dc3f8034dae89778f502b6ba20b269527b3223ba59c0cf393bb8a" - [[package]] name = "xkbcommon-dl" version = "0.4.2" diff --git a/Cargo.toml b/Cargo.toml index f3a4646a..126f0785 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ opt-level = 1 opt-level = 3 [workspace.package] -version = "0.0.4-rc.3" +version = "0.0.4-rc.2" edition = "2021" description = "A very flexible AI behavior library for games and robotics." documentation = "https://beetmash.com/docs/beet" @@ -38,12 +38,12 @@ members = [ [workspace.dependencies] ## internal -beet = { path = "./", version = "0.0.4-rc.3" } -beet_spatial = { path = "crates/beet_spatial", version = "0.0.4-rc.3", default-features = false } -beet_flow = { path = "crates/beet_flow", version = "0.0.4-rc.3" } -beet_flow_macros = { path = "crates/beet_flow/macros", version = "0.0.4-rc.3" } -beet_ml = { path = "crates/beet_ml", version = "0.0.4-rc.3" } -beet_examples = { path = "crates/beet_examples", version = "0.0.4-rc.3" } +beet = { path = "./", version = "0.0.4-rc.2" } +beet_spatial = { path = "crates/beet_spatial", version = "0.0.4-rc.2", default-features = false } +beet_flow = { path = "crates/beet_flow", version = "0.0.4-rc.2" } +beet_flow_macros = { path = "crates/beet_flow/macros", version = "0.0.4-rc.2" } +beet_ml = { path = "crates/beet_ml", version = "0.0.4-rc.2" } +beet_examples = { path = "crates/beet_examples", version = "0.0.4-rc.2" } ## local beetmash = { version = "0.0.6-rc.2", path = "../beetmash" } @@ -91,8 +91,8 @@ serde_json = "1" ron = "0.8" #💡 game -bevy = { version = "0.14", default-features = false, features = [ -# bevy = { git = "https://github.com/bevyengine/bevy", rev = "0c959f77007c29eead7f902bddd3342a1ecbca20", default-features = false, features = [ +# bevy = { version = "0.14", default-features = false, features = [ +bevy = { git = "https://github.com/bevyengine/bevy", rev = "0c959f77007c29eead7f902bddd3342a1ecbca20", default-features = false, features = [ "bevy_scene", "serialize", # "bevy_color", diff --git a/crates/beet_examples/src/components/follow_cursor.rs b/crates/beet_examples/src/components/follow_cursor.rs index eb056d77..6c4eac74 100644 --- a/crates/beet_examples/src/components/follow_cursor.rs +++ b/crates/beet_examples/src/components/follow_cursor.rs @@ -34,13 +34,54 @@ pub fn follow_cursor_2d( } -#[derive(Default, Component, Reflect)] +#[derive(Component, Reflect)] #[reflect(Default, Component)] -pub struct FollowCursor3d; +pub struct FollowCursor3d { + pub intersect_point: Vec3, + pub intersect_plane: InfinitePlane3d, +} + +impl FollowCursor3d { + /// Follows the cursor on the XZ plane with the Y axis as the normal. + pub const ORIGIN_Y: Self = Self { + intersect_point: Vec3::ZERO, + intersect_plane: InfinitePlane3d { normal: Dir3::Y }, + }; + + /// Follows the cursor on the XY plane with the Z axis as the normal. + pub const ORIGIN_Z: Self = Self { + intersect_point: Vec3::ZERO, + intersect_plane: InfinitePlane3d { normal: Dir3::Z }, + }; + + + pub fn new(intersect_point: Vec3, intersect_plane: Vec3) -> Self { + Self { + intersect_point, + intersect_plane: InfinitePlane3d::new(intersect_plane), + } + } + pub fn with_intersect_point(self, intersect_point: Vec3) -> Self { + Self { + intersect_point, + ..self + } + } + pub fn with_intersect_plane(self, intersect_plane: Vec3) -> Self { + Self { + intersect_plane: InfinitePlane3d::new(intersect_plane), + ..self + } + } +} + +impl Default for FollowCursor3d { + fn default() -> Self { Self::ORIGIN_Y } +} pub fn follow_cursor_3d( camera_query: Query<(&Camera, &GlobalTransform)>, - mut cursor_query: Query<&mut Transform, With>, + mut cursor_query: Query<(&mut Transform, &FollowCursor3d)>, windows: Query<&Window>, ) { let Ok((camera, camera_transform)) = camera_query.get_single() else { @@ -60,14 +101,14 @@ pub fn follow_cursor_3d( return; }; - let Some(dist) = - ray.intersect_plane(Vec3::ZERO, InfinitePlane3d::new(Vec3::Y)) - else { - return; - }; - let point = ray.get_point(dist); - - for mut transform in cursor_query.iter_mut() { + for (mut transform, follow_cursor) in cursor_query.iter_mut() { + let Some(dist) = ray.intersect_plane( + follow_cursor.intersect_point, + follow_cursor.intersect_plane, + ) else { + continue; + }; + let point = ray.get_point(dist); transform.translation = point; } } diff --git a/crates/beet_examples/src/scenes/spatial/inverse_kinematics.rs b/crates/beet_examples/src/scenes/spatial/inverse_kinematics.rs new file mode 100644 index 00000000..c1d3768c --- /dev/null +++ b/crates/beet_examples/src/scenes/spatial/inverse_kinematics.rs @@ -0,0 +1,91 @@ +use crate::prelude::FollowCursor3d; +use beet_spatial::prelude::Ik2Dof; +use beet_spatial::prelude::Ik2DofTransforms; +use beet_spatial::prelude::IkSegment; +// use crate::beet::prelude::*; +// use beetmash::core::scenes::Foxie; +use beetmash::prelude::*; +// use bevy::animation::RepeatAnimation; +use bevy::{ + color::palettes::tailwind, + prelude::*, +}; +// use std::time::Duration; + + +pub fn inverse_kinematics(mut commands: Commands) { + let ik_solver = Ik2Dof::new(IkSegment::DEG_360, IkSegment::DEG_360); + let arm_width = 0.1; + + commands.spawn(( + Name::new("Camera"), + BundlePlaceholder::Camera3d, + Transform::from_xyz(0., 0., 5.0).looking_at(Vec3::ZERO, Vec3::Y), + )); + let target = commands + .spawn(( + Name::new("Mouse"), + FollowCursor3d::ORIGIN_Z, + Transform::default().looking_to(-Vec3::Z, Vec3::Y), + BundlePlaceholder::Pbr { + mesh: Circle::new(0.2).into(), + material: MaterialPlaceholder::unlit(tailwind::BLUE_500), + }, + )) + .id(); + + + let root = commands + .spawn(( + Name::new("IK Root"), + Transform::default().looking_to(Vec3::X, Vec3::Y), + )) + .id(); + let mut entity1 = Entity::PLACEHOLDER; + let mut entity2 = Entity::PLACEHOLDER; + + commands.entity(root).with_children(|parent| { + entity1 = ik_segment( + &mut parent.spawn_empty(), + &ik_solver.segment1, + Transform::default(), + arm_width, + ); + }); + + commands.entity(entity1).with_children(|parent| { + entity2 = ik_segment( + &mut parent.spawn_empty(), + &ik_solver.segment2, + Transform::from_xyz(0., 0., -ik_solver.segment1.len), + arm_width, + ); + }); + + commands.spawn(( + Name::new("IK Solver"), + Ik2DofTransforms::new(ik_solver, target, entity1, entity2), + )); +} + + +pub fn ik_segment( + commands: &mut EntityCommands, + seg: &IkSegment, + transform: Transform, + arm_width: f32, +) -> Entity { + commands + .insert((Name::new("Segment"), transform, Visibility::Visible)) + .with_children(|parent| { + parent.spawn(( + Name::new("Mesh"), + Transform::from_xyz(0., 0., -seg.len * 0.5), + BundlePlaceholder::Pbr { + mesh: Cuboid::new(arm_width, arm_width, seg.len).into(), + material: MaterialPlaceholder::unlit(tailwind::AMBER_500), + }, + )); + }) + .id() +} diff --git a/crates/beet_examples/src/scenes/spatial/mod.rs b/crates/beet_examples/src/scenes/spatial/mod.rs index f62070c8..9f23d497 100644 --- a/crates/beet_examples/src/scenes/spatial/mod.rs +++ b/crates/beet_examples/src/scenes/spatial/mod.rs @@ -10,6 +10,9 @@ pub use self::forage::*; pub mod hello_animation; #[allow(unused_imports)] pub use self::hello_animation::*; +pub mod inverse_kinematics; +#[allow(unused_imports)] +pub use self::inverse_kinematics::*; pub mod seek; #[allow(unused_imports)] pub use self::seek::*; diff --git a/crates/beet_examples/src/scenes/spatial/seek_3d.rs b/crates/beet_examples/src/scenes/spatial/seek_3d.rs index 26798232..bda09c3d 100644 --- a/crates/beet_examples/src/scenes/spatial/seek_3d.rs +++ b/crates/beet_examples/src/scenes/spatial/seek_3d.rs @@ -1,5 +1,5 @@ -use crate::prelude::*; use crate::beet::prelude::*; +use crate::prelude::*; use beetmash::core::scenes::Foxie; use beetmash::prelude::*; use bevy::prelude::*; @@ -10,15 +10,17 @@ pub fn seek_3d(mut commands: Commands) { // camera commands.spawn(( Name::new("Camera"), - BundlePlaceholder::Camera3d, CameraDistance { - width: 80., - offset: Vec3::new(0., 20., 40.), - })); + BundlePlaceholder::Camera3d, + CameraDistance { + width: 80., + offset: Vec3::new(0., 20., 40.), + }, + )); // cheese let target = commands .spawn(( - FollowCursor3d, + FollowCursor3d::default(), Transform::from_xyz(20., 0., 40.).with_scale(Vec3::splat(3.)), BundlePlaceholder::Scene("kaykit/cheese.glb#Scene0".into()), )) diff --git a/crates/beet_spatial/src/inverse_kinematics/ik_2dof.rs b/crates/beet_spatial/src/inverse_kinematics/ik_2dof.rs new file mode 100644 index 00000000..8010aab8 --- /dev/null +++ b/crates/beet_spatial/src/inverse_kinematics/ik_2dof.rs @@ -0,0 +1,154 @@ +use crate::prelude::*; +use bevy::prelude::*; +use std::f32::consts::PI; + +/// Inverse Kinematics solver for a 2dof planar arm, for instance shoulder & elbow hinge joints. +#[derive(Debug, Default, Clone, Copy, Reflect)] +pub struct Ik2Dof { + pub segment1: IkSegment, + pub segment2: IkSegment, + pub arm_style: IkArmStyle, +} + +#[derive(Debug, Default, Clone, Copy, Reflect)] +pub enum IkArmStyle { + #[default] + Overarm, + Underarm, +} + + +pub enum Ik2DofSolution { + /// The target is reachable and the solution is valid. + Reachable(f32, f32), + Stretched(f32, f32), + /// The target angle cannot be reached, but this is as close as it can get. + Invalid(f32, f32), +} + + +impl Ik2Dof { + pub fn new(segment1: IkSegment, segment2: IkSegment) -> Self { + Self { + segment1, + segment2, + arm_style: default(), + } + } + + pub fn reach(&self) -> f32 { self.segment1.len + self.segment2.len } + + /// Solve the inverse kinematics problem for a 2DOF arm using the Law of Cosines technique. + /// Returns angles in radians + pub fn solve(&self, mut target: Vec2) -> (f32, f32) { + let (l1, l2) = (self.segment1.len, self.segment2.len); + let reach = self.reach(); + + // if the target is not reachable, clamp the target to the maximum reach + if target.length_squared() > reach.powi(2) { + target = target.normalize_or_zero() * (reach - f32::EPSILON); + } + + // in the case of negative x, flip the target to positive x + let is_neg = target.x < 0.0; + if target.x < 0. { + target.x = -target.x; + target.y = -target.y; + }; + + + // Calculate angle for segment 2 using the Law of Cosines + let cos_angle2 = + (target.x.powi(2) + target.y.powi(2) - l1.powi(2) - l2.powi(2)) + / (2.0 * l1 * l2); + let angle2 = match self.arm_style { + IkArmStyle::Overarm => -cos_angle2.acos(), + IkArmStyle::Underarm => cos_angle2.acos(), + } + .clamp(self.segment2.min_angle, self.segment2.max_angle); + + // Calculate angle for segment 1 using the Law of Cosines and adjust for target position + let k1 = l1 + l2 * angle2.cos(); + let k2 = l2 * angle2.sin(); + let angle1 = (target.y.atan2(target.x) - k2.atan2(k1)) + .clamp(self.segment1.min_angle, self.segment1.max_angle); + + if is_neg { + (angle1 + PI, angle2) + } else { + (angle1, angle2) + } + } +} + + + + +#[cfg(test)] +mod tests { + use crate::prelude::*; + use bevy::prelude::*; + use std::f32::consts::PI; + + #[test] + fn test_reachable_target() { + let ik_solver = Ik2Dof::default(); + + let target = Vec2::new(1.0, 1.0); + let (angle1, angle2) = ik_solver.solve(target); + + // Assert the angles are within reasonable bounds for this reachable target + assert!((angle1).abs() <= PI); + assert!((angle2).abs() <= PI); + } + + #[test] + fn test_unreachable_target_too_far() { + let ik_solver = Ik2Dof::default(); + + let target = Vec2::new(3.0, 3.0); + let (angle1, angle2) = ik_solver.solve(target); + + // Since the target is unreachable, check if it returns the neutral position or an indicator value + assert_eq!((angle1, angle2), (0.0, 0.0)); + } + + // #[test] + // fn test_unreachable_target_too_close() { + // let ik_solver = Ik2Dof::default(); + + // let target = Vec2::new(0.1, 0.1); + // let (angle1, angle2) = ik_solver.solve(target); + + // // Since the target is unreachable due to being too close, it should also return neutral position + // assert_eq!((angle1, angle2), (0.0, 0.0)); + // } + + #[test] + fn test_within_joint_limits() { + let segment1 = IkSegment { + len: 1.0, + min_angle: -std::f32::consts::FRAC_PI_2, // -90 degrees + max_angle: std::f32::consts::FRAC_PI_2, // 90 degrees + }; + let segment2 = IkSegment { + len: 1.0, + min_angle: -std::f32::consts::FRAC_PI_2, // -90 degrees + max_angle: std::f32::consts::FRAC_PI_2, // 90 degrees + }; + let ik_solver = Ik2Dof::new(segment1, segment2); + + let target = Vec2::new(1.0, 0.0); + let (angle1, angle2) = ik_solver.solve(target); + + // Assert the angles are within the specified joint limits + assert!( + angle1 >= -std::f32::consts::FRAC_PI_2 + && angle1 <= std::f32::consts::FRAC_PI_2 + ); + assert!( + angle2 >= -std::f32::consts::FRAC_PI_2 + && angle2 <= std::f32::consts::FRAC_PI_2 + ); + } +} diff --git a/crates/beet_spatial/src/inverse_kinematics/ik_2dof_transforms.rs b/crates/beet_spatial/src/inverse_kinematics/ik_2dof_transforms.rs new file mode 100644 index 00000000..3a4ec979 --- /dev/null +++ b/crates/beet_spatial/src/inverse_kinematics/ik_2dof_transforms.rs @@ -0,0 +1,83 @@ +use crate::prelude::*; +use bevy::ecs::entity::MapEntities; +use bevy::ecs::reflect::ReflectMapEntities; +use bevy::prelude::*; + + + +#[derive(Debug, Clone, Component, Reflect)] +#[reflect(Component, MapEntities)] +pub struct Ik2DofTransforms { + pub ik: Ik2Dof, + pub target: Entity, + pub segment1: Entity, + pub segment2: Entity, +} + +impl Ik2DofTransforms { + pub fn new( + ik: Ik2Dof, + target: Entity, + segment1: Entity, + segment2: Entity, + ) -> Self { + Self { + ik, + target, + segment1, + segment2, + } + } +} + + +impl MapEntities for Ik2DofTransforms { + fn map_entities(&mut self, entity_mapper: &mut M) { + self.target = entity_mapper.map_entity(self.target); + self.segment1 = entity_mapper.map_entity(self.segment1); + self.segment2 = entity_mapper.map_entity(self.segment2); + } +} + + +pub fn ik_2dof_transforms( + mut transforms: Query<&mut Transform>, + query: Populated<&Ik2DofTransforms>, +) { + for ik_transforms in query.iter() { + let Ok(target) = transforms.get(ik_transforms.target) else { + continue; + }; + // TODO this will need to be rotated etc in 3d + let pos = target.translation.truncate(); + let (angle1, angle2) = ik_transforms.ik.solve(pos); + + if let Ok(mut segment1) = transforms.get_mut(ik_transforms.segment1) { + segment1.rotation = Quat::from_rotation_x(angle1); + } + if let Ok(mut segment2) = transforms.get_mut(ik_transforms.segment2) { + segment2.rotation = Quat::from_rotation_x(angle2); + } + } +} +pub fn ik_2dof_transforms_test( + time: Res