mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Boot the whole application on the stub renderer, headless, in CI
- dev/stub-app/main.js starts the standalone application on the stub renderer with only the contract's required members (?capabilities=all gives it every capability) and steps its frames. - npm run qa:stub-boot serves the application's own page with that entry, and fails when any Cesium module or asset is requested (the stylesheet the build's Cesium plugin links into every page is reported), on a page or console error, or when a data layer fails to turn on or off. A feed's failed response and the dev server client's own errors are reported; --strict also fails a layer that drew nothing. - The browser CI job runs it. - RENDERER-CONTRACT.md and CURRENT-STATE.md describe the application on the stub and the boot check.
This commit is contained in:
1 parent
ae4fbb5053
commit
8a4867b1b7
7 files changed
+524
-9
No files matched your search
+40
-2
@@ -6853,8 +6853,7 @@ easier to meet (detection is now on more often), but does not create it.
|
||||
`src/render/contract/` types the renderer contract, version `0`: nine ports
|
||||
(frame, globe, draw, camera, query, input, effects, credits and quality),
|
||||
plus the renderer itself. `PORTS` lists every member at run time, and
|
||||
`contract.test.mjs` keeps that list and the types in step. The application
|
||||
does not yet draw through the contract: it still drives Cesium directly.
|
||||
`contract.test.mjs` keeps that list and the types in step.
|
||||
`src/render/stub/` is a renderer that draws nothing, with the default
|
||||
camera's exact maths. `src/render/conformance/` is the suite: logic checks
|
||||
in Node, plus camera traces recorded from Cesium's own `Camera` into
|
||||
@@ -6862,6 +6861,45 @@ in Node, plus camera traces recorded from Cesium's own `Camera` into
|
||||
checked against `goldens/visual/` on the `/dev/conformance/` page. See
|
||||
[RENDERER-CONTRACT.md](RENDERER-CONTRACT.md).
|
||||
|
||||
### The application and its renderer
|
||||
|
||||
The application starts on whichever `RendererPlugin` it is given
|
||||
(`createStandaloneApplication({ renderer })`), and on Cesium when none is.
|
||||
`src/app/scene.js` loads the Cesium adapter (`src/render/cesium/application.js`)
|
||||
only then, with `import()`; the standalone page starts that load as it
|
||||
starts, beside its own setup. Outside `src/render/` no code reaches a
|
||||
renderer's own objects: the record of files that still did,
|
||||
`src/render/viewerAccessAllowList.json`, is empty.
|
||||
|
||||
- What every layer and tool is handed is the scene object
|
||||
(`createSceneHost`), bound to the renderer: its container, and whether it
|
||||
is destroyed. Everything else goes through the renderer's ports.
|
||||
- What a renderer's own plugin adds beside the contract (stale draw-command
|
||||
trims, inline panel drawing, the zoom-out guard, its own map engine, what
|
||||
QA scripts read) it hands through `src/render/applicationHooks.js`; the
|
||||
application uses each where given and does without where not.
|
||||
Renderer-only startup (Cesium's free-look limit, credit keyboard access)
|
||||
runs in that plugin's `create`.
|
||||
- The map stacks switch through the plugin's map engine, else the globe
|
||||
port (`src/maps/globeEngine.js`): Esri and OSM as `xyz` imagery, Cesium
|
||||
ion imagery as `world` imagery, terrain as `world` terrain, or the
|
||||
ellipsoid where no keyless terrain is offered, and photoreal as the port's
|
||||
photoreal base. A photoreal base that fails to come back leaves the globe
|
||||
shown.
|
||||
- The renderer follows its container's size (`Renderer.resize`, from a
|
||||
`ResizeObserver`).
|
||||
|
||||
`npm run qa:stub-boot` boots the whole application on the stub with only
|
||||
the contract's required members (`dev/stub-app/main.js`, served in place of
|
||||
`src/main.js` on the application's own page), headless. It fails if
|
||||
Cesium's code is requested (the one stylesheet `vite-plugin-cesium` links
|
||||
into every page is reported), on any page or console error, or if a data
|
||||
layer (flights, transit, traffic, CCTV, AIS vessels, weather radar and
|
||||
satellite, wind, satellites, FIRMS, wildlife) fails to turn on or off. A
|
||||
feed's failed response (no key, no network) is reported, not failed;
|
||||
`--strict` also fails a layer that drew nothing, and `--all-capabilities`
|
||||
gives the stub every capability. CI runs it in the browser job.
|
||||
|
||||
`src/geo/` (export `./geo`) is the Cesium-free maths: WGS84, ECEF and
|
||||
geodetic conversions, surface normals and east-north-up frames, as plain
|
||||
`{x, y, z}` objects. It follows Cesium's formulas step for step, and
|
||||
|
||||
Reference in new issue
Block a user