XYZ Maps Documentation
    Preparing search index...

    Interface DirectionalLight

    The DirectionalLight interface represents directional lighting, which simulates light coming from a specific direction.

    interface DirectionalLight {
        color:
            | Color
            | StyleZoomRange<Color>
            | ((zoomlevel: number) => Color)
            | StyleExpression<Color>;
        direction: number[];
        intensity?: number;
        type: "directional";
    }

    Hierarchy

    • Light
      • DirectionalLight
    Index
    color:
        | Color
        | StyleZoomRange<Color>
        | ((zoomlevel: number) => Color)
        | StyleExpression<Color>

    The color of the light. Can be specified as a Color value, a StyleZoomRange<Color>, a function that returns a Color based on zoom level, or a StyleExpression<Color>.

    direction: number[]

    The direction of the light, represented as a vector. This determines the direction from which the light is coming.

    intensity?: number

    The intensity of the light. This property is optional and defaults to 1 if not specified.

    type: "directional"

    The type of light. For DirectionalLight, this is always 'directional'.