Give the Cesium renderer the contract's listener rules and error channel

Frame-phase and draw-set ready listeners now run in subscription order,
skip one removed during delivery, defer one added during it, and hand a
throw to the renderer's error listeners (or reportError) instead of into
Cesium's render loop. The renderer gains on('error' | 'contextLost' |
'contextRestored'); Cesium cannot restore a lost context, so it never sends
contextRestored. Dispose clears every list. renderer.listeners joins the
Cesium checks.
This commit is contained in:
Sameh Khamis committed 2026-11-05 18:18:28 -08:00
1 parent 2e0af3dc0d
commit 35a73b6fda
6 files changed
+144 -19

No files matched your search

+2 -1
View File
@@ -24,7 +24,7 @@ import { cesiumCapabilities, createCesiumPorts } from './ports.js';
* The members a transitional renderer has today.
* @typedef {Pick<import('../contract/renderer').Renderer,
* 'id' | 'contractVersion' | 'capabilities' | 'canvas' | 'frame' | 'draw'
* | 'camera' | 'query' | 'capture' | 'resize' | 'destroy'>}
* | 'camera' | 'query' | 'capture' | 'on' | 'resize' | 'destroy'>}
* TransitionalRenderer
*/
@@ -103,6 +103,7 @@ export function createCesiumRendererPlugin({
camera: ports.camera,
query: ports.query,
capture: ports.capture,
on: ports.on,
resize() {
viewer.resize();
},