Blacksite/crates/game_hot/src/world/mod.rs
Rbanh f29712d158
Some checks are pending
CI / Format, lint, test, build (push) Waiting to run
Initial project import
2026-06-05 21:44:45 -04:00

28 lines
791 B
Rust

//! The test world: lighting and a physics-collidable arena to explore.
mod level;
mod lighting;
pub use level::spawn_level;
pub use lighting::{
spawn_sun, sync_project_sun_from_settings, sync_project_sun_illuminance,
sync_project_sun_visibility, sync_scene_directional_shadow_cascades,
};
use bevy::prelude::*;
use settings::ProjectSettings;
#[unsafe(no_mangle)]
pub fn apply_ambient_light(mut commands: Commands, settings: Res<ProjectSettings>) {
let rendering = &settings.rendering;
commands.insert_resource(GlobalAmbientLight {
color: Color::srgb(
rendering.ambient_color[0],
rendering.ambient_color[1],
rendering.ambient_color[2],
),
brightness: rendering.ambient_brightness,
..default()
});
}