From fd45efa583f2010fb7872a56e30efeaf4f0a7f3c Mon Sep 17 00:00:00 2001 From: databasedav <31483365+databasedav@users.noreply.github.com> Date: Sat, 19 Oct 2024 17:08:24 -0700 Subject: [PATCH] add `multicam` feature and add considerations and development sections to readme (#4) --- Cargo.toml | 2 ++ README.md | 8 ++++++-- examples/challenge07.rs | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a1ed368b..18b8868e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,6 +47,8 @@ text_input = ["ui", "bevy_cosmic_edit"] ui = ["bevy_mod_picking", "derive"] derive = ["paste"] utils = [] +# see https://github.com/Dimchikkk/bevy_cosmic_edit/blob/776605d549540d0b40edccc1eabe431f617875a0/Cargo.toml#L14 +multicam = ["bevy_cosmic_edit/multicam"] [dev-dependencies] bevy = { version = "0.14", features = ["bevy_dev_tools"] } diff --git a/README.md b/README.md index aadb43e5..edda626a 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,10 @@ in bengali, haalka means "light" (e.g. not heavy) and can also be used to mean " While haalka is primarily targeted at UI and provides high level UI abstractions as such, its [core abstraction](https://docs.rs/haalka/latest/haalka/struct.RawHaalkaEl.html) can be used to manage signals-powered reactivity for any entity, not just [bevy_ui nodes](https://github.com/bevyengine/bevy/blob/main/crates/bevy_ui/src/node_bundles.rs). -## examples +## considerations +If one is using multiple cameras in the same world, they must enable the `multicam` feature AND add the `bevy_cosmic_edit::CosmicPrimaryCamera` marker component to the primary camera. +## examples
@@ -100,12 +102,14 @@ cargo run --example challenge05 # character editor One can also run the examples with [`just`](https://github.com/casey/just) (`cargo install just`), e.g. `just example snake -r`. ## Bevy compatibility - |bevy|haalka| |-|-| |`0.14`|`0.2`| |`0.13`|`0.1`| +## development +Remember to include submodules when fetching the repo `git clone --recurse-submodules https://github.com/databasedav/haalka.git`. + ## license All code in this repository is dual-licensed under either: diff --git a/examples/challenge07.rs b/examples/challenge07.rs index 4bcac9b0..73803981 100644 --- a/examples/challenge07.rs +++ b/examples/challenge07.rs @@ -251,4 +251,5 @@ fn text(text: impl ToString) -> Text { fn camera(mut commands: Commands) { commands.spawn(Camera2dBundle::default()); + commands.spawn((Camera2dBundle::default(), bevy_cosmic_edit::CosmicPrimaryCamera)); }