Draw nine layers' fills through engine.ground, one display each

Earthquakes, air quality, GNSS Integrity, fire perimeters, Prohibited &
Restricted Airspace, Active Fires, S2 GhostMaps, cyclone advisories and
submarine cables each have one render/display.js on the globe contract;
their render/cesium* and render/navara* files go. Their discs, cells,
polygons and corridors are engine.ground sets, so on Navara they come from
the one ground screen pass with exact colours instead of nine hand-written
classification passes and lit SDK vector layers. Cesium's look stays the
reference:

- Earthquake and air-quality discs have no outline (Cesium drew none on
  clamped ellipses); earthquake discs can now be picked on Navara too.
- Perimeters, drone zones and GhostMaps polygons outline their outer
  ring only, as Cesium did.
- GNSS cells stay out of the pick pass; cyclone cones, tracks and centres
  are culled by a port of Cesium's horizon occluder.
- Submarine cables are one ground corridor set, as Cesium batched them;
  landing points, tips and stems are movers and lines.
- FIRMS glows are a sprite set and its cells a ground set. The far-zoom
  heat raster, which no primitive draws yet, sits behind one seam,
  render/heatField.js, with a Cesium and a Navara backend.

The shared Navara ground helpers that only these layers used go
(navaraGroundCells, the cell and ground geometry, the zone renderers), as
does the ground prototype script.

Coupling: layer renderer lines fall from 1636/6953 to 1011/4832
(Cesium/Navara), Navara ground passes from 7 to 5, Cesium-importing files
from 65 to 53, engine.extensions reads from 26 to 19.
This commit is contained in:
German Khokhlov committed 2026-11-07 06:20:48 +04:00
1 parent 974a0b6361
commit 54fe0aea40
124 files changed
+8407 -9576

No files matched your search

+7 -20
View File
@@ -1,28 +1,23 @@
import * as Cesium from 'cesium';
import { rendererFor } from './renderers.js';
import {
createFirmsCesiumRenderer,
projectFirmsWindow,
firmsHorizonOccluder,
FIRMS_LEFT_CLICK,
} from '../../layers/firms/render/cesium.js';
import { createFirmsHeatmapLayer as createLayer } from '../../layers/firms/index.js';
import * as render from '../../renderGovernor.js';
import * as sprites from '../../data/spriteOrder.js';
import * as context from '../../data/contextStore.js';
import * as picking from '../../data/pickRegistry.js';
import * as overlays from '../../overlays/worldOverlay.js';
import * as focus from '../../worldFocus.js';
export const firmsServices = {
render,
sprites,
context,
picking,
overlays,
focus,
};
/** Bind a supplied fire feed to the application scene service owners. */
/**
* Bind a supplied fire feed to the application scene service owners; it
* draws with the engine's renderer from the registry (render/display.js on
* every engine).
*/
export function createApplicationFirms({ surface, ...options }) {
return createLayer({
...options,
@@ -31,22 +26,14 @@ export function createApplicationFirms({ surface, ...options }) {
feed: options.feed,
services: { ...firmsServices, anchors: surface.anchors },
renderer: options.renderer ?? {
create: ({ engine = null, ...renderOptions }) =>
engine
? rendererFor('local-firms', engine, renderOptions)
: createFirmsCesiumRenderer(null, renderOptions),
create: ({ engine, ...renderOptions }) =>
rendererFor('local-firms', engine, renderOptions),
},
projectToWindow: options.projectToWindow ?? projectFirmsWindow,
horizonOccluder: options.horizonOccluder ?? firmsHorizonOccluder,
leftClickEventType: options.leftClickEventType ?? FIRMS_LEFT_CLICK,
overlayHost: options.overlayHost ?? {
setEntries: overlays.setOverlayEntries,
setVisible: overlays.setOverlaySourceVisible,
clearSource: overlays.clearOverlaySource,
hitTest: overlays.hitTestWorldOverlay,
},
screenSpaceEventHandlerFactory:
options.screenSpaceEventHandlerFactory ??
((viewer) => new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas)),
});
}