mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Complete the Cesium frame port
The frame port now does everything the contract asks of it on Cesium: preUpdate says whether the tick draws (Cesium's own render test, read live until the tick is over), holds are counted per reason, and suspend, target fps, renderNow and diagnostics are real. Releasing the last hold asks for one more frame. whenSettled also waits until Cesium stops redrawing on its own. Each request or worker task Cesium completes queues a redraw (a terrain picker build after the camera moved, say), which no loading flag shows, so it now waits for quiet frames and then a short stretch in which the loop draws nothing by itself. It is bounded by its timeout, names a stopped loop, and ends on destroy. The app renderer still leaves out the members that steer the loop: the render governor and the page's visibility handling own those settings until they move onto the port. The new frame.prediction check compares the preUpdate answer with what each tick drew.
This commit is contained in:
1 parent
1a9bdd9b63
commit
e6d22e55d7
11 files changed
+842
-55
No files matched your search
@@ -146,12 +146,17 @@ test('work pending at destroy settles and lets go of the scene', async (t) => {
|
||||
await renderer.frame.renderOnce();
|
||||
|
||||
const waiting = await plugin.create({ container: {} });
|
||||
const standing = viewers[1].listeners.size;
|
||||
await assert.rejects(
|
||||
waiting.frame.renderOnce({ timeoutMs: 5 }),
|
||||
/timed out/,
|
||||
'a frame that never comes times out when asked to',
|
||||
);
|
||||
assert.equal(viewers[1].listeners.size, 4, 'and lets go of its listener');
|
||||
assert.equal(
|
||||
viewers[1].listeners.size,
|
||||
standing,
|
||||
'and lets go of its listener',
|
||||
);
|
||||
waiting.destroy();
|
||||
|
||||
// A model that finishes loading after destroy is destroyed, not added.
|
||||
@@ -339,7 +344,6 @@ const EXPECTED_MISSING = [
|
||||
'draw.on',
|
||||
'frame.diagnostics',
|
||||
'frame.holdContinuous',
|
||||
'frame.mode',
|
||||
'frame.setTargetFps',
|
||||
'frame.setTime',
|
||||
'frame.suspend',
|
||||
|
||||
Reference in new issue
Block a user