cesium背景透明

const viewer = new Cesium.Viewer("cesiumContainer", {
  orderIndependentTranslucency: false,
  contextOptions: {
    webgl: {
      alpha: true,
    },
  },
});

viewer.scene.skyBox.destroy();
viewer.scene.skyBox = undefined;
viewer.scene.sun.destroy();
viewer.scene.sun = undefined;
viewer.scene.moon.destroy();
viewer.scene.moon = undefined;
viewer.scene.skyAtmosphere.destroy();
viewer.scene.skyAtmosphere = undefined;
viewer.scene.backgroundColor = new Cesium.Color(0, 0, 0, 0);
viewer.scene.globe.baseColor = new Cesium.Color(0, 0, 0, 0);

 

posted @ 2023-02-04 15:25  Hxxxxxxyyyyyy  阅读(412)  评论(0编辑  收藏  举报