-
Notifications
You must be signed in to change notification settings - Fork 3
/
scene.yaml
161 lines (156 loc) · 4.9 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
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
sources:
mapzen:
type: TopoJSON
url: https://tile.nextzen.org/tilezen/vector/v1/512/all/{z}/{x}/{y}.topojson
url_params:
api_key: LV_omJtLQV2Mx2ZdESsGlg # Kinkade-specific key
tile_size: 512
max_zoom: 15
normals:
type: Raster
# url: https://s3.amazonaws.com/elevation-tiles-prod/normal/{z}/{x}/{y}.png # direct S3 bucket access (256px tiles)
url: https://tile.nextzen.org/tilezen/terrain/v1/512/normal/{z}/{x}/{y}.png
url_params:
api_key: LV_omJtLQV2Mx2ZdESsGlg # Kinkade-specific key
tile_size: 512
max_zoom: 14
tile-boundaries:
type: Raster
url: empty.png
bounds: [-180, -90, 180, 90]
scene:
background:
color: white
textures:
spheremap:
element: "#kcanvas"
global:
lines: true
water: true
labels: true
styles:
hillshade:
base: polygons
raster: normal
lighting: false
shaders:
uniforms:
u_scale: .5
u_envmap: spheremap
blocks:
global: |
// Simplified view-independent environment map
vec4 applyEnvmap (in sampler2D _tex, in vec3 _normal, in float scale) {
_normal.z *= scale;
return texture2D(_tex, .5*(normalize(_normal).xy + 1.));
}
color: |
color = applyEnvmap(u_envmap, normal, u_scale);
dots:
base: lines
dash: [1, 1]
blend: add
dashes:
base: lines
dash: [1, 3]
layers:
earth:
data: { source: normals }
draw:
hillshade:
order: 0
water:
data: { source: mapzen }
draw:
polygons:
visible: global.water
order: 4
color: white
lines:
visible: global.lines
order: 3
color: [.3, .3, .3]
width: .5px
places:
data: { source: mapzen }
filter: { not: { kind: [neighbourhood] } }
countries:
filter: { kind: country }
draw:
points:
visible: global.labels
priority: 1
color: [0, 0, 0, 0]
size: 80px
text:
collide: false
anchor: center
visible: global.labels
font:
transform: uppercase
size: 10pt
family: Lucida Grande
fill: white
stroke:
color: black
width: 2px
cities:
filter: { not: { kind_detail: [country, state] } }
also:
filter:
any:
- $zoom: { min: 6, max: 8 }
- { labelrank: {min: 5}, $zoom: { max: 6 }}
- { population: { min: 100000 } , $zoom: {min: 8 } }
- { population: { min: 50000 } , $zoom: {min: 12 } }
draw:
points:
visible: global.labels
priority: 2
color: '#666'
size: 5px
outline:
width: .75px
color: white
text:
optional: false
font:
size: 8pt
family: Lucida Grande
fill: white
stroke:
color: black
width: 2px
states:
filter:
- kind_detail: state
$zoom: { min: 6 }
draw:
text:
visible: global.labels
priority: 3
font:
weight: bold
transform: uppercase
size: 10pt
family: Lucida Grande
fill: white
stroke:
color: black
width: 2px
boundaries:
data: { source: mapzen }
draw:
dots:
order: 5
visible: global.lines
color: [.25, .25, .25, .25]
width: 2px
background:
data: { source: tile-boundaries }
draw:
lines:
order: 0
tile_edges: true
color: gray
width: .5px