Struct gltf_json::extensions::scene::khr_lights_punctual::Light
source · pub struct Light {
pub color: [f32; 3],
pub extensions: Option<Box<RawValue>>,
pub extras: Extras,
pub intensity: f32,
pub name: Option<String>,
pub range: Option<f32>,
pub spot: Option<Spot>,
pub type_: Checked<Type>,
}
Fields§
§color: [f32; 3]
Color of the light source.
extensions: Option<Box<RawValue>>
Extension specific data.
extras: Extras
Optional application specific data.
intensity: f32
Intensity of the light source. point
and spot
lights use luminous intensity
in candela (lm/sr) while directional
lights use illuminance in lux (lm/m^2).
name: Option<String>
Optional user-defined name for this object.
range: Option<f32>
A distance cutoff at which the light’s intensity may be considered to have reached zero.
spot: Option<Spot>
Spot light parameters.
type_: Checked<Type>
Specifies the light type.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Light
impl<'de> Deserialize<'de> for Light
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 RefUnwindSafe for Light
impl Send for Light
impl Sync for Light
impl Unpin for Light
impl UnwindSafe for Light
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