Skip to content

Commit

Permalink
Tweak demo
Browse files Browse the repository at this point in the history
  • Loading branch information
janhohenheim committed Feb 18, 2024
1 parent 0104ff3 commit f723b67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion crates/example_dialogue_view/src/option_selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ pub(crate) fn option_selection_plugin(app: &mut App) {
create_options.run_if(resource_added::<OptionSelection>),
show_options,
select_option
.run_if(resource_exists::<OptionSelection>)
.run_if(
resource_exists::<OptionSelection>
.and_then(any_with_component::<PrimaryWindow>),
)
.before(typewriter::despawn),
despawn_options,
)
Expand Down
6 changes: 4 additions & 2 deletions demo/src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use bevy::core_pipeline::tonemapping::Tonemapping;
use bevy::gltf::Gltf;
use bevy::pbr::CascadeShadowConfigBuilder;
use bevy::prelude::*;
use bevy::render::camera::Exposure;
use bevy_sprite3d::{Sprite3d, Sprite3dParams};
use bevy_yarnspinner::prelude::*;

Expand All @@ -28,6 +29,7 @@ pub(crate) fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
..default()
},
tonemapping: Tonemapping::TonyMcMapface,
exposure: Exposure::INDOOR,
..default()
},
#[cfg(not(target_arch = "wasm32"))]
Expand All @@ -44,7 +46,7 @@ pub(crate) fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
commands.spawn(DirectionalLightBundle {
directional_light: DirectionalLight {
color: Color::BISQUE,
illuminance: 1_000.,
illuminance: light_consts::lux::OVERCAST_DAY,
shadows_enabled: true,
..default()
},
Expand All @@ -67,7 +69,7 @@ pub(crate) fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
commands.spawn(PointLightBundle {
point_light: PointLight {
color: Color::rgb(1.0, 0.78, 0.45),
intensity: 80.,
intensity: 10_000.,
shadows_enabled: true,
..default()
},
Expand Down

0 comments on commit f723b67

Please sign in to comment.