2019-07-21 16:50:13 +00:00
|
|
|
use specs::{Component, FlaggedStorage, VecStorage};
|
|
|
|
use vek::*;
|
|
|
|
|
|
|
|
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
|
|
|
|
pub struct LightEmitter {
|
2019-07-25 20:51:20 +00:00
|
|
|
pub offset: Vec3<f32>,
|
2019-07-21 16:50:13 +00:00
|
|
|
pub col: Rgb<f32>,
|
|
|
|
pub strength: f32,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Default for LightEmitter {
|
|
|
|
fn default() -> Self {
|
|
|
|
Self {
|
2019-07-25 20:51:20 +00:00
|
|
|
offset: Vec3::zero(),
|
2019-07-21 16:50:13 +00:00
|
|
|
col: Rgb::one(),
|
2019-07-25 20:51:20 +00:00
|
|
|
strength: 1.0,
|
2019-07-21 16:50:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Component for LightEmitter {
|
|
|
|
type Storage = FlaggedStorage<Self, VecStorage<Self>>;
|
|
|
|
}
|