diff --git a/src/views/bim/bimHome/components/ThreeView2.vue b/src/views/bim/bimHome/components/ThreeView2.vue index 8879250..275ef85 100644 --- a/src/views/bim/bimHome/components/ThreeView2.vue +++ b/src/views/bim/bimHome/components/ThreeView2.vue @@ -211,7 +211,6 @@ const renderScene = () => { // console.log('坐标', cameraX, cameraY, cameraZ); TWEEN.update(); controls.update(); - renderer.clear(); renderer.render(scene, camera); labelRenderer.render(scene, camera); }; @@ -576,7 +575,11 @@ const removexf = () => { console.log(xfobj.length); xfobj.forEach((o) => { // 倒序 - o.remove(o.children[o.children.length-1]); + let obj = o.children[o.children.length-1]; + if(obj && obj.type === 'Sprite') { + o.remove(o.children[o.children.length-1]); + } + }) } // 更换纹理贴图方法