This repository was archived by the owner on Mar 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscene.yml
237 lines (225 loc) · 7.42 KB
/
scene.yml
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
cameras:
perspective:
type: perspective
vanishing_point: [0, -500]
lights:
directional1:
type: directional
direction: [.1, .5, -1]
diffuse: .7
ambient: .5
scene:
background:
color: &land-color '#f8f7f1'
styles:
flatlines:
base: lines
lighting: false # ignore lights
flatpolys:
base: polygons
lighting: false # ignore lights
flattext:
base: text
lighting: false
# This needs to be rendered on top of other lines, so we prefix the name with 0
0railway:
base: lines
dash: [7, 7]
buildings:
base: polygons
shaders:
blocks:
color: |
color.rgb *= vec3(min((worldPosition().z*.001 + .78),1.2));
sources:
clear:
type: MVT
url: https://tangram-clear-demo.openmapbook.org/{z}/{x}/{y}.pbf
max_zoom: 16
layers:
water:
data: { source: clear}
draw:
flatpolys:
order: 600
color: '#e0ebff'
transportation:
data: { source: clear}
filter:
$geometry: line
motorway:
filter:
class: [motorway]
draw:
flatlines:
order: 600
color: &motorway-fill '#aab9d9'
width: function () { return 0.15*Math.exp(0.25*$zoom) * 156250*Math.exp(-$zoom*0.69) }
outline:
color: '#789fde'
width: &road-casing 1.5px
flattext:
font:
family: Helvetica
fill: black
size: 11px
stroke:
color: *motorway-fill
width: 1.5px
ramp:
filter:
ramp: [true]
draw:
flatlines:
color: '#b7c7e7'
width: function () { return 0.2*Math.exp(0.19*$zoom) * 156250*Math.exp(-$zoom*0.69) }
outline:
color: '#86acec'
width: &ramp-casing 1px
major:
filter:
- class: trunk
$zoom: {min: 4}
- class: primary
$zoom: {min: 8}
- class: secondary
$zoom: {min: 12}
draw:
flatlines:
order: 600
color: &major-fill '#fee5b9'
width: function () { return 0.14*Math.exp(0.23*$zoom) * 156250*Math.exp(-$zoom*0.69) }
outline:
color: '#eac168'
width: *road-casing
flattext:
font:
family: Helvetica
fill: black
size: 11px
stroke:
color: *major-fill
width: 1.5px
lessmajor:
filter:
- class: primary
$zoom: {min: 5, max: 8}
- class: secondary
$zoom: {min: 8, max: 12}
- class: tertiary
$zoom: {min: 12}
draw:
flatlines:
order: 600
color: '#f5eaa6'
width: function () { return 0.11*Math.exp(0.22*$zoom) * 156250*Math.exp(-$zoom*0.69) }
outline:
color: &lessmajor-fill '#d5c953'
width: *road-casing
flattext:
font:
family: Helvetica
fill: black
size: 11px
stroke:
color: *lessmajor-fill
width: 1.5px
minor:
filter:
- class: primary
$zoom: {min: 4, max: 5}
- class: secondary
$zoom: {min: 6, max: 8}
- class: tertiary
$zoom: {min: 8, max: 12}
- class: [minor, unknown]
$zoom: {min: 12}
draw:
flatlines:
order: 600
color: &minor-fill '#ffffff'
width: function () { return 0.10*Math.exp(0.20*$zoom) * 156250*Math.exp(-$zoom*0.69) }
outline:
color: &minor-casing '#aaaaaa'
width: *road-casing
flattext:
font:
family: Helvetica
fill: black
size: 11px
stroke:
color: *minor-fill
width: 1.5px
service:
filter:
- class: service
$zoom: {min: 15}
draw:
flatlines:
order: 600
color: *minor-fill
width: function () { return 0.09*Math.exp(0.18*$zoom) * 156250*Math.exp(-$zoom*0.69) }
outline:
color: *minor-casing
width: *road-casing
track:
filter:
- class: track
$zoom: {min: 15}
draw:
flatlines:
order: 600
color: '#ffffff'
width: function () { return 0.09*Math.exp(0.18*$zoom) * 156250*Math.exp(-$zoom*0.69) }
outline:
color: '#aaaaaa'
width: *road-casing
path:
filter:
- class: path
$zoom: {min: 15}
draw:
flatlines:
order: 600
color: '#bbb'
width: function () { return 0.09*Math.exp(0.18*$zoom) * 156250*Math.exp(-$zoom*0.69) }
outline:
color: '#999'
width: *road-casing
train:
filter:
- class: rail
$zoom: {min: 5, max: 10}
- class: narrow_gauge
$zoom: {min: 6, max: 10}
draw:
flatlines:
order: 600
color: &rail-outer-color '#888'
width: function () { return 0.06*Math.exp(0.33*$zoom) * 156250*Math.exp(-$zoom*0.69) }
hz-train:
filter:
- class: [rail, narrow_gauge]
$zoom: {min: 5}
draw:
0railway:
order: 600
color: white'
width: 2px
flatlines:
order: 600
color: '#888'
width: 4px
buildings:
data: { source: clear }
filter: { $zoom: { min: 14 } }
draw:
polygons:
order: 50
color: '#E3DBDB'
extruded:
filter: { $zoom: { min: 15 } }
draw:
polygons:
style: buildings
extrude: function () { return feature.height > 0 || $zoom >= 16; }