mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
style: adopt application modules into scoped formatting
This commit is contained in:
1 parent
4d37760314
commit
8666705e12
17 files changed
+528
-291
No files matched your search
+9
-8
@@ -2,7 +2,8 @@ import * as Cesium from 'cesium';
|
||||
|
||||
/** Create the standard globe viewer in caller-owned, visible containers. */
|
||||
export function createApplicationViewer({ container, creditContainer }) {
|
||||
if (!container || !creditContainer) throw new TypeError('Viewer and credit containers are required');
|
||||
if (!container || !creditContainer)
|
||||
throw new TypeError('Viewer and credit containers are required');
|
||||
const viewer = new Cesium.Viewer(container, {
|
||||
timeline: false,
|
||||
animation: false,
|
||||
@@ -21,13 +22,13 @@ export function createApplicationViewer({ container, creditContainer }) {
|
||||
contextOptions: { webgl: { preserveDrawingBuffer: true } },
|
||||
});
|
||||
try {
|
||||
viewer.targetFrameRate = 60;
|
||||
viewer.scene.globe.show = false;
|
||||
viewer.scene.skyAtmosphere.show = true;
|
||||
viewer.scene.skyAtmosphere.atmosphereLightIntensity = 18;
|
||||
viewer.scene.skyAtmosphere.saturationShift = -0.12;
|
||||
viewer.scene.skyAtmosphere.brightnessShift = -0.08;
|
||||
return viewer;
|
||||
viewer.targetFrameRate = 60;
|
||||
viewer.scene.globe.show = false;
|
||||
viewer.scene.skyAtmosphere.show = true;
|
||||
viewer.scene.skyAtmosphere.atmosphereLightIntensity = 18;
|
||||
viewer.scene.skyAtmosphere.saturationShift = -0.12;
|
||||
viewer.scene.skyAtmosphere.brightnessShift = -0.08;
|
||||
return viewer;
|
||||
} catch (error) {
|
||||
viewer.destroy();
|
||||
throw error;
|
||||
|
||||
Reference in new issue
Block a user