mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
feat(sky): replace the blocky default sky box with catalogue stars
Cesium's default Tycho-2 sky box is six 1024² JPEGs stretched 3–6× around the whole-globe view, so space read as an over-compressed JPEG (HAL-627). The scene now draws its own sky in the Scene#skyBox slot: the 9,096 stars of the Yale Bright Star Catalogue as point sprites sized in CSS pixels (magnitude → width and opacity, B−V → colour), over a soft, star-free Milky Way cube map built from ESO/S. Brunier's panorama (CC BY 4.0). Both layers share one ICRF→Earth-fixed rotation at the scene clock, with the TEME rotation filling in until Cesium's IAU 2006 tables load. Assets total 482 KB, built by scripts/build-bright-stars.mjs and scripts/build-milky-way.mjs. Frame time and the idle render governor are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
93ea088f45
commit
6549344946
20 files changed
+10644
-2
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import * as Cesium from 'cesium';
|
||||
import { applyModelAtmosphereWorkaround } from './atmosphereCompat.js';
|
||||
import { StarrySky } from '../sky/starrySky.js';
|
||||
|
||||
const PINCH_ZOOM_MULTIPLIER = 8;
|
||||
const MAX_PINCH_PIXEL_DELTA = 120;
|
||||
@@ -119,6 +120,9 @@ export function createApplicationViewer({ container, creditContainer }) {
|
||||
selectionIndicator: false,
|
||||
infoBox: false,
|
||||
baseLayer: false,
|
||||
// Replaced below: the default Tycho-2 cube map is too coarse for the
|
||||
// whole-globe view and its JPEG blocks show around the Earth.
|
||||
skyBox: false,
|
||||
creditContainer,
|
||||
msaaSamples: 4,
|
||||
contextOptions: { webgl: { preserveDrawingBuffer: true } },
|
||||
@@ -130,6 +134,7 @@ export function createApplicationViewer({ container, creditContainer }) {
|
||||
// render loop. See app/atmosphereCompat.js.
|
||||
applyModelAtmosphereWorkaround(viewer.scene);
|
||||
viewer.scene.globe.show = false;
|
||||
viewer.scene.skyBox = new StarrySky();
|
||||
viewer.scene.skyAtmosphere.show = true;
|
||||
viewer.scene.skyAtmosphere.atmosphereLightIntensity = 18;
|
||||
viewer.scene.skyAtmosphere.saturationShift = -0.12;
|
||||
|
||||
Reference in new issue
Block a user