Nano WebGPU API - v0.11.0
    Preparing search index...

    Interface SpotLightOptions

    Configuration options specific to spotlight sources.

    interface SpotLightOptions {
        castShadow?: boolean;
        color?: number[] | ColorLike;
        innerAngle?: number;
        intensity?: number;
        outerAngle?: number;
        position?: Vec3 | number[];
        range?: number;
        rotation?: Vec3 | number[];
        rotationDegrees?: Vec3 | number[];
        shadowBias?: number;
        shadowMapSize?: number;
        shadowNear?: number;
        usePCF?: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    castShadow?: boolean

    If true, the spotlight will cast shadows and generate a perspective depth map. Defaults to true.

    color?: number[] | ColorLike

    Color of emitted light. Can be a Color instance, hex string, or RGB array. Defaults to #ffffff.

    innerAngle?: number

    Spotlight inner cone angle in degrees. Defaults to 30.0.

    intensity?: number

    Scalar multiplier for light emission intensity. Defaults to 1.0.

    outerAngle?: number

    Spotlight outer cone angle in degrees. Defaults to 45.0.

    position?: Vec3 | number[]

    Optional initial position of the light node in 3D space.

    range?: number

    Physical limit at which spotlight attenuation falls to zero. Defaults to 20.0.

    rotation?: Vec3 | number[]

    Optional initial rotation Euler angles in radians.

    rotationDegrees?: Vec3 | number[]

    Optional initial rotation Euler angles in degrees.

    shadowBias?: number

    Custom depth bias to avoid shadow acne or peter panning. Defaults to 0.00001.

    shadowMapSize?: number

    Resolution width/height of the shadow map texture. Defaults to 2048.

    shadowNear?: number

    Near clipping plane for perspective shadow projection. Defaults to 0.1.

    usePCF?: boolean

    Toggle Percentage-Closer Filtering (PCF) to smooth out shadow edges. Defaults to true.