Commit ed547f2a by jlc

update:地球坐标系的透视修改

parent 7ec4f277
src/assets/EarthCoordinate.png

422 KB | W: | H:

src/assets/EarthCoordinate.png

360 KB | W: | H:

src/assets/EarthCoordinate.png
src/assets/EarthCoordinate.png
src/assets/EarthCoordinate.png
src/assets/EarthCoordinate.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -6,10 +6,37 @@ export function addearthCoordinate() { ...@@ -6,10 +6,37 @@ export function addearthCoordinate() {
const viewer = new window.Cesium.Viewer('cesiumContainer', { const viewer = new window.Cesium.Viewer('cesiumContainer', {
infoBox: false, infoBox: false,
orderIndependentTranslucency: false,
}); });
// 获取地球的 globe 实例 const scene = viewer.scene;
const globe = viewer.scene.globe; // 获取地球globe实例
const globe = scene.globe;
const baseLayer = viewer.scene.imageryLayers.get(0);
scene.screenSpaceCameraController.enableCollisionDetection = false;
function reset() {
globe.showGroundAtmosphere = true;
globe.baseColor = Cesium.Color.BLUE;
globe.translucency.enabled = false;
globe.translucency.frontFaceAlpha = 1.0;
globe.undergroundColor = Cesium.Color.BLACK;
globe.translucency.rectangle = undefined;
baseLayer.colorToAlpha = undefined;
}
function useTranslucencyMask() {
globe.showGroundAtmosphere = false;
globe.baseColor = Cesium.Color.TRANSPARENT;
globe.translucency.enabled = true;
globe.undergroundColor = undefined;
baseLayer.colorToAlpha = new Cesium.Color(0.0, 0.016, 0.059);
baseLayer.colorToAlphaThreshold = 0.2;
}
reset();
useTranslucencyMask();
// 创建一个以地球球心为起点的坐标系 // 创建一个以地球球心为起点的坐标系
const center = new Cesium.Cartesian3(0, 0, 0); // 地球球心的坐标 const center = new Cesium.Cartesian3(0, 0, 0); // 地球球心的坐标
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment