FlatLight
public struct FlatLight : Codable, StyleEncodable
A global directional light source which is only applied on 3D layers and hillshade layers. Using this type disables other light sources.
See also
Mapbox Style Specification-
Unique light name
Declaration
Swift
public let id: String -
Type of the light.
Declaration
Swift
public let type: LightType -
Color tint for lighting extruded geometries.
Declaration
Swift
public var color: Value<StyleColor>? -
Transition property for
colorDeclaration
Swift
public var colorTransition: StyleTransition? -
Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.
Declaration
Swift
public var intensity: Value<Double>? -
Transition property for
intensityDeclaration
Swift
public var intensityTransition: StyleTransition? -
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 degree (0 degree when
light.anchoris set toviewportcorresponds to the top of the viewport, or 0 degree whenlight.anchoris set tomapcorresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0 degree, directly above, to 180 degree, directly below).Declaration
Swift
public var position: Value<[Double]>? -
Transition property for
positionDeclaration
Swift
public var positionTransition: StyleTransition? -
Creates a new Flat light.
Declaration
Swift
public init(id: String = UUID().uuidString) -
Declaration
Swift
public func encode(to encoder: Encoder) throws -
Declaration
Swift
public init(from decoder: Decoder) throws
FlatLight Structure Reference