mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 01:32:19 +00:00
Tidy the Cockpit subject camera and HUD fixes after review
- A provider's look, height and speed are read once, so a getter that answers once is not lost; a Promise in a provider's words is refused and its rejection handled. - A huge heading slew rate is capped at a half turn per step instead of overflowing to Infinity. - A row changed in place keeps the time it first appeared; JSDoc, CURRENT-STATE and the ETA test say so. - APPLICATION.md says the app page must load the entry icon's glyph. - Tests check that entry succeeds, the vessel bridge is entered, a floor takes over from the entry height (also at 0 m), and share helpers; the provider unit test moves to the provider tests. - WIDE_GLYPH uses escapes; comments, the release notes and CURRENT-STATE match the code.
This commit is contained in:
1 parent
a72c0ba237
commit
109bb0fd4f
14 files changed
+279
-163
No files matched your search
+4
-8
@@ -58,19 +58,15 @@ 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.
|
||||
*/
|
||||
/** How late past its interval an update may come and still count in full. */
|
||||
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 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.
|
||||
* its interval plus COCKPIT_SUBJECT_LATE_SEC. A subject updated every 500 ms,
|
||||
* or a browser drawing 5 frames a second, then keeps up, while a long stall
|
||||
* (a hidden tab) counts as one late update.
|
||||
* @param {number} elapsedMs Time since the last camera update.
|
||||
* @param {number} intervalMs The subject's update interval (0: every frame).
|
||||
* @returns {number}
|
||||
|
||||
Reference in new issue
Block a user