diff --git a/Cargo.lock b/Cargo.lock index f31c2f5..1cb2df5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -41,6 +41,18 @@ dependencies = [ "version_check", ] +[[package]] +name = "ahash" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf6ccdb167abbf410dcb915cabd428929d7f6a04980b54a11f26a39f1c7f7107" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "version_check", +] + [[package]] name = "aho-corasick" version = "0.7.18" @@ -80,14 +92,14 @@ checksum = "85965b6739a430150bdd138e2374a98af0c3ee0d030b3bb7fc3bddff58d0102e" [[package]] name = "android_logger" -version = "0.10.1" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9ed09b18365ed295d722d0b5ed59c01b79a826ff2d2a8f73d5ecca8e6fb2f66" +checksum = "b5e9dd62f37dea550caf48c77591dc50bd1a378ce08855be1a0c42a97b7550fb" dependencies = [ "android_log-sys", "env_logger", - "lazy_static", "log", + "once_cell", ] [[package]] @@ -130,24 +142,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc120354d1b5ec6d7aaf4876b602def75595937b5e15d356eb554ab5177e08bb" dependencies = [ "clipboard-win", - "core-graphics 0.22.3", + "core-graphics", "image 0.23.14", "log", "objc", "objc-foundation", "objc_id", - "parking_lot 0.12.1", + "parking_lot", "thiserror", "winapi", "x11rb", ] -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrayvec" version = "0.7.2" @@ -206,6 +212,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "base-x" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" + [[package]] name = "base64" version = "0.13.0" @@ -214,9 +226,9 @@ checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "bevy" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55f08528a4e59d607460513a823b40f602d013c1a00f57b824f1075d5d48c3cd" +checksum = "3654d60973fcde065efcfe0c9066c81a76987d28c45233998b2ccdc581dcd914" dependencies = [ "bevy_dylib", "bevy_internal", @@ -224,9 +236,9 @@ dependencies = [ [[package]] name = "bevy-inspector-egui" -version = "0.12.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c53ed1cad011e33ea145d2c1f649a966e7457453f3768ddff39bc5064bd525" +checksum = "1bbe6f9142de83d656fb45e9629bd7f3ede71d202439922bdf473814daceefe4" dependencies = [ "bevy", "bevy-inspector-egui-derive", @@ -237,9 +249,9 @@ dependencies = [ [[package]] name = "bevy-inspector-egui-derive" -version = "0.12.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ef6260a46924d40781bcb9da157c110d5166bbd573795e4a16f2505913d0d0" +checksum = "d8369516ed94a814a8794a1e75acbd53e4f250da8f851e75870501ca0e7f083b" dependencies = [ "proc-macro2", "quote", @@ -248,9 +260,9 @@ dependencies = [ [[package]] name = "bevy_animation" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e243169af495ad616ff701247c0d3e40078a26ed8de231cf9e54bde6b3c4bb45" +checksum = "bc8187ba04e1cd4c390a5407502bdb40828e568e2aae9e1628bfe9ebac744f3f" dependencies = [ "bevy_app", "bevy_asset", @@ -266,24 +278,24 @@ dependencies = [ [[package]] name = "bevy_app" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d26d6ffdf493609d2fedc1018a2ef0cb4d8e48f6d3bcea56fa2df81867e464" +checksum = "e7240e455d6976b20d24bf8eda37cd9154116fe9cc2beef7bdc009b4c6fff139" dependencies = [ "bevy_derive", "bevy_ecs", "bevy_reflect", - "bevy_tasks", "bevy_utils", + "downcast-rs", "wasm-bindgen", "web-sys", ] [[package]] name = "bevy_asset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d8fb95306d5f18fa70df40632cd984993aeb71e91ce059ae99699098a4f9ce9" +checksum = "86ca05c472cd4939aed5b2980ad9b416a250ae4674824e8c4b569ddf18ab5230" dependencies = [ "anyhow", "bevy_app", @@ -297,9 +309,9 @@ dependencies = [ "downcast-rs", "fastrand", "js-sys", - "ndk-glue 0.5.2", + "ndk-glue", "notify", - "parking_lot 0.12.1", + "parking_lot", "serde", "thiserror", "wasm-bindgen", @@ -309,9 +321,9 @@ dependencies = [ [[package]] name = "bevy_audio" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee08ac575397ce17477dd291862bafa15226334bdfb82c02bbc3d10bad7bdb8" +checksum = "064d3733a2b4396ba0ca27f187d3957b1621c83d9ae65e7da458e57627d3541b" dependencies = [ "anyhow", "bevy_app", @@ -319,15 +331,15 @@ dependencies = [ "bevy_ecs", "bevy_reflect", "bevy_utils", - "parking_lot 0.12.1", + "parking_lot", "rodio", ] [[package]] name = "bevy_core" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6712146d54fff9e1865362e9f39a7b63c7b037ddb72a3d7bb05b959213fb61e" +checksum = "0d344ff340874fb3f1e458f03eca2b731cb8174495e9c0828f5e4569765489cb" dependencies = [ "bevy_app", "bevy_ecs", @@ -340,27 +352,29 @@ dependencies = [ [[package]] name = "bevy_core_pipeline" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080bb00399b6d7697e505f871d67c6de8b52eb06b47b0cda2be80c2396805983" +checksum = "13523e290f9aad62987e04836d66819fb97afeaf794847b6f64121c62a4db916" dependencies = [ "bevy_app", "bevy_asset", "bevy_derive", "bevy_ecs", + "bevy_math", "bevy_reflect", "bevy_render", "bevy_transform", "bevy_utils", + "bitflags", "radsort", "serde", ] [[package]] name = "bevy_derive" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b8f0786d1fc7e0d35297917be463db3d0886f7bd8d4221ca3d565502579ffb" +checksum = "a12e50d2ff8423438e971c44a90baefc9e351edd45b50b8d077f9ad4f7a0a2a5" dependencies = [ "bevy_macro_utils", "quote", @@ -369,11 +383,12 @@ dependencies = [ [[package]] name = "bevy_diagnostic" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adab74ee5375fbf5d2b1d3da41de8d1491a8a706d17441b5e31214b65349d692" +checksum = "d3415f3a220d8706daac84986d744374fd18883add3a22e894af8cddf2cf1c29" dependencies = [ "bevy_app", + "bevy_core", "bevy_ecs", "bevy_log", "bevy_time", @@ -382,18 +397,18 @@ dependencies = [ [[package]] name = "bevy_dylib" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf5aa9a93a5b8e4314b0adb56803f7f3d95420ec0d8821e17ed0e3ce76ef8be" +checksum = "0d52cc91729fc26ea7038ad49ed773e0577688e328b6f7466be3d5070b45cea9" dependencies = [ "bevy_internal", ] [[package]] name = "bevy_ecs" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5643dc27b7d6778e3a66c8e0f6ad1fd33309aa2fa61d935f360ccc85b7be6a2" +checksum = "43b29e39772df5e8939f7f540ee152569eebeb3c2cc35a68670688ae008ba2cf" dependencies = [ "async-channel", "bevy_ecs_macros", @@ -402,6 +417,7 @@ dependencies = [ "bevy_tasks", "bevy_utils", "downcast-rs", + "event-listener", "fixedbitset", "fxhash", "serde", @@ -410,9 +426,9 @@ dependencies = [ [[package]] name = "bevy_ecs_macros" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5f2f12677f8725d40930d0a19652f007fe0ef5ac38e23817cfc4930c61f5680" +checksum = "10b8e7e7fb3ab9554c77e0f8a2531abd05d40ddb0145a8dfa72434cefa52ee5c" dependencies = [ "bevy_macro_utils", "proc-macro2", @@ -422,9 +438,9 @@ dependencies = [ [[package]] name = "bevy_egui" -version = "0.15.1" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf44ff770566dca66b805a6829df783f64700bd01d35aec1034dff31b531a4" +checksum = "1cec5fb091ccae94917266fe9b1af8339ef1e47763360b38273a31457598b030" dependencies = [ "arboard", "bevy", @@ -435,9 +451,9 @@ dependencies = [ [[package]] name = "bevy_encase_derive" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a767adc36ce1fc917a736843b026d4de7069d90ed5e669c852481ef69fd5aa" +checksum = "3a0773119830d63dde225338c0c556f84cd68e8e69de5b62a1b172fdddc5b915" dependencies = [ "bevy_macro_utils", "encase_derive_impl", @@ -445,9 +461,9 @@ dependencies = [ [[package]] name = "bevy_gilrs" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "963940426127533164af2a556971a03c493143c0afb95afadb4a070b6ab8c3df" +checksum = "a26d02e390b192c3d3b1b746fc2e049420b03f7b8319e7cf3a747babd7d88127" dependencies = [ "bevy_app", "bevy_ecs", @@ -458,9 +474,9 @@ dependencies = [ [[package]] name = "bevy_gltf" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "150cc6782c4472600c2ade5d78c6ce481c992690f0499e63765aba752d7e0f04" +checksum = "fd77158983e09cbbb8115a2c629bdf3249cfff58e8e19f1c62861b1e5495eaf1" dependencies = [ "anyhow", "base64", @@ -487,12 +503,14 @@ dependencies = [ [[package]] name = "bevy_hierarchy" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2e4c20d7c843cd26ef3c5d7b4c20e3e32c275943e2437ecaca1cfd6cfe3b30" +checksum = "23b5181dc3d621c3d18a1209791e82199409d6ddf5376ee19f2e26ad7bfd9b06" dependencies = [ "bevy_app", + "bevy_core", "bevy_ecs", + "bevy_log", "bevy_reflect", "bevy_utils", "smallvec", @@ -500,21 +518,23 @@ dependencies = [ [[package]] name = "bevy_input" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a11c70573fb4d4c056ba32cfa553daa7e6e1245cb876ccfbe322640928b7ee1c" +checksum = "10f72c3037535eb41b863a22c2e58d3845a096401f9b92204b6a240e36a5151b" dependencies = [ "bevy_app", "bevy_ecs", "bevy_math", + "bevy_reflect", "bevy_utils", + "thiserror", ] [[package]] name = "bevy_internal" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d603b597772130782eab6e604706cbb764fb037f9cf0a1904b6f342845b6f44" +checksum = "0ff89c2c2644c588d72cf505f15ad515479705c82ad7aa359ad2249646995a76" dependencies = [ "bevy_animation", "bevy_app", @@ -545,17 +565,18 @@ dependencies = [ "bevy_utils", "bevy_window", "bevy_winit", - "ndk-glue 0.5.2", + "ndk-glue", ] [[package]] name = "bevy_log" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cafb12fc84734236e36f407ab62c72d5d4279fa4777e40a95d7cc973cbabcd1" +checksum = "66c1d5f2cbcf5c3ce87d42afb6ba98177f8f758278364cbc79a2b3bf38415f0e" dependencies = [ "android_log-sys", "bevy_app", + "bevy_ecs", "bevy_utils", "console_error_panic_hook", "tracing-log", @@ -565,9 +586,9 @@ dependencies = [ [[package]] name = "bevy_macro_utils" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d081af83b701e16cad209255ba6b383744dfa49efa99eb6505989f293305ab3" +checksum = "656fa7b3434ac5d5c2883dde3c075f834ff51178f2f48ef2454b6f2ada75cb15" dependencies = [ "quote", "syn", @@ -576,31 +597,33 @@ dependencies = [ [[package]] name = "bevy_math" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db5394e86c5708d3aa506c6e98ec4ed2a4083a7a018c6693d9ac0e77ebfabfc2" +checksum = "b26459575a5f9695788e3487aa0a5f9252562e0fc57065e6f35f370dbfac7d4a" dependencies = [ "glam", + "serde", ] [[package]] name = "bevy_mikktspace" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40b299a61175a6f7e7398f83cd5b50920fd8bad4df674e614ad94f25f8426509" +checksum = "1e67d9caff1be480eb097e1a5ee7332762e19a2ea3d07496017fc8221ea6bc46" dependencies = [ "glam", ] [[package]] name = "bevy_pbr" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176073021a4caeb8b448f24ce790fb57fde74b114f345064a8b102d2f7bed905" +checksum = "5a2e5069b351743e5660f837671135a7aac585cd2c1d7d0b90d92a2d84c2a1fd" dependencies = [ "bevy_app", "bevy_asset", "bevy_core_pipeline", + "bevy_derive", "bevy_ecs", "bevy_math", "bevy_reflect", @@ -615,9 +638,9 @@ dependencies = [ [[package]] name = "bevy_prototype_lyon" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9e44f5ffcbac7114ed9377e6bc875e845c76e5ebb3a5a018169dc37ba5b78d0" +checksum = "3a7b24698a512a43665a11cb272b92be419a01c672409f6fde2f00dcfa821feb" dependencies = [ "bevy", "lyon_tessellation", @@ -626,16 +649,17 @@ dependencies = [ [[package]] name = "bevy_ptr" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d92d5679e89602a18682a37846573dcd1979410179e14204280460ba9fb8713a" +checksum = "c36f4d3af0cda50c07e2010d0351ab79594681116edd280592ca394db73ef32b" [[package]] name = "bevy_reflect" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08798e67f2d4e6898ef117d8c99cf3b50a8eebc8da4159e6dad2657a0fbe9a4e" +checksum = "c39f74d7786a0016c74b6bfb57f44928d536bef8bf6db7505d4cbe9435aeda7b" dependencies = [ + "bevy_math", "bevy_ptr", "bevy_reflect_derive", "bevy_utils", @@ -643,7 +667,7 @@ dependencies = [ "erased-serde", "glam", "once_cell", - "parking_lot 0.12.1", + "parking_lot", "serde", "smallvec", "thiserror", @@ -651,11 +675,12 @@ dependencies = [ [[package]] name = "bevy_reflect_derive" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19209a7f0238053802b7de04e6724bd90d4ed7d90e87101dbd1b64cca64ff694" +checksum = "5b2c0aab36b060e88cd93c56710d9ce8ab6107596dc4cbb8a9d84ba98f39c63b" dependencies = [ "bevy_macro_utils", + "bit-set", "proc-macro2", "quote", "syn", @@ -664,9 +689,9 @@ dependencies = [ [[package]] name = "bevy_render" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb49530388ef17cff3fb8bd5e47372fb3cfeb4befc73e3036f6462ac20f049ef" +checksum = "14033813fdd9587663ffa6b6d84327f30bd0398b40386677704bd4d608625420" dependencies = [ "anyhow", "bevy_app", @@ -687,7 +712,6 @@ dependencies = [ "bevy_window", "bitflags", "codespan-reporting", - "copyless", "downcast-rs", "encase", "futures-lite", @@ -696,7 +720,7 @@ dependencies = [ "image 0.24.3", "naga", "once_cell", - "parking_lot 0.12.1", + "parking_lot", "regex", "serde", "smallvec", @@ -707,9 +731,9 @@ dependencies = [ [[package]] name = "bevy_render_macros" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d0b7a51fa819c20c64f43856c5aaea40f853050bbb09b9ba3672e5ff2688a5" +checksum = "e29db44fb38743a08e71bed324a19b8ce2e9f2853abcb4640e03625dd55cc186" dependencies = [ "bevy_macro_utils", "proc-macro2", @@ -719,9 +743,9 @@ dependencies = [ [[package]] name = "bevy_scene" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0064d73ebb0de39901478b493604a1a6d448fd337b66803004c60f41f1fa6c37" +checksum = "b5b98c58cba6417961856a57ba1116d78db3364b8e791ac517175f04b9abdb6b" dependencies = [ "anyhow", "bevy_app", @@ -741,13 +765,14 @@ dependencies = [ [[package]] name = "bevy_sprite" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69c419f3db09d7ac1f4d45e0874d349d5d6f47f48bc10d55cd0da36413e2331e" +checksum = "b135b2ccf7c5eaf9b3e20e39ef80081842f122081c8ce988cb2054afd1af270e" dependencies = [ "bevy_app", "bevy_asset", "bevy_core_pipeline", + "bevy_derive", "bevy_ecs", "bevy_log", "bevy_math", @@ -757,34 +782,32 @@ dependencies = [ "bevy_utils", "bitflags", "bytemuck", - "copyless", "fixedbitset", "guillotiere", "rectangle-pack", - "serde", "thiserror", ] [[package]] name = "bevy_tasks" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff874c91a36eaac3ef957c6f3b590fb71332d9d136671cc858847d56fe9f80a3" +checksum = "a5d91d94d2db1476d7452509c1967fe83d66da5f683f5d49ba31e0f455adfcdc" dependencies = [ "async-channel", "async-executor", - "event-listener", + "async-task", + "concurrent-queue", "futures-lite", - "num_cpus", "once_cell", "wasm-bindgen-futures", ] [[package]] name = "bevy_text" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef05a788c2c04aaa5db95b22a8f0fff0d3a0b08a7bcd1a71f050a628b38eec6e" +checksum = "fe4282d77fb5dd38bb2a7736a770f5e499782b8c546b9f7d73f6893ab04c8041" dependencies = [ "ab_glyph", "anyhow", @@ -805,9 +828,9 @@ dependencies = [ [[package]] name = "bevy_time" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74ec681d641371df81d7bfbcb0eea725ed873f38a094f34b5f7b436f0889e77c" +checksum = "a259a4b04f5ae2d02998247a69e5a711b0754eb22971320bf727c6f4d7bf38fa" dependencies = [ "bevy_app", "bevy_ecs", @@ -818,9 +841,9 @@ dependencies = [ [[package]] name = "bevy_transform" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42e1528e35f30bede46a50ee4134f150efc01f5c1002c340b3b2e6a0bfcb8aa5" +checksum = "b7b4cdac87f8a58c3ec166b5673dd35565c61eb0ec648e3b0cc30083170c0fb3" dependencies = [ "bevy_app", "bevy_ecs", @@ -831,9 +854,9 @@ dependencies = [ [[package]] name = "bevy_tweening" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "164bcb41708fa1aeb435b6bba6cae61777b9f8cf3e18b207bb6209ca5b970e77" +checksum = "6d38b2abf5518df10c3c32ee57a54b9ba7067f3bd1c137b912e286d573962145" dependencies = [ "bevy", "interpolation", @@ -841,9 +864,9 @@ dependencies = [ [[package]] name = "bevy_ui" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "062ce086de1a4a470e5df48cb5c16a1dc97ab610e635cafabdef26c4a1ef5756" +checksum = "da6d85fcefe5a2bf259c2ff58a7a29b6102070242dc385b42a2656f4e8918883" dependencies = [ "bevy_app", "bevy_asset", @@ -865,15 +888,16 @@ dependencies = [ "serde", "smallvec", "taffy", + "thiserror", ] [[package]] name = "bevy_utils" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda6dada53e546845887ae7357eec57b8d547ef71627b716b33839b4a98b687" +checksum = "1d7473635355a99fcf7181091a2ac11df03561706b1696cb0cc72e4ddd010571" dependencies = [ - "ahash", + "ahash 0.7.6", "getrandom", "hashbrown", "instant", @@ -883,24 +907,24 @@ dependencies = [ [[package]] name = "bevy_window" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707dbbebfac72b1e63e874e7a11a345feab8c440355c0bd71e6dff26709fba9a" +checksum = "07a0d03022a6d1ec0d05c01a77f5592a9602bbc1cfc11ba457788b69f9ca175d" dependencies = [ "bevy_app", "bevy_ecs", "bevy_input", "bevy_math", + "bevy_reflect", "bevy_utils", - "raw-window-handle", - "web-sys", + "raw-window-handle 0.5.0", ] [[package]] name = "bevy_winit" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57537a56ac4f4e1ffcad95227bcab37cd17b51770dacff82374a2d88be376322" +checksum = "ebc7b4e4f83e268dcbd6f9c4e1c18f7382e457f5f1b160da4c85d9a3f489771a" dependencies = [ "approx", "bevy_app", @@ -910,7 +934,7 @@ dependencies = [ "bevy_utils", "bevy_window", "crossbeam-channel", - "raw-window-handle", + "raw-window-handle 0.5.0", "wasm-bindgen", "web-sys", "winit", @@ -1006,6 +1030,19 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" +[[package]] +name = "calloop" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bcf530afb40e45e14440701e5e996d7fd139e84a912a4d83a8d6a0fb3e58663" +dependencies = [ + "log", + "nix 0.25.0", + "slotmap", + "thiserror", + "vec_map", +] + [[package]] name = "cc" version = "1.0.73" @@ -1030,12 +1067,6 @@ dependencies = [ "nom", ] -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -1079,8 +1110,8 @@ dependencies = [ "bitflags", "block", "cocoa-foundation", - "core-foundation 0.9.3", - "core-graphics 0.22.3", + "core-foundation", + "core-graphics", "foreign-types", "libc", "objc", @@ -1094,7 +1125,7 @@ checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" dependencies = [ "bitflags", "block", - "core-foundation 0.9.3", + "core-foundation", "core-graphics-types", "foreign-types", "libc", @@ -1142,7 +1173,7 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen", ] @@ -1152,56 +1183,22 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c0358e41e90e443c69b2b2811f6ec9892c228b93620634cf4344fe89967fa9f" -[[package]] -name = "copyless" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2df960f5d869b2dd8532793fde43eb5427cceb126c929747a26823ab0eeb536" - -[[package]] -name = "core-foundation" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" -dependencies = [ - "core-foundation-sys 0.7.0", - "libc", -] - [[package]] name = "core-foundation" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ - "core-foundation-sys 0.8.3", + "core-foundation-sys", "libc", ] -[[package]] -name = "core-foundation-sys" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" - [[package]] name = "core-foundation-sys" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" -[[package]] -name = "core-graphics" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3889374e6ea6ab25dba90bb5d96202f61108058361f6dc72e8b03e6f8bbe923" -dependencies = [ - "bitflags", - "core-foundation 0.7.0", - "foreign-types", - "libc", -] - [[package]] name = "core-graphics" version = "0.22.3" @@ -1209,7 +1206,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" dependencies = [ "bitflags", - "core-foundation 0.9.3", + "core-foundation", "core-graphics-types", "foreign-types", "libc", @@ -1222,24 +1219,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" dependencies = [ "bitflags", - "core-foundation 0.9.3", + "core-foundation", "foreign-types", "libc", ] -[[package]] -name = "core-video-sys" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ecad23610ad9757664d644e369246edde1803fcb43ed72876565098a5d3828" -dependencies = [ - "cfg-if 0.1.10", - "core-foundation-sys 0.7.0", - "core-graphics 0.19.2", - "libc", - "objc", -] - [[package]] name = "coreaudio-rs" version = "0.10.0" @@ -1261,28 +1245,28 @@ dependencies = [ [[package]] name = "cpal" -version = "0.13.5" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74117836a5124f3629e4b474eed03e479abaf98988b4bb317e29f08cfe0e4116" +checksum = "e73413ddcb69c398125f5529714492e070c64c6a090ad5b01d8c082b320a0809" dependencies = [ "alsa", - "core-foundation-sys 0.8.3", + "core-foundation-sys", "coreaudio-rs", - "jni", + "jni 0.19.0", "js-sys", - "lazy_static", "libc", "mach", - "ndk 0.6.0", - "ndk-glue 0.6.2", - "nix 0.23.1", + "ndk 0.7.0", + "ndk-context", + "nix 0.25.0", "oboe", - "parking_lot 0.11.2", + "once_cell", + "parking_lot", "stdweb", "thiserror", "wasm-bindgen", "web-sys", - "winapi", + "windows", ] [[package]] @@ -1291,7 +1275,7 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -1300,7 +1284,7 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] @@ -1310,7 +1294,7 @@ version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", ] @@ -1385,12 +1369,27 @@ dependencies = [ "adler32", ] +[[package]] +name = "discard" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" + [[package]] name = "dispatch" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" +[[package]] +name = "dlib" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" +dependencies = [ + "libloading", +] + [[package]] name = "downcast-rs" version = "1.2.0" @@ -1399,29 +1398,29 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "egui" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb095a8b9feb9b7ff8f00b6776dffcef059538a3f4a91238e03c900e9c9ad9a2" +checksum = "fc9fcd393c3daaaf5909008a1d948319d538b79c51871e4df0993260260a94e4" dependencies = [ - "ahash", + "ahash 0.8.2", "epaint", "nohash-hasher", ] [[package]] name = "emath" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c223f58c7e38abe1770f367b969f1b3fbd4704b67666bcb65dbb1adb0980ba72" +checksum = "9542a40106fdba943a055f418d1746a050e1a903a049b030c2b097d4686a33cf" dependencies = [ "bytemuck", ] [[package]] name = "encase" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a516181e9a36e8982cb37933c5e7dba638c42938cacde46ee4e5b4156f881b9" +checksum = "c6bdd416eb91cd6fb73a22fbc9fa1ea013641cce1a58905c31623ff9c562e811" dependencies = [ "const_panic", "encase_derive", @@ -1431,18 +1430,18 @@ dependencies = [ [[package]] name = "encase_derive" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5b802412eea315f29f2bb2da3a5963cd6121f56eaa06aebcdc0c54eea578f22" +checksum = "df06cd7ea02426c2a0a164656bf116813584b461b8a7bb059b7941ab981105d3" dependencies = [ "encase_derive_impl", ] [[package]] name = "encase_derive_impl" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2f4de457d974f548d2c2a16f709ebd81013579e543bd1a9b19ced88132c2cf" +checksum = "b299aab48b9a897ddd730dde2b5550af7c90ec6779c78e3c70f4c28d9337663f" dependencies = [ "proc-macro2", "quote", @@ -1451,9 +1450,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.8.4" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" dependencies = [ "log", "regex", @@ -1461,24 +1460,24 @@ dependencies = [ [[package]] name = "epaint" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c29567088888e8ac3e8f61bbb2ddc820207ebb8d69eefde5bcefa06d65e4e89" +checksum = "5ba04741be7f6602b1a1b28f1082cce45948a7032961c52814f8946b28493300" dependencies = [ "ab_glyph", - "ahash", + "ahash 0.8.2", "atomic_refcell", "bytemuck", "emath", "nohash-hasher", - "parking_lot 0.12.1", + "parking_lot", ] [[package]] name = "erased-serde" -version = "0.3.22" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003000e712ad0f95857bd4d2ef8d1890069e06554101697d12050668b2f6f020" +checksum = "54558e0ba96fbe24280072642eceb9d7d442e32c7ec0ea9e7ecd7b4ea2cf4e11" dependencies = [ "serde", ] @@ -1523,7 +1522,7 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e94a7bbaa59354bc20dd75b67f23e2797b4490e9d6928203fb105c79e448c86c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall", "windows-sys", @@ -1535,12 +1534,6 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" -[[package]] -name = "float-cmp" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75224bec9bfe1a65e2d34132933f2de7fe79900c96a0174307554244ece8150e" - [[package]] name = "float_next_after" version = "0.1.5" @@ -1642,7 +1635,7 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "libc", "wasi", @@ -1668,7 +1661,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96a8d94a7fc5afd27e894e08a4cfe5a49237f85bcc7140e90721bad3399c7d02" dependencies = [ - "core-foundation 0.9.3", + "core-foundation", "io-kit-sys", "js-sys", "libc", @@ -1685,9 +1678,9 @@ dependencies = [ [[package]] name = "glam" -version = "0.21.3" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "518faa5064866338b013ff9b2350dc318e14cc4fcd6cb8206d7e7c9886c98815" +checksum = "12f597d56c1bd55a811a1be189459e8fad2bbc272616375602443bdfb37fa774" dependencies = [ "bytemuck", "serde", @@ -1832,19 +1825,10 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash", + "ahash 0.7.6", "serde", ] -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hex" version = "0.4.3" @@ -1853,9 +1837,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hexasphere" -version = "7.2.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9652f2ed7ee9c6374a061039f60fc6e25d7adac7fa10f83365669af3b24b0bf0" +checksum = "619ce654558681d7d0a7809e1b20249c7032ff13ee6baa7bb7ff64f7f28a906a" dependencies = [ "glam", "once_cell", @@ -1951,19 +1935,13 @@ dependencies = [ "libc", ] -[[package]] -name = "inplace_it" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67f0347836f3f6362c1e7efdadde2b1c4b4556d211310b70631bae7eb692070b" - [[package]] name = "instant" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -1981,7 +1959,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7789f7f3c9686f96164f5109d69152de759e76e284f736bd57661c6df5091919" dependencies = [ - "core-foundation-sys 0.8.3", + "core-foundation-sys", "mach", ] @@ -2005,6 +1983,20 @@ dependencies = [ "walkdir", ] +[[package]] +name = "jni" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "039022cdf4d7b1cf548d31f60ae783138e5fd42013f6271049d7df7afadef96c" +dependencies = [ + "cesu8", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", +] + [[package]] name = "jni-sys" version = "0.3.0" @@ -2028,9 +2020,9 @@ checksum = "229d53d58899083193af11e15917b5640cd40b29ff475a1fe4ef725deb02d0f2" [[package]] name = "js-sys" -version = "0.3.59" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] @@ -2101,10 +2093,16 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "winapi", ] +[[package]] +name = "libm" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" + [[package]] name = "libudev-sys" version = "0.1.4" @@ -2117,9 +2115,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +checksum = "9f80bf5aacaf25cbfc8210d1cfb718f2bf3b11c4c54e5afe36c236853a8ec390" dependencies = [ "autocfg", "scopeguard", @@ -2131,37 +2129,39 @@ version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] name = "lyon_geom" -version = "0.17.7" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d89ccbdafd83d259403e22061be27bccc3254bba65cdc5303250c4227c8c8e" +checksum = "5237e77afe5a112d5ce8060e3473e78b09b5f8cea722a251dcafa1254711f440" dependencies = [ - "arrayvec 0.5.2", + "arrayvec", "euclid", "num-traits", ] [[package]] name = "lyon_path" -version = "0.17.7" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0a59fdf767ca0d887aa61d1b48d4bbf6a124c1a45503593f7d38ab945bfbc0" +checksum = "2b2a6c0d4a27bb3fe8b747184caf79a57b8bd2caeee49c0f9e59d068d30f7a0d" dependencies = [ "lyon_geom", + "num-traits", ] [[package]] name = "lyon_tessellation" -version = "0.17.10" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7230e08dd0638048e46f387f255dbe7a7344a3e6705beab53242b5af25635760" +checksum = "9ba55cb38c7c601bc578e30164ec0f806a3e731c2593c8702500901cd4c363a4" dependencies = [ "float_next_after", "lyon_path", + "thiserror", ] [[package]] @@ -2203,6 +2203,15 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +[[package]] +name = "memmap2" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.6.5" @@ -2274,9 +2283,9 @@ dependencies = [ [[package]] name = "naga" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f50357e1167a3ab92d6b3c7f4bf5f7fd13fde3f4b28bf0d5ea07b5100fdb6c0" +checksum = "262d2840e72dbe250e8cf2f522d080988dfca624c4112c096238a4845f591707" dependencies = [ "bit-set", "bitflags", @@ -2294,19 +2303,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "ndk" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d868f654c72e75f8687572699cdabe755f03effbb62542768e995d5b8d699d" -dependencies = [ - "bitflags", - "jni-sys", - "ndk-sys 0.2.2", - "num_enum", - "thiserror", -] - [[package]] name = "ndk" version = "0.6.0" @@ -2320,6 +2316,20 @@ dependencies = [ "thiserror", ] +[[package]] +name = "ndk" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" +dependencies = [ + "bitflags", + "jni-sys", + "ndk-sys 0.4.0", + "num_enum", + "raw-window-handle 0.5.0", + "thiserror", +] + [[package]] name = "ndk-context" version = "0.1.1" @@ -2328,33 +2338,19 @@ checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] name = "ndk-glue" -version = "0.5.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71bee8ea72d685477e28bd004cfe1bf99c754d688cd78cad139eae4089484d4" +checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f" dependencies = [ "android_logger", - "lazy_static", "libc", "log", - "ndk 0.5.0", + "ndk 0.7.0", "ndk-context", "ndk-macro", - "ndk-sys 0.2.2", -] - -[[package]] -name = "ndk-glue" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d0c4a7b83860226e6b4183edac21851f05d5a51756e97a1144b7f5a6b63e65f" -dependencies = [ - "lazy_static", - "libc", - "log", - "ndk 0.6.0", - "ndk-context", - "ndk-macro", - "ndk-sys 0.3.0", + "ndk-sys 0.4.0", + "once_cell", + "parking_lot", ] [[package]] @@ -2370,12 +2366,6 @@ dependencies = [ "syn", ] -[[package]] -name = "ndk-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1bcdd74c20ad5d95aacd60ef9ba40fdf77f767051040541df557b7a9b2a2121" - [[package]] name = "ndk-sys" version = "0.3.0" @@ -2385,6 +2375,15 @@ dependencies = [ "jni-sys", ] +[[package]] +name = "ndk-sys" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21d83ec9c63ec5bf950200a8e508bdad6659972187b625469f58ef8c08e29046" +dependencies = [ + "jni-sys", +] + [[package]] name = "nix" version = "0.22.3" @@ -2393,7 +2392,7 @@ checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf" dependencies = [ "bitflags", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "memoffset", ] @@ -2406,7 +2405,7 @@ checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6" dependencies = [ "bitflags", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "memoffset", ] @@ -2418,8 +2417,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" dependencies = [ "bitflags", - "cfg-if 1.0.0", + "cfg-if", "libc", + "memoffset", +] + +[[package]] +name = "nix" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e322c04a9e3440c327fca7b6c8a63e6890a32fa2ad689db972425f07e0d22abb" +dependencies = [ + "autocfg", + "bitflags", + "cfg-if", + "libc", + "memoffset", + "pin-utils", ] [[package]] @@ -2440,9 +2454,9 @@ dependencies = [ [[package]] name = "notify" -version = "5.0.0-pre.15" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "553f9844ad0b0824605c20fb55a661679782680410abfb1a8144c2e7e437e7a7" +checksum = "ed2c66da08abae1c024c01d635253e402341b4060a12e99b31c7594063bf490a" dependencies = [ "bitflags", "crossbeam-channel", @@ -2517,16 +2531,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" -dependencies = [ - "hermit-abi", - "libc", + "libm", ] [[package]] @@ -2595,7 +2600,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27f63c358b4fa0fbcfefd7c8be5cfc39c08ce2389f5325687e7762a48d30a5c1" dependencies = [ - "jni", + "jni 0.19.0", "ndk 0.6.0", "ndk-context", "num-derive", @@ -2642,17 +2647,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.5", -] - [[package]] name = "parking_lot" version = "0.12.1" @@ -2660,21 +2654,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.3", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" -dependencies = [ - "cfg-if 1.0.0", - "instant", - "libc", - "redox_syscall", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -2683,7 +2663,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall", "smallvec", @@ -2718,6 +2698,12 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + [[package]] name = "pkg-config" version = "0.3.25" @@ -2819,6 +2805,15 @@ dependencies = [ "cty", ] +[[package]] +name = "raw-window-handle" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed7e3d950b66e19e0c372f3fa3fbbcf85b1746b571f74e0c2af6042a5c93420a" +dependencies = [ + "cty", +] + [[package]] name = "rectangle-pack" version = "0.4.2" @@ -2868,9 +2863,9 @@ checksum = "f1382d1f0a252c4bf97dc20d979a2fdd05b024acd7c2ed0f7595d7817666a157" [[package]] name = "rodio" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0939e9f626e6c6f1989adb6226a039c855ca483053f0ee7c98b90e41cf731e" +checksum = "eb10b653d5ec0e9411a2e7d46e2c7f4046fd87d35b9955bd73ba4108d69072b5" dependencies = [ "cpal", "lewton", @@ -2878,9 +2873,9 @@ dependencies = [ [[package]] name = "ron" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88073939a61e5b7680558e6be56b419e208420c2adb92be54921fa6b72283f1a" +checksum = "300a51053b1cb55c80b7a9fde4120726ddf25ca241a1cbb926626f62fb136bff" dependencies = [ "base64", "bitflags", @@ -2893,6 +2888,15 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver", +] + [[package]] name = "rusty-xinput" version = "1.2.0" @@ -2919,6 +2923,12 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "scoped_threadpool" version = "0.1.9" @@ -2931,6 +2941,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + [[package]] name = "serde" version = "1.0.144" @@ -2953,15 +2978,30 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.83" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38dd04e3c8279e75b31ef29dbdceebfe5ad89f4d0937213c53f7d49d01b3d5a7" +checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" dependencies = [ "itoa", "ryu", "serde", ] +[[package]] +name = "sha1" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" +dependencies = [ + "sha1_smol", +] + +[[package]] +name = "sha1_smol" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" + [[package]] name = "sharded-slab" version = "0.1.4" @@ -2979,9 +3019,9 @@ checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" [[package]] name = "siphasher" -version = "0.2.3" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" +checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" [[package]] name = "slab" @@ -3010,6 +3050,25 @@ dependencies = [ "serde", ] +[[package]] +name = "smithay-client-toolkit" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" +dependencies = [ + "bitflags", + "calloop", + "dlib", + "lazy_static", + "log", + "memmap2", + "nix 0.24.2", + "pkg-config", + "wayland-client", + "wayland-cursor", + "wayland-protocols", +] + [[package]] name = "spirv" version = "0.2.0+1.5.4" @@ -3021,10 +3080,59 @@ dependencies = [ ] [[package]] -name = "stdweb" -version = "0.1.3" +name = "static_assertions" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef5430c8e36b713e13b48a9f709cc21e046723fe44ce34587b73a830203b533e" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "stdweb" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" +dependencies = [ + "discard", + "rustc_version", + "stdweb-derive", + "stdweb-internal-macros", + "stdweb-internal-runtime", + "wasm-bindgen", +] + +[[package]] +name = "stdweb-derive" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "serde_derive", + "syn", +] + +[[package]] +name = "stdweb-internal-macros" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" +dependencies = [ + "base-x", + "proc-macro2", + "quote", + "serde", + "serde_derive", + "serde_json", + "sha1", + "syn", +] + +[[package]] +name = "stdweb-internal-runtime" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" [[package]] name = "str-buf" @@ -3046,11 +3154,10 @@ checksum = "8fb1df15f412ee2e9dfc1c504260fa695c1c3f10fe9f4a6ee2d2184d7d6450e2" [[package]] name = "svgtypes" -version = "0.5.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c536faaff1a10837cfe373142583f6e27d81e96beba339147e77b67c9f260ff" +checksum = "22975e8a2bac6a76bb54f898a6b18764633b00e780330f0b689f65afb3975564" dependencies = [ - "float-cmp", "siphasher", ] @@ -3071,7 +3178,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec27dea659b100d489dffa57cf0efc6d7bfefb119af817b92cc14006c0b214e3" dependencies = [ - "arrayvec 0.7.2", + "arrayvec", "hash32", "hash32-derive", "num-traits", @@ -3157,7 +3264,7 @@ version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -3236,8 +3343,10 @@ version = "0.1.0" dependencies = [ "bevy", "bevy-inspector-egui", + "bevy_egui", "bevy_prototype_lyon", "bevy_tweening", + "egui", "num-traits", ] @@ -3345,19 +3454,19 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", "log", @@ -3370,11 +3479,11 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.32" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa76fb221a1f8acddf5b54ace85912606980ad661ac7a503b4570ffd3a624dad" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -3382,9 +3491,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3392,9 +3501,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -3405,15 +3514,87 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" + +[[package]] +name = "wayland-client" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" +dependencies = [ + "bitflags", + "downcast-rs", + "libc", + "nix 0.24.2", + "scoped-tls", + "wayland-commons", + "wayland-scanner", + "wayland-sys", +] + +[[package]] +name = "wayland-commons" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" +dependencies = [ + "nix 0.24.2", + "once_cell", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-cursor" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" +dependencies = [ + "nix 0.24.2", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" +dependencies = [ + "bitflags", + "wayland-client", + "wayland-commons", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" +dependencies = [ + "proc-macro2", + "quote", + "xml-rs", +] + +[[package]] +name = "wayland-sys" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" +dependencies = [ + "dlib", + "pkg-config", +] [[package]] name = "web-sys" -version = "0.3.59" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" dependencies = [ "js-sys", "wasm-bindgen", @@ -3421,12 +3602,14 @@ dependencies = [ [[package]] name = "webbrowser" -version = "0.7.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6a3cffdb686fbb24d9fb8f03a213803277ed2300f11026a3afe1f108dc021b" +checksum = "2a0cc7962b5aaa0dfcebaeef0161eec6edf5f4606c12e6777fd7d392f52033a5" dependencies = [ - "jni", - "ndk-glue 0.6.2", + "jni 0.20.0", + "ndk-context", + "objc", + "raw-window-handle 0.5.0", "url", "web-sys", "widestring", @@ -3441,17 +3624,18 @@ checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" [[package]] name = "wgpu" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "277e967bf8b7820a76852645a6bce8bbd31c32fda2042e82d8e3ea75fda8892d" +checksum = "c2272b17bffc8a0c7d53897435da7c1db587c87d3a14e8dae9cdb8d1d210fc0f" dependencies = [ - "arrayvec 0.7.2", + "arrayvec", "js-sys", "log", "naga", - "parking_lot 0.12.1", - "raw-window-handle", + "parking_lot", + "raw-window-handle 0.5.0", "smallvec", + "static_assertions", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -3462,22 +3646,21 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "0.13.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b92788dec9d0c1bed849a1b83f01b2ee12819bf04a79c90f68e4173f7b5ba2" +checksum = "73d14cad393054caf992ee02b7da6a372245d39a484f7461c1f44f6f6359bd28" dependencies = [ - "arrayvec 0.7.2", + "arrayvec", "bit-vec", "bitflags", "cfg_aliases", "codespan-reporting", - "copyless", "fxhash", "log", "naga", - "parking_lot 0.12.1", + "parking_lot", "profiling", - "raw-window-handle", + "raw-window-handle 0.5.0", "smallvec", "thiserror", "web-sys", @@ -3487,12 +3670,12 @@ dependencies = [ [[package]] name = "wgpu-hal" -version = "0.13.2" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cbdfc3d0637dba3d5536b93adef3d26023a0b96f0e1ee5ee9560a401d9f646" +checksum = "3cc320a61acb26be4f549c9b1b53405c10a223fbfea363ec39474c32c348d12f" dependencies = [ "android_system_properties", - "arrayvec 0.7.2", + "arrayvec", "ash", "bit-set", "bitflags", @@ -3504,7 +3687,6 @@ dependencies = [ "glow", "gpu-alloc", "gpu-descriptor", - "inplace_it", "js-sys", "khronos-egl", "libloading", @@ -3512,11 +3694,12 @@ dependencies = [ "metal", "naga", "objc", - "parking_lot 0.12.1", + "parking_lot", "profiling", "range-alloc", - "raw-window-handle", + "raw-window-handle 0.5.0", "renderdoc-sys", + "smallvec", "thiserror", "wasm-bindgen", "web-sys", @@ -3526,9 +3709,9 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "0.13.2" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f762cbc08e1a51389859cf9c199c7aef544789cf3510889aab12c607f701604" +checksum = "fb6b28ef22cac17b9109b25b3bf8c9a103eeb293d7c5f78653979b09140375f6" dependencies = [ "bitflags", ] @@ -3579,17 +3762,30 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57b543186b344cc61c85b5aab0d2e3adf4e0f99bc076eff9aa5927bcc0b8a647" +dependencies = [ + "windows_aarch64_msvc 0.37.0", + "windows_i686_gnu 0.37.0", + "windows_i686_msvc 0.37.0", + "windows_x86_64_gnu 0.37.0", + "windows_x86_64_msvc 0.37.0", +] + [[package]] name = "windows-sys" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" dependencies = [ - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_msvc", + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", ] [[package]] @@ -3598,24 +3794,48 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +[[package]] +name = "windows_aarch64_msvc" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2623277cb2d1c216ba3b578c0f3cf9cdebeddb6e66b1b218bb33596ea7769c3a" + [[package]] name = "windows_i686_gnu" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +[[package]] +name = "windows_i686_gnu" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3925fd0b0b804730d44d4b6278c50f9699703ec49bcd628020f46f4ba07d9e1" + [[package]] name = "windows_i686_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +[[package]] +name = "windows_i686_msvc" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce907ac74fe331b524c1298683efbf598bb031bc84d5e274db2083696d07c57c" + [[package]] name = "windows_x86_64_gnu" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2babfba0828f2e6b32457d5341427dcbb577ceef556273229959ac23a10af33d" + [[package]] name = "windows_x86_64_msvc" version = "0.36.1" @@ -3623,32 +3843,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] -name = "winit" -version = "0.26.1" +name = "windows_x86_64_msvc" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b43cc931d58b99461188607efd7acb2a093e65fc621f54cad78517a6063e73a" +checksum = "f4dd6dc7df2d84cf7b33822ed5b86318fb1781948e9663bacd047fc9dd52259d" + +[[package]] +name = "winit" +version = "0.27.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb796d6fbd86b2fd896c9471e6f04d39d750076ebe5680a3958f00f5ab97657c" dependencies = [ "bitflags", "cocoa", - "core-foundation 0.9.3", - "core-graphics 0.22.3", - "core-video-sys", + "core-foundation", + "core-graphics", "dispatch", "instant", - "lazy_static", "libc", "log", "mio", - "ndk 0.5.0", - "ndk-glue 0.5.2", - "ndk-sys 0.2.2", + "ndk 0.7.0", + "ndk-glue", "objc", - "parking_lot 0.11.2", + "once_cell", + "parking_lot", "percent-encoding", - "raw-window-handle", + "raw-window-handle 0.4.3", + "raw-window-handle 0.5.0", + "smithay-client-toolkit", "wasm-bindgen", + "wayland-client", + "wayland-protocols", "web-sys", - "winapi", + "windows-sys", "x11-dl", ] @@ -3675,8 +3903,23 @@ dependencies = [ "winapi-wsapoll", ] +[[package]] +name = "xcursor" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "463705a63313cd4301184381c5e8042f0a7e9b4bb63653f216311d4ae74690b7" +dependencies = [ + "nom", +] + [[package]] name = "xi-unicode" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a67300977d3dc3f8034dae89778f502b6ba20b269527b3223ba59c0cf393bb8a" + +[[package]] +name = "xml-rs" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" diff --git a/Cargo.toml b/Cargo.toml index f3eb87b..b15dab4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,10 +7,12 @@ default-run = "turtlers" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -bevy = { version = "0.8", features = ["dynamic"] } -bevy-inspector-egui = "0.12" -bevy_prototype_lyon = "0.6" -bevy_tweening = "0.5" +bevy = { version = "0.9", features = ["dynamic", "wayland"] } +bevy-inspector-egui = "0.14" +bevy_egui = "0.17" +egui = "0.19" +bevy_prototype_lyon = {version="0.7"} +bevy_tweening = {version="0.6"} num-traits = "0.2" # Enable a small amount of optimization in debug mode diff --git a/TODO.md b/TODO.md index 40b2a6d..ac5f126 100644 --- a/TODO.md +++ b/TODO.md @@ -1 +1 @@ -*[x] make the \ No newline at end of file +*[ ] Minimal example of filled animation \ No newline at end of file diff --git a/src/animation_step.rs b/src/animation_step.rs index 438cd75..fb56330 100644 --- a/src/animation_step.rs +++ b/src/animation_step.rs @@ -22,11 +22,11 @@ pub(crate) fn run_animation_step( turtle.set_tweenable(turtle_animation); match graph_element_to_draw { TurtleGraphElement::TurtleLine(line) => { - commands.spawn_bundle(line).insert(line_animation); + commands.spawn((line, line_animation)); } TurtleGraphElement::Noop => (), TurtleGraphElement::TurtleCircle(circle) => { - commands.spawn_bundle(circle).insert(line_animation); + commands.spawn((circle, line_animation)); } } return; diff --git a/src/bin/animation.rs b/src/bin/animation.rs deleted file mode 100644 index f5c6444..0000000 --- a/src/bin/animation.rs +++ /dev/null @@ -1,143 +0,0 @@ -//! Create and play an animation defined by code that operates on the `Transform` component. - -use std::f32::consts::{FRAC_PI_2, PI}; - -use bevy::prelude::*; - -fn main() { - App::new() - .add_plugins(DefaultPlugins) - .insert_resource(AmbientLight { - color: Color::WHITE, - brightness: 1.0, - }) - .add_startup_system(setup) - .run(); -} - -fn setup( - mut commands: Commands, - mut meshes: ResMut>, - mut materials: ResMut>, - mut animations: ResMut>, -) { - // Camera - commands.spawn_bundle(Camera3dBundle { - transform: Transform::from_xyz(-2.0, 2.5, 5.0).looking_at(Vec3::ZERO, Vec3::Y), - ..default() - }); - - // The animation API uses the `Name` component to target entities - let planet = Name::new("planet"); - let orbit_controller = Name::new("orbit_controller"); - let satellite = Name::new("satellite"); - - // Creating the animation - let mut animation = AnimationClip::default(); - // A curve can modify a single part of a transform, here the translation - animation.add_curve_to_path( - EntityPath { - parts: vec![planet.clone()], - }, - VariableCurve { - keyframe_timestamps: vec![0.0, 1.0, 2.0, 3.0, 4.0], - keyframes: Keyframes::Translation(vec![ - Vec3::new(1.0, 0.0, 1.0), - Vec3::new(-1.0, 0.0, 1.0), - Vec3::new(-1.0, 0.0, -1.0), - Vec3::new(1.0, 0.0, -1.0), - // in case seamless looping is wanted, the last keyframe should - // be the same as the first one - Vec3::new(1.0, 0.0, 1.0), - ]), - }, - ); - // Or it can modify the rotation of the transform. - // To find the entity to modify, the hierarchy will be traversed looking for - // an entity with the right name at each level - animation.add_curve_to_path( - EntityPath { - parts: vec![planet.clone(), orbit_controller.clone()], - }, - VariableCurve { - keyframe_timestamps: vec![0.0, 1.0, 2.0, 3.0, 4.0], - keyframes: Keyframes::Rotation(vec![ - Quat::from_axis_angle(Vec3::Y, 0.0), - Quat::from_axis_angle(Vec3::Y, FRAC_PI_2), - Quat::from_axis_angle(Vec3::Y, PI), - Quat::from_axis_angle(Vec3::Y, 3.0 * FRAC_PI_2), - Quat::from_axis_angle(Vec3::Y, 0.0), - ]), - }, - ); - // If a curve in an animation is shorter than the other, it will not repeat - // until all other curves are finished. In that case, another animation should - // be created for each part that would have a different duration / period - animation.add_curve_to_path( - EntityPath { - parts: vec![planet.clone(), orbit_controller.clone(), satellite.clone()], - }, - VariableCurve { - keyframe_timestamps: vec![0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0], - keyframes: Keyframes::Scale(vec![ - Vec3::splat(0.8), - Vec3::splat(1.2), - Vec3::splat(0.8), - Vec3::splat(1.2), - Vec3::splat(0.8), - Vec3::splat(1.2), - Vec3::splat(0.8), - Vec3::splat(1.2), - Vec3::splat(0.8), - ]), - }, - ); - // There can be more than one curve targeting the same entity path - animation.add_curve_to_path( - EntityPath { - parts: vec![planet.clone(), orbit_controller.clone(), satellite.clone()], - }, - VariableCurve { - keyframe_timestamps: vec![0.0, 1.0, 2.0, 3.0, 4.0], - keyframes: Keyframes::Rotation(vec![ - Quat::from_axis_angle(Vec3::Y, 0.0), - Quat::from_axis_angle(Vec3::Y, FRAC_PI_2), - Quat::from_axis_angle(Vec3::Y, PI), - Quat::from_axis_angle(Vec3::Y, 3.0 * FRAC_PI_2), - Quat::from_axis_angle(Vec3::Y, 0.0), - ]), - }, - ); - - // Create the animation player, and set it to repeat - let mut player = AnimationPlayer::default(); - player.play(animations.add(animation)).repeat(); - - // Create the scene that will be animated - // First entity is the planet - commands - .spawn_bundle(PbrBundle { - mesh: meshes.add(Mesh::from(shape::Icosphere::default())), - material: materials.add(Color::rgb(0.8, 0.7, 0.6).into()), - ..default() - }) - // Add the Name component, and the animation player - .insert_bundle((planet, player)) - .with_children(|p| { - // This entity is just used for animation, but doesn't display anything - p.spawn_bundle(SpatialBundle::default()) - // Add the Name component - .insert(orbit_controller) - .with_children(|p| { - // The satellite, placed at a distance of the planet - p.spawn_bundle(PbrBundle { - transform: Transform::from_xyz(1.5, 0.0, 0.0), - mesh: meshes.add(Mesh::from(shape::Cube { size: 0.5 })), - material: materials.add(Color::rgb(0.3, 0.9, 0.3).into()), - ..default() - }) - // Add the Name component - .insert(satellite); - }); - }); -} diff --git a/src/bin/bevy_egui_test.rs b/src/bin/bevy_egui_test.rs new file mode 100644 index 0000000..5987cb3 --- /dev/null +++ b/src/bin/bevy_egui_test.rs @@ -0,0 +1,114 @@ +use bevy::{app::AppExit, prelude::*}; +use bevy_egui::{egui, EguiContext, EguiPlugin}; +use bevy_prototype_lyon::prelude::{ + DrawMode, FillMode, FillOptions, GeometryBuilder, Path, PathBuilder, ShapePlugin, StrokeMode, +}; + +#[derive(Default, Resource)] +struct OccupiedScreenSpace { + left: f32, + top: f32, + right: f32, + bottom: f32, +} + +#[derive(Default, Resource)] +struct Line { + x: f32, + y: f32, +} + +#[derive(Resource, Deref, DerefMut)] +struct OriginalCameraTransform(Transform); + +fn main() { + App::new() + .add_plugins(DefaultPlugins.set(WindowPlugin { + window: WindowDescriptor { + width: 700.0, + height: 500.0, + title: "Turtle Window".to_string(), + present_mode: bevy::window::PresentMode::AutoVsync, + //decorations: false, + ..default() + }, + ..default() + })) + .add_plugin(EguiPlugin) + .add_plugin(ShapePlugin) + .init_resource::() + .add_startup_system(setup_system) + .add_system(ui) + .add_system(update_path) + .run(); +} + +fn update_path(line: Res, mut path: Query<&mut Path>) { + for mut path in path.iter_mut() { + let mut path_builder = PathBuilder::new(); + path_builder.move_to(Vec2::new(line.x, line.y)); + path_builder.line_to(Vec2::new(100., 0.)); + *path = path_builder.build(); + } +} + +fn ui( + mut egui_context: ResMut, + mut occupied_screen_space: ResMut, + mut line: ResMut, + mut exit: EventWriter, +) { + let mut style = (*egui_context.ctx_mut().style()).clone(); + style.visuals.button_frame = false; + egui_context.ctx_mut().set_style(style); + occupied_screen_space.left = 0.0; + occupied_screen_space.right = egui::SidePanel::right("right_panel") + .resizable(false) + .show(egui_context.ctx_mut(), |ui| { + ui.add_space(7.); + ui.menu_button("Menu", |ui| { + if ui + .add_sized([ui.available_width(), 30.], egui::Button::new("Exit")) + .clicked() + { + exit.send(AppExit); + } + }) + }) + .response + .rect + .width(); + occupied_screen_space.top = 0.0; + occupied_screen_space.bottom = egui::TopBottomPanel::bottom("bottom_panel") + .resizable(false) + .show(egui_context.ctx_mut(), |ui| { + ui.add_sized( + ui.available_size(), + egui::Slider::new(&mut line.x, 0.0..=100.0), + ); + }) + .response + .rect + .height(); +} + +fn setup_system(mut commands: Commands) { + commands.spawn(Camera2dBundle::default()); + commands.insert_resource(Line { x: 100., y: 100. }); + let mut path_builder = PathBuilder::new(); + path_builder.move_to(Vec2::new(200., 200.)); + path_builder.line_to(Vec2::new(100., 0.)); + let line = path_builder.build(); + + commands.spawn(GeometryBuilder::build_as( + &line, + DrawMode::Outlined { + fill_mode: FillMode { + options: FillOptions::default(), + color: Default::default(), + }, + outline_mode: StrokeMode::new(Color::BLACK, 6.), + }, + Transform::IDENTITY, + )); +} diff --git a/src/bin/circle.rs b/src/bin/circle.rs index 1334782..3c90ee3 100644 --- a/src/bin/circle.rs +++ b/src/bin/circle.rs @@ -1,30 +1,143 @@ +use std::time::Duration; + use bevy::prelude::*; use bevy_prototype_lyon::prelude::*; +use bevy_tweening::{ + component_animator_system, Animator, EaseFunction, Lens, Sequence, Tween, TweeningPlugin, +}; fn main() { App::new() .insert_resource(Msaa { samples: 4 }) .add_plugins(DefaultPlugins) .add_plugin(ShapePlugin) + .add_plugin(TweeningPlugin) .add_startup_system(setup_system) + .add_system(component_animator_system::) .run(); } fn setup_system(mut commands: Commands) { let mut path_builder = PathBuilder::new(); - path_builder.move_to(Vec2::new(100., 0.)); - path_builder.arc( - 100.0 * Vec2::ZERO, - 100.0 * Vec2::ONE, - 90f32.to_radians(), - 0., - ); + path_builder.line_to(Vec2::new(100., 0.)); + let ops = vec![ + GElem::Circle { + center: Vec2::ZERO, + radii: Vec2::splat(100.), + angle: 90., + }, + GElem::Line { + start: Vec2::new(0., 100.), + target: Vec2::splat(200.), + }, + GElem::Line { + start: Vec2::splat(200.), + target: Vec2::new(100., 0.), + }, + GElem::Circle { + center: Vec2::ZERO, + radii: Vec2::splat(100.), + angle: -90., + }, + GElem::Line { + start: Vec2::new(0., -100.), + target: Vec2::new(200., -200.), + }, + GElem::Line { + start: Vec2::new(200., -200.), + target: Vec2::new(100., 0.), + }, + ]; + let line = path_builder.build(); - commands.spawn_bundle(Camera2dBundle::default()); - commands.spawn_bundle(GeometryBuilder::build_as( - &line, - DrawMode::Stroke(StrokeMode::new(Color::BLACK, 10.0)), - Transform::default(), - )); + commands.spawn(Camera2dBundle::default()); + let mut seq = Sequence::with_capacity(ops.len()); + for (step, op) in ops.clone().into_iter().enumerate() { + let mut done = ops.clone(); + done.truncate(step); + let next = Tween::new( + EaseFunction::QuadraticInOut, + Duration::from_millis(1000), + FilledAnimation { current: op, done }, + ); + seq = seq.then(next); + } + let animator = Animator::new(seq); + commands + .spawn(GeometryBuilder::build_as( + &line, + DrawMode::Outlined { + fill_mode: FillMode { + options: FillOptions::default(), + color: Default::default(), + }, + outline_mode: StrokeMode::new(Color::BLACK, 3.), + }, + Transform::default(), + )) + .insert(animator); +} + +#[derive(Clone, Copy)] +enum GElem { + Circle { + center: Vec2, + radii: Vec2, + angle: f32, + }, + Line { + start: Vec2, + target: Vec2, + }, +} + +impl GElem { + fn draw_to_builder(self, b: &mut PathBuilder) { + match self { + GElem::Circle { + center, + radii, + angle, + } => { + b.arc(center, radii, angle.to_radians(), 0.); + } + GElem::Line { target, start: _ } => { + b.line_to(target); + } + } + } +} + +struct FilledAnimation { + current: GElem, + done: Vec, +} + +impl Lens for FilledAnimation { + fn lerp(&mut self, target: &mut Path, ratio: f32) { + let mut path_builder = PathBuilder::new(); + path_builder.move_to(Vec2::new(100., 0.)); + for x in &self.done { + x.draw_to_builder(&mut path_builder) + } + + let part = match self.current { + GElem::Circle { + center, + radii, + angle, + } => GElem::Circle { + center, + radii, + angle: angle * ratio, + }, + GElem::Line { target, start } => GElem::Line { + target: start + ((target - start) * ratio), + start, + }, + }; + part.draw_to_builder(&mut path_builder); + *target = path_builder.build(); + } } diff --git a/src/datatypes.rs b/src/datatypes.rs index 054d211..51a2d7c 100644 --- a/src/datatypes.rs +++ b/src/datatypes.rs @@ -1,2 +1,8 @@ +use bevy::prelude::Vec2; + pub mod angle; pub mod length; + +pub type Coordinate = Vec2; +pub type Visibility = bool; +pub type Speed = u32; diff --git a/src/datatypes/angle.rs b/src/datatypes/angle.rs index 10dfbc7..239c742 100644 --- a/src/datatypes/angle.rs +++ b/src/datatypes/angle.rs @@ -177,3 +177,19 @@ fn convert_to_radians() { let converted = degr.to_radians(); assert_eq!(radi, converted) } +#[test] +fn sum_degrees() { + let fst = Angle::degrees(30f32); + let snd = Angle::degrees(30f32); + let sum = fst + snd; + assert!((sum.value() - 60f32).abs() < 0.0001); + assert!((sum.to_radians().value() - 60f32.to_radians()).abs() < 0.0001); +} +#[test] +fn sum_mixed() { + let fst = Angle::degrees(30f32); + let snd = Angle::radians(30f32.to_radians()); + let sum = fst + snd; + assert!((sum.to_degrees().value() - 60f32).abs() < 0.0001); + assert!((sum.to_radians().value() - 60f32.to_radians()).abs() < 0.0001); +} diff --git a/src/main.rs b/src/main.rs index 66957fa..db6377c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,8 +3,10 @@ mod datatypes; mod debug; mod paths; mod primitives; +mod structs; mod turtle; mod turtle_movement; +mod turtle_state; use bevy::{prelude::*, window::close_on_esc}; use bevy_prototype_lyon::prelude::*; @@ -14,14 +16,16 @@ fn main() { App::new() .insert_resource(Msaa { samples: 4 }) .insert_resource(ClearColor(Color::BEIGE)) - .insert_resource(WindowDescriptor { - width: 500.0, - height: 500.0, - title: "Turtle Window".to_string(), - present_mode: bevy::window::PresentMode::AutoVsync, + .add_plugins(DefaultPlugins.set(WindowPlugin { + window: WindowDescriptor { + width: 500.0, + height: 500.0, + title: "Turtle Window".to_string(), + present_mode: bevy::window::PresentMode::AutoVsync, + ..default() + }, ..default() - }) - .add_plugins(DefaultPlugins) + })) .add_plugin(ShapePlugin) .add_plugin(debug::DebugPlugin) .add_plugin(TurtlePlugin) diff --git a/src/primitives/bundles.rs b/src/primitives/bundles.rs index 1a593a6..664f404 100644 --- a/src/primitives/bundles.rs +++ b/src/primitives/bundles.rs @@ -15,7 +15,6 @@ use super::turtle_shapes; #[derive(Bundle, Inspectable, Default)] pub struct TurtleDrawLine { - #[bundle] #[inspectable(ignore)] line: ShapeBundle, name: Name, @@ -34,7 +33,7 @@ impl TurtleDrawLine { fill_mode: FillMode::color(Color::MIDNIGHT_BLUE), outline_mode: StrokeMode::new(Color::BLACK, 1.0), }, - Transform::identity(), + Transform::IDENTITY, ), name: Name::new(format!("Line {}", index)), marker: LineMarker, @@ -45,7 +44,6 @@ impl TurtleDrawLine { #[derive(Bundle, Inspectable, Default)] pub struct TurtleDrawCircle { - #[bundle] #[inspectable(ignore)] line: ShapeBundle, name: Name, @@ -81,7 +79,7 @@ impl TurtleDrawCircle { fill_mode: FillMode::color(Color::rgba(0., 0., 0., 0.)), outline_mode: StrokeMode::new(Color::BLACK, 1.0), }, - Transform::identity(), + Transform::IDENTITY, ), name: Name::new(format!("Circle {}", index)), marker: CircleMarker, @@ -94,7 +92,6 @@ pub struct Turtle { colors: Colors, commands: TurtleCommands, name: Name, - #[bundle] shape: ShapeBundle, } @@ -110,7 +107,7 @@ impl Default for Turtle { fill_mode: FillMode::color(Color::MIDNIGHT_BLUE), outline_mode: StrokeMode::new(Color::BLACK, 1.0), }, - Transform::identity(), + Transform::IDENTITY, ), } } diff --git a/src/structs.rs b/src/structs.rs new file mode 100644 index 0000000..08731d3 --- /dev/null +++ b/src/structs.rs @@ -0,0 +1,69 @@ +use bevy_prototype_lyon::prelude::PathBuilder; + +use crate::{ + datatypes::{ + angle::{Angle, AngleUnit}, + length::Length, + Coordinate, + }, + turtle::Precision, +}; + +/** + * All the possibilities to draw something with turtle. All the commands can get the position, heading, + * color and fill_color from the turtles state. + */ +pub enum MoveCommand { + Forward(Length), + Backward(Length), + Circle { radius: Length, angle: Angle }, + Goto(Coordinate), + Home, +} + +/// Different ways to drop breadcrumbs on the way like a dot or a stamp of the turtles shape. + +pub enum Breadcrumb { + Dot, + Stamp, +} + +/// Different ways that change the orientation of the turtle. +pub enum OrientationCommand { + Left(Angle), + Right(Angle), + SetHeading, + LookAt(Coordinate), +} + +/// A combination of all commands that can be used while drawing. +pub enum DrawElement { + Draw(MoveCommand), + Move(MoveCommand), + Orient(OrientationCommand), + Drip(Breadcrumb), +} + +pub enum DrawingSegment { + Single(DrawElement), + Outline(Vec), + Filled(Vec), +} + +impl DrawingSegment { + pub fn draw(&self) { + match self { + DrawingSegment::Single(elem) => { + let mut path_builder = PathBuilder::new(); + } + DrawingSegment::Outline(_) => todo!(), + DrawingSegment::Filled(_) => todo!(), + } + } +} + +#[derive(PartialEq, Eq)] +pub enum DrawState { + PenDown, + PenUp, +} diff --git a/src/turtle.rs b/src/turtle.rs index 985f1f0..b484b60 100644 --- a/src/turtle.rs +++ b/src/turtle.rs @@ -1,15 +1,18 @@ +pub mod builders; +pub mod state; +pub mod turtle; use std::time::Duration; use bevy::prelude::*; use bevy_inspector_egui::{Inspectable, RegisterInspectable}; use bevy_prototype_lyon::prelude::*; use bevy_tweening::{ - component_animator_system, lens::TransformScaleLens, Animator, EaseFunction, Tween, - TweenCompleted, TweeningPlugin, TweeningType, + component_animator_system, lens::TransformScaleLens, Animator, EaseFunction, RepeatCount, + Tween, TweenCompleted, TweeningPlugin, }; #[allow(unused_imports)] -use crate::paths::{circle_star::circle_star, geometry_task::geometry_task}; +use crate::paths; use crate::{ animation_step::run_animation_step, datatypes::{angle::Angle, length::Length}, @@ -104,6 +107,8 @@ impl TurtleCommands { crate::turtle_movement::turtle_circle(&mut self.state, radius.0 as f32, *angle) } TurtleCommand::Pause => todo!(), + TurtleCommand::BeginFill => todo!(), + TurtleCommand::EndFill => todo!(), }; self.state.index = next_index; Some(res) @@ -138,6 +143,8 @@ pub enum TurtleCommand { Right(Angle), PenUp, PenDown, + BeginFill, + EndFill, #[default] Pause, Circle { @@ -147,22 +154,27 @@ pub enum TurtleCommand { } fn setup(mut commands: Commands) { - let animator = Animator::new(Tween::new( - EaseFunction::QuadraticInOut, - TweeningType::PingPong, - Duration::from_millis(500), - TransformScaleLens { - start: Vec3::new(1., 1., 0.), - end: Vec3::new(1.3, 1.3, 0.), - }, - )); - commands.spawn_bundle(Camera2dBundle::default()); + let animator = Animator::new( + Tween::new( + EaseFunction::QuadraticInOut, + Duration::from_millis(500), + TransformScaleLens { + start: Vec3::new(1., 1., 0.), + end: Vec3::new(1.3, 1.3, 0.), + }, + ) + .with_repeat_strategy(bevy_tweening::RepeatStrategy::MirroredRepeat) + .with_repeat_count(RepeatCount::Infinite), + ); + commands.spawn(Camera2dBundle::default()); let mut turtle_bundle = Turtle::default(); - turtle_bundle.set_commands(circle_star()); - commands - .spawn_bundle(turtle_bundle) - .insert(animator) - .insert(TurtleShape); + let mut tcommands = vec![]; + for _ in 0..100 { + tcommands.append(&mut paths::geometry_task::geometry_task()); + tcommands.append(&mut paths::circle_star::circle_star()); + } + turtle_bundle.set_commands(tcommands); + commands.spawn((turtle_bundle, animator, TurtleShape)); } fn draw_lines( @@ -188,7 +200,7 @@ fn keypresses( tcmd.state = TurtleState { start: Vec2::ZERO, heading: Angle::degrees(0.), - speed: 500, + speed: 1, index: 0, drawing: true, }; diff --git a/src/turtle/builders.rs b/src/turtle/builders.rs new file mode 100644 index 0000000..3693d61 --- /dev/null +++ b/src/turtle/builders.rs @@ -0,0 +1,15 @@ +use bevy_prototype_lyon::prelude::PathBuilder; + +use super::state::TurtleState; + +/// A turtle that combines its commands to one closed shape with the `close()` command. +pub struct ShapeBuilder { + state: TurtleState, + builder: PathBuilder, +} + +/// A turtle that draws a filled shape. End the filling process with the `end()` command. +pub struct FilledBuilder { + state: TurtleState, + builder: PathBuilder, +} diff --git a/src/turtle/state.rs b/src/turtle/state.rs new file mode 100644 index 0000000..773cb8d --- /dev/null +++ b/src/turtle/state.rs @@ -0,0 +1,28 @@ +use bevy::prelude::{Color, Transform}; + +use crate::{ + datatypes::{angle::Angle, Coordinate, Speed, Visibility}, + structs::{DrawState, DrawingSegment}, + turtle::Precision, +}; + +/// Describing the full state of a turtle. +pub struct TurtleState { + drawing: Vec, + position: Coordinate, + heading: Angle, + color: Color, + draw_state: DrawState, + visible: Visibility, + shape_transform: Transform, + speed: Speed, +} + +impl TurtleState { + pub fn add_segment(&mut self, seg: DrawingSegment) { + self.drawing.push(seg); + } + pub fn drawing(&self) -> bool { + self.draw_state == DrawState::PenDown + } +} diff --git a/src/turtle/turtle.rs b/src/turtle/turtle.rs new file mode 100644 index 0000000..d61a66c --- /dev/null +++ b/src/turtle/turtle.rs @@ -0,0 +1,72 @@ +use bevy::prelude::{Color, Component}; + +use crate::{ + structs::{DrawElement, DrawingSegment, MoveCommand}, + turtle_state::TurtleDraw, +}; + +use super::state::TurtleState; + +/// A default turtle drawing lines each line is one Segment. +#[derive(Component)] +pub struct Turtle { + state: TurtleState, +} + +pub struct FilledTurtle { + state: TurtleState, + drawing: Vec, + color: Color, +} + +impl Turtle { + pub fn begin_fill(self, color: Color) -> FilledTurtle { + FilledTurtle { + state: self.state, + drawing: vec![], + color, + } + } +} + +impl TurtleDraw for Turtle { + fn forward(&mut self, length: crate::datatypes::length::Length) -> &mut Self { + let move_command = MoveCommand::Forward(length); + self.state + .add_segment(DrawingSegment::Single(if self.state.drawing() { + DrawElement::Draw(move_command) + } else { + DrawElement::Move(move_command) + })); + + self + } + + fn backward(&mut self, length: crate::datatypes::length::Length) -> &mut Self { + todo!() + } + + fn circle( + &mut self, + radius: crate::datatypes::length::Length, + angle: crate::datatypes::angle::Angle, + ) -> &mut Self { + todo!() + } + + fn goto(&mut self, coordinate: crate::datatypes::Coordinate) -> &mut Self { + todo!() + } + + fn home(&mut self) -> &mut Self { + todo!() + } + + fn dot(&mut self, size: crate::datatypes::length::Length) -> &mut Self { + todo!() + } + + fn stamp(&mut self, size: crate::datatypes::length::Length) -> &mut Self { + todo!() + } +} diff --git a/src/turtle_movement.rs b/src/turtle_movement.rs index 4a64569..f126ef0 100644 --- a/src/turtle_movement.rs +++ b/src/turtle_movement.rs @@ -4,7 +4,7 @@ use bevy::prelude::{Quat, Transform, Vec2, Vec3}; use bevy_prototype_lyon::prelude::Path; use bevy_tweening::{ lens::{TransformPositionLens, TransformRotateZLens}, - Animator, EaseFunction, Tween, TweeningType, + Animator, EaseFunction, Tween, }; use crate::{ @@ -27,7 +27,6 @@ pub fn turtle_turn(state: &mut TurtleState, angle_to_turn: Angle) -> let end = state.heading + angle_to_turn; let animation = Tween::new( EaseFunction::QuadraticInOut, - TweeningType::Once, Duration::from_millis(state.speed), TransformRotateZLens { start: start.to_radians().value(), @@ -51,7 +50,6 @@ pub fn turtle_move(state: &mut TurtleState, length: Precision) -> TurtleStep { let end = state.start + (Vec2::from_angle(state.heading.to_radians().value()) * length); let turtle_movement_animation = Tween::new( EaseFunction::QuadraticInOut, - TweeningType::Once, Duration::from_millis(state.speed), TransformPositionLens { start: start.extend(0.), @@ -66,7 +64,6 @@ pub fn turtle_move(state: &mut TurtleState, length: Precision) -> TurtleStep { }; let line_animator = Animator::new(Tween::new( EaseFunction::QuadraticInOut, - TweeningType::Once, Duration::from_millis(state.speed), LineAnimationLens::new(start, end), )); @@ -92,7 +89,6 @@ pub fn turtle_circle( let turtle_movement_animation = Tween::new( EaseFunction::QuadraticInOut, - TweeningType::Once, Duration::from_millis(state.speed), CircleMovementLens { start: Transform { @@ -123,7 +119,6 @@ pub fn turtle_circle( }; let line_animator = Animator::new(Tween::new( EaseFunction::QuadraticInOut, - TweeningType::Once, Duration::from_millis(state.speed), CircleAnimationLens { start_pos: state.start, diff --git a/src/turtle_state.rs b/src/turtle_state.rs new file mode 100644 index 0000000..3b671ea --- /dev/null +++ b/src/turtle_state.rs @@ -0,0 +1,61 @@ +use bevy::prelude::{Color, Transform}; +use bevy_prototype_lyon::prelude::PathBuilder; + +use crate::{ + datatypes::{angle::Angle, length::Length, Coordinate, Speed, Visibility}, + structs::DrawingSegment, + turtle::Precision, +}; + +/// Describing the full state of a turtle. +pub struct TurtleState { + drawing: Vec, + position: Coordinate, + heading: Angle, + color: Color, + fill_color: Color, + visible: Visibility, + shape_transform: Transform, + speed: Speed, +} + +/// A default turtle drawing lines each line is one Segment. +pub struct Turtle { + state: TurtleState, +} + +/// A turtle that combines its commands to one closed shape with the `close()` command. +pub struct ShapeBuilder { + state: TurtleState, + builder: PathBuilder, +} + +/// A turtle that draws a filled shape. End the filling process with the `end()` command. +pub struct FilledBuilder { + state: TurtleState, + builder: PathBuilder, +} + +pub trait TurtleDraw { + fn forward(&mut self, length: Length) -> &mut Self; + fn backward(&mut self, length: Length) -> &mut Self; + fn circle(&mut self, radius: Length, angle: Angle) -> &mut Self; + fn goto(&mut self, coordinate: Coordinate) -> &mut Self; + fn home(&mut self) -> &mut Self; + fn dot(&mut self, size: Length) -> &mut Self; + fn stamp(&mut self, size: Length) -> &mut Self; +} + +pub trait TurtleTurn { + fn left(&mut self, angle: Angle) -> &mut Self; + fn right(&mut self, angle: Angle) -> &mut Self; + fn look_at(&mut self, coordinate: Coordinate) -> &mut Self; +} + +pub trait TurtleHistory { + fn reset(&mut self) -> &mut Self; + fn clear(&mut self) -> &mut Self; + fn undo(&mut self) -> &mut Self; + + fn clear_stamps(&mut self) -> &mut Self; +}