mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
fix(street-level): a delayed photo never overrides newer navigation; retry failed mesh refreshes
- A photo takes a deferred navigation ticket when it starts opening (begin/reassert, the application's _beginDeferredNavigation and _reassertNavigationHandoff) and frames only if that ticket still owns the camera once loaded, so a slow photo no longer flies the camera back over newer navigation or clears newer aircraft tracking. - A failed mesh refresh keeps the last good sample and the distance it was taken from, and is retried after the miss cooldown, instead of recording the failed distance and never refreshing again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
f33cd54e2b
commit
8318c9def0
9 files changed
+158
-42
No files matched your search
@@ -317,13 +317,11 @@ export function createMeshSampler({
|
||||
height = validated(height, lon, lat);
|
||||
const previous = heights.get(key);
|
||||
if (height === undefined) {
|
||||
// A failed refresh keeps the old sample, and waits for a closer camera.
|
||||
if (previous !== undefined)
|
||||
probedFrom.set(key, cameraDistance(ground, centre, previous));
|
||||
else {
|
||||
if (misses.size >= cacheMax) misses.clear();
|
||||
misses.set(key, Date.now() + MESH_MISS_RETRY_MS);
|
||||
}
|
||||
// A miss, or a failed refresh: the old sample (if any) and the
|
||||
// distance it was taken from stay, and the probe is retried after
|
||||
// the same cooldown.
|
||||
if (misses.size >= cacheMax) misses.clear();
|
||||
misses.set(key, Date.now() + MESH_MISS_RETRY_MS);
|
||||
continue;
|
||||
}
|
||||
if (previous === undefined && heights.size >= cacheMax) forget();
|
||||
|
||||
Reference in new issue
Block a user