Merge origin/main into german/navara

Main's work since the last merge runs on the globe contract where this
branch draws through it:

- Satellites take main's classes, sensors, ground-track bearings and
  world time through contract points and rings; launches take the world
  timeline. The satellite's cockpit subject dims, copies positions and
  refocuses through the contract.
- Flights, military and vessels keep main's photos, retry cool-downs,
  world-clock motion and the ship bridge. Trail seeding in the shared
  aircraft tracking reads each layer's clock.
- Traffic's flow lines and single build draw as ground sets; transit
  keeps dated credits and the new cities; CCTV opens the nearest camera,
  and the Quebec overlay projects and tests the horizon through the
  contract. Bikeshare's manager cleanup moved into its current lifecycle.
- Draw keeps main's mark actions across engine switches.
- The world clock in src/time is plain numbers again: Julian dates come
  from src/geo, the frame loop is injected, and the binding to Cesium's
  viewer clock lives in src/globe/cesium/worldTime.js. Navara's sky and
  sun follow the world time; live feeds keep the real time.
- The cockpit's orbital view, with its sensor zoom, ground focus and
  satellite switching, stays Cesium-only for now: Navara hides its entry.
  Its Cesium calls live in src/globe/cesium/orbital.js. The ship bridge's
  finest-detail waterline sampling is Cesium-only too; Navara samples
  loaded geometry and detailed terrain. Both are in KNOWN-ISSUES.
- Main's tests that built a Cesium scene by hand run on the fake engine.
- The boundary manifest is regenerated, the coupling baseline records
  the orbital and bridge code, and the main-chunk baseline is raised to
  the merged size: main itself grew its main chunk by 93,959 bytes
  (gzip -9) since the previous merge base.
This commit is contained in:
German Khokhlov committed 2026-11-10 13:52:52 +04:00
commit 2a761aa5eb
452 files changed
+73437 -1752

No files matched your search

+31
View File
@@ -2,6 +2,8 @@ import assert from 'node:assert/strict';
import { test } from 'node:test';
import { createLifecycle } from './lifecycle.js';
import { createState } from './state.js';
import { createNavigation } from './navigation.js';
import { createFakeEngine } from '../../globe/testing/fakeEngine.js';
function setup(t, { failMarkers = false } = {}) {
const noop = () => {};
@@ -120,3 +122,32 @@ test('destroy releases focus-appearance callbacks even without prior disable', (
h.layer.destroy();
assert.equal(released, 1);
});
test('enabling CCTV opens nearest to the engine camera and preserves a restored selection', (t) => {
const { state, parts, layer } = setup(t);
const engine = createFakeEngine({ latitude: 0, longitude: 1 });
t.after(() => engine.destroy());
state._records = [
{ camera: { id: 'far', lat: 0, lon: 0 } },
{ camera: { id: 'near', lat: 0, lon: 180 / Math.PI } },
];
parts.renderer = {
cameraCartographic: () => engine.camera.pose().cartographic,
destroy() {},
hideCredit() {},
};
parts.model = {
haversineKm: (_lat, lon, _otherLat, otherLon) => Math.abs(lon - otherLon),
};
parts.navigation = createNavigation({ state, parts });
layer.showRenderer = () => {};
layer.enable();
assert.equal(state._activeCameraId, 'near');
assert.equal(state._openingCameraProvisional, true);
state._activeCameraId = 'far';
state._openingCameraProvisional = false;
layer.enable();
assert.equal(state._activeCameraId, 'far');
assert.equal(state._openingCameraProvisional, false);
state._enabled = false;
});