mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-11 13:52:19 +00:00
Check a released tileset by height, not by the source label
Cesium labels every scene hit, the globe included, as tiles, so asking that no answer is labelled tiles after leaving photoreal failed on the reference engine. The check now asks that no tile geometry answers above the terrain: a tile-labelled height must match the terrain height.
This commit is contained in:
1 parent
e98bf9c485
commit
697dc91e81
1 file changed
+9
-2
@@ -23,11 +23,18 @@ export function photorealChecks(engine, { settle }) {
|
||||
].filter(Boolean);
|
||||
await engine.maps.setPhotorealTiles(null);
|
||||
await settle();
|
||||
for (const place of places)
|
||||
// Cesium labels every scene hit, the globe included, as tiles; what
|
||||
// matters is that no tile geometry answers above the terrain.
|
||||
for (const place of places) {
|
||||
const sampled = engine.surface.sampleHeightDetailed(place);
|
||||
const terrain = engine.surface.terrainHeight(place);
|
||||
ensure(
|
||||
engine.surface.sampleHeightDetailed(place)?.source !== 'tiles',
|
||||
sampled?.source !== 'tiles' ||
|
||||
(Number.isFinite(terrain) &&
|
||||
Math.abs(sampled.height - terrain) <= 1),
|
||||
'released photoreal tiles still answer surface queries',
|
||||
);
|
||||
}
|
||||
},
|
||||
],
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user