Commit Graph

9151 Commits

Author SHA1 Message Date
IceSentry
f98727c1b1
Use RenderStartup in MaterialPlugin (#19885)
# Objective

- The MaterialPlugin has some ugly code to initialize some data in the
render world
- #19887

## Solution

- Use the new RenderStartup schedule to use a system instead of using
the plugin `finish()`

## Testing

- Tested that the 3d_scene and shader_material example still work as
expected
2025-06-30 23:54:13 +00:00
IceSentry
735eb88db9
Use RenderStartup in custom_post_processing example (#19886)
# Objective

- This example uses a FromWorld impl to initialize a resource on startup
- #19887

## Solution

- Use RenderStartup instead

## Testing

- The example still works as expected
2025-06-30 23:54:05 +00:00
dependabot[bot]
83cd46a4dd
Update criterion requirement from 0.5.1 to 0.6.0 (#19879)
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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2025-06-30 23:41:47 +00:00
dependabot[bot]
265fefb865
Bump cargo-bins/cargo-binstall from 1.12.5 to 1.14.1 (#19877)
Bumps
[cargo-bins/cargo-binstall](https://github.com/cargo-bins/cargo-binstall)
from 1.12.5 to 1.14.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cargo-bins/cargo-binstall/releases">cargo-bins/cargo-binstall's
releases</a>.</em></p>
<blockquote>
<h2>v1.14.1</h2>
<p><em>Binstall is a tool to fetch and install Rust-based executables as
binaries. It aims to be a drop-in replacement for <code>cargo
install</code> in most cases. Install it today with <code>cargo install
cargo-binstall</code>, from the binaries below, or if you already have
it, upgrade with <code>cargo binstall cargo-binstall</code>.</em></p>
<h4>In this release:</h4>
<ul>
<li>Upgrade dependencies</li>
</ul>
<h2>v1.14.0</h2>
<p><em>Binstall is a tool to fetch and install Rust-based executables as
binaries. It aims to be a drop-in replacement for <code>cargo
install</code> in most cases. Install it today with <code>cargo install
cargo-binstall</code>, from the binaries below, or if you already have
it, upgrade with <code>cargo binstall cargo-binstall</code>.</em></p>
<h4>In this release:</h4>
<ul>
<li>Fix glibc detection on arm Fedora (<a
href="https://redirect.github.com/cargo-bins/cargo-binstall/issues/2205">#2205</a>)</li>
<li>Add support for repository host Codeberg (<a
href="https://redirect.github.com/cargo-bins/cargo-binstall/issues/2202">#2202</a>)</li>
<li>Fix error for missing binaries when <code>--bin</code> does not
include any of these missing bins (<a
href="https://redirect.github.com/cargo-bins/cargo-binstall/issues/1888">#1888</a>
<a
href="https://redirect.github.com/cargo-bins/cargo-binstall/issues/2199">#2199</a>)</li>
</ul>
<h4>Other changes:</h4>
<ul>
<li>Rm uninstalled crates from
<code>$CARGO_HOME/binstall/crates-v1.json</code> (<a
href="https://redirect.github.com/cargo-bins/cargo-binstall/issues/2197">#2197</a>)</li>
<li>Upgrade dependencies</li>
</ul>
<h2>v1.13.0</h2>
<p><em>Binstall is a tool to fetch and install Rust-based executables as
binaries. It aims to be a drop-in replacement for <code>cargo
install</code> in most cases. Install it today with <code>cargo install
cargo-binstall</code>, from the binaries below, or if you already have
it, upgrade with <code>cargo binstall cargo-binstall</code>.</em></p>
<h4>In this release:</h4>
<ul>
<li>Add a <code>--bin</code> argument to mirror cargo install
<code>--bin</code> (<a
href="https://redirect.github.com/cargo-bins/cargo-binstall/issues/1961">#1961</a>
<a
href="https://redirect.github.com/cargo-bins/cargo-binstall/issues/2189">#2189</a>)</li>
</ul>
<h4>Other changes:</h4>
<ul>
<li>Upgrade dependencies</li>
</ul>
<h2>v1.12.7</h2>
<p><em>Binstall is a tool to fetch and install Rust-based executables as
binaries. It aims to be a drop-in replacement for <code>cargo
install</code> in most cases. Install it today with <code>cargo install
cargo-binstall</code>, from the binaries below, or if you already have
it, upgrade with <code>cargo binstall cargo-binstall</code>.</em></p>
<h4>In this release:</h4>
<ul>
<li>Fix updating installed crates manifest for custom registry (<a
href="https://redirect.github.com/cargo-bins/cargo-binstall/issues/2175">#2175</a>
<a
href="https://redirect.github.com/cargo-bins/cargo-binstall/issues/2178">#2178</a>)</li>
</ul>
<h4>Other changes:</h4>
<ul>
<li>Upgrade transitive dependencies</li>
<li>Ensure build script always waits for threads created (<a
href="https://redirect.github.com/cargo-bins/cargo-binstall/issues/2185">#2185</a>)</li>
<li>optimization</li>
</ul>
<h2>v1.12.6</h2>
<p><em>Binstall is a tool to fetch and install Rust-based executables as
binaries. It aims to be a drop-in replacement for <code>cargo
install</code> in most cases. Install it today with <code>cargo install
cargo-binstall</code>, from the binaries below, or if you already have
it, upgrade with <code>cargo binstall cargo-binstall</code>.</em></p>
<h4>In this release:</h4>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8aac5aa2bf"><code>8aac5aa</code></a>
release: cargo-binstall v1.14.1 (<a
href="https://redirect.github.com/cargo-bins/cargo-binstall/issues/2211">#2211</a>)</li>
<li><a
href="e5b77406bb"><code>e5b7740</code></a>
chore: release (<a
href="https://redirect.github.com/cargo-bins/cargo-binstall/issues/2210">#2210</a>)</li>
<li><a
href="fe1c5ab94f"><code>fe1c5ab</code></a>
dep: Upgrade transitive dependencies (<a
href="https://redirect.github.com/cargo-bins/cargo-binstall/issues/2209">#2209</a>)</li>
<li><a
href="151e1ec8c4"><code>151e1ec</code></a>
ci: enable cache-workspace-crates (<a
href="https://redirect.github.com/cargo-bins/cargo-binstall/issues/2208">#2208</a>)</li>
<li><a
href="abb695a276"><code>abb695a</code></a>
build(deps): bump tj-actions/changed-files from
4140eb99d2cced9bfd78375c20883...</li>
<li><a
href="a1ca1a46ab"><code>a1ca1a4</code></a>
dep: Replace vergen with vergen-gitcl (<a
href="https://redirect.github.com/cargo-bins/cargo-binstall/issues/2207">#2207</a>)</li>
<li><a
href="f317ddf23a"><code>f317ddf</code></a>
release: cargo-binstall v1.14.0 (<a
href="https://redirect.github.com/cargo-bins/cargo-binstall/issues/2206">#2206</a>)</li>
<li><a
href="d47e67b010"><code>d47e67b</code></a>
chore: release (<a
href="https://redirect.github.com/cargo-bins/cargo-binstall/issues/2195">#2195</a>)</li>
<li><a
href="bb9211b72c"><code>bb9211b</code></a>
Fix glibc detection on Fedora (<a
href="https://redirect.github.com/cargo-bins/cargo-binstall/issues/2205">#2205</a>)</li>
<li><a
href="a90dd4569f"><code>a90dd45</code></a>
feat: Add repository host Codeberg (<a
href="https://redirect.github.com/cargo-bins/cargo-binstall/issues/2202">#2202</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/cargo-bins/cargo-binstall/compare/v1.12.5...v1.14.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cargo-bins/cargo-binstall&package-manager=github_actions&previous-version=1.12.5&new-version=1.14.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
Co-authored-by: François Mockers <francois.mockers@vleue.com>
2025-06-30 23:37:59 +00:00
Nicholas Nethercote
c7e28852cb
bevy_reflect: avoid duplicate type bounds in derived methods (#19876)
# Objective

Most of the impls derived for `#[derive(Reflect)]` have one set of type
bounds per field, like so:
```
        f32: ::bevy::reflect::FromReflect
            + ::bevy::reflect::TypePath
            + ::bevy::reflect::MaybeTyped
            + ::bevy::reflect::__macro_exports::RegisterForReflection,
```
If multiple fields have the same type, the bounds are repeated
uselessly. This can only hurt compile time and clogs up the `cargo
expand` output.

Avoiding this will help with
https://github.com/bevyengine/bevy/issues/19873.

## Solution

Use a hashset when collecting the bounds to eliminate duplicates.

## Testing

I used cargo expand to confirm the duplicate bounds are no longer
produced.

`-Zmacro-stats` outputs tells me this reduces the size of the `Reflect`
code produced for `bevy_ui` from 1_544_696 bytes to 1_467_967 bytes, a
5% drop.
2025-06-30 23:29:26 +00:00
Nicholas Nethercote
5aa520eac0
bevy_reflect: avoid useless with_{custom_attributes,docs} calls (#19875)
# Objective

`#[derive(Reflect)]` derives `Typed` impls whose `type_info` methods
contain useless calls to `with_custom_attributes` and `with_docs`, e.g.:
```
::bevy::reflect::NamedField:🆕:<f32>("x")
    .with_custom_attributes(
        ::bevy::reflect::attributes::CustomAttributes::default()
    )
    .with_docs(::core::option::Option::None),
```
This hurts compile times and makes the `cargo expand` output harder to
read. It might also hurt runtime speed, depending on whether the
compiler can optimize away the no-op methods.

Avoiding this will help with #19873.

## Solution

Check if the attributes/docs are empty before appending the method
calls.

## Testing

I used `cargo expand` to confirm the useless calls are no longer
produced.

`-Zmacro-stats` outputs tells me this reduces the size of the `Reflect`
impls produced for `bevy_ui` from 1_544_696 bytes to 1_511_214 bytes, a
2.2% drop. Only a small improvement, but it's a start.
2025-06-30 23:29:24 +00:00
Maxime Mulder
55c7766716
Update bevy website link in newer code (#19874)
# Objective

I was lurking and noticed that some links to the Bevy website were not
updated in newer code (`bevyengine.org` -> `bevy.org`).

## Solution

- Look for `bevyengine.org` occurrences in the current code, replace
them with `bevy.org`.

## Testing

- Did you test these changes? If so, how? I visited the Bevy website!
- 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?

## Longer term

- Maybe add a lint to flag references to the old website but I don't
know how to do that. But not sure it's needed as the more time will pass
the less it will be relevant.
2025-06-30 23:24:36 +00:00
IceSentry
88c280b9d2
Split LatePrepassNode query in a few groups (#19840)
# Objective

- That node has a bunch of query items that are mostly ignored in a few
places
- Previously this lead to having a long chain of ignored params that was
replaced with `..,`. This works, but this seems a bit more likely to
break in a subtle way if new parameters are added

## Solution

- Split the query in a few groups based on how it was already structured
(Mandatory, Optional, Has<T>)

## Testing

- None, it's just code style changes
2025-06-30 23:08:27 +00:00
Talin
9be1c36391
CoreScrollbar widget. (#19803)
# Objective

Part of #19236 


## Demo


![image](https://github.com/user-attachments/assets/8607f672-de8f-4339-bdfc-817b39f32e3e)


https://discord.com/channels/691052431525675048/743663673393938453/1387110701386039317

---------

Co-authored-by: ickshonpe <david.curthoys@googlemail.com>
2025-06-30 23:02:03 +00:00
krunchington
70902413b2
Update log_layers_ecs example for children macro (#18293)
# Objective

Contributes to #18238 
Updates the `log_layers_ecs`, example to use the `children!` macro.

Note that I did not use a macro, nor `Children::spawn` for the outer
layer. Since the `EventReader` is borrowed mutably, any `.map` I did on
`events.read()` was going to have the reference outlive the function
body. I believe this scope of change is correct for the PR.

## Solution

Updates examples to use the Improved Spawning API merged in
https://github.com/bevyengine/bevy/pull/17521

## Testing

- Did you test these changes? If so, how?
- Opened the examples before and after and verified the same behavior
was observed. I did this on Ubuntu 24.04.2 LTS using `--features
wayland`.
- Are there any parts that need more testing?
- Other OS's and features can't hurt, but this is such a small change it
shouldn't be a problem.
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
  - Run the examples yourself with and without these changes.
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?
  - see above

---

## Showcase

n/a

## Migration Guide

n/a

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2025-06-30 23:01:44 +00:00
Giacomo Stevanato
6367ad4c95
Add benchmarks for spawning and inserting bundles (#19762)
# Objective

- Splitted off from https://github.com/bevyengine/bevy/pull/19491
- Add some benchmarks for spawning and inserting components. Right now
these are pretty short, but it's expected that they will be extended
when different kinds of dynamic bundles will be implemented.
2025-06-30 22:50:39 +00:00
Jannik Obermann
83afcb5a2b
Fix ui picking outside the viewport (#19744)
# Objective

Fixes #19692 

## Solution

- Skip pointers outside the viewport.

## Testing

Tested with the following example:

<details>
<summary>Click to expand code</summary>

```rust
use bevy::{
    prelude::*, render:📷:Viewport, window::SystemCursorIcon, winit::cursor::CursorIcon,
};

fn main() -> AppExit {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_systems(Startup, setup)
        .insert_resource(ClearColor(Color::BLACK))
        .run()
}

fn setup(mut commands: Commands, window: Single<&Window>) {
    //
    commands.spawn((
        Camera2d,
        Camera {
            clear_color: ClearColorConfig::Custom(Color::WHITE),
            viewport: Some(Viewport {
                physical_position: UVec2::new(
                    window.physical_width() / 4,
                    window.physical_height() / 4,
                ),
                physical_size: UVec2::new(
                    window.physical_width() / 2,
                    window.physical_height() / 2,
                ),
                ..default()
            }),
            ..default()
        },
    ));

    commands
        .spawn((
            Node {
                top: Val::Px(100.0),
                left: Val::Px(100.0),
                width: Val::Px(200.0),
                height: Val::Px(200.0),
                ..default()
            },
            BackgroundColor(Color::srgb(1.0, 0.0, 0.0)),
        ))
        .observe(|trigger: On<Pointer<Drag>>, mut node: Query<&mut Node>| {
            let mut node = node.get_mut(trigger.target()).unwrap();
            node.left = Val::Px(px(node.left) + trigger.delta.x);
            node.top = Val::Px(px(node.top) + trigger.delta.y);
        })
        .observe(
            |_: On<Pointer<DragStart>>,
             window: Single<Entity, With<Window>>,
             mut commands: Commands| {
                commands
                    .entity(*window)
                    .insert(CursorIcon::from(SystemCursorIcon::Grabbing));
            },
        )
        .observe(
            |_: On<Pointer<DragEnd>>,
             window: Single<Entity, With<Window>>,
             mut commands: Commands| {
                commands.entity(*window).remove::<CursorIcon>();
            },
        );
}

fn px(val: Val) -> f32 {
    match val {
        Val::Px(px) => px,
        _ => 0.0,
    }
}
```
</details>

## Additional information

This is at least also broken on the sprite picking backend. I guess the
fix for other backends are also trivial if this is correct.
(Sprite picking: #19747)
2025-06-30 22:46:56 +00:00
Jannik Obermann
169254b938
Fix sprite picking viewport (#19747)
# Objective

Fixes sprite picking when using a viewport. Related to #19744.

## Solution

- Do not substract `viewport.min` as `Camera::viewport_to_world` already
does that.
- Skip pointers outside the viewport.

## Testing

Tested with the following example:

<details>
<summary>Click to expand code</summary>

```rust
use bevy::{
    prelude::*, render:📷:Viewport, window::SystemCursorIcon, winit::cursor::CursorIcon,
};

fn main() -> AppExit {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_systems(Startup, setup)
        .insert_resource(ClearColor(Color::BLACK))
        .run()
}

fn setup(mut commands: Commands, window: Single<&Window>) {
    commands.spawn((
        Camera2d,
        Camera {
            clear_color: ClearColorConfig::Custom(Color::WHITE),
            viewport: Some(Viewport {
                physical_position: UVec2::new(
                    window.physical_width() / 4,
                    window.physical_height() / 4,
                ),
                physical_size: UVec2::new(
                    window.physical_width() / 2,
                    window.physical_height() / 2,
                ),
                ..default()
            }),
            ..default()
        },
    ));

    commands
        .spawn((
            Transform::from_xyz(100.0, 100.0, 0.0),
            Sprite::from_color(Color::srgb(0.0, 1.0, 0.0), Vec2::new(200.0, 200.0)),
            Pickable::default(),
        ))
        .observe(
            |trigger: On<Pointer<Drag>>, mut transform: Query<&mut Transform>| {
                let mut transform = transform.get_mut(trigger.target()).unwrap();
                transform.translation.x += trigger.delta.x;
                transform.translation.y -= trigger.delta.y;
            },
        )
        .observe(
            |_: On<Pointer<DragStart>>,
             window: Single<Entity, With<Window>>,
             mut commands: Commands| {
                commands
                    .entity(*window)
                    .insert(CursorIcon::from(SystemCursorIcon::Grabbing));
            },
        )
        .observe(
            |_: On<Pointer<DragEnd>>,
             window: Single<Entity, With<Window>>,
             mut commands: Commands| {
                commands.entity(*window).remove::<CursorIcon>();
            },
        );
}
```
</details>
2025-06-30 22:46:44 +00:00
andriyDev
38058965ef
Restructure the logic in AssetServer::load_internal to avoid using weak handles. (#19634)
# Objective

- A step towards #19024.
- The logic here was kinda complex before.

## Solution

- I've restructured the logic here while preserving the behavior (as far
as I can tell).
- We no longer return the handle if it was passed in. The caller should
already have access to it, and the returned handle will be a weak
handle, not a strong handle (which can cause issues). This prevents us
from needing weak handles at all here.
- I verified the callers do not need the return value. The only callsite
that needs the returned handle does not pass in the input_handle
argument.

## Testing

- CI
2025-06-30 22:39:59 +00:00
andriyDev
2ea8f779c3
Prevent AnimationGraph from serializing AssetIds. (#19615)
# Objective

- A step towards #19024.
- `AnimationGraph` can serialize raw `AssetId`s. However for normal
handles, this is a runtime ID. This means it is unlikely that the
`AssetId` will correspond to the same asset after deserializing -
effectively breaking the graph.

## Solution

- Stop allowing `AssetId` to be serialized by `AnimationGraph`.
Serializing a handle with no path is now an error.
- Add `MigrationSerializedAnimationClip`. This is an untagged enum for
serde, meaning that it will take the first variant that deserializes. So
it will first try the "modern" version, then it will fallback to the
legacy version.
- Add some logging/error messages to explain what users should do.

Note: one limitation here is that this removes the ability to serialize
and deserialize UUIDs. In theory, someone could be using this to have a
"default" animation. If someone inserts an empty `AnimationClip` into
the `Handle::default()`, this **might** produce a T-pose. It might also
do nothing though. Unclear! I think this is worth the risk for
simplicity as it seems unlikely that people are sticking UUIDs in here
(or that you want a default animation in **any** AnimationGraph).

## Testing

- Ran `cargo r --example animation_graph -- --save` on main, then ran
`cargo r --example animation_graph` on this PR. The PR was able to load
the old data (after #19631).
2025-06-30 22:26:05 +00:00
Guillaume Wafo-Tapa
6eb6afeb2d
Spawn batch with relationship (#19519)
# Objective

Fixes #19356
Issue: Spawning a batch of entities in relationship with the same target
adds the relationship between the target and only the last entity of the
batch. `spawn_batch` flushes only after having spawned all entities.
This means each spawned entity will have run the `on_insert` hook of its
`Relationship` component. Here is the relevant part of that hook:
```Rust
            if let Some(mut relationship_target) =
                target_entity_mut.get_mut::<Self::RelationshipTarget>()
            {
                relationship_target.collection_mut_risky().add(entity);
            } else {
                let mut target = <Self::RelationshipTarget as RelationshipTarget>::with_capacity(1);
                target.collection_mut_risky().add(entity);
                world.commands().entity(target_entity).insert(target);
            }
```
Given the above snippet and since there's no flush between spawns, each
entity finds the target without a `RelationshipTarget` component and
defers the insertion of that component with the entity's id as the sole
member of its collection. When the commands are finally flushed, each
insertion after the first replaces the one before and in the process
triggers the `on_replace` hook of `RelationshipTarget` which removes the
`Relationship` component from the corresponding entity. That's how we
end up in the invalid state.

## Solution

I see two possible solutions
1. Flush after every spawn
2. Defer the whole code snippet above

I don't know enough about bevy as a whole but 2. seems much more
efficient to me. This is what I'm proposing here. I have a doubt though
because I've started to look at #19348 that 1. would fix as well.

## Testing

I added a test for the issue. I've put it in `relationship/mod.rs` but I
could see it in `world/spawn_batch.rs` or `lib.rs` because the test is
as much about `spawn_batch` as it is about relationships.
2025-06-30 22:13:38 +00:00
dependabot[bot]
5d736a525c
Bump super-linter/super-linter from 7.3.0 to 7.4.0 (#19288)
Bumps
[super-linter/super-linter](https://github.com/super-linter/super-linter)
from 7.3.0 to 7.4.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/super-linter/super-linter/releases">super-linter/super-linter's
releases</a>.</em></p>
<blockquote>
<h2>v7.4.0</h2>
<h2><a
href="https://github.com/super-linter/super-linter/compare/v7.3.0...v7.4.0">7.4.0</a>
(2025-05-13)</h2>
<h3>🚀 Features</h3>
<ul>
<li>add env var for npm-groovy-lint failon level (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6530">#6530</a>)
(<a
href="418c922120">418c922</a>)</li>
<li>check in-progress commit msg with commitlint (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6757">#6757</a>)
(<a
href="57345c5c79">57345c5</a>),
closes <a
href="https://redirect.github.com/super-linter/super-linter/issues/6411">#6411</a></li>
<li>disable xmllint verbose output if debuging (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6747">#6747</a>)
(<a
href="e6c42ca463">e6c42ca</a>),
closes <a
href="https://redirect.github.com/super-linter/super-linter/issues/6653">#6653</a></li>
<li>do not hide php composer output (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6637">#6637</a>)
(<a
href="1c62141194">1c62141</a>)</li>
<li>pass optional arguments to gitleaks (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6756">#6756</a>)
(<a
href="109384b3f0">109384b</a>),
closes <a
href="https://redirect.github.com/super-linter/super-linter/issues/6601">#6601</a></li>
<li>set github_before_sha on pull requests (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6687">#6687</a>)
(<a
href="d7f522206a">d7f5222</a>)</li>
<li>support eslint flat config files (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6619">#6619</a>)
(<a
href="d349d57576">d349d57</a>)</li>
<li>support ktlint format fix (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6748">#6748</a>)
(<a
href="5cb5915c0d">5cb5915</a>),
closes <a
href="https://redirect.github.com/super-linter/super-linter/issues/6618">#6618</a></li>
<li>warn the user on conflicting tools (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6759">#6759</a>)
(<a
href="b4aaae9add">b4aaae9</a>)</li>
</ul>
<h3>🐛 Bugfixes</h3>
<ul>
<li>check if commit count is defined before using (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6733">#6733</a>)
(<a
href="d007229c20">d007229</a>)</li>
<li>check return code and misc test improvements (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6697">#6697</a>)
(<a
href="7f46ec3f95">7f46ec3</a>)</li>
<li>configure nbqa tools (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6761">#6761</a>)
(<a
href="e31adf99f9">e31adf9</a>),
closes <a
href="https://redirect.github.com/super-linter/super-linter/issues/6736">#6736</a></li>
<li>consider git dirs safe (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6675">#6675</a>)
(<a
href="101d5a6e79">101d5a6</a>)</li>
<li>do not use a pager on git log (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6765">#6765</a>)
(<a
href="f5bae0c893">f5bae0c</a>)</li>
<li>emit prettier verbose output when debugging (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6636">#6636</a>)
(<a
href="4e1eb5f5e0">4e1eb5f</a>)</li>
<li>export github_before_sha (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6714">#6714</a>)
(<a
href="6401906d78">6401906</a>)</li>
<li>fix default values for prettier fix vars (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6769">#6769</a>)
(<a
href="4230ecc9a8">4230ecc</a>),
closes <a
href="https://redirect.github.com/super-linter/super-linter/issues/6768">#6768</a></li>
<li>more robust error checking and test fixes (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6693">#6693</a>)
(<a
href="1c70566ff2">1c70566</a>)</li>
<li>skip symbolic links when passing files to prettier (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6620">#6620</a>)
(<a
href="417a58a62d">417a58a</a>)</li>
<li>update editorconfig-checker config file name (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6730">#6730</a>)
(<a
href="72f02f08d9">72f02f0</a>)</li>
</ul>
<h3>⬆️ Dependency updates</h3>
<ul>
<li><strong>bundler:</strong> bump the rubocop group in /dependencies
with 10 updates (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6661">#6661</a>)
(<a
href="2757a99ca5">2757a99</a>)</li>
<li><strong>bundler:</strong> bump the rubocop group in /dependencies
with 4 updates (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6782">#6782</a>)
(<a
href="17cf93575b">17cf935</a>)</li>
<li><strong>docker:</strong> bump python in the docker-base-images group
(<a
href="https://redirect.github.com/super-linter/super-linter/issues/6723">#6723</a>)
(<a
href="960298bbeb">960298b</a>)</li>
<li><strong>docker:</strong> bump the docker group across 1 directory
with 17 updates (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6776">#6776</a>)
(<a
href="8b602a4d8b">8b602a4</a>)</li>
<li><strong>java:</strong> bump
com.google.googlejavaformat:google-java-format (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6780">#6780</a>)
(<a
href="aa3f3f8779">aa3f3f8</a>)</li>
<li><strong>java:</strong> bump com.puppycrawl.tools:checkstyle (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6639">#6639</a>)
(<a
href="59f2b6bebb">59f2b6b</a>)</li>
<li><strong>npm:</strong> bump <code>@​babel/eslint-parser</code> in
/dependencies (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6762">#6762</a>)
(<a
href="fd53895808">fd53895</a>)</li>
<li><strong>npm:</strong> bump <code>@​babel/runtime-corejs3</code> (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6651">#6651</a>)
(<a
href="8fbf79e7cd">8fbf79e</a>)</li>
<li><strong>npm:</strong> bump <code>@​stoplight/spectral-cli</code> in
/dependencies (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6742">#6742</a>)
(<a
href="56355b5d6e">56355b5</a>)</li>
<li><strong>npm:</strong> bump asl-validator from 3.13.0 to 3.14.0 in
/dependencies (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6631">#6631</a>)
(<a
href="30aa4b3218">30aa4b3</a>)</li>
<li><strong>npm:</strong> bump asl-validator from 3.14.0 to 3.15.0 in
/dependencies (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6777">#6777</a>)
(<a
href="660f7dcb41">660f7dc</a>)</li>
<li><strong>npm:</strong> bump next (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6676">#6676</a>)
(<a
href="f171ee5245">f171ee5</a>)</li>
<li><strong>npm:</strong> bump next (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6708">#6708</a>)
(<a
href="43faf9530c">43faf95</a>)</li>
<li><strong>npm:</strong> bump next (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6729">#6729</a>)
(<a
href="536538ab2d">536538a</a>)</li>
<li><strong>npm:</strong> bump npm-groovy-lint from 15.1.0 to 15.2.0 in
/dependencies (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6779">#6779</a>)
(<a
href="c19a3da4cf">c19a3da</a>)</li>
<li><strong>npm:</strong> bump prettier from 3.5.2 to 3.5.3 in
/dependencies (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6629">#6629</a>)
(<a
href="6864c8c0d5">6864c8c</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md">super-linter/super-linter's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/super-linter/super-linter/compare/v7.3.0...v7.4.0">7.4.0</a>
(2025-05-13)</h2>
<h3>🚀 Features</h3>
<ul>
<li>add env var for npm-groovy-lint failon level (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6530">#6530</a>)
(<a
href="418c922120">418c922</a>)</li>
<li>check in-progress commit msg with commitlint (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6757">#6757</a>)
(<a
href="57345c5c79">57345c5</a>),
closes <a
href="https://redirect.github.com/super-linter/super-linter/issues/6411">#6411</a></li>
<li>disable xmllint verbose output if debuging (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6747">#6747</a>)
(<a
href="e6c42ca463">e6c42ca</a>),
closes <a
href="https://redirect.github.com/super-linter/super-linter/issues/6653">#6653</a></li>
<li>do not hide php composer output (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6637">#6637</a>)
(<a
href="1c62141194">1c62141</a>)</li>
<li>pass optional arguments to gitleaks (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6756">#6756</a>)
(<a
href="109384b3f0">109384b</a>),
closes <a
href="https://redirect.github.com/super-linter/super-linter/issues/6601">#6601</a></li>
<li>set github_before_sha on pull requests (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6687">#6687</a>)
(<a
href="d7f522206a">d7f5222</a>)</li>
<li>support eslint flat config files (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6619">#6619</a>)
(<a
href="d349d57576">d349d57</a>)</li>
<li>support ktlint format fix (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6748">#6748</a>)
(<a
href="5cb5915c0d">5cb5915</a>),
closes <a
href="https://redirect.github.com/super-linter/super-linter/issues/6618">#6618</a></li>
<li>warn the user on conflicting tools (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6759">#6759</a>)
(<a
href="b4aaae9add">b4aaae9</a>)</li>
</ul>
<h3>🐛 Bugfixes</h3>
<ul>
<li>check if commit count is defined before using (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6733">#6733</a>)
(<a
href="d007229c20">d007229</a>)</li>
<li>check return code and misc test improvements (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6697">#6697</a>)
(<a
href="7f46ec3f95">7f46ec3</a>)</li>
<li>configure nbqa tools (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6761">#6761</a>)
(<a
href="e31adf99f9">e31adf9</a>),
closes <a
href="https://redirect.github.com/super-linter/super-linter/issues/6736">#6736</a></li>
<li>consider git dirs safe (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6675">#6675</a>)
(<a
href="101d5a6e79">101d5a6</a>)</li>
<li>do not use a pager on git log (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6765">#6765</a>)
(<a
href="f5bae0c893">f5bae0c</a>)</li>
<li>emit prettier verbose output when debugging (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6636">#6636</a>)
(<a
href="4e1eb5f5e0">4e1eb5f</a>)</li>
<li>export github_before_sha (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6714">#6714</a>)
(<a
href="6401906d78">6401906</a>)</li>
<li>fix default values for prettier fix vars (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6769">#6769</a>)
(<a
href="4230ecc9a8">4230ecc</a>),
closes <a
href="https://redirect.github.com/super-linter/super-linter/issues/6768">#6768</a></li>
<li>more robust error checking and test fixes (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6693">#6693</a>)
(<a
href="1c70566ff2">1c70566</a>)</li>
<li>skip symbolic links when passing files to prettier (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6620">#6620</a>)
(<a
href="417a58a62d">417a58a</a>)</li>
<li>update editorconfig-checker config file name (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6730">#6730</a>)
(<a
href="72f02f08d9">72f02f0</a>)</li>
</ul>
<h3>⬆️ Dependency updates</h3>
<ul>
<li><strong>bundler:</strong> bump the rubocop group in /dependencies
with 10 updates (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6661">#6661</a>)
(<a
href="2757a99ca5">2757a99</a>)</li>
<li><strong>bundler:</strong> bump the rubocop group in /dependencies
with 4 updates (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6782">#6782</a>)
(<a
href="17cf93575b">17cf935</a>)</li>
<li><strong>docker:</strong> bump python in the docker-base-images group
(<a
href="https://redirect.github.com/super-linter/super-linter/issues/6723">#6723</a>)
(<a
href="960298bbeb">960298b</a>)</li>
<li><strong>docker:</strong> bump the docker group across 1 directory
with 17 updates (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6776">#6776</a>)
(<a
href="8b602a4d8b">8b602a4</a>)</li>
<li><strong>java:</strong> bump
com.google.googlejavaformat:google-java-format (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6780">#6780</a>)
(<a
href="aa3f3f8779">aa3f3f8</a>)</li>
<li><strong>java:</strong> bump com.puppycrawl.tools:checkstyle (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6639">#6639</a>)
(<a
href="59f2b6bebb">59f2b6b</a>)</li>
<li><strong>npm:</strong> bump <code>@​babel/eslint-parser</code> in
/dependencies (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6762">#6762</a>)
(<a
href="fd53895808">fd53895</a>)</li>
<li><strong>npm:</strong> bump <code>@​babel/runtime-corejs3</code> (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6651">#6651</a>)
(<a
href="8fbf79e7cd">8fbf79e</a>)</li>
<li><strong>npm:</strong> bump <code>@​stoplight/spectral-cli</code> in
/dependencies (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6742">#6742</a>)
(<a
href="56355b5d6e">56355b5</a>)</li>
<li><strong>npm:</strong> bump asl-validator from 3.13.0 to 3.14.0 in
/dependencies (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6631">#6631</a>)
(<a
href="30aa4b3218">30aa4b3</a>)</li>
<li><strong>npm:</strong> bump asl-validator from 3.14.0 to 3.15.0 in
/dependencies (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6777">#6777</a>)
(<a
href="660f7dcb41">660f7dc</a>)</li>
<li><strong>npm:</strong> bump next (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6676">#6676</a>)
(<a
href="f171ee5245">f171ee5</a>)</li>
<li><strong>npm:</strong> bump next (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6708">#6708</a>)
(<a
href="43faf9530c">43faf95</a>)</li>
<li><strong>npm:</strong> bump next (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6729">#6729</a>)
(<a
href="536538ab2d">536538a</a>)</li>
<li><strong>npm:</strong> bump npm-groovy-lint from 15.1.0 to 15.2.0 in
/dependencies (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6779">#6779</a>)
(<a
href="c19a3da4cf">c19a3da</a>)</li>
<li><strong>npm:</strong> bump prettier from 3.5.2 to 3.5.3 in
/dependencies (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6629">#6629</a>)
(<a
href="6864c8c0d5">6864c8c</a>)</li>
<li><strong>npm:</strong> bump renovate from 39.179.1 to 40.3.4 in
/dependencies (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6763">#6763</a>)
(<a
href="5e7e9212d8">5e7e921</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="12150456a7"><code>1215045</code></a>
chore(main): release 7.4.0 (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6634">#6634</a>)</li>
<li><a
href="8b602a4d8b"><code>8b602a4</code></a>
deps(docker): bump the docker group across 1 directory with 17 updates
(<a
href="https://redirect.github.com/super-linter/super-linter/issues/6776">#6776</a>)</li>
<li><a
href="f8df7f61c0"><code>f8df7f6</code></a>
deps(npm): bump the stylelint group across 1 directory with 3 updates
(<a
href="https://redirect.github.com/super-linter/super-linter/issues/6775">#6775</a>)</li>
<li><a
href="660f7dcb41"><code>660f7dc</code></a>
deps(npm): bump asl-validator from 3.14.0 to 3.15.0 in /dependencies (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6777">#6777</a>)</li>
<li><a
href="25d4ced079"><code>25d4ced</code></a>
deps(npm): bump renovate from 40.10.4 to 40.11.8 in /dependencies (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6778">#6778</a>)</li>
<li><a
href="c19a3da4cf"><code>c19a3da</code></a>
deps(npm): bump npm-groovy-lint from 15.1.0 to 15.2.0 in /dependencies
(<a
href="https://redirect.github.com/super-linter/super-linter/issues/6779">#6779</a>)</li>
<li><a
href="aa3f3f8779"><code>aa3f3f8</code></a>
deps(java): bump com.google.googlejavaformat:google-java-format (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6780">#6780</a>)</li>
<li><a
href="e15495758b"><code>e154957</code></a>
deps(python): bump the pip group across 1 directory with 3 updates (<a
href="https://redirect.github.com/super-linter/super-linter/issues/6781">#6781</a>)</li>
<li><a
href="17cf93575b"><code>17cf935</code></a>
deps(bundler): bump the rubocop group in /dependencies with 4 updates
(<a
href="https://redirect.github.com/super-linter/super-linter/issues/6782">#6782</a>)</li>
<li><a
href="2757a99ca5"><code>2757a99</code></a>
deps(bundler): bump the rubocop group in /dependencies with 10 updates
(<a
href="https://redirect.github.com/super-linter/super-linter/issues/6661">#6661</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/super-linter/super-linter/compare/v7.3.0...v7.4.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=super-linter/super-linter&package-manager=github_actions&previous-version=7.3.0&new-version=7.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2025-06-30 22:07:33 +00:00
robtfm
a2992fcffd
Light Textures (#18031)
# Objective

add support for light textures (also known as light cookies, light
functions, and light projectors)


![image](https://github.com/user-attachments/assets/afdb23e2-b35f-4bf0-bf92-f883cd7db771)

## Solution

- add components:

```rs
/// Add to a [`PointLight`] to add a light texture effect.
/// A texture mask is applied to the light source to modulate its intensity,  
/// simulating patterns like window shadows, gobo/cookie effects, or soft falloffs.
pub struct PointLightTexture {
    /// The texture image. Only the R channel is read.
    pub image: Handle<Image>,
    /// The cubemap layout. The image should be a packed cubemap in one of the formats described by the [`CubemapLayout`] enum.
    pub cubemap_layout: CubemapLayout,
}

/// Add to a [`SpotLight`] to add a light texture effect.
/// A texture mask is applied to the light source to modulate its intensity,  
/// simulating patterns like window shadows, gobo/cookie effects, or soft falloffs.
pub struct SpotLightTexture {
    /// The texture image. Only the R channel is read.
    /// Note the border of the image should be entirely black to avoid leaking light.
    pub image: Handle<Image>,
}

/// Add to a [`DirectionalLight`] to add a light texture effect.
/// A texture mask is applied to the light source to modulate its intensity,  
/// simulating patterns like window shadows, gobo/cookie effects, or soft falloffs.
pub struct DirectionalLightTexture {
    /// The texture image. Only the R channel is read.
    pub image: Handle<Image>,
    /// Whether to tile the image infinitely, or use only a single tile centered at the light's translation
    pub tiled: bool,
}
```

- store images to the `RenderClusteredDecals` buffer
- read the image and modulate the lights
- add `light_textures` example to showcase the new features

## Testing

see light_textures example
2025-06-30 21:56:17 +00:00
François Mockers
bcb5520742
bevy_window: fix compilation without default features (#19870)
# Objective

- bevy_window fails to compile without default features

```
error: cannot find derive macro `Reflect` in this scope
    --> crates/bevy_window/src/window.rs:1474:60
     |
1474 | #[derive(Default, Debug, Clone, Copy, PartialEq, Eq, Hash, Reflect)]
     |                                                            ^^^^^^^

warning: unused import: `format`
 --> crates/bevy_window/src/window.rs:1:30
  |
1 | use alloc::{borrow::ToOwned, format, string::String};
  |                              ^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: `bevy_window` (lib) generated 1 warning
error: could not compile `bevy_window` (lib) due to 1 previous error; 1 warning emitted
```

## Solution

- Fix them

## Testing

`cargo build -p bevy_window --no-default-features --features
bevy_math/libm`
2025-06-30 20:51:52 +00:00
Martín Maita
d7ce35234f
Update ui_test requirement from 0.29.1 to 0.30.1 (#19799)
# Objective

- Fixes #19670

## Solution

- Updated breaking code to be able to upgrade `ui_test` to the latest
version.

## Testing

- CI checks.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-30 18:19:46 +00:00
dependabot[bot]
c6a6afc60a
Update petgraph requirement from 0.7 to 0.8 (#19878)
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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2025-06-30 16:56:00 +00:00
François Mockers
01eff3ea93
bevy_render: fix clippy on wasm (#19872)
# Objective

- bevy_render has unfulfilled expected clippy lints in wasm

## Solution

- Don't expect them in wasm

## Testing

`cargo clippy --target wasm32-unknown-unknown -p bevy_render --no-deps
-- -D warnings`
2025-06-29 22:09:37 +00:00
atlv
a8bb208ed3
optimize ktx2 level data concatenation (#19845)
# Objective

- avoid several internal vec copies while collecting all the level data
in ktx2 load
- merge another little piece of #18411 (benchmarks there found this to
be a significant win)

## Solution

- reserve and extend

## Testing

- ran a few examples that load ktx2 images, like ssr. looks fine

## Future work

- fast path logic to skip the reading into different vecs and just read
it all in one go into the final buffer instead
- as above, but directly into gpu staging buffer perhaps
2025-06-29 21:59:56 +00:00
François Mockers
764be9199c
bevy_winit: fix compile and clippy on wasm (#19869)
# Objective

- bevy_winit has a warning when compiling without default feature on
linux
- bevy_winit has a clippy warning when compiling in wasm

## Solution

- Fix them

## Testing

```
cargo build -p bevy_winit --no-default-features --features winit/x11
cargo clippy --target wasm32-unknown-unknown -p bevy_winit --no-deps -- -D warnings
```
2025-06-29 21:30:28 +00:00
François Mockers
a98b5683ae
bevy_asset: fix clippy in wasm (#19865)
# Objective

- bevy_asset has a clippy warning in wasm:
[`clippy::io_other_error`](https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error)

```
error: this can be `std::io::Error::other(_)`
  --> crates/bevy_asset/src/io/wasm.rs:50:9
   |
50 |         std::io::Error::new(std::io::ErrorKind::Other, message)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
   = note: `-D clippy::io-other-error` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::io_other_error)]`
help: use `std::io::Error::other`
   |
50 -         std::io::Error::new(std::io::ErrorKind::Other, message)
50 +         std::io::Error::other(message)
```

## Solution

- Fix it

## Testing

`cargo clippy --target wasm32-unknown-unknown -p bevy_asset --no-deps --
-D warnings`
2025-06-29 20:36:53 +00:00
JMS55
56710df934
bevy_solari ReSTIR DI (#19790)
# Objective

- Add temporal and spatial resampling to bevy_solari.

# Showcase
ReSTIR:

![image](https://github.com/user-attachments/assets/9b563713-d0cb-4f33-b402-dfa5a13ef3e2)

Previous RIS: 

![455750793-b70b968d-9c73-4983-9b6b-b60cace9b47a](https://github.com/user-attachments/assets/e62c852b-1f2c-4e86-ab35-a8058e9339d6)
2025-06-29 19:01:32 +00:00
atlv
ec1916a240
Dds transcode channel order fix (#19849)
# Objective

- Fix bug in dds channel order transcode
- taken from #18411

## Solution

- fix it
- improve docs a bit

## Testing

- example in linked pr
2025-06-29 18:19:05 +00:00
IceSentry
37aae00120
Add RenderStartup schedule to the RenderApp (#19841)
# Objective

- We sometimes want to spawn things on startup that only exist in the
RenderApp but right now there's no equivalent to the Startup schedule on
the RenderApp so we need to do all of that in the plugin build/finish
code

## Solution

- Add a RenderStartup schedule that runs on the RenderApp after the
plugins are initialized

## Testing

- I ported the custom_post_processing example to use this new schedule
and things worked as expected. I will push the change in a follow up PR
2025-06-29 18:14:10 +00:00
ickshonpe
8d70649e7d
core_widgets example slider fix (#19810)
# Objective

When dragging the slider thumb the thumb is only highlighted while the
pointer is hovering the widget. If the pointer moves off the widget
during a drag the thumb reverts to its normal unhovered colour.

## Solution

Query for `CoreSliderDragState` in the slider update systems and set the
lighter color if the thumb is dragged or hovered.
2025-06-29 17:41:41 +00:00
ickshonpe
e9daac4f11
Move TextShadow to text widget module (#19579)
# Objective

It's odd that `TextShadow` is accessible by importing `bevy::ui::*` but
`Text` isn't.

Move the `TextShadow` component to `text` widget module and move its
type registration to the `build_text_interop` function.
2025-06-29 17:37:04 +00:00
François Mockers
e6e731017d
bevy_input: build warnings without bevy_reflect (#19862)
# Objective

- bevy_input has build warnings when bevy_reflect isn't enabled

## Solution

- Fix them

## Testing

`cargo build -p bevy_input --no-default-features --features
bevy_math/libm`
2025-06-29 17:13:43 +00:00
François Mockers
c077c65ddd
bevy_utils: clippy without debug feature enabled (#19861)
# Objective

- bevy_utils has warnings with clippy

## Solution

- Fix them

## Testing

`cargo clippy -p bevy_utils  --no-deps -- -D warnings`
2025-06-29 17:13:27 +00:00
François Mockers
5f497efe90
bevy_platform: clippy without default features (#19860)
# Objective

- bevy_platform has clippy warnings when building without default
features

## Solution

- Fix them

## Testing

`cargo clippy -p bevy_platform --no-default-features --no-deps -- -D
warnings`
2025-06-29 17:12:57 +00:00
François Mockers
1fe559730c
bevy_ecs: remove use of needless_return (#19859)
# Objective

- bevy_ecs has a expected lint that is both needed and unneeded

## Solution

- Change the logic so that it's always not needed

## Testing

`cargo clippy -p bevy_ecs --no-default-features --no-deps -- -D
warnings`
2025-06-29 17:12:33 +00:00
François Mockers
8e12b1f0b2
bevy_ui compilation (#19858)
# Objective

- `bevy_ui` has errors and warnings when building independently

## Solution

- properly use the `bevy_ui_picking_backend` feature

## Testing

`cargo build -p bevy_ui`
2025-06-29 17:12:11 +00:00
Brian Reavis
795e273a9a
Don't create errors for ignored failed commands (#19718)
# Objective

1. Reduce overhead from error handling for ECS commands that
intentionally ignore errors, such as `try_despawn`. These commands
currently allocate error objects and pass them to a no-op handler
(`ignore`), which can impact performance when many operations fail.

2. Fix a hang when removing `ChildOf` components during entity
despawning. Excessive logging of these failures can cause significant
hangs (I'm noticing around 100ms).
    - Fixes https://github.com/bevyengine/bevy/issues/19777
    - Fixes https://github.com/bevyengine/bevy/issues/19753

<img width="1387" alt="image"
src="https://github.com/user-attachments/assets/5c67ab77-97bb-46e5-b287-2c502bef9358"
/>


## Solution

* Added a `ignore_error` method to the `HandleError` trait to use
instead of `handle_error_with(ignore)`. It swallows errors and does not
create error objects.
* Replaced `remove::<ChildOf>` with `try_remove::<ChildOf>` to suppress
expected (?) errors and reduce log noise.

## Testing

- I ran these changes on a local project.
2025-06-29 16:34:20 +00:00
Chris Russell
85448b767e
Make DebugName work when building with no default features (#19824)
# Objective

Let `bevy_utils` build with no default features.  

`cargo build -p bevy_utils --no-default-features` currently fails with 

```
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `alloc`
 --> crates\bevy_utils\src\debug_info.rs:1:5
  |
1 | use alloc::{borrow::Cow, fmt, string::String};
  |     ^^^^^ use of unresolved module or unlinked crate `alloc`
  |
  = help: add `extern crate alloc` to use the `alloc` crate

error[E0432]: unresolved import `alloc`
 --> crates\bevy_utils\src\debug_info.rs:1:5
  |
1 | use alloc::{borrow::Cow, fmt, string::String};
  |     ^^^^^ help: a similar path exists: `core::alloc`
```

I would have expected CI to catch this earlier, but I have not
investigated why it did not.

## Solution

Wrap the parts of `DebugName` that use `Cow` and `String` in
`cfg::alloc!`.

If the `debug` feature is enabled, then `DebugName` itself stores a
`Cow`, so make the `debug` feature require `bevy_platform/alloc`.

That is, you can use `DebugName` in no-std contexts when it's just a
ZST! (I bet it's even possible to support no-std `debug` by storing
`&'static str` instead of `Cow<'static, str>`, but that seemed like too
much complexity for now.)
2025-06-29 02:45:41 +00:00
atlv
57e58ef997
Meshlet BVH Culling (#19318)
# Objective

- Merge @SparkyPotato 's efforts to implement BVH-accelerated meshlet
culling.

## Solution

- Add hot reloading support
- Fix near-plane overculling
- Fix hzb sampling
- Fix orthographic error metric

## Testing

- Meshlet example, Nsight, hot-reloading and careful thinking

---------

Co-authored-by: SparkyPotato <noob.sparkypotato@gmail.com>
Co-authored-by: JMS55 <47158642+JMS55@users.noreply.github.com>
Co-authored-by: charlotte <charlotte.c.mcelwain@gmail.com>
2025-06-29 00:04:21 +00:00
Talin
65bddbd3e4
Bevy Feathers: an opinionated widget toolkit for building Bevy tooling (#19730)
# Objective

This PR introduces Bevy Feathers, an opinionated widget toolkit and
theming system intended for use by the Bevy Editor, World Inspector, and
other tools.

The `bevy_feathers` crate is incomplete and hidden behind an
experimental feature flag. The API is going to change significantly
before release.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2025-06-28 19:52:13 +00:00
jf908
fa9e303e61
Doc for X11 CursorGrabMode support (#19811)
# Objective

- Clarify that `CursorGrabMode::Locked` isn't supported on X11

Source:
https://docs.rs/winit/latest/winit/window/enum.CursorGrabMode.html#variant.Locked

## Solution

- Add it to the platform-specific docs
2025-06-28 18:54:21 +00:00
IceSentry
37bbbf753d
Use SmallVec instead of HashMap in MaterialProperties (#19846)
# Objective

- MaterialProperties uses HashMap for some data that is generally going
to be really small. This is likely using more memory than necessary

## Solution

- Use a SmallVec instead
- I used the size a StandardMaterial would need for all the backing
arrays

## Testing

- Tested the 3d_scene to confirm it still works

## Notes

I'm not sure if it made a measurable difference since I'm not sure how
to measure this. It's a bit hard to create an artificial workflow where
this would be the main bottleneck. This is very in the realm of
microoptimization.
2025-06-28 18:43:56 +00:00
Jan Hohenheim
fb2bbb043c
Nudge users into migrating to new default glTF coordinate conversion (#19816)
# Objective

*Step towards https://github.com/bevyengine/bevy/issues/19686*

We now have all the infrastructure in place to migrate Bevy's default
behavior when loading glTF files to respect their coordinate system.
Let's start migrating! For motivation, see the issue linked above

## Solution

- Introduce a feature flag called `gltf_convert_coordinates_default`
- Currently,`GltfPlugin::convert_coordinates` defaults to `false`
- If `gltf_convert_coordinates_default` is enabled,
`GltfPlugin::convert_coordinates` will default to `true`
- If `gltf_convert_coordinates_default` is not enabled *and*
`GltfPlugin::convert_coordinates` is false, we assume the user is
implicitly using the old behavior. Print a warning *once* in that case,
but only when a glTF was actually loaded
- A user can opt into the new behavior either
- Globally, by enabling `gltf_convert_coordinates_default` in their
`Cargo.toml`
  - Globally, by enabling `GltfPlugin::convert_coordinates`
  - Per asset, by enabling `GltfLoaderSettings::convert_coordinates`
- A user can explicitly opt out of the new behavior and silence the
warning by
- Enabling `gltf_convert_coordinates_default` in their `Cargo.toml` and
disabling `GltfPlugin::convert_coordinates`
- This PR also moves the existing release note into a migration guide
 
Note that I'm very open to change any features, mechanisms, warning
texts, etc. as needed :)

## Future Work

- This PR leaves all examples fully functional by not enabling this flag
internally yet. A followup PR will enable it as a `dev-dependency` and
migrate all of our examples involving glTFs to the new behavior.
- After 0.17 (and the RC before) lands, we'll gather feedback to see if
anything breaks or the suggested migration is inconvenient in some way
- If all goes well, we'll kill this flag and change the default of
`GltfPlugin::convert_coordinates` to `true` in 0.18


## Testing

- Ran examples with and without the flag

---------

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
Co-authored-by: AlephCubed <76791009+AlephCubed@users.noreply.github.com>
2025-06-28 18:35:41 +00:00
charlotte 🌸
e6ba9a6d18
Type erased materials (#19667)
# Objective

Closes #18075

In order to enable a number of patterns for dynamic materials in the
engine, it's necessary to decouple the renderer from the `Material`
trait.

This opens the possibility for:
- Materials that aren't coupled to `AsBindGroup`.
- 2d using the underlying 3d bindless infrastructure.
- Dynamic materials that can change their layout at runtime.
- Materials that aren't even backed by a Rust struct at all.

## Solution

In short, remove all trait bounds from render world material systems and
resources. This means moving a bunch of stuff onto `MaterialProperties`
and engaging in some hacks to make specialization work. Rather than
storing the bind group data in `MaterialBindGroupAllocator`, right now
we're storing it in a closure on `MaterialProperties`. TBD if this has
bad performance characteristics.

## Benchmarks

- `many_cubes`:
`cargo run --example many_cubes --release --features=bevy/trace_tracy --
--vary-material-data-per-instance`:
![Screenshot 2025-06-26
235426](https://github.com/user-attachments/assets/10a0ee29-9932-4f91-ab43-33518b117ac5)

- @DGriffin91's Caldera
`cargo run --release --features=bevy/trace_tracy -- --random-materials`

![image](https://github.com/user-attachments/assets/ef91ba6a-8e88-4922-a73f-acb0af5b0dbc)


- @DGriffin91's Caldera with 20 unique material types (i.e.
`MaterialPlugin<M>`) and random materials per mesh
`cargo run --release --features=bevy/trace_tracy -- --random-materials`
![Screenshot 2025-06-27
000425](https://github.com/user-attachments/assets/9561388b-881d-46cf-8c3d-b15b3e9aedc7)


### TODO

- We almost certainly lost some parallelization from removing the type
params that could be gained back from smarter iteration.
- Test all the things that could have broken.
- ~Fix meshlets~

## Showcase

See [the
example](https://github.com/bevyengine/bevy/pull/19667/files#diff-9d768cfe1c3aa81eff365d250d3cbe5a63e8df63e81dd85f64c3c3cd993f6d94)
for a custom material implemented without the use of the `Material`
trait and thus `AsBindGroup`.


![image](https://github.com/user-attachments/assets/e3fcca7c-e04e-4a4e-9d89-39d697a9e3b8)

---------

Co-authored-by: IceSentry <IceSentry@users.noreply.github.com>
Co-authored-by: IceSentry <c.giguere42@gmail.com>
2025-06-27 22:57:24 +00:00
Talin
73a313200d
CoreRadio should require Checkable, not Checked. (#19836)
This was a mistake in my original PR #19778: a holdover from when
Checked was not a marker component.
2025-06-27 18:23:59 +00:00
ickshonpe
45a379cf2d
Opt-out for UI clipping (#19826)
# Objective

Opt-out for UI clipping, for motivation see issue #19821

## Solution

New zst component `OverrideClip`. A UI node entity with this component
will ignore any inherited clipping rect, so it will never get clipped
regardless of the `Overflow` settings of its ancestors.

#### Why use a marker component and not add a new variant to `Overflow`
instead?
A separate marker component allows users to set both `Overflow` and
`OverrideClip` on the same node.

## Testing

Run the `overflow` example with the `OverrideClip` component added to
the `ImagNode`s and you will see that clipping is disabled.
2025-06-27 17:17:09 +00:00
charlotte 🌸
a0b90cd618
Resolution override (#19817)
Co-authored-by: JMS55 <47158642+JMS55@users.noreply.github.com>
Co-authored-by: atlv <email@atlasdostal.com>
2025-06-27 16:30:54 +00:00
atlv
410ca48023
cleanup constants (#19831)
# Objective

- i think const exprs werent supported in naga when these were written,
and we've just stuck with that since then. they're supported now so lets
use them

## Solution

- do that thang

## Testing

- transparency_3d, transmission, ssr, 3d_scene, couple others. they all
look fine
2025-06-27 07:02:03 +00:00
atlv
a256d3398a
use sequential bindings in bevy_sprite (#19830)
# Objective

- Use the terser api

## Solution

- Use the terser api

## Testing

- run sprite example it works
2025-06-27 06:59:02 +00:00
atlv
5fabb5343d
use wgpu TextureDataOrder (#19829)
# Objective

- Fixes #19140

## Solution

- Use TextureDataOrder

## Testing

- ran some examples that use ktx2 textures, they look fine
2025-06-27 06:57:29 +00:00
atlv
479c93d72b
updating: very very minorly (#19827)
# Objective

- fix thing missed during rust update

## Solution

- fix thing missed during rust update

## Testing

- cargo clippy
2025-06-26 21:48:20 +00:00