Take transit's state, trails and selection off Cesium

The per-frame scratch position is a plain object, and trail vertices come
from geo/ellipsoid's fromDegrees, which matches Cesium's to the bit; the
billboards and trail geometry they feed copy them as before. The pick
diagnostic names the picked marker's collection from its vehicle rather
than from Cesium's private field. state, trails and selection leave the
Cesium allow-list.
This commit is contained in:
Sameh Khamis committed 2026-11-06 21:23:57 -08:00
1 parent f6ed35a887
commit 56d56a4d6d
5 files changed
+25 -21

No files matched your search

+4 -4
View File
@@ -1,4 +1,3 @@
import * as Cesium from 'cesium';
import { createHistoryBudget } from '../../data/contactPlayback.js';
/**
@@ -22,9 +21,9 @@ export function createState({ services }) {
});
state._overlayHost = state.DEFAULT_OVERLAY_HOST;
/** @type {Cesium.Viewer|null} */
/** The viewer the layer draws on, or null. */
state._viewer = null;
/** @type {Cesium.BillboardCollection|null} */
/** The stationary markers' billboard collection, or null. */
state._markers = null;
state._animatedMarkers = null;
state._visible = new Set();
@@ -120,7 +119,8 @@ export function createState({ services }) {
state._error = null;
state._limitWarned = false;
state._scratchCartesian = new Cesium.Cartesian3();
// Where `samplePosition` writes a marker's position, each frame.
state._scratchCartesian = { x: 0, y: 0, z: 0 };
return state;
}