mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +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
@@ -57,6 +57,49 @@ export function closeRenderLoopLatch(viewer) {
|
||||
if (widget) widget._renderLoopRunning = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the widget's render loop is marked running. The render failure
|
||||
* notice keeps it marked while a frame it wraps throws, so a Retry before the
|
||||
* loop's queued frame starts no second loop.
|
||||
* @param {object} widget CesiumWidget.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function renderLoopRunning(widget) {
|
||||
return widget?._renderLoopRunning === true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark the widget's render loop running again (see `renderLoopRunning`).
|
||||
* @param {object} widget CesiumWidget.
|
||||
*/
|
||||
export function markRenderLoopRunning(widget) {
|
||||
if (widget) widget._renderLoopRunning = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finish a raise a throwing listener cut short. Until a raise ends, Cesium's
|
||||
* `Event` only queues added and removed listeners (`_toAdd`, `_toRemove`);
|
||||
* apply that queue to `_listeners` and end the raise
|
||||
* (`_invokingListeners`). Used by the render failure notice.
|
||||
* @param {object} event Cesium Event.
|
||||
*/
|
||||
export function finishEventRaise(event) {
|
||||
if (!event?._invokingListeners) return;
|
||||
event._invokingListeners = false;
|
||||
for (const [listener, scopes] of event._toAdd) {
|
||||
const added = event._listeners.get(listener) ?? new Set();
|
||||
scopes.forEach((scope) => added.add(scope));
|
||||
event._listeners.set(listener, added);
|
||||
}
|
||||
event._toAdd.clear();
|
||||
for (const [listener, scopes] of event._toRemove) {
|
||||
const left = event._listeners.get(listener);
|
||||
scopes.forEach((scope) => left?.delete(scope));
|
||||
if (left?.size === 0) event._listeners.delete(listener);
|
||||
}
|
||||
event._toRemove.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the scene has a render pending that its next tick will draw in
|
||||
* request-render mode: a request, or a depth-buffer or HDR change. With
|
||||
|
||||
Reference in new issue
Block a user