mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 08:42:21 +00:00
Load the Cesium SDK from index.html again, since engine-neutral modules read its global when they load
This reverts ae13a56f. In the production build every 'cesium' import is the global that Cesium.js defines; with the script loaded only when a Cesium globe started, modules evaluated at boot (cesiumConstants, annotationEngine) threw ReferenceError and neither engine started. A cold Navara start loading Cesium.js stays a known gap.
This commit is contained in:
1 parent
9cc108835e
commit
125fbc5a3b
27 files changed
+125
-275
No files matched your search
+13
-13
@@ -6,6 +6,19 @@ import { normalizeInputOptions } from '../contract.js';
|
||||
import { createPickDelivery } from '../pickDelivery.js';
|
||||
import { toGeo2 } from './convert.js';
|
||||
|
||||
const TYPES = {
|
||||
click: Cesium.ScreenSpaceEventType.LEFT_CLICK,
|
||||
doubleClick: Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,
|
||||
move: Cesium.ScreenSpaceEventType.MOUSE_MOVE,
|
||||
down: Cesium.ScreenSpaceEventType.LEFT_DOWN,
|
||||
up: Cesium.ScreenSpaceEventType.LEFT_UP,
|
||||
};
|
||||
const KEYS = {
|
||||
ctrl: Cesium.KeyboardEventModifier.CTRL,
|
||||
shift: Cesium.KeyboardEventModifier.SHIFT,
|
||||
alt: Cesium.KeyboardEventModifier.ALT,
|
||||
};
|
||||
|
||||
// Cesium reuses its event objects; listeners get geo copies.
|
||||
const toEvent = (event) => {
|
||||
const result = {};
|
||||
@@ -31,19 +44,6 @@ export function createCesiumInput(
|
||||
scheduleFrame = (run) => requestAnimationFrame(run),
|
||||
} = {},
|
||||
) {
|
||||
const TYPES = {
|
||||
click: Cesium.ScreenSpaceEventType.LEFT_CLICK,
|
||||
doubleClick: Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,
|
||||
move: Cesium.ScreenSpaceEventType.MOUSE_MOVE,
|
||||
down: Cesium.ScreenSpaceEventType.LEFT_DOWN,
|
||||
up: Cesium.ScreenSpaceEventType.LEFT_UP,
|
||||
};
|
||||
const KEYS = {
|
||||
ctrl: Cesium.KeyboardEventModifier.CTRL,
|
||||
shift: Cesium.KeyboardEventModifier.SHIFT,
|
||||
alt: Cesium.KeyboardEventModifier.ALT,
|
||||
};
|
||||
|
||||
const { scene } = viewer;
|
||||
let handler = null;
|
||||
let destroyed = false;
|
||||
|
||||
Reference in new issue
Block a user