mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
fix(director): seek camera longitude across the shortest dateline arc
This commit is contained in:
1 parent
6dd4d0156f
commit
632005d221
4 files changed
+40
-1
No files matched your search
@@ -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),
|
||||
|
||||
Reference in new issue
Block a user