Run the Navara paths without the Cesium SDK, and load it on demand for the features that still build on it

Every Cesium read that a Navara page made was surveyed with the strict acceptance (GEV_QA_CESIUM_TRAP=record). Math on those paths now uses src/geo: screen annotations, weather and wind center readings, cyclone picks, scene data pack polygons and images (new navaraGeometry.js), the awareness subject, the orbit offset of camera verbs, voice frame_overhead, the agent world packet and Directions colours and ground picks. The celestial ring's Sun and Moon come from a bit-identical port of Cesium's Simon1994 model, JulianDate and TEME rotation (src/geo/simon1994.js, julianDate.js, transforms.js); a Cesium globe still applies its ICRF rotation once loaded.

Traffic, Street Level, the Nepal event and locator and geo import build on Cesium's math or entity model on either globe; their enable (or the import) now loads the SDK first through src/app/loadCesium.js, synchronously when it is already there. A production page guards the global so a missed read is reported and starts the load. No module reads Cesium while it loads (scripts/check-cesium-load-time.mjs, run by npm test). Cesium.js is still loaded by index.html here.
This commit is contained in:
German Khokhlov committed 2026-11-04 17:15:21 +04:00
1 parent f87da8523e
commit b8305de14b
58 files changed
+2130 -325

No files matched your search

+6 -2
View File
@@ -2,10 +2,11 @@ import * as geo from './geo/index.js';
import { createCelestialView } from './celestialRing/view.js';
import { engineFromViewer } from './globe/cesium/engineFromViewer.js';
import {
createCelestialEphemeris,
cesiumIcrfToFixed,
projectCelestialPoint,
flyCelestialViewer,
} from './celestialRing/render/cesium.js';
import { createCelestialEphemeris } from './celestialRing/ephemeris.js';
import { appClock } from './time/clock.js';
import { governorRequestRender } from './renderGovernor.js';
@@ -431,7 +432,10 @@ export class CelestialRing {
this._moonFixed = geo.cartesian3.create();
this._toCenter = geo.cartesian3.create();
this._screenCenter = geo.cartesian2.create();
this._ephemeris = createCelestialEphemeris();
// A Cesium viewer's ICRF rotation; an engine (Navara) takes the TEME one.
this._ephemeris = createCelestialEphemeris(
viewer?.kind ? {} : { icrfToFixed: cesiumIcrfToFixed },
);
this._initView(store);
this._removePostRender = this.viewer.scene.postRender.addEventListener(() =>