mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Keep the render governor's holds on the frame port
The governor no longer writes the Cesium scene's render mode itself: each
owner holds the renderer's frame port once, requests go to it, and the
port is the one place the loop's mode is set. The port now also keeps
the loop from redrawing for scene time alone, which the governor did.
The application installs the governor as soon as its renderer exists and
holds the loop continuous ('boot') until its tools are up, where the
governor used to be installed, so boot draws as before. The hidden-tab
suspension goes through the port too, and the application's renderer now
has the whole frame port.
This commit is contained in:
1 parent
e6d22e55d7
commit
d969df3d37
16 files changed
+192
-113
No files matched your search
@@ -9,10 +9,7 @@
|
||||
* less the members that would not be true of the application yet: the
|
||||
* globe (it draws photoreal tiles the port does not know), `whenSettled`
|
||||
* (it would not wait for them), `frame.setTime` (it would stop the
|
||||
* application's clock), and the frame members that steer the loop
|
||||
* (`holdContinuous`, `suspend`, `setTargetFps`) with the `diagnostics` that
|
||||
* report them: `renderGovernor.js` and the page's visibility handling still
|
||||
* own those settings, and two owners would undo each other. Those arrive with the layer families that need
|
||||
* application's clock). Those arrive with the layer families that need
|
||||
* them (phase 2 of the renderer plan); `checkRendererShape` lists what is
|
||||
* still missing.
|
||||
* Until a family is ported, its code reaches the Cesium viewer through
|
||||
@@ -23,14 +20,6 @@ import { createApplicationViewer } from '../../app/viewer.js';
|
||||
import { CONTRACT_VERSION } from '../contract/index.js';
|
||||
import { cesiumCapabilities, createCesiumPorts } from './ports.js';
|
||||
|
||||
/** Frame members the application's own loop code still owns. */
|
||||
const LOOP_OWNED = new Set([
|
||||
'diagnostics',
|
||||
'holdContinuous',
|
||||
'setTargetFps',
|
||||
'suspend',
|
||||
]);
|
||||
|
||||
/**
|
||||
* The members a transitional renderer has today.
|
||||
* @typedef {Pick<import('../contract/renderer').Renderer,
|
||||
@@ -109,13 +98,7 @@ export function createCesiumRendererPlugin({
|
||||
contractVersion: CONTRACT_VERSION,
|
||||
capabilities,
|
||||
canvas: viewer.canvas,
|
||||
frame: Object.freeze(
|
||||
Object.fromEntries(
|
||||
Object.entries(ports.frame).filter(
|
||||
([name]) => !LOOP_OWNED.has(name),
|
||||
),
|
||||
),
|
||||
),
|
||||
frame: ports.frame,
|
||||
draw: ports.draw,
|
||||
camera: ports.camera,
|
||||
query: ports.query,
|
||||
|
||||
Reference in new issue
Block a user