mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Move geo import, voice capture, visual settings, scope mask and recent imagery onto the renderer ports
Geo import asks the frame port for renders, the camera port for moveEnd and the globe port's progress for the terrain queue running dry; its data sources are added, removed and shown by the listed geoImportPins module. Voice capture waits on the frame port's postRender. Visual settings toggle the infrared fog through the globe sky port, and the anime style dims the Milky Way through a sky getter it is given. The scope mask reads the camera height and listens on the frame and camera ports. Recent imagery picks the view centre, reads the view rectangle and the field of view through the query and camera ports. Installations claim camera sensitivity from their rendering module. The application shell loads the unbound globe factory.
This commit is contained in:
1 parent
b19fa56565
commit
81d8e3a4a7
20 files changed
+308
-119
No files matched your search
@@ -509,3 +509,33 @@ export function dataSourcePoints(dataSource, time = Cesium.JulianDate.now()) {
|
||||
}
|
||||
return points;
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw an imported file's data source on `viewer`: resolves once the viewer
|
||||
* has taken it.
|
||||
* @param {object} viewer
|
||||
* @param {object} dataSource
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
export async function addImportedSource(viewer, dataSource) {
|
||||
await viewer.dataSources.add(dataSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* Take an imported file's data source off `viewer` and destroy it; nothing
|
||||
* when the viewer has no data sources left.
|
||||
* @param {object} viewer
|
||||
* @param {object} dataSource
|
||||
*/
|
||||
export function removeImportedSource(viewer, dataSource) {
|
||||
viewer.dataSources?.remove?.(dataSource, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show or hide an imported file's data source (its entities and pins).
|
||||
* @param {object} dataSource
|
||||
* @param {boolean} show
|
||||
*/
|
||||
export function showImportedSource(dataSource, show) {
|
||||
dataSource.show = show;
|
||||
}
|
||||
Reference in new issue
Block a user