forked from mapbox/mapbox-gl-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add debug toggle for terrain wireframe (mapbox#10406)
* Add terrain wireframe for debugging * Add docstring for terrain line grid * Lazily instantiate wireframe gl data * Swap overdraw and wireframe preprocessor order * Remove unused property from terrain * Clean up wireframe function naming * Fix linter errors * Fix linter and flow errors * Simplifiy rendering logic * Add a render test for wireframe * Clean up docstring wording * Increase pixelmatch allowance in wireframe test
- Loading branch information
Showing
10 changed files
with
192 additions
and
29 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
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.
55 changes: 55 additions & 0 deletions
55
test/integration/render-tests/terrain/wireframe/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,55 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"height": 256, | ||
"width": 256, | ||
"description": "In addition to terrain raster, verifies also toggling terrain off / on", | ||
"showTerrainWireframe": true, | ||
"allowed": 0.002, | ||
"operations": [ | ||
["wait"], | ||
["setTerrain", null], | ||
["wait"], | ||
["setTerrain", { | ||
"source": "rgbterrain" | ||
}], | ||
["wait"] | ||
] | ||
} | ||
}, | ||
"center": [-113.26903, 35.9654], | ||
"zoom": 11, | ||
"pitch": 35, | ||
"terrain": { | ||
"source": "rgbterrain" | ||
}, | ||
"sources": { | ||
"rgbterrain": { | ||
"type": "raster-dem", | ||
"tiles": [ | ||
"local:https://tiles/{z}-{x}-{y}.terrain.png" | ||
], | ||
"maxzoom": 15, | ||
"tileSize": 256 | ||
}, | ||
"satellite": { | ||
"type": "raster", | ||
"tiles": [ | ||
"local:https://tiles/{z}-{x}-{y}.satellite.png" | ||
], | ||
"maxzoom": 17, | ||
"tileSize": 256 | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "raster", | ||
"type": "raster", | ||
"source": "satellite", | ||
"paint": { | ||
"raster-fade-duration": 0 | ||
} | ||
} | ||
] | ||
} |