Embed views and the application shell leave the Cesium allow-list

The embed views fly through rendererOf's camera port with geo maths, and
the panel render loop that keeps an inline panel drawing moves into the
Cesium adapter (src/render/cesium/panelRendering.js); the application
scene hands it to the embed views as `keepRendering`. The shell reaches
the camera, effects and globe through rendererOf and loads no Cesium
factories; whether Cockpit's aircraft is an entity of the viewer's own
comes from the scene's `viewerDrawsEntity`, wired in through the
controls. Callers handing the shell or the application tools a viewer
of their own load ./render/cesium/unbound once, as the ports' unbound
check now records.
This commit is contained in:
Sameh Khamis committed 2026-11-09 12:43:36 -08:00
1 parent e6d9ec0636
commit 26665e8390
16 files changed
+222 -185

No files matched your search

+20 -8
View File
@@ -49,13 +49,11 @@ const UNBOUND = 'src/render/cesium/unbound.js';
/**
* Entries that take their Cesium code injected: the module named here is
* GEV's Cesium side for them, and must load the factories. Given another, the
* entry's flight finds no camera (`findCamera`) and does nothing. Visual
* settings are given their viewer by the application shell, which loads
* both factories; without it, their styles keep records and draw nothing.
* entry's flight finds no camera (`findCamera`) and does nothing. None is
* left: visual settings, once given their viewer by the application shell,
* now leave the factories to their caller as the shell does.
*/
const INJECTED = {
'./ui/visual-settings': 'src/ui/applicationShell.js',
};
const INJECTED = {};
/**
* Modules whose use of the bridge holds up without the factory: with no
@@ -141,6 +139,10 @@ const DRAW_FROM_CALLER = new Set([
// eye and shade the globe through the ports alone.
'./application/layers',
'./standalone/catalog',
// The application's tools (scene director, annotations, embed views):
// they draw, fly and take clicks through the ports; only Import's pins
// (`src/data/geoImportPins.js`, still on the Cesium list) drive Cesium.
'./application/tools',
]);
/**
@@ -174,6 +176,16 @@ const CAMERA_FROM_CALLER = new Set([
// It shows its source's credit through `findCredits`, and switches stacks
// through the map engine that `./render/cesium/unbound` provides too.
'./maps/controller',
// The application shell and what assembles it: their controls fly, read
// the eye, shade the globe and set styles through the ports alone; the
// application's renderer is bound to its viewer, and a viewer of the
// renderer bound gets its ports from `./render/cesium/unbound`.
'./ui/shell',
'./ui/composition',
'./ui/hud',
'./ui/visual-settings',
'./application/controls',
'./application/data',
]);
const pkg = JSON.parse(readFileSync(path.join(root, 'package.json'), 'utf8'));
@@ -343,8 +355,8 @@ function checkLookupFactory(
);
}
test('every public entry that reaches a findEffects caller loads the unbound effects factory', () => {
checkLookupFactory('findEffects', EFFECTS_FACTORY);
test('every public entry that reaches a findEffects caller loads the unbound effects factory, or its caller can', () => {
checkLookupFactory('findEffects', EFFECTS_FACTORY, { fromCaller: true });
});
test('every public entry that reaches a findGlobe caller loads the unbound globe factory', () => {