Skip to content

Commit 59799fc

Browse files
kfc35tychedelia
authored andcommitted
Add a rectangular light to the 3d testbed Light scene (bevyengine#24025)
# Objective - Regression test for broken Rect Lights ## Solution - Add a rectangular light to testbed/3d ## Testing - `cargo run --example testbed_3d` - I can see the new light (well, after bevyengine#24024 is merged hehe) Before (w/o rect light) <img width="1271" height="747" alt="Screenshot 2026-04-28 at 11 28 16 PM" src="https://github.com/user-attachments/assets/aa6b6258-e80d-4a98-861c-bcad6e8db541" /> After (w/ rect light - it’s behind the cube) <img width="1271" height="750" alt="Screenshot 2026-04-28 at 11 25 33 PM" src="https://github.com/user-attachments/assets/877013f0-843a-43f2-9dbd-96f2fa37d8e2" />
1 parent b124d94 commit 59799fc

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

examples/testbed/3d.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,18 @@ mod light {
189189
DespawnOnExit(CURRENT_SCENE),
190190
));
191191

192+
commands.spawn((
193+
RectLight {
194+
color: Color::srgb(0.5, 0.7, 1.0),
195+
intensity: 100_000.0,
196+
width: 1.5,
197+
height: 4.0,
198+
range: 20.0,
199+
},
200+
Transform::from_xyz(1.0, 2.0, -2.0).looking_at(Vec3::new(-1.0, 0.0, 0.0), Vec3::Y),
201+
DespawnOnExit(CURRENT_SCENE),
202+
));
203+
192204
commands.spawn((
193205
Camera3d::default(),
194206
Transform::from_xyz(-2.0, 2.5, 5.0).looking_at(Vec3::ZERO, Vec3::Y),

0 commit comments

Comments
 (0)