Move the flights and military layers onto the renderer ports

The flights and military layers now reach the renderer only through its
ports: motion, queries, state, tracking, enrichment, evidence and policy
read the camera pose, project through the query port, request and
suspend frames through the frame port, and key per-frame caches on the
frames drawn rather than the scene's frame number. Policy is plain data,
the enrichment view test is pose-based, and the tracked aircraft is an
icon in a draw-port set with a plain holder standing in for the entity
that Cockpit, the tracked card and share links read.

The mesh floor sampler can sample through the query port, excluding
named draw sets, and both layers use it that way. A pick of another
layer's tracked icon is never taken for one of a layer's own contacts.

Twelve layer files leave the Cesium allow-list.
This commit is contained in:
Sameh Khamis committed 2026-11-07 18:49:23 -08:00
1 parent 00a0a0dbc7
commit 23d56f8393
40 files changed
+1638 -908

No files matched your search

+10 -6
View File
@@ -250,21 +250,25 @@ test('both flight layers keep a converted contact 2D and visible (render invaria
// 3. Every aircraftIcon() CALL SITE routes through the kind resolver, so no
// refresh path (poll reconciler, raster swap, presentation, tracked
// entity) can silently revert a conversion.
// billboard) can silently revert a conversion. The tracked billboard's
// sites share one helper; the fleet's live in aircraftIconLayer.js.
const code = stripComments(source);
const callSites = code.match(/aircraftIcon\(\s*[^;]*?\)/g) || [];
assert.equal(callSites.length >= 4, true, `${name}: expected the known aircraftIcon call sites`);
assert.equal(callSites.length >= 1, true, `${name}: expected the known aircraftIcon call sites`);
for (const call of callSites) {
assert.match(call, /aircraftIcon\(\s*\s*(?:(?:parts\.)?rendering\.)?_iconKind\(\s*/,
`${name}: ${call.replace(/\s+/g, ' ')} must resolve its sprite kind through _iconKind`);
}
// 4. Orientation contract is untouched: still a screen-projected rotation
// with alignedAxis ZERO, and no new per-frame CallbackProperty.
assert.match(source, /alignedAxis: Cesium\.Cartesian3\.ZERO/, `${name}: alignedAxis stays ZERO`);
assert.doesNotMatch(source, /isTr3b[\s\S]{0,200}new Cesium\.CallbackProperty/,
// 4. Orientation contract is untouched: the tracked billboard is still a
// screen-rotated icon, and no per-frame CallbackProperty is added.
assert.doesNotMatch(source, /new Cesium\.CallbackProperty/,
`${name}: the Easter egg adds no per-frame CallbackProperty`);
}
const tracked = stripComments(
await readFile(new URL('./trackedAircraftIcon.js', import.meta.url), 'utf8'),
);
assert.match(tracked, /rotationMode: 'screen'/, 'the tracked billboard rotates in screen space');
});
test('conversions are session-scoped and no lifecycle path clears them', async () => {