清除消防精灵图

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