MapboxGL.Light
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MapboxGL.Light相关的知识,希望对你有一定的参考价值。
参考技术A灯光表示拉伸几何图形的光源
可自定义的样式属性
anchor
Whether extruded geometries are lit relative to the map or viewport.
enum
viewport
map - The position of the light source is aligned to the rotation of the map.<br />
光源的位置与地图的旋转对齐
viewport - The position of the light source is aligned to the rotation of the viewport.<br />
光源的位置与视口的旋转对齐
Parameters: zoom
position
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).
光源相对于照明(拉伸)几何图形的位置,在[r径向坐标,方位角,p极角]中,其中r表示从对象的底部的中心到其光的距离,a表示光相对于0°的位置(当 light.anchor 设置为‘viewport 时为0°时,对应于视口的顶部,或者当 light.anchor 设置为 map`时为0°,对应于正北,度顺时针进行),p表示光的高度(从0°,正上方,到180°,正下方)。
array<number>
[1.15,210,30]
Parameters: zoom
color
Color tint for lighting extruded geometries.
照明拉伸几何图形的颜色色调。
color
#ffffff
Parameters: zoom
intensity
Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.
照明强度(从0到1的刻度)。更高的数字将表现为更极端的对比。
number
0.5
0
1
Parameters: zoom
以上是关于MapboxGL.Light的主要内容,如果未能解决你的问题,请参考以下文章