#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum GroundPlaneMode {
#[default]
None,
ShadowOnly,
Tile,
SolidColour,
}
#[derive(Clone, Debug)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct GroundPlane {
pub mode: GroundPlaneMode,
pub height: f32,
pub colour: crate::colour::Colour,
pub tile_colour2: crate::colour::Colour,
pub tile_size: f32,
pub shadow_colour: crate::colour::Colour,
pub shadow_opacity: f32,
}
impl Default for GroundPlane {
fn default() -> Self {
Self {
mode: GroundPlaneMode::None,
height: 0.0,
colour: [1.0, 1.0, 1.0, 1.0].into(),
tile_colour2: [0.0, 0.0, 0.0, 1.0].into(),
tile_size: 1.0,
shadow_colour: [0.0, 0.0, 0.0, 1.0].into(),
shadow_opacity: 0.5,
}
}
}