mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-21 02:32:18 +00:00
fix(selection): selecting or tracking a contact never recolours it
A tracked aircraft's icon and 3D model keep the colours they have untracked in Flights and Military Flights (no cyan, no lighter amber); only the icon's alpha changes (stale fade, clear while its model draws). A selected vessel or aid keeps its type colour instead of white, and a tracked satellite's dot keeps its class colour instead of yellow. An emergency stays red while tracked.
This commit is contained in:
1 parent
2f0c01eaa7
commit
f49352d228
23 files changed
+192
-108
No files matched your search
@@ -271,13 +271,22 @@ test('the rendering part draws the dots, the tracked dot and the rings through t
|
||||
state._enabled = true;
|
||||
state._params = { showPoints: false, showOrbits: false };
|
||||
let at = { x: 10, y: 20, z: 30 };
|
||||
const carrier = rendering._addTrackedEntity({ position: () => at });
|
||||
const issRed = [1, 0.27, 0.27, 1];
|
||||
const carrier = rendering._addTrackedEntity({
|
||||
position: () => at,
|
||||
color: issRed,
|
||||
});
|
||||
assert.deepEqual(carrier, { noradId: 25544 });
|
||||
const tracked = draw.set(points.replace(':points', ':tracked'));
|
||||
assert.equal(tracked.items.size, 0);
|
||||
rendering._preRenderTick({ frame: 3 });
|
||||
assert.deepEqual(tracked.items.get('25544').pos, at);
|
||||
assert.equal(tracked.items.get('25544').pixelSize, 14);
|
||||
assert.deepEqual(
|
||||
tracked.items.get('25544').color,
|
||||
issRed,
|
||||
'the satellite keeps its own colour',
|
||||
);
|
||||
assert.equal(tracked.items.get('25544').disableDepthTest, Infinity);
|
||||
at = { x: 11, y: 21, z: 31 };
|
||||
rendering._preRenderTick({ frame: 4 });
|
||||
|
||||
Reference in new issue
Block a user