On this page

Type Alias LightSpecification

Index

Properties

anchor?: PropertyValueSpecification<"map" | "viewport">

Whether extruded geometries are lit relative to the map or viewport.

"viewport"
"map"

Color tint for lighting extruded geometries.

"#ffffff"
"color-transition"?: TransitionSpecification
intensity?: PropertyValueSpecification<number>

Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.

0.5
"intensity-transition"?: TransitionSpecification
position?: PropertyValueSpecification<[number, number, number]>

Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when light.anchor is set to viewport corresponds to the top of the viewport, or 0° when light.anchor is set to map corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).

[1.15, 210, 30]
[1.5, 90, 80]
"position-transition"?: TransitionSpecification
Was this helpful?
SDK JS
Reference
LightSpecification