diff --git a/Cargo.lock b/Cargo.lock
index da23b07..6680426 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -45,12 +45,13 @@ checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234"
[[package]]
name = "ahash"
-version = "0.5.7"
+version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad4243ec6feddc812c0f442d9765374d250aba94e10ecf8b632e1b1c118547e8"
+checksum = "796540673305a66d127804eef19ad696f1f204b8c1025aaca4958c17eab32877"
dependencies = [
"getrandom 0.2.0",
- "lazy_static",
+ "once_cell",
+ "version_check",
]
[[package]]
@@ -109,15 +110,12 @@ dependencies = [
]
[[package]]
-name = "android_logger"
-version = "0.9.0"
+name = "ansi_term"
+version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5027a747b8132dc36dc894415a300aab31d6489ee788e9ba07bc99558b1278ca"
+checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
dependencies = [
- "android_log-sys 0.2.0",
- "env_logger",
- "lazy_static",
- "log",
+ "winapi 0.3.9",
]
[[package]]
@@ -132,6 +130,15 @@ version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33954243bd79057c2de7338850b85983a44588021f8a5fee574a8888c6de4344"
+[[package]]
+name = "approx"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f2a05fd1bd10b2527e20a2cd32d8873d115b8b39fe219ee25f42a8aca6ba278"
+dependencies = [
+ "num-traits",
+]
+
[[package]]
name = "arrayvec"
version = "0.5.2"
@@ -233,37 +240,11 @@ checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff"
[[package]]
name = "bevy"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8de175e156277bf382d5212e4f580e74caaa62917b5554e12ab2addd87ae789"
+checksum = "c16660356e9a79666848ff247aecaa30d9a7bb233e902035140b32d47d0b1345"
dependencies = [
- "android_logger 0.9.0",
- "bevy_app",
- "bevy_asset",
- "bevy_audio",
- "bevy_core",
- "bevy_diagnostic",
- "bevy_dynamic_plugin",
- "bevy_ecs",
- "bevy_gilrs",
- "bevy_gltf",
- "bevy_input",
- "bevy_math",
- "bevy_pbr",
- "bevy_property",
- "bevy_render",
- "bevy_scene",
- "bevy_sprite",
- "bevy_tasks",
- "bevy_text",
- "bevy_transform",
- "bevy_type_registry",
- "bevy_ui",
- "bevy_utils",
- "bevy_wgpu",
- "bevy_window",
- "bevy_winit",
- "ndk-glue",
+ "bevy_internal",
]
[[package]]
@@ -274,15 +255,13 @@ checksum = "0d5f2f58f0aec3c50a20799792c3705e80dd7df327e79791cacec197e84e5e61"
[[package]]
name = "bevy_app"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93cdf694a6d588bf46a2a7ae5623f176fc5c4ee4d0d71281fdc25bd263136a14"
+checksum = "d720bb8174ec9a7bc8f745ff821536a1d234d50fed205d2f8dc831e0577f76c9"
dependencies = [
"bevy_derive",
"bevy_ecs",
"bevy_utils",
- "instant",
- "log",
"serde",
"wasm-bindgen",
"web-sys",
@@ -290,21 +269,19 @@ dependencies = [
[[package]]
name = "bevy_asset"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "76ed5c0dcf4262387a3917dcf4cd1a7bf9539bac843a6c9653bb56e9d5ef723c"
+checksum = "f91a01d06319758b541ea1ed4a84e5b894194b56ece1fc3d09263e8830f06cdd"
dependencies = [
"anyhow",
"bevy_app",
"bevy_ecs",
- "bevy_property",
+ "bevy_reflect",
"bevy_tasks",
- "bevy_type_registry",
"bevy_utils",
"crossbeam-channel 0.4.4",
"downcast-rs",
"js-sys",
- "log",
"ndk-glue",
"notify",
"parking_lot",
@@ -312,7 +289,6 @@ dependencies = [
"ron",
"serde",
"thiserror",
- "uuid",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
@@ -320,15 +296,15 @@ dependencies = [
[[package]]
name = "bevy_audio"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6198d842cc25f77dc828d0ba0ae9b313fd864e18af29f60e9d5319d056f8166"
+checksum = "b2db6b28a59a8941872cefab577544fcc296cfe593ce1c466c572fb22797e526"
dependencies = [
"anyhow",
"bevy_app",
"bevy_asset",
"bevy_ecs",
- "bevy_type_registry",
+ "bevy_reflect",
"bevy_utils",
"parking_lot",
"rodio",
@@ -336,97 +312,104 @@ dependencies = [
[[package]]
name = "bevy_core"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2bbe690bd67ba93067651604a3da5b314ec4de5417547ad0f1fbd93da541ea30"
+checksum = "918dac4225062e3517b63a186c6a4988eee167c7e90f42eeaa7a3c3943f9a1ff"
dependencies = [
"bevy_app",
"bevy_derive",
"bevy_ecs",
"bevy_math",
- "bevy_property",
+ "bevy_reflect",
"bevy_tasks",
- "bevy_type_registry",
"bevy_utils",
- "instant",
- "log",
]
[[package]]
name = "bevy_derive"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c18d8de3b2f1c66dbac70fbf82bce0dcbeceecf2356eb1b542c735d5c17e0a0"
+checksum = "96e17d375b833953cf0af3cabdf0aff02360591418e79db954b917bf1e6834fd"
dependencies = [
"Inflector",
- "proc-macro-crate",
+ "find-crate",
"proc-macro2",
"quote",
"syn",
- "uuid",
]
[[package]]
name = "bevy_diagnostic"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e98868df99533447a6ad202e6826fe24cecab80c163c1dcac56b811ea69a9f7"
+checksum = "7db1bd6b45976a460af49ad2e325b5594cd2ef29d153301f598bb0c6c2cfaf23"
dependencies = [
"bevy_app",
"bevy_core",
"bevy_ecs",
"bevy_utils",
- "instant",
"parking_lot",
- "uuid",
]
[[package]]
name = "bevy_dynamic_plugin"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc5672a27be1e38e11b6f2f1e1290fde2aa4f074628aad33303953ce881a5a78"
+checksum = "07b9aa16336380773e9bed0f7645f05572bcbe0343b957c86e8cef43abd96abc"
dependencies = [
"bevy_app",
"libloading 0.6.5",
- "log",
]
[[package]]
name = "bevy_ecs"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ad8a73ad248ed6c16b1ca53eaedd76ae5aa284aa5c4527f8cf3526b5e3a7fce"
+checksum = "c412b6172d95ae55e405ca54462b0fb252531a4c3a12a5cac9eb533dcb4cf1b2"
dependencies = [
- "bevy_hecs",
+ "bevy_ecs_macros",
"bevy_tasks",
"bevy_utils",
+ "bitflags",
"downcast-rs",
"fixedbitset",
- "log",
+ "lazy_static",
"parking_lot",
"rand",
+ "serde",
"thiserror",
]
[[package]]
-name = "bevy_gilrs"
-version = "0.3.0"
+name = "bevy_ecs_macros"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "255ceb467ab2982a0bd1ef0c49ae557704f99fe11ab990a11492cea2e6d7fd7f"
+checksum = "92628e92dd65cef319dd059d1392a981e0c74a8bdd4889bcbbfac55799fa759b"
+dependencies = [
+ "find-crate",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "bevy_gilrs"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfbb39c13a967a2fd462ed691a5a1a49c95463075be3872b582b5d90d7bc218f"
dependencies = [
"bevy_app",
"bevy_ecs",
"bevy_input",
+ "bevy_utils",
"gilrs",
- "log",
]
[[package]]
name = "bevy_gltf"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44dfa912e7fb0ac140b46e2cdf4f6f5e66e6def8049dc8cee69de9a9bafd1836"
+checksum = "bd4253666139cdc5425d1399a033d7f4eaf685fb914b087b6d5c6a1086432995"
dependencies = [
"anyhow",
"base64 0.12.3",
@@ -435,44 +418,20 @@ dependencies = [
"bevy_ecs",
"bevy_math",
"bevy_pbr",
+ "bevy_reflect",
"bevy_render",
"bevy_scene",
"bevy_transform",
- "bevy_type_registry",
"gltf",
"image",
"thiserror",
]
-[[package]]
-name = "bevy_hecs"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "18661dc92bcb6cc1f2f5ad630f3f3eae7b23942860ea6845a2a775b5a1f7564f"
-dependencies = [
- "bevy_hecs_macros",
- "bevy_utils",
- "lazy_static",
- "serde",
-]
-
-[[package]]
-name = "bevy_hecs_macros"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a85e43b7043183821aa62f09c91164a0aa6de771c5397a7a0d0eaf754cc042a"
-dependencies = [
- "proc-macro-crate",
- "proc-macro2",
- "quote",
- "syn",
-]
-
[[package]]
name = "bevy_input"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "069dc814211aaf691c9aca9ce97210d3238c19e599dfc2bc50b183fe925f0a00"
+checksum = "4d2589b547ed2e48cc204acc670e8c3002e24ca9cabbe427bb4b31d339f628a1"
dependencies = [
"bevy_app",
"bevy_ecs",
@@ -481,19 +440,69 @@ dependencies = [
]
[[package]]
-name = "bevy_math"
-version = "0.3.0"
+name = "bevy_internal"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "71ff845326919ef68a796ae4740e33356683020756bc1d23b552b9b31a106fd3"
+checksum = "ad383825249f68405bd143d88194fda471ad017baf5c3240870c8c38dad8d47f"
dependencies = [
- "glam",
+ "bevy_app",
+ "bevy_asset",
+ "bevy_audio",
+ "bevy_core",
+ "bevy_derive",
+ "bevy_diagnostic",
+ "bevy_dynamic_plugin",
+ "bevy_ecs",
+ "bevy_gilrs",
+ "bevy_gltf",
+ "bevy_input",
+ "bevy_log",
+ "bevy_math",
+ "bevy_pbr",
+ "bevy_reflect",
+ "bevy_render",
+ "bevy_scene",
+ "bevy_sprite",
+ "bevy_tasks",
+ "bevy_text",
+ "bevy_transform",
+ "bevy_ui",
+ "bevy_utils",
+ "bevy_wgpu",
+ "bevy_window",
+ "bevy_winit",
+ "ndk-glue",
+]
+
+[[package]]
+name = "bevy_log"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "463bf6a1e09f5738b5e3ab7e266ecd59dcd6cfc1d4bd9e9eb5a80825fd80e8ff"
+dependencies = [
+ "android_log-sys 0.2.0",
+ "bevy_app",
+ "bevy_utils",
+ "console_error_panic_hook",
+ "tracing-subscriber",
+ "tracing-wasm",
+]
+
+[[package]]
+name = "bevy_math"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cee6066dc393c913f3eb8873c3d3978010b1664b5947f6fa38c28be326da9735"
+dependencies = [
+ "bevy_reflect",
+ "glam 0.11.3",
]
[[package]]
name = "bevy_pbr"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34e4185bf49b2cfd31a0aec90722b3e898b37de5d61ec4cc53e5df9ecae19d71"
+checksum = "eadb5c93f5257279d2c88879e251c5064e244e88e288a7f640f986f04d0f046e"
dependencies = [
"bevy_app",
"bevy_asset",
@@ -501,46 +510,49 @@ dependencies = [
"bevy_derive",
"bevy_ecs",
"bevy_math",
- "bevy_property",
+ "bevy_reflect",
"bevy_render",
"bevy_transform",
- "bevy_type_registry",
"bevy_window",
]
[[package]]
-name = "bevy_property"
-version = "0.3.0"
+name = "bevy_reflect"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0bd127fa915b12581aab82cf77ade4a29c1a7b00c19672b88c187c14d111227c"
+checksum = "511b41d40080cfb389b2b4d489c0ee0db9e66f09e88fa4ff6faef22c4610e777"
dependencies = [
+ "bevy_app",
"bevy_ecs",
- "bevy_math",
- "bevy_property_derive",
+ "bevy_reflect_derive",
"bevy_utils",
+ "downcast-rs",
"erased-serde",
- "ron",
+ "glam 0.11.3",
+ "parking_lot",
"serde",
"smallvec",
+ "thiserror",
]
[[package]]
-name = "bevy_property_derive"
-version = "0.3.0"
+name = "bevy_reflect_derive"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a3c7a3bc30a90561dc05e662597d595d29a9a7171fb7e5fc34fdb09e4c60c10f"
+checksum = "b40373d356ab3d8aac58c79dc3a56338f56632b55435f73fd009bc6f93ddddc0"
dependencies = [
- "proc-macro-crate",
+ "find-crate",
"proc-macro2",
"quote",
"syn",
+ "uuid",
]
[[package]]
name = "bevy_render"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c1e99851a90fba39994aa26887da114cb53388e1ba7324b60cea4156351ad23"
+checksum = "f36bfed7edfcf8989e683e122df5384efdf15fd3237fdc2367191ce4722fe374"
dependencies = [
"anyhow",
"bevy-glsl-to-spirv",
@@ -550,9 +562,8 @@ dependencies = [
"bevy_derive",
"bevy_ecs",
"bevy_math",
- "bevy_property",
+ "bevy_reflect",
"bevy_transform",
- "bevy_type_registry",
"bevy_utils",
"bevy_window",
"bitflags",
@@ -560,7 +571,6 @@ dependencies = [
"hex",
"hexasphere",
"image",
- "log",
"once_cell",
"parking_lot",
"serde",
@@ -568,21 +578,20 @@ dependencies = [
"smallvec",
"spirv-reflect",
"thiserror",
- "uuid",
]
[[package]]
name = "bevy_scene"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d00a586fa10ea919800eda837f98396b49b99a84ee1fc8d6ad4ede151d3b9e4"
+checksum = "f3566aa31189d212785a902d49bf5d75aba32f633d531fe3f4ccf2e51715c7cc"
dependencies = [
"anyhow",
"bevy_app",
"bevy_asset",
"bevy_ecs",
- "bevy_property",
- "bevy_type_registry",
+ "bevy_reflect",
+ "bevy_transform",
"bevy_utils",
"parking_lot",
"ron",
@@ -593,93 +602,80 @@ dependencies = [
[[package]]
name = "bevy_sprite"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "15eb21af28740fcaf9bd4cec1df90a3015ffab1d33d51022ebc9f106f55210d8"
+checksum = "0b89d4c644e8892f5b215d812c66fd42eb553352288e668076ee25068877e508"
dependencies = [
"bevy_app",
"bevy_asset",
"bevy_core",
"bevy_ecs",
"bevy_math",
+ "bevy_reflect",
"bevy_render",
"bevy_transform",
- "bevy_type_registry",
"bevy_utils",
"guillotiere",
"rectangle-pack",
+ "serde",
"thiserror",
]
[[package]]
name = "bevy_tasks"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c39e34a30611a1c4a80a30d252f0c53afa27e9500fa73dae1dca2e41c85c765"
+checksum = "73cb02453fab099d690d08f1688f91cd026f0f9f2d06d25629eed9d8b4418d58"
dependencies = [
"async-channel",
"async-executor",
"event-listener",
"futures-lite",
+ "instant",
"num_cpus",
"wasm-bindgen-futures",
]
[[package]]
name = "bevy_text"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61b128707cbbc841fa8aa3b41e29362d4a7ba38fb4450b7766d3ff9884389766"
+checksum = "636546e42b1f8c5225f89c0408031e6e2c8c47fe2c06f611d4a678e722ec56c1"
dependencies = [
"ab_glyph",
"anyhow",
"bevy_app",
"bevy_asset",
"bevy_core",
+ "bevy_ecs",
"bevy_math",
+ "bevy_reflect",
"bevy_render",
"bevy_sprite",
- "bevy_type_registry",
"bevy_utils",
+ "glyph_brush_layout",
+ "thiserror",
]
[[package]]
name = "bevy_transform"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf4b3c44fc53eb744fc16edc923655a50a01fd0e8e6edfe6f3b3065997e913f5"
+checksum = "2655003cdb139b55ff2851b07345b83e910d7350c466635ad5db1a38169d2c56"
dependencies = [
"bevy_app",
"bevy_ecs",
"bevy_math",
- "bevy_property",
- "bevy_type_registry",
+ "bevy_reflect",
"bevy_utils",
- "log",
"smallvec",
]
-[[package]]
-name = "bevy_type_registry"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4aac65e5c297e547844cb5986da14975181a352f532c8d6fe95f7b62e5a40d32"
-dependencies = [
- "bevy_app",
- "bevy_derive",
- "bevy_ecs",
- "bevy_property",
- "bevy_utils",
- "parking_lot",
- "serde",
- "uuid",
-]
-
[[package]]
name = "bevy_ui"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2994737dd6413028a2bcda7315ab6cbe8c30c1dab809fb3de4b1e1a8e2fbfabc"
+checksum = "4bc722420aa0d2a8eb10ba5dd7b5aa2181d37e64d71a58df13fb461551c1278c"
dependencies = [
"bevy_app",
"bevy_asset",
@@ -688,31 +684,35 @@ dependencies = [
"bevy_ecs",
"bevy_input",
"bevy_math",
+ "bevy_reflect",
"bevy_render",
"bevy_sprite",
"bevy_text",
"bevy_transform",
- "bevy_type_registry",
"bevy_utils",
"bevy_window",
+ "serde",
"stretch",
]
[[package]]
name = "bevy_utils"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "554cd4eba4b278f6cc0fe5da0b7dbe8deba51613e6769f93b0d5a8a32eac54b6"
+checksum = "4e864ce079f076445c5fb0024f0762de5a617a3572f7ea15c015c9171bc124fd"
dependencies = [
"ahash",
"getrandom 0.2.0",
+ "instant",
+ "tracing",
+ "uuid",
]
[[package]]
name = "bevy_wgpu"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ba8d9ae1409735ddc2b83426849ba819699288d0ff1166b9caa352511300a1d"
+checksum = "34f4ca70078bb827970bbb8fcd56245d98c66012e9136256373de70be1f68d39"
dependencies = [
"bevy_app",
"bevy_asset",
@@ -726,30 +726,28 @@ dependencies = [
"crossbeam-channel 0.4.4",
"crossbeam-utils 0.7.2",
"futures-lite",
- "log",
"parking_lot",
"wgpu",
]
[[package]]
name = "bevy_window"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f15434d9c46bfc96d449a121e01139489ddc9e79b879edee73c58f90b6b2bbb3"
+checksum = "60c2b78591e1bf568d1aa9f663b6179d17ecf33517f7ac382981bcd7b47d8036"
dependencies = [
"bevy_app",
"bevy_ecs",
"bevy_math",
"bevy_utils",
- "uuid",
"web-sys",
]
[[package]]
name = "bevy_winit"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6fd72a8a4b42e975c2cac508500471b468568f042d6bbaf6f200844eba3192b0"
+checksum = "9c4c23da1c3502e5e4344cd7a9bf5c1567471dfd633c3f8e0c8ccebf1dcfafed"
dependencies = [
"bevy_app",
"bevy_ecs",
@@ -757,7 +755,6 @@ dependencies = [
"bevy_math",
"bevy_utils",
"bevy_window",
- "log",
"wasm-bindgen",
"web-sys",
"winit",
@@ -876,6 +873,18 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+[[package]]
+name = "chrono"
+version = "0.4.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
+dependencies = [
+ "libc",
+ "num-integer",
+ "num-traits",
+ "winapi 0.3.9",
+]
+
[[package]]
name = "chunked_transfer"
version = "1.3.0"
@@ -913,9 +922,9 @@ dependencies = [
[[package]]
name = "cocoa"
-version = "0.23.0"
+version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c54201c07dcf3a5ca33fececb8042aed767ee4bfd5a0235a8ceabcda956044b2"
+checksum = "6f63902e9223530efb4e26ccd0cf55ec30d592d3b42e21a28defc42a9586e832"
dependencies = [
"bitflags",
"block",
@@ -981,6 +990,16 @@ dependencies = [
"cache-padded",
]
+[[package]]
+name = "console_error_panic_hook"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8d976903543e0c48546a91908f21588a680a8c8f984df9a5d69feccb2b2a211"
+dependencies = [
+ "cfg-if 0.1.10",
+ "wasm-bindgen",
+]
+
[[package]]
name = "const_fn"
version = "0.4.3"
@@ -1389,6 +1408,15 @@ dependencies = [
"winapi 0.3.9",
]
+[[package]]
+name = "find-crate"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59a98bbaacea1c0eb6a0876280051b892eb73594fd90cf3b20e9c817029c57d2"
+dependencies = [
+ "toml",
+]
+
[[package]]
name = "fixedbitset"
version = "0.3.1"
@@ -1792,11 +1820,21 @@ checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce"
[[package]]
name = "glam"
-version = "0.9.5"
+version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8637c7ec4fd0776c51eeab3e0d5d1aa7e440ece3fc2ee7d674e13c957287bfc1"
+checksum = "49d9e5a6410cd46e6bea97123cec5ef1cba14274aad26a1835dd3c9b753ae069"
dependencies = [
"serde",
+ "version_check",
+]
+
+[[package]]
+name = "glam"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2ad8819b352632f676098176a51e11e324e8cee4c2518dd67e58c36b848438e6"
+dependencies = [
+ "version_check",
]
[[package]]
@@ -1840,6 +1878,17 @@ dependencies = [
"serde_json",
]
+[[package]]
+name = "glyph_brush_layout"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "10bc06d530bf20c1902f1b02799ab7372ff43f6119770c49b0bc3f21bd148820"
+dependencies = [
+ "ab_glyph",
+ "approx",
+ "xi-unicode",
+]
+
[[package]]
name = "guillotiere"
version = "0.6.0"
@@ -1867,11 +1916,11 @@ checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35"
[[package]]
name = "hexasphere"
-version = "1.0.0"
+version = "3.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "00ad921775e70efb68429688766ca130de39af65d5201db760b0e6558bfa8175"
+checksum = "cd045b4b2fcd330e6e17bb0fc5e91a96c1511c0802ae6e45b4f80463c55c4a8b"
dependencies = [
- "glam",
+ "glam 0.12.0",
"lazy_static",
]
@@ -2055,9 +2104,6 @@ name = "lazy_static"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
-dependencies = [
- "spin",
-]
[[package]]
name = "lazycell"
@@ -2173,6 +2219,15 @@ dependencies = [
"rayon",
]
+[[package]]
+name = "matchers"
+version = "0.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1"
+dependencies = [
+ "regex-automata",
+]
+
[[package]]
name = "matches"
version = "0.1.8"
@@ -2327,7 +2382,7 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bdf399b8b7a39c6fb153c4ec32c72fd5fe789df24a647f229c239aa7adb15241"
dependencies = [
- "android_logger 0.8.6",
+ "android_logger",
"lazy_static",
"libc",
"log",
@@ -2842,6 +2897,16 @@ dependencies = [
"thread_local",
]
+[[package]]
+name = "regex-automata"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4"
+dependencies = [
+ "byteorder",
+ "regex-syntax",
+]
+
[[package]]
name = "regex-syntax"
version = "0.6.21"
@@ -3026,9 +3091,9 @@ checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d"
[[package]]
name = "shaderc"
-version = "0.6.3"
+version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50b8aeaae10b9bda5cba66736a7e265f67698e912e1cc6a4678acba286e22be9"
+checksum = "93896fc153a0977666b9ee0e6b3ffcebb172682e80bccb3b28a1c823e47825d0"
dependencies = [
"libc",
"shaderc-sys",
@@ -3036,14 +3101,23 @@ dependencies = [
[[package]]
name = "shaderc-sys"
-version = "0.6.3"
+version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b12d7c62d6732884c9dfab587503fa3a795b108df152415a89da23812d4737e"
+checksum = "2ca380428494e9f5780e90ffd5516328aa980864f9bce36d6a636a28be07c8bd"
dependencies = [
"cmake",
"libc",
]
+[[package]]
+name = "sharded-slab"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79c719719ee05df97490f80a45acfc99e5a30ce98a1e4fb67aee422745ae14e3"
+dependencies = [
+ "lazy_static",
+]
+
[[package]]
name = "shlex"
version = "0.1.1"
@@ -3312,9 +3386,21 @@ checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3"
dependencies = [
"cfg-if 1.0.0",
"pin-project-lite 0.2.0",
+ "tracing-attributes",
"tracing-core",
]
+[[package]]
+name = "tracing-attributes"
+version = "0.1.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8a9bd1db7706f2373a190b0d067146caa39350c486f3d455b0e33b431f94c07"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
[[package]]
name = "tracing-core"
version = "0.1.17"
@@ -3324,6 +3410,60 @@ dependencies = [
"lazy_static",
]
+[[package]]
+name = "tracing-log"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a6923477a48e41c1951f1999ef8bb5a3023eb723ceadafe78ffb65dc366761e3"
+dependencies = [
+ "lazy_static",
+ "log",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-serde"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb65ea441fbb84f9f6748fd496cf7f63ec9af5bca94dd86456978d055e8eb28b"
+dependencies = [
+ "serde",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-subscriber"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ab8966ac3ca27126141f7999361cc97dd6fb4b71da04c02044fa9045d98bb96"
+dependencies = [
+ "ansi_term",
+ "chrono",
+ "lazy_static",
+ "matchers",
+ "regex",
+ "serde",
+ "serde_json",
+ "sharded-slab",
+ "smallvec",
+ "thread_local",
+ "tracing",
+ "tracing-core",
+ "tracing-log",
+ "tracing-serde",
+]
+
+[[package]]
+name = "tracing-wasm"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd96394d3d2f119de6c1078fa065b99217db4377f9aac6e87f8393276a0d7962"
+dependencies = [
+ "tracing",
+ "tracing-subscriber",
+ "wasm-bindgen",
+]
+
[[package]]
name = "ttf-parser"
version = "0.8.3"
@@ -3677,9 +3817,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "winit"
-version = "0.23.0"
+version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5bc559da567d8aa671bbcd08304d49e982c7bf2cb91e10288b9188931c1b772"
+checksum = "da4eda6fce0eb84bd0a33e3c8794eb902e1033d0a1d5a31bc4f19b1b4bbff597"
dependencies = [
"bitflags",
"cocoa",
@@ -3755,3 +3895,9 @@ checksum = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c"
dependencies = [
"libc",
]
+
+[[package]]
+name = "xi-unicode"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a67300977d3dc3f8034dae89778f502b6ba20b269527b3223ba59c0cf393bb8a"
diff --git a/Cargo.toml b/Cargo.toml
index 21510b9..6f80c32 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -7,6 +7,6 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-bevy = "0.3"
+bevy = "0.4"
num-complex = "0.3"
rayon = "1.5"
diff --git a/src/main.rs b/src/main.rs
index abdcdc4..d858866 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,4 +1,5 @@
-use bevy::{prelude::*, render::texture::TextureFormat};
+use bevy::prelude::*;
+use bevy::render::texture::{Extent3d, TextureDimension, TextureFormat};
use mandelbrot::Mandelbrot;
use std::time::Instant;
@@ -33,11 +34,7 @@ impl Default for SpriteScale {
}
}
-fn transform_mandelbrot_system(
- input: Res>,
- mut scale: ResMut,
- // camera: Res,
-) {
+fn transform_mandelbrot_system(input: Res>, mut scale: ResMut) {
let zoom = input.pressed(KeyCode::Q) as i8 - input.pressed(KeyCode::E) as i8;
let horizontal = input.pressed(KeyCode::D) as i8 - input.pressed(KeyCode::A) as i8;
let vertical = input.pressed(KeyCode::W) as i8 - input.pressed(KeyCode::S) as i8;
@@ -90,13 +87,13 @@ fn mandelbrot_render_system(
let v = scale.verti;
let iters = scale.iterations;
- let start = Instant::now();
- texture.data.copy_from_slice(fractal.generate_scaled_image(
+ let buf = fractal.generate_scaled_image(
((-2.5 * z) + h, (1.0 * z) + h),
((-1.0 * z) - v, (1.0 * z) - v),
iters,
- ));
- let _diff = Instant::now() - start;
+ );
+
+ texture.data.copy_from_slice(buf);
}
}
}
@@ -104,22 +101,24 @@ fn mandelbrot_render_system(
}
fn startup(
- mut commands: Commands,
+ commands: &mut Commands,
mut textures: ResMut>,
mut materials: ResMut>,
) {
- let img_size = Vec2::new(Mandelbrot::width() as f32, Mandelbrot::height() as f32);
+ let img_size = Extent3d::new(Mandelbrot::width() as u32, Mandelbrot::height() as u32, 1);
+ let dimension = TextureDimension::D2;
let img_buf = Mandelbrot::new().generate_image().to_vec();
let texture_handle = textures.add(Texture::new(
img_size,
+ dimension,
img_buf,
TextureFormat::Rgba8UnormSrgb,
));
commands
- .spawn(Camera2dComponents::default())
- .spawn(SpriteComponents {
+ .spawn(Camera2dBundle::default())
+ .spawn(SpriteBundle {
material: materials.add(texture_handle.into()),
..Default::default()
})