mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
fix(camera): moveEnd fires during a follow once the eye stands still, as Cesium's did
Cesium raised moveEnd 500 ms after the camera last moved, following or not: a followed target that moves keeps the eye moving, and one that stands still (a marker, a parked aircraft) lets the move end once the user stops orbiting it. The port never raised moveEnd while following, so Weather, Recent Imagery, the share link and every other moveEnd listener stopped catching up around a still target. The rule is now the eye's alone, through the shared camera events.
This commit is contained in:
1 parent
63a6595eaf
commit
5d48503c51
6 files changed
+25
-28
No files matched your search
@@ -105,8 +105,8 @@ export function createCesiumCamera({
|
||||
const removers = [];
|
||||
let lastWorld = null;
|
||||
// Camera events, measured on every tick: moveStart and moveEnd (500 ms
|
||||
// after the last change of the eye or its field of view, by `now`, never
|
||||
// while following), and `changed` per listener, where Cesium measures its
|
||||
// after the last change of the eye or its field of view, by `now`,
|
||||
// following or not, as Cesium's own), and `changed` per listener, where Cesium measures its
|
||||
// single threshold (`camera.percentageChanged`, which this leaves as it
|
||||
// is for everyone else listening to Cesium's own event). Cesium's own
|
||||
// moveStart and moveEnd are left out: it times them by the system clock.
|
||||
@@ -132,7 +132,6 @@ export function createCesiumCamera({
|
||||
lastWorld = current;
|
||||
return lastWorld;
|
||||
},
|
||||
following: () => Boolean(following?.followed),
|
||||
report,
|
||||
thresholds: capabilities?.has('cameraChangeThreshold') ?? true,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user