enceladuss 0.0.3

Enceladus celestial simulation crate for the MilkyWay SolarSystem workspace
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct PlumeSpriteRenderer {
    pub reference_opacity: f64,
    pub scale_height_m: f64,
}

impl PlumeSpriteRenderer {
    pub fn ice_plume() -> Self {
        Self {
            reference_opacity: 0.15,
            scale_height_m: 100_000.0,
        }
    }

    pub fn opacity_at_height(&self, height_m: f64) -> f64 {
        self.reference_opacity * (-height_m / self.scale_height_m).exp()
    }
}