mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Merge main and switch Cesium and Navara in place through Vue
Preserve the camera, map source and layer selection across engine sessions. Restore the previous engine if startup fails and retain local history navigation.
This commit is contained in:
commit
b8f4d097c4
1691 files changed
+225876
-41594
No files matched your search
@@ -304,10 +304,20 @@ export function createGroundSnap({ groundFloor }) {
|
||||
}
|
||||
const now = Date.now();
|
||||
const entry = entries.get(icao);
|
||||
if (entry && now < entry.nextRetryMs) return heldSnapM(entry, surfacePos); // backoff in force
|
||||
// Backoff in force, unless it ends further off than any backoff can:
|
||||
// a retry stamped before the clock stepped back would otherwise wait for
|
||||
// the clock to catch up.
|
||||
if (
|
||||
entry &&
|
||||
now < entry.nextRetryMs &&
|
||||
entry.nextRetryMs - now <= RETRY_MAX_MS
|
||||
)
|
||||
return heldSnapM(entry, surfacePos);
|
||||
// Per-window budget: deny WITHOUT a retry stamp so the overflow simply
|
||||
// tries again next tick instead of waiting out a backoff it didn't earn.
|
||||
if (now - windowStartMs > SAMPLE_WINDOW_MS) {
|
||||
// A clock that stepped back also opens a new window, or none would open
|
||||
// until it caught up.
|
||||
if (now < windowStartMs || now - windowStartMs > SAMPLE_WINDOW_MS) {
|
||||
windowStartMs = now;
|
||||
windowCount = 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user