mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-22 03:02:20 +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
@@ -1,6 +1,17 @@
|
||||
import * as Cesium from 'cesium';
|
||||
import { GNSS_LEVEL_COLORS } from '../records.js';
|
||||
|
||||
/**
|
||||
* GroundPrimitive allowPicking:false suppresses ids but still submits stencil
|
||||
* commands in Cesium's pick pass, erasing picks of overlapping ground geometry.
|
||||
* This fill participates only in rendering, so sibling polygons remain pickable.
|
||||
*/
|
||||
class GnssGroundFill extends Cesium.GroundPrimitive {
|
||||
update(frameState) {
|
||||
if (!frameState.passes.pick) super.update(frameState);
|
||||
}
|
||||
}
|
||||
|
||||
/** Degrees at the centre of the current view, or null before the camera settles. */
|
||||
export function defaultGnssViewAnchor(viewer) {
|
||||
const canvas = viewer?.scene?.canvas;
|
||||
@@ -33,14 +44,6 @@ export function createGnssCesiumRenderer({
|
||||
viewer,
|
||||
viewAnchor = defaultGnssViewAnchor,
|
||||
}) {
|
||||
// GroundPrimitive allowPicking:false still submits stencil commands in
|
||||
// the pick pass. Keep this fill from erasing overlapping geometry's picks.
|
||||
class GnssGroundFill extends Cesium.GroundPrimitive {
|
||||
update(frameState) {
|
||||
if (!frameState.passes.pick) super.update(frameState);
|
||||
}
|
||||
}
|
||||
|
||||
const primitives = new Cesium.PrimitiveCollection();
|
||||
primitives.id = 'gnss-integrity';
|
||||
primitives.show = false;
|
||||
|
||||
Reference in new issue
Block a user