mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 08:42:21 +00:00
Set scene time through the Cesium frame port, in the application too
frame.setTime moves from the conformance renderer into the shared Cesium ports, so the application's renderer has it. It moves the clock and asks for a frame, which on-demand drawing needs. It no longer stops the clock: the conformance renderer stops its own at creation, and the application's clock keeps whatever state its owner gave it.
This commit is contained in:
1 parent
8b6bbf0f21
commit
2bb0b1e367
5 files changed
+32
-16
No files matched your search
@@ -347,6 +347,16 @@ export function createCesiumPorts(widget, { capabilities }) {
|
||||
targetFps = fps > 0 ? fps : 0;
|
||||
widget.targetFrameRate = targetFps || undefined;
|
||||
},
|
||||
/**
|
||||
* Moves the clock to `ms` and draws it. Whether the clock then runs on
|
||||
* is its owner's: the application's clock keeps running if it was (a
|
||||
* clock on Cesium's real-time step moves to its multiplier step, as
|
||||
* setting its time does in Cesium).
|
||||
*/
|
||||
setTime(ms) {
|
||||
widget.clock.currentTime = Cesium.JulianDate.fromDate(new Date(ms));
|
||||
frame.requestRender('time');
|
||||
},
|
||||
time: () => Cesium.JulianDate.toDate(widget.clock.currentTime).getTime(),
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user