mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 01:02:23 +00:00
Merge origin/main into the renderer seam
Brings in main up to f24abfc88: cockpit subject providers, the render
failure notice, aircraft drawn in their own mesh colours, airport ground
vehicles, and an aircraft with no ground track facing its true heading.
Under the seam:
- The render failure notice lives in the Cesium adapter
(src/render/cesium/renderFailure.js) and is the application hook
renderFailureNotice({allowReload, store}); its private Cesium fields
(Event's raise queue, the widget's render loop flag) are read through
internals.js. The inline panel's timer waits while the frame port reports
the loop stopped, and goes on after a Retry.
- Ordinary aircraft models draw white with the 'highlight' colour blend
through the draw port; tracked and emergency colours tint the mesh.
- Held trains and transit vehicles hide their route set and markers through
the draw port; the fleet model test fakes answer loads through the fake
draw port instead of Cesium's glTF loader.
- The Cockpit's subject view follows and places the camera through the
camera port.
This commit is contained in:
commit
866a9816f2
142 files changed
+9067
-308
No files matched your search
@@ -26,9 +26,13 @@ function describeError(error) {
|
||||
* screen as hidden, which stops the browser's animation frames and with them
|
||||
* the renderer's own loop; while frames stop arriving, draw from a timer
|
||||
* (`resize`, then a frame of the loop, `frame.renderNow({ifDue: true})`: the
|
||||
* camera moves, input and the clock run, and it draws when due). A frame
|
||||
* that fails stops the timer,
|
||||
* its error reported in full. Returns a function that stops it.
|
||||
* camera moves, input and the clock run, and it draws when due). While the
|
||||
* renderer's loop is stopped after a failed frame (`stopped` in its frame
|
||||
* diagnostics) the timer waits, and goes on once a retry starts the loop
|
||||
* again; the render failure notice reports the error
|
||||
* (src/render/cesium/renderFailure.js). Where the renderer never says so, a frame
|
||||
* that fails stops the timer, its error reported in full. Returns a
|
||||
* function that stops it.
|
||||
* @param {import('../render/contract/renderer').Renderer} renderer
|
||||
* @param {{windowRef?: Window, now?: () => number}} [options]
|
||||
* @returns {() => void}
|
||||
@@ -45,12 +49,15 @@ export function keepPanelRendering(
|
||||
};
|
||||
frameRequest = windowRef.requestAnimationFrame(onFrame);
|
||||
let failed = false;
|
||||
const stopped = () => renderer.frame.diagnostics?.().stopped;
|
||||
const timer = windowRef.setInterval(() => {
|
||||
if (failed || now() - lastFrame < MISSED_FRAMES_MS) return;
|
||||
if (failed || now() - lastFrame < MISSED_FRAMES_MS || stopped()) return;
|
||||
try {
|
||||
renderer.resize();
|
||||
renderer.frame.renderNow({ ifDue: true });
|
||||
} catch (error) {
|
||||
// Stopped by now: the render failure notice has the error.
|
||||
if (stopped() !== undefined) return;
|
||||
// Report the error in full: workers report plain objects, which
|
||||
// would print as [object Object].
|
||||
failed = true;
|
||||
|
||||
Reference in new issue
Block a user