use bevy_camera::Camera;
use bevy_color::Color;
use bevy_ecs::prelude::*;
use bevy_reflect::prelude::*;
#[derive(Component, Clone, Debug, Reflect)]
#[reflect(Component, Debug, Default, Clone)]
#[require(Camera)]
pub struct AmbientLight {
pub color: Color,
pub brightness: f32,
pub affects_lightmapped_meshes: bool,
}
impl Default for AmbientLight {
fn default() -> Self {
Self {
color: Color::WHITE,
brightness: 80.0,
affects_lightmapped_meshes: true,
}
}
}
#[derive(Resource, Clone, Debug, Reflect)]
#[reflect(Resource, Debug, Default, Clone)]
pub struct GlobalAmbientLight {
pub color: Color,
pub brightness: f32,
pub affects_lightmapped_meshes: bool,
}
impl Default for GlobalAmbientLight {
fn default() -> Self {
Self {
color: Color::WHITE,
brightness: 80.0,
affects_lightmapped_meshes: true,
}
}
}
impl GlobalAmbientLight {
pub const NONE: GlobalAmbientLight = GlobalAmbientLight {
color: Color::WHITE,
brightness: 0.0,
affects_lightmapped_meshes: true,
};
}