bevy/crates
robtfm 47d25c13d7
Ambient component (#17343)
# Objective

allow setting ambient light via component on cameras. 
arguably fixes #7193
note i chose to use a component rather than an entity since it was not
clear to me how to manage multiple ambient sources for a single
renderlayer, and it makes for a very small changeset.

## Solution

- make ambient light a component as well as a resource
- extract it
- use the component if present on a camera, fallback to the resource

## Testing

i added 
```rs
        if index == 1 {
            commands.entity(camera).insert(AmbientLight{
                color: Color::linear_rgba(1.0, 0.0, 0.0, 1.0),
                brightness: 1000.0,
                ..Default::default()                
            });
        }
```
at line 84 of the split_screen example

---------

Co-authored-by: François Mockers <mockersf@gmail.com>
2025-01-14 08:10:15 +00:00
..
bevy_a11y Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_animation Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_app Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_asset Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_audio Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_color Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_core_pipeline Key render phases off the main world view entity, not the render world view entity. (#16942) 2025-01-12 20:24:17 +00:00
bevy_derive Bump Version after Release (#17176) 2025-01-06 00:04:44 +00:00
bevy_dev_tools Allow users to customize history length in FrameTimeDiagnosticsPlugin (#17259) 2025-01-12 18:18:14 +00:00
bevy_diagnostic Diagnostics smoothing factor fix (#17354) 2025-01-14 01:13:24 +00:00
bevy_dylib Bump Version after Release (#17176) 2025-01-06 00:04:44 +00:00
bevy_ecs Add std derives to SystemParam types (#16785) 2025-01-14 00:30:51 +00:00
bevy_encase_derive Bump Version after Release (#17176) 2025-01-06 00:04:44 +00:00
bevy_gilrs Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_gizmos Key render phases off the main world view entity, not the render world view entity. (#16942) 2025-01-12 20:24:17 +00:00
bevy_gltf Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_hierarchy Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_image Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_input Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_input_focus Add a simple directional UI navigation example (#17224) 2025-01-09 21:15:28 +00:00
bevy_internal Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_log Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_macro_utils Bump Version after Release (#17176) 2025-01-06 00:04:44 +00:00
bevy_math Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_mesh Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_mikktspace Bump Version after Release (#17176) 2025-01-06 00:04:44 +00:00
bevy_pbr Ambient component (#17343) 2025-01-14 08:10:15 +00:00
bevy_picking Rename PickingBehavior to Pickable (#17266) 2025-01-12 05:36:52 +00:00
bevy_ptr Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_reflect Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_remote Add BRP method to mutate a component (#16940) 2025-01-14 07:55:40 +00:00
bevy_render Key render phases off the main world view entity, not the render world view entity. (#16942) 2025-01-12 20:24:17 +00:00
bevy_scene Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_sprite Key render phases off the main world view entity, not the render world view entity. (#16942) 2025-01-12 20:24:17 +00:00
bevy_state Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_tasks Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_text update_text2d_layout creates new font atlases when the primary window is closed (#7849) 2025-01-14 01:01:31 +00:00
bevy_time Fix bevy_time tests occasionally failing on optimised Windows builds (#17349) 2025-01-14 00:30:07 +00:00
bevy_transform Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_ui Key render phases off the main world view entity, not the render world view entity. (#16942) 2025-01-12 20:24:17 +00:00
bevy_utils Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_window Downgrade clippy::allow_attributes and clippy::allow_attributes_without_reason to warn (#17320) 2025-01-12 05:28:26 +00:00
bevy_winit Make InputFocus optional in bevy_winit (#17358) 2025-01-14 05:08:20 +00:00