mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 09:42:21 +00:00
Merge origin/main into fix/earthquake-click-details
This commit is contained in:
commit
4804097ca1
204 files changed
+34669
-680
No files matched your search
Vendored
+1
@@ -38,6 +38,7 @@ export function createApplicationControls({
|
||||
...services,
|
||||
...operations.surface.controlServices,
|
||||
searchAndFlyTo: operations.searchAndFlyTo,
|
||||
pickWorldFromScreen: operations.annotationResolver?.pickWorldFromScreen,
|
||||
fetchRegionalBrief: (...args) =>
|
||||
operations.requests.regional.getBrief(...args),
|
||||
...catalogControlServices(catalog),
|
||||
|
||||
+57
-19
@@ -1,4 +1,11 @@
|
||||
import { onFollowChanged } from '../data/followed.js';
|
||||
import {
|
||||
bootStories,
|
||||
stopVoiceForStories,
|
||||
storiesOpener,
|
||||
} from '../stories/boot.js';
|
||||
import { t } from '../i18n/index.js';
|
||||
import { useStoriesStore } from '../ui/stores/stories.js';
|
||||
import { SceneDirector } from '../scenes/director.js';
|
||||
import { initAnnotations } from '../annotations/index.js';
|
||||
import { initDrawTool } from '../annotations/drawTool.js';
|
||||
@@ -18,6 +25,7 @@ import { createLibraryBrowser } from '../ui/libraryBrowser.js';
|
||||
import { useDataLibraryStore } from '../ui/stores/dataLibrary.js';
|
||||
import { localGeoJsonServices } from './localGeojsonServices.js';
|
||||
import { initGevVoiceCommands } from '../voice/gevRealtime.js';
|
||||
import { isStoriesOpen } from '../voice/realtimeInputPolicy.js';
|
||||
import { installViews, isEmbeddedInline } from './embed.js';
|
||||
import {
|
||||
installScopeMask,
|
||||
@@ -76,6 +84,26 @@ export function createApplicationTools({
|
||||
}),
|
||||
);
|
||||
onSceneDirector?.(sceneDirector);
|
||||
// Stories: GEV scenes on this globe, from a Stories button. Its screens,
|
||||
// styles, story data and controller load on first use.
|
||||
const storiesStore = useStoriesStore(applicationPinia());
|
||||
let voiceCommands;
|
||||
const stories = bootStories({
|
||||
// Inline in a host page, the URL and history are the host's.
|
||||
available: !isEmbeddedInline(),
|
||||
viewer,
|
||||
director: sceneDirector,
|
||||
store: storiesStore,
|
||||
onEnter: () => {
|
||||
if (stopVoiceForStories(voiceCommands?.session))
|
||||
storiesStore.flashToast(t('Voice is disabled in Stories.'), 4000);
|
||||
},
|
||||
onLoadFailed: () =>
|
||||
styleManager._showToast?.(
|
||||
t('Stories could not load. Check the connection and try again.'),
|
||||
),
|
||||
});
|
||||
defer(() => stories.destroy());
|
||||
const annotations = initAnnotations({
|
||||
viewer,
|
||||
tileset,
|
||||
@@ -260,30 +288,40 @@ export function createApplicationTools({
|
||||
// loop burning behind a hidden tab. (perf wave 2 fix)
|
||||
syncVisibilitySuspension();
|
||||
|
||||
window.__godsEyeView = {
|
||||
viewer,
|
||||
styleManager,
|
||||
tileset,
|
||||
dataManager,
|
||||
sceneDirector,
|
||||
mapStackController,
|
||||
annotations,
|
||||
weatherEffects,
|
||||
cockpitCloudEffects,
|
||||
getRenderGovernorDiagnostics,
|
||||
surfaceServices: operations.surface,
|
||||
requestRender: governorRequestRender,
|
||||
entityRecords: { read: readEntityRecord, write: entityRecord },
|
||||
// What the renderer's plugin lets QA scripts read (the Cesium viewer,
|
||||
// for the default renderer), in place of the scene object above.
|
||||
...scene.qaHandles,
|
||||
};
|
||||
window.__godsEyeView = Object.defineProperties(
|
||||
{
|
||||
viewer,
|
||||
styleManager,
|
||||
tileset,
|
||||
dataManager,
|
||||
sceneDirector,
|
||||
mapStackController,
|
||||
annotations,
|
||||
weatherEffects,
|
||||
cockpitCloudEffects,
|
||||
getRenderGovernorDiagnostics,
|
||||
surfaceServices: operations.surface,
|
||||
requestRender: governorRequestRender,
|
||||
entityRecords: { read: readEntityRecord, write: entityRecord },
|
||||
},
|
||||
// What the renderer's plugin lets QA scripts read (the Cesium viewer and
|
||||
// its photoreal tileset, for the default renderer), in place of the
|
||||
// scene's objects above; read as they are when asked.
|
||||
Object.getOwnPropertyDescriptors(scene.qaHandles ?? {}),
|
||||
);
|
||||
const debug = window.__godsEyeView;
|
||||
defer(() => {
|
||||
if (window.__godsEyeView === debug) delete window.__godsEyeView;
|
||||
});
|
||||
const voiceCommands = initGevVoiceCommands({
|
||||
voiceCommands = initGevVoiceCommands({
|
||||
...voice,
|
||||
canStartVoice: () => !isStoriesOpen(),
|
||||
// An app may supply what open_stories does; the Stories page by default.
|
||||
openStories: storiesOpener({
|
||||
openStories: voice?.openStories,
|
||||
store: storiesStore,
|
||||
stories,
|
||||
}),
|
||||
floorServices: operations.surface.groundFloor,
|
||||
annotationResolver: operations.annotationResolver,
|
||||
searchNavigation: operations.searchAndFlyTo,
|
||||
|
||||
Reference in new issue
Block a user