mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
refactor(vessels): Cesium rendering behind a renderer interface
src/layers/vessels/render/cesium.js holds the Cesium objects the layer built itself, one for one: the translucent BillboardCollection of chevrons (centred, screen-aligned, never depth-tested), the horizon occluder, window projection, canvas size, viewer.trackedEntityChanged, and the trail (data/trailRenderer's entity polyline, kept on Cesium: the engine.lines Primitive path did not draw below the photoreal mesh in round 6 — the plan's T13/T15 blocker; flights does the same). The logic imports no Cesium: geo math, Rgba WHITE, the chevron artwork in icons.js, clicks through the engine's selection dispatcher (own-rule owner, same rule). Registered as CESIUM_LAYER_RENDERERS['ais-live-vessels']; src/layers/vessels joins the boundary rule. W1 replay vs7c7422e2: vessels/flights/military/localAdsb counts, known objects, screen points, requests and shot sha256 identical. qa-vessel-cards --data synthetic 2/2 and qa-vessel-datum (?qaFeed= vessels:fixture) 4/4, the same as6eec8f6c. Tests moved with the code (same meaning): cameraHandoff (the click body is handleClick), inputOwnership (the guard precedes the click rule's read of the pick), renderers.test (vessels in the extracted list), importDirections (an unmoved example layer is satellites), the ownership services fixture (renderer service).
This commit is contained in:
1 parent
6b27b21cc4
commit
1fe8267550
23 files changed
+810
-198
No files matched your search
@@ -134,7 +134,9 @@ test('every scene click handler consults ownership before it picks', () => {
|
||||
'src/layers/submarineCables/interaction.js',
|
||||
'viewer.scene.pick(click.position)',
|
||||
],
|
||||
['src/layers/vessels/selection.js', 'viewer.scene.pick(click.position)'],
|
||||
// Vessels take the engine dispatcher's pick (phase 3, 13a): the guard
|
||||
// comes before the click rule reads it.
|
||||
['src/layers/vessels/selection.js', 'resolvePickId(picked)'],
|
||||
];
|
||||
for (const [file, firstPick] of guarded) {
|
||||
const source = read(file);
|
||||
|
||||
@@ -39,6 +39,11 @@ const TYPE_STYLES = [
|
||||
];
|
||||
const DEFAULT_STYLE = { css: '#39d5ff', accent: '57, 213, 255' };
|
||||
|
||||
/** Every chevron hue vesselTypeCss() can return, once each. */
|
||||
export const VESSEL_TYPE_CSS_COLORS = Object.freeze([
|
||||
...new Set([...TYPE_STYLES, DEFAULT_STYLE].map(({ css }) => css)),
|
||||
]);
|
||||
|
||||
const NUMERIC_TYPE_SPECIALS = {
|
||||
30: 'FISHING',
|
||||
31: 'TOWING',
|
||||
|
||||
Reference in new issue
Block a user