Skip to content

Commit 851310e

Browse files
committed
Rename a field
1 parent 87811d8 commit 851310e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

crates/bevy_pbr/src/wireframe.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ fn prepare_wireframes(
108108
commands.entity(entity).insert(uniform_offset);
109109
};
110110

111-
if config.debug_wireframes {
111+
if config.on_all_meshes {
112112
global_query.for_each(add_wireframe_uniform);
113113
} else {
114114
wireframe_query.for_each(add_wireframe_uniform);
@@ -160,10 +160,10 @@ pub struct Wireframe {
160160
#[derive(Debug, Clone)]
161161
pub struct WireframeConfig {
162162
/// Whether to show wireframes for all meshes. If `false`, only meshes with a [`Wireframe`] component will be rendered.
163-
pub debug_wireframes: bool,
163+
pub on_all_meshes: bool,
164164
/// The default color for wireframes.
165165
///
166-
/// If [`Self::debug_wireframes`] is set, any [`Entity`] that does not have a [`Wireframe`] component attached to it will have
166+
/// If [`Self::on_all_meshes`] is set, any [`Entity`] that does not have a [`Wireframe`] component attached to it will have
167167
/// wireframes in this color. Otherwise, this will be the fallback color for any [`Wireframe`]s that does have a `None`
168168
/// [`Wireframe::color`].
169169
pub default_color: Color,
@@ -172,7 +172,7 @@ pub struct WireframeConfig {
172172
impl Default for WireframeConfig {
173173
fn default() -> Self {
174174
Self {
175-
debug_wireframes: false,
175+
on_all_meshes: false,
176176
default_color: Color::WHITE,
177177
}
178178
}
@@ -326,7 +326,7 @@ fn queue_wireframes(
326326
}
327327
};
328328

329-
if wireframe_config.debug_wireframes {
329+
if wireframe_config.on_all_meshes {
330330
material_meshes.p0().iter().for_each(add_render_phase);
331331
} else {
332332
material_meshes.p1().iter().for_each(add_render_phase);

examples/3d/wireframe.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ fn setup(
2525
mut materials: ResMut<Assets<StandardMaterial>>,
2626
) {
2727
// To draw the wireframe on all entities, set this to 'true'
28-
wireframe_config.debug_wireframes = false;
28+
wireframe_config.on_all_meshes = false;
2929
// You can also change the default color of the wireframes, which controls:
30-
// - all wireframes if `WireframeConfig::debug_wireframes` is set to 'true'
30+
// - all wireframes if `WireframeConfig::on_all_meshes` is set to 'true'
3131
// - the wireframe of all entities whose `Wireframe::color` is None otherwise
3232
wireframe_config.default_color = Color::AQUAMARINE;
3333

0 commit comments

Comments
 (0)