# Objective
Remove a comment about check mark construction amongst the radio button
components that must have been copied from the checkbox widget
implementation by mistake.
It seems like the docs before this change were leftovers from the old
methods. They didn't really reflect the current state and suggested
using the deprecated methods.
# Objective
Text is wrapped to fit inside the node's content box but the node is
sized as though the text isn't wrapped.
Fixes#24664
## Solution
Subtract the total of the horizontal padding and border insets.
## Testing
Added the replication from #24664 to `testbed_ui`'s `TextWrap` scene:
```
cargo run --example testbed_ui -- textwrap
```
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/e37884d1-7ae6-4aab-b16f-c5af004f5556"
/>
---
The other examples, particularly `text_debug`, shouldn't demonstrate any
changes.
---------
Co-authored-by: Dimitrios Loukadakis <dloukadakis@users.noreply.github.com>
# Objective
- bevy_scene doesn't build in non std
```
error: used import from `std` instead of `core`
--> crates/bevy_scene/src/scene.rs:245:10
|
245 | ) -> std::prelude::v1::Result<(), ResolveSceneError> {
| ^^^ help: consider importing the item from `core`: `core`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#std_instead_of_core
= note: `-D clippy::std-instead-of-core` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::std_instead_of_core)]`
error: could not compile `bevy_scene` (lib) due to 1 previous error
```
- triggered on 0.19 CI:
https://github.com/bevyengine/bevy/actions/runs/27730550478/job/82036465625
## Solution
- don't use std `Result`
## Testing
- Built locally
# Objective
Fix PanCamera to check which that the correct mouse button is used, not
just any.
Change default pan mouse button to middle mouse button.
## Solution
Add check.
## Testing
- Did you test these changes? If so, how?
- Tested in local test environment, then like a cave man, copy & pasted
the changes into github's text editor of the fork.
---------
Co-authored-by: N/A <N/A>
This change adds a `SystemWithAccess::system` method to give back access
to the ScheduleSystem without exposing it to mutation.
# Objective
To prevent mutation, [this PR][thePR] made all fields of
`SystemWithAccess` private.
However, external crates (in my case, `bevy_mod_debugdump`) need access
to `&ScheduleSystem`, which the PR made impossible.
## Solution
Add `SystemWithAccess::system` to allow accessing the contained
`ScheduleSystem` immutably
## Testing
- Did you test these changes? If so, how?
No
- Are there any parts that need more testing?
No
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
N/A
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?'
N/A
[thePR]: https://github.com/bevyengine/bevy/pull/23443
In the atmosphere example we can change between Earth and Mars, but the
size of the sun does not change. This somewhat bothered me from an
astronomical accuarcy.
This commit introduces a new `SunDisk::MARS` constant to accurately
represent the sun’s apparent size when viewed from Mars. The
implementation updates the documentation and adds the corresponding
constant with an angular size of ~21 arcminutes (0.00615 radians).
Key modifications:
- Added `SunDisk::MARS` constant in `directional_light.rs`
- Updated documentation to reference the new Mars preset
- Modified `atmosphere` example to switch sun disk alongside atmosphere
presets
I tested this manually.
---------
Co-authored-by: Máté Homolya <mate.homolya@gmail.com>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
# Objective
- Adopts #24304
## Solution
- Upgrading caused some `large_enum_variant` warnings. I box’ed the
affected variants.
- From the original Dependabot PR:
Updates the requirements on
[variadics_please](https://github.com/bevyengine/variadics_please) to
permit the latest version.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/bevyengine/variadics_please/blob/main/RELEASES.md">variadics_please's
changelog</a>.</em></p>
<blockquote>
<h2>Version 2.0.0</h2>
<ul>
<li>Switch from <code>syn</code> to <code>unsynn</code>
<ul>
<li><a
href="https://fasterthanli.me/articles/the-virtue-of-unsynn"><code>syn</code>
is known to be a major compile time bottleneck</a>. To improve the
situation for users of <code>variadics_please</code>, we switched to
<code>unsynn</code>, which is the alternative used by <a
href="https://fasterthanli.me/articles/introducing-facet-reflection-for-rust"><code>facet</code></a>.</li>
<li>The compile time speedup depends on your local setup and the
complexity of the macro invocation,
but on one test setup, the cold compilation time went from about 2.16
seconds to 0.56 seconds.</li>
<li>The code generated by <code>variadics_please</code> should be
identical to before.
Our Error messages may look a bit different now, but they should be just
as readable.
If you encounter any weird behavior or diagnostics, let us know.</li>
</ul>
</li>
<li>Use Rust 2024, which bumps the MSRV to <code>1.85.0</code></li>
</ul>
<h2>Version 1.1</h2>
<ul>
<li>added <code>all_tuples_enumerated</code>, which provides the index
of each item in the tuple</li>
</ul>
<h2>Version 1.0.0</h2>
<ul>
<li>initial release
<ul>
<li>code was taken directly from <code>bevy_utils 0.15-rc2</code>, under
a MIT + Apache dual license</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/bevyengine/variadics_please/commits">compare
view</a></li>
</ul>
</details>
<br />
I’m assuming the changelog doesn’t look concerning
## Testing
- ci
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
# Objective
- Describe the objective or issue this PR addresses.
- Fixes#24596
## Solution
- Describe the solution used to achieve the objective above.
- Changed get_components methods that use result instead of option to
return the correct type instead of None.
- Moved safety above example for get/into_components_mut
## Testing
- Did you test these changes? If so, how? Yes, ran "cargo run -p ci --
doc" and tests came back ok
- Are there any parts that need more testing? Not that I'm aware of.
- How can other people (reviewers) test your changes? Is there anything
specific they need to know? Read the comments and check they are
correct. there shouldn't be a fn returning type result that returns None
on the fail.
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test? N/A
---
# Objective
Reuse `MeshBindGroups` heap allocations in `prepare_mesh_bind_groups`
## Solution
Reuse heap memory from previously existing `MeshBindGroups` resource.
Also the lightmaps bind groups should be keyed by metadata slab id
otherwise it should be a bug if using vertex compression + lightmap +
webgl2
## Testing
Examples still work
# Objective
When an input is in IME composition mode, `EditableText` nodes should
absorb pointer events, not propagate them.
## Solution
Set focus and disable press propagation in `on_pointer_press` for
`EditableText` before the IME and local position return gates.
Disable drag propagation in `on_pointer_drag` for `EditableText` before
the IME composition and local position return gates.
The focus change is probably unnecessary but seems more natural, and
shouldn't result in any changes to observable behaviour.
Derive `Clone` for `InfiniteGrid`so that `FromTemplate` can be
auto-derived on it, making it spawnable with BSN.
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
This adds properties to the `FeathersColorSwatch` SceneComponent to
allow specifying a percentage of the swatch to remain opaque. This is
useful for color-pickers and generally handling colors with alpha
channels.
The property value will default to 0% so no migration guide is needed.
# Objective
- Allow a single `FeathersColorSwatch` to display the selected color
with and without its alpha channel.
## Solution
- Adds `FeathersColorSwatchProps` to allow dedicating a percentage of
the swatch area to the opaque color value
## Testing
Updated the `feathers_gallery` example to display the `rgba` color
swatch with 30% dedicated to the opaque color.
---
## Showcase
<img width="1280" height="720" alt="Screenshot_2026-06-15_21-09-53"
src="https://github.com/user-attachments/assets/1b3405f5-973b-42fb-abd5-b08c39c59cb6"
/>
# Objective
Noticed that there was an implementation of StableInterpolate for
tuples, but not for any array types.
## Solution
- Added an implementation of StableInterpolate for static arrays
- Added an implementation of TryStableInterpolate for dynamic arrays
(gated on the `alloc` feature)
## Testing
- Did you test these changes? If so, how?
Created a new test module in common_traits
- Are there any parts that need more testing?
No
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
Try interpolating array types
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?
N/A
# Objective
`Vec2` has a clamp function but there are two minor annoyances when
using it with a `Rect`:
```rust
let r = computed_node.content_box();
let p = Vec2::new(x, y).clamp(r.min, r.max);
```
1. You have to bind the `Rect` value to a variable.
2. You have to manually pass the rectangle bounds in the correct order.
## Solution
Add a `clamp_point` function to `Rect`, then we have:
```rust
let p = computed_node.content_box().clamp_point(Vec2::new(x, y));
```
## Testing
Includes some trivial tests.
---------
Co-authored-by: Cookie <171882521+cookie1170@users.noreply.github.com>
# Objective
- Fixes#24605
- The issue was being caused by the `ShadowView` becoming stale as the
camera moved around the scene. I logged the `light_index` of the
PointLight and realized they were not stable, which means the depth
attachments/`ShadowView`s would also be incorrect.
## Solution
- Just recreate all necessary components if the Point or Spot light
changed. It was already being done for the `ExtractedView` and the
`frustum` (#24038). Now it includes the `ShadowView` and other minor
components that don’t necessarily need to be changed, but it makes the
code easier to understand.
- I refactored the code a bit to make it easier to maintain and
understand what’s different between the two if/else branches. The
extracted functions should be equivalent to the original logic when
creating the shadow map anew.
## Testing
- I tested the reproduction in the issue and the issue is fixed, results
in the Showcase.
---
## Showcase
<details>
<summary>Video of the fixed repro</summary>
https://github.com/user-attachments/assets/e843ace0-ea33-461d-a96b-ce09d7fc6da4
</details>
# Objective
#24206 boxes the large error in `GltfError` but it's not sufficient
after https://github.com/rust-lang/rust-clippy/issues/17070 is fixed.
## Solution
Box `AssetLoadError::RequestedHandleTypeMismatch` so that it is reduced
to 120 bytes which is below 128 bytes.
Also fix some other trivial clippy warnings.
## Testing
Use the latest nightly clippy which has
https://github.com/rust-lang/rust-clippy/issues/17070 fixed:
```
cargo +nightly clippy --workspace --all-features --all-targets -- -D warnings
```
# Objective
Reuse heap allocations in RenderContext. Address
https://github.com/bevyengine/bevy/pull/22144#discussion_r2729894429
## Solution
Replace `core::mem::take` with `drain(..)`. Change
`PendingCommandBuffers::take` to return an Iterator and use `peek()` to
check if it's empty.
## Testing
Examples still work
# Objective
- Fixes#24579.
- Earlier, when an `EditableText` widget lost focus when pressing `Tab`,
the text selection was preserved internally. This left the text
permanently in the selection styling (black). This PR ensures it reverts
to the default styling once focus is lost.
## Solution
- Added a new `on_focus_lost_collapse_selection` observer to the
`EditableTextInputPlugin`.
- When a `FocusLost` event is triggered, it queues an
`TextEdit::CollapseSelection` action on the widget as well.
## Testing
- Tested it on the example mentioned in the issue
(`multiline_text_input`).
### Before:
<img width="400" height="400" alt="image"
src="https://github.com/user-attachments/assets/f6293add-cdbb-4982-a4a4-28f014611aa1"
/>
### After:
<img width="400" height="400" alt="image"
src="https://github.com/user-attachments/assets/f00523ee-17fa-4af6-ad9b-01052e073dc9"
/>
---------
Signed-off-by: zen-zap <pandaashutosh340@gmail.com>
# Objective
`bevy_settings` currently conflates "settings" and "preferences" in a
number of places. The name of the framework itself is Bevy Settings, so
anything that drives general "settings" behaviors should use "settings"
terminology. For example, `PreferencesPlugin` should be `SettingsPlugin`
because it handles _all_ `SettingsGroup` types (regardless of their
"scope" such as "preferences.toml").
## Solution
Use "settings" instead of "preferences" in the appropriate places. I've
also removed the custom `ExitAfterSave` commands in the examples as they
are unnecessary.
This should land in 0.19 because we haven't published this API yet and
getting naming right is important.
---------
Co-authored-by: Dave Waggoner <waggoner.dave@gmail.com>
Co-authored-by: Kevin Chen <chen.kevin.f@gmail.com>
# Objective
- Fix a render validation error when `TemporalAntiAliasing` is removed
from a camera while `DepthPrepass` remains enabled.
- The background motion vectors pipeline state could remain on the
render-world view after `MotionVectorPrepass` was removed, causing the
prepass node to try to render background motion vectors without a motion
vector target.
## Solution
Add a cleanup system for background motion vector state.
## Testing
Press Space to disable TAA while keeping DepthPrepass on the camera.
Before this PR, it crash with:
```text
Render pipeline targets are incompatible with render pass
Incompatible color attachments at indices []: the RenderPass uses textures with formats [] but the RenderPipeline with 'background_motion_vectors_pipeline' label uses attachments with formats [None, Some(Rg16Float), None, None]
```
Minimal repro example:
```
use bevy::anti_alias::taa::TemporalAntiAliasing;
use bevy::core_pipeline::prepass::{DepthPrepass, MotionVectorPrepass};
use bevy::prelude::*;
use bevy::render::camera::{MipBias, TemporalJitter};
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_systems(Startup, setup)
.add_systems(Update, toggle_taa)
.run();
}
fn setup(mut commands: Commands) {
commands.spawn((
Camera3d::default(),
Msaa::Off,
DepthPrepass,
TemporalAntiAliasing::default(),
Transform::from_xyz(0.0, 0.0, 5.0).looking_at(Vec3::ZERO, Vec3::Y),
));
}
fn toggle_taa(
keys: Res<ButtonInput<KeyCode>>,
camera: Single<Entity, With<Camera3d>>,
mut commands: Commands,
) {
if keys.just_pressed(KeyCode::Space) {
commands.entity(*camera).remove::<(
TemporalAntiAliasing,
TemporalJitter,
MipBias,
MotionVectorPrepass,
)>();
}
}
Co-authored-by: Dahmen issam <issam.dahmen@fittingbox.com>
# Objective
Add a `context()` extension method to `Result<T>` and `Option<T>` like
`anyhow`
## Solution
Add a `Vec<String>` field to `InnerBevyError` to store context messages
added via `context()`
Fixes#19714.
## Testing
Added the `context` unit test to test messages produced by `context() `
and a `context_downcasting` unit test to test that downcasting still
works when using `.context`
---------
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
# Objective
Bevy remote's `BrpResponse` derives `serde::Deserialize`, but the static
lifetime prevents it from actually being so:
```
let response: BrpResponse = serde_json::from_str(&response)?;
---------------------^^^^^^^^^-
| |
| borrowed value does not live long enough
argument requires that `response` is borrowed for `'static`
```
No migration guide needed, since the interface for `BrpResponse::new`
used by downstream implementers remains unchanged.
## Solution
Remove the `jsonrpc` field by writing a custom `impl` for `Serialize` &
`Deserialize`, which is the same solution as done previously in #23175.
## Testing
This change has a very low impact. Tests pass.
## Alternatives
1. Replace jsonrpc with `String`
2. Replace jsonrpc with `Cow`
---------
Co-authored-by: Mira <specificprotagonist@posteo.org>
# Objective
- Allow BSN users to assign enum variants directly to fields when the
enum implements `Into` for the field type.
- Fixes#24582.
## Solution
- Route enum variant field values through the normal `BsnValue` token
generation path.
- Make `BsnValue::Type` emit `(...).into()` when used as a value.
- Preserve existing enum component patching behavior, where entries like
`Foo::Bar { x: 1 }` and `Foo::Qux` patch the enum component itself.
## Testing
- `cargo fmt --check -p bevy_scene -p bevy_scene_macros`
- `cargo test -p bevy_scene_macros
enum_variant_field_values_use_implicit_into`
- `cargo test -p bevy_scene enum_variant_field_values_use_implicit_into`
- `cargo test -p bevy_scene enum_patching`
## Showcase
```rust
TextFont {
font_size: TextSize::Large,
}
# Objective
The new Diagnostic Overlay has some issues:
- It uses a fullscreen Node that blocks all clicks, preventing other UI
items from being clicked by default
- It doesn't implement Default / Clone, so it isn't compatible with BSN
- The font size isn't configurable (small by default is good, but it
might be too small for some peoples' preferences)
## Solution
Fix all of those things.
This should ship in 0.19 because it is pretty broken without the click
passthrough fix. This doesn't need an RC to test because it is a new
feature, very broken without this fix, and it is disabled by default.
---------
Co-authored-by: Kevin Chen <chen.kevin.f@gmail.com>
Updates the requirements on
[sysinfo](https://github.com/GuillaumeGomez/sysinfo) to permit the
latest version.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/GuillaumeGomez/sysinfo/blob/main/CHANGELOG.md">sysinfo's
changelog</a>.</em></p>
<blockquote>
<h1>0.38.4</h1>
<ul>
<li>macOS: Unpin <code>objc2-*</code> crates version.</li>
<li>Linux: Fix computation of disk size.</li>
</ul>
<h1>0.38.3</h1>
<ul>
<li>macOS: Improve accuracy of <code>System::available_memory</code> and
<code>System::used_memory</code>.</li>
<li>Documentation: add missing unit for <code>CPU::frequency</code>
returned value.</li>
</ul>
<h1>0.38.2</h1>
<ul>
<li>Implement <code>Error</code> trait for
<code>MacAddrFromStrError</code>, <code>IpNetworkFromStrError</code> and
<code>KillError</code> types.</li>
</ul>
<h1>0.38.1</h1>
<ul>
<li>macOS: Put back support for versions below macOS 12.</li>
</ul>
<h1>0.38.0</h1>
<ul>
<li>Add NetBSD support.</li>
<li>Windows: Fix unsoundness for a function used in
<code>Motherboard</code> and <code>Product</code>.</li>
<li>Linux: Improve CPU info parsing.</li>
<li>Fix <code>serde</code> serialization of <code>MacAddr</code> and of
<code>Disk::file_system</code>.</li>
</ul>
<h1>0.37.2</h1>
<ul>
<li>Improve documentation of <code>System::refresh_cpu_all</code> and of
<code>System::refresh_cpu_specifics</code>.</li>
<li>Android: Fix <code>System::uptime</code>.</li>
<li>Linux: Correctly handled modified/removed <code>Process::exe</code>
paths.</li>
</ul>
<h1>0.37.1</h1>
<ul>
<li>Fix <code>serde</code> serialization on
<code>Process::name</code>.</li>
<li>Linux: Fix <code>get_cpu_frequency</code> on
<code>loongarch64</code>.</li>
<li>Windows: Correctly handle invalid UTF-8 string in
<code>Motherboard</code>.</li>
</ul>
<h1>0.37.0</h1>
<ul>
<li>Update minimum supported Rust version to <code>1.88</code> (for 2024
edition and <code>if let chain</code> feature).</li>
<li>Added <code>Component::id</code> API.</li>
<li>Linux: Greatly improve partial processes retrieval.</li>
<li>Linux: Simplify internal components retrieval code.</li>
</ul>
<h1>0.36.1</h1>
<ul>
<li>Linux: Improve processor CPU usage computation.</li>
</ul>
<h1>0.36.0</h1>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/GuillaumeGomez/sysinfo/compare/v0.38.4...v0.38.4">compare
view</a></li>
</ul>
</details>
<br />
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
# Objective
- Fix a regression introduced by #24571 where `KHR_materials_specular`
was added to the enabled `gltf` crate features. This was missed because
the asset i used for testing did not make the specular parsing
regression visually obvious.
- After enabling this feature, the `gltf` crate parses
`KHR_materials_specular` as a known typed extension, so it is no longer
returned by `material.extensions()`, which only exposes unknown
extension data.
## Solution
Read `KHR_materials_specular` through the typed
[`material.specular()`](https://docs.rs/gltf/latest/gltf/material/struct.Specular.html)
API exposed by the `gltf` crate.
## Testing
Reviewers can test visually by loading the Khronos
[SpecularTest](https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models/SpecularTest)
Co-authored-by: Dahmen issam <issam.dahmen@fittingbox.com>
## Objective
Fixes#24501.
Allow users to import `AssetChanged` from
`bevy_asset::asset_changed::AssetChanged`, rather than only through
`bevy_asset::prelude::AssetChanged`.
## Solution
Make the existing `asset_changed` module public without moving the
implementation around. The internal `AssetChanges` resource remains
crate-private, and the existing hidden `WorldQuery` fetch/state types
stay unchanged.
## Testing
- `git diff --check`
- `rustup run 1.95.0-aarch64-apple-darwin cargo check -p bevy_asset`
- `rustup run 1.95.0-aarch64-apple-darwin cargo test -p bevy_asset
asset_changed`
- `RUSTDOCFLAGS="-D warnings" rustup run 1.95.0-aarch64-apple-darwin
cargo doc -p bevy_asset --no-deps`
# Objective
Add a way to change the justification for the text input in the
multiline_text_input example.
## Solution
Add a pop up menu that lets you set justify.
# Objective
Part of #11590.
## Solution
Remove most of the `#[expect(unsafe_op_in_unsafe_fn)]` in bevy_ecs and
add unsafe blocks/safety comments where needed. Doesn't yet remove the
exceptions from `bevy_ecs::storage`, `bevy_ecs::query` and
`bevy_ecs::system::system_param`.
---------
Co-authored-by: Trashtalk217 <trashtalk217@gmail.com>
# Objective
Make the `multiple_text_inputs` example a bit more useful by giving each
text input a different justification, which should help with debugging
cursor behaviour.
## Solution
Add an input for each `Justify` variant along with a column on the left
labelling the justification it is using.
## Showcase
<img width="1798" height="750" alt="inputs-justified"
src="https://github.com/user-attachments/assets/324c1cd4-b6a1-4c0f-ad1a-38cd28867704"
/>
# Objective
Fixes#22865
## Solution
Add `#[allow(non_snake_case)]` to avoid validating the `field` variable
format.
## Testing
- Did you test these changes? If so, how?
- Are there any parts that need more testing?
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?
# Objective
- Fix a typo in the bindless material lookup for
`specular_transmission`.
- I noticed this while reading the transmission shader path for the
`KHR_materials_dispersion` work. Since it is unrelated to dispersion
itself, I preferred to keep it out of that PR and fix it separately
here.
## Solution
- In the bindless path, read `specular_transmission` through the
material index stored in `material_indices[slot].material`.
Co-authored-by: Dahmen issam <issam.dahmen@fittingbox.com>
# Objective
`bsn!` should support Rust's "name shorthand syntax":
```rust
let value = 10;
Foo { value }
```
## Solution
Add support, both for normal types and "props":
```rust
let value = 10;
bsn! {
Foo { value }
}
let value = 10;
bsn! {
@Foo { @value }
}
```
This also changes generated internal bsn! variables to use `__X`
formatting everywhere to avoid conflicts with user-defined variables (we
were already using this strategy in some places ... this just uses it
everywhere).
## Testing
- added a test
---------
Co-authored-by: François Mockers <mockersf@gmail.com>
Co-authored-by: urben1680 <55257931+urben1680@users.noreply.github.com>
# Objective
The `type_info` module in `bevy_reflect` is currently pretty long and
contains lots of things related to type information.
## Solution
Reorganizes `type_info` into a new `info` module containing multiple
files:
- `error.rs` - Contains type-info-related errors
- `opaque.rs` - Contains `OpaqueInfo`
- `type_info.rs` - Contains `TypeInfo`
- `typed.rs` - Contains `Typed`, `DynamicTyped`, and `MaybeTyped`
I chose to leave `Type` in a separate `ty` module because I'd like to
keep this in the same category as `TypePath` (which also remains in its
`type_path` module), where it technically is type information but very
barebones. In fact, my hope is that we can eventually separate these out
fully from `TypeInfo` as part of #24561 such that we can enable
`TypePath`/`Type` without enabling all other type information code.
Another reason for the reorganization here is I want to make some
changes to some of these traits and add new ones, and didn't want to
continue adding to the length of that file.
### Followup Work
I only moved `OpaqueInfo` because it existed in `type_info`. Just to
save on the diff, I chose not to move all other info types. We can
either do that as a followup or as part of this PR if we really want to.
## Testing
No new or changed logic, just reorganization. So no new tests.
# Objective
It should be possible to support `Option` wrapped scenes and scene lists
in Bevy. https://github.com/bevyengine/bevy/pull/24536 got us part of
the way there, but it didn't support SceneList. It also didn't add nice
support for `Option<Box<dyn SceneList>>` in cases like "scene props".
#24536 also introduces a bug, as it doesn't register the dependencies of
the wrapped scene.
## Solution
Add more thorough support for optional scenes. This is now possible:
```rust
#[derive(SceneComponent, Default, Clone)]
#[scene(FeathersButtonProps)]
pub struct FeathersButton;
pub struct FeathersButtonProps {
pub caption: Option<Box<dyn SceneList>>,
}
impl FeathersButton {
fn scene(props: FeathersButtonProps) -> impl Scene {
bsn! {
Children [
{props.caption}
]
}
}
}
// Later
bsn! {
@FeathersButton {
@caption: bsn! { Node }
}
}
```
This also fixes the bug introduced in #24536
# Objective
Fix glTF validation for assets that declare `KHR_materials_specular` in
`extensionsRequired`.
While testing assets using `KHR_materials_specular` as a required
extension, I hit this error:
```text
Failed to load asset '...\xxx.glb' with asset loader 'bevy_gltf::loader::GltfLoader': invalid glTF file: invalid glTF: extensionsRequired[0] = "KHR_materials_specular": Unsupported extension
```
`KHR_materials_specular` is already supported by Bevy, and assets that
only list it in `extensionsUsed` load correctly. The failure only
happened when the extension was declared as required, because the
upstream `gltf` crate feature was not enabled for validation.
I also checked other Bevy-supported material extensions, including
`KHR_materials_clearcoat`, `KHR_materials_dispersion` (Soon #24569), and
`KHR_materials_anisotropy`. Unlike `KHR_materials_specular`, these
extensions do not currently have matching feature flags exposed by the
upstream `gltf` crate, so there is no equivalent dependency feature to
enable for them in this PR. Bevy handles those extensions through raw
extension data parsing.
## Solution
- Enable the `KHR_materials_specular` feature on the `gltf` dependency
in `bevy_gltf`.
## Testing
- Reviewers can test by loading a `.gltf` or `.glb` that declares
`KHR_materials_specular` in `extensionsRequired`.
Co-authored-by: Dahmen issam <issam.dahmen@fittingbox.com>
# Objective
Fixes#24508
## Solution
Replace `MouseScrollUnit` with a Resource of the same name and remove it
from the structs and events related to scrolling. More work still needs
to be done to make sure that the value in `MouseScrollUnit` is actually
respected
## Testing
- Running standard test suite/ci as well as related examples to make
sure that they haven't broken
Updates the requirements on
[guillotiere](https://github.com/nical/guillotiere) to permit the latest
version.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/nical/guillotiere/commits">compare
view</a></li>
</ul>
</details>
<br />
You can trigger a rebase of this PR by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
> **Note**
> Automatic rebases have been disabled on this pull request as it has
been open for over 30 days.
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>