Merge branch 'main' into feat/transit-icon-heading

This commit is contained in:
Said Turksever authored and GitHub committed 2026-11-09 15:06:36 +00:00
commit cbb0a391f2
254 files changed
+26623 -843

No files matched your search

+1
View File
@@ -3927,6 +3927,7 @@ test('parked transit reprojects held and reported courses at the bounded camera
_rotationRevision: -1,
_cameraRevision: 0,
_rotationDirty: false,
now: () => Date.now(),
};
const noop = () => {};
const rendering = createRendering({
+6 -6
View File
@@ -108,7 +108,7 @@ export function createRendering({ state, services, parts }) {
}
function sampleIdle(entry) {
if (!state._moving.has(entry)) {
updatePlayback(entry, Date.now(), performance.now());
updatePlayback(entry, state.now(), performance.now());
placeSample(entry);
}
}
@@ -172,7 +172,7 @@ export function createRendering({ state, services, parts }) {
() => {
entry.wakeTimer = null;
if (!state._enabled || !state._vehicles.has(entry.key)) return;
updatePlayback(entry, Date.now(), performance.now());
updatePlayback(entry, state.now(), performance.now());
placeSample(entry);
schedulePlayback(entry);
syncRenderHold();
@@ -400,7 +400,7 @@ export function createRendering({ state, services, parts }) {
)
return;
if (!state._enabled) return;
const now = Date.now();
const now = state.now();
if (state._vehicles.size === 0) {
state._moving.clear();
syncRenderHold();
@@ -436,7 +436,7 @@ export function createRendering({ state, services, parts }) {
}
parts.trails.update();
refreshRotations(now);
refreshRotations(Date.now());
const selected = state._vehicles.get(state._selectedKey);
if (selected && state._visible.has(selected)) {
syncHeadingIcon(selected);
@@ -502,7 +502,7 @@ export function createRendering({ state, services, parts }) {
const noSample = !entry.sample || !Number.isFinite(entry.sample.lat);
if (entry.track?.count && (!state._visible.has(entry) || noSample)) {
entry.sample ||= {};
updatePlayback(entry, now, performance.now());
updatePlayback(entry, state.now(), performance.now());
}
sphere.center =
state._visible.has(entry) || !entry.sample
@@ -570,7 +570,7 @@ export function createRendering({ state, services, parts }) {
}
function resumePlayback() {
if (!state._enabled) return;
const now = Date.now(),
const now = state.now(),
mono = performance.now();
const entries = new Set(state._visible);
const selected = state._vehicles.get(state._selectedKey);
+3
View File
@@ -1,5 +1,6 @@
import * as Cesium from 'cesium';
import { createHistoryBudget } from '../../data/contactPlayback.js';
import { worldTimeFor } from '../../time/worldClock.js';
/**
* One Transit layer's mutable scene state. Every field lives on the instance,
@@ -14,6 +15,8 @@ export function createState({ services }) {
const state = {};
state._historyBudget = createHistoryBudget();
/** The time vehicles play back behind by their display delay, in epoch ms. */
state.now = worldTimeFor('transit');
state.DEFAULT_OVERLAY_HOST = Object.freeze({
setEntries: setOverlayEntries,