mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 10:24:02 +00:00
Merge remote-tracking branch 'origin/main' into german/hal-640-pt
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
commit
494c2b6029
78 files changed
+3326
-303
No files matched your search
@@ -1102,6 +1102,8 @@
|
||||
"src/cameraGlobeRotation.test.mjs",
|
||||
"src/voice/globeResetConfirmation.test.mjs",
|
||||
"src/hudDms.test.mjs",
|
||||
"src/hudSummaryGate.test.mjs",
|
||||
"src/voice/hudPlaceLabels.test.mjs",
|
||||
"src/voice/panel/preferences.test.mjs",
|
||||
"src/voice/panel/host.test.mjs",
|
||||
"src/voice/panel/manualPanel.test.mjs",
|
||||
|
||||
@@ -1982,6 +1982,7 @@
|
||||
"src/hud.js",
|
||||
"src/hudLocality.js",
|
||||
"src/hudLocalityFormat.js",
|
||||
"src/hudPlaceLookup.js",
|
||||
"src/hudSummaryResponse.js",
|
||||
"src/keySetup.js",
|
||||
"src/keySetupCore.mjs",
|
||||
|
||||
@@ -88,6 +88,70 @@ try {
|
||||
};
|
||||
});
|
||||
for (const [name, passed] of Object.entries(result)) check(name, passed);
|
||||
const visibilityRestored = await page.evaluate(async () => {
|
||||
// QA layer registration exists only in Vite dev builds.
|
||||
if (typeof window.__gevQaRegisterLayer !== 'function') return 'skipped';
|
||||
const { sceneDirector: director, dataManager } = window.__godsEyeView;
|
||||
const layerId = 'director-seek-visibility-qa';
|
||||
window.__gevQaRegisterLayer(dataManager, {
|
||||
id: layerId,
|
||||
name: 'Director seek visibility QA',
|
||||
updateInterval: -1,
|
||||
init() {},
|
||||
enable() {},
|
||||
disable() {},
|
||||
update() {},
|
||||
destroy() {},
|
||||
getStats: () => ({ count: 0 }),
|
||||
});
|
||||
const scene = {
|
||||
id: 'visibility-qa',
|
||||
title: 'Visibility QA',
|
||||
shots: [
|
||||
{
|
||||
id: 'visibility-shot',
|
||||
title: 'Visibility shot',
|
||||
durationSec: 0.4,
|
||||
holdSec: 0,
|
||||
camera: director.styleManager.getCameraState(),
|
||||
visual: director.styleManager.getVisualState(),
|
||||
layers: { [layerId]: { enabled: true } },
|
||||
},
|
||||
],
|
||||
};
|
||||
director._project.scenes.push(scene);
|
||||
try {
|
||||
const loaded = await director.loadShot(scene.id, scene.shots[0].id, {
|
||||
flyDuration: 0.2,
|
||||
});
|
||||
const disabled =
|
||||
(await dataManager.setEnabled(layerId, false, { origin: 'user' })) &&
|
||||
!dataManager.layers.get(layerId).enabled;
|
||||
const sought = await director.seekScene(scene.id, 0.5);
|
||||
return (
|
||||
loaded?.started &&
|
||||
disabled &&
|
||||
sought &&
|
||||
dataManager.layers.get(layerId).enabled
|
||||
);
|
||||
} finally {
|
||||
director.stopScene();
|
||||
director._project.scenes = director._project.scenes.filter(
|
||||
({ id }) => id !== scene.id,
|
||||
);
|
||||
await window.__gevQaUnregisterLayer(dataManager, layerId);
|
||||
}
|
||||
});
|
||||
if (visibilityRestored === 'skipped') {
|
||||
console.log(
|
||||
'[SKIP] same-shot seek visibility needs a Vite dev server (QA_BASE_URL)',
|
||||
);
|
||||
} else {
|
||||
check(
|
||||
'same-shot seek restores manually changed layer visibility',
|
||||
visibilityRestored,
|
||||
);
|
||||
}
|
||||
const content = await page.evaluate(async () => {
|
||||
const d = window.__godsEyeView.sceneDirector;
|
||||
const scene = d._project.scenes.find(({ title }) =>
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
// Minimal screenshot sink: the browser POSTs a data:image/... URL (grabbed from
|
||||
// the real-GPU Cesium canvas) and this writes it to qa-shots/height-datum/<name>.
|
||||
// Keeps large image payloads OUT of the agent's context — browser → sink → disk.
|
||||
// Usage: node scripts/shot-sink.mjs (listens on :4399)
|
||||
import http from 'node:http';
|
||||
import { writeFileSync, mkdirSync } from 'node:fs';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import path from 'node:path';
|
||||
|
||||
const OUT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', 'qa-shots', 'height-datum');
|
||||
mkdirSync(OUT, { recursive: true });
|
||||
const PORT = 4399;
|
||||
|
||||
const cors = (res) => {
|
||||
res.setHeader('Access-Control-Allow-Origin', '*');
|
||||
res.setHeader('Access-Control-Allow-Methods', 'POST, OPTIONS');
|
||||
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
|
||||
};
|
||||
|
||||
http.createServer((req, res) => {
|
||||
cors(res);
|
||||
if (req.method === 'OPTIONS') { res.writeHead(204); res.end(); return; }
|
||||
const url = new URL(req.url, 'http://localhost');
|
||||
if (req.method === 'POST' && url.pathname === '/save') {
|
||||
const name = (url.searchParams.get('name') || 'shot').replace(/[^a-zA-Z0-9._-]/g, '_');
|
||||
let body = '';
|
||||
req.on('data', (c) => { body += c; });
|
||||
req.on('end', () => {
|
||||
try {
|
||||
const m = /^data:image\/(png|jpeg);base64,(.+)$/s.exec(body.trim());
|
||||
if (!m) { res.writeHead(400); res.end('bad dataurl'); return; }
|
||||
const ext = m[1] === 'jpeg' ? 'jpg' : 'png';
|
||||
const file = path.join(OUT, `${name}.${ext}`);
|
||||
writeFileSync(file, Buffer.from(m[2], 'base64'));
|
||||
res.writeHead(200); res.end(file);
|
||||
console.log(`saved ${file} (${Math.round(m[2].length / 1024)} KB b64)`);
|
||||
} catch (e) { res.writeHead(500); res.end(String(e)); }
|
||||
});
|
||||
return;
|
||||
}
|
||||
res.writeHead(404); res.end('nope');
|
||||
}).listen(PORT, () => console.log(`shot-sink on http://localhost:${PORT} → ${OUT}`));
|
||||
Reference in new issue
Block a user