From a43e9076b2d933fa1236752c5ae2684bc4b3ed12 Mon Sep 17 00:00:00 2001 From: Daven Quinn Date: Mon, 2 Oct 2023 12:36:05 -0500 Subject: [PATCH] Updated screen space errors --- deps/cesium-viewer | 2 +- packages/globe-dev/src/cesium-view.ts | 19 ++++++++++++------- packages/globe-dev/src/main.ts | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/deps/cesium-viewer b/deps/cesium-viewer index a911c879..cdca09dc 160000 --- a/deps/cesium-viewer +++ b/deps/cesium-viewer @@ -1 +1 @@ -Subproject commit a911c8798e355ed741d3f8f69c99248643b08218 +Subproject commit cdca09dc9a01ba35987582d57b5627bc7bb7b4a6 diff --git a/packages/globe-dev/src/cesium-view.ts b/packages/globe-dev/src/cesium-view.ts index 27fe99d3..f8bd7efd 100644 --- a/packages/globe-dev/src/cesium-view.ts +++ b/packages/globe-dev/src/cesium-view.ts @@ -24,15 +24,18 @@ import { MapboxImageryProvider } from "cesium"; // return h(ImageryLayer, { imageryProvider: provider.current, ...rest }); // } +function buildSatelliteLayer({ accessToken }) { + const provider = new MapboxImageryProvider({ + mapId: "mapbox.satellite", + maximumLevel: 19, + accessToken, + }); + return provider; +} + const SatelliteLayer = (props) => { const { accessToken, ...rest } = props; - let satellite = useRef( - new MapboxImageryProvider({ - mapId: "mapbox.satellite", - maximumLevel: 19, - accessToken, - }) - ); + let satellite = useRef(buildSatelliteLayer({ accessToken })); return h(ImageryLayer, { imageryProvider: satellite.current, ...rest }); }; @@ -54,6 +57,8 @@ function CesiumView({ style, accessToken, ...rest }) { { terrainProvider: terrainProvider.current, displayQuality: DisplayQuality.High, + fogDensity: 0.0002, + //skyBox: true, showInspector: true, showIonLogo: false, ...rest, diff --git a/packages/globe-dev/src/main.ts b/packages/globe-dev/src/main.ts index 8b7521fb..21a3df2e 100644 --- a/packages/globe-dev/src/main.ts +++ b/packages/globe-dev/src/main.ts @@ -35,7 +35,7 @@ var opts = { // Makes cesium not render high fps all the time requestRenderMode: true, // Use full scene buffer (respecting pixel ratio) if this is false - useBrowserRecommendedResolution: false, + //useBrowserRecommendedResolution: false, // We have a bug in the tile bounding box calculation somewhere. terrainExaggeration: 1.0, baseLayer: new Cesium.ImageryLayer(satellite),