From 285b0843030ce8b6f9ffd776e0f60128af43a212 Mon Sep 17 00:00:00 2001 From: wangqiujuan0808 <578331299@qq.com> Date: Tue, 9 Jan 2024 19:45:16 +0800 Subject: [PATCH] Update ThreeView2.vue --- src/views/bim/bimHome/components/ThreeView2.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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]); + } + }) } // 更换纹理贴图方法