Separate vessel records and acquisition from scene resources

This commit is contained in:
Sameh Khamis committed 2026-09-14 16:37:41 -07:00
1 parent 852008df4d
commit bdc026e50a
26 files changed
+877 -508

No files matched your search

+5 -4
View File
@@ -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;
}
}