Skip to content

Commit e095cef

Browse files
akoylasargithub-actions[bot]
authored andcommitted
Fix bug in border update logic of fill-extrusion layer, overriding clip
layer's behaviour. GitOrigin-RevId: bfe9e50fb7304de609cde0ab5dc269802081e8a9
1 parent 3f1c36c commit e095cef

8 files changed

Lines changed: 201 additions & 1 deletion

File tree

src/data/bucket/fill_extrusion_bucket.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1566,7 +1566,7 @@ class FillExtrusionBucket implements BucketWithGroundEffect {
15661566

15671567
showCentroid(borderCentroidData: BorderCentroidData) {
15681568
const c = this.centroidData[borderCentroidData.centroidDataIndex];
1569-
c.flags &= ~HIDDEN_BY_REPLACEMENT;
1569+
c.flags &= HIDDEN_BY_REPLACEMENT;
15701570
c.centroidXY.x = 0;
15711571
c.centroidXY.y = 0;
15721572
this.writeCentroidToBuffer(c);
10.9 KB
Loading
Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
{
2+
"version": 8,
3+
"metadata": {
4+
"test": {
5+
"allowed": 0.00154,
6+
"width": 512,
7+
"height": 512,
8+
"debug": true,
9+
"operations": [
10+
["wait"],
11+
[
12+
"addSource",
13+
"eraser",
14+
{
15+
"type": "geojson",
16+
"maxzoom": 14,
17+
"data": {
18+
"type": "FeatureCollection",
19+
"features": [
20+
{
21+
"type": "Feature",
22+
"geometry": {
23+
"type": "Polygon",
24+
"coordinates": [
25+
[
26+
[
27+
-157.92600779195274,
28+
21.341941343290916
29+
],
30+
[
31+
-157.91797550482153,
32+
21.341047443455746
33+
],
34+
[
35+
-157.91872098959996,
36+
21.3345038655
37+
],
38+
[
39+
-157.91848310419996,
40+
21.3341645199
41+
],
42+
[
43+
-157.91029843959998,
44+
21.3328320538
45+
],
46+
[
47+
-157.9105821302,
48+
21.331357833899993
49+
],
50+
[
51+
-157.90968337269996,
52+
21.3302523502
53+
],
54+
[
55+
-157.91378252579995,
56+
21.3278046585
57+
],
58+
[
59+
-157.92938628859994,
60+
21.327854769499993
61+
],
62+
[
63+
-157.9291823668,
64+
21.3339016093
65+
],
66+
[
67+
-157.9272551422,
68+
21.334814034399997
69+
],
70+
[
71+
-157.92600779195274,
72+
21.341941343290916
73+
]
74+
]
75+
]
76+
}
77+
}
78+
]
79+
}
80+
}
81+
],
82+
["wait"],
83+
[
84+
"addLayer",
85+
{
86+
"id": "eraser",
87+
"type": "clip",
88+
"source": "eraser",
89+
"layout": {
90+
"clip-layer-types": [
91+
"symbol",
92+
"model"
93+
]
94+
}
95+
}
96+
],
97+
["wait"],
98+
[
99+
"addLayer",
100+
{
101+
"id": "eraserd",
102+
"type": "fill",
103+
"source": "eraser",
104+
"paint": {
105+
"fill-color": "rgba(255, 0, 0, 0.1)"
106+
}
107+
}
108+
],
109+
["wait"]
110+
]
111+
}
112+
},
113+
"lights": [
114+
{
115+
"type": "ambient",
116+
"id": "environment"
117+
},
118+
{
119+
"type": "directional",
120+
"id": "sun_light",
121+
"properties": {
122+
"cast-shadows": true,
123+
"intensity": 0.8599999904632569,
124+
"direction": [
125+
311.9219970703125,
126+
82.37799835205078
127+
]
128+
}
129+
}
130+
],
131+
"sources": {
132+
"composite": {
133+
"type": "vector",
134+
"maxzoom": 16,
135+
"tiles": [
136+
"local://tiles/{z}-{x}-{y}.vector.pbf"
137+
]
138+
}
139+
},
140+
"zoom": 16.32,
141+
"pitch": 67,
142+
"bearing": 165.2,
143+
"center": [
144+
-157.924486,
145+
21.335822
146+
],
147+
"layers": [
148+
{
149+
"type": "background",
150+
"paint": {
151+
"background-color": [
152+
"interpolate",
153+
[
154+
"linear"
155+
],
156+
[
157+
"zoom"
158+
],
159+
11.0,
160+
[
161+
"rgba",
162+
239.00001525878907,
163+
233.00001525878907,
164+
225.00001525878907,
165+
1.0
166+
],
167+
13.0,
168+
[
169+
"rgba",
170+
230.00001525878907,
171+
228.00001525878907,
172+
224.00001525878907,
173+
1.0
174+
]
175+
]
176+
},
177+
"id": "land"
178+
},
179+
{
180+
"id": "extrusion",
181+
"type": "fill-extrusion",
182+
"source": "composite",
183+
"source-layer": "building",
184+
"minzoom": 15,
185+
"filter": [
186+
"all",
187+
[ "==", [ "get", "extrude" ], "true" ],
188+
[ "==", [ "get", "underground" ], "false" ]
189+
],
190+
"paint": {
191+
"fill-extrusion-color": "white",
192+
"fill-extrusion-height": [
193+
"get",
194+
"height"
195+
],
196+
"fill-extrusion-opacity": 1.0
197+
}
198+
}
199+
]
200+
}
13.2 KB
Binary file not shown.
17.3 KB
Binary file not shown.
6.2 KB
Binary file not shown.
28.9 KB
Binary file not shown.
7.59 KB
Binary file not shown.

0 commit comments

Comments
 (0)