Skip to content

Commit 3a14ae4

Browse files
committed
Remove Camera2d in bloom example (#6462)
# Objective The bloom example has a 2d camera for the UI. This is an artifact of an older version of bevy. All cameras can render the UI now. ## Solution Remove the 2d camera
1 parent ec8c8fb commit 3a14ae4

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

examples/3d/bloom.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ fn setup_scene(
3535

3636
let material_emissive = materials.add(StandardMaterial {
3737
emissive: Color::rgb_linear(5.2, 1.2, 0.8), // 3. Set StandardMaterial::emissive using Color::rgb_linear, for entities we want to apply bloom to
38-
..Default::default()
38+
..default()
3939
});
4040
let material_non_emissive = materials.add(StandardMaterial {
4141
base_color: Color::GRAY,
42-
..Default::default()
42+
..default()
4343
});
4444

4545
let mesh = meshes.add(
@@ -67,22 +67,13 @@ fn setup_scene(
6767
mesh: mesh.clone(),
6868
material,
6969
transform: Transform::from_xyz(x as f32 * 2.0, 0.0, z as f32 * 2.0),
70-
..Default::default()
70+
..default()
7171
},
7272
Bouncing,
7373
));
7474
}
7575
}
7676

77-
// UI camera
78-
commands.spawn(Camera2dBundle {
79-
camera: Camera {
80-
priority: -1,
81-
..default()
82-
},
83-
..default()
84-
});
85-
8677
commands.spawn(
8778
TextBundle::from_section(
8879
"",

0 commit comments

Comments
 (0)