Pre-load orbital imagery ahead from the Cesium renderer

A narrow, nadir-looking camera moving over the ground asks the base
imagery for the tiles 5 to 20 s ahead, as the orbital view did from 16x
before it moved onto the renderer contract. The renderer works it out
from its own camera: field of view, look and motion over the ground.
This commit is contained in:
Sameh Khamis committed 2026-11-10 01:46:41 -08:00
1 parent e48ed3eb9e
commit 40a0dce951
5 files changed
+639 -7

No files matched your search

+3
View File
@@ -1,5 +1,6 @@
import * as Cesium from 'cesium';
import { applyModelAtmosphereWorkaround } from '../../app/atmosphereCompat.js';
import { preloadImageryAhead } from './imageryLookAhead.js';
import { StarrySky } from './starrySky.js';
/**
@@ -89,6 +90,8 @@ export function createApplicationViewer({ container, creditContainer }) {
if (globalThis.matchMedia?.('(pointer: coarse)').matches)
viewer.scene.screenSpaceCameraController.zoomFactor *= 3;
limitZoomOut(viewer);
// A narrow view carried along an orbit outruns the imagery under it.
preloadImageryAhead(viewer);
// Before any tile builds a draw command: Cesium's per-vertex model
// atmosphere fails to LINK on Apple's Metal backend and kills the
// render loop. See app/atmosphereCompat.js.