diff --git a/Cargo.lock b/Cargo.lock index 7b9a44f..50321d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "ab_glyph" @@ -18,6 +18,65 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" +[[package]] +name = "accesskit" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3d3b8f9bae46a948369bc4a03e815d4ed6d616bd00de4051133a5019dc31c5a" + +[[package]] +name = "accesskit_consumer" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f47983a1084940ba9a39c077a8c63e55c619388be5476ac04c804cfbd1e63459" +dependencies = [ + "accesskit", + "hashbrown 0.15.2", + "immutable-chunkmap", +] + +[[package]] +name = "accesskit_macos" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7329821f3bd1101e03a7d2e03bd339e3ac0dc64c70b4c9f9ae1949e3ba8dece1" +dependencies = [ + "accesskit", + "accesskit_consumer", + "hashbrown 0.15.2", + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "accesskit_windows" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24fcd5d23d70670992b823e735e859374d694a3d12bfd8dd32bd3bd8bedb5d81" +dependencies = [ + "accesskit", + "accesskit_consumer", + "hashbrown 0.15.2", + "paste", + "static_assertions", + "windows 0.58.0", + "windows-core 0.58.0", +] + +[[package]] +name = "accesskit_winit" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6a48dad5530b6deb9fc7a52cc6c3bf72cdd9eb8157ac9d32d69f2427a5e879" +dependencies = [ + "accesskit", + "accesskit_macos", + "accesskit_windows", + "raw-window-handle 0.6.2", + "winit", +] + [[package]] name = "adler" version = "1.0.2" @@ -37,6 +96,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", + "const-random", "getrandom", "once_cell", "version_check", @@ -196,33 +256,867 @@ dependencies = [ "libloading", ] +[[package]] +name = "assert_type_match" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f548ad2c4031f2902e3edc1f29c29e835829437de49562d8eb5dc5584d3a1043" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "async-broadcast" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" +dependencies = [ + "event-listener 2.5.3", + "futures-core", +] + +[[package]] +name = "async-channel" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "slab", +] + +[[package]] +name = "async-fs" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" +dependencies = [ + "async-lock", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-lock" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" +dependencies = [ + "event-listener 5.3.1", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + [[package]] name = "atomic-waker" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +[[package]] +name = "atomicow" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "467163b50876d3a4a44da5f4dbd417537e522fc059ede8d518d57941cfb3d745" + [[package]] name = "autocfg" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "bevy" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6a01cd51a5cd310e4e7aa6e1560b1aabf29efc6a095a01e6daa8bf0a19f1fea" +dependencies = [ + "bevy_internal", +] + +[[package]] +name = "bevy_a11y" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82c66b5bc82a2660a5663d85b3354ddb72c8ab2c443989333cbea146f39a4e9a" +dependencies = [ + "accesskit", + "bevy_app", + "bevy_derive", + "bevy_ecs", + "bevy_reflect", +] + +[[package]] +name = "bevy_app" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "652574e4c10efcfa70f98036709dd5b67e5cb8d46c58087ef48c2ac6b62df9da" +dependencies = [ + "bevy_derive", + "bevy_ecs", + "bevy_reflect", + "bevy_tasks", + "bevy_utils", + "console_error_panic_hook", + "ctrlc", + "derive_more", + "downcast-rs", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "bevy_asset" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d7d501eda01be6d500d843a06d9b9800c3f0fffaae3c29d17d9e4e172c28d37" +dependencies = [ + "async-broadcast", + "async-fs", + "async-lock", + "atomicow", + "bevy_app", + "bevy_asset_macros", + "bevy_ecs", + "bevy_reflect", + "bevy_tasks", + "bevy_utils", + "bevy_window", + "bitflags 2.6.0", + "blake3", + "crossbeam-channel", + "derive_more", + "disqualified", + "downcast-rs", + "either", + "futures-io", + "futures-lite", + "js-sys", + "parking_lot", + "ron", + "serde", + "stackfuture", + "uuid", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "bevy_asset_macros" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7474b77fc27db11ec03d49ca04f1a7471f369dc373fd5e091a12ad7ab533d8c8" +dependencies = [ + "bevy_macro_utils", + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "bevy_color" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87bccacba27db37375eb97ffc86e91a7d95db3f5faa6a834fa7306db02cde327" +dependencies = [ + "bevy_math", + "bevy_reflect", + "bytemuck", + "derive_more", + "encase", + "serde", + "wgpu-types 23.0.0", +] + +[[package]] +name = "bevy_core" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecccf7be33330f58d4c7033b212a25c414d388e3a8d55b61331346da5dbabf22" +dependencies = [ + "bevy_app", + "bevy_ecs", + "bevy_reflect", + "bevy_tasks", + "bevy_utils", + "uuid", +] + +[[package]] +name = "bevy_core_pipeline" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a3fb9f84fa60c2006d4a15e039c3d08d4d10599441b9175907341a77a69d627" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_core", + "bevy_derive", + "bevy_ecs", + "bevy_image", + "bevy_math", + "bevy_reflect", + "bevy_render", + "bevy_transform", + "bevy_utils", + "bevy_window", + "bitflags 2.6.0", + "derive_more", + "nonmax", + "radsort", + "serde", + "smallvec", +] + +[[package]] +name = "bevy_derive" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e141b7eda52a23bb88740b37a291e26394524cb9ee3b034c7014669671fc2bb5" +dependencies = [ + "bevy_macro_utils", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "bevy_diagnostic" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa97748337405089edfb2857f7608f21bcc648a7ad272c9209808aad252ed542" +dependencies = [ + "bevy_app", + "bevy_core", + "bevy_ecs", + "bevy_tasks", + "bevy_time", + "bevy_utils", + "const-fnv1a-hash", +] + +[[package]] +name = "bevy_ecs" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4c4b60d2a712c6d5cbe610bac7ecf0838fc56a095fd5b15f30230873e84f15" +dependencies = [ + "arrayvec", + "bevy_ecs_macros", + "bevy_ptr", + "bevy_reflect", + "bevy_tasks", + "bevy_utils", + "bitflags 2.6.0", + "concurrent-queue", + "derive_more", + "disqualified", + "fixedbitset 0.5.7", + "nonmax", + "petgraph", + "serde", + "smallvec", +] + +[[package]] +name = "bevy_ecs_macros" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4296b3254b8bd29769f6a4512731b2e6c4b163343ca18b72316927315b6096" +dependencies = [ + "bevy_macro_utils", + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "bevy_encase_derive" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfe562b883fb652acde84cb6bb01cbc9f23c377e411f1484467ecfdd3a3d234e" +dependencies = [ + "bevy_macro_utils", + "encase_derive_impl", +] + +[[package]] +name = "bevy_gizmos" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1c82341f6a3517efeeeef2fe68135ac3a91b11b6e369fc1a07f6e9a4b462b57" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_core_pipeline", + "bevy_ecs", + "bevy_gizmos_macros", + "bevy_image", + "bevy_math", + "bevy_reflect", + "bevy_render", + "bevy_sprite", + "bevy_time", + "bevy_transform", + "bevy_utils", + "bytemuck", +] + +[[package]] +name = "bevy_gizmos_macros" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9454ac9f0a2141900ef9f3482af9333e490d5546bbea3cab63a777447d35beed" +dependencies = [ + "bevy_macro_utils", + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "bevy_hierarchy" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe0b538beea7edbf30a6062242b99e67ff3bfa716566aacf91d5b5e027f02a2" +dependencies = [ + "bevy_app", + "bevy_core", + "bevy_ecs", + "bevy_reflect", + "bevy_utils", + "disqualified", + "smallvec", +] + +[[package]] +name = "bevy_image" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db46fa6a2f9e20435f3231710abbb136d2cc0a376f3f8e6ecfe071e286f5a246" +dependencies = [ + "bevy_asset", + "bevy_color", + "bevy_math", + "bevy_reflect", + "bevy_utils", + "bitflags 2.6.0", + "bytemuck", + "derive_more", + "futures-lite", + "image", + "serde", + "wgpu 23.0.1", +] + +[[package]] +name = "bevy_input" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46b4ea60095d1a1851e40cb12481ad3d5d234e14376d6b73142a85586c266b74" +dependencies = [ + "bevy_app", + "bevy_core", + "bevy_ecs", + "bevy_math", + "bevy_reflect", + "bevy_utils", + "derive_more", + "smol_str", +] + +[[package]] +name = "bevy_internal" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4237e6e9b03902321032f00f931f18a4a211093bd9a7cf81276a0228a2a4417" +dependencies = [ + "bevy_a11y", + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_core", + "bevy_core_pipeline", + "bevy_derive", + "bevy_diagnostic", + "bevy_ecs", + "bevy_gizmos", + "bevy_hierarchy", + "bevy_input", + "bevy_log", + "bevy_math", + "bevy_picking", + "bevy_ptr", + "bevy_reflect", + "bevy_render", + "bevy_scene", + "bevy_sprite", + "bevy_tasks", + "bevy_time", + "bevy_transform", + "bevy_utils", + "bevy_window", + "bevy_winit", +] + +[[package]] +name = "bevy_log" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a0bdb42b00ac3752f0d6f531fbda8abf313603157a7b3163da8529412119a0a" +dependencies = [ + "android_log-sys", + "bevy_app", + "bevy_ecs", + "bevy_utils", + "tracing-log", + "tracing-oslog", + "tracing-subscriber", + "tracing-wasm", +] + +[[package]] +name = "bevy_macro_utils" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3954dbb56a66a6c09c783e767f6ceca0dc0492c22e536e2aeaefb5545eac33c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "toml_edit 0.22.22", +] + +[[package]] +name = "bevy_math" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae26f952598e293acac783d947b21af1809673cbeba25d76b969a56f287160b" +dependencies = [ + "bevy_reflect", + "derive_more", + "glam", + "itertools", + "rand", + "rand_distr", + "serde", + "smallvec", +] + +[[package]] +name = "bevy_mesh" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c324d45ca0043a4696d7324b569de65be17066ed3a97dd42205bc28693d20b5" +dependencies = [ + "bevy_asset", + "bevy_derive", + "bevy_ecs", + "bevy_image", + "bevy_math", + "bevy_mikktspace", + "bevy_reflect", + "bevy_transform", + "bevy_utils", + "bitflags 2.6.0", + "bytemuck", + "derive_more", + "hexasphere", + "serde", + "wgpu 23.0.1", +] + +[[package]] +name = "bevy_mikktspace" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da5ea3ad25d74ea36ea45418ad799f135d046db35c322b9704c4a8934eb65ce9" +dependencies = [ + "glam", +] + +[[package]] +name = "bevy_picking" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a137ed706574dc4a01cac527eb2c44a0b0e477d5bce3afc892a9ee95ee0078" +dependencies = [ + "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.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2af9e30b40fb3f0a80a658419f670f2de1e743efcaca1952c43cdcc923287944" + +[[package]] +name = "bevy_reflect" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52a37e2ae5ed62df4a0e3f958076effe280b39bc81fe878587350897a89332a2" +dependencies = [ + "assert_type_match", + "bevy_ptr", + "bevy_reflect_derive", + "bevy_utils", + "derive_more", + "disqualified", + "downcast-rs", + "erased-serde", + "glam", + "serde", + "smallvec", + "smol_str", + "uuid", +] + +[[package]] +name = "bevy_reflect_derive" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94c683fc68c75fc26f90bb1e529590095380d7cec66f6610dbe6b93d9fd26f94" +dependencies = [ + "bevy_macro_utils", + "proc-macro2", + "quote", + "syn 2.0.90", + "uuid", +] + +[[package]] +name = "bevy_render" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d188f392edf4edcae53dfda07f3ec618a7a704183ec3f2e8504657a9fb940c8a" +dependencies = [ + "async-channel", + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_core", + "bevy_derive", + "bevy_diagnostic", + "bevy_ecs", + "bevy_encase_derive", + "bevy_hierarchy", + "bevy_image", + "bevy_math", + "bevy_mesh", + "bevy_reflect", + "bevy_render_macros", + "bevy_tasks", + "bevy_time", + "bevy_transform", + "bevy_utils", + "bevy_window", + "bytemuck", + "codespan-reporting", + "derive_more", + "downcast-rs", + "encase", + "futures-lite", + "image", + "js-sys", + "naga 23.1.0", + "naga_oil", + "nonmax", + "offset-allocator", + "send_wrapper", + "serde", + "smallvec", + "wasm-bindgen", + "web-sys", + "wgpu 23.0.1", +] + +[[package]] +name = "bevy_render_macros" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ab37ee2945f93e9ba8daf91cd968b4cba9c677ac51d349dd8512a107a9a5d92" +dependencies = [ + "bevy_macro_utils", + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "bevy_scene" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e883fd3c6d6e7761f1fe662e79bc7bdc7e917e73e7bfc434b1d16d2a5852119" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_derive", + "bevy_ecs", + "bevy_hierarchy", + "bevy_reflect", + "bevy_render", + "bevy_transform", + "bevy_utils", + "derive_more", + "serde", + "uuid", +] + +[[package]] +name = "bevy_sprite" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e975abc3f3f3432d6ad86ae32de804e96d7faf59d27f32b065b5ddc1e73ed7e1" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_core_pipeline", + "bevy_derive", + "bevy_ecs", + "bevy_image", + "bevy_math", + "bevy_picking", + "bevy_reflect", + "bevy_render", + "bevy_transform", + "bevy_utils", + "bevy_window", + "bitflags 2.6.0", + "bytemuck", + "derive_more", + "fixedbitset 0.5.7", + "guillotiere", + "nonmax", + "radsort", + "rectangle-pack", +] + +[[package]] +name = "bevy_tasks" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5171c605b462b4e3249e01986505e62e3933aa27642a9f793c841814fcbbfb4f" +dependencies = [ + "async-channel", + "async-executor", + "concurrent-queue", + "futures-channel", + "futures-lite", + "pin-project", + "wasm-bindgen-futures", +] + +[[package]] +name = "bevy_time" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291b6993b899c04554fc034ebb9e0d7fde9cb9b2fb58dcd912bfa6247abdedbb" +dependencies = [ + "bevy_app", + "bevy_ecs", + "bevy_reflect", + "bevy_utils", + "crossbeam-channel", +] + +[[package]] +name = "bevy_transform" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35665624d0c728107ab0920d5ad2d352362b906a8c376eaf375ec9c751faf4" +dependencies = [ + "bevy_app", + "bevy_ecs", + "bevy_hierarchy", + "bevy_math", + "bevy_reflect", + "derive_more", +] + +[[package]] +name = "bevy_utils" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0a48bad33c385a7818b7683a16c8b5c6930eded05cd3f176264fc1f5acea473" +dependencies = [ + "ahash", + "bevy_utils_proc_macros", + "getrandom", + "hashbrown 0.14.5", + "thread_local", + "tracing", + "web-time", +] + +[[package]] +name = "bevy_utils_proc_macros" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dfd8d4a525b8f04f85863e45ccad3e922d4c11ed4a8d54f7f62a40bf83fb90f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "bevy_window" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f3520279aae65935d6a84443202c154ead3abebf8dae906d095665162de358" +dependencies = [ + "android-activity", + "bevy_a11y", + "bevy_app", + "bevy_ecs", + "bevy_input", + "bevy_math", + "bevy_reflect", + "bevy_utils", + "raw-window-handle 0.6.2", + "smol_str", +] + +[[package]] +name = "bevy_winit" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581bb2249a82285707e0977a9a1c79a2248ede587fcb289708faa03a82ebfa7f" +dependencies = [ + "accesskit", + "accesskit_winit", + "approx", + "bevy_a11y", + "bevy_app", + "bevy_derive", + "bevy_ecs", + "bevy_hierarchy", + "bevy_input", + "bevy_log", + "bevy_math", + "bevy_reflect", + "bevy_tasks", + "bevy_utils", + "bevy_window", + "cfg-if", + "crossbeam-channel", + "raw-window-handle 0.6.2", + "wasm-bindgen", + "web-sys", + "winit", +] + +[[package]] +name = "bindgen" +version = "0.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" +dependencies = [ + "bitflags 2.6.0", + "cexpr", + "clang-sys", + "itertools", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.90", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec 0.6.3", +] + [[package]] name = "bit-set" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0481a0e032742109b1133a095184ee93d88f3dc9e0d28a5d033dc77a073f44f" dependencies = [ - "bit-vec", + "bit-vec 0.7.0", ] +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec 0.8.0", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bit-vec" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2c54ff287cfc0a34f38a6b832ea1bd8e448a330b3e40a50859e6488bee07f22" +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + [[package]] name = "bitflags" version = "1.3.2" @@ -234,6 +1128,22 @@ name = "bitflags" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde", +] + +[[package]] +name = "blake3" +version = "1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8ee0c1824c4dea5b5f81736aff91bae041d2c07ee1192bec91054e10e3e601e" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", +] [[package]] name = "block" @@ -250,6 +1160,19 @@ dependencies = [ "objc2", ] +[[package]] +name = "blocking" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + [[package]] name = "bumpalo" version = "3.16.0" @@ -258,9 +1181,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.18.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" +checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" dependencies = [ "bytemuck_derive", ] @@ -273,7 +1196,7 @@ checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", ] [[package]] @@ -337,6 +1260,15 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + [[package]] name = "cfg-if" version = "1.0.0" @@ -355,6 +1287,17 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + [[package]] name = "codespan-reporting" version = "0.11.1" @@ -441,6 +1384,59 @@ dependencies = [ "web-sys", ] +[[package]] +name = "const-fnv1a-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b13ea120a812beba79e34316b3942a857c86ec1593cb34f27bb28272ce2cca" + +[[package]] +name = "const-random" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom", + "once_cell", + "tiny-keccak", +] + +[[package]] +name = "const_panic" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53857514f72ee4a2b583de67401e3ff63a5472ca4acf289d09a9ea7636dfec17" + +[[package]] +name = "const_soft_float" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ca1caa64ef4ed453e68bb3db612e51cf1b2f5b871337f0fcab1c8f87cc3dff" + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[package]] +name = "constgebra" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1aaf9b65849a68662ac6c0810c8893a765c960b907dd7cfab9c4a50bf764fbc" +dependencies = [ + "const_soft_float", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -490,6 +1486,15 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-channel" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-deque" version = "0.8.5" @@ -515,6 +1520,22 @@ version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "ctrlc" +version = "3.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90eeab0aa92f3f9b4e87f258c72b139c207d251f9cbc1080a0086b86a8870dd3" +dependencies = [ + "nix", + "windows-sys 0.59.0", +] + [[package]] name = "cursor-icon" version = "1.1.0" @@ -532,6 +1553,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + [[package]] name = "delaunator" version = "1.0.2" @@ -541,12 +1568,39 @@ dependencies = [ "robust", ] +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "unicode-xid", +] + [[package]] name = "dispatch" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" +[[package]] +name = "disqualified" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9c272297e804878a2a4b707cfcfc6d2328b5bb936944613b4fdf2b9269afdfd" + [[package]] name = "dlib" version = "0.5.2" @@ -583,6 +1637,38 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +[[package]] +name = "encase" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0a05902cf601ed11d564128448097b98ebe3c6574bd7b6a653a3d56d54aa020" +dependencies = [ + "const_panic", + "encase_derive", + "glam", + "thiserror", +] + +[[package]] +name = "encase_derive" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "181d475b694e2dd56ae919ce7699d344d1fd259292d590c723a50d1189a2ea85" +dependencies = [ + "encase_derive_impl", +] + +[[package]] +name = "encase_derive_impl" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f97b51c5cc57ef7c5f7a0c57c250251c49ee4c28f819f87ac32f4aceabc36792" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "env_filter" version = "0.1.2" @@ -612,6 +1698,16 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "erased-serde" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24e2389d65ab4fab27dc2a5de7b191e1f6617d1f1c8855c0dc569c94a4cbb18d" +dependencies = [ + "serde", + "typeid", +] + [[package]] name = "errno" version = "0.3.9" @@ -622,6 +1718,48 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "euclid" +version = "0.22.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad9cdb4b747e485a12abb0e6566612956c7a1bafa3bdb8d682c5b6d403589e48" +dependencies = [ + "num-traits", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "event-listener" +version = "5.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2" +dependencies = [ + "event-listener 5.3.1", + "pin-project-lite", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + [[package]] name = "fdeflate" version = "0.3.4" @@ -631,6 +1769,18 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + [[package]] name = "flate2" version = "1.0.33" @@ -641,6 +1791,12 @@ dependencies = [ "miniz_oxide 0.8.0", ] +[[package]] +name = "foldhash" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" + [[package]] name = "foreign-types" version = "0.5.0" @@ -659,7 +1815,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", ] [[package]] @@ -673,6 +1829,7 @@ name = "forestiles" version = "0.1.0" dependencies = [ "android_logger", + "bevy", "bytemuck", "cfg-if", "console_error_panic_hook", @@ -690,10 +1847,44 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "wgpu", + "wgpu 22.1.0", "winit", ] +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-lite" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cef40d21ae2c515b51041df9ed313ed21e572df340ea58a922a0aefe7e8891a1" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + [[package]] name = "gethostname" version = "0.4.3" @@ -728,6 +1919,23 @@ dependencies = [ "xml-rs", ] +[[package]] +name = "glam" +version = "0.29.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc46dd3ec48fdd8e693a98d2b8bafae273a2d54c1de02a2a7e3d57d501f39677" +dependencies = [ + "bytemuck", + "rand", + "serde", +] + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + [[package]] name = "glow" version = "0.13.1" @@ -740,6 +1948,18 @@ dependencies = [ "web-sys", ] +[[package]] +name = "glow" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d51fa363f025f5c111e03f13eda21162faeacb6911fe8caa0c0349f9cf0c4483" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "glutin_wgl_sys" version = "0.6.0" @@ -778,7 +1998,19 @@ dependencies = [ "presser", "thiserror", "winapi", - "windows", + "windows 0.52.0", +] + +[[package]] +name = "gpu-allocator" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd" +dependencies = [ + "log", + "presser", + "thiserror", + "windows 0.58.0", ] [[package]] @@ -789,7 +2021,7 @@ checksum = "9c08c1f623a8d0b722b8b99f821eb0ba672a1618f0d3b16ddbee1cedd2dd8557" dependencies = [ "bitflags 2.6.0", "gpu-descriptor-types", - "hashbrown", + "hashbrown 0.14.5", ] [[package]] @@ -801,6 +2033,16 @@ dependencies = [ "bitflags 2.6.0", ] +[[package]] +name = "guillotiere" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62d5865c036cb1393e23c50693df631d3f5d7bcca4c04fe4cc0fd592e74a782" +dependencies = [ + "euclid", + "svg_fmt", +] + [[package]] name = "hashbrown" version = "0.14.5" @@ -809,6 +2051,16 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", "allocator-api2", + "serde", +] + +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +dependencies = [ + "foldhash", ] [[package]] @@ -832,6 +2084,16 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" +[[package]] +name = "hexasphere" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "741ab88b8cc670443da777c3daab02cebf5a3caccfc04e3c052f55c94d1643fe" +dependencies = [ + "constgebra", + "glam", +] + [[package]] name = "hexf-parse" version = "0.2.1" @@ -857,6 +2119,15 @@ dependencies = [ "rayon", ] +[[package]] +name = "immutable-chunkmap" +version = "2.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f97096f508d54f8f8ab8957862eee2ccd628847b6217af1a335e1c44dee578" +dependencies = [ + "arrayvec", +] + [[package]] name = "indexmap" version = "2.4.0" @@ -864,7 +2135,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.14.5", ] [[package]] @@ -873,6 +2144,15 @@ version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "jni" version = "0.21.1" @@ -906,10 +2186,11 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -938,9 +2219,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.157" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374af5f94e54fa97cf75e945cce8a6b201e88a1a07e688b47dfd2a59c66dbd86" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libloading" @@ -952,6 +2233,12 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "libm" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" + [[package]] name = "libredox" version = "0.0.2" @@ -1000,6 +2287,15 @@ dependencies = [ "libc", ] +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + [[package]] name = "matrixmultiply" version = "0.3.9" @@ -1040,6 +2336,12 @@ dependencies = [ "paste", ] +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "miniz_oxide" version = "0.7.4" @@ -1066,7 +2368,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bd5a652b6faf21496f2cfd88fc49989c8db0825d1f6746b1a71a6ede24a63ad" dependencies = [ "arrayvec", - "bit-set", + "bit-set 0.6.0", "bitflags 2.6.0", "cfg_aliases 0.1.1", "codespan-reporting", @@ -1080,6 +2382,48 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "naga" +version = "23.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "364f94bc34f61332abebe8cad6f6cd82a5b65cff22c828d05d0968911462ca4f" +dependencies = [ + "arrayvec", + "bit-set 0.8.0", + "bitflags 2.6.0", + "cfg_aliases 0.1.1", + "codespan-reporting", + "hexf-parse", + "indexmap", + "log", + "pp-rs", + "rustc-hash", + "spirv", + "termcolor", + "thiserror", + "unicode-xid", +] + +[[package]] +name = "naga_oil" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31ea1f080bb359927cd5404d0af1e5e6758f4f2d82ecfbebb0a0c434764e40f1" +dependencies = [ + "bit-set 0.5.3", + "codespan-reporting", + "data-encoding", + "indexmap", + "naga 23.1.0", + "once_cell", + "regex", + "regex-syntax 0.8.4", + "rustc-hash", + "thiserror", + "tracing", + "unicode-ident", +] + [[package]] name = "nalgebra" version = "0.33.0" @@ -1104,7 +2448,7 @@ checksum = "254a5372af8fc138e36684761d3c0cdb758a4410e938babcff1c860ce14ddbfc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", ] [[package]] @@ -1147,6 +2491,18 @@ dependencies = [ "jni-sys", ] +[[package]] +name = "nix" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +dependencies = [ + "bitflags 2.6.0", + "cfg-if", + "cfg_aliases 0.2.1", + "libc", +] + [[package]] name = "noise" version = "0.9.0" @@ -1158,6 +2514,32 @@ dependencies = [ "rand_xorshift", ] +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nonmax" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "610a5acd306ec67f907abe5567859a3c693fb9886eb1f012ab8f2a47bef3db51" + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num-bigint" version = "0.4.6" @@ -1204,6 +2586,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -1224,7 +2607,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", ] [[package]] @@ -1440,10 +2823,20 @@ dependencies = [ ] [[package]] -name = "once_cell" -version = "1.19.0" +name = "offset-allocator" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "e234d535da3521eb95106f40f0b73483d80bfb3aacf27c40d7e2b72f1a3e00a2" +dependencies = [ + "log", + "nonmax", +] + +[[package]] +name = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "orbclient" @@ -1454,6 +2847,12 @@ dependencies = [ "libredox", ] +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + [[package]] name = "owned_ttf_parser" version = "0.24.0" @@ -1463,6 +2862,12 @@ dependencies = [ "ttf-parser", ] +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + [[package]] name = "parking_lot" version = "0.12.3" @@ -1498,6 +2903,16 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "petgraph" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +dependencies = [ + "fixedbitset 0.4.2", + "indexmap", +] + [[package]] name = "pin-project" version = "1.1.5" @@ -1515,7 +2930,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", ] [[package]] @@ -1524,6 +2939,17 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +[[package]] +name = "piper" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + [[package]] name = "pkg-config" version = "0.3.30" @@ -1564,6 +2990,15 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" +[[package]] +name = "pp-rs" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb458bb7f6e250e6eb79d5026badc10a3ebb8f9a15d1fff0f13d17c71f4d6dee" +dependencies = [ + "unicode-xid", +] + [[package]] name = "ppv-lite86" version = "0.2.20" @@ -1579,20 +3014,30 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.90", +] + [[package]] name = "proc-macro-crate" version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "toml_edit", + "toml_edit 0.21.1", ] [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -1621,6 +3066,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "radsort" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "019b4b213425016d7d84a153c4c73afb0946fbb4840e4eece7ba8848b9d6da22" + [[package]] name = "rand" version = "0.8.5" @@ -1651,6 +3102,16 @@ dependencies = [ "getrandom", ] +[[package]] +name = "rand_distr" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" +dependencies = [ + "num-traits", + "rand", +] + [[package]] name = "rand_xorshift" version = "0.3.0" @@ -1704,6 +3165,12 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "rectangle-pack" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0d463f2884048e7153449a55166f91028d5b0ea53c79377099ce4e8cf0cf9bb" + [[package]] name = "redox_syscall" version = "0.4.1" @@ -1730,8 +3197,17 @@ checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", - "regex-automata", - "regex-syntax", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", ] [[package]] @@ -1742,9 +3218,15 @@ checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.8.4", ] +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + [[package]] name = "regex-syntax" version = "0.8.4" @@ -1763,6 +3245,18 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5864e7ef1a6b7bcf1d6ca3f655e65e724ed3b52546a0d0a663c991522f552ea" +[[package]] +name = "ron" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" +dependencies = [ + "base64", + "bitflags 2.6.0", + "serde", + "serde_derive", +] + [[package]] name = "rustc-hash" version = "1.1.0" @@ -1825,6 +3319,12 @@ dependencies = [ "tiny-skia", ] +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + [[package]] name = "serde" version = "1.0.208" @@ -1842,7 +3342,16 @@ checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", ] [[package]] @@ -1937,6 +3446,12 @@ dependencies = [ "bitflags 2.6.0", ] +[[package]] +name = "stackfuture" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eae92052b72ef70dafa16eddbabffc77e5ca3574be2f7bc1127b36f0a7ad7f2" + [[package]] name = "static_assertions" version = "1.1.0" @@ -1949,6 +3464,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" +[[package]] +name = "svg_fmt" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce5d813d71d82c4cbc1742135004e4a79fd870214c155443451c139c9470a0aa" + [[package]] name = "syn" version = "1.0.109" @@ -1962,9 +3483,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.75" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -1982,22 +3503,41 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", ] [[package]] @@ -2039,7 +3579,18 @@ checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap", "toml_datetime", - "winnow", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow 0.6.20", ] [[package]] @@ -2049,14 +3600,85 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "pin-project-lite", + "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-attributes" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "tracing-core" version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-oslog" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "528bdd1f0e27b5dd9a4ededf154e824b0532731e4af73bb531de46276e0aab1e" +dependencies = [ + "bindgen", + "cc", + "cfg-if", + "once_cell", + "parking_lot", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "tracing-wasm" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4575c663a174420fa2d78f4108ff68f65bf2fbb7dd89f33749b6e826b3626e07" +dependencies = [ + "tracing", + "tracing-subscriber", + "wasm-bindgen", +] [[package]] name = "ttf-parser" @@ -2064,6 +3686,12 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5be21190ff5d38e8b4a2d3b6a3ae57f612cc39c96e83cedeaf7abc338a8bac4a" +[[package]] +name = "typeid" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e13db2e0ccd5e14a544e8a246ba2312cd25223f616442d7f2cb0e3db614236e" + [[package]] name = "typenum" version = "1.17.0" @@ -2090,9 +3718,9 @@ checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "utf8parse" @@ -2100,6 +3728,22 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "uuid" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +dependencies = [ + "getrandom", + "serde", +] + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + [[package]] name = "version_check" version = "0.9.5" @@ -2133,9 +3777,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" dependencies = [ "cfg-if", "once_cell", @@ -2144,36 +3788,36 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2181,22 +3825,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" [[package]] name = "wayland-backend" @@ -2309,9 +3953,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" dependencies = [ "js-sys", "wasm-bindgen", @@ -2338,7 +3982,7 @@ dependencies = [ "document-features", "js-sys", "log", - "naga", + "naga 22.1.0", "parking_lot", "profiling", "raw-window-handle 0.6.2", @@ -2347,9 +3991,34 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "wgpu-core", - "wgpu-hal", - "wgpu-types", + "wgpu-core 22.1.0", + "wgpu-hal 22.0.0", + "wgpu-types 22.0.0", +] + +[[package]] +name = "wgpu" +version = "23.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80f70000db37c469ea9d67defdc13024ddf9a5f1b89cb2941b812ad7cde1735a" +dependencies = [ + "arrayvec", + "cfg_aliases 0.1.1", + "document-features", + "js-sys", + "log", + "naga 23.1.0", + "parking_lot", + "profiling", + "raw-window-handle 0.6.2", + "smallvec", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "wgpu-core 23.0.1", + "wgpu-hal 23.0.1", + "wgpu-types 23.0.0", ] [[package]] @@ -2359,13 +4028,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0348c840d1051b8e86c3bcd31206080c5e71e5933dabd79be1ce732b0b2f089a" dependencies = [ "arrayvec", - "bit-vec", + "bit-vec 0.7.0", "bitflags 2.6.0", "cfg_aliases 0.1.1", "document-features", "indexmap", "log", - "naga", + "naga 22.1.0", "once_cell", "parking_lot", "profiling", @@ -2373,8 +4042,33 @@ dependencies = [ "rustc-hash", "smallvec", "thiserror", - "wgpu-hal", - "wgpu-types", + "wgpu-hal 22.0.0", + "wgpu-types 22.0.0", +] + +[[package]] +name = "wgpu-core" +version = "23.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d63c3c478de8e7e01786479919c8769f62a22eec16788d8c2ac77ce2c132778a" +dependencies = [ + "arrayvec", + "bit-vec 0.8.0", + "bitflags 2.6.0", + "cfg_aliases 0.1.1", + "document-features", + "indexmap", + "log", + "naga 23.1.0", + "once_cell", + "parking_lot", + "profiling", + "raw-window-handle 0.6.2", + "rustc-hash", + "smallvec", + "thiserror", + "wgpu-hal 23.0.1", + "wgpu-types 23.0.0", ] [[package]] @@ -2386,16 +4080,16 @@ dependencies = [ "android_system_properties", "arrayvec", "ash", - "bit-set", + "bit-set 0.6.0", "bitflags 2.6.0", "block", "cfg_aliases 0.1.1", "core-graphics-types", "d3d12", - "glow", + "glow 0.13.1", "glutin_wgl_sys", "gpu-alloc", - "gpu-allocator", + "gpu-allocator 0.26.0", "gpu-descriptor", "hassle-rs", "js-sys", @@ -2404,7 +4098,7 @@ dependencies = [ "libloading", "log", "metal", - "naga", + "naga 22.1.0", "ndk-sys 0.5.0+25.2.9519653", "objc", "once_cell", @@ -2418,10 +4112,55 @@ dependencies = [ "thiserror", "wasm-bindgen", "web-sys", - "wgpu-types", + "wgpu-types 22.0.0", "winapi", ] +[[package]] +name = "wgpu-hal" +version = "23.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89364b8a0b211adc7b16aeaf1bd5ad4a919c1154b44c9ce27838213ba05fd821" +dependencies = [ + "android_system_properties", + "arrayvec", + "ash", + "bit-set 0.8.0", + "bitflags 2.6.0", + "block", + "bytemuck", + "cfg_aliases 0.1.1", + "core-graphics-types", + "glow 0.14.2", + "glutin_wgl_sys", + "gpu-alloc", + "gpu-allocator 0.27.0", + "gpu-descriptor", + "js-sys", + "khronos-egl", + "libc", + "libloading", + "log", + "metal", + "naga 23.1.0", + "ndk-sys 0.5.0+25.2.9519653", + "objc", + "once_cell", + "parking_lot", + "profiling", + "range-alloc", + "raw-window-handle 0.6.2", + "renderdoc-sys", + "rustc-hash", + "smallvec", + "thiserror", + "wasm-bindgen", + "web-sys", + "wgpu-types 23.0.0", + "windows 0.58.0", + "windows-core 0.58.0", +] + [[package]] name = "wgpu-types" version = "22.0.0" @@ -2433,6 +4172,17 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wgpu-types" +version = "23.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "610f6ff27778148c31093f3b03abc4840f9636d58d597ca2f5977433acfe0068" +dependencies = [ + "bitflags 2.6.0", + "js-sys", + "web-sys", +] + [[package]] name = "wide" version = "0.7.28" @@ -2486,7 +4236,17 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ - "windows-core", + "windows-core 0.52.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core 0.58.0", "windows-targets 0.52.6", ] @@ -2499,6 +4259,60 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -2766,6 +4580,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +dependencies = [ + "memchr", +] + [[package]] name = "x11-dl" version = "2.21.0" @@ -2847,5 +4670,5 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", ] diff --git a/Cargo.toml b/Cargo.toml index 88581a5..2656cd1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,6 +15,9 @@ package = "com.forestiles.arkitu" build_targets = ["armv7-linux-androideabi", "aarch64-linux-android", "i686-linux-android", "x86_64-linux-android"] [dependencies] +bevy = { version = "0.15", default-features = false, features = [ + "bevy_color","bevy_core_pipeline","bevy_render","bevy_winit","bevy_window","multi_threaded","wayland","bevy_sprite" +]} winit = { version = "0.30", features = ["rwh_05", "android-native-activity"] } env_logger = "0.11" log = "0.4" diff --git a/src/camera.rs b/src/camera.rs new file mode 100644 index 0000000..8bd5bfe --- /dev/null +++ b/src/camera.rs @@ -0,0 +1,16 @@ +use bevy::prelude::*; + +pub struct Plugin; +impl bevy::prelude::Plugin for Plugin { + fn build(&self, app: &mut App) { + app.add_systems(Startup, setup); + } +} + +fn setup(mut cmds: Commands, window: Query<&Window>) { + let zoom = 2./window.single().width().min(window.single().height()); + cmds.spawn(( + Camera2d, + Transform::from_scale(Vec3::new(zoom, zoom, 1.)) + )); +} \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index a301ddc..e1dc1be 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,79 +1,82 @@ -mod graphics; -mod state; +// mod graphics; +// mod state; +mod map; +mod camera; use std::{fmt::Debug, sync::Arc}; use log::debug; -use state::State; -use graphics::Graphics; +// use state::State; +// use graphics::Graphics; use winit::{application::ApplicationHandler, dpi::PhysicalSize, event::{Event, WindowEvent}, event_loop::EventLoop, window::{Window, WindowAttributes}}; +use bevy::app::App; pub fn dbg(v: V) -> V { debug!(target: "app", "{:?}", v); v } -struct App<'a> { - // event_loop: EventLoop<()>, - window: Option>, - graphics: Option>, - state: State -} -impl App<'_> { - fn new() -> Self { - Self { - window: None, - graphics: None, - state: State::new() - } - } -} +// struct App<'a> { +// // event_loop: EventLoop<()>, +// window: Option>, +// graphics: Option>, +// state: State +// } +// impl App<'_> { +// fn new() -> Self { +// Self { +// window: None, +// graphics: None, +// state: State::new() +// } +// } +// } -impl ApplicationHandler for App<'_> { - fn resumed(&mut self, event_loop: &winit::event_loop::ActiveEventLoop) { - #[cfg(not(any(target_family = "wasm", target_os = "android")))] - let window = event_loop.create_window( - WindowAttributes::default() - .with_inner_size(PhysicalSize::new(1080*2/5, 2000*2/5)) - ).unwrap(); - #[cfg(target_os = "android")] - let window = event_loop.create_window( - WindowAttributes::default() - // .with_inner_size(PhysicalSize::new(1080*2/5, 2000*2/5)) - ).unwrap(); - self.window = Some(Arc::new(window)); - self.graphics = Some(pollster::block_on(Graphics::init(&self.state, self.window.clone().unwrap()))); - } - fn window_event( - &mut self, - event_loop: &winit::event_loop::ActiveEventLoop, - window_id: winit::window::WindowId, - event: WindowEvent, - ) { - match &event { - WindowEvent::CloseRequested => event_loop.exit(), - WindowEvent::RedrawRequested => { - if let Some(g) = &mut self.graphics { - self.state.update_if_needed(); - self.state.render(self.window.as_ref().unwrap().inner_size()); - g.update(&self.state); - g.render(&self.state); - } - }, - WindowEvent::MouseWheel { delta, .. } => { - dbg!(delta); - }, - _ => {} - } - self.graphics.as_mut().unwrap().window_event(&event, &self.window.as_ref().unwrap()); - self.state.window_event(&event, &self.window.as_ref().unwrap()); - } - fn about_to_wait(&mut self, event_loop: &winit::event_loop::ActiveEventLoop) { - if let Some(window) = self.window.as_ref() { - window.request_redraw(); - } - } -} +// impl ApplicationHandler for App<'_> { +// fn resumed(&mut self, event_loop: &winit::event_loop::ActiveEventLoop) { +// #[cfg(not(any(target_family = "wasm", target_os = "android")))] +// let window = event_loop.create_window( +// WindowAttributes::default() +// .with_inner_size(PhysicalSize::new(1080*2/5, 2000*2/5)) +// ).unwrap(); +// #[cfg(target_os = "android")] +// let window = event_loop.create_window( +// WindowAttributes::default() +// // .with_inner_size(PhysicalSize::new(1080*2/5, 2000*2/5)) +// ).unwrap(); +// self.window = Some(Arc::new(window)); +// self.graphics = Some(pollster::block_on(Graphics::init(&self.state, self.window.clone().unwrap()))); +// } +// fn window_event( +// &mut self, +// event_loop: &winit::event_loop::ActiveEventLoop, +// window_id: winit::window::WindowId, +// event: WindowEvent, +// ) { +// match &event { +// WindowEvent::CloseRequested => event_loop.exit(), +// WindowEvent::RedrawRequested => { +// if let Some(g) = &mut self.graphics { +// self.state.update_if_needed(); +// self.state.render(self.window.as_ref().unwrap().inner_size()); +// g.update(&self.state); +// g.render(&self.state); +// } +// }, +// WindowEvent::MouseWheel { delta, .. } => { +// dbg!(delta); +// }, +// _ => {} +// } +// self.graphics.as_mut().unwrap().window_event(&event, &self.window.as_ref().unwrap()); +// self.state.window_event(&event, &self.window.as_ref().unwrap()); +// } +// fn about_to_wait(&mut self, event_loop: &winit::event_loop::ActiveEventLoop) { +// if let Some(window) = self.window.as_ref() { +// window.request_redraw(); +// } +// } +// } #[cfg(not(target_os = "android"))] pub fn main() { @@ -96,14 +99,16 @@ pub fn main() { // .unwrap(); // (event_loop, window) // }; - #[cfg(not(target_family = "wasm"))] - let event_loop = { - env_logger::init(); - winit::event_loop::EventLoop::new().unwrap() - }; + use bevy::DefaultPlugins; - event_loop.run_app(&mut App::new()).unwrap(); + App::new() + .add_plugins(DefaultPlugins) + .add_plugins(( + camera::Plugin, + map::Plugin + )) + .run(); } #[cfg(target_os = "android")] diff --git a/src/map.rs b/src/map.rs new file mode 100644 index 0000000..6d42c5a --- /dev/null +++ b/src/map.rs @@ -0,0 +1,248 @@ +use bevy::{asset::RenderAssetUsages, prelude::*, render::mesh::{Indices, PrimitiveTopology}}; +use noise::{Fbm, MultiFractal, NoiseFn, Perlin}; +use rand::{Rng, SeedableRng}; +use voronoice::{BoundingBox, Point, VoronoiBuilder}; + +pub struct Plugin; +impl bevy::prelude::Plugin for Plugin { + fn build(&self, app: &mut App) { + app.add_systems(Startup, setup) + .insert_resource(ClearColor(Color::srgb(0., 0., 1.))); + } +} + +pub const HEIGHT: f32 = 2.; +pub const WIDTH: f32 = 2.; +pub const REAL_HEIGHT: f32 = 500.; +pub const REAL_WIDTH: f32 = 500.; +pub const CELL_AREA: f32 = REAL_HEIGHT * REAL_WIDTH / SIZE as f32; +pub const SIZE: usize = 10000; +pub const seed: u32 = 0; + +#[derive(Resource)] +struct Voronoi (voronoice::Voronoi); + +fn setup( + mut cmds: Commands, + mut meshes: ResMut>, + mut materials: ResMut> +) { + let mut rng = rand::rngs::SmallRng::seed_from_u64(seed as u64); + let mut sites = Vec::with_capacity(SIZE); + for _ in 0..SIZE { + sites.push(Point { x:rng.gen_range(-WIDTH/2.0..WIDTH/2.0) as f64, y:rng.gen_range(-HEIGHT/2.0..HEIGHT/2.0) as f64 }) + } + let voronoi = VoronoiBuilder::default() + .set_sites(sites) + .set_bounding_box(BoundingBox::new_centered(WIDTH as f64, HEIGHT as f64)) + .set_lloyd_relaxation_iterations(3) + .build() + .unwrap(); + let mut cells_data = Vec::with_capacity(SIZE); + let z_noise = Fbm::::new(seed); + let moisture_noise = Fbm::::new(seed+1) + .set_frequency(2.); + for i in 0..SIZE { + let c = voronoi.cell(i); + let site = c.site_position(); + let z = ( + 0.3 // Arbitrary value + + ((z_noise.get([site.x, site.y])+1.)/2.) // Noise + [0; 1] + - ((site.x.powi(2)+site.y.powi(2)).sqrt()*0.5) // Distance - [0; sqrt(2)] * 0.5 + ).clamp(0., 1.); + let m = ( + (moisture_noise.get([site.x, site.y])+1.)/2. // Noise + [0; 1] + ).clamp(0., 1.) as f32; + let k = if z <= 0.5 { + CellKind::Sea + } else if z <= 0.52 { + CellKind::Beach + } else if z < 0.8 { + CellKind::Dirt + } else { + CellKind::Stone + }; + cells_data.push(CellData::new(k, i, z as f32, m, 1.)); + } + + + let mut poss = Vec::new(); + let mut colors = Vec::new(); + let mut indices = Vec::new(); + + for (c, cd) in voronoi.iter_cells().zip(cells_data.iter()).filter(|(_,cd)| cd.kind != CellKind::Forest) { + let mut color = cd.color(); + // if c.site() == selected_tile { + // color[0] = (color[0]+0.4).clamp(0., 1.); + // color[1] = (color[1]+0.4).clamp(0., 1.); + // color[2] = (color[2]+0.4).clamp(0., 1.); + // } + let vs = c.iter_vertices().collect::>(); + let i = poss.len() as u32; + for v in vs.iter() { + poss.push(Vec3::new(v.x as f32, v.y as f32, 0.));// [v.x as f32, v.y as f32, 0.]); + // poss.push(Vertex::new_col([v.x as f32, v.y as f32], color, 1)); + colors.push(color); + } + for v in 1..(vs.len()-1) as u32 { + indices.push(i); + indices.push(i+v); + indices.push(i+v+1); + } + } + + let mesh = Mesh::new(PrimitiveTopology::TriangleList, RenderAssetUsages::default()) + // Add 4 vertices, each with its own position attribute (coordinate in + // 3D space), for each of the corners of the parallelogram. + .with_inserted_attribute( + Mesh::ATTRIBUTE_POSITION, + poss + ) + .with_inserted_attribute( + Mesh::ATTRIBUTE_COLOR, + colors + ) + .with_inserted_indices(Indices::U32(indices)); + + cmds.spawn(( + Mesh2d(meshes.add(mesh)), + MeshMaterial2d(materials.add(ColorMaterial::default())), + Transform::default() + )); + + cmds.insert_resource(Voronoi(voronoi)); +} + + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum CellKind { + Void, + Sea, + Beach, + Forest, + Dirt, + Stone, + Grass +} + +#[derive(Debug, Component)] +pub struct CellData { + pub kind: CellKind, + pub cid: usize, + z: f32, + pub moisture: f32, + pub resource: f32 // How much resource there is (between 0 and 1) +} +impl CellData { + pub fn new(kind: CellKind, cell: usize, z: f32, moisture: f32, resource: f32) -> Self { + Self { + kind, + cid: cell, + z, + moisture, + resource + } + } + // pub fn pos<'a>(&self, map: &'a Map) -> &'a Point { + // &map.voronoi.sites()[self.cid] + // } + pub fn color(&self) -> [f32; 4] { + // let mut rng = thread_rng(); + // [rng.gen(), rng.gen(), rng.gen(), 1.] + match self.kind { + CellKind::Void => [0.; 4], + CellKind::Sea => [0., 0., 1., 1.], + CellKind::Beach => [0.82, 0.84, 0.51, 1.], + CellKind::Forest => [0., 0.5 - (self.resource*0.4), 0., 1.], + CellKind::Dirt => [0.53 - (self.resource*0.4), 0.38-(self.resource*0.4), 0.29-(self.resource*0.4), 1.], + CellKind::Stone => [0.5, 0.5, 0.5, 1.], + CellKind::Grass => [(136./255.) - (self.resource*0.4), (204./255.) - (self.resource*0.4), (59./255.) - (self.resource*0.4), 1.] + } + } + pub fn update(&mut self) { + // How much it get by day + let recuperation_rate = match self.kind { + CellKind::Void | CellKind::Sea | CellKind::Beach | CellKind::Dirt | CellKind::Stone => 0., + CellKind::Forest => 1. / (100. * 365.25), // Let's say that a forest takes 100 years to mature + CellKind::Grass => 1. / (7. * 7.) // Let's say that grass takes 7 weaks to reach its max + }; + self.resource = (self.resource + recuperation_rate).clamp(0., 1.); + } + pub fn set_resource(&mut self, val: f32, t: usize) { + self.resource = val.clamp(0., 1.); + if self.resource == 0. { + match self.kind { + CellKind::Forest => { + self.kind = CellKind::Grass; + self.resource = 1.; + }, + CellKind::Grass => { + self.kind = CellKind::Dirt; + self.resource = 0.5; + }, + CellKind::Beach => { + self.kind = CellKind::Sea; + }, + _ => {} + } + } + } +} + +// pub struct Map { +// pub voronoi: Voronoi, +// pub cells_data: Vec, +// pub seed: u32 +// } +// impl Map { +// pub const HEIGHT: f32 = 2.; +// pub const WIDTH: f32 = 2.; +// pub const REAL_HEIGHT: f32 = 500.; +// pub const REAL_WIDTH: f32 = 500.; +// pub const CELL_AREA: f32 = Self::REAL_HEIGHT * Self::REAL_WIDTH / Self::SIZE as f32; +// pub const SIZE: usize = 10000; +// pub fn new(seed: u32, t: usize) -> Self { +// let mut rng = rand::rngs::SmallRng::seed_from_u64(seed as u64); +// let mut sites = Vec::with_capacity(Self::SIZE); +// for _ in 0..Self::SIZE { +// sites.push(Point { x:rng.gen_range(-Self::WIDTH/2.0..Self::WIDTH/2.0) as f64, y:rng.gen_range(-Self::HEIGHT/2.0..Self::HEIGHT/2.0) as f64 }) +// } +// let voronoi = VoronoiBuilder::default() +// .set_sites(sites) +// .set_bounding_box(BoundingBox::new_centered(Self::WIDTH as f64, Self::HEIGHT as f64)) +// .set_lloyd_relaxation_iterations(3) +// .build() +// .unwrap(); +// let mut cells_data = Vec::with_capacity(Self::SIZE); +// let z_noise = Fbm::::new(seed); +// let moisture_noise = Fbm::::new(seed+1) +// .set_frequency(2.); +// for i in 0..Self::SIZE { +// let c = voronoi.cell(i); +// let site = c.site_position(); +// let z = ( +// 0.3 // Arbitrary value +// + ((z_noise.get([site.x, site.y])+1.)/2.) // Noise + [0; 1] +// - ((site.x.powi(2)+site.y.powi(2)).sqrt()*0.5) // Distance - [0; sqrt(2)] * 0.5 +// ).clamp(0., 1.); +// let m = ( +// (moisture_noise.get([site.x, site.y])+1.)/2. // Noise + [0; 1] +// ).clamp(0., 1.) as f32; +// let k = if z <= 0.5 { +// CellKind::Sea +// } else if z <= 0.52 { +// CellKind::Beach +// } else if z < 0.8 { +// CellKind::Dirt +// } else { +// CellKind::Stone +// }; +// cells_data.push(CellData::new(k, i, z as f32, m, 1., t)); +// } +// Self { +// voronoi, +// cells_data, +// seed +// } +// } +// } \ No newline at end of file diff --git a/src/state/map.rs b/src/state/map.rs deleted file mode 100644 index 87930c3..0000000 --- a/src/state/map.rs +++ /dev/null @@ -1,136 +0,0 @@ -use noise::{Fbm, MultiFractal, NoiseFn, Perlin}; -use rand::{Rng, SeedableRng}; -use voronoice::{BoundingBox, Point, Voronoi, VoronoiBuilder}; - -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub enum CellKind { - Void, - Sea, - Beach, - Forest, - Dirt, - Stone, - Grass -} - -#[derive(Debug)] -pub struct CellData { - pub kind: CellKind, - pub cid: usize, - z: f32, - pub moisture: f32, - pub resource: f32 // How much resource there is (between 0 and 1) -} -impl CellData { - pub fn new(kind: CellKind, cell: usize, z: f32, moisture: f32, resource: f32, t: usize) -> Self { - Self { - kind, - cid: cell, - z, - moisture, - resource - } - } - pub fn pos<'a>(&self, map: &'a Map) -> &'a Point { - &map.voronoi.sites()[self.cid] - } - pub fn color(&self) -> [f32; 4] { - // let mut rng = thread_rng(); - // [rng.gen(), rng.gen(), rng.gen(), 1.] - match self.kind { - CellKind::Void => [0.; 4], - CellKind::Sea => [0., 0., 1., 1.], - CellKind::Beach => [0.82, 0.84, 0.51, 1.], - CellKind::Forest => [0., 0.5 - (self.resource*0.4), 0., 1.], - CellKind::Dirt => [0.53 - (self.resource*0.4), 0.38-(self.resource*0.4), 0.29-(self.resource*0.4), 1.], - CellKind::Stone => [0.5, 0.5, 0.5, 1.], - CellKind::Grass => [(136./255.) - (self.resource*0.4), (204./255.) - (self.resource*0.4), (59./255.) - (self.resource*0.4), 1.] - } - } - pub fn update(&mut self) { - // How much it get by day - let recuperation_rate = match self.kind { - CellKind::Void | CellKind::Sea | CellKind::Beach | CellKind::Dirt | CellKind::Stone => 0., - CellKind::Forest => 1. / (100. * 365.25), // Let's say that a forest takes 100 years to mature - CellKind::Grass => 1. / (7. * 7.) // Let's say that grass takes 7 weaks to reach its max - }; - self.resource = (self.resource + recuperation_rate).clamp(0., 1.); - } - pub fn set_resource(&mut self, val: f32, t: usize) { - self.resource = val.clamp(0., 1.); - if self.resource == 0. { - match self.kind { - CellKind::Forest => { - self.kind = CellKind::Grass; - self.resource = 1.; - }, - CellKind::Grass => { - self.kind = CellKind::Dirt; - self.resource = 0.5; - }, - CellKind::Beach => { - self.kind = CellKind::Sea; - }, - _ => {} - } - } - } -} - -pub struct Map { - pub voronoi: Voronoi, - pub cells_data: Vec, - pub seed: u32 -} -impl Map { - pub const HEIGHT: f32 = 2.; - pub const WIDTH: f32 = 2.; - pub const REAL_HEIGHT: f32 = 500.; - pub const REAL_WIDTH: f32 = 500.; - pub const CELL_AREA: f32 = Self::REAL_HEIGHT * Self::REAL_WIDTH / Self::SIZE as f32; - pub const SIZE: usize = 10000; - pub fn new(seed: u32, t: usize) -> Self { - let mut rng = rand::rngs::SmallRng::seed_from_u64(seed as u64); - let mut sites = Vec::with_capacity(Self::SIZE); - for _ in 0..Self::SIZE { - sites.push(Point { x:rng.gen_range(-Self::WIDTH/2.0..Self::WIDTH/2.0) as f64, y:rng.gen_range(-Self::HEIGHT/2.0..Self::HEIGHT/2.0) as f64 }) - } - let voronoi = VoronoiBuilder::default() - .set_sites(sites) - .set_bounding_box(BoundingBox::new_centered(Self::WIDTH as f64, Self::HEIGHT as f64)) - .set_lloyd_relaxation_iterations(3) - .build() - .unwrap(); - let mut cells_data = Vec::with_capacity(Self::SIZE); - let z_noise = Fbm::::new(seed); - let moisture_noise = Fbm::::new(seed+1) - .set_frequency(2.); - for i in 0..Self::SIZE { - let c = voronoi.cell(i); - let site = c.site_position(); - let z = ( - 0.3 // Arbitrary value - + ((z_noise.get([site.x, site.y])+1.)/2.) // Noise + [0; 1] - - ((site.x.powi(2)+site.y.powi(2)).sqrt()*0.5) // Distance - [0; sqrt(2)] * 0.5 - ).clamp(0., 1.); - let m = ( - (moisture_noise.get([site.x, site.y])+1.)/2. // Noise + [0; 1] - ).clamp(0., 1.) as f32; - let k = if z <= 0.5 { - CellKind::Sea - } else if z <= 0.52 { - CellKind::Beach - } else if z < 0.8 { - CellKind::Dirt - } else { - CellKind::Stone - }; - cells_data.push(CellData::new(k, i, z as f32, m, 1., t)); - } - Self { - voronoi, - cells_data, - seed - } - } -} \ No newline at end of file