mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
Run the worker prelude ahead of Cesium's own workers script
Cesium's script sets CESIUM_WORKERS itself when it loads, so the panel's combined workers script was never used, and neither was the embedded terrain-heights file: the worker still requested it from the panel page's site. The panel build now writes only the prelude, and the panel puts it ahead of whatever Cesium assigns to CESIUM_WORKERS. The separate esbuild bundle of Cesium's workers is gone.
This commit is contained in:
1 parent
9e5ef78f91
commit
e82ab7440d
6 files changed
+38
-65
No files matched your search
@@ -9,8 +9,8 @@
|
||||
export const GLOBE_PANEL_URI = 'ui://gods-eye-view/globe';
|
||||
/** Where the app's server serves its panel build (see build/panel.js). */
|
||||
export const PANEL_BASE = '/panel/';
|
||||
/** Cesium's workers as one script, relative to the panel build. */
|
||||
export const PANEL_WORKERS_PATH = 'cesium/workers.js';
|
||||
/** The script the panel runs ahead of Cesium's workers, in the build. */
|
||||
export const PANEL_WORKER_PRELUDE_PATH = 'cesium/worker-prelude.js';
|
||||
|
||||
/**
|
||||
* Sites the app's browser code loads from directly: map imagery, 3D tiles,
|
||||
@@ -63,7 +63,7 @@ function panelHtml(runtime) {
|
||||
panelHeight: PANEL_HEIGHT_PX,
|
||||
protocolVersion: MCP_APPS_PROTOCOL_VERSION,
|
||||
toolName: PANEL_REQUEST_TOOL,
|
||||
workersPath: PANEL_WORKERS_PATH,
|
||||
workerPreludePath: PANEL_WORKER_PRELUDE_PATH,
|
||||
};
|
||||
const script = `(${runtime})(${JSON.stringify(config)});`.replace(
|
||||
/<\/script/gi,
|
||||
|
||||
Reference in new issue
Block a user