mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
Fly layer focus flights through the camera port
flyToBounds takes an easing, as flyTo does: in the contract, the Cesium port and the reference recorder, pinned by a new conformance trace. The flights of radio, awareness, CCTV, submarine cables, cyclones, the launch preview, installations, ALPR, street-level framing, recent imagery, weather and world focus now go through the renderer's camera port. Street-level framing cancels its own flight handle rather than whatever flight is current. worldFocus.js no longer reaches Cesium and leaves the allow-list. Layer pose reads stay for each layer's own slice. The local GeoJSON flight stays on Cesium: gods-eye-view/infrastructure is used with plain Cesium viewers that have no renderer bound.
This commit is contained in:
1 parent
f95324acb1
commit
e3baeec223
31 files changed
+2349
-871
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import * as Cesium from 'cesium';
|
||||
import { VESSEL_FOCUS_RADIUS_M } from './policy.js';
|
||||
import { cameraOf } from '../../render/rendererOf.js';
|
||||
|
||||
export function createFocus({ state: layerState, services, parts, source }) {
|
||||
const flightsLayer = services.flights;
|
||||
@@ -45,9 +46,9 @@ export function createFocus({ state: layerState, services, parts, source }) {
|
||||
)
|
||||
return true;
|
||||
announceNavigationAuthority('context-vessel-focus');
|
||||
layerState.viewer.camera.flyToBoundingSphere(
|
||||
new Cesium.BoundingSphere(vessel.position, VESSEL_FOCUS_RADIUS_M),
|
||||
{ duration: 1.4 },
|
||||
cameraOf(layerState.viewer).flyToBounds(
|
||||
{ center: vessel.position, radius: VESSEL_FOCUS_RADIUS_M },
|
||||
{ durationS: 1.4 },
|
||||
);
|
||||
return true;
|
||||
}
|
||||
@@ -180,9 +181,9 @@ export function createFocus({ state: layerState, services, parts, source }) {
|
||||
announceNavigationAuthority('context-vessel-autofocus', {
|
||||
cancelPendingSelection: false,
|
||||
});
|
||||
layerState.viewer.camera.flyToBoundingSphere(
|
||||
new Cesium.BoundingSphere(vessel.position, VESSEL_FOCUS_RADIUS_M),
|
||||
{ duration: 1.6 },
|
||||
cameraOf(layerState.viewer).flyToBounds(
|
||||
{ center: vessel.position, radius: VESSEL_FOCUS_RADIUS_M },
|
||||
{ durationS: 1.6 },
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user