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

+5 -25
View File
@@ -1,6 +1,6 @@
import * as geo from '../../geo/index.js';
import { msg, t } from '../../i18n/index.js';
import { createZonesCesiumRenderer } from '../shared/render/cesiumZones.js';
import { createDroneAirspaceDisplay } from './render/display.js';
import {
DRONE_AIRSPACE_OVERLAY_SOURCE_ID,
droneAirspaceAnchorDegrees,
@@ -11,20 +11,6 @@ export { normalizeDroneAirspaceSnapshot } from './records.js';
export { createDroneAirspaceSource } from './source.js';
export * from './cards.js';
/** The zones on a Cesium globe (the default renderer). */
export function createDroneAirspaceCesiumRenderer({
viewer,
screenSpaceEventHandlerFactory,
}) {
return createZonesCesiumRenderer({
viewer,
screenSpaceEventHandlerFactory,
name: 'drone-airspace',
idPrefix: 'drone-airspace',
colorOf: (row) => droneAirspaceAccent(row.typeCode),
});
}
/**
* FNV-1a over a zone's rings: a short, deterministic fingerprint so a
* boundary change with unchanged attributes still alters the refresh signature.
@@ -50,10 +36,9 @@ const CARD_HOST_OPTIONS = Object.freeze({
export function createDroneAirspaceLayer({
source,
overlayHost = null,
screenSpaceEventHandlerFactory = null,
picking = null,
pointer = null,
createRenderer = createDroneAirspaceCesiumRenderer,
createRenderer = ({ engine }) => createDroneAirspaceDisplay(engine),
} = {}) {
if (typeof source?.getSnapshot !== 'function')
throw new TypeError('Drone airspace requires a snapshot source');
@@ -74,8 +59,7 @@ export function createDroneAirspaceLayer({
/** @type {Map<string, {stableId: string, anchor: {lon: number, lat: number}}>} */
const _rowById = new Map();
const canSelect = () =>
overlayHost && screenSpaceEventHandlerFactory && picking;
const canSelect = () => overlayHost && picking;
function publishSelectedCard() {
if (!canSelect() || !renderer) return;
@@ -172,7 +156,7 @@ export function createDroneAirspaceLayer({
throw new Error('Drone airspace 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;
@@ -184,11 +168,7 @@ export function createDroneAirspaceLayer({
attachRenderer(viewer, { engine = null } = {}) {
if (!initialized || renderer)
throw new Error('Invalid drone airspace scene attachment');
renderer = createRenderer({
viewer,
engine,
screenSpaceEventHandlerFactory,
});
renderer = createRenderer({ engine });
renderer.setVisible(_enabled);
if (_rows.length) renderer.replace(_rows);
if (_enabled) {
+61 -57
View File
@@ -1,24 +1,17 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import { createFakeGroundHarness } from '../../testSupport/groundDisplayEngines.mjs';
import { createDroneAirspaceLayer } from './index.js';
import { layerFeedState } from '../../data/feedState.js';
function harness(source, { pick = () => null, cardHit = () => null } = {}) {
const sources = [];
const overlay = { entries: new Map(), visible: null };
const clicks = { handler: null, destroyed: 0 };
const owners = new Map();
const viewer = {
scene: { pick },
dataSources: {
add(value) {
sources.push(value);
},
remove(value) {
sources.splice(sources.indexOf(value), 1);
},
},
};
const ground = createFakeGroundHarness();
const { engine } = ground;
// What a click picks: `scene.pick()` (null for nothing).
const scene = { pick };
engine.fake.script('pick', () => scene.pick() ?? undefined);
const layer = createDroneAirspaceLayer({
source,
overlayHost: {
@@ -33,15 +26,6 @@ function harness(source, { pick = () => null, cardHit = () => null } = {}) {
},
hitTest: (x, y, options) => cardHit(x, y, options),
},
screenSpaceEventHandlerFactory: () => ({
setInputAction(callback) {
clicks.handler = callback;
},
destroy() {
clicks.destroyed += 1;
clicks.handler = null;
},
}),
picking: {
resolvePickId: (picked) => picked?.id ?? null,
isOwnedByOtherLayer: (layerId, pickedId) =>
@@ -51,9 +35,20 @@ function harness(source, { pick = () => null, cardHit = () => null } = {}) {
},
pointer: { isPointerFree: () => true },
});
layer.init(viewer);
layer.enable(viewer);
return { layer, viewer, sources, overlay, clicks, owners };
layer.init(null, { engine });
layer.enable();
return {
layer,
engine,
ground,
scene,
overlay,
owners,
/** The zones' ground set (undefined once released). */
zones: () => ground.set('drone-airspace'),
/** A click through the engine's input, picking `scene.pick()`. */
click: (event) => engine.fake.input('click', event),
};
}
const ring = [
@@ -76,19 +71,27 @@ const row = {
polygons: [[ring]],
};
test('each zone polygon renders as one filled entity with its outline', async () => {
test('each zone polygon renders as one fill with its outline', async () => {
const h = harness({
getSnapshot: async () => [
row,
{ ...row, stableId: '400', typeCode: 'R', polygons: [[ring], [ring]] },
],
});
assert.equal(await h.layer.update(h.viewer), true);
const entities = h.sources[0].entities.values;
assert.equal(entities.length, 3);
assert.equal(entities[0].id, 'drone-airspace:310:0');
assert.ok(entities[0].polygon, 'zone fill missing');
assert.ok(entities[0].polyline, 'zone outline missing');
assert.equal(await h.layer.update(), true);
const { items } = h.zones();
const ids = [
'drone-airspace:310:0',
'drone-airspace:400:0',
'drone-airspace:400:1',
];
assert.equal(items.length, 6, 'a fill and an outline per polygon');
assert.deepEqual(
items.map(({ pickId }) => pickId),
[...ids, ...ids],
);
assert.ok(items.slice(0, 3).every((item) => item.fill && !item.outline));
assert.ok(items.slice(3).every((item) => item.outline && !item.fill));
assert.equal(h.layer.getStats().count, 2);
});
@@ -98,12 +101,12 @@ test('clicking a zone publishes its card; empty space clears it', async () => {
{ getSnapshot: async () => [row] },
{ pick: () => pickResult },
);
await h.layer.update(h.viewer);
assert.equal(typeof h.clicks.handler, 'function', 'click handler missing');
await h.layer.update();
assert.equal(h.ground.listeners(), 1, 'click handler missing');
assert.equal(h.owners.size, 0);
pickResult = { id: 'drone-airspace:310:0' };
h.clicks.handler({ position: { x: 10, y: 10 } });
h.click({ position: { x: 10, y: 10 } });
const entries = h.overlay.entries.get('drone-airspace');
assert.equal(entries.length, 1);
assert.equal(entries[0].id, 'drone-airspace-card:310');
@@ -111,7 +114,7 @@ test('clicking a zone publishes its card; empty space clears it', async () => {
assert.ok(entries[0].position, 'card must carry a world anchor');
pickResult = { id: 'other-layer:aircraft-1' };
h.clicks.handler({ position: { x: 10, y: 10 } });
h.click({ position: { x: 10, y: 10 } });
assert.equal(
h.overlay.entries.get('drone-airspace')?.length,
1,
@@ -119,7 +122,7 @@ test('clicking a zone publishes its card; empty space clears it', async () => {
);
pickResult = null;
h.clicks.handler({ position: { x: 10, y: 10 } });
h.click({ position: { x: 10, y: 10 } });
assert.equal(h.overlay.entries.get('drone-airspace')?.length ?? 0, 0);
});
@@ -134,14 +137,14 @@ test('late refresh cannot publish after disable or destroy', async () => {
});
},
});
const pending = h.layer.update(h.viewer);
h.layer[action](h.viewer);
const pending = h.layer.update();
h.layer[action]();
assert.equal(signal.aborted, true);
if (action === 'disable') h.layer.enable(h.viewer);
if (action === 'disable') h.layer.enable();
resolve([row]);
assert.equal(await pending, false);
assert.equal(h.layer.getStats().count, 0);
h.layer.destroy(h.viewer);
h.layer.destroy();
}
});
@@ -152,7 +155,7 @@ test('the row legend names prohibited and restricted with the disclaimer', async
{ ...row, stableId: '400', typeCode: 'R', type: 'Restricted' },
],
});
await h.layer.update(h.viewer);
await h.layer.update();
const legend = h.layer.getRowControls().legend;
assert.equal(legend[0].label, 'Prohibited (P)');
assert.equal(legend[1].label, 'Restricted (R)');
@@ -168,12 +171,12 @@ test('a stale snapshot reads STALE, dated by its own fetch, and a fresh one clea
getSnapshot: async () => snapshot.rows,
getSnapshotDetail: async () => snapshot,
});
await h.layer.update(h.viewer);
await h.layer.update();
assert.equal(h.layer.getStats().stale, true);
assert.equal(h.layer.getStats().lastUpdate, fetchedAt);
assert.equal(layerFeedState(h.layer.getStats()), 'stale');
snapshot = { rows: [row], stale: false, fetchedAt: Date.now() };
await h.layer.update(h.viewer);
await h.layer.update();
assert.equal(h.layer.getStats().stale, false);
assert.ok(h.layer.getStats().lastUpdate > fetchedAt);
assert.equal(layerFeedState(h.layer.getStats()), 'nominal');
@@ -188,10 +191,10 @@ test('a failed refresh after a stale snapshot reads as the failure, not stale',
return { rows: [row], stale: true, fetchedAt: Date.now() - 60_000 };
},
});
await h.layer.update(h.viewer);
await h.layer.update();
assert.equal(layerFeedState(h.layer.getStats()), 'stale');
fail = true;
await h.layer.update(h.viewer);
await h.layer.update();
assert.equal(h.layer.getStats().stale, false);
assert.equal(h.layer.getStats().error, 'FAA SUA HTTP 502');
assert.equal(layerFeedState(h.layer.getStats()), 'degraded');
@@ -201,19 +204,21 @@ test('a boundary change alone redraws the zone; identical geometry does not', as
const moved = ring.map(([lon, lat]) => [lon + 0.5, lat]);
let rows = [row];
const h = harness({ getSnapshot: async () => rows });
await h.layer.update(h.viewer);
const [first] = h.sources[0].entities.values;
await h.layer.update();
const first = h.zones();
rows = [{ ...row, polygons: [[ring.map((point) => [...point])]] }];
await h.layer.update(h.viewer);
assert.equal(h.sources[0].entities.values[0], first, 'same geometry kept');
await h.layer.update();
assert.equal(h.zones().commits, first.commits, 'same geometry kept');
assert.equal(h.zones().items, first.items);
rows = [{ ...row, polygons: [[moved]] }];
await h.layer.update(h.viewer);
const [redrawn] = h.sources[0].entities.values;
assert.notEqual(redrawn, first, 'moved boundary must redraw');
assert.notDeepEqual(
redrawn.polyline.positions.getValue(),
first.polyline.positions.getValue(),
await h.layer.update();
const redrawn = h.zones();
assert.equal(
redrawn.commits,
first.commits + 1,
'moved boundary must redraw',
);
assert.notDeepEqual(redrawn.items[1].rings, first.items[1].rings);
assert.ok(h.layer.getAnalystRecords()[0].lon > -76.6);
});
@@ -232,7 +237,6 @@ test('an engine switch keeps the zones and the selected card for the next globe'
},
hitTest: () => null,
},
screenSpaceEventHandlerFactory: () => null,
picking: {
resolvePickId: (picked) => picked?.id ?? null,
isOwnedByOtherLayer: () => false,
@@ -0,0 +1,84 @@
// The FAA special-use airspace zones on the globe contract (engine.ground,
// engine.input), the same on every engine, drawn as fire perimeters are:
// each row's polygons (holes kept) as a 0.25 fill in its type's colour,
// under a 2 px ground outline at 0.9 along the outer ring only, every
// polygon and its outline picked as `drone-airspace:${stableId}:${index}`.
// All fills come before all outlines in the set, so an outline is never
// covered by a later fill (on Cesium the outlines are one batch over the
// fills).
import { rgbaFromCss } from '../../shared/color.js';
import { droneAirspaceAccent } from '../cards.js';
const SET_ID = 'drone-airspace';
const FILL_ALPHA = 0.25;
const OUTLINE_ALPHA = 0.9;
const OUTLINE_PX = 2;
/** What a pick of a zone's polygon returns. */
export const droneAirspacePickId = (row, index) =>
`drone-airspace:${row.stableId}:${index}`;
/**
* The zones: `{ setVisible, replace(rows), onClick(listener) → remove,
* pick(click), destroy }`. A click listener gets the engine's click with its
* pick; pick(click) is that pick (null for none).
* @param {import('../../../globe/contract.js').GlobeEngine} engine
*/
export function createDroneAirspaceDisplay(engine) {
if (!engine?.ground)
throw new TypeError('The drone airspace display needs a globe engine');
const set = engine.ground.createSet({
id: SET_ID,
kind: 'polygon',
pickable: true,
});
set.show(false);
let destroyed = false;
const removers = new Set();
return {
setVisible(show) {
if (!destroyed) set.show(show);
},
replace(rows) {
if (destroyed) return;
const fills = [];
const outlines = [];
for (const row of rows) {
const { red, green, blue } = rgbaFromCss(
droneAirspaceAccent(row.typeCode),
);
for (const [index, rings] of row.polygons.entries()) {
const pickId = droneAirspacePickId(row, index);
fills.push({ rings, fill: [red, green, blue, FILL_ALPHA], pickId });
outlines.push({
rings: rings.slice(0, 1),
outline: {
color: [red, green, blue, OUTLINE_ALPHA],
widthPx: OUTLINE_PX,
},
pickId,
});
}
}
set.replace([...fills, ...outlines]);
set.commit();
},
onClick(listener) {
if (destroyed) return () => {};
const remove = engine.input.on('click', listener, { pick: true });
const off = () => {
if (removers.delete(off)) remove();
};
removers.add(off);
return off;
},
pick: (click) => click?.picked ?? null,
destroy() {
if (destroyed) return;
destroyed = true;
for (const off of [...removers]) off();
set.destroy();
},
};
}
@@ -0,0 +1,272 @@
// The FAA airspace zones on the engine contract, on the fake engine and on
// the Cesium engine (its ground batches over fake primitives): fills with
// their holes at 0.25 and a 2 px outline at 0.9 along the outer ring only,
// in the zone type's colour; clicks through the engine's input selecting a
// zone's card; visibility and teardown.
import assert from 'node:assert/strict';
import test from 'node:test';
import * as Cesium from 'cesium';
import * as geo from '../../../geo/index.js';
import {
GROUND_HARNESSES,
createFakeGroundHarness,
instanceColor,
} from '../../../testSupport/groundDisplayEngines.mjs';
import { rgbaFromCss } from '../../shared/color.js';
import { droneAirspaceAccent } from '../cards.js';
import { createDroneAirspaceLayer } from '../index.js';
import { createDroneAirspaceDisplay } from './display.js';
const outer = [
[-77.2, 38.8],
[-76.9, 38.8],
[-76.9, 39.1],
[-77.2, 39.1],
[-77.2, 38.8],
];
const hole = [
[-77.1, 38.9],
[-77.0, 38.9],
[-77.0, 39.0],
[-77.1, 38.9],
];
const second = outer.map(([lon, lat]) => [lon + 1, lat]);
const row = {
stableId: '310',
name: 'P-56',
typeCode: 'P',
type: 'Prohibited',
lowerAltitude: 'SFC',
upperAltitude: '18,000 ft MSL',
timesOfUse: 'CONTINUOUS',
agency: null,
city: 'WASHINGTON',
state: 'DC',
polygons: [[outer, hole]],
};
const other = {
...row,
stableId: '400',
name: 'R-4001',
typeCode: 'R',
type: 'Restricted',
polygons: [[second], [second.map(([lon, lat]) => [lon, lat + 1])]],
};
const PICKS = [
'drone-airspace:310:0',
'drone-airspace:400:0',
'drone-airspace:400:1',
];
const colorOf = (zone) => rgbaFromCss(droneAirspaceAccent(zone.typeCode));
// Per polygon: its incident's colour.
const COLORS = [colorOf(row), colorOf(other), colorOf(other)];
function fixture(makeHarness) {
const h = makeHarness();
const entries = new Map();
const layer = createDroneAirspaceLayer({
source: { getSnapshot: async () => [row, other] },
overlayHost: {
setEntries: (id, value) => entries.set(id, value),
setVisible() {},
clearSource: (id) => entries.delete(id),
hitTest: () => null,
},
picking: {
resolvePickId: (picked) => picked?.id ?? null,
isOwnedByOtherLayer: (_layer, id) => id.startsWith('other-layer:'),
},
pointer: { isPointerFree: () => true },
});
layer.init(null, { engine: h.engine });
layer.enable();
return { ...h, layer, entries, card: () => entries.get('drone-airspace') };
}
const near = (actual, expected, label, tolerance = 1e-9) =>
assert.ok(
Math.abs(actual - expected) < tolerance,
`${label}: ${actual} vs ${expected}`,
);
test('the display needs a globe engine', () => {
assert.throws(() => createDroneAirspaceDisplay(null), TypeError);
});
for (const makeHarness of GROUND_HARNESSES) {
const { name } = makeHarness();
test(`each polygon is a 0.25 fill with its holes under a 2 px outline at 0.9 on its outer ring (${name})`, async () => {
const f = fixture(makeHarness);
try {
assert.equal(await f.layer.update(), true);
const set = f.set('drone-airspace');
assert.equal(set.options.kind, 'polygon');
assert.equal(set.options.pickable, true);
assert.equal(set.shown, true);
const fills = set.items.slice(0, 3);
const lines = set.items.slice(3);
assert.equal(set.items.length, 6, 'every fill, then every outline');
assert.deepEqual(
fills.map(({ rings, pickId, outline }) => ({ rings, pickId, outline })),
[
{ rings: [outer, hole], pickId: PICKS[0], outline: undefined },
{ rings: [second], pickId: PICKS[1], outline: undefined },
{
rings: other.polygons[1],
pickId: PICKS[2],
outline: undefined,
},
],
);
assert.deepEqual(
lines.map(({ rings, pickId, fill, outline }) => ({
rings,
pickId,
fill,
widthPx: outline.widthPx,
})),
[
{ rings: [outer], pickId: PICKS[0], fill: undefined, widthPx: 2 },
{ rings: [second], pickId: PICKS[1], fill: undefined, widthPx: 2 },
{
rings: other.polygons[1],
pickId: PICKS[2],
fill: undefined,
widthPx: 2,
},
],
);
fills.forEach(({ fill }, index) =>
assert.deepEqual(fill, COLORS[index].withAlpha(0.25).rgba()),
);
lines.forEach(({ outline }, index) =>
assert.deepEqual(outline.color, COLORS[index].withAlpha(0.9).rgba()),
);
if (f.cesium) {
const primitives = f.primitives('drone-airspace');
assert.equal(primitives.fills.length, 1, 'one fill batch');
assert.equal(primitives.lines.length, 1, 'one outline batch');
const fillInstances = primitives.fills[0].options.geometryInstances;
const lineInstances = primitives.lines[0].options.geometryInstances;
assert.equal(fillInstances.length, 3);
assert.equal(lineInstances.length, 3, 'no line along a hole');
assert.equal(
primitives.fills[0].options.classificationType,
Cesium.ClassificationType.BOTH,
);
assert.equal(primitives.fills[0].options.allowPicking, true);
assert.ok(fillInstances[0].geometry instanceof Cesium.PolygonGeometry);
assert.equal(
fillInstances[0].geometry._polygonHierarchy.holes.length,
1,
);
fillInstances.forEach((instance, index) =>
instanceColor(instance).forEach((channel, at) =>
near(
channel,
COLORS[index].withAlpha(0.25).rgba()[at],
`fill ${index}.${at}`,
0.5 / 255,
),
),
);
lineInstances.forEach((instance, index) => {
assert.ok(instance.geometry instanceof Cesium.GroundPolylineGeometry);
assert.equal(instance.geometry.width, 2);
assert.equal(instance.geometry.loop, true);
instanceColor(instance).forEach((channel, at) =>
near(
channel,
COLORS[index].withAlpha(0.9).rgba()[at],
`line ${index}.${at}`,
0.5 / 255,
),
);
});
}
f.layer.disable();
assert.equal(f.set('drone-airspace').shown, false);
if (f.cesium) assert.equal(f.collectionShown('drone-airspace'), false);
} finally {
f.layer.destroy();
}
assert.equal(f.sets(), 0);
f.destroy();
});
test(`a click on a zone or its outline selects the zone; empty space clears it (${name})`, async () => {
const f = fixture(makeHarness);
try {
await f.layer.update();
assert.equal(f.listeners(), 1, 'one click listener while enabled');
f.click({ set: 'drone-airspace', instance: 0 });
assert.equal(f.card()[0].id, 'drone-airspace-card:310');
// The other zone's second outline.
f.click({ set: 'drone-airspace', instance: 5 });
assert.equal(f.card()[0].id, 'drone-airspace-card:400');
f.click({ id: 'other-layer:aircraft-1' });
assert.equal(
f.card()[0].id,
'drone-airspace-card:400',
'a sibling layer pick keeps the selection',
);
f.click(undefined);
assert.deepEqual(f.card(), []);
f.layer.disable();
assert.equal(f.listeners(), 0, 'disable removes the click listener');
f.layer.enable();
assert.equal(f.listeners(), 1);
f.layer.detachRenderer();
assert.equal(f.listeners(), 0, 'detach removes it too');
assert.equal(f.sets(), 0);
} finally {
f.layer.destroy();
f.destroy();
}
});
}
test('a click inside a zone picks it on the ground, not in its hole (the fake engine)', async () => {
const f = fixture(createFakeGroundHarness);
try {
await f.layer.update();
const clickAt = (lon, lat) => {
f.engine.camera.setView({
destination: geo.cartesian3.fromDegrees(lon, lat, 30_000),
});
const { width, height } = f.engine.host.size();
f.engine.fake.input('click', {
position: { x: width / 2, y: height / 2 },
});
};
clickAt(-77.15, 39.05);
assert.equal(f.card()[0].id, 'drone-airspace-card:310');
clickAt(-77.03, 38.92);
assert.deepEqual(f.card(), [], 'the hole is empty space');
} finally {
f.layer.destroy();
f.destroy();
}
});
test('the display ignores calls after destroy and destroys once', () => {
const h = createFakeGroundHarness();
const display = createDroneAirspaceDisplay(h.engine);
assert.equal(h.set('drone-airspace').shown, false, 'hidden until shown');
const off = display.onClick(() => {});
assert.equal(h.listeners(), 1);
display.destroy();
display.destroy();
assert.equal(h.listeners(), 0, 'destroy removes its click listeners');
off();
assert.equal(h.sets(), 0);
display.setVisible(true);
display.replace([row]);
assert.equal(h.listeners(), 0);
display.onClick(() => {})();
assert.equal(display.pick({}), null);
assert.equal(display.pick({ picked: { id: 'x' } }).id, 'x');
h.destroy();
});
-14
View File
@@ -1,14 +0,0 @@
import { droneAirspaceAccent } from '../cards.js';
import { createZonesNavaraRenderer } from '../../shared/render/navaraZones.js';
/** The FAA zones on Navara, as fire perimeters draw. */
export function createDroneAirspaceNavaraRenderer(engine, { view }) {
return createZonesNavaraRenderer(
engine,
{ view },
{
idPrefix: 'drone-airspace',
colorOf: (row) => droneAirspaceAccent(row.typeCode),
},
);
}