pub struct LightConfig {
pub mode: LightingMode,
pub ambient: AmbientLight,
pub directional: DirectionalLight,
pub shadow: ShadowConfig,
}Expand description
Top-level lighting configuration.
Combines an ambient and directional light into a single config that
can be set via the API or parsed from a style document’s "lights"
array.
Default values produce the same visual result as the hardcoded sun direction that was previously baked into the fill-extrusion and model shaders.
Fields§
§mode: LightingModeLighting mode. Default: LightingMode::Default.
ambient: AmbientLightAmbient light parameters.
directional: DirectionalLightDirectional light parameters.
shadow: ShadowConfigShadow map configuration (used when DirectionalLight::cast_shadows
is true).
Trait Implementations§
Source§impl Clone for LightConfig
impl Clone for LightConfig
Source§fn clone(&self) -> LightConfig
fn clone(&self) -> LightConfig
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 LightConfig
impl Debug for LightConfig
Source§impl Default for LightConfig
impl Default for LightConfig
Source§fn default() -> LightConfig
fn default() -> LightConfig
Returns the “default value” for a type. Read more
Source§impl PartialEq for LightConfig
impl PartialEq for LightConfig
impl StructuralPartialEq for LightConfig
Auto Trait Implementations§
impl Freeze for LightConfig
impl RefUnwindSafe for LightConfig
impl Send for LightConfig
impl Sync for LightConfig
impl Unpin for LightConfig
impl UnsafeUnpin for LightConfig
impl UnwindSafe for LightConfig
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