Keyless terrain reaches the renderer as quantized-mesh terrain

The contract's TerrainSpec gains quantizedMesh terrain: Cesium's tile
format in the folder at its url, heights above the ellipsoid. Without an
ion key the globe-port map engine asks for Re:Earth's keyless terrain as
it, where it asked for the ellipsoid, so the renderer
draws the same ground; without the terrain capability keeps the
ellipsoid. Cesium's globe port draws it through CesiumTerrainProvider with
the keyless terrain's retry policy.
This commit is contained in:
Sameh Khamis committed 2026-11-11 09:20:33 -08:00
1 parent c57e535275
commit 1f307e0735
9 files changed
+101 -17

No files matched your search

+29
View File
@@ -421,6 +421,35 @@ test('terrain: the ellipsoid with exaggeration; the last call wins', async () =>
await assert.rejects(flat.port.setTerrain({ kind: 'world' }), /no terrain/);
});
test('terrain: quantized mesh at its url, asked again when its host is busy', async (t) => {
const { scene, port } = setup();
const made = new Cesium.EllipsoidTerrainProvider();
const asked = [];
t.mock.method(Cesium.CesiumTerrainProvider, 'fromUrl', async (...args) => {
asked.push(args);
return made;
});
await port.setTerrain({
kind: 'quantizedMesh',
url: 'https://terrain.example/mesh',
exaggeration: 1.5,
});
assert.equal(scene.terrainProvider, made);
assert.equal(scene.verticalExaggeration, 1.5);
const [[resource, options]] = asked;
assert.equal(resource.url, 'https://terrain.example/mesh');
assert.ok(resource.retryAttempts > 0);
assert.equal(typeof resource.retryCallback, 'function');
assert.deepEqual(options, {
requestVertexNormals: false,
requestWaterMask: false,
});
await assert.rejects(
port.setTerrain({ kind: 'quantizedMesh' }),
/needs its url/,
);
});
test('setBase replaces the imagery and says what it drew', async () => {
const { scene, port } = setup();
const overlay = port.imagery.add({ kind: 'xyz', url: url('overlay') });