mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
fix(local-adsb): the selected aircraft's trail head ends on its icon every frame again
The head was a polyline entity whose positions were read each frame. Its draw-port line was redrawn at most every 100 ms while the aircraft flew, so its end lagged the icon. It is drawn each frame the aircraft moves, as the Flights trail head is; the trail still skips a head that has not moved.
This commit is contained in:
1 parent
6af4b08293
commit
0287ddb9be
2 files changed
+11
-20
No files matched your search
@@ -508,6 +508,14 @@ test('the trail head runs from the last fix to the marker every frame, dimmed be
|
||||
Math.abs(toLonLatH(heads()[0].positions[1]).lat - after) < 1e-9,
|
||||
'the head follows the marker',
|
||||
);
|
||||
// The next frame too, as the entity's head was rebuilt every frame.
|
||||
clock.now = 101_016;
|
||||
listeners.get('preRender')();
|
||||
assert.deepEqual(
|
||||
heads()[0].positions[1],
|
||||
iconOf(draw, 'local-adsb:abc123').pos,
|
||||
'the head ends on the icon a frame later',
|
||||
);
|
||||
|
||||
// A frame where nothing moved leaves the head alone.
|
||||
const writes = trailSet().writes;
|
||||
|
||||
Reference in new issue
Block a user