mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +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
46a53bb49c
commit
c5b716b107
31 files changed
+2349
-871
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import * as Cesium from 'cesium';
|
||||
import { cablePicks } from './pickState.js';
|
||||
import { cameraOf } from '../../render/rendererOf.js';
|
||||
|
||||
export function createInteraction({ state, inputFor }) {
|
||||
function registerPickEntity(entity, info) {
|
||||
@@ -45,22 +46,20 @@ export function createInteraction({ state, inputFor }) {
|
||||
|
||||
function flyToReference(viewer, reference) {
|
||||
if (!viewer || !reference) return;
|
||||
const destination = Cesium.Cartesian3.fromDegrees(
|
||||
reference.lon,
|
||||
reference.lat,
|
||||
6500,
|
||||
);
|
||||
viewer.camera.cancelFlight();
|
||||
viewer.camera.flyTo({
|
||||
destination,
|
||||
orientation: {
|
||||
heading: viewer.camera.heading || 0,
|
||||
pitch: Cesium.Math.toRadians(-52),
|
||||
roll: 0,
|
||||
const camera = cameraOf(viewer);
|
||||
camera.cancelFlight();
|
||||
camera.flyTo(
|
||||
{ lon: reference.lon, lat: reference.lat, height: 6500 },
|
||||
{
|
||||
orientation: {
|
||||
heading: camera.pose().heading || 0,
|
||||
pitch: Cesium.Math.toRadians(-52),
|
||||
roll: 0,
|
||||
},
|
||||
durationS: 1.35,
|
||||
easing: 'cubicInOut',
|
||||
},
|
||||
duration: 1.35,
|
||||
easingFunction: Cesium.EasingFunction.CUBIC_IN_OUT,
|
||||
});
|
||||
);
|
||||
}
|
||||
return {
|
||||
registerPickEntity,
|
||||
|
||||
Reference in new issue
Block a user