mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 17:52:21 +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
@@ -411,7 +411,9 @@ function updateSubject(nowMs) {
|
||||
: slewHeading(
|
||||
this.heading ?? frame.headingDeg,
|
||||
frame.headingDeg,
|
||||
rate * dtSec,
|
||||
// At most half a turn, which reaches any heading: a huge rate times
|
||||
// the step must not overflow to Infinity and stop the turn.
|
||||
Math.min(rate * dtSec, 180),
|
||||
);
|
||||
}
|
||||
let look = null;
|
||||
@@ -506,8 +508,8 @@ function placeCamera(target, info, nowMs, dtSec, profile, look = null) {
|
||||
);
|
||||
const correction = sub(target, this.cockpitAnchor);
|
||||
const correctionDistanceM = magnitude(correction);
|
||||
// An application subject's step is already bounded by its own update
|
||||
// interval (cockpitSubjectStepSec); the built-in views keep the 0.1 s.
|
||||
// An application subject's step is already bounded (cockpitSubjectStepSec);
|
||||
// the built-in views keep the 0.1 s.
|
||||
const correctionStepM = cockpitAnchorCorrectionStep(
|
||||
correctionDistanceM,
|
||||
speedMps,
|
||||
|
||||
Reference in new issue
Block a user