mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 01:32:19 +00:00
Keep an application's Cockpit subject steady in the camera and HUD
- A height the entry frame gave holds while later frames give none and the floor is still cold, so the view no longer waits and ends. - A subject's camera update advances by the time since the last one, up to its interval plus a second: at 5 frames a second an inertial subject no longer falls behind (700 m in a minute at 30 m/s), while a hidden tab still counts as one late update. - A provider's Live Signals rows change where they stand and come back after newer rows pushed them off, so a changing ETA no longer hides a steady warning; the built-in rows log as before. - Progress labels give full-width glyphs (CJK, kana, Hangul) about 1 em, so such stop names no longer overlap. - A provider's labels, entry face and look start from the words checked at registration, so one that fails on its next read keeps them. The double-click test on a selected vessel now projects through SceneTransforms, as the scene query port does, with a control that enters the bridge.
This commit is contained in:
1 parent
624c229bc2
commit
a2a61c506f
12 files changed
+329
-58
No files matched your search
+11
-4
@@ -58,12 +58,19 @@ export function cockpitAnchorCorrectionStep(
|
||||
return Math.min(distanceM, eased, correctionRateMps * dt);
|
||||
}
|
||||
|
||||
/**
|
||||
* How late past its interval a subject's camera update may come and still
|
||||
* advance by all of it: a browser drawing a frame a second still keeps up.
|
||||
*/
|
||||
const COCKPIT_SUBJECT_LATE_SEC = 1;
|
||||
|
||||
/**
|
||||
* The seconds an application subject's camera update advances its heading
|
||||
* slew, ground lift and anchor by: the time since the last update, at most
|
||||
* its update interval plus 0.1 s. A subject updated every 500 ms then turns
|
||||
* and eases at its configured rates, while a long stall (a hidden tab) still
|
||||
* moves it no further than one late update would.
|
||||
* its update interval plus a second. A subject updated every 500 ms, or a
|
||||
* browser drawing 5 frames a second, then turns, eases and moves at its
|
||||
* configured rates, while a long stall (a hidden tab) still moves it no
|
||||
* further than one late update would.
|
||||
* @param {number} elapsedMs Time since the last camera update.
|
||||
* @param {number} intervalMs The subject's update interval (0: every frame).
|
||||
* @returns {number}
|
||||
@@ -75,7 +82,7 @@ export function cockpitSubjectStepSec(elapsedMs, intervalMs) {
|
||||
const intervalSec = Number.isFinite(intervalMs)
|
||||
? Math.max(0, intervalMs) / 1000
|
||||
: 0;
|
||||
return Math.min(intervalSec + 0.1, elapsedSec);
|
||||
return Math.min(intervalSec + COCKPIT_SUBJECT_LATE_SEC, elapsedSec);
|
||||
}
|
||||
|
||||
/** Return whether a throttled cockpit presentation update is due. */
|
||||
|
||||
Reference in new issue
Block a user