mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-14 23:32:20 +00:00
Load the Cesium SDK and its widget styles only when a Cesium globe first starts
This commit is contained in:
1 parent
9f8381ff71
commit
ae13a56f6d
27 files changed
+269
-124
No files matched your search
@@ -4,7 +4,7 @@
|
||||
import * as Cesium from 'cesium';
|
||||
import { bridgeEvent } from './events.js';
|
||||
|
||||
const scratchGregorian = new Cesium.GregorianDate();
|
||||
let scratchGregorian;
|
||||
|
||||
// JulianDate.toDate(time).getTime() without the Date: frame events must not
|
||||
// allocate. A raise without a time (not Cesium's own) reads the clock.
|
||||
@@ -27,6 +27,7 @@ function unixMilliseconds(scene, time) {
|
||||
* @returns {{ frames: object, destroy: () => void }}
|
||||
*/
|
||||
export function createCesiumFrames(viewer) {
|
||||
scratchGregorian ??= new Cesium.GregorianDate();
|
||||
const { scene } = viewer;
|
||||
const bridges = ['preUpdate', 'preRender', 'postRender'].map((name) => [
|
||||
name,
|
||||
|
||||
Reference in new issue
Block a user