Keep shape radii, rim gradients, depth-fail looks, sweep cadence and step camera moves out of the renderer contract

Shapes take their radii in metres; the world annotation ring follows the
camera height itself (ringRadiusAt), resizing on preRender. The radial rim
preset and depthBias go: the launch pad zone draws a canvas image fill made
by the layer. Solid and dashed lines take one depthFail look (solid or
dash) in place of depthFailColor and depthFailDash. sonarCadenceHz goes from
the quality settings: nothing set it, and the sweep moves every 80 ms.

Camera move, look, rotateAround and zoom leave the camera port: the app's pans,
in-place turns, globe turns and zooms are setView views summed over the pose
(geo/eyeMoves), and the Cesium port places a view by direction and up
exactly rather than through heading, pitch and roll. The conformance driver
runs those script steps through setView; the lookAt script turns in place
where it turned about the frame-local axis, and its reference is recorded
again.
This commit is contained in:
Sameh Khamis committed 2026-11-10 04:08:41 -08:00
1 parent 7a376ebefc
commit c8346c9fda
44 files changed
+810 -799

No files matched your search

@@ -481,7 +481,10 @@ test('tracking without a Cockpit subject keeps its marks', async (t) => {
/** A ring's drawn colour and behind-the-globe colour. */
function ringColors(f, id) {
const item = f.ring(id);
return { color: [...item.style.color], depthFail: [...item.depthFailColor] };
return {
color: [...item.style.color],
depthFail: [...item.depthFail.color],
};
}
test('a Cockpit subject dims every other orbit ring and restores it exactly', async (t) => {
@@ -506,7 +509,11 @@ test('a Cockpit subject dims every other orbit ring and restores it exactly', as
);
assert.equal(f.ring(ISS_NORAD).show, true, 'other rings stay visible');
assert.equal(f.ring(GPS).show, false, 'the ridden ring stays hidden');
assert.deepEqual(ringColors(f, GPS), gpsBuilt, 'the ridden ring is not dimmed');
assert.deepEqual(
ringColors(f, GPS),
gpsBuilt,
'the ridden ring is not dimmed',
);
// Other satellites' points stay as they are.
assert.equal(f.state._points.get(COMPANION).show, true);
+1 -1
View File
@@ -251,7 +251,7 @@ test('the rendering part draws the dots, the tracked dot and the rings through t
assert.equal(rings.spec.pickable, false, 'ring clicks fall through');
const ring = rings.items.get('25544');
assert.deepEqual(ring.style, { kind: 'solid', color: [1, 1, 0, 0.6] });
assert.deepEqual(ring.depthFailColor, [1, 1, 0, 0.35]);
assert.deepEqual(ring.depthFail, { kind: 'solid', color: [1, 1, 0, 0.35] });
assert.equal(ring.widthPx, 2.5, 'the ISS ring is wider');
assert.equal(ring.mode, 'geodesic');
assert.deepEqual([...ring.positions.slice(0, 3)], [7e6, 0, 0]);
+10 -7
View File
@@ -229,10 +229,10 @@ export function createRendering({
kind: 'solid',
color: withAlpha(path.color, RING_ALPHA * factor),
};
path.item.depthFailColor = withAlpha(
path.color,
RING_BEHIND_ALPHA * factor,
);
path.item.depthFail = {
kind: 'solid',
color: withAlpha(path.color, RING_BEHIND_ALPHA * factor),
};
sets?.rings.upsert([path.item]);
return true;
}
@@ -460,7 +460,7 @@ export function createRendering({
/**
* Show orbital path for a satellite: the ring over one orbit, baked once
* in ECEF at the current GMST, bright in front of the globe and dimmed
* behind it (`depthFailColor`), and turned with the Earth each
* behind it (`depthFail`), and turned with the Earth each
* `RING_ROTATION_MS` (`_updateOrbitPathRotations`).
*/
@@ -494,7 +494,10 @@ export function createRendering({
// Along the ellipsoid between samples, as the ring always ran.
mode: 'geodesic',
style: { kind: 'solid', color: withAlpha(pathColor, RING_ALPHA) },
depthFailColor: withAlpha(pathColor, RING_BEHIND_ALPHA),
depthFail: {
kind: 'solid',
color: withAlpha(pathColor, RING_BEHIND_ALPHA),
},
show: true,
};
layerState._orbitPaths.set(noradId, path);
@@ -521,7 +524,7 @@ export function createRendering({
*
* No SGP4 here: WGS84 is rotationally symmetric about Z, so rotating the
* baked curve rigidly equals rebaking from rotated points. A ring with a
* `depthFailColor` is built at once where it now runs, so it never blinks.
* `depthFail` style is built at once where it now runs, so it never blinks.
* @param {Date} nowDate Epoch used for current GMST.
*/