Skip to content
This repository was archived by the owner on Oct 5, 2023. It is now read-only.

Commit fefd7ac

Browse files
Update CHANGELOG and edit README
1 parent 27a13c9 commit fefd7ac

File tree

3 files changed

+21
-11
lines changed

3 files changed

+21
-11
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
> Dates are formatted as DD.MM.YYYY
44
5+
## Version 0.3.1 (19.01.2023)
6+
7+
### Added
8+
9+
- `on_hover_system()` Access any bevy system parameters in a hover interaction
10+
- `on_click_system()` Access any bevy system parameters in a click interaction
11+
12+
513
## Version 0.3.0 (18.01.2023)
614

715
### Added

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "bevy_mod_gizmos"
33
version = "0.3.1"
44
description = "Visual gizmos to aid with development and debugging in Bevy"
55
license = "MIT OR Apache-2.0"
6-
repository = "https://github.com/LiamGallagher737/bevy_gizmos"
6+
repository = "https://github.com/LiamGallagher737/bevy_mod_gizmos"
77
readme = "README.md"
88
edition = "2021"
99
exclude = [".github/"]

README.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Visual gizmos to aid with development and debugging in [Bevy](https://bevyengine
1616

1717
# [Demo](examples/demo.rs)
1818

19-
This examples showcases all built-in gizmo types and interactions. Click on a gizmo and it will print to the console its name.
19+
This examples showcases all built-in gizmo types and interactions. Try hovering and clicking the center gizmo!
2020

2121
```
2222
cargo run --example demo
@@ -37,17 +37,17 @@ bevy_mod_gizmos = "0.3.1"
3737
```
3838

3939
Add this to any file you want to use gizmos in
40-
```rs
40+
```rust
4141
use bevy_mod_gizmos::*;
4242
```
4343

4444
Add the plugin to your app
45-
```rs
45+
```rust
4646
.add_plugin(GizmosPlugin)
4747
```
4848

4949
For interactive gizmos add the following bundle when spawning your camera
50-
```rs
50+
```rust
5151
GizmoInteractionCamera::default()
5252
```
5353

@@ -62,37 +62,39 @@ opt-level = 3
6262
# Usage
6363

6464
Draw a single gizmo
65-
```rs
65+
```rust
6666
draw_gizmo(gizmo);
6767
```
6868

6969
Draw multiple gizmos
70-
```rs
70+
```rust
7171
draw_gizmos(vec![gizmo, gizmo, gizmo]);
7272
```
7373

7474
Draw multiple gizmos and a connecting line
75-
```rs
75+
```rust
7676
draw_gizmos_with_line(vec![gizmo, gizmo, gizmo]);
7777
```
7878

7979
Draw a line
80-
```rs
80+
```rust
8181
draw_line(points, color);
8282
```
8383

8484
Draw a closed line
85-
```rs
85+
```rust
8686
draw_closed_line(points, color);
8787
```
8888

8989

9090

9191
# Interactions
9292

93-
```rs
93+
```rust
9494
Gizmo::new(translation, size, color).on_click(|| println!("Clicked!"))
9595
Gizmo::new(translation, size, color).on_hover(|| println!("Hovered!"))
96+
Gizmo::new(translation, size, color).on_click_system(|time: Res<Time>| ...)
97+
Gizmo::new(translation, size, color).on_hover_system(|query: Query<&Transform>| ...)
9698
```
9799

98100

0 commit comments

Comments
 (0)