Batch infrastructure and cable stems through engine.lines

Add copied, committed segment batches to the contract, Cesium, Navara and
the fake engine. Keep each segment's colour, width and pick identity while
drawing one primitive or overlay mesh per display. Preserve Cesium's stem
sizes, ground sampling, visible cohorts, update cadence and click targets.
Navara draws the batch after tone mapping through the existing overlay.

Cover disconnected geometry, picks, hidden replacement, empty batches and
cleanup in the contract suite and engine tests. Keep the infrastructure
and cable display assertions on fake and headless Cesium engines, and
read batch counts and pick identities in the browser checks.

No coupling count fell or grew: all eleven metrics are unchanged, including
891 viewer lines, three external Cesium import files and 189 layer Navara
render lines.

Checked in the browser, keyless: the contract suite passes on both engines,
with the new segment picking and pixel checks; the infrastructure and
submarine-cable engine switches, the cable overlay and infrastructure LOD
scripts pass.
This commit is contained in:
German Khokhlov committed 2026-11-07 22:47:24 +04:00
1 parent fd65288101
commit fbadf792d8
19 files changed
+677 -141

No files matched your search

+20 -2
View File
@@ -490,9 +490,23 @@
* @property {() => void} destroy
* Every call requests a render; nothing animates on its own.
*
* @typedef {object} LineSegments
* A batch of independent, straight, solid, depth-tested world segments.
* replace copies the items; commit draws them together. Omitting an item
* removes it. Width and colour default to the batch's options. Each item
* has its own pickId; picks name the batch as owner. Empty batches draw nothing.
* @property {(items: { positions: Cartesian3[] | Float64Array, widthPx?: number, color?: number[], pickId?: any }[]) => void} replace
* Exactly two positions per segment, never connected to other segments.
* @property {() => void} commit
* @property {(visible: boolean) => void} show
* @property {() => void} destroy
*
* @typedef {object} GlobeLines
* @property {(options: LineOptions) => Line} createLine
* @property {() => { id: string, points: number, shown: boolean }[]} list
* @property {(options: { id: string, widthPx: number, color: number[], order?: number }) => LineSegments} createSegments
* Shares the live id namespace and list with createLine. No dash, arc,
* model matrix or depth-fail copy; each segment is two Earth-fixed endpoints.
* @property {() => { id: string, points: number, shown: boolean, pickIds?: any[] }[]} list
*
* @typedef {object} GroundSetOptions
* A set of flat fills draped on the ground: on terrain and 3D tiles,
@@ -947,7 +961,11 @@ const SHAPE = {
credits: { addStatic: isFunction },
clock: { now: isFunction, frameTime: isFunction },
movers: { createSet: isFunction, list: isFunction },
lines: { createLine: isFunction, list: isFunction },
lines: {
createLine: isFunction,
createSegments: isFunction,
list: isFunction,
},
meshes: { createMesh: isFunction, list: isFunction },
ground: {
createSet: isFunction,