Compare commits

...
Author SHA1 Message Date
Sameh Khamis 9adf3961e1 Merge branch 'main' into samehkhamis/drop-resumed-flight-timing-test 2026-11-20 18:30:35 -08:00
Sameh Khamis 84324ea678 Put the globe actions back on the title row, with the loading line under them (#1884)
The desktop search layout had moved the round globe actions down to the
HUD's top rows, where the loading line (top: 74px) was drawn over them.
They now sit on the title row again (top: 32px), level with the title,
and the loading line stays under them. Narrower than 1180px, where the
centred row would reach the title, the actions keep their lower place and
the loading line moves 42px under them.
2026-11-20 18:30:17 -08:00
Sameh Khamis 8d8a60504e test(scenes): drop the resumed-flight timing test
It timed a 0.2 s camera flight against real timers with a few milliseconds of slack, so slow runners failed it at random. The resumed-hold tests next to it still cover resuming a run partway through a scene.
2026-11-20 17:35:38 -08:00
2 changed files with 13 additions and 45 deletions

No files matched your search

-44
View File
@@ -2150,50 +2150,6 @@ test('a hold resumed partway waits for a clip that starts again, else only its r
assert.deepEqual(await hold(0), [2000]);
});
/** Drive frame-by-frame camera motion headlessly for one test. */
function installAnimationFrames() {
const original = globalThis.requestAnimationFrame;
const originalCancel = globalThis.cancelAnimationFrame;
globalThis.requestAnimationFrame = (callback) => setTimeout(callback, 16);
globalThis.cancelAnimationFrame = (handle) => clearTimeout(handle);
return () => {
globalThis.requestAnimationFrame = original;
globalThis.cancelAnimationFrame = originalCancel;
};
}
test('a run resumed inside a flight goes on from that point of the path and clock', async () => {
const { director, viewer, restore } = makeDirector();
const restoreFrames = installAnimationFrames();
const clock = [];
director.subscribeSceneClock((snap) => clock.push(snap));
const poses = [];
const setView = director._setCameraView.bind(director);
director._setCameraView = (pose) => {
poses.push(pose);
return setView(pose);
};
try {
// 0.75 of a 0.4 s scene: halfway along shot B's 0.2 s flight.
const run = director.startScene('scene-1', {
single: true,
fromProgress: 0.75,
preview: false,
});
await settle(40);
const first = clock.find((snap) => snap.running);
assert.equal(first.shotId, 'shot-b', 'starts in the shot that moment is in');
assert.ok(Math.abs(first.sceneElapsedSec - 0.3) < 1e-9, 'the clock starts at the moment');
// The first frame is the seek's own framing, halfway from A to B.
assert.ok(poses.length, 'the camera is driven from where it is');
assert.ok(Math.abs(poses[0].lat - -10) < 0.5, 'halfway from A to B');
assert.deepEqual(await run, { started: true, shots: 1 });
assert.equal(poses.at(-1).lat, -30, 'and ends on shot B');
assert.equal(viewer.flights.length, 0, 'no fresh flight from the shot start');
assert.equal(director._lastRun.wasCancelled, false);
} finally { await director.destroy(); restoreFrames(); restore(); }
});
test('a run resumed inside a hold plays its layers on from the seek’s state and waits only the rest of it', async () => {
const project = structuredClone(PROJECT_FIXTURE);
project.scenes[0].shots[0].holdSec = 0.6;
+13 -1
View File
@@ -28,8 +28,20 @@ body:not(.mobile-shell):not(.cockpit-mode):not(.scene-playback-mode):not(
.hud-readout:has(> #hud-mode) {
display: none;
}
/* The globe actions sit on the title row, level with the title, with the
loading line under them (status.css). Narrower, where the row would reach
the title, they drop to the HUD's top rows and the loading line drops
with them, so it never covers the actions. */
#top-center-actions {
top: clamp(86px, 9.55vh, 108px);
top: 32px;
}
@media (max-width: 1179px) {
#top-center-actions {
top: clamp(86px, 9.55vh, 108px);
}
#global-loading-status {
top: calc(clamp(86px, 9.55vh, 108px) + 42px);
}
}
#left-panel-stack.layout-focus {
bottom: var(--left-stack-safe-bottom, 4vh);