pub struct StyleSpecLightProperties {
pub color: Option<String>,
pub intensity: Option<f32>,
pub direction: Option<[f32; 2]>,
pub cast_shadows: Option<bool>,
}Expand description
Unioned property bag for all light types.
Fields that do not apply to a given light type are silently ignored.
Fields§
§color: Option<String>Light colour as a CSS colour string (e.g. "white", "#ff8800").
Currently only "white" and "#rrggbb" hex are parsed.
Unrecognised values fall back to white.
intensity: Option<f32>Intensity multiplier.
direction: Option<[f32; 2]>[azimuth_deg, altitude_deg] for directional lights.
cast_shadows: Option<bool>Whether the directional light casts shadows.
Trait Implementations§
Source§impl Clone for StyleSpecLightProperties
impl Clone for StyleSpecLightProperties
Source§fn clone(&self) -> StyleSpecLightProperties
fn clone(&self) -> StyleSpecLightProperties
Returns a duplicate of the value. Read more
1.0.0 · 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 StyleSpecLightProperties
impl Debug for StyleSpecLightProperties
Source§impl Default for StyleSpecLightProperties
impl Default for StyleSpecLightProperties
Source§fn default() -> StyleSpecLightProperties
fn default() -> StyleSpecLightProperties
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StyleSpecLightProperties
impl<'de> Deserialize<'de> for StyleSpecLightProperties
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
Auto Trait Implementations§
impl Freeze for StyleSpecLightProperties
impl RefUnwindSafe for StyleSpecLightProperties
impl Send for StyleSpecLightProperties
impl Sync for StyleSpecLightProperties
impl Unpin for StyleSpecLightProperties
impl UnsafeUnpin for StyleSpecLightProperties
impl UnwindSafe for StyleSpecLightProperties
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