Delete dead render code and consolidate QA helpers

Remove code that nothing in the app, the runners or CI uses:
- the one-off migration compare, look and bench scripts and the vector
  ground prototype they measured, with the bench tables in the docs;
- the unused Navara-named shared render modules (polygons, ground picks,
  mover bank, ground ring);
- the Cesium-shaped aircraft and vessel test renderers, and the trail,
  engineFromViewer and horizon-occluder helpers only they kept alive.
  Their tests now run on the production displays over the fake engine;
- Navara's unread diagnostics, fallback ports, dead exports and
  parameters, stale effect-chain anchors and the unread capability flags.

The QA scripts share one keyless guard and readiness wait, the session
harness reuses the strict harness's browser flags and block list, and the
harness honours QA_ANGLE and QA_RESERVED_PORTS. The bikeshare fixture
keeps only what its scenario reads. The docs name the engine picker where
it is (VISUAL PRESETS) and drop dated run results.

No behaviour changes on either engine. Navara layer renderer lines fall
from 189 to 0 and viewer lines from 891 to 849.
This commit is contained in:
German Khokhlov committed 2026-11-08 17:05:38 +04:00
1 parent 18f69c2699
commit 371d848eec
130 files changed
+633 -4542

No files matched your search

+4 -107
View File
@@ -251,113 +251,10 @@ terrain loads later.
Picks are CPU picks at the ground under the pointer (`src/globe/ground.js`).
Navara's vector layers (`src/globe/navara/ground/vector.js`) were measured
as the other candidate and kept only as a prototype. The measurements are
below.
### Measurements
Setup:
- Dubai, 1280×800, keyless, daylight;
- headless Chrome on an Apple M2 Pro (ANGLE Metal);
- `scripts/qa-ground-bench.mjs`.
Frame times are medians, from preUpdate to a 1-pixel readPixels after
postRender. "Still" means the camera is at rest; "moving" means it turns
every frame. The empty scene takes about 6–9 ms in both cases. Memory is
measured after a GC, against the scene before the commit.
Small polygons (10 vertices, 100–400 m, eight colours, 1 px outline):
| N | Cesium still / moving | Navara pass still / moving | Navara vector still / moving |
| ------ | --------------------- | -------------------------- | ---------------------------- |
| 10 | 4.9 / 5.0 ms | 5.7 / 9.5 ms | 5.7 / 24.5 ms |
| 1 000 | 5.8 / 5.9 ms | 6.2 / 10.9 ms | 5.9 / 29.0 ms |
| 10 000 | 12.0 / 11.2 ms | 10.9 / 15.9 ms | 5.7 / 29.0 ms |
What each approach costs, apart from frame time:
| N | Cesium | Navara pass | Navara vector |
| ------ | ---------------------------- | ------------------------- | -------------------------------- |
| 10 | 0.2 s build, +0.2 MB WebGL | 16 ms build, +0.04 MB GPU | 0.24 s build, about +70 MB WebGL |
| 1 000 | 0.23 s build, +19.5 MB WebGL | 68 ms build, +0.45 MB GPU | 0.23 s build, +144 MB WebGL |
| 10 000 | 0.8 s build, +40 MB WebGL | 0.26 s build, +4.0 MB GPU | 0.5 s build, +146 MB WebGL |
The JS heap at 10 000 polygons: Cesium +47 MB, Navara pass +16 MB, Navara
vector +19 MB.
One polygon of N vertices across the view (2 px outline), still:
| N | Cesium | Navara pass | Navara vector |
| ----- | ------ | ----------- | ------------- |
| 100 | 6.2 ms | 6.6 ms | 5.3 ms |
| 1 000 | 5.9 ms | 7.0 ms | 5.3 ms |
| 5 000 | 6.4 ms | 7.3 ms | 6.3 ms |
Without the bins, the pass took 46 ms at 1 000 vertices and 137 ms at 5 000.
Corridors (40-point lines, 2.5 px), still / moving:
| N | Cesium | Navara pass | Navara vector |
| ------ | -------------- | -------------- | ------------- |
| 10 | 5.8 / 5.8 ms | 5.7 / 9.7 ms | 6.6 / 25.8 ms |
| 1 000 | 11.2 / 11.2 ms | 18.6 / 24.4 ms | 6.7 / 28.4 ms |
| 10 000 | 21.6 / 21.6 ms | 135 / 174 ms | 6.3 / 28.0 ms |
At 10 000 corridors Cesium allocated 613 MB of WebGL memory, the pass 44 MB
and the vector layers about 70 MB.
The pass with corridor tiles, measured again with the pass before them on
the same day (the machine busier, the empty scene 6.7–8.1 ms):
| N | Cesium | pass before | pass with tiles |
| ------ | -------------- | -------------- | --------------- |
| 1 000 | 12.8 / 13.9 ms | 19.8 / 24.9 ms | 8.7 / 10.0 ms |
| 10 000 | 23.1 / 23.2 ms | 151 / 196 ms | 11.8 / 13.8 ms |
| 15 000 | 31.8 / 31.4 ms | 226 / 289 ms | 17.9 / 19.9 ms |
The tiles hold about what the chunks held: 43 MB of textures at 10 000
corridors (46 MB before), 66 MB at 15 000 (69 MB). Packing takes longer:
the commit of 10 000 corridors went from 0.6 s to 1.1 s, and 15 000 from
0.8 s to 1.7 s.
A pixel corridor's width is now measured across the line (the gradient of
the distance to it), so it is the same at any angle, as on Cesium. Before,
a diagonal line drew up to √2 wider.
Edge quality over the Hajar mountains, oblique view:
- **Cesium:** a sharp drape with its outline.
- **Navara pass:** the same.
- **Navara vector layers:** they are lit and tone-mapped like the scene, so
a fill's colour is not the one asked for. They draw under Navara's clouds.
A clamped polygon's outline is not drawn at all.
Show and hide (`scripts/qa-ground-switch.mjs`), before and after a Navara →
Cesium → Navara switch:
- **The pass:** correct every time.
- **Vector layers hidden by `layer.update({ show: false })`:** never hidden,
before or after a switch.
- **Vector layers hidden by deleting them** (today's workaround in
`navaraPolygons.js`): correct.
### Decision
**Navara draws every kind through the screen pass.** For polygons, discs and
cells it is as fast as Cesium up to 10 000 items. It holds a few megabytes
instead of a hundred or more. It draws exact colours and outlines, and its
show and hide are reliable.
The vector layers draw thin lines cheaply at rest. They cost about 20 ms
more on every frame the camera moves, whatever their count. They draw no
ground outlines and no metre widths. Their colours are lit, and hiding them
needs a rebuild.
Corridors were the pass's limit: 10 000 lines took 135 ms. With a
set-wide grid of bins (corridor tiles), 10 000 take 12 ms still and 14 ms
moving, under Cesium's 23 ms.
Navara draws ground shapes through the screen pass. It keeps colours and
outlines exact, supports pixel and metre widths, and reliably shows and
hides sets. Binned corridor tiles keep draw cost bounded while the camera
moves, with compact texture storage.
## Imagery: rasters on the ground