mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
The renderer seam: clicks go to the newest tool, recession and display groups through the contract, drawing at parity with Cesium
- Clicks: when two tools want the globe's clicks, the newest takes them and the older is told and turns itself off; a click is decided when it arrives, and ambient selection fires only when no tool holds the pointer. The "map is busy" paths and their strings are removed. - Recession: the limb fade is shared (src/render/recession.js) and reaches icon and model sets through SetSpec.recede; tuning applies on the next frame. - Display panel groups are published through src/ui/displayGroups.js; the Weather group and src/viewWeather.js are removed. - Draw port: a set whose icons only move is moved in place, and models that did not change are not restyled each frame, so moving fleets cost what they did when drawn directly; an untinted, fully opaque model is drawn without a colour. - Conformance: input.lease.lost checks the new lease inside onLost and reports a throwing onLost; draw.sets.recede covers model sets. - QA scripts read the renderer host instead of internals the seam replaced.
This commit is contained in:
1 parent
a0d299523d
commit
0ab31d4fb8
130 files changed
+5438
-1674
No files matched your search
@@ -12,6 +12,7 @@
|
||||
"src/render/cesium/heights.js",
|
||||
"src/render/cesium/camera.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/data/aircraftRecession.js",
|
||||
"src/data/iconAtlas.js",
|
||||
"src/data/iconSet.js",
|
||||
@@ -804,6 +805,37 @@
|
||||
"modules": ["src/ui/displayControls.js"],
|
||||
"external": []
|
||||
},
|
||||
"display-groups": {
|
||||
"exports": ["./ui/display/groups"],
|
||||
"modules": [
|
||||
"src/ui/displayGroups.js",
|
||||
"src/ui/vueRuntime.js",
|
||||
"src/ui/stores/display.js",
|
||||
"src/ui/stores/owners.js",
|
||||
"src/i18n/locale.js",
|
||||
"src/i18n/locales/ar.json",
|
||||
"src/i18n/locales/de.json",
|
||||
"src/i18n/locales/es.json",
|
||||
"src/i18n/locales/fr.json",
|
||||
"src/i18n/locales/it.json",
|
||||
"src/i18n/locales/he.json",
|
||||
"src/i18n/locales/ja.json",
|
||||
"src/i18n/locales/sv.json",
|
||||
"src/i18n/locales/pt.json",
|
||||
"src/i18n/locales/ru.json",
|
||||
"src/i18n/locales/zh-CN.json",
|
||||
"src/i18n/locales/uk.json",
|
||||
"src/i18n/locales/zh-Hant.json",
|
||||
"src/i18n/index.js",
|
||||
"src/ui/i18n.js"
|
||||
],
|
||||
"external": ["vue", "pinia", "vue-i18n"]
|
||||
},
|
||||
"weather-effects": {
|
||||
"exports": ["./render/weather", "./weather/effects"],
|
||||
"modules": ["src/render/weather.js", "src/weatherEffectsMath.js"],
|
||||
"external": []
|
||||
},
|
||||
"visual-effects": {
|
||||
"exports": ["./ui/effects", "./ui/effects/bloom"],
|
||||
"modules": [
|
||||
@@ -1068,6 +1100,7 @@
|
||||
"src/ui/cockpitCamera.js",
|
||||
"src/render/cesium/camera.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/data/aircraftRecession.js",
|
||||
"src/data/motionModel.js",
|
||||
"src/data/iconAtlas.js",
|
||||
@@ -1261,6 +1294,7 @@
|
||||
"src/renderGovernor.js",
|
||||
"src/data/bundledJson.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/data/aircraftRecession.js",
|
||||
"src/data/motionModel.js",
|
||||
"src/geo/julian.js",
|
||||
@@ -1637,6 +1671,7 @@
|
||||
"src/data/followed.js",
|
||||
"src/render/cesium/camera.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/data/aircraftRecession.js",
|
||||
"src/data/motionModel.js",
|
||||
"src/data/iconSet.js",
|
||||
@@ -1825,6 +1860,7 @@
|
||||
"src/render/cesium/setBlend.js",
|
||||
"src/geo/screenCluster.js",
|
||||
"src/render/cesium/drawModels.js",
|
||||
"src/render/recession.js",
|
||||
"src/geo/polyline.js",
|
||||
"src/render/cesium/gpuIcons.js",
|
||||
"src/render/motion/iconMotion.js",
|
||||
@@ -1971,6 +2007,7 @@
|
||||
"src/render/cesium/setBlend.js",
|
||||
"src/geo/screenCluster.js",
|
||||
"src/render/cesium/drawModels.js",
|
||||
"src/render/recession.js",
|
||||
"src/geo/polyline.js",
|
||||
"src/render/cesium/gpuIcons.js",
|
||||
"src/render/motion/iconMotion.js",
|
||||
@@ -2129,6 +2166,7 @@
|
||||
"src/layers/vessels/iconBook.js",
|
||||
"src/data/entityRecords.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/data/iconSet.js",
|
||||
"src/geo/horizon.js",
|
||||
"src/data/iconSegment.js",
|
||||
@@ -2291,6 +2329,7 @@
|
||||
"src/data/iconSet.js",
|
||||
"src/data/iconAtlas.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/render/motion/iconMotion.js",
|
||||
"src/render/cesium/heights.js",
|
||||
"src/render/baseTilesets.js",
|
||||
@@ -2347,6 +2386,7 @@
|
||||
"src/render/cesium/imageryFrames.js",
|
||||
"src/render/cesium/tileRequests.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/data/aircraftRecession.js",
|
||||
"src/data/motionModel.js",
|
||||
"src/geo/julian.js",
|
||||
@@ -2511,6 +2551,7 @@
|
||||
"src/render/cesium/drawQuads.js",
|
||||
"src/render/cesium/drawMeshes.js",
|
||||
"src/render/cesium/drawModels.js",
|
||||
"src/render/recession.js",
|
||||
"src/geo/polyline.js",
|
||||
"src/render/cesium/gpuIcons.js",
|
||||
"src/render/motion/iconMotion.js",
|
||||
@@ -2607,6 +2648,7 @@
|
||||
"src/layers/satellites/tracking.js",
|
||||
"src/render/cesium/camera.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/data/aircraftRecession.js",
|
||||
"src/data/iconSet.js",
|
||||
"src/geo/horizon.js",
|
||||
@@ -2697,6 +2739,7 @@
|
||||
"src/layers/launches/index.js",
|
||||
"src/render/cesium/camera.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/data/aircraftRecession.js",
|
||||
"src/data/motionModel.js",
|
||||
"src/geo/julian.js",
|
||||
@@ -2796,6 +2839,7 @@
|
||||
"src/geo/geodesic.js",
|
||||
"src/render/cesium/camera.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/data/aircraftRecession.js",
|
||||
"src/data/iconAtlas.js",
|
||||
"src/data/motionModel.js",
|
||||
@@ -3023,6 +3067,7 @@
|
||||
"src/layers/traffic/viewport.js",
|
||||
"src/render/rendererOf.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/data/iconSet.js",
|
||||
"src/geo/horizon.js",
|
||||
"src/data/aircraftRecession.js",
|
||||
@@ -3212,6 +3257,7 @@
|
||||
"src/render/cesium/drawQuads.js",
|
||||
"src/render/cesium/drawMeshes.js",
|
||||
"src/render/cesium/drawModels.js",
|
||||
"src/render/recession.js",
|
||||
"src/geo/polyline.js",
|
||||
"src/render/cesium/gpuIcons.js",
|
||||
"src/render/motion/iconMotion.js",
|
||||
@@ -3303,6 +3349,7 @@
|
||||
"src/layers/streetLevel/index.js",
|
||||
"src/render/cesium/credits.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/data/aircraftRecession.js",
|
||||
"src/data/iconSet.js",
|
||||
"src/geo/horizon.js",
|
||||
@@ -3534,6 +3581,7 @@
|
||||
"src/data/followed.js",
|
||||
"src/render/cesium/camera.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/data/aircraftRecession.js",
|
||||
"src/data/iconSet.js",
|
||||
"src/geo/horizon.js",
|
||||
@@ -3736,6 +3784,7 @@
|
||||
"src/render/cesium/globe.js",
|
||||
"src/render/baseTilesets.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/data/aircraftRecession.js",
|
||||
"src/data/iconSet.js",
|
||||
"src/geo/horizon.js",
|
||||
@@ -3977,6 +4026,7 @@
|
||||
"src/hudLayoutPolicy.js",
|
||||
"src/ui/radioPanelPlacement.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/data/iconSet.js",
|
||||
"src/data/iconSegment.js",
|
||||
"src/data/iconAtlas.js",
|
||||
@@ -4686,7 +4736,6 @@
|
||||
"src/ui/geoFileImport.js",
|
||||
"src/data/routeSteps.js",
|
||||
"src/layers/directions/index.js",
|
||||
"src/data/pointerOwnerNames.js",
|
||||
"src/layers/directions/source.js",
|
||||
"src/data/directions.js",
|
||||
"src/app/layers/directions.js",
|
||||
@@ -5313,7 +5362,6 @@
|
||||
"src/data/openVesselPhoto.js",
|
||||
"src/layers/vessels/photos.js",
|
||||
"src/viewSky.js",
|
||||
"src/viewWeather.js",
|
||||
"src/render/weather.js",
|
||||
"src/layers/flights/placed.js",
|
||||
"src/data/placementProvider.js",
|
||||
@@ -5354,6 +5402,7 @@
|
||||
"src/data/aircraftMotionRegime.js",
|
||||
"src/geo/julian.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/data/iconSet.js",
|
||||
"src/data/iconSegment.js",
|
||||
"src/data/iconAtlas.js",
|
||||
@@ -5800,7 +5849,6 @@
|
||||
"src/services/groundFloor.js",
|
||||
"src/data/routeSteps.js",
|
||||
"src/layers/directions/index.js",
|
||||
"src/data/pointerOwnerNames.js",
|
||||
"src/layers/directions/source.js",
|
||||
"src/services/terrainHeights.js",
|
||||
"src/data/terrainHeights.js",
|
||||
@@ -6194,6 +6242,7 @@
|
||||
"src/locations.js",
|
||||
"src/render/cesium/camera.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/data/aircraftRecession.js",
|
||||
"src/data/iconSet.js",
|
||||
"src/geo/horizon.js",
|
||||
@@ -6352,6 +6401,7 @@
|
||||
"src/ui/navigationController.js",
|
||||
"src/render/cesium/camera.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/data/aircraftRecession.js",
|
||||
"src/data/iconSet.js",
|
||||
"src/geo/horizon.js",
|
||||
@@ -6642,7 +6692,6 @@
|
||||
"src/render/rendererOf.js",
|
||||
"src/geo/vector.js",
|
||||
"src/render/color.js",
|
||||
"src/data/pointerOwnerNames.js",
|
||||
"src/layers/directions/source.js",
|
||||
"src/data/routeSteps.js",
|
||||
"src/i18n/index.js",
|
||||
@@ -6991,6 +7040,7 @@
|
||||
"src/celestialRing.js",
|
||||
"src/render/cesium/camera.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/data/aircraftRecession.js",
|
||||
"src/data/iconSet.js",
|
||||
"src/geo/horizon.js",
|
||||
@@ -7167,6 +7217,7 @@
|
||||
"src/geo/rectangle.js",
|
||||
"src/render/rendererOf.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/data/aircraftRecession.js",
|
||||
"src/data/iconSet.js",
|
||||
"src/geo/horizon.js",
|
||||
@@ -7518,6 +7569,7 @@
|
||||
"src/input/dispatcher.js",
|
||||
"src/render/cesium/drawHit.js",
|
||||
"src/render/cesium/iconSetPrimitive.js",
|
||||
"src/render/recession.js",
|
||||
"src/data/aircraftRecession.js",
|
||||
"src/data/motionModel.js",
|
||||
"src/data/iconSet.js",
|
||||
@@ -7923,7 +7975,17 @@
|
||||
"./render/occlusion",
|
||||
"./render/camera/events",
|
||||
"./render/camera/followTransition",
|
||||
"./render/conformance"
|
||||
"./render/conformance",
|
||||
"./render/input/router",
|
||||
"./render/stub/camera",
|
||||
"./render/stub/viewRectangle",
|
||||
"./render/stub/harness",
|
||||
"./render/motion",
|
||||
"./render/vectorBase",
|
||||
"./render/iconSegment",
|
||||
"./render/recession",
|
||||
"./render/windStreamlines",
|
||||
"./geo/screenCluster"
|
||||
],
|
||||
"modules": [
|
||||
"src/render/contract/index.js",
|
||||
@@ -7966,7 +8028,13 @@
|
||||
"src/render/vectorBase/paint.js",
|
||||
"src/render/vectorBase/expressions.js",
|
||||
"src/render/vectorBase/encode.js",
|
||||
"src/render/weather.js"
|
||||
"src/render/weather.js",
|
||||
"src/render/stub/harness.js",
|
||||
"src/data/iconSegment.js",
|
||||
"src/data/motionModel.js",
|
||||
"src/layers/wind/streamlines.js",
|
||||
"src/layers/wind/model.js",
|
||||
"src/render/recession.js"
|
||||
],
|
||||
"external": ["pbf", "@mapbox/vector-tile", "kdbush"]
|
||||
},
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* Run the renderer conformance logic suite on the Cesium renderer in
|
||||
* headless Chromium (`dev/conformance/`, `window.conformance.runLogic`),
|
||||
* and fail on any failed check, or on a skip that is not expected.
|
||||
*
|
||||
* Without `--url` it starts a Vite dev server of this checkout on `--port`
|
||||
* (default 5289) and stops it after. WebGL runs on SwiftShader, so the run
|
||||
* needs no GPU. `--only id,id` runs just those checks; `--json path` writes
|
||||
* the report.
|
||||
*
|
||||
* npm run qa:conformance [-- --url http://127.0.0.1:5280] [--only ids]
|
||||
* [--json path]
|
||||
*/
|
||||
import { writeFileSync } from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import puppeteer from 'puppeteer';
|
||||
|
||||
const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
|
||||
/** Checks the run skips, with why: anything else skipped fails it. */
|
||||
export const EXPECTED_SKIPS = Object.freeze({
|
||||
// The page scripts no heights for the Cesium renderer.
|
||||
'query.heights': 'no scripted heights in this harness',
|
||||
});
|
||||
|
||||
/** A whole run has this long; a check that hangs fails it rather than CI. */
|
||||
const RUN_TIMEOUT_MS = 15 * 60_000;
|
||||
|
||||
function parseArgs(argv) {
|
||||
const args = { port: 5289 };
|
||||
for (let i = 0; i < argv.length; i++) {
|
||||
const arg = argv[i];
|
||||
if (arg === '--url') args.url = argv[++i];
|
||||
else if (arg === '--port') args.port = Number(argv[++i]);
|
||||
else if (arg === '--only') args.only = argv[++i].split(',');
|
||||
else if (arg === '--json') args.json = argv[++i];
|
||||
else throw new Error(`Unknown argument: ${arg}`);
|
||||
}
|
||||
return args;
|
||||
}
|
||||
|
||||
async function startViteServer(port) {
|
||||
const { createServer } = await import('vite');
|
||||
const server = await createServer({
|
||||
root: ROOT,
|
||||
configFile: path.join(ROOT, 'vite.config.js'),
|
||||
// No hot reload: the page is loaded once and nothing edits it.
|
||||
server: { port, strictPort: true, host: '127.0.0.1', hmr: false },
|
||||
logLevel: 'warn',
|
||||
});
|
||||
await server.listen();
|
||||
return server;
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const args = parseArgs(process.argv.slice(2));
|
||||
const server = args.url ? null : await startViteServer(args.port);
|
||||
try {
|
||||
await run(args);
|
||||
} finally {
|
||||
await server?.close();
|
||||
}
|
||||
}
|
||||
|
||||
async function run(args) {
|
||||
const base = (args.url ?? `http://127.0.0.1:${args.port}`).replace(/\/$/, '');
|
||||
const browser = await puppeteer.launch({
|
||||
headless: true,
|
||||
executablePath:
|
||||
process.env.PUPPETEER_EXECUTABLE_PATH ||
|
||||
(await puppeteer.executablePath()),
|
||||
defaultViewport: { width: 1280, height: 800 },
|
||||
protocolTimeout: RUN_TIMEOUT_MS,
|
||||
args: ['--no-sandbox', '--use-gl=angle', '--use-angle=swiftshader'],
|
||||
});
|
||||
const pageErrors = [];
|
||||
let report;
|
||||
try {
|
||||
const page = await browser.newPage();
|
||||
page.on('pageerror', (error) => pageErrors.push(error.message));
|
||||
await page.goto(`${base}/dev/conformance/`, { waitUntil: 'load' });
|
||||
await page.waitForFunction(() => window.conformance?.runLogic, {
|
||||
timeout: 120_000,
|
||||
});
|
||||
report = await page.evaluate(
|
||||
(only) => window.conformance.runLogic('cesium', { only }),
|
||||
args.only ?? null,
|
||||
);
|
||||
} finally {
|
||||
await browser.close();
|
||||
}
|
||||
if (args.json) writeFileSync(args.json, JSON.stringify(report, null, 2));
|
||||
console.log(
|
||||
`cesium: ${report.passed} passed, ${report.failed} failed, ${report.skipped} skipped`,
|
||||
);
|
||||
const problems = [];
|
||||
for (const failure of report.failures) {
|
||||
console.error(`fail\t${failure.id}\t${failure.detail ?? ''}`);
|
||||
problems.push(failure.id);
|
||||
}
|
||||
for (const skip of report.skips) {
|
||||
const expected = EXPECTED_SKIPS[skip.id] === skip.detail;
|
||||
console.log(`skip\t${skip.id}\t${skip.detail ?? ''}`);
|
||||
if (!expected) problems.push(`${skip.id} skipped`);
|
||||
}
|
||||
if (!args.only && report.passed === 0) problems.push('nothing passed');
|
||||
if (problems.length) {
|
||||
console.error(`FAIL: ${problems.join('; ')}`);
|
||||
process.exitCode = 1;
|
||||
} else console.log('ok: the Cesium renderer passes the conformance suite');
|
||||
}
|
||||
|
||||
if (import.meta.url === `file://${process.argv[1]}`)
|
||||
main().catch((error) => {
|
||||
console.error(error);
|
||||
process.exitCode = 1;
|
||||
});
|
||||
+18
-28
@@ -645,44 +645,34 @@ try {
|
||||
`owner=${afterClear.pointerOwner}`,
|
||||
);
|
||||
|
||||
// ── 8. A tool holding the pointer blocks placement, and says so. ─────────
|
||||
// ── 8. Arming takes the pointer from a tool holding it, which is told. ──
|
||||
await page.evaluate(() => {
|
||||
window.__gevQaDrawLost = 0;
|
||||
// A claim answers with a lease; the release takes that lease back.
|
||||
window.__gevQaDrawLease = window.__gevQa.claimPointer('draw');
|
||||
window.__gevQaDrawLease = window.__gevQa.claimPointer('draw', {
|
||||
onLost: () => (window.__gevQaDrawLost += 1),
|
||||
});
|
||||
});
|
||||
await clickChip('set-a');
|
||||
const blocked = await layerState();
|
||||
const taken = await layerState();
|
||||
const lost = await page.evaluate(() => window.__gevQaDrawLost);
|
||||
check(
|
||||
"another tool's pointer claim is never stolen",
|
||||
blocked.pointerOwner === 'draw',
|
||||
`owner=${blocked.pointerOwner}`,
|
||||
'the newest claim takes over: Directions holds the pointer',
|
||||
taken.pointerOwner === 'directions',
|
||||
`owner=${taken.pointerOwner}`,
|
||||
);
|
||||
check('the tool it replaced is told once', lost === 1, `told=${lost}`);
|
||||
check(
|
||||
'nothing is armed, and the row says why the click would do nothing',
|
||||
blocked.chips.find((chip) => chip.id === 'set-a')?.active === false &&
|
||||
/Another map tool/.test(blocked.stats.error || ''),
|
||||
blocked.stats.error,
|
||||
'SET A is armed, and the row has nothing to complain of',
|
||||
taken.chips.find((chip) => chip.id === 'set-a')?.active === true &&
|
||||
!taken.stats.error,
|
||||
taken.stats.error,
|
||||
);
|
||||
// The row is not where the operator is looking after pressing a chip, so the
|
||||
// refusal also has to reach the app's toast (owner field test).
|
||||
const toast = await page.evaluate(() => {
|
||||
const node = document.getElementById('toast');
|
||||
return {
|
||||
text: node?.textContent || '',
|
||||
visible: !!node?.classList.contains('visible'),
|
||||
};
|
||||
});
|
||||
check(
|
||||
'the refusal reaches the app toast, naming the tool and how to leave it',
|
||||
/Draw is active/.test(toast.text) && /then set A/.test(toast.text),
|
||||
JSON.stringify(toast.text),
|
||||
);
|
||||
check('and that toast is actually on screen', toast.visible);
|
||||
await shot(`05-${LABEL}-pointer-blocked-toast.jpg`);
|
||||
const released = await page.evaluate(() =>
|
||||
const staleReleased = await page.evaluate(() =>
|
||||
window.__gevQa.releasePointer(window.__gevQaDrawLease),
|
||||
);
|
||||
check('and it gets the pointer back when it lets go', released);
|
||||
check("the replaced tool's late release frees nothing", !staleReleased);
|
||||
await clickChip('set-a');
|
||||
|
||||
// ── 9. Denver: maneuver dots sit on the ground, not at sea level. ────────
|
||||
if (!SKIP.has('denver')) {
|
||||
|
||||
@@ -176,7 +176,8 @@ try {
|
||||
kind: 'pin',
|
||||
point: [+i.pos.lon.toFixed(6), +i.pos.lat.toFixed(6)],
|
||||
scale: i.scale ?? 1,
|
||||
heading: Math.round(i.course ?? 0),
|
||||
// A KML heading is drawn as a turn on screen, clockwise.
|
||||
heading: Math.round((-(i.rotation ?? 0) * 180) / Math.PI),
|
||||
image: Boolean(i.image),
|
||||
color: css(i.color ?? 'white'),
|
||||
})),
|
||||
|
||||
@@ -342,7 +342,7 @@ try {
|
||||
const before = {
|
||||
activeId: controller.getActiveId(),
|
||||
creditVisible: document.body.innerText.includes('Powered by Esri'),
|
||||
globeShown: styleManager.viewer.scene.globe.show,
|
||||
globeShown: window.__godsEyeView.viewer.scene.globe.show,
|
||||
hasLayer: Boolean(controller._imageryLayer),
|
||||
};
|
||||
provider?.errorEvent?.raiseEvent?.({ timesRetried: 0 });
|
||||
@@ -369,7 +369,7 @@ try {
|
||||
activeId: controller.getActiveId(),
|
||||
lastError: controller.getState().lastError,
|
||||
creditVisible: document.body.innerText.includes('Powered by Esri'),
|
||||
globeShown: styleManager.viewer.scene.globe.show,
|
||||
globeShown: window.__godsEyeView.viewer.scene.globe.show,
|
||||
hasLayer: Boolean(controller._imageryLayer),
|
||||
active: [...document.querySelectorAll('.map-stack-chip')]
|
||||
.filter((chip) => chip.getAttribute('aria-pressed') === 'true')
|
||||
|
||||
@@ -420,11 +420,13 @@ export async function runBostonMatrix({
|
||||
window.__godsEyeView.dataManager.layers.get('transit').module;
|
||||
layer._transitPartsForTest().selection.clearSelection();
|
||||
const e = layer._transitStateForTest()._vehicles.get(key);
|
||||
// The billboard the draw port drew for it.
|
||||
// The billboard the draw port drew for it: the last under its key,
|
||||
// as the fleet sample above reads it (the fleet-models set draws
|
||||
// one under the same key first).
|
||||
const scene = window.__godsEyeView.viewer.scene;
|
||||
const setIds = layer._transitSetIdsForTest();
|
||||
let drawn = null;
|
||||
for (let i = 0; !drawn && i < scene.primitives.length; i++) {
|
||||
for (let i = 0; i < scene.primitives.length; i++) {
|
||||
const host = scene.primitives.get(i);
|
||||
if (!setIds.includes(host?.drawSetId)) continue;
|
||||
for (let j = 0; j < host.length; j++)
|
||||
|
||||
@@ -169,7 +169,7 @@ try {
|
||||
result.bloom.intensityPct === 98 &&
|
||||
snapshot.bloom.intensity === 98 &&
|
||||
manager._visualEffects.bloomIntensity === 98 &&
|
||||
manager.viewer.scene.postProcessStages.bloom.enabled
|
||||
window.__godsEyeView.viewer.scene.postProcessStages.bloom.enabled
|
||||
);
|
||||
}),
|
||||
);
|
||||
@@ -184,7 +184,7 @@ try {
|
||||
manager.getVisualState().sharpen.intensity === 61 &&
|
||||
manager._visualEffects.sharpenIntensity === 0.61 &&
|
||||
Math.abs(
|
||||
manager.viewer.scene.postProcessStages.getStageByName(
|
||||
window.__godsEyeView.viewer.scene.postProcessStages.getStageByName(
|
||||
'effects_sharpen',
|
||||
).uniforms.amount - 1.32,
|
||||
) < 1e-9
|
||||
@@ -203,7 +203,7 @@ try {
|
||||
const manager = window.__godsEyeView.styleManager;
|
||||
const effects = manager._visualEffects;
|
||||
manager.setStyle('retro');
|
||||
const collection = manager.viewer.scene.postProcessStages;
|
||||
const collection = window.__godsEyeView.viewer.scene.postProcessStages;
|
||||
const owned = Object.keys(effects.stages).map((name) =>
|
||||
collection.getStageByName(`effects_style_${name}`),
|
||||
);
|
||||
|
||||
@@ -150,7 +150,9 @@ try {
|
||||
manager._bloomSlider.focus();
|
||||
return {
|
||||
value: Number(manager._bloomSlider.value),
|
||||
contrast: manager.viewer.scene.postProcessStages.bloom.uniforms.contrast,
|
||||
contrast:
|
||||
window.__godsEyeView.viewer.scene.postProcessStages.bloom.uniforms
|
||||
.contrast,
|
||||
};
|
||||
});
|
||||
await page.keyboard.press('ArrowRight');
|
||||
@@ -160,8 +162,8 @@ try {
|
||||
const manager = window.__godsEyeView.styleManager;
|
||||
return (
|
||||
Number(manager._bloomSlider.value) > before.value &&
|
||||
manager.viewer.scene.postProcessStages.bloom.uniforms.contrast <
|
||||
before.contrast
|
||||
window.__godsEyeView.viewer.scene.postProcessStages.bloom.uniforms
|
||||
.contrast < before.contrast
|
||||
);
|
||||
}, displayBefore),
|
||||
);
|
||||
@@ -269,14 +271,15 @@ try {
|
||||
manager._displayBindings._detachDisplayControls();
|
||||
const before = manager.bloomEnabled;
|
||||
const contrast =
|
||||
manager.viewer.scene.postProcessStages.bloom.uniforms.contrast;
|
||||
window.__godsEyeView.viewer.scene.postProcessStages.bloom.uniforms
|
||||
.contrast;
|
||||
manager._bloomBtn.click();
|
||||
manager._bloomSlider.value = '15';
|
||||
manager._bloomSlider.dispatchEvent(new Event('input', { bubbles: true }));
|
||||
return (
|
||||
manager.bloomEnabled === before &&
|
||||
manager.viewer.scene.postProcessStages.bloom.uniforms.contrast ===
|
||||
contrast
|
||||
window.__godsEyeView.viewer.scene.postProcessStages.bloom.uniforms
|
||||
.contrast === contrast
|
||||
);
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user