Skip to main content

Options

Fog, sky, light and terrain — each a spec and a property path. Created with kind options.

TypeClass
"fog"FogOptions
"light"LightOptions
"sky"SkyOptions
"terrain"TerrainOptions

"fog" — FogOptions

{"type": "fog"}
KeyTypeAlways requiredNotes
PropertyTypeAccessDescription
colorcolorread/writeReturns the fog color.
enabledbooleanread/writeReturns whether the fog is drawn at all.
highColorcolorread/writeReturns the color of the upper atmosphere.
horizonBlendnumberread/writeReturns how far up the sky the fog is blended in.
rangeEndnumberread/writeReturns where the fog reaches full strength.
rangeStartnumberread/writeReturns where the fog starts.
shaderSourcestringread/writeReturns the custom fog fragment shader source, or an empty string if the built-in blend is used.
spaceColorcolorread/writeReturns the color of the sky at the zenith, beyond the atmosphere.
starIntensitynumberread/writeReturns how brightly stars are drawn beyond the atmosphere.
verticalRangeEndnumberread/writeReturns the altitude the fog has fully faded out at.
verticalRangeStartnumberread/writeReturns the altitude the fog starts fading out at.

"light" — LightOptions

{"type": "light"}
KeyTypeAlways requiredNotes
PropertyTypeAccessDescription
ambientColorcolorread/writeReturns the ambient light color.
ambientIntensitynumberread/writeReturns the ambient light intensity.
dayCycleLightStopsstruct std::vector<massif::LightStop>read/writeReturns the day-cycle light curve - the "formula" an hour is turned into a look by.
dayCycleLightsEnabledbooleanread/writeReturns whether the sun's COLOURS follow its position.
dayCycleRisingLightStopsstruct std::vector<massif::LightStop>read/writeReturns the curve used while the sun is RISING, if the app set one.
shadowBiasnumberread/writeReturns the shadow depth bias scale.
shadowCascadesintegerread/writeReturns the number of shadow cascades.
shadowCasterMarginintegerread/writeReturns the shadow caster margin in tiles.
shadowDistancenumberread/writeReturns the shadow distance.
shadowMapSizeintegerread/writeReturns the shadow map resolution.
shadowNormalOffsetnumberread/writeReturns the shadow normal offset.
shadowSoftnessnumberread/writeReturns the shadow softness.
shadowStrengthnumberread/writeReturns the shadow strength.
sunAltitudenumberread/writeReturns the sun altitude in degrees above the horizon.
sunAzimuthnumberread/writeReturns the sun azimuth in degrees.
sunColorcolorread/writeReturns the sun (directional light) color.
sunIntensitynumberread/writeReturns the sun light intensity.
sunOverridingStylebooleanread/writeReturns whether this sun overrides the one a style states.
terrainLightingEnabledbooleanread/writeReturns whether the sun lights the 3D terrain surface.

"sky" — SkyOptions

{"type": "sky"}
KeyTypeAlways requiredNotes
PropertyTypeAccessDescription
atmosphereColorcolorread/writeReturns the tint applied to Rayleigh scattering.
atmosphereLuminancenumberread/writeReturns the exposure applied to the scattered light.
atmosphereSunIntensitynumberread/writeReturns the brightness of the sun driving the atmosphere.
enabledbooleanread/writeReturns whether the shader sky is enabled.
groundColorcolorread/writeReturns the ground color.
haloColorcolorread/writeReturns the tint applied to Mie scattering.
horizonBlendnumberread/writeReturns the angular blend width between the horizon color and the sky color.
horizonColorcolorread/writeReturns the horizon color.
qualityenumread/writeReturns how finely the atmosphere is integrated.
shaderSourcestringread/writeReturns the custom sky fragment shader source, or an empty string if the built-in shader is used.
skyColorcolorread/writeReturns the zenith sky color.
sunDiscEnabledbooleanread/writeReturns whether the built-in shader draws a sun disc.
typeenumread/writeReturns what the sky pass draws.

"terrain" — TerrainOptions

{"type": "terrain", "source":}
KeyTypeAlways requiredNotes
sourceobject std::shared_ptr<TileDataSource>yesan id of kind source, or an inline spec
PropertyTypeAccessDescription
autoFlattenDurationnumberread/writeReturns how long the terrain takes to sink flat.
autoFlattenParallaxnumberread/writeReturns the screen parallax below which the terrain renders flat.
autoFlattenRiseDurationnumberread/writeReturns how long the terrain takes to rise back into 3D.
autoFlattenTiltnumberread/writeReturns the tilt at or above which the terrain renders flat.
backgroundColorcolorread/writeReturns the terrain background color.
billboardOcclusionEnabledbooleanread/writeReturns the billboard/label terrain occlusion state.
billboardOcclusionTolerancenumberread/writeReturns the billboard/label terrain occlusion tolerance.
bridges3DEnabledbooleanread/writeReturns whether bridges and tunnels stand on their own chord (3D bridges).
cameraClampDurationnumberread/writeReturns the duration of the camera terrain-following correction animation.
cameraClearancenumberread/writeReturns the camera terrain clearance floor: an explicit minimum height the camera is kept above the terrain surface, in meters.
depthBiasnumberread/writeReturns the clip-space depth bias used when depth-testing draped 2D geometry against the terrain.
drapeCacheSizeintegerread/writeReturns the drape cache budget in megabytes.
drapeFillsEnabledbooleanread/writeReturns whether polygon fills are draped as a render-to-texture surface.
drapeLinesEnabledbooleanread/writeReturns whether vt tile lines are also draped (in addition to fills).
drapeResolutionintegerread/writeReturns the per-tile drape texture resolution, 0 when it follows the screen.
drapeWorkingSetintegerread/writeReturns how many drape tiles the automatic resolution assumes are cached at once.
elevationPrefetchEnabledbooleanread/writeReturns whether elevation tile prefetching is enabled.
enabledbooleanread/writeReturns the enabled state of the terrain.
exaggerationnumberread/writeReturns the terrain height exaggeration factor.
flattenModeenumread/writeReturns how far a flattened terrain goes back towards a plain 2D map.
flattenRationumberread/writeReturns how far the terrain is flattened right now, 0 (full 3D) to 1 (flat).
flattenedbooleanread/writeReturns whether the map is asked to render flat. This is the 2D/3D state, whether it was set by the app or by auto-flattening; the switch itself is animated, so for a moment after a change the map is still on its way there.
maxTileZoomCoarseningintegerread/writeReturns how many zoom levels below the camera a tile may coarsen to.
maxTileZoomOffsetintegerread/writeReturns the maximum visible tile zoom offset, relative to the camera zoom level.
meshResolutionintegerread/writeReturns the terrain mesh resolution.
minZoomintegerread/writeReturns the minimum tile zoom level with 3D terrain.
noDrapeLayerFilterstringread/writeReturns the style layers that are kept out of the terrain drape bake.
seamlessTileEdgesEnabledbooleanread/writeReturns whether seamless tile edge handling is enabled.
surfaceShaderSourcestringread/writeReturns the custom terrain surface fragment shader source, or an empty string if no shaded surface is drawn.
switchingbooleanread-onlyReturns whether the switch is holding the ground flat while the tiles 3D needs load.
textOcclusionOpacitynumberread/writeReturns the opacity a label keeps while its anchor is behind 3D content.
tileEdgeStitchingEnabledbooleanread/writeReturns whether cross-LOD tile edge stitching is enabled.
viewDistancenumberread/writeReturns the minimum view distance, in meters.
viewDistanceFactornumberread/writeReturns the factor applied to the view distance.