Skip to content

Commit 254d9cb

Browse files
committed
docs: update for 0.1.0
1 parent 5c4f1e1 commit 254d9cb

File tree

1 file changed

+14
-24
lines changed

1 file changed

+14
-24
lines changed

README.md

+14-24
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
[![Discord](https://img.shields.io/discord/913957940560531456.svg?label=Loopy&logo=discord&logoColor=ffffff&color=ffffff&labelColor=000000)](https://discord.gg/zrjnQzdjCB)
1111
[![MIT/Apache 2.0](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)](#license)
1212
[![Following released Bevy versions](https://img.shields.io/badge/bevy%20tracking-released%20version-lightblue)](https://bevyengine.org/learn/quick-start/plugin-development/#main-branch-tracking)\
13-
[![Dependency status](https://deps.rs/repo/github/linebender/bevy_ogle/status.svg)](https://deps.rs/repo/github/linebender/bevy_ogle)
13+
[![Dependency status](https://deps.rs/repo/github/loopystudios/bevy_ogle/status.svg)](https://deps.rs/repo/github/loopystudios/bevy_ogle)
1414
[![Crates.io](https://img.shields.io/crates/v/bevy_ogle.svg)](https://crates.io/crates/bevy_ogle)
1515
[![Docs](https://img.shields.io/docsrs/bevy_ogle)](https://docs.rs/bevy_ogle)
16-
[![Build status](https://github.com/linebender/bevy_ogle/workflows/CI/badge.svg)](https://github.com/linebender/bevy_ogle/actions)
16+
[![Build status](https://github.com/loopystudios/bevy_ogle/workflows/CI/badge.svg)](https://github.com/loopystudios/bevy_ogle/actions)
1717

1818
</div>
1919

@@ -40,39 +40,29 @@ You can also run examples on web:
4040
# Make sure the Rust toolchain supports the wasm32 target
4141
rustup target add wasm32-unknown-unknown
4242

43-
cargo run_wasm --example simple
43+
cargo run_wasm -p demo
4444
```
4545

46-
### Switch focus
46+
### Camera Modes
4747

48-
You can move the camera to a focus on a specific position
48+
The camera currently supports 3 modes, easily switched through commands.
4949

5050
```rust
51-
pub fn startup(commands: Commands) {
52-
commands.ogle_at(Vec2::new(0.0, 0.0));
53-
}
51+
commands.ogle_mode(OgleMode::Frozen); // No camera system will be run. "User is in the menu"
52+
commands.ogle_mode(OgleMode::Follow); // Camera will follow a target.
53+
commands.ogle_mode(OgleMode::Pancam); // Camera is a debug camera controlled by the user.
5454
```
5555

56-
### Follow an entity
56+
### Camera Target
5757

58-
You can switch the camera focus to any entity. The entity must have a `Transform`, or nothing will occur.
58+
Exclusively when the camera is in `OgleMode::Follow`, the camera will follow a target.
5959

60-
```rust
61-
pub fn follow_player(commands: Commands, new_player: Query<Entity, Added<PlayerTag>>) {
62-
for entity in new_player.iter() {
63-
commands.ogle_follow(entity);
64-
}
65-
}
66-
```
67-
68-
### Change modes
69-
70-
You can switch camera modes easily.
60+
There are several ways to set the target:
7161

7262
```rust
73-
commands.ogle_mode(OgleMode::Follow); // Camera will follow entities
74-
commands.ogle_mode(OgleMode::Stationary); // Camera will not follow entities
75-
commands.ogle_mode(OgleMode::Pancam); // Camera is only controlled through user input
63+
commands.ogle_clear_target(); // Clear the target - No following is observed.
64+
commands.ogle_target_position(Vec2::new(0.0, 0.0)); // Camera looks at a position target.
65+
commands.ogle_target_entity(target_entity); // Camera follows a target entity (must have a `Transform`).
7666
```
7767

7868
## Community

0 commit comments

Comments
 (0)