mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 09:12:18 +00:00
The renderer seam: clicks go to the newest tool, recession and display groups through the contract, drawing at parity with Cesium
- Clicks: when two tools want the globe's clicks, the newest takes them and the older is told and turns itself off; a click is decided when it arrives, and ambient selection fires only when no tool holds the pointer. The "map is busy" paths and their strings are removed. - Recession: the limb fade is shared (src/render/recession.js) and reaches icon and model sets through SetSpec.recede; tuning applies on the next frame. - Display panel groups are published through src/ui/displayGroups.js; the Weather group and src/viewWeather.js are removed. - Draw port: a set whose icons only move is moved in place, and models that did not change are not restyled each frame, so moving fleets cost what they did when drawn directly; an untinted, fully opaque model is drawn without a colour. - Conformance: input.lease.lost checks the new lease inside onLost and reports a throwing onLost; draw.sets.recede covers model sets. - QA scripts read the renderer host instead of internals the seam replaced.
This commit is contained in:
1 parent
a0d299523d
commit
0ab31d4fb8
130 files changed
+5438
-1674
No files matched your search
@@ -8,6 +8,7 @@ import {
|
||||
} from '../geo/julian.js';
|
||||
import { clone, distance } from '../geo/vector.js';
|
||||
import { curvePieceAt, fixCurveCached } from './fixCurve.js';
|
||||
import { historyBracketIndex, historyUnseenAt } from './timelineHistory.js';
|
||||
import {
|
||||
COAST_MAX_SPEED_MPS,
|
||||
courseBetweenCartesians,
|
||||
@@ -136,6 +137,7 @@ export function createMotionRegime() {
|
||||
turnRateDps: 0,
|
||||
minDt: 0,
|
||||
maxDt: 0,
|
||||
unseen: false,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -164,7 +166,9 @@ export function createMotionRegime() {
|
||||
* five minutes past it, then stops (SIGNAL LOST). A contact last heard on
|
||||
* or near the ground holds there instead (`staleHoldsForFix`, decided once
|
||||
* per report), and a chain of synthetic fixes never coasts further than
|
||||
* the real report they were built from would.
|
||||
* the real report they were built from would. Following the clock, a
|
||||
* warm-up well before a contact's own first fix is `unseen`: it was not
|
||||
* there yet, and is not drawn (`historyUnseenAt`).
|
||||
*
|
||||
* @param {Array<object>} history Non-empty, oldest first.
|
||||
* @param {object|undefined} info The contact's record.
|
||||
@@ -186,13 +190,24 @@ export function aircraftMotionRegime(
|
||||
// contact is drawn report to report, as its trail is.
|
||||
let report = history.length - 1;
|
||||
while (report >= 0 && isSyntheticFix(history[report])) report--;
|
||||
// The pairs are read back from the fix after the first one at or after
|
||||
// the render time (so a fix at exactly that time takes the later pair, as
|
||||
// it always did; past any superseded synthetic fix there), found by
|
||||
// halving, and stop at the first pair wholly before it: a contact
|
||||
// following the clock keeps a long history.
|
||||
let start = Math.min(
|
||||
historyBracketIndex(history, renderTime) + 1,
|
||||
history.length - 1,
|
||||
);
|
||||
while (start < report && isSyntheticFix(history[start])) start++;
|
||||
let b = null;
|
||||
for (let i = history.length - 1; i >= 0; i--) {
|
||||
for (let i = start; i >= 0; i--) {
|
||||
const a = history[i];
|
||||
if (i < report && isSyntheticFix(a)) continue;
|
||||
const pairB = b;
|
||||
b = a;
|
||||
if (!pairB) continue;
|
||||
if (julianLessThan(pairB.time, renderTime)) break;
|
||||
if (
|
||||
!julianLessThanOrEquals(a.time, renderTime) ||
|
||||
!julianLessThanOrEquals(renderTime, pairB.time)
|
||||
@@ -219,6 +234,7 @@ export function aircraftMotionRegime(
|
||||
result.chordCourse =
|
||||
blend > 0 ? courseBetweenCartesians(a.position, pairB.position) : null;
|
||||
result.blend = blend;
|
||||
result.unseen = false;
|
||||
return result;
|
||||
}
|
||||
const newest = history[history.length - 1];
|
||||
@@ -226,6 +242,7 @@ export function aircraftMotionRegime(
|
||||
result.kind = 'fix';
|
||||
result.piece = null;
|
||||
result.fix = warming ? history[0] : newest;
|
||||
result.unseen = warming && historyUnseenAt(history, renderTime);
|
||||
result.speed = fixSpeedMps(result.fix, info, fields);
|
||||
result.heading = fixTrackDeg(result.fix, info, fields);
|
||||
// Past the newest report it flies straight on along its course: a turn
|
||||
|
||||
Reference in new issue
Block a user