mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 16:52:20 +00:00
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:
1 parent
974a0b6361
commit
54fe0aea40
124 files changed
+8407
-9576
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { fromDegrees } from '../../geo/cartesian3.js';
|
||||
import { toDegrees } from '../../geo/math.js';
|
||||
import { createAirQualityCesiumRenderer } from './render/cesium.js';
|
||||
import { createAirQualityDisplay } from './render/display.js';
|
||||
import { msg, t, tn } from '../../i18n/index.js';
|
||||
import { translateFeedError } from '../../ui/statusText.js';
|
||||
import {
|
||||
@@ -28,7 +28,7 @@ const READOUT_LIMIT = 5;
|
||||
export function createAirQualityLayer({
|
||||
source,
|
||||
overlayHost,
|
||||
createRenderer = createAirQualityCesiumRenderer,
|
||||
createRenderer = ({ engine }) => createAirQualityDisplay(engine),
|
||||
} = {}) {
|
||||
if (typeof source?.getSnapshot !== 'function')
|
||||
throw new TypeError('Air quality requires a snapshot source');
|
||||
@@ -69,7 +69,7 @@ export function createAirQualityLayer({
|
||||
throw new Error('Air quality layer is already initialized');
|
||||
initialized = true;
|
||||
try {
|
||||
if (viewer || engine) this.attachRenderer(viewer, { engine });
|
||||
if (engine) this.attachRenderer(viewer, { engine });
|
||||
} catch (error) {
|
||||
this.destroy();
|
||||
throw error;
|
||||
@@ -79,7 +79,7 @@ export function createAirQualityLayer({
|
||||
attachRenderer(viewer, { engine = null } = {}) {
|
||||
if (!initialized || renderer)
|
||||
throw new Error('Invalid air quality scene attachment');
|
||||
renderer = createRenderer({ viewer, engine });
|
||||
renderer = createRenderer({ engine });
|
||||
renderer.setVisible(_enabled);
|
||||
overlayHost.setVisible(AIR_QUALITY_OVERLAY_SOURCE_ID, _enabled);
|
||||
if (_readings.length) this._render();
|
||||
@@ -139,7 +139,7 @@ export function createAirQualityLayer({
|
||||
}
|
||||
},
|
||||
|
||||
/** Rebuild entities and overlay labels from the current readings. */
|
||||
/** Redraw the station discs and overlay labels from the current readings. */
|
||||
_render() {
|
||||
if (!renderer) return;
|
||||
renderer.replace(_readings, STATION_MARKER_RADIUS_M);
|
||||
|
||||
Reference in new issue
Block a user