mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 17:52:21 +00:00
Remove the Cyber HUD layout and keep its sonar as a visual style
Display > HUD > Sonar now turns the sonar sweep on over Tactical or Minimal. It is off by default, ON reveals its five sliders, and it keeps its guards: an OFF control, the sweep only while the HUD is visible and outside Cockpit, no animation under reduced motion, and repaint timers re-armed only after a drawn frame that still shows contacts. The Cyber layout, its shell skin and its Cockpit lanes are removed. Share links, scenes, saved views and set_hud that name Cyber open Tactical with Sonar on; links and scene shots record Tactical with Sonar under the same code, and a restored state that names another layout turns Sonar off. set_cyber_sonar keeps its name and works under any layout. A newer Sonar toggle or voice setting wins over a share-link restore that lands later. From 1200px wide the command dock and World Timeline sit 74px above the bottom edge, as in the Omnibar layout, leaving the bottom row to the map attribution (left) and the Power Up corner row (right). The attribution moves to the bottom right when the page runs right to left, where the corner row sits at the bottom left, and a long credit line wraps upward before reaching the corner row. The Tactical bottom-right readout sits 8px above Power Up and the coordinates start level with it. The World Timeline is narrowed to sit between the corners. Toasts keep clear of the raised dock and the chat and voice panel height budgets subtract its rise. Below 1200px the layout is unchanged. The left rail treats the centered World Timeline and voice control as obstacles only where they reach a laid-out panel. On top of the Omnibar: sonar.css replaces cyber.css after the Omnibar imports, the Omnibar's HUD guide step now says Layout picks Tactical or Minimal, and the Omnibar's Tactical bottom-right readout keeps the same 8px above Power Up. Co-authored-by: Sameh Khamis <[email protected]>
This commit is contained in:
1 parent
35b87c75f2
commit
d68adcea21
112 files changed
+1433
-5239
No files matched your search
@@ -96,7 +96,7 @@ export const AWARENESS_RANGE_RING_STYLE = Object.freeze({
|
||||
* (tracking, cockpit, orbit, a fly-to) do not. Below the band's height they
|
||||
* rest too. While they run they never hold
|
||||
* continuous rendering; each drawn frame arms one more step after the
|
||||
* Cyber sonar's 80 ms cadence, so the two never beat. Fronts and band,
|
||||
* sonar's 80 ms cadence, so the two never beat. Fronts and band,
|
||||
* fixed in the world, step at that cadence however many frames are
|
||||
* drawn, so they look the same whether the camera moves or not; crossing
|
||||
* the rim height shows or hides them at once.
|
||||
|
||||
@@ -430,7 +430,7 @@ export function createRangeRing({
|
||||
* Run the range pulses again for `activeMs`, after a camera move. Call it
|
||||
* during a frame (lifecycle's preRender): that frame's postRender arms the
|
||||
* next request, so waking asks for no extra frame of its own. Pulses at
|
||||
* rest start in this frame; running ones keep their Cyber sonar interval,
|
||||
* rest start in this frame; running ones keep their sonar interval,
|
||||
* however many frames a drag draws.
|
||||
*/
|
||||
function wakePulses() {
|
||||
@@ -506,7 +506,7 @@ export function createRangeRing({
|
||||
const { lines, band } = setsOn(viewer);
|
||||
const frame = findFrame(viewer);
|
||||
// A renderer without frame hooks gets the static ring only, as the
|
||||
// Cyber sonar scene does. So does a viewer who prefers reduced motion.
|
||||
// sonar scene does. So does a viewer who prefers reduced motion.
|
||||
const animate = Boolean(!reducedMotion && frame?.on);
|
||||
// Pulses run from now until `wake.untilMs`, then rest.
|
||||
const wake = animate
|
||||
@@ -681,7 +681,7 @@ export function createRangeRing({
|
||||
bandShown = false;
|
||||
return;
|
||||
}
|
||||
// The soft band is painted at most once a Cyber sonar interval;
|
||||
// The soft band is painted at most once a sonar interval;
|
||||
// the fronts, crisp lines, move on every step.
|
||||
if (
|
||||
bandShown &&
|
||||
@@ -726,7 +726,7 @@ export function createRangeRing({
|
||||
// Whether the camera was below the rim at the last step.
|
||||
let wasBelow = belowRim();
|
||||
// The fronts and band are fixed in the world: a camera move needs
|
||||
// nothing of them, so they step a Cyber sonar interval apart however
|
||||
// nothing of them, so they step a sonar interval apart however
|
||||
// many frames are drawn, and look the same parked or moving. Each
|
||||
// frame checks only whether the camera crossed the rim height, which
|
||||
// shows or hides them at once. A step asks for the frame that draws
|
||||
@@ -746,8 +746,8 @@ export function createRangeRing({
|
||||
stepRunning(nowMs);
|
||||
}
|
||||
});
|
||||
// Each drawn frame, whoever asked for it, arms one step a Cyber
|
||||
// sonar interval later, as the Cyber sonar scene does, whose changes
|
||||
// Each drawn frame, whoever asked for it, arms one step a
|
||||
// sonar interval later, as the sonar scene does, whose changes
|
||||
// ask for the frame that draws them. Requests never land within
|
||||
// 80 ms of a frame, so they cannot beat the detection lane's 80 ms
|
||||
// gate, and they stop once the pulses rest.
|
||||
|
||||
@@ -488,7 +488,7 @@ test('pulses ask for a frame 80 ms after each drawn frame instead of holding con
|
||||
const { rendering, pulseFrames } = ring;
|
||||
const loop = frameLoop(t, ring);
|
||||
rendering.renderVisual(flight(3));
|
||||
// A Contacts view repaints at the Cyber sonar cadence, ~12.5 fps, while
|
||||
// A Contacts view repaints at the sonar cadence, ~12.5 fps, while
|
||||
// the pulses run, never every display frame.
|
||||
assert.equal(pulseFrames(), 0);
|
||||
loop.advance(1); // the frame the new ring asked for arms the first request
|
||||
@@ -972,14 +972,14 @@ test('disabling the layer tears the pulses down completely', (t) => {
|
||||
);
|
||||
});
|
||||
|
||||
test('pulse requests wait 80 ms after any frame, so they cannot beat the Cyber sonar', (t) => {
|
||||
test('pulse requests wait 80 ms after any frame, so they cannot beat the sonar', (t) => {
|
||||
const ring = ringRendering(t);
|
||||
const { rendering, pulseFrames } = ring;
|
||||
const loop = frameLoop(t, ring);
|
||||
rendering.renderVisual(flight(3));
|
||||
loop.advance(1);
|
||||
const frames = pulseFrames();
|
||||
// Another owner (the Cyber sonar, a data update) draws 67 ms after ours.
|
||||
// Another owner (the sonar, a data update) draws 67 ms after ours.
|
||||
loop.advance(67);
|
||||
loop.draw();
|
||||
loop.advance(CYBER_SONAR_RENDER_INTERVAL_MS - 1);
|
||||
|
||||
Reference in new issue
Block a user