-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscene.yaml
114 lines (110 loc) · 3.22 KB
/
scene.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
sources:
elevation:
type: Raster
url: tiles/{z}/{x}/{y}.png
styles:
hillshade:
base: raster
shaders:
uniforms:
# set desired visible elevation range
u_max: 8900. # everest = 8848
u_min: 0. # sea level
# u_min: -11000. # challenger deep = -10916
# blocks:
# global: |
# float unpack(vec4 h) {
# // unpack data to range [-32768, 32768], the range in the raw data
# // "* 255." is necessary because each the GPU reads each channel as a range from 0 - 1
# // and we want it in a range from 0-255, as it was encoded in the raster image
# return (h.r * 256. + h.g + h.b / 256.) * 255. - 32768.;
# }
# color: |
# // unpack color and remove offset
# float height = unpack(color);
# // normalize to [0. - 1.]
# float new_value = (height - u_min)/(u_max - u_min);
# color.rgb = vec3(new_value);
# color.a = 1.0;
togglelines:
base: lines
blend: overlay
shaders:
uniforms:
u_alpha: .0
blocks:
color:
color.a *= u_alpha;
toggletext:
base: text
blend: overlay
shaders:
uniforms:
u_alpha: .0
blocks:
color:
color.a *= u_alpha;
layers:
terrain:
data: { source: elevation, layer: _default }
draw:
hillshade:
order: 0
terrain-high:
enabled: false
data: { source: elevation-high, layer: _default }
draw:
hillshade:
order: 1
water:
data: { source: elevation }
draw:
toggletext:
buffer: 30px
font:
family: Arial
size: 10px
fill: [0, .5, .5]
ocean:
filter:
kind: ocean
draw:
togglelines:
order: 2
width: 1.5px
color: [0, 1, 1]
other:
filter:
not:
kind: ocean
draw:
togglelines:
order: 2
width: .5px
color: [0, .5, .5]
boundaries:
data: { source: elevation }
country:
filter:
kind: country
draw:
togglelines:
order: 3
width: 1px
color: [0, 1, 1]
state:
filter:
kind: state
draw:
togglelines:
order: 3
width: 1px
color: [0, .5, .5]
places:
data: { source: elevation }
draw:
toggletext:
font:
family: Arial
size: 10px
fill: cyan