mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Draw Street Level, traffic and directions through one display each
- Street Level: coverage sequences are ground corridor sets of up to 120, draped on terrain and tiles as Cesium's ground polylines were; the marker and view cones are sprite movers turned to their compass bearing on screen and culled 1 km under WGS84. The layer no longer loads the Cesium SDK on Navara. - Traffic: vehicles are two point mover sets (an outline disc under each fill) scaled and faded with Cesium's NearFarScalar maths; congestion heat lines are ground corridor sets draped on tiles. Heights, depth, readiness and the surface key go through the engine, and Navara no longer loads the Cesium SDK for traffic. - Directions: the route is one ground corridor set in the annotation route's dash pattern, maneuvers are point movers and the A/B markers a disc and a letter sprite; the in-layer Navara branch and the Cesium point collection go. Known gaps against Cesium, to close in the contract: the traffic heat lines lose their glow and pulse and the route its flowing dashes (no animated ground fills yet), and dense Street Level coverage on Navara is costly as ground corridors (about 80 to 190 ms a frame at 6,000 to 14,400 sequences) until corridors are binned set-wide. Coupling: Navara renderer lines fall from 3349 to 2767, Cesium-importing files from 51 to 32, `viewer` lines from 1591 to 1373, Cesium SDK loads on Navara from 6 to 4.
This commit is contained in:
1 parent
2fbdca62be
commit
1559bd57f4
78 files changed
+4762
-3719
No files matched your search
@@ -2,11 +2,15 @@ import { createApplicationDirectionsLayer } from '../../data/directions.js';
|
||||
|
||||
import { rendererFor } from './renderers.js';
|
||||
|
||||
/** Construct Directions with application scene owners and an explicit route source. */
|
||||
/**
|
||||
* Construct Directions with application scene owners and an explicit route
|
||||
* source; it draws with the engine's renderer from the registry
|
||||
* (render/display.js on every engine).
|
||||
*/
|
||||
export function createApplicationDirections({ source, surface }) {
|
||||
return createApplicationDirectionsLayer({
|
||||
source,
|
||||
groundFloor: surface?.groundFloor,
|
||||
createNativeRenderer: (engine) => rendererFor('directions', engine),
|
||||
createRenderer: (engine) => rendererFor('directions', engine),
|
||||
});
|
||||
}
|
||||
@@ -49,6 +49,9 @@ import { createCablesDisplay } from '../../layers/submarineCables/render/display
|
||||
import { createInfrastructureDisplay } from '../../layers/infrastructure/render/display.js';
|
||||
import { createInstallationsDisplay } from '../../layers/installations/render/display.js';
|
||||
import { createAwarenessDisplay } from '../../layers/awareness/render/display.js';
|
||||
import { createStreetLevelDisplay } from '../../layers/streetLevel/render/display.js';
|
||||
import { createTrafficDisplay } from '../../layers/traffic/render/display.js';
|
||||
import { createDirectionsDisplay } from '../../layers/directions/render/display.js';
|
||||
|
||||
const ENGINE_KINDS = new Set(['cesium', 'navara']);
|
||||
|
||||
@@ -133,6 +136,9 @@ export const CESIUM_LAYER_RENDERERS = Object.freeze({
|
||||
cctv: createCctvDisplay,
|
||||
'military-installations': createInstallationsDisplay,
|
||||
'military-awareness': createAwarenessDisplay,
|
||||
'street-level': createStreetLevelDisplay,
|
||||
traffic: createTrafficDisplay,
|
||||
directions: createDirectionsDisplay,
|
||||
});
|
||||
|
||||
// The other application layers still draw themselves on Cesium.
|
||||
|
||||
@@ -85,6 +85,9 @@ test('the layers with extracted renderers', () => {
|
||||
'cctv',
|
||||
'military-installations',
|
||||
'military-awareness',
|
||||
'street-level',
|
||||
'traffic',
|
||||
'directions',
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -111,6 +114,9 @@ test('the layers drawn through one display get the same factory on every engine'
|
||||
'local-datacenters': ['infrastructure', 'createInfrastructureDisplay'],
|
||||
'local-dams': ['infrastructure', 'createInfrastructureDisplay'],
|
||||
'military-installations': ['installations', 'createInstallationsDisplay'],
|
||||
'street-level': ['streetLevel', 'createStreetLevelDisplay'],
|
||||
traffic: ['traffic', 'createTrafficDisplay'],
|
||||
directions: ['directions', 'createDirectionsDisplay'],
|
||||
'telegeography-submarine-cables': [
|
||||
'submarineCables',
|
||||
'createCablesDisplay',
|
||||
|
||||
@@ -3,7 +3,7 @@ import { createMapillaryProvider } from '../../layers/streetLevel/providers/mapi
|
||||
import { createGoogleProvider } from '../../layers/streetLevel/providers/google/index.js';
|
||||
import { createKartaViewProvider } from '../../layers/streetLevel/providers/kartaview/index.js';
|
||||
import { createPanoramaxProvider } from '../../layers/streetLevel/providers/panoramax/index.js';
|
||||
import * as sprites from '../../data/spriteOrder.js';
|
||||
import { rendererFor } from './renderers.js';
|
||||
import * as picking from '../../data/pickRegistry.js';
|
||||
import * as input from '../../data/inputOwnership.js';
|
||||
import * as scenePick from '../../data/scenePick.js';
|
||||
@@ -29,15 +29,22 @@ function defaultProviders(sources) {
|
||||
/**
|
||||
* Inject providers, or use the defaults. An explicit provider list replaces
|
||||
* them; an unused sources.mapillary is neither constructed nor validated,
|
||||
* including when the list is empty.
|
||||
* including when the list is empty. The layer draws with the engine's
|
||||
* renderer from the registry (render/display.js on every engine).
|
||||
*/
|
||||
export function createApplicationStreetLevel({
|
||||
sources = {},
|
||||
nativeRenderer,
|
||||
nativeRenderer = (engine) => rendererFor('street-level', engine),
|
||||
providers = defaultProviders(sources),
|
||||
}) {
|
||||
return createStreetLevelLayer({
|
||||
providers,
|
||||
services: { sprites, picking, input, scenePick, render, nativeRenderer },
|
||||
services: {
|
||||
picking,
|
||||
input,
|
||||
scenePick,
|
||||
render,
|
||||
createDisplay: nativeRenderer,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -2,15 +2,20 @@ import { createTrafficLayer } from '../../layers/traffic/index.js';
|
||||
import * as credits from '../../data/dataCredits.js';
|
||||
import * as ground from '../../data/groundFloor.js';
|
||||
import * as render from '../../renderGovernor.js';
|
||||
import { rendererFor } from './renderers.js';
|
||||
|
||||
/** Construct one layer using the application scene owners and a supplied source. */
|
||||
export function createApplicationTraffic({ source, surface, nativeRenderer }) {
|
||||
/**
|
||||
* Construct one layer using the application scene owners and a supplied
|
||||
* source; it draws with the engine's renderer from the registry
|
||||
* (render/display.js on every engine).
|
||||
*/
|
||||
export function createApplicationTraffic({ source, surface }) {
|
||||
return createTrafficLayer({
|
||||
source,
|
||||
services: {
|
||||
credits,
|
||||
render,
|
||||
nativeRenderer,
|
||||
createRenderer: (engine) => rendererFor('traffic', engine),
|
||||
ground: surface?.groundFloor || ground,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user