diff --git a/CHANGELOG.md b/CHANGELOG.md index ff124d9..c035c8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.5.0] - 2024-12-04 + +### Added + +- Added required component support for `PointLight2d` (#39). +- Added required component support for `LightOccluder2d` (#39). + +### Changed + +- Updated Bevy version from `0.14` to `0.15` (#39). +- Deprecated `PointLight2dBundle` in favour of `PointLight2d` (#39). +- Deprecated `LightOccluder2dBundle` in favour of `LightOccluder2d` (#39). + +### Migration guide + +- Replace all uses of `PointLight2dBundle` with `PointLight2d`. +- Replace all uses of `LightOccluder2dBundle` with `LightOccluder2d`. + ## [0.4.2] - 2024-10-25 ### Fixed diff --git a/Cargo.toml b/Cargo.toml index 80e236a..cff38b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_light_2d" -version = "0.4.2" +version = "0.5.0" edition = "2021" categories = ["game-engines", "graphics", "rendering"] description = "General purpose 2d lighting for the Bevy game engine." @@ -11,22 +11,28 @@ readme = "README.md" exclude = ["assets/*", "static/*"] [dependencies] -bevy = { version = "0.14", default-features = false, features = [ +bevy = { version = "0.15", default-features = false, features = [ "bevy_render", "bevy_core_pipeline", "bevy_winit", "x11", + # TODO: Remove when https://github.com/bevyengine/bevy/issues/16568 is resolved. + "bevy_window", + # TODO: Remove when https://github.com/bevyengine/bevy/issues/16563 is resolved. + "png" ] } smallvec = "1.13" [dev-dependencies] -bevy = { version = "0.14", default-features = false, features = [ +bevy = { version = "0.15", default-features = false, features = [ "bevy_render", "bevy_core_pipeline", "bevy_winit", "bevy_sprite", "png", - "x11" + "x11", + # TODO: Remove when https://github.com/bevyengine/bevy/issues/16568 is resolved. + "bevy_window" ] } [lints.clippy] diff --git a/README.md b/README.md index e885706..56a6c47 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,8 @@ In the [`basic`](https://github.com/jgayfer/bevy_light_2d/blob/main/examples/bas ```toml # Cargo.toml [dependencies] -bevy = "0.14" -bevy_light_2d = "0.4" +bevy = "0.15" +bevy_light_2d = "0.5" ``` ```rust @@ -41,18 +41,15 @@ fn main() { App::new() .add_plugins((DefaultPlugins, Light2dPlugin)) .add_systems(Startup, setup) - .run() + .run(); } fn setup(mut commands: Commands) { - commands.spawn(Camera2dBundle::default()); - - commands.spawn(PointLight2dBundle { - point_light: PointLight2d { - radius: 100.0, - intensity: 3.0, - ..default() - }, + commands.spawn(Camera2d); + + commands.spawn(PointLight2d { + intensity: 3.0, + radius: 100.0, ..default() }); } @@ -74,6 +71,7 @@ general application over depth of features. | bevy | bevy_light_2d | |------|---------------| +| 0.15 | 0.5 | | 0.14 | 0.2..0.4 | | 0.13 | 0.1 | diff --git a/examples/basic.rs b/examples/basic.rs index 1829db6..2779883 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -9,14 +9,11 @@ fn main() { } fn setup(mut commands: Commands) { - commands.spawn(Camera2dBundle::default()); + commands.spawn(Camera2d); - commands.spawn(PointLight2dBundle { - point_light: PointLight2d { - intensity: 3.0, - radius: 100.0, - ..default() - }, + commands.spawn(PointLight2d { + intensity: 3.0, + radius: 100.0, ..default() }); } diff --git a/examples/dungeon.rs b/examples/dungeon.rs index 48166da..e03b5f9 100644 --- a/examples/dungeon.rs +++ b/examples/dungeon.rs @@ -38,10 +38,11 @@ struct Candle; struct AnimationTimer(Timer); fn setup_camera(mut commands: Commands) { - let mut camera = Camera2dBundle::default(); - camera.projection.scale = 0.25; + let mut projection = OrthographicProjection::default_2d(); + projection.scale = 0.25; commands.spawn(( - camera, + Camera2d, + projection, AmbientLight2d { brightness: 0.1, ..default() @@ -55,44 +56,44 @@ fn set_clear_color(mut clear_color: ResMut) { fn animate_candles( time: Res