Skip to content

Commit

Permalink
add multicam feature and add considerations and development section…
Browse files Browse the repository at this point in the history
…s to readme (#4)
  • Loading branch information
databasedav authored Oct 20, 2024
1 parent 9fb7cd3 commit fd45efa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<p align="center">
<img src="https://raw.githubusercontent.com/databasedav/haalka/main/docs/static/counter.gif">
</p>
Expand Down Expand Up @@ -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:

Expand Down
1 change: 1 addition & 0 deletions examples/challenge07.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

0 comments on commit fd45efa

Please sign in to comment.