-
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.
Add background-pitch-alignment property (internal-1862)
* Add background-pitch-alignment property * Add support for rendering background-pattern with viewport pitch alignment * Add test for viewport background with terrain
- Loading branch information
Showing
21 changed files
with
537 additions
and
12 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
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
Binary file added
BIN
+160 KB
...-tests/background-pitch-alignment/pattern-viewport-alignment-globe/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions
43
...ation/render-tests/background-pitch-alignment/pattern-viewport-alignment-globe/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,43 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"width": 512, | ||
"height": 256, | ||
"allowed": 0.0006, | ||
"operations": [ | ||
["setProjection", "globe"], | ||
["wait"] | ||
] | ||
} | ||
}, | ||
"sprite": "local://sprites/emerald", | ||
"sources": { | ||
"satellite": { | ||
"type": "raster", | ||
"tiles": [ | ||
"local://tiles/{z}-{x}-{y}.satellite.png" | ||
], | ||
"tileSize": 256 | ||
} | ||
}, | ||
"fog": {}, | ||
"layers": [ | ||
{ | ||
"id": "satellite", | ||
"type": "raster", | ||
"source": "satellite", | ||
"paint": { | ||
"raster-fade-duration": 0 | ||
} | ||
}, | ||
{ | ||
"id": "background", | ||
"type": "background", | ||
"paint": { | ||
"background-pitch-alignment": "viewport", | ||
"background-pattern": "cemetery_icon" | ||
} | ||
} | ||
] | ||
} |
Binary file added
BIN
+195 KB
...n/render-tests/background-pitch-alignment/viewport-alignment-globe/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions
43
test/integration/render-tests/background-pitch-alignment/viewport-alignment-globe/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,43 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"width": 512, | ||
"height": 512, | ||
"allowed": 0.0006, | ||
"operations": [ | ||
["setProjection", "globe"], | ||
["wait"] | ||
] | ||
} | ||
}, | ||
"sources": { | ||
"satellite": { | ||
"type": "raster", | ||
"tiles": [ | ||
"local://tiles/{z}-{x}-{y}.satellite.png" | ||
], | ||
"tileSize": 256 | ||
} | ||
}, | ||
"fog": {}, | ||
"layers": [ | ||
{ | ||
"id": "satellite", | ||
"type": "raster", | ||
"source": "satellite", | ||
"paint": { | ||
"raster-fade-duration": 0 | ||
} | ||
}, | ||
{ | ||
"id": "background", | ||
"type": "background", | ||
"paint": { | ||
"background-color": "yellow", | ||
"background-opacity": 0.5, | ||
"background-pitch-alignment": "viewport" | ||
} | ||
} | ||
] | ||
} |
Binary file added
BIN
+273 KB
...ts/background-pitch-alignment/viewport-alignment-mercator-low-zoom/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions
42
...n/render-tests/background-pitch-alignment/viewport-alignment-mercator-low-zoom/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,42 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"width": 512, | ||
"height": 512, | ||
"allowed": 0.0006, | ||
"operations": [ | ||
["wait"] | ||
] | ||
} | ||
}, | ||
"sources": { | ||
"satellite": { | ||
"type": "raster", | ||
"tiles": [ | ||
"local://tiles/{z}-{x}-{y}.satellite.png" | ||
], | ||
"tileSize": 256 | ||
} | ||
}, | ||
"fog": {}, | ||
"layers": [ | ||
{ | ||
"id": "satellite", | ||
"type": "raster", | ||
"source": "satellite", | ||
"paint": { | ||
"raster-fade-duration": 0 | ||
} | ||
}, | ||
{ | ||
"id": "background", | ||
"type": "background", | ||
"paint": { | ||
"background-color": "yellow", | ||
"background-opacity": 0.5, | ||
"background-pitch-alignment": "viewport" | ||
} | ||
} | ||
] | ||
} |
Binary file added
BIN
+46.1 KB
...background-pitch-alignment/viewport-alignment-with-fill-extrusions/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.