This is the technical documentation for Tangram’s lights. For a conceptual overview of the lighting system, see the Lights Overview.

Lights

The lights element is a top-level element in the scene file. Individual lights are defined by a light name under this element.

lights:mainlight:type:directional

Note: To have your map colors match your style colors exactly in all cases, do not specify any lights. In this case, the default light will be a directional light whose diffuse and ambient components have been tuned to exactly produce 100% illumination, while providing some shading on 3D-extruded features. In this way, 3D buildings will have shading, while the colors of all other flat features will precisely match their color declarations.

Light names

* For technical reasons, hyphens in light names are converted to underscores internally. Thus “light-1” becomes “light_1”. For this reason, you may not have two lights whose names are identical except for a hyphen in one case and an underscore in the same place in the other (eg “light-1” and “light_1”a) as they will be interpreted as the same name.

Common light parameters

type

Required string. One of ambient, directional, point, or spotlight. No default.