veloren_common/comp/
visual.rs1use serde::{Deserialize, Serialize};
2use specs::{Component, DenseVecStorage, DerefFlaggedStorage};
3use vek::*;
4
5#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
6pub struct LightEmitter {
7 pub col: Rgb<f32>,
8 pub strength: f32,
9 pub flicker: f32,
10 pub animated: bool,
11 pub dir: Option<(Vec3<f32>, f32)>,
13}
14
15impl Component for LightEmitter {
16 type Storage = DerefFlaggedStorage<Self, DenseVecStorage<Self>>;
17}
18
19#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
20pub struct LightAnimation {
21 pub offset: Vec3<f32>,
22 pub col: Rgb<f32>,
23 pub strength: f32,
24 pub dir: Option<(Vec3<f32>, f32)>,
26}
27
28impl Component for LightAnimation {
29 type Storage = DenseVecStorage<Self>;
30}