Cut duplicated and dead code across the engines, the layers and the QA scripts

- src/geo drops the ported debug argument checks and the tests that
  bitExact already covers; package boundaries accept a directory entry,
  so src/geo/ is listed once per group.
- Cesium no longer carries movers and lines nobody draws with: they are
  optional engine capabilities. The fake engine and the Cesium camera use
  the shared cameraMath; unused contract tables, clock.ticked, the
  'finest' surface detail and Navara click statistics are gone.
- ALPR keeps one overlay core and one presentation model for both
  engines, bikeshare one station bookkeeping, the Navara ground effects
  one definition helper; image atlases, view centres, mover banks and
  colours are shared.
- The legacy switch route, the clock offset and rate controls and other
  unused exports are removed.
- The acceptance runs the Navara draw, geo import and scope checks;
  scenarios use the harness switch and page helpers; the main chunk
  check keeps the size budget only and runs once in CI.
This commit is contained in:
German Khokhlov committed 2026-11-05 13:32:39 +04:00
1 parent c502404e1d
commit 7abf74518f
272 files changed
+4828 -10213

No files matched your search

+1 -1
View File
@@ -115,7 +115,7 @@ export function createLifecycle({
const renderer = flightState._renderer;
flightState.enabled = true;
renderer?.fleet.setVisible(true);
if (renderer) holdContinuousRender('flights'); // per-frame animator (perf wave 2)
if (renderer) holdContinuousRender('flights'); // per-frame animator
renderer?.models.setVisible(true);
parts.tracking._setCockpitContactMode(
globalThis.document?.body.classList.contains('cockpit-mode') === true,
+7 -18
View File
@@ -1,22 +1,11 @@
// The civil flights layer's renderer on the Navara engine: the shared
// aircraft renderer (src/layers/aircraft/render/navara.js) with the flights'
// sprite slot (drawn over the other contact layers, as data/spriteOrder
// orders them on Cesium) and airplane.glb's nose offset. Registered for
// 'navara' by the Navara mode after its import() (src/app/navaraMode.js).
// aircraft renderer with airplane.glb's nose offset. Registered for 'navara'
// by the Navara mode after its import() (src/app/navaraMode.js).
import { createAircraftNavaraRenderer } from '../../aircraft/render/navara.js';
import { SPRITE_LAYER_ORDER } from '../../../data/spriteOrder.js';
import { aircraftLayerNavaraRenderer } from '../../aircraft/render/navara.js';
import { MODEL_HEADING_OFFSET_DEG } from '../policy.js';
/**
* Registry factory (src/app/layers/renderers.js): `(engine, options)`.
* @param {import('../../../globe/contract.js').GlobeEngine} engine
*/
export function createFlightsNavaraRenderer(engine) {
return createAircraftNavaraRenderer({
engine,
layerId: 'flights',
order: SPRITE_LAYER_ORDER.indexOf('flights'),
headingOffsetDeg: MODEL_HEADING_OFFSET_DEG,
});
}
export const createFlightsNavaraRenderer = aircraftLayerNavaraRenderer(
'flights',
MODEL_HEADING_OFFSET_DEG,
);
+4 -7
View File
@@ -1,8 +1,7 @@
// The flights logic draws only through its renderer (phase 3 Task 10a): with
// a renderer that is plain data (no Cesium), the layer builds its fleet,
// selects a contact on a click through the engine's selection dispatcher,
// tracks and follows it, and releases it on an empty click. This is the seam
// the Navara renderer (Task 10b) plugs into.
// The flights logic draws only through its renderer: with a renderer that
// is plain data (no Cesium), the layer builds its fleet, selects a contact
// on a click through the engine's selection dispatcher, tracks and follows
// it, and releases it on an empty click.
import test from 'node:test';
import assert from 'node:assert/strict';
@@ -12,7 +11,6 @@ import { createApplicationFlights } from '../../app/layers/flights.js';
import { defaultSurface } from '../../data/surfaceServices.js';
import * as militaryRegistry from '../../data/militaryRegistry.js';
import { openSkySnapshot } from '../../sources/live/aircraft.js';
import { missingAircraftRendererMembers } from '../aircraft/render/contract.js';
import { Rgba } from '../shared/color.js';
import { recordingAircraftRenderer as recordingRenderer } from '../../testSupport/aircraftRecordingRenderer.mjs';
@@ -78,7 +76,6 @@ test('the flights logic draws, selects and follows only through its renderer', a
},
});
layer.init(null, { engine });
assert.deepEqual(missingAircraftRendererMembers(renderer), []);
layer.enable();
try {
await layer.update(null);
+1 -1
View File
@@ -32,7 +32,7 @@ export function createFlightSnapshotRenderer({
// Reclassify if the category resolved/changed (first extended poll);
// a ground flip (landing/takeoff) re-scales the SAME billboard in
// place — the transition is a restyle, never a removal.
// Round 5: depth policy is uniform (always depth-test-free, see
// The depth policy is uniform (always depth-test-free, see
// _groundDepthDistance) — nothing to flip on landing/takeoff.
// Position AND rotation are owned by the fleet pass (_fleetTick);
// course changes land on the next rotation pass (forced below).
+4 -4
View File
@@ -399,7 +399,7 @@ export function createTracking({
// 12 Hz icon instead of lagging ~1 s behind it.
if (!flightState._trailHeadEntity && flightState._renderer) {
flightState._trailHeadEntity = flightState._renderer.trails.createHead({
// 'gev-trail' namespace (round 6): claimed by trailRenderer's pick
// 'gev-trail' namespace: claimed by trailRenderer's pick
// owner so a click on the head segment never reads as empty space.
id: `gev-trail:fl-head-${++flightState._trailHeadSeq}`,
show: !flightState._cockpitContactMode,
@@ -441,9 +441,9 @@ export function createTracking({
return [from, geo.cartesian3.clone(head)];
},
width: 2.5,
// Round 4: the head must never vanish into the mesh either (dimmed
// when occluded so depth still reads); round 8: geodesic, consistent
// with the trail body (no chords).
// The head must never vanish into the mesh either (dimmed when
// occluded so depth still reads); geodesic, consistent with the
// trail body (no chords).
color: TRAIL_COLOR,
});
}