mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
c212de00c2
- replace serde_derive by feature of serde incl. source code modifications to compile - reduce futures-timer to "2.0" to be same as async_std - update notify - removed mio, bincode and lz4 compress in common as networking is now in own crate btw there is a better lz4 compress crate, which is newer than 2017 - update prometheus to 0.9 - can't update uvth yet due to usues - hashbrown to 7.2 to only need a single version - libsqlite3 update - image didn't change as there is a problem with `image 0.23` - switch old directories with newer directories-next - no num upgrade as we still depend on num 0.2 anyways - rodio and cpal upgrade - const-tewaker update - dispatch (untested) update - git2 update - iterations update
49 lines
1.0 KiB
Rust
49 lines
1.0 KiB
Rust
use serde::{Deserialize, Serialize};
|
|
use specs::{Component, FlaggedStorage};
|
|
use specs_idvs::IdvStorage;
|
|
use vek::*;
|
|
|
|
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
|
|
pub struct LightEmitter {
|
|
pub col: Rgb<f32>,
|
|
pub strength: f32,
|
|
pub flicker: f32,
|
|
pub animated: bool,
|
|
}
|
|
|
|
impl Default for LightEmitter {
|
|
fn default() -> Self {
|
|
Self {
|
|
col: Rgb::one(),
|
|
strength: 1.0,
|
|
flicker: 0.0,
|
|
animated: false,
|
|
}
|
|
}
|
|
}
|
|
|
|
impl Component for LightEmitter {
|
|
type Storage = FlaggedStorage<Self, IdvStorage<Self>>;
|
|
}
|
|
|
|
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
|
|
pub struct LightAnimation {
|
|
pub offset: Vec3<f32>,
|
|
pub col: Rgb<f32>,
|
|
pub strength: f32,
|
|
}
|
|
|
|
impl Default for LightAnimation {
|
|
fn default() -> Self {
|
|
Self {
|
|
offset: Vec3::zero(),
|
|
col: Rgb::zero(),
|
|
strength: 0.0,
|
|
}
|
|
}
|
|
}
|
|
|
|
impl Component for LightAnimation {
|
|
type Storage = FlaggedStorage<Self, IdvStorage<Self>>;
|
|
}
|