mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 17:52:21 +00:00
Move only the anchor's height when the floor height arrives
- The first height that replaces the entry frame's now moves only the anchor's height. The anchor keeps its place and its eased lift, so the camera no longer jumps to a corrected fix or steps back. - A detail line is measured with the title's glyph widths. They are a little wide for its smaller type, so a long detail line is no longer clipped. - The first aircraft update is checked in the existing test, and the copy is removed; test fixtures are simpler. - Comments, the release note and CURRENT-STATE match the code.
This commit is contained in:
1 parent
c190e662bc
commit
83081730c0
9 files changed
+176
-138
No files matched your search
+14
-8
@@ -403,11 +403,18 @@ function updateSubject(nowMs) {
|
||||
this.surfaceWaitStartedMs = 0;
|
||||
this.surfaceAcquiring = false;
|
||||
if (!held) {
|
||||
// The first height to replace the entry frame's places the anchor
|
||||
// anew: an inertial one would close on it only at the horizontal
|
||||
// correction's rate.
|
||||
if (this.subjectHeightFromEntry && heightM !== this.subjectHeightM)
|
||||
this.cockpitAnchorValid = false;
|
||||
// The first height to replace the entry frame's is the anchor's at once
|
||||
// (an inertial anchor would close on it only at the horizontal
|
||||
// correction's rate); where the anchor stands, it stays.
|
||||
if (
|
||||
this.subjectHeightFromEntry &&
|
||||
this.cockpitAnchorValid &&
|
||||
heightM !== this.subjectHeightM
|
||||
) {
|
||||
const anchor = toCartographicRadians(this.cockpitAnchor);
|
||||
if (anchor)
|
||||
this.cockpitAnchor = fromRadians(anchor.lon, anchor.lat, heightM);
|
||||
}
|
||||
this.subjectHeightFromEntry = false;
|
||||
}
|
||||
this.subjectHeightM = heightM;
|
||||
@@ -472,9 +479,8 @@ function updateSubject(nowMs) {
|
||||
* Aircraft pass none and look along the heading at the profile pitch.
|
||||
*/
|
||||
function placeCamera(target, info, nowMs, dtSec, profile, look = null) {
|
||||
// An update that sets the anchor stands it on the target with no step:
|
||||
// the first one (the time before it, an entry or a floor wait, moved
|
||||
// nothing), and a subject's whose height replaced its entry frame's.
|
||||
// The update that first sets the anchor stands it on the target: the time
|
||||
// before it (an entry, a floor wait) moved nothing, so it has no step.
|
||||
const anchoring = !this.cockpitAnchorValid;
|
||||
if (anchoring) {
|
||||
this.cockpitAnchorValid = true;
|
||||
|
||||
Reference in new issue
Block a user