mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-21 18:52:18 +00:00
Fix the follow-up review findings in import, layers, startup and engines
- KML/KMZ import: a per-file canvas budget and cache for ground overlays, limits on rings and vertices of raised polygons, overlays across 360° and near the poles, degenerate holes, polar and single-latitude fills, absolute overlays at their altitude, overlay order by drawOrder as on Cesium, and pins on tiles keep their measured height. - Points on the surface: OSM Places and Street Level cones share the surface sampler and sit on the terrain before they are measured, within a sampling budget per pass; Cockpit's contact-dot bank keeps the dot atlas, and a failed fleet model loads again after a pause. - Startup: the loading screen lifts after the share-link view is restored, the retry screen names the failed engine and takes focus, and the fallback toast stays for 6 s. - Engines: an engine switch lands a running camera flight at its destination (camera.completeFlight on both engines), the sighting card leaves focus on the engine picker after a switch, and a Cesium model error stays with the instance that failed. - The MCP panel builds again: its wind-mesh alias resolves to the stub. - QA: the wildlife switch waits for the camera to rest, GBFS --w2 says it needs the dev server, and test fixtures are shared instead of copied.
This commit is contained in:
1 parent
0ef29781e5
commit
60fb8fee07
82 files changed
+2363
-1574
No files matched your search
@@ -206,27 +206,34 @@ export function createCameraModel({
|
||||
options.complete?.();
|
||||
return;
|
||||
}
|
||||
const current = { options, resume: port.suspendCameraInputs?.() };
|
||||
flight = current;
|
||||
// Navara moves the camera from here on; read it back every frame.
|
||||
pushed = null;
|
||||
const pose = navaraPose(target.position, target.direction, target.up);
|
||||
const flyOptions = {};
|
||||
if (options.duration !== undefined)
|
||||
flyOptions.duration = options.duration * 1000;
|
||||
if (options.easing !== undefined)
|
||||
flyOptions.easing = NAVARA_EASINGS[options.easing];
|
||||
port
|
||||
.fly(navaraPose(target.position, target.direction, target.up), flyOptions)
|
||||
.then(
|
||||
(arrived) => {
|
||||
if (flight !== current || destroyed) return;
|
||||
if (!arrived) return endFlight(current, 'cancel');
|
||||
endFlight(current, 'complete');
|
||||
land(options, target);
|
||||
options.complete?.();
|
||||
},
|
||||
() => endFlight(current, 'cancel'),
|
||||
);
|
||||
const current = { options, target, resume: port.suspendCameraInputs?.() };
|
||||
flight = current;
|
||||
let pending;
|
||||
try {
|
||||
pending = port.fly(pose, flyOptions);
|
||||
} catch (error) {
|
||||
// As in Cesium, a flight that cannot start reports only the exception.
|
||||
endFlight(current, 'fail');
|
||||
throw error;
|
||||
}
|
||||
// Navara moves the camera from here on; read it back every frame.
|
||||
pushed = null;
|
||||
pending.then(
|
||||
(arrived) => {
|
||||
if (flight !== current || destroyed) return;
|
||||
if (!arrived) return endFlight(current, 'cancel');
|
||||
endFlight(current, 'complete');
|
||||
land(options, target);
|
||||
options.complete?.();
|
||||
},
|
||||
() => endFlight(current, 'cancel'),
|
||||
);
|
||||
}
|
||||
|
||||
/** Reads Navara's drawn camera; called once per frame before preRender. */
|
||||
@@ -384,6 +391,16 @@ export function createCameraModel({
|
||||
announce();
|
||||
cancelCurrentFlight();
|
||||
},
|
||||
completeFlight() {
|
||||
const current = flight;
|
||||
if (!current) return;
|
||||
endFlight(current, 'complete');
|
||||
// Cesium lands it through setView, a command.
|
||||
announce();
|
||||
port.stop();
|
||||
land(current.options, current.target);
|
||||
current.options.complete?.();
|
||||
},
|
||||
zoomIn(amount = DEFAULT_ZOOM_AMOUNT) {
|
||||
place({
|
||||
...state,
|
||||
|
||||
Reference in new issue
Block a user