-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GLJS-1120] Fix a blank map issue after WebGL context loss (internal-…
…2150)
- Loading branch information
Showing
8 changed files
with
222 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
148 changes: 148 additions & 0 deletions
148
test/integration/render-tests/context-restore/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"width": 128, | ||
"height": 128, | ||
"allowed": 0.003, | ||
"operations": [ | ||
["wait"], | ||
["forceContextRestart"], | ||
["wait"] | ||
] | ||
} | ||
}, | ||
"sprite": "local://sprites/sprite", | ||
"glyphs": "local://glyphs/{fontstack}/{range}.pbf", | ||
"models": { | ||
"maple1": "local://models/maple1-lod2.glb", | ||
"maple2": "local://models/maple2-lod2.glb", | ||
"oak1": "local://models/oak1-lod2.glb", | ||
"oak2": "local://models/oak2-lod2.glb" | ||
}, | ||
"sources": { | ||
"mapbox": { | ||
"type": "vector", | ||
"maxzoom": 15, | ||
"tiles": [ | ||
"local://tiles/{z}-{x}-{y}.vector.pbf" | ||
] | ||
}, | ||
"trees": { | ||
"type": "vector", | ||
"maxzoom": 15, | ||
"tiles": [ | ||
"local://tiles/trees/{z}-{x}-{y}.pbf" | ||
] | ||
}, | ||
"symbols": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": {}, | ||
"geometry": { | ||
"coordinates": [ | ||
-122.40258704262851, | ||
37.784333172276225 | ||
], | ||
"type": "Point" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "background", | ||
"type": "background", | ||
"paint": { | ||
"background-color": "lightgray" | ||
} | ||
}, | ||
{ | ||
"id": "land", | ||
"type": "fill", | ||
"source": "mapbox", | ||
"source-layer": "water", | ||
"paint": { | ||
"fill-color": "lightblue" | ||
} | ||
}, | ||
{ | ||
"id": "road", | ||
"type": "line", | ||
"source": "mapbox", | ||
"source-layer": "road", | ||
"paint": { | ||
"line-color": "lightyellow", | ||
"line-width": 10, | ||
"line-emissive-strength": 1 | ||
} | ||
}, | ||
{ | ||
"id": "tree-layer", | ||
"type": "model", | ||
"source": "trees", | ||
"source-layer": "trees", | ||
"layout" : { | ||
"model-id": | ||
["match", ["%", ["id"], 4], | ||
0, "maple1", | ||
1, "maple2", | ||
3, "oak1", | ||
"oak2"] | ||
}, | ||
"paint": { | ||
"model-rotation": ["match", ["%", ["id"], 4], | ||
0, ["literal", [0.0, 0.0, 0.0]], | ||
1, ["literal", [0.0, 0.0, 50.0]], | ||
2, ["literal", [10.0, 0.0, 120.0]], | ||
["literal", [0.0, -3.0, -60]]], | ||
"model-scale": ["match", ["%", ["id"], 3], | ||
0, ["literal", [3.0, 3.25, 3.0]], | ||
1, ["literal", [1.8, 1.9, 1.8]], | ||
["literal", [5.2, 5.1, 5.1]]], | ||
"model-color": [ | ||
"case", | ||
["boolean", ["feature-state", "hover"], false], | ||
"blue", | ||
["match", ["%", ["id"], 6], | ||
0, "orange", | ||
1, "gray", | ||
2, "white", | ||
3, "pink", | ||
4, "yellow", | ||
"green"] | ||
], | ||
"model-color-mix-intensity": 0.2, | ||
"model-cutoff-fade-range": 0.2 | ||
} | ||
}, | ||
{ | ||
"id": "geometry", | ||
"type": "symbol", | ||
"source": "symbols", | ||
"layout": { | ||
"icon-image": "rocket-12", | ||
"text-field": "Mapbox", | ||
"text-font": [ | ||
"Open Sans Semibold", | ||
"Arial Unicode MS Bold" | ||
], | ||
"text-allow-overlap": true, | ||
"text-ignore-placement": true, | ||
"text-offset": [0, 1] | ||
} | ||
} | ||
], | ||
"zoom": 15.1, | ||
"bearing": 264, | ||
"center": [ | ||
-122.4027, | ||
37.7845 | ||
] | ||
} |