pub struct LightObject {
pub light: Light,
pub kind: LightKind,
pub distance: f64,
pub decay: f64,
pub angle: f64,
pub penumbra: f64,
pub ground_color: Color,
pub sh: SphericalHarmonics3,
pub target: Option<ObjectRef>,
pub cast_shadow: bool,
pub shadow: Option<Box<LightShadow>>,
}Expand description
Fields§
§light: LightThe color/intensity state common to every light kind.
kind: LightKindWhich Light subclass this is.
distance: f64PointLight.distance / SpotLight.distance — the cutoff distance, 0
meaning no cutoff. The shader calls it cutoffDistance.
decay: f64PointLight.decay / SpotLight.decay, default 2.
angle: f64SpotLight.angle, in radians.
penumbra: f64SpotLight.penumbra.
ground_color: ColorHemisphereLight.groundColor.
sh: SphericalHarmonics3LightProbe.sh — the probe’s irradiance as order-2 spherical
harmonics. All zero, and unread, on every other kind.
target: Option<ObjectRef>SpotLight.target / DirectionalLight.target — an Object3D at the
origin by default, never added to the scene, so its matrixWorld is
just its local matrix.
cast_shadow: boolObject3D.castShadow.
shadow: Option<Box<LightShadow>>light.shadow — present for the shadow-casting light types. Boxed
because the shadow owns a camera, which owns an Object3D, which can
own a light.
Implementations§
Trait Implementations§
Source§impl Clone for LightObject
SpotLight.copy() / DirectionalLight.copy() clone the target rather
than sharing it, because the target is a real Object3D with its own
transform.
impl Clone for LightObject
SpotLight.copy() / DirectionalLight.copy() clone the target rather
than sharing it, because the target is a real Object3D with its own
transform.