mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-15 15:52:21 +00:00
Draw vessels, satellites, Space Missions, ALPR, bikeshare and OSM Places through one display each
Each layer now has one render/display.js on the globe contract, the same factory on both engines; its render/cesium* and render/navara* files go. Cesium's behaviour is the reference, and the logic that was written twice is written once: - AIS vessels: atlas chevrons and engine.lines trails. The display registers the gev-trail pick claim itself and its trailing visibility pass now also runs on Navara. - Satellites: point banks per look, orbit rings as lines turned by their model matrix, and selection and follow through engine.camera.follow. The emulated _viewer is gone, and the tracked readout republishes card text on Navara too. - Space Missions: dots, reticle, trajectories and tactical orbits as movers and lines. The layer keeps its own records instead of Entities and DataSources, and camera work goes through engine.camera. Clicks go through the selection dispatcher, and hover keeps Cesium's throttle. The pad zone is its rim only: the contract has no surface fill yet. - ALPR, bikeshare and OSM Places: one display and, for bikeshare, one style module each; clicks through engine.input, no ScreenSpaceEventHandler or EntityCluster. ALPR keeps Navara's horizon cull, and OSM Places points sample the surface where Cesium clamped them. Coupling: layer renderer lines fall from 4546/11106 to 2638/8735 (Cesium/Navara), `viewer` lines from 2209 to 2014, ScreenSpaceEventHandler files from 20 to 15.
This commit is contained in:
1 parent
3e261d1baf
commit
f06b93fbc9
120 files changed
+6626
-6998
No files matched your search
@@ -151,8 +151,8 @@ export function createLifecycle({
|
||||
},
|
||||
|
||||
/**
|
||||
* Creates the engine's vessel renderer (render/*.js), its sprite
|
||||
* collection, the click rule and the per-frame pass.
|
||||
* Creates the engine's vessel display (render/display.js), its chevron
|
||||
* bank, the click rule and the per-frame pass.
|
||||
* @param {object|null} viewer The Cesium viewer (null on an engine
|
||||
* without one).
|
||||
* @param {{ engine?: object }} [context] LayerLifecycle's context.
|
||||
@@ -281,15 +281,9 @@ export function createLifecycle({
|
||||
},
|
||||
};
|
||||
|
||||
/** The engine's vessel renderer (the Cesium one without an engine). */
|
||||
/** The engine's vessel display (none without an engine). */
|
||||
function createRenderer(viewer, engine) {
|
||||
return (
|
||||
services.renderer?.create({
|
||||
viewer,
|
||||
engine,
|
||||
createTrail: services.trails?.createTrail ?? null,
|
||||
}) ?? null
|
||||
);
|
||||
return services.renderer?.create({ viewer, engine }) ?? null;
|
||||
}
|
||||
|
||||
function bindVisibleScene(activeViewer, scene) {
|
||||
@@ -317,10 +311,7 @@ export function createLifecycle({
|
||||
}
|
||||
|
||||
function detachFleet() {
|
||||
const fleet = state.renderer?.fleet;
|
||||
if (fleet?.collection)
|
||||
services.sprites.unregisterSpriteCollection?.('ais', fleet.collection);
|
||||
fleet?.detach();
|
||||
state.renderer?.fleet.detach();
|
||||
}
|
||||
|
||||
function removeViewListener() {
|
||||
|
||||
Reference in new issue
Block a user