Draw transit vehicles through the renderer ports, off the Cesium list

Transit drew its vehicles into two Cesium billboard collections and culled,
turned and floored them through the Cesium scene. It now draws them as two
draw-port icon sets, still and moving, registered with the sprite order by
set id in the same places. Each marker is a plain record; a frame writes the
changed ones in one upsert per set, and markers taken out in one task go in
one removal. Clicks read the draw-port hit.

Visibility uses the query port's horizon test and the frustum planes of the
camera port's pose. Icons stay turned in screen space by an exact projection
through the query port, the same answer the Cesium helper gave. The flat
globe is told from terrain by asking the height service once per surface
change; floors are read again when the answer flips. The mesh floor sampler
sees through the layer's sets by id. The camera pose and surface version are
read once per task.

The Cesium draw port now moves and turns an icon without restyling it. The
GL upload probe moves to src/render/cesium/uploadProbe.js, which the QA
scripts hand to the frame probe; the QA scripts read the billboards drawn for
each set.
This commit is contained in:
Sameh Khamis committed 2026-11-08 21:44:22 -08:00
1 parent 00ae80908c
commit 347427f83d
24 files changed
+1618 -452

No files matched your search

+61 -16
View File
@@ -397,6 +397,28 @@ test('sensor sampler waits for postRender and reads framebuffer pixels; stopped
}),
}),
};
// The marker record (fresh with each state read, as the fixture's
// wrappers are), and the billboard the draw port drew for the latest one
// in the layer's still set.
let marker = null;
const billboard = {
id: { set: 'transit:1:still', id: 'bus' },
show: true,
color: { alpha: 1 },
rotation: 0,
get position() {
return marker.position;
},
};
scene.primitives = {
length: 1,
get: () => ({
drawSetId: 'transit:1:still',
show: true,
length: 1,
get: () => billboard,
}),
};
globalThis.window = {
__godsEyeView: {
viewer: { scene },
@@ -406,22 +428,22 @@ test('sensor sampler waits for postRender and reads framebuffer pixels; stopped
'transit',
{
module: {
_transitStateForTest: () => ({
_vehicles: new Map([
[
'bus',
{
key: 'bus',
mode: 'bus',
marker: {
show: true,
image: 'raster',
position: { x: 0, y: 0, z: 0 },
},
},
],
]),
}),
_transitSetIdsForTest: () => [
'transit:1:still',
'transit:1:moving',
],
_transitStateForTest: () => {
marker = {
show: true,
image: 'raster',
position: { x: 0, y: 0, z: 0 },
};
return {
_vehicles: new Map([
['bus', { key: 'bus', mode: 'bus', marker }],
]),
};
},
},
},
],
@@ -603,8 +625,30 @@ test('preset baseline clears a previous city selection before comparing fleet si
_selectedKey: entry.key,
_vehicles: new Map([[entry.key, entry]]),
};
// The billboard the draw port drew for the marker, styled as it is.
const billboard = {
id: { set: 'transit:1:still', id: entry.key },
get width() {
return entry.marker.width;
},
get color() {
return entry.marker.color;
},
};
globalThis.window = {
__godsEyeView: {
viewer: {
scene: {
primitives: {
length: 1,
get: () => ({
drawSetId: 'transit:1:still',
length: 1,
get: () => billboard,
}),
},
},
},
dataManager: {
layers: new Map([
[
@@ -612,6 +656,7 @@ test('preset baseline clears a previous city selection before comparing fleet si
{
module: {
_transitStateForTest: () => state,
_transitSetIdsForTest: () => ['transit:1:still'],
_transitPartsForTest: () => ({
selection: {
clearSelection() {