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:
Sameh Khamis committed 2026-11-07 18:10:39 -08:00
1 parent b19fa56565
commit 81d8e3a4a7
20 files changed
+308 -119

No files matched your search

+5 -6
View File
@@ -40,13 +40,15 @@ export function styleDefinition(name, shader) {
export class VisualEffects {
/**
* @param {object} options - The renderer's effects port (null: records
* only), the viewer whose sky the anime style dims, render ownership
* only), the viewer, a getter for the globe's sky port the anime
* style dims (null: the sky is left alone), render ownership
* callbacks and optional clocks. Construction is inert;
* initStyles/initPostProcess retain startup ordering.
*/
constructor({
effects = null,
viewer,
sky = null,
requestRender,
holdRender,
releaseRender,
@@ -56,6 +58,7 @@ export class VisualEffects {
}) {
this.effects = effects;
this.viewer = viewer;
this.sky = sky;
this.requestRender = requestRender;
this.holdRender = holdRender;
this.releaseRender = releaseRender;
@@ -164,11 +167,7 @@ export class VisualEffects {
stage.enabled = value > OFF;
// Anime's bands turn the faint Milky Way into blotches, and depth cannot
// tell the sky from far geometry, so the glow fades with the style.
if (
stage === this.stages.anime &&
this.viewer?.scene?.skyBox?.milkyWayVisibility !== undefined
)
this.viewer.scene.skyBox.milkyWayVisibility = 1 - value;
if (stage === this.stages.anime) this.sky?.()?.set({ milkyWay: 1 - value });
this.requestRender('style-stage');
}