Display panel: a Sky group for the atmosphere, day and night, sun, moon, stars and Milky Way

createViewSky sets globe.sky from the panel's switches and Milky Way
slider and keeps the choice for the next visit; what the user has not set
stays as the renderer draws it. Distance fog stays with the styles that
switch it.
This commit is contained in:
Sameh Khamis committed 2026-11-13 21:13:35 -08:00
1 parent 5cd28731fa
commit af3383a5a9
19 files changed
+331 -14

No files matched your search

+7
View File
@@ -3,6 +3,7 @@ import { StyleManager } from '../ui/composition.js';
import { applyStartView, START_VIEW } from '../camera.js';
import { initCockpitCloudEffects } from '../cockpitCloudEffects.js';
import { createViewWeather } from '../viewWeather.js';
import { createViewSky } from '../viewSky.js';
import { findGlobe } from '../render/rendererOf.js';
import { useDisplayStore } from '../ui/stores/display.js';
import { applicationPinia } from '../ui/vueRuntime.js';
@@ -70,6 +71,12 @@ export function createApplicationControls({
store: useDisplayStore(applicationPinia()),
});
defer(() => viewWeather.destroy());
// The atmosphere, sun lighting, sun, moon, stars and Milky Way the user
// chooses in the Display panel.
const viewSky = createViewSky(viewer, {
store: useDisplayStore(applicationPinia()),
});
defer(() => viewSky.destroy());
loaderStatus.textContent = styleManager.hasShareState
? t('Restoring shared view...')