mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-15 15:52:21 +00:00
refactor(flights): pass the record already in hand to the military fleet tint; default info on both civil tint helpers
Co-Authored-By: Claude <[email protected]>
This commit is contained in:
1 parent
15b13e947b
commit
9af1ee0e09
2 files changed
+11
-3
No files matched your search
@@ -66,14 +66,20 @@ export function createRendering({
|
|||||||
* amber for known-military, white otherwise.
|
* amber for known-military, white otherwise.
|
||||||
* Ground traffic gets NO special tint (owner verdict 2026-07-03 field test). */
|
* Ground traffic gets NO special tint (owner verdict 2026-07-03 field test). */
|
||||||
|
|
||||||
function _fleetBillboardColor(icao24, info) {
|
function _fleetBillboardColor(
|
||||||
|
icao24,
|
||||||
|
info = flightState.records.data.get(icao24),
|
||||||
|
) {
|
||||||
if (_isEmergency(icao24, info)) return EMERGENCY_TINT;
|
if (_isEmergency(icao24, info)) return EMERGENCY_TINT;
|
||||||
return isMilitaryIcao(icao24) ? MIL_TINT : Cesium.Color.WHITE;
|
return isMilitaryIcao(icao24) ? MIL_TINT : Cesium.Color.WHITE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Cockpit far-contact dot tint: the emergency red outranks the category tint. */
|
/** Cockpit far-contact dot tint: the emergency red outranks the category tint. */
|
||||||
|
|
||||||
function _cockpitContactColor(icao24, info) {
|
function _cockpitContactColor(
|
||||||
|
icao24,
|
||||||
|
info = flightState.records.data.get(icao24),
|
||||||
|
) {
|
||||||
if (_isEmergency(icao24, info)) return EMERGENCY_TINT;
|
if (_isEmergency(icao24, info)) return EMERGENCY_TINT;
|
||||||
return isMilitaryIcao(icao24) ? MIL_TINT : COCKPIT_CIVILIAN_COLOR;
|
return isMilitaryIcao(icao24) ? MIL_TINT : COCKPIT_CIVILIAN_COLOR;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,7 +175,9 @@ export function createRendering({
|
|||||||
bb.height = icao24 === flightState._trackedIcao ? 24 : 20;
|
bb.height = icao24 === flightState._trackedIcao ? 24 : 20;
|
||||||
bb.scale = _militaryBillboardScale(icao24) * limbScale;
|
bb.scale = _militaryBillboardScale(icao24) * limbScale;
|
||||||
bb.scaleByDistance = _normalBillboardScaleByDistance();
|
bb.scaleByDistance = _normalBillboardScaleByDistance();
|
||||||
bb.color = _fleetBillboardColor(icao24).withAlpha(cyberSonarBaseAlpha(bb));
|
bb.color = _fleetBillboardColor(icao24, meta).withAlpha(
|
||||||
|
cyberSonarBaseAlpha(bb),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sprite kind for one contact's billboard. Identity for every aircraft except
|
/** Sprite kind for one contact's billboard. Identity for every aircraft except
|
||||||
|
|||||||
Reference in new issue
Block a user