From 24d32131204286408238995506b945f724008a98 Mon Sep 17 00:00:00 2001 From: 1D3D4RY <49441831+IDEDARY@users.noreply.github.com> Date: Fri, 27 Oct 2023 01:42:59 +0000 Subject: [PATCH 1/3] Bevy 0.12 Blog Post - Feature "Added HSL methods to `Color` struct" (#755) Co-authored-by: Carter Anderson --- content/news/2023-10-21-bevy-0.12/index.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/content/news/2023-10-21-bevy-0.12/index.md b/content/news/2023-10-21-bevy-0.12/index.md index 5321faf913..0f9dd2642c 100644 --- a/content/news/2023-10-21-bevy-0.12/index.md +++ b/content/news/2023-10-21-bevy-0.12/index.md @@ -19,6 +19,28 @@ Since our last release a few months ago we've added a _ton_ of new features, bug
authors: @author
+## Added HSL methods to `Color` struct + +
authors: @idedary
+ +You can now use `h()`, `s()`, `l()` together with their `set_h()`, `set_s()`, `set_l()` and `with_h()`, `with_s()`, `with_l()` variants to manipulate _Hue_, _Saturation_ and _Lightness_ values of a `Color` struct without cloning. Previously you could do that with only RGBA values. + +```rust +// Returns HSL component values +let color = Color::ORANGE; +let hue = color.h(); +// ... + +// Changes the HSL component values +let mut color = Color::PINK; +color.set_s(0.5); +// ... + +// Modifies existing colors and returns them +let color = Color::VIOLET.with_l(0.7); +// ... +``` + ## What's Next? We have plenty of work that is pretty much finished and is therefore very likely to land in **Bevy 0.13**: From dfa5479beab3b46f54ce7fe32fea052a20bc6686 Mon Sep 17 00:00:00 2001 From: Rob Parrett Date: Thu, 26 Oct 2023 18:44:57 -0700 Subject: [PATCH 2/3] 0.12: Add spatial audio API ergonomics section (#757) Co-authored-by: Carter Anderson --- content/news/2023-10-21-bevy-0.12/index.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/content/news/2023-10-21-bevy-0.12/index.md b/content/news/2023-10-21-bevy-0.12/index.md index 0f9dd2642c..020f2161d1 100644 --- a/content/news/2023-10-21-bevy-0.12/index.md +++ b/content/news/2023-10-21-bevy-0.12/index.md @@ -19,6 +19,24 @@ Since our last release a few months ago we've added a _ton_ of new features, bug
authors: @author
+## Spatial Audio API Ergonomics + +
authors: @rparrett, @hymm, @mockersf
+ +A simple "stereo" (non-HRTF) spatial audio implementation was heroically [put together](https://bevyengine.org/news/bevy-0-10/#spatial-audio) at the last minute for Bevy 0.10, but the implementation was somewhat bare-bones and not very user-friendly. Users needed to write their own systems to update audio sinks with emitter and listener positions. + +Now users can just add a `TransformBundle` to their `AudioBundle`s and Bevy will take care of the rest! + +```rust +commands.spawn(( + TransformBundle::default(), + AudioBundle { + source: asset_server.load("sounds/bonk.ogg"), + settings: PlaybackSettings::DESPAWN.with_spatial(true), + }, +)); +``` + ## Added HSL methods to `Color` struct
authors: @idedary
From ce5971b8806512ab77e8369bc0e9d09e48684575 Mon Sep 17 00:00:00 2001 From: Mike Date: Thu, 26 Oct 2023 18:47:07 -0700 Subject: [PATCH 3/3] 0.12 ignore ambiguous components and resources (#758) Co-authored-by: Rob Parrett Co-authored-by: Carter Anderson --- content/news/2023-10-21-bevy-0.12/index.md | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/content/news/2023-10-21-bevy-0.12/index.md b/content/news/2023-10-21-bevy-0.12/index.md index 020f2161d1..acb5c3fa0f 100644 --- a/content/news/2023-10-21-bevy-0.12/index.md +++ b/content/news/2023-10-21-bevy-0.12/index.md @@ -19,6 +19,38 @@ Since our last release a few months ago we've added a _ton_ of new features, bug
authors: @author
+## Ignore Ambiguous Components and Resources + +
authors: @hymm
+ +Ambiguity Reporting is an optional feature of Bevy's scheduler. When enabled it reports conflicts between systems that modify the same data, but are not ordered in relation to each other. While some reported conflicts can cause subtle bugs, many do not. Bevy has a couple existing methods and two new ones for ignoring these. + +The existing APIs: `ambiguous_with`, which ignores conflicts between specific sets, and `ambiguous_with_all`, which ignores all conflicts with the set it's applied to. In addition, there are now 2 new APIs that let you ignore conflicts on a type of data, `allow_ambiguous_component` and `allow_ambiguous_resource`. These ignore all conflicts between systems on that specific type, component or resource, in a world. + +```rust +#[derive(Resource)] +struct R; + +// These systems are ambiguous on R +fn system_1(_: ResMut) {} +fn system_2(_: Res) {} + +let mut app = App::new(); +app.configure_schedules(ScheduleBuildSettings { + ambiguity_detection: LogLevel::Error, + ..default() +}); +app.insert_resource(R); + +app.add_systems(Update, ( system_1, system_2 )); +app.allow_ambiguous_resource::(); + +// Running the app does not error. +app.update(); +``` + +Bevy is now using this to ignore conflicts between the `Assets` resources. Most of these ambiguities are modifying different assets and thus do not matter. + ## Spatial Audio API Ergonomics
authors: @rparrett, @hymm, @mockersf