mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 09:12:18 +00:00
Draw contact trails through the draw port
The shared trail renderer draws a trail's history and its live head as lines in a draw-port set, geodesic for the history and straight for the head, each dimmed behind the surface in its depth-fail colour, and leaves the Cesium allow-list. The flights and military trail heads are drawn through the trail each frame from the frame port instead of entity callbacks, and the local ADS-B head uses the same head line. A head given while its trail is hidden waits until the trail shows. Geodesic lines are cut a step a degree of arc, with at least 64 steps over the line, so a long trail of short legs costs its positions rather than 64 vertices a leg.
This commit is contained in:
1 parent
6bbe35f232
commit
8cefc8cc4a
12 files changed
+631
-350
No files matched your search
@@ -162,13 +162,11 @@ export function createFlightState({ source, services }) {
|
||||
|
||||
flightState._trail = null;
|
||||
|
||||
/** @type {Cesium.Entity|null} Per-frame head segment: last body point → live icon */
|
||||
/** @type {(() => void)|null} Stops the per-frame live head (last body point → live
|
||||
* icon), drawn as the trail's head line so the head stays glued to the 12 Hz icon
|
||||
* without rebuilding the 400-point trail body every frame. */
|
||||
|
||||
flightState._trailHeadEntity = null;
|
||||
|
||||
/** @type {number} Uniquifier for head-segment entity ids (Cesium requires unique ids). */
|
||||
|
||||
flightState._trailHeadSeq = 0;
|
||||
flightState._trailHeadOff = null;
|
||||
|
||||
/** @type {Cesium.Cartesian3[]} Chronological tracked-aircraft fixes (oldest first) */
|
||||
|
||||
|
||||
Reference in new issue
Block a user