diff --git a/src/views/bim/bimHome/components/ThreeView2.vue b/src/views/bim/bimHome/components/ThreeView2.vue index b4a4531..20b9de4 100644 --- a/src/views/bim/bimHome/components/ThreeView2.vue +++ b/src/views/bim/bimHome/components/ThreeView2.vue @@ -221,7 +221,6 @@ const renderScene = () => { // console.log('坐标', cameraX, cameraY, cameraZ); TWEEN.update(); controls.update(); - renderer.clear(); renderer.render(scene, camera); labelRenderer.render(scene, camera); }; @@ -636,10 +635,13 @@ 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]); + } + }) } // 更换纹理贴图方法