bevy/examples/3d
IceSentry 068e42a01f
Configurable colors for wireframe (#5303)
# Objective

- Make the wireframe colors configurable at the global level and the
single mesh level
- Based on https://github.com/bevyengine/bevy/pull/5314

This video shows what happens when playing with various settings from
the example


https://github.com/bevyengine/bevy/assets/8348954/1ee9aee0-fab7-4da8-bc5d-8d0562bb34e6

## Solution

- Add a `color` field to the `WireframeMaterial`
- Use a `WireframeColor` component to configure the color per entity
- Add a `default_color` field to `WireframeConfig` for global wireframes
or wireframes with no specified color.

## Notes

- Most of the docs and the general idea for `WireframeColor` came from
[UberLambda](https://github.com/UberLambda) in #3677 but the code ended
up completely different so I created a separate branch. ~~I'm not sure
how to correctly credit them on this PR.~~ (I re-created the commit but
I added them as co-author in the commit message)

~~Closes https://github.com/bevyengine/bevy/pull/3677~~
~~Closes https://github.com/bevyengine/bevy/pull/5301~~

~~https://github.com/bevyengine/bevy/pull/5314 should be merged before
this PR.~~
2023-10-13 00:06:24 +00:00
..
3d_gizmos.rs Instanced line rendering for gizmos based on bevy_polyline (#8427) 2023-06-13 06:49:47 +00:00
3d_scene.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
3d_shapes.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
3d_viewport_to_world.rs Add example for Camera::viewport_to_world (#7179) 2023-09-11 18:52:11 +00:00
anti_aliasing.rs Allow clippy::type_complexity in more places. (#9796) 2023-10-02 21:55:16 +00:00
atmospheric_fog.rs Remove useless single tuples and trailing commas (#9720) 2023-09-08 21:46:54 +00:00
blend_modes.rs Added Val::ZERO Constant (#9566) 2023-08-26 14:00:53 +00:00
bloom_3d.rs Fix CI for Rust 1.72 (#9562) 2023-08-25 12:34:24 +00:00
deferred_rendering.rs Deferred Renderer (#9258) 2023-10-12 22:10:38 +00:00
fog.rs Rename keys like LAlt to AltLeft (#8792) 2023-06-15 01:37:04 +00:00
generate_custom_mesh.rs Add consuming builder methods for more ergonomic Mesh creation (#10056) 2023-10-09 19:47:41 +00:00
lighting.rs standardize instructions in examples (#8478) 2023-04-26 19:52:31 +00:00
lines.rs Add consuming builder methods for more ergonomic Mesh creation (#10056) 2023-10-09 19:47:41 +00:00
load_gltf.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
orthographic.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
parallax_mapping.rs Add consuming builder methods for more ergonomic Mesh creation (#10056) 2023-10-09 19:47:41 +00:00
parenting.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
pbr.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
render_to_texture.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
shadow_biases.rs Refactor EventReader::iter to read (#9631) 2023-08-30 14:20:03 +00:00
shadow_caster_receiver.rs Allow clippy::type_complexity in more places. (#9796) 2023-10-02 21:55:16 +00:00
skybox.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
spherical_area_lights.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
split_screen.rs Refactor EventReader::iter to read (#9631) 2023-08-30 14:20:03 +00:00
spotlight.rs Improve execution of examples in CI (#9331) 2023-08-03 12:45:28 +00:00
ssao.rs Allow clippy::type_complexity in more places. (#9796) 2023-10-02 21:55:16 +00:00
texture.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
tonemapping.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
transparency_3d.rs Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
two_passes.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
update_gltf_scene.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
vertex_colors.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
wireframe.rs Configurable colors for wireframe (#5303) 2023-10-13 00:06:24 +00:00