diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c35fbc..7b8787c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,22 @@ # Changelog +## 0.14.0 + +This version uses Bevy's **Required Components**, +therefore many items have been changed. +Examples may help migration. + +- `Path` component renamed to `Shape`. It is now the central component of a shape entity. +- `Shape` now includes fill and stroke data. +- `Fill` and `Stroke` are no longer `Component`s. +- Deprecated `ShapeBundle` in favor of the `Shape` component. +- `prelude` no longer exports `ShapeBundle`. +- Added `ShapeBuilder`: works similarly to `GeometryBuilder` +- Removed `GeometryBuilder` and `ShapePath`. +- `PathBuilder` now allows chaining methods. + ## 0.13.0 -- Support for Bevy 0.15.0-rc.3. +- Support for Bevy 0.15.0. - `Rectangle` now supports border radii (see `rectangle.rs` example). - Removed deprecated `SpatialBundle` from `ShapeBundle`: `Transform` and `Visibility` are now added separately. diff --git a/README.md b/README.md index e496804..9c8a41e 100644 --- a/README.md +++ b/README.md @@ -44,14 +44,12 @@ fn setup_system(mut commands: Commands) { }; commands.spawn((Camera2d, Msaa::Sample4)); - commands.spawn(( - ShapeBundle { - path: GeometryBuilder::build_as(&shape), - ..default() - }, - Fill::color(DARK_CYAN), - Stroke::new(BLACK, 10.0), - )); + commands.spawn( + ShapeBuilder::with(&shape) + .fill(DARK_CYAN) + .stroke((BLACK, 10.0)) + .build(), + ); } ``` diff --git a/examples/dynamic_shape.rs b/examples/dynamic_shape.rs index a272f62..f81bd04 100644 --- a/examples/dynamic_shape.rs +++ b/examples/dynamic_shape.rs @@ -7,8 +7,7 @@ fn main() { App::new() .add_plugins((DefaultPlugins, ShapePlugin)) .add_systems(Startup, setup_system) - .add_systems(Update, change_draw_mode_system) - .add_systems(Update, change_number_of_sides) + .add_systems(Update, redraw_shape) .add_systems(Update, rotate_shape_system) .run(); } @@ -24,28 +23,22 @@ fn rotate_shape_system(mut query: Query<&mut Transform, With>, tim } } -fn change_draw_mode_system(mut query: Query<(&mut Fill, &mut Stroke)>, time: Res