feat(globe): implement the engine on Cesium

createCesiumEngine wraps an existing viewer without changing it: camera, picker, projector, frames, render (through the render governor), surface, input, credits and maps, with geo values out and Cesium values in at the boundary. Map and surface code is shared with src/maps and services/groundSnap instead of copied. scripts/qa-globe-contract.mjs runs the contract suite against the engine in headless Chrome; the camera-events check now waits for the previous move to end, as Cesium's moveStart marks a move from rest.
This commit is contained in:
German Khokhlov committed 2026-10-15 17:43:05 +04:00
1 parent cd94a26b9f
commit d831cbd23a
33 files changed
+2374 -32

No files matched your search

+10 -1
View File
@@ -233,7 +233,16 @@ export function createContractSuite(
[
'camera events: changed, moveStart and moveEnd follow a move',
async () => {
await nadirView();
// moveStart marks a move from rest: let the nadir move end first
// (Cesium raises moveEnd only after cameraEventWaitTime, 500 ms).
let rested = 0;
const removeRest = camera.moveEnd.addEventListener(() => rested++);
try {
await nadirView();
await until(() => rested > 0, 'moveEnd after the nadir view');
} finally {
removeRest();
}
const previous = camera.percentageChanged;
const seen = { changed: 0, moveStart: 0, moveEnd: 0 };
const removers = Object.keys(seen).map((name) =>