Base parameters used to create a SpotLight.

interface SpotLightBaseParams {
    label?: string;
    color?: Vec3;
    intensity?: number;
    position?: Vec3;
    target?: Vec3;
    angle?: number;
    penumbra?: number;
    range?: number;
    shadow?: ShadowBaseParams;
}

Hierarchy (View Summary)

Properties

label?: string

Optional label of the Light.

color?: Vec3

The Light color. Default to Vec3(1).

intensity?: number

The Light intensity. Default to 1.

position?: Vec3

The SpotLight position. Default to Vec3(1).

target?: Vec3

The SpotLight target. Default to Vec3(0).

angle?: number

Maximum angle of light dispersion from its direction whose upper bound is PI / 2. Default to PI / 3.

penumbra?: number

Percent of the spotlight cone that is attenuated due to penumbra. Takes values between 0 and 1. Default is 0.

range?: number

The SpotLight range, used to compute the SpotLight attenuation over distance. Default to 0.

The SpotLight shadow parameters used to create a SpotShadow. If not set, the SpotShadow won't be set as active and won't cast any shadows. On the other hand, if anything is passed (even an empty object), the SpotShadow will start casting shadows, so use with caution. Default to null (which means the SpotLight will not cast shadows).