mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Draw the aircraft family, Wildlife Sightings and the Cockpit through the contract
The layers that still had one Cesium and one Navara implementation, or
drew on Cesium only, now draw through engine.movers, engine.lines and
engine.camera on both engines, and application code holds the engine
instead of guessing it from a viewer.
- Aircraft family: flights, military and local ADS-B share one display
(src/layers/aircraft/render/display.js). The Cesium and Navara
renderers are gone. Where they differed, the display follows Cesium:
- attach and visibility tracking, live disableDepthTestDistance
changes, the tracked glyph's distance scale, model ids that change,
local ADS-B markers hidden until shown and its UAT ring as a point;
- the trail head's hidden alpha is 0.45, the contract's
depthFailAlpha scaled by the head's 0.9.
The tracked glyph stays over the fleet, as on Navara. The movers
contract reports readiness per model and reads model axes as the
glTF's own on every engine. Cesium's follow takes any native target
through a proxy entity in the ENU frame and mirrors its readout fields.
- Wildlife Sightings draws badges and the density glow as sprite sets
and its privacy cells as line outlines (no fill yet). It takes clicks
from engine.input and its card anchors to the engine's canvas and
camera, so the layer is in both engines' catalogs again and a switch
keeps the session's layer set.
- Cockpit: cockpitHost takes the engine only. The ridden aircraft is the
engine follow's target, hidden through its sprite; only the Cesium
Viewer's stock double-click is still routed around.
- About forty camera, navigation, share-link, HUD, voice, detection and
layer-lifecycle callers take the engine. isGlobeEngine and
engineFromViewer calls outside src/globe fall from 51 to 14.
The coupling baseline drops accordingly: layer renderer lines from
5239/12331 to 4546/11106 (Cesium/Navara), `viewer` lines from 2424 to
2209, Cesium-importing files from 69 to 66.
This commit is contained in:
1 parent
48988015f1
commit
35e70ec280
145 files changed
+4716
-4212
No files matched your search
+11
-6
@@ -141,8 +141,11 @@
|
||||
* from the target in its east-north-up frame, metres.
|
||||
* @property {number} [minRange] Closest the camera comes (150 m).
|
||||
* @property {'enu'} [frame]
|
||||
* @property {any} [native] Cesium only (layers' render/cesium.js): the
|
||||
* Entity to put on viewer.trackedEntity instead of a proxy.
|
||||
* @property {any} [native] What is followed, as the handle's `native`. On
|
||||
* Cesium an Entity goes on viewer.trackedEntity itself; anything else (a
|
||||
* layer's own handle) is followed through a proxy Entity, which shows the
|
||||
* handle's tracked-readout fields (gevTrackedId, gevLabelModel,
|
||||
* gevDisplayPosition, gevVisualPosition, gevSelectionOrigin).
|
||||
* @property {{ id: string, model: object | (() => object), position: () => Cartesian3 }} [label]
|
||||
* The tracked readout's card (src/data/trackedReadout.js): its id, label
|
||||
* model ({ title, details, accent, ... }) and anchor, as plain data.
|
||||
@@ -401,7 +404,8 @@
|
||||
* @property {number} [rotation] Sprites: screen angle in radians,
|
||||
* counter-clockwise from screen up (Cesium's Billboard.rotation).
|
||||
* @property {{ x: number, y: number, z: number, w: number }} [orientation]
|
||||
* Models: the model frame's rotation into Earth-fixed axes.
|
||||
* Models: the rotation of the glTF's own axes (as the file stores them,
|
||||
* +Y up) into Earth-fixed axes; no engine adds an axis correction.
|
||||
* @property {number[]} [color] rgba in 0..1; multiplies the sprite's texels.
|
||||
* @property {number} [scale]
|
||||
* @property {string} [cell] An atlas cell key.
|
||||
@@ -415,9 +419,10 @@
|
||||
* @property {() => number} count
|
||||
* @property {() => void} commit Uploads what changed (one buffer write) and
|
||||
* requests a render; nothing else draws a frame.
|
||||
* @property {() => boolean} ready Whether what the set draws has loaded: a
|
||||
* model set's glTF (Cesium: every drawn instance's model), a sprite set's
|
||||
* atlas.
|
||||
* @property {(index?: number) => boolean} ready Whether what the set draws
|
||||
* has loaded: a model set's glTF (Cesium: every drawn instance's model), a
|
||||
* sprite set's atlas. With an index, what that instance draws (Cesium: its
|
||||
* own model; the other engines load a set's glTF once).
|
||||
* A layer keeps its fallback visual until then.
|
||||
* @property {() => void} destroy
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user