pub struct StyleSpecSky {
pub sky_type: Option<String>,
pub sun_position: Option<[f32; 2]>,
pub sun_intensity: Option<f32>,
pub atmosphere_color: Option<String>,
pub halo_color: Option<String>,
pub opacity: Option<f32>,
}Expand description
Top-level "sky" configuration in the style-spec.
Follows the Mapbox GL JS v3 convention:
"sky": {
"sky-type": "atmosphere",
"sky-atmosphere-sun": [210, 45],
"sky-atmosphere-sun-intensity": 10,
"sky-atmosphere-color": "white",
"sky-atmosphere-halo-color": "white",
"sky-opacity": 1.0
}Fields§
§sky_type: Option<String>"atmosphere" or "gradient". Default: "atmosphere".
sun_position: Option<[f32; 2]>Sun position as [azimuth_deg, altitude_deg].
sun_intensity: Option<f32>Sun brightness multiplier (0–100).
atmosphere_color: Option<String>Tint for Rayleigh scattering (CSS colour string).
halo_color: Option<String>Tint for Mie scattering / halo (CSS colour string).
opacity: Option<f32>Overall sky opacity (0–1).
Trait Implementations§
Source§impl Clone for StyleSpecSky
impl Clone for StyleSpecSky
Source§fn clone(&self) -> StyleSpecSky
fn clone(&self) -> StyleSpecSky
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 StyleSpecSky
impl Debug for StyleSpecSky
Source§impl Default for StyleSpecSky
impl Default for StyleSpecSky
Source§fn default() -> StyleSpecSky
fn default() -> StyleSpecSky
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StyleSpecSky
impl<'de> Deserialize<'de> for StyleSpecSky
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 StyleSpecSky
impl RefUnwindSafe for StyleSpecSky
impl Send for StyleSpecSky
impl Sync for StyleSpecSky
impl Unpin for StyleSpecSky
impl UnsafeUnpin for StyleSpecSky
impl UnwindSafe for StyleSpecSky
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