mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Embed views and the application shell leave the Cesium allow-list
The embed views fly through rendererOf's camera port with geo maths, and the panel render loop that keeps an inline panel drawing moves into the Cesium adapter (src/render/cesium/panelRendering.js); the application scene hands it to the embed views as `keepRendering`. The shell reaches the camera, effects and globe through rendererOf and loads no Cesium factories; whether Cockpit's aircraft is an entity of the viewer's own comes from the scene's `viewerDrawsEntity`, wired in through the controls. Callers handing the shell or the application tools a viewer of their own load ./render/cesium/unbound once, as the ports' unbound check now records.
This commit is contained in:
1 parent
e6d9ec0636
commit
26665e8390
16 files changed
+222
-185
No files matched your search
@@ -32,13 +32,9 @@ import {
|
||||
} from './cyberSonarControls.js';
|
||||
|
||||
import { toDegrees, toRadians } from '../geo/index.js';
|
||||
import { cameraOf, findCamera } from '../render/cesium/camera.js';
|
||||
// Loads the effects factory, so visual settings on a viewer with no renderer
|
||||
// bound still get an effects port. Loading the camera and effects factories,
|
||||
// and asking the viewer's entities whether Cockpit's aircraft still draws,
|
||||
// keep this module on the Cesium allow-list.
|
||||
import '../render/cesium/effects.js';
|
||||
import '../render/cesium/globe.js';
|
||||
// A viewer with no renderer bound gets its ports (camera, effects, globe)
|
||||
// once its owner has loaded the package's `./render/cesium/unbound` export.
|
||||
import { cameraOf, canvasOf, findCamera } from '../render/rendererOf.js';
|
||||
|
||||
import { aircraftTrackingTarget } from '../cockpitTracking.js';
|
||||
|
||||
@@ -380,10 +376,11 @@ export class StyleManager extends ShellFacade {
|
||||
warmGroundFloor: services.warmGroundFloor,
|
||||
sampleMeshFloorCells: services.sampleMeshFloorCells,
|
||||
// Whether the aircraft Cockpit flies still draws: an entity of the
|
||||
// viewer's own, or a tracked contact whose layer draws it through
|
||||
// the draw port and says so in its entity record.
|
||||
// viewer's own (the scene's `viewerDrawsEntity` says), or a tracked
|
||||
// contact whose layer draws it through the draw port and says so in
|
||||
// its entity record.
|
||||
trackedEntityDrawn: (entity) =>
|
||||
viewer.entities.contains(entity) ||
|
||||
services.viewerDrawsEntity?.(entity) === true ||
|
||||
readEntityRecord(entity)?.drawn?.() === true,
|
||||
holdContinuousRender: services.holdContinuousRender,
|
||||
releaseContinuousRender: services.releaseContinuousRender,
|
||||
@@ -1030,7 +1027,7 @@ export class StyleManager extends ShellFacade {
|
||||
_radioVolumeValue: this._radioVolumeValue,
|
||||
},
|
||||
radio: radioLayer,
|
||||
canvas: this.viewer?.canvas,
|
||||
canvas: canvasOf(this.viewer) ?? undefined,
|
||||
actions: {
|
||||
isRegistered: () => this._dataManager?.layers?.has('radio'),
|
||||
isEnabled: () => this._dataManager?.isEnabled('radio'),
|
||||
|
||||
Reference in new issue
Block a user