mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
render: hold continuous render while the world clock plays away from live
Playback moves something every frame, so it draws at the display's rate rather than the parked scene's 60 FPS cap. followWorldTime reports when the clock starts and stops playing (not live, not stepped, not waiting for data).
This commit is contained in:
1 parent
cb3be34283
commit
8af8c086a6
3 files changed
+90
-4
No files matched your search
@@ -13,6 +13,8 @@ import { initLogoGaze } from '../logoGaze.js';
|
||||
import {
|
||||
uninstallRenderGovernor,
|
||||
governorRequestRender,
|
||||
holdContinuousRender,
|
||||
releaseContinuousRender,
|
||||
} from '../renderGovernor.js';
|
||||
import { describeError } from './errors.js';
|
||||
import { isEmbeddedInline } from './embed.js';
|
||||
@@ -73,6 +75,12 @@ export async function createApplicationScene({
|
||||
followWorldTime(viewer, worldTimeFor('sky'), {
|
||||
subscribe: worldClock.subscribe,
|
||||
requestRender: () => governorRequestRender('world-time'),
|
||||
// A playing world time moves something every frame: draw at the
|
||||
// display's rate meanwhile, not the parked scene's cap.
|
||||
onPlaying: (playing) =>
|
||||
playing
|
||||
? holdContinuousRender('world-time')
|
||||
: releaseContinuousRender('world-time'),
|
||||
}),
|
||||
);
|
||||
defer(installFreeLookHeightLimit(viewer));
|
||||
|
||||
Reference in new issue
Block a user