您好,
测试没有该情况,
如果是颜色反转,可以添加代码 layer.RGBTOBGR = true
如果是颜色明暗变化,可以调整光源 scene.lightSource.ambientLightColor = new Cesium.Color(0.65, 0.65, 0.65, 1);
图一时挂在vue data 对象viewer上的情况,图二是使用window对象的情况,你测试没有肯能是你测试有问题,这个问题不仅发生在挂载时还有向viewer中传对象进行操作是也会发生。
data() { return { viewer:null, } } this.viewer= new Cesium.Viewer("cesiumContainer", { infoBox:false, shouldAnimate: true, // sceneModePicker: true, // navigation: false, }); let scene = this.viewer.scene; scene.globe.depthTestAgainstTerrain =true; try { let that=this; let promise = scene.addS3MTilesLayerByScp('http://localhost:8090/iserver/services/3D-bf3d/rest/realspace/datas/Combine/config', { name: 'xxx', }); console.log('promise',promise) promise.then(function (layer) { that.viewer.camera.flyTo({ destination: Cesium.Cartesian3.fromDegrees(x,y,z), }) }); let viewer = xxx; window.viewer = viewer;
(V11.1.0)