mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-06 11:24:00 +00:00
fix: address review feedback for PR #1023
This commit is contained in:
1 parent
632005d221
commit
3b08bd7487
3 files changed
+9
-8
No files matched your search
@@ -399,6 +399,7 @@ camera moves with easing, duration and holds. Playback and seek share one
|
|||||||
coordinate sampler; navigation/manual input revokes authored motion and pending
|
coordinate sampler; navigation/manual input revokes authored motion and pending
|
||||||
holds. Anchor heights and explicit endpoints require the WGS84 ellipsoid
|
holds. Anchor heights and explicit endpoints require the WGS84 ellipsoid
|
||||||
reference. Legacy projects retain their ordinary flights, content and edits.
|
reference. Legacy projects retain their ordinary flights, content and edits.
|
||||||
|
Seeking between ordinary camera poses uses the shortest longitude arc across the dateline while preserving both authored endpoint longitudes.
|
||||||
See [camera directions](DIRECTOR-CAMERA.md).
|
See [camera directions](DIRECTOR-CAMERA.md).
|
||||||
|
|
||||||
Realtime voice composes separate connection, response/tool, Radio handoff, input
|
Realtime voice composes separate connection, response/tool, Radio handoff, input
|
||||||
@@ -5310,8 +5311,3 @@ datacenters, dams and the Nepal locator retain that shared credit while displaye
|
|||||||
|
|
||||||
Military fragments stitch by source identity. Different mapped parcels merge only
|
Military fragments stitch by source identity. Different mapped parcels merge only
|
||||||
when their footprints touch or contain one another, never across a seam tolerance gap.
|
when their footprints touch or contain one another, never across a seam tolerance gap.
|
||||||
|
|
||||||
|
|
||||||
### fix(director): seek camera longitude across the shortest dateline arc
|
|
||||||
|
|
||||||
Interpolate longitude with the existing shortest-angle easing, normalize intermediate longitudes, and preserve exact authored endpoints at progress zero and one.
|
|
||||||
@@ -28,6 +28,11 @@ export function resolveCameraMove(scene, shot) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Wrap an interpolated camera longitude to WGS84 without changing authored endpoints. */
|
||||||
|
export function normalizeCameraLongitude(longitude) {
|
||||||
|
return ((((longitude + 180) % 360) + 360) % 360) - 180;
|
||||||
|
}
|
||||||
|
|
||||||
/** Sample the same authored curve for playback and seeking, taking the short longitude/angle arc. */
|
/** Sample the same authored curve for playback and seeking, taking the short longitude/angle arc. */
|
||||||
export function sampleCameraMove(move, progress) {
|
export function sampleCameraMove(move, progress) {
|
||||||
const t = Math.max(0, Math.min(1, Number(progress) || 0));
|
const t = Math.max(0, Math.min(1, Number(progress) || 0));
|
||||||
@@ -45,7 +50,7 @@ export function sampleCameraMove(move, progress) {
|
|||||||
const { from, to } = move;
|
const { from, to } = move;
|
||||||
return {
|
return {
|
||||||
lat: lerp(from.lat, to.lat),
|
lat: lerp(from.lat, to.lat),
|
||||||
lon: ((((angle(from.lon, to.lon) + 180) % 360) + 360) % 360) - 180,
|
lon: normalizeCameraLongitude(angle(from.lon, to.lon)),
|
||||||
alt: lerp(from.alt, to.alt),
|
alt: lerp(from.alt, to.alt),
|
||||||
heading: angle(from.heading, to.heading),
|
heading: angle(from.heading, to.heading),
|
||||||
pitch: lerp(from.pitch, to.pitch),
|
pitch: lerp(from.pitch, to.pitch),
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import {
|
|||||||
resolveCameraPose,
|
resolveCameraPose,
|
||||||
resolveCameraMove,
|
resolveCameraMove,
|
||||||
sampleCameraMove,
|
sampleCameraMove,
|
||||||
|
normalizeCameraLongitude,
|
||||||
} from './camera.js';
|
} from './camera.js';
|
||||||
|
|
||||||
const DEFAULT_SHOT_DURATION_SEC = 4;
|
const DEFAULT_SHOT_DURATION_SEC = 4;
|
||||||
@@ -50,8 +51,7 @@ export function cameraAtProgress(fromCamera, toCamera, progress) {
|
|||||||
? Number(source.lon)
|
? Number(source.lon)
|
||||||
: t === 1
|
: t === 1
|
||||||
? Number(target.lon)
|
? Number(target.lon)
|
||||||
: ((((lerpAngle(source.lon, target.lon) + 180) % 360) + 360) % 360) -
|
: normalizeCameraLongitude(lerpAngle(source.lon, target.lon)),
|
||||||
180,
|
|
||||||
alt: lerp(source.alt, target.alt),
|
alt: lerp(source.alt, target.alt),
|
||||||
heading: lerpAngle(source.heading, target.heading),
|
heading: lerpAngle(source.heading, target.heading),
|
||||||
pitch: lerp(source.pitch, target.pitch),
|
pitch: lerp(source.pitch, target.pitch),
|
||||||
|
|||||||
Reference in new issue
Block a user