pub struct SkySettings {
pub procedural: bool,
pub time: f32,
pub speed: f32,
pub clouds: f32,
pub cloud_speed: f32,
pub stars: f32,
pub haze: f32,
pub moon_phase: f32,
pub aurora: f32,
pub milky_way: f32,
}Expand description
Serializable procedural sky, celestial lighting and day/night animation controls.
Fields§
§procedural: boolDraw the procedural sky (and light the scene from it) instead of a flat colour.
time: f32Hour of day, 0..24 (12 = noon).
speed: f32Game hours that pass per real second while playing (0 = frozen, 1 = a day in 24 s).
clouds: f320 = clear, 1 = overcast.
cloud_speed: f32Cloud pattern scrolling speed used by the sky shader.
stars: f32Star brightness at night, 0..1.
haze: f32Air haze, 0 (crystal clear) .. 1 (hazy, milky horizon).
moon_phase: f32Moon phase: 0 new, 0.5 full, 1 new again.
aurora: f32Northern-lights strength at night, 0..1.
milky_way: f32Milky way brightness at night, 0..1.
Trait Implementations§
Source§impl Clone for SkySettings
impl Clone for SkySettings
Source§fn clone(&self) -> SkySettings
fn clone(&self) -> SkySettings
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SkySettings
impl Debug for SkySettings
Source§impl Default for SkySettings
impl Default for SkySettings
Source§impl<'de> Deserialize<'de> for SkySettingswhere
SkySettings: Default,
impl<'de> Deserialize<'de> for SkySettingswhere
SkySettings: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SkySettings
impl PartialEq for SkySettings
Source§impl Serialize for SkySettings
impl Serialize for SkySettings
impl StructuralPartialEq for SkySettings
Auto Trait Implementations§
impl Freeze for SkySettings
impl RefUnwindSafe for SkySettings
impl Send for SkySettings
impl Sync for SkySettings
impl Unpin for SkySettings
impl UnsafeUnpin for SkySettings
impl UnwindSafe for SkySettings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeSync for T
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.