Skip to content

Commit 6cfbc5c

Browse files
authored
Merge pull request #139 from reearth/fix/verticalExaggeration
fix: reset verticalExaggeration to 1 when terrain is disabled
2 parents 30394ee + 2d5ba6d commit 6cfbc5c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/engines/Cesium/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,9 @@ const Cesium: React.ForwardRefRenderFunction<EngineRef, EngineProps> = (
253253
useWebVR={!!property?.scene?.vr || undefined} // NOTE: useWebVR={false} will crash Cesium
254254
debugShowFramesPerSecond={!!property?.debug?.showFramesPerSecond}
255255
verticalExaggerationRelativeHeight={property?.scene?.verticalExaggerationRelativeHeight}
256-
verticalExaggeration={property?.scene?.verticalExaggeration}
256+
verticalExaggeration={
257+
property?.terrain?.enabled ? property?.scene?.verticalExaggeration : 1
258+
}
257259
/>
258260
<SkyBox show={property?.sky?.skyBox?.show ?? true} />
259261
<Fog enabled={property?.sky?.fog?.enabled ?? true} density={property?.sky?.fog?.density} />

0 commit comments

Comments
 (0)