Co-authored-by: Reifonas <211114984+Reifonas@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-05-21 16:52:49 +00:00
parent 7e30722c2a
commit 145bc51272
+3
View File
@@ -767,12 +767,14 @@ function VisibilityApplier() {
// For each ifcElement descendant inside this model root
root.traverse((el) => {
if (!el.userData?.ifcElement) return;
touched++;
const key = elementKey(modelId, el);
const hidden = hiddenElementKeys.has(key);
const isolated = isolatedElementKeys ? !isolatedElementKeys.has(key) : false;
el.visible = !(hidden || isolated);
const selected = selectedElementKeys.has(key);
if (selected) highlighted++;
el.traverse((m) => {
if (!(m instanceof THREE.Mesh)) return;
const mats = Array.isArray(m.material) ? m.material : [m.material];
@@ -796,6 +798,7 @@ function VisibilityApplier() {
});
});
});
console.log('[VisibilityApplier] ran', { touched, highlighted, selectedKeys: Array.from(selectedElementKeys) });
}, [scene, nonce, models, opacity, renderMode, checklist]);
return null;