Complete the Cesium frame port

The frame port now does everything the contract asks of it on Cesium:
preUpdate says whether the tick draws (Cesium's own render test, read
live until the tick is over), holds are counted per reason, and suspend,
target fps, renderNow and diagnostics are real. Releasing the last hold
asks for one more frame.

whenSettled also waits until Cesium stops redrawing on its own. Each
request or worker task Cesium completes queues a redraw (a terrain
picker build after the camera moved, say), which no loading flag shows,
so it now waits for quiet frames and then a short stretch in which the
loop draws nothing by itself. It is bounded by its timeout, names a
stopped loop, and ends on destroy.

The app renderer still leaves out the members that steer the loop:
the render governor and the page's visibility handling own those
settings until they move onto the port.

The new frame.prediction check compares the preUpdate answer with what
each tick drew.
This commit is contained in:
Sameh Khamis committed 2026-11-05 17:11:25 -08:00
1 parent 1a9bdd9b63
commit e6d22e55d7
11 files changed
+842 -55

No files matched your search

+3 -2
View File
@@ -96,8 +96,9 @@ export interface Renderer {
*/
readPixels(options?: { crop?: ScreenRect; scale?: number }): ImageData;
/**
* Resolves once what is in view has loaded, or the timeout passes, or a
* load failed for good. `blockers` names what was still loading or
* Resolves once what is in view has loaded and the last presented frame
* shows it (no redraw of the renderer's own is pending), or the timeout
* passes, or a load failed for good. `blockers` names what was still loading or
* failed (`'tiles'`, `'imagery:<id>'`, `'models'`, ...); empty when settled.
*/
whenSettled(options?: { timeoutMs?: number }): Promise<SettleResult>;