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

+7 -19
View File
@@ -6,8 +6,8 @@
* Each tick, before the renderer decides whether to draw: a change of the
* theme, the sweep, its settings or the map's size sets the sector at once;
* while sweeping, the sector moves to the current angle on every tick that
* draws anyway, and at least at the renderer's `sonarCadenceHz` (which then
* asks for a frame). Out of the theme the sector is cleared.
* draws anyway, and at least every `CYBER_SONAR_RENDER_INTERVAL_MS` (which
* then asks for a frame). Out of the theme the sector is cleared.
*
* A renderer without the capability, or one that does not list the pass
* once a sector is set, leaves markers as they are: the document's
@@ -25,16 +25,8 @@ import {
readCyberSonarSettings,
syncCyberSonarAnimation,
} from './cyberSonar.js';
import {
canvasOf,
findEffects,
findFrame,
rendererOf,
} from './render/rendererOf.js';
import { canvasOf, findEffects, findFrame } from './render/rendererOf.js';
/** Sweep updates per second when the renderer's quality has no setting. */
export const CYBER_SONAR_DEFAULT_CADENCE_HZ =
1000 / CYBER_SONAR_RENDER_INTERVAL_MS;
const UNSUPPORTED_MESSAGE =
'Contact GPU unavailable. Native contacts remain visible.';
@@ -54,14 +46,8 @@ export function createCyberSonarScene(viewer, manager) {
let current = null;
let key = null;
let lastSetAt = Number.NEGATIVE_INFINITY;
let interval = CYBER_SONAR_RENDER_INTERVAL_MS;
let disposed = false;
const readCadence = () => {
const hz = Number(rendererOf(viewer)?.quality?.get?.()?.sonarCadenceHz);
interval = 1000 / (hz > 0 ? hz : CYBER_SONAR_DEFAULT_CADENCE_HZ);
};
const publish = () => {
const support = failed ? 'unsupported' : 'supported';
if (root?.dataset && root.dataset.cyberSonarGpu !== support)
@@ -120,11 +106,13 @@ export function createCyberSonarScene(viewer, manager) {
const now = performance.now();
if (
next === key &&
!(sweeping && (now - lastSetAt >= interval || t.rendering))
!(
sweeping &&
(now - lastSetAt >= CYBER_SONAR_RENDER_INTERVAL_MS || t.rendering)
)
)
return;
key = next;
readCadence();
set(cyberSonarSector(width, height, now, { sweeping, root }), now);
});