bevy/examples/3d
ickshonpe 6f7d0e5725
split up TextStyle (#15857)
# Objective

Currently text is recomputed unnecessarily on any changes to its color,
which is extremely expensive.

## Solution
Split up `TextStyle` into two separate components `TextFont` and
`TextColor`.

## Testing

I added this system to `many_buttons`:
```rust
fn set_text_colors_changed(mut colors: Query<&mut TextColor>) {
    for mut text_color in colors.iter_mut() {
        text_color.set_changed();
    }
}
```

reports ~4fps on main, ~50fps with this PR.

## Migration Guide
`TextStyle` has been renamed to `TextFont` and its `color` field has
been moved to a separate component named `TextColor` which newtypes
`Color`.
2024-10-13 17:06:22 +00:00
..
3d_scene.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
3d_shapes.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
3d_viewport_to_world.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
animated_material.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
anisotropy.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
anti_aliasing.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
atmospheric_fog.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
auto_exposure.rs split up TextStyle (#15857) 2024-10-13 17:06:22 +00:00
blend_modes.rs split up TextStyle (#15857) 2024-10-13 17:06:22 +00:00
bloom_3d.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
camera_sub_view.rs improve sub view example with dynamic viewports (#15681) 2024-10-08 16:07:31 +00:00
clearcoat.rs Remove the Component trait implementation from Handle (#15796) 2024-10-09 21:10:01 +00:00
color_grading.rs split up TextStyle (#15857) 2024-10-13 17:06:22 +00:00
deferred_rendering.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
depth_of_field.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
fog_volumes.rs Synchronize removed components with the render world (#15582) 2024-10-08 22:23:17 +00:00
fog.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
generate_custom_mesh.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
irradiance_volumes.rs Fix formatting of irradiance_volumes example instructions (#15842) 2024-10-11 03:12:33 +00:00
lighting.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
lightmaps.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
lines.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
load_gltf_extras.rs split up TextStyle (#15857) 2024-10-13 17:06:22 +00:00
load_gltf.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
meshlet.rs Remove the Component trait implementation from Handle (#15796) 2024-10-09 21:10:01 +00:00
motion_blur.rs Fix motion_blur example instructions (#15852) 2024-10-11 15:35:34 +00:00
order_independent_transparency.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
orthographic.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
parallax_mapping.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
parenting.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
pbr.rs split up TextStyle (#15857) 2024-10-13 17:06:22 +00:00
pcss.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
post_processing.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
query_gltf_primitives.rs Fix query_gltf_primitives example (#15715) 2024-10-07 23:03:16 +00:00
reflection_probes.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
render_to_texture.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
rotate_environment_map.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
scrolling_fog.rs Fix missing Msaa::Off in scrolling_fog example (#15787) 2024-10-09 14:15:24 +00:00
shadow_biases.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
shadow_caster_receiver.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
skybox.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
spherical_area_lights.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
split_screen.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
spotlight.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
ssao.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
ssr.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
texture.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
tonemapping.rs split up TextStyle (#15857) 2024-10-13 17:06:22 +00:00
transmission.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
transparency_3d.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
two_passes.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
update_gltf_scene.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
vertex_colors.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
visibility_range.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
volumetric_fog.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
wireframe.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00