清除消防精灵图

main
wangqiujuan0808 2024-01-09 19:34:34 +08:00
parent aa332f38c6
commit 2dba1104d0
1 changed files with 19 additions and 15 deletions

View File

@ -125,11 +125,13 @@ Bus.on('clickApplication', (isParent) => {
}
})
//
watch(() => bimStore().activateMenu, value => {
//
scene.background = new THREE.Color(value.background);
toHomeView();
//
removexf();
}, { deep: true });
const init = () => {
@ -219,6 +221,7 @@ const renderScene = () => {
// console.log('', cameraX, cameraY, cameraZ);
TWEEN.update();
controls.update();
renderer.clear();
renderer.render(scene, camera);
labelRenderer.render(scene, camera);
};
@ -618,28 +621,29 @@ const xfadd = (obj, state) => {
sprite.scale.set(5, 5, 5);
sprite.position.y = 12; //
obj.add(sprite); //tagobj
console.log(123, obj)
}
//
const removexf = () => {
model.traverse(e => {
if (e.isMesh && e.children.length > 0) {
e.remove(e.children[0])
} else {
e.traverse(o => {
if (o.isMesh && o.children.length > 0) {
o.remove(o.children[0])
}
})
// model.traverse(e => {
// if (e.isMesh && e.children.length > 0) {
// e.remove(e.children[0])
// } else {
// e.traverse(o => {
// if (o.isMesh && o.children.length > 0) {
// o.remove(o.children[0])
// }
// })
}
// }
// })
console.log(xfobj.length);
xfobj.forEach((o) => {
//
o.remove(o.children[o.children.length-1]);
})
scene.remove(sprite);
}
//
const changeMap = (img) => {
//
removexf();
isShowWall.value = true;
//
model.traverse(e => {