Crates.io | bevy_ogle |
lib.rs | bevy_ogle |
version | 0.2.0 |
source | src |
created_at | 2024-07-15 10:14:57.479755 |
updated_at | 2024-07-20 02:58:27.246521 |
description | A multi-mode camera library for 2d vector games |
homepage | |
repository | https://github.com/loopystudios/bevy_ogle |
max_upload_size | |
id | 1303663 |
size | 33,092 |
[!WARNING] This is a work in progress and the README is a reflection of future work.
Quickstart to run an example:
cargo run -p demo
bevy | bevy_ogle |
---|---|
0.14 | 0.1-0.2, main |
< 0.13 | unsupported |
There are several examples for reference.
You can also run examples on web:
# Make sure the Rust toolchain supports the wasm32 target
rustup target add wasm32-unknown-unknown
cargo run_wasm -p demo
The camera currently supports 3 modes, easily switched through commands.
commands.ogle_mode(OgleMode::Frozen); // No camera system will be run. "User is in the menu"
commands.ogle_mode(OgleMode::Follow); // Camera will follow a target.
commands.ogle_mode(OgleMode::Pancam); // Camera is a debug camera controlled by the user.
Exclusively when the camera is in OgleMode::Follow
, the camera will follow a target.
There are several ways to set the target:
commands.ogle_clear_target(); // Clear the target - No following is observed.
commands.ogle_target_position(Vec2::new(0.0, 0.0)); // Camera looks at a position target.
commands.ogle_target_entity(target_entity); // Camera follows a target entity (must have a `Transform`).
All Loopy projects and development happens in the Loopy Discord. The discord is open to the public.
Contributions are welcome by pull request. The Rust code of conduct applies.
Licensed under either of
at your option
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.