2 unstable releases
0.2.0 | Jul 20, 2024 |
---|---|
0.1.0 | Jul 15, 2024 |
#1503 in Game dev
29 downloads per month
19KB
337 lines
[!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 version support
bevy | bevy_ogle |
---|---|
0.14 | 0.1-0.2, main |
< 0.13 | unsupported |
Usage
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
Camera Modes
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.
Camera Target
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`).
Community
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.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option
Contribution
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.
Dependencies
~42–79MB
~1.5M SLoC