mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Separate vessel records and acquisition from scene resources
This commit is contained in:
1 parent
852008df4d
commit
bdc026e50a
26 files changed
+877
-508
No files matched your search
@@ -57,20 +57,21 @@ export function createTracking({
|
||||
*/
|
||||
|
||||
function refloorVesselRecords() {
|
||||
if (!state.vesselRecords.length) return;
|
||||
for (const record of state.vesselRecords) {
|
||||
if (!state.records.all.length) return;
|
||||
for (const record of state.records.all) {
|
||||
const visual = components.rendering.getVisual(record);
|
||||
if (!Number.isFinite(record.lat) || !Number.isFinite(record.lon))
|
||||
continue;
|
||||
const heightM = components.queries.vesselDatumHeightM(
|
||||
currentGeoidN(record.lat, record.lon),
|
||||
VESSEL_LIFT_M,
|
||||
);
|
||||
record.position = Cesium.Cartesian3.fromDegrees(
|
||||
visual.position = Cesium.Cartesian3.fromDegrees(
|
||||
record.lon,
|
||||
record.lat,
|
||||
heightM,
|
||||
);
|
||||
if (record.billboard) record.billboard.position = record.position;
|
||||
if (visual.billboard) visual.billboard.position = visual.position;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user