use ecs::Component; use crate::color::Color; use crate::vector::Vec3; #[derive(Debug, Clone, Component)] pub struct LightSource { pub position: Vec3, pub ambient: Color, pub diffuse: Color, pub specular: Color, } impl Default for LightSource { fn default() -> Self { Self { position: Vec3::default(), ambient: Color { red: 0.2, green: 0.2, blue: 0.2 }, diffuse: Color { red: 0.5, green: 0.5, blue: 0.5 }, specular: Color { red: 1.0, green: 1.0, blue: 1.0 }, } } }