fix(director): seek camera longitude across the shortest dateline arc

This commit is contained in:
Rudy Celekli committed 2026-10-14 14:17:39 -04:00
1 parent 6dd4d0156f
commit 632005d221
4 files changed
+40 -1

No files matched your search

+7 -1
View File
@@ -45,7 +45,13 @@ export function cameraAtProgress(fromCamera, toCamera, progress) {
};
return {
lat: lerp(source.lat, target.lat),
lon: lerp(source.lon, target.lon),
lon:
t === 0
? Number(source.lon)
: t === 1
? Number(target.lon)
: ((((lerpAngle(source.lon, target.lon) + 180) % 360) + 360) % 360) -
180,
alt: lerp(source.alt, target.alt),
heading: lerpAngle(source.heading, target.heading),
pitch: lerp(source.pitch, target.pitch),