Keep the scene command trim in the Cesium adapter and take its installer off the Cesium list

The private-field trim of Cesium's reused per-pass command arrays moves to
src/render/cesium/sceneCommandRelease.js. The installer waits for the
renderer frame port's postRender after each layer disable and calls a trim
the application scene hands over, so it no longer touches the Cesium scene.
This commit is contained in:
Sameh Khamis committed 2026-11-07 05:29:57 -08:00
1 parent 71ff682c7f
commit b9248bfce5
10 files changed
+226 -170

No files matched your search

+5 -1
View File
@@ -43,7 +43,11 @@ await app.destroy();
```
The example's containers and three remaining constructors are supplied by the
consumer. The viewer helper preserves the standalone viewer's render settings;
caller. The standalone scene also returns `trimStaleCommands()`, which drops
the draw commands the Cesium scene keeps after a turned-off layer stops drawing;
the application tools call it one frame after each layer disable. A scene
without it keeps those commands, and so the layer's memory, until they are
overwritten. The viewer helper preserves the standalone viewer's render settings;
it neither selects map sources nor reads keys. Supply a visible credit container
and retain all attribution required by the chosen sources. Cesium is external to
this export: the consuming build must provide the same instance used elsewhere
+5 -3
View File
@@ -2416,9 +2416,11 @@ which embeds the MAP_KEY.
> so a turned-off layer's entities stayed reachable (Data Centers kept 116
> MiB). `src/sceneCommandRelease.js`, installed in `src/app/tools.js`,
> requests one frame through `governorRequestRender` after every layer
> disable and then trims those arrays. It reads private Cesium fields through
> `src/render/cesium/internals.js`; `src/sceneCommandRelease.test.mjs` pins
> them and fails if Cesium renames them or changes which passes it truncates.
> disable and then has `src/render/cesium/sceneCommandRelease.js` (handed
> over by `src/app/scene.js`) trim those arrays. It reads private Cesium
> fields through `src/render/cesium/internals.js`;
> `src/render/cesium/sceneCommandRelease.test.mjs` pins them and fails if
> Cesium renames them or changes which passes it truncates.
> **2026-08-08 — performance waves 1+2:** the app idles via an explicit render
> governor (`src/renderGovernor.js` — hold/release from every per-frame