Skip to content

Commit

Permalink
Disable shadows in the 3D example when compiled to WASM
Browse files Browse the repository at this point in the history
  • Loading branch information
idanarye committed Nov 11, 2023
1 parent 5c9a90c commit 25d280d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/platformer_3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ fn setup_camera(mut commands: Commands) {
commands.spawn(DirectionalLightBundle {
directional_light: DirectionalLight {
illuminance: 4000.0,
shadows_enabled: true,
// For some reason in Bevy 0.12 shadows no longer work in WASM
shadows_enabled: !cfg!(target_arch = "wasm32"),
..Default::default()
},
transform: Transform::default().looking_at(-Vec3::Y, Vec3::Z),
Expand Down

0 comments on commit 25d280d

Please sign in to comment.