使用包版本:SuperMap iClient3D 11i (2022) SP1 for Cesium(2023/8/29)
问题描述:
大部分缓存加载正常(item.TYPE=="3DMAP"),极个别缓存加载后依然出现颜色反转,色调也不正常(item.TYPE=="3DLAYER"),无论是否使用“layer.RGBTOBGR = true”,这些缓存纹理格式均为“DXT(PC设备)”
以下为正常时的状态
另外,在拉进一定距离后,建筑物会出现部分隐藏的情况,类似下图这样:
正常时是这样:
附上相关代码段:
if (item.TYPE == "3DMAP") {
var sanweiLayer = window.viewer.scene.addS3MTilesLayerByScp(item.URL, {
name: item.SOURCEINFO,
});
sanweiLayer.then((layer) =>{
layer.RGBTOBGR = true;
});
var objLayer = { id: item.ID, name: item.NAME, layer: sanweiLayer };
this.$store.state.rzLayer.push(objLayer);
window.viewer.flyTo(sanweiLayer);
this.$set(item, "LAYER3D", sanweiLayer);
this.$store.state.sanWeiTCM[item.ID] = item.SOURCEINFO;
this.$set(item, "TMD", 100);
this.$set(item, "SLIDER", false);
this.$set(item, "ISSHOW", true);
this.$set(item, "E", event.target);
this.$store.state.sanWeiAddLayerList.unshift(item);
} else if (item.TYPE == "TILEMAP") {
//
var sl = window.viewer.imageryLayers.addImageryProvider(
new Cesium.SuperMapImageryProvider({
url: item.URL,
prjCoordSys: "%7B'epsgCode':4326%7D",
})
);
window.viewer.flyTo(sl);
this.$set(item, "LAYER3D", sl);
this.$store.state.wmsQJLayer[item.ID] = sl;
this.$set(item, "TMD", 100);
this.$set(item, "SLIDER", false);
this.$set(item, "ISSHOW", true);
this.$set(item, "E", event.target);
this.$store.state.sanWeiAddLayerList.unshift(item);
} else {
var _sanweiLayer = window.viewer.scene
.open(item.URL, item.BZ1, {
autoSetView: true,
})
.then((layer) => {
layer.RGBTOBGR = true;
var obj = {
heading: window.viewer.camera.heading,
pitch: window.viewer.camera.pitch,
roll: window.viewer.camera.roll,
x: window.viewer.camera.position.x,
y: window.viewer.camera.position.y,
z: window.viewer.camera.position.z,
};
this.$set(item, "LAYER3D", _sanweiLayer);
this.$set(item, "LAYERSETVIEW", obj);
this.$store.state.sanWeiTCM[item.ID] = item.SOURCEINFO;
this.$set(item, "TMD", 100);
this.$set(item, "SLIDER", false);
this.$set(item, "ISSHOW", true);
this.$set(item, "E", event.target);
this.$store.state.sanWeiAddLayerList.unshift(item);
});
}