Keep city stations, vehicle tracks and trail history across globe switches

This commit is contained in:
German Khokhlov committed 2026-11-03 04:21:48 +04:00
1 parent c4a97a653c
commit 24190a3e35
11 files changed
+288 -79

No files matched your search

+2 -1
View File
@@ -79,7 +79,7 @@ export function createViewport({ state, services, parts }) {
globalThis.document?.visibilityState === 'hidden'
)
return;
if (!state._enabled || !parts.renderer?.ready || !state._viewer) return;
if (!state._enabled || !parts.renderer?.ready || state._restoringViewport) return;
refreshViewBounds();
const altitude = getCameraAltitude();
state._altitudeGateOpen = altitudeGateOpen(altitude);
@@ -119,6 +119,7 @@ export function createViewport({ state, services, parts }) {
}
function onCameraChanged() {
if (state._restoringViewport) return;
// The bounds update immediately; the feed proximity check stays debounced.
// A person dragging the globe should not wait a third of a second for the
// vehicles under the cursor to start moving again.