优化渲染帧率
parent
bfd0d631b7
commit
67ef2f01ec
|
@ -2413,16 +2413,21 @@ const onDataSourceReady = ({ viewer, cesiumObject }) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
let mypolylines;
|
let mypolylines;
|
||||||
viewer.scene.primitives._primitives.forEach((element, index) => {
|
viewer.scene.primitives._primitives.forEach((element, index) => {
|
||||||
|
if (element.constructor.name == "CustomPolyline") {
|
||||||
|
viewer.scene.primitives._primitives.splice(index, 2);
|
||||||
|
}
|
||||||
if (element.constructor.name == "PolylineCollection") {
|
if (element.constructor.name == "PolylineCollection") {
|
||||||
if (element._mode == 2) {
|
if (element._mode == 2) {
|
||||||
element._mode = 1;
|
element._mode = 1;
|
||||||
}
|
}
|
||||||
mypolylines = element;
|
mypolylines = element;
|
||||||
}
|
}
|
||||||
if (element.constructor.name == "CustomPolyline") {
|
// 打包后进行系统切换后对象名称发生改变 CustomPolyline --> xe
|
||||||
viewer.scene.primitives._primitives.splice(index, 1);
|
if(element.constructor.name == "xe"){
|
||||||
|
viewer.scene.primitives._primitives.splice(index, 2);
|
||||||
}
|
}
|
||||||
if (element.mymark) {
|
// 打包后系统切换后对象名称发生改变 PolylineCollection --> Ie
|
||||||
|
if (element.constructor.name == "Ie") {
|
||||||
viewer.scene.primitives._primitives.splice(index, 1);
|
viewer.scene.primitives._primitives.splice(index, 1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue