Define the KHR_lights_punctual extension top level options.

interface GLTFLightsPunctual {
    lights?: {
        name?: string;
        color?: [number, number, number];
        intensity?: number;
        type: "directional" | "point" | "spot";
        range?: number;
        spot?: { innerConeAngle?: number; outerConeAngle?: number };
    }[];
}

Properties

Properties

lights?: {
    name?: string;
    color?: [number, number, number];
    intensity?: number;
    type: "directional" | "point" | "spot";
    range?: number;
    spot?: { innerConeAngle?: number; outerConeAngle?: number };
}[]

Array of available lights.

Type declaration

  • Optionalname?: string

    Name of the light. Default to ''.

  • Optionalcolor?: [number, number, number]

    RGB value for the light's color in linear space. Default to [1, 1, 1].

  • Optionalintensity?: number

    Brightness of the light. The units that this is defined in depend on the type of light. point and spot lights use luminous intensity in candela (lm/sr) while directional lights use illuminance in lux (lm/m2). Default to 1.

  • type: "directional" | "point" | "spot"

    Declares the type of the light.

  • Optionalrange?: number

    Hint defining a distance cutoff at which the light's intensity may be considered to have reached zero. Supported only for point and spot lights. Must be > 0. When undefined, range is assumed to be infinite.

  • Optionalspot?: { innerConeAngle?: number; outerConeAngle?: number }

    When a light's type is spot, this property on the light is required.

    • OptionalinnerConeAngle?: number

      Angle, in radians, from centre of spotlight where falloff begins. Must be greater than or equal to 0 and less than outerConeAngle. Default to 0.

    • OptionalouterConeAngle?: number

      Angle, in radians, from centre of spotlight where falloff ends. Must be greater than innerConeAngle and less than or equal to PI / 2.0. Default to PI / 4.0.