mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
refactor: own application request operations and surface caches
This commit is contained in:
1 parent
310809e8f1
commit
ac977bd8bc
53 files changed
+4388
-3317
No files matched your search
@@ -2,10 +2,10 @@ import { createAlprCamerasLayer } from '../../layers/alpr/index.js';
|
||||
import * as render from '../../renderGovernor.js';
|
||||
import * as context from '../../data/contextStore.js';
|
||||
import * as picking from '../../data/pickRegistry.js';
|
||||
import * as groundFloor from '../../data/groundFloor.js';
|
||||
|
||||
/** Construct one layer using the application scene owners and a supplied source. */
|
||||
export function createApplicationAlpr({ source }) {
|
||||
export function createApplicationAlpr({ surface, source }) {
|
||||
const { groundFloor } = surface;
|
||||
return createAlprCamerasLayer({
|
||||
source,
|
||||
services: { render, context, picking, groundFloor },
|
||||
|
||||
@@ -4,14 +4,12 @@ import * as activation from '../../cctvFocusRequest.js';
|
||||
import * as overlays from '../../overlays/worldOverlay.js';
|
||||
import * as locations from '../../locations.js';
|
||||
import * as picking from '../../data/pickRegistry.js';
|
||||
import * as terrain from '../../data/terrainHeights.js';
|
||||
import * as ground from '../../data/groundFloor.js';
|
||||
import * as mesh from '../../data/meshFloorSampler.js';
|
||||
import * as focus from '../../data/focusDeemphasis.js';
|
||||
import * as render from '../../renderGovernor.js';
|
||||
|
||||
/** Construct one layer using the application scene owners and a supplied source. */
|
||||
export function createApplicationCctv({ source }) {
|
||||
export function createApplicationCctv({ surface, source }) {
|
||||
const { terrain, groundFloor: ground, meshFloor: mesh } = surface;
|
||||
return createCctvLayer({
|
||||
source,
|
||||
services: {
|
||||
|
||||
@@ -4,7 +4,6 @@ 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 anchors from '../../data/fireAnchors.js';
|
||||
import * as overlays from '../../overlays/worldOverlay.js';
|
||||
import * as focus from '../../worldFocus.js';
|
||||
export const firmsServices = {
|
||||
@@ -12,19 +11,18 @@ export const firmsServices = {
|
||||
sprites,
|
||||
context,
|
||||
picking,
|
||||
anchors,
|
||||
overlays,
|
||||
focus,
|
||||
};
|
||||
|
||||
/** Bind a supplied fire feed to the application scene service owners. */
|
||||
export function createApplicationFirms(options) {
|
||||
export function createApplicationFirms({ surface, ...options }) {
|
||||
return createLayer({
|
||||
...options,
|
||||
icon: options.icon ?? '▲',
|
||||
source: options.source ?? 'NASA FIRMS',
|
||||
feed: options.feed,
|
||||
services: firmsServices,
|
||||
services: { ...firmsServices, anchors: surface.anchors },
|
||||
overlayHost: options.overlayHost ?? {
|
||||
setEntries: overlays.setOverlayEntries,
|
||||
setVisible: overlays.setOverlaySourceVisible,
|
||||
|
||||
@@ -5,23 +5,22 @@ import * as trails from '../../data/trailRenderer.js';
|
||||
import * as aircraftPresentation from '../../data/tr3bRegistry.js';
|
||||
import * as camera from '../../data/trackedCamera.js';
|
||||
import * as labels from '../../data/detectionDraw.js';
|
||||
import * as groundFloor from '../../data/groundFloor.js';
|
||||
import * as meshFloor from '../../data/meshFloorSampler.js';
|
||||
import * as geoid from '../../data/geoid.js';
|
||||
import * as focus from '../../data/focusDeemphasis.js';
|
||||
import * as readout from '../../data/trackedReadout.js';
|
||||
import * as context from '../../data/contextStore.js';
|
||||
import * as render from '../../renderGovernor.js';
|
||||
import * as groundSnap from '../../data/groundSnap.js';
|
||||
import * as recession from '../../data/aircraftRecession.js';
|
||||
|
||||
/** Construct one layer using the application scene owners and a supplied source. */
|
||||
export function createApplicationFlights({
|
||||
surface,
|
||||
source,
|
||||
militaryRegistry,
|
||||
resolveAsset = (url) =>
|
||||
`${import.meta.env?.BASE_URL || '/'}${url.replace(/^\//, '')}`,
|
||||
}) {
|
||||
const { groundFloor, meshFloor, groundSnap } = surface;
|
||||
return createCivilFlightLayer({
|
||||
source,
|
||||
resolveAsset,
|
||||
|
||||
@@ -5,23 +5,22 @@ import * as trails from '../../data/trailRenderer.js';
|
||||
import * as aircraftPresentation from '../../data/tr3bRegistry.js';
|
||||
import * as camera from '../../data/trackedCamera.js';
|
||||
import * as labels from '../../data/detectionDraw.js';
|
||||
import * as groundFloor from '../../data/groundFloor.js';
|
||||
import * as meshFloor from '../../data/meshFloorSampler.js';
|
||||
import * as geoid from '../../data/geoid.js';
|
||||
import * as focus from '../../data/focusDeemphasis.js';
|
||||
import * as readout from '../../data/trackedReadout.js';
|
||||
import * as context from '../../data/contextStore.js';
|
||||
import * as render from '../../renderGovernor.js';
|
||||
import * as groundSnap from '../../data/groundSnap.js';
|
||||
import * as recession from '../../data/aircraftRecession.js';
|
||||
|
||||
/** Construct one layer using the application scene owners and a supplied source. */
|
||||
export function createApplicationMilitary({
|
||||
surface,
|
||||
source,
|
||||
militaryRegistry,
|
||||
resolveAsset = (url) =>
|
||||
`${import.meta.env?.BASE_URL || '/'}${url.replace(/^\//, '')}`,
|
||||
}) {
|
||||
const { groundFloor, meshFloor, groundSnap } = surface;
|
||||
return createMilitaryFlightLayer({
|
||||
source,
|
||||
resolveAsset,
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import { createInstallationsLayer } from '../../layers/installations/index.js';
|
||||
import * as render from '../../renderGovernor.js';
|
||||
import * as context from '../../data/contextStore.js';
|
||||
import * as ground from '../../data/groundFloor.js';
|
||||
import * as anchors from '../../data/fireAnchors.js';
|
||||
import * as picking from '../../data/pickRegistry.js';
|
||||
|
||||
/** Construct one layer using the application scene owners and a supplied source. */
|
||||
export function createApplicationInstallations({ source }) {
|
||||
export function createApplicationInstallations({ surface, source }) {
|
||||
const { groundFloor: ground, anchors } = surface;
|
||||
return createInstallationsLayer({
|
||||
source,
|
||||
services: { render, context, ground, anchors, picking },
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { createRadioLayer } from '../../layers/radio/index.js';
|
||||
import * as ground from '../../data/groundFloor.js';
|
||||
import * as picking from '../../data/pickRegistry.js';
|
||||
import * as overlays from '../../overlays/worldOverlay.js';
|
||||
import * as globe from '../../celestialRing.js';
|
||||
import * as render from '../../renderGovernor.js';
|
||||
|
||||
/** Construct one layer using the application scene owners and a supplied source. */
|
||||
export function createApplicationRadio({ source }) {
|
||||
export function createApplicationRadio({ surface, source }) {
|
||||
const { groundFloor: ground } = surface;
|
||||
return createRadioLayer({
|
||||
source,
|
||||
services: { ground, picking, overlays, globe, render },
|
||||
|
||||
Reference in new issue
Block a user