diff --git a/examples/BCFTopics/index.html b/examples/BCFTopics/index.html
index 9504cf0f..6f9e0da0 100644
--- a/examples/BCFTopics/index.html
+++ b/examples/BCFTopics/index.html
@@ -58,11 +58,11 @@
}
-
+
-
-
+
+
diff --git a/examples/BoundingBoxer/index.html b/examples/BoundingBoxer/index.html
index 34bdb5c7..c16701cf 100644
--- a/examples/BoundingBoxer/index.html
+++ b/examples/BoundingBoxer/index.html
@@ -58,11 +58,11 @@
-
+
-
+
diff --git a/examples/Civil3DNavigator/index.html b/examples/Civil3DNavigator/index.html
index df29346b..1d0b61f9 100644
--- a/examples/Civil3DNavigator/index.html
+++ b/examples/Civil3DNavigator/index.html
@@ -58,11 +58,11 @@
-
-
+
+
-
+
diff --git a/examples/CivilCrossSectionNavigator/index.html b/examples/CivilCrossSectionNavigator/index.html
index 233a9e3a..8668a571 100644
--- a/examples/CivilCrossSectionNavigator/index.html
+++ b/examples/CivilCrossSectionNavigator/index.html
@@ -76,11 +76,11 @@
-
-
+
+
-
-
+
+
diff --git a/examples/CivilElevationNavigator/index.html b/examples/CivilElevationNavigator/index.html
index 2c16be41..f2a4f8ed 100644
--- a/examples/CivilElevationNavigator/index.html
+++ b/examples/CivilElevationNavigator/index.html
@@ -77,11 +77,11 @@
-
-
-
+
+
+
-
+
diff --git a/examples/CivilPlanNavigator/index.html b/examples/CivilPlanNavigator/index.html
index 2be2dc42..931f5862 100644
--- a/examples/CivilPlanNavigator/index.html
+++ b/examples/CivilPlanNavigator/index.html
@@ -66,11 +66,11 @@
-
-
-
+
+
+
-
+
diff --git a/examples/Classifier/index.html b/examples/Classifier/index.html
index 1232f130..2e6a2362 100644
--- a/examples/Classifier/index.html
+++ b/examples/Classifier/index.html
@@ -58,11 +58,11 @@
-
+
-
+
diff --git a/examples/ClipEdges/index.html b/examples/ClipEdges/index.html
index f9cde6a5..d74ba857 100644
--- a/examples/ClipEdges/index.html
+++ b/examples/ClipEdges/index.html
@@ -58,12 +58,12 @@
-
+
-
-
+
+
diff --git a/examples/Clipper/index.html b/examples/Clipper/index.html
index 3082ecf7..92f4bcce 100644
--- a/examples/Clipper/index.html
+++ b/examples/Clipper/index.html
@@ -58,11 +58,11 @@
-
+
-
+
diff --git a/examples/Cullers/index.html b/examples/Cullers/index.html
index e461bb76..6feb76c5 100644
--- a/examples/Cullers/index.html
+++ b/examples/Cullers/index.html
@@ -58,10 +58,10 @@
-
+
-
+
diff --git a/examples/EdgeMeasurement/index.html b/examples/EdgeMeasurement/index.html
index 1fff8443..ff24703b 100644
--- a/examples/EdgeMeasurement/index.html
+++ b/examples/EdgeMeasurement/index.html
@@ -58,11 +58,11 @@
-
+
-
-
+
+
diff --git a/examples/Exploder/index.html b/examples/Exploder/index.html
index a79cf6eb..05738be5 100644
--- a/examples/Exploder/index.html
+++ b/examples/Exploder/index.html
@@ -58,11 +58,11 @@
-
+
-
+
diff --git a/examples/FaceMeasurement/index.html b/examples/FaceMeasurement/index.html
index be0d5ebe..949f0f96 100644
--- a/examples/FaceMeasurement/index.html
+++ b/examples/FaceMeasurement/index.html
@@ -58,11 +58,11 @@
-
+
-
-
+
+
diff --git a/examples/FragmentsManager/index.html b/examples/FragmentsManager/index.html
index 0243afa4..fb5a5551 100644
--- a/examples/FragmentsManager/index.html
+++ b/examples/FragmentsManager/index.html
@@ -58,10 +58,10 @@
-
+
-
+
diff --git a/examples/Grids/index.html b/examples/Grids/index.html
index f53423d6..f2afa840 100644
--- a/examples/Grids/index.html
+++ b/examples/Grids/index.html
@@ -64,10 +64,10 @@
-
+
-
+
diff --git a/examples/Hider/index.html b/examples/Hider/index.html
index c8bd7ded..6dd7234d 100644
--- a/examples/Hider/index.html
+++ b/examples/Hider/index.html
@@ -58,11 +58,11 @@
-
+
-
+
diff --git a/examples/Highlighter/index.html b/examples/Highlighter/index.html
index 09e2c60e..e12b74f1 100644
--- a/examples/Highlighter/index.html
+++ b/examples/Highlighter/index.html
@@ -58,9 +58,9 @@
-
-
-
+
+
+
diff --git a/examples/IDSSpecifications/index.html b/examples/IDSSpecifications/index.html
index ac481538..98cc4639 100644
--- a/examples/IDSSpecifications/index.html
+++ b/examples/IDSSpecifications/index.html
@@ -40,9 +40,9 @@
}
-
+
-
+
diff --git a/examples/IfcFinder/index.html b/examples/IfcFinder/index.html
index cc2a2c41..ebcde340 100644
--- a/examples/IfcFinder/index.html
+++ b/examples/IfcFinder/index.html
@@ -58,11 +58,11 @@
-
+
-
+
diff --git a/examples/IfcGeometryTiler/index.html b/examples/IfcGeometryTiler/index.html
index a9ad2d4e..e7c3f0c1 100644
--- a/examples/IfcGeometryTiler/index.html
+++ b/examples/IfcGeometryTiler/index.html
@@ -58,11 +58,11 @@
-
+
-
+
diff --git a/examples/IfcIsolator/index.html b/examples/IfcIsolator/index.html
index 4fc6826d..b1a6bc0e 100644
--- a/examples/IfcIsolator/index.html
+++ b/examples/IfcIsolator/index.html
@@ -58,11 +58,11 @@
-
+
-
+
diff --git a/examples/IfcJsonExporter/index.html b/examples/IfcJsonExporter/index.html
index 966fcbcf..9f860b7a 100644
--- a/examples/IfcJsonExporter/index.html
+++ b/examples/IfcJsonExporter/index.html
@@ -58,11 +58,11 @@
-
+
-
+
diff --git a/examples/IfcLoader/index.html b/examples/IfcLoader/index.html
index 6c6520cc..8763a04b 100644
--- a/examples/IfcLoader/index.html
+++ b/examples/IfcLoader/index.html
@@ -58,11 +58,11 @@
-
+
-
+
diff --git a/examples/IfcPropertiesManager/index.html b/examples/IfcPropertiesManager/index.html
index 16faf852..e646b46b 100644
--- a/examples/IfcPropertiesManager/index.html
+++ b/examples/IfcPropertiesManager/index.html
@@ -6,8 +6,8 @@
Ifc Properties Manager
-
-
+
+
diff --git a/examples/IfcPropertiesTiler/index.html b/examples/IfcPropertiesTiler/index.html
index 7827fa87..7c4e7759 100644
--- a/examples/IfcPropertiesTiler/index.html
+++ b/examples/IfcPropertiesTiler/index.html
@@ -58,11 +58,11 @@
-
+
-
+
diff --git a/examples/IfcRelationsIndexer/index.html b/examples/IfcRelationsIndexer/index.html
index 72a1f50d..4dc7fb97 100644
--- a/examples/IfcRelationsIndexer/index.html
+++ b/examples/IfcRelationsIndexer/index.html
@@ -58,12 +58,12 @@
-
+
-
-
+
+
diff --git a/examples/IfcStreamer/index.html b/examples/IfcStreamer/index.html
index a78ebc25..5838d450 100644
--- a/examples/IfcStreamer/index.html
+++ b/examples/IfcStreamer/index.html
@@ -58,11 +58,11 @@
-
+
-
-
+
+
diff --git a/examples/LengthMeasurement/index.html b/examples/LengthMeasurement/index.html
index e342f8eb..ef09e4a5 100644
--- a/examples/LengthMeasurement/index.html
+++ b/examples/LengthMeasurement/index.html
@@ -58,12 +58,12 @@
-
+
-
+
-
+
diff --git a/examples/Marker/index.html b/examples/Marker/index.html
index 07f10ac4..541f3732 100644
--- a/examples/Marker/index.html
+++ b/examples/Marker/index.html
@@ -58,9 +58,9 @@
-
-
-
+
+
+
diff --git a/examples/MeasurementUtils/index.html b/examples/MeasurementUtils/index.html
index 2dfbac36..5bc870a4 100644
--- a/examples/MeasurementUtils/index.html
+++ b/examples/MeasurementUtils/index.html
@@ -58,10 +58,10 @@
-
+
-
+
diff --git a/examples/MiniMap/index.html b/examples/MiniMap/index.html
index ad159a05..b45c8db5 100644
--- a/examples/MiniMap/index.html
+++ b/examples/MiniMap/index.html
@@ -64,11 +64,11 @@
-
+
-
+
diff --git a/examples/OrthoPerspectiveCamera/index.html b/examples/OrthoPerspectiveCamera/index.html
index 6aedd6b6..52e785c6 100644
--- a/examples/OrthoPerspectiveCamera/index.html
+++ b/examples/OrthoPerspectiveCamera/index.html
@@ -58,11 +58,11 @@
-
+
-
+
diff --git a/examples/Plans/index.html b/examples/Plans/index.html
index 1599280e..b935f9fe 100644
--- a/examples/Plans/index.html
+++ b/examples/Plans/index.html
@@ -58,9 +58,9 @@
-
-
-
+
+
+
diff --git a/examples/PostproductionRenderer/index.html b/examples/PostproductionRenderer/index.html
index f256c237..b1e2d821 100644
--- a/examples/PostproductionRenderer/index.html
+++ b/examples/PostproductionRenderer/index.html
@@ -58,12 +58,12 @@
-
+
-
-
+
+
diff --git a/examples/Raycasters/index.html b/examples/Raycasters/index.html
index 9ecee573..87a6092a 100644
--- a/examples/Raycasters/index.html
+++ b/examples/Raycasters/index.html
@@ -58,10 +58,10 @@
-
+
-
+
diff --git a/examples/Sections/index.html b/examples/Sections/index.html
index 53982170..4f15669c 100644
--- a/examples/Sections/index.html
+++ b/examples/Sections/index.html
@@ -58,12 +58,12 @@
-
-
+
+
-
+
diff --git a/examples/ShadowDropper/index.html b/examples/ShadowDropper/index.html
index a5b676d2..e4de9e54 100644
--- a/examples/ShadowDropper/index.html
+++ b/examples/ShadowDropper/index.html
@@ -58,12 +58,12 @@
-
-
+
+
-
+
diff --git a/examples/ShadowedScene/index.html b/examples/ShadowedScene/index.html
index 97a66a7d..3c92b74f 100644
--- a/examples/ShadowedScene/index.html
+++ b/examples/ShadowedScene/index.html
@@ -64,10 +64,10 @@
-
+
-
+
diff --git a/examples/Viewpoints/index.html b/examples/Viewpoints/index.html
index 0e61d76a..94da7e62 100644
--- a/examples/Viewpoints/index.html
+++ b/examples/Viewpoints/index.html
@@ -58,11 +58,11 @@
}
-
+
-
-
+
+
diff --git a/examples/VolumeMeasurement/index.html b/examples/VolumeMeasurement/index.html
index 364006b9..6de1b2eb 100644
--- a/examples/VolumeMeasurement/index.html
+++ b/examples/VolumeMeasurement/index.html
@@ -58,11 +58,11 @@
-
+
-
-
+
+
diff --git a/examples/Worlds/index.html b/examples/Worlds/index.html
index 69c62260..3f4f4ec5 100644
--- a/examples/Worlds/index.html
+++ b/examples/Worlds/index.html
@@ -58,11 +58,11 @@
-
+
-
+
diff --git a/examples/assets/angleMeasurement.js b/examples/assets/angleMeasurement.js
index dcf4e958..b9efb336 100644
--- a/examples/assets/angleMeasurement.js
+++ b/examples/assets/angleMeasurement.js
@@ -1 +1 @@
-import{B as c,M as d,a as l}from"./web-ifc-api-CpQ3aV8c.js";import{C as m,T as i,s as w,x as p,L as b}from"./index-B03kGVBW.js";import{b as u,o as f}from"./index-lUHwa_Wd.js";import{S as g}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";const a=document.getElementById("container"),o=new m,y=o.get(i),e=y.create();e.scene=new w(o);e.renderer=new u(o,a);e.camera=new p(o);o.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const h=o.get(b);h.create(e);e.scene.three.background=null;const k=new c(3,3,3),x=new d({color:"#6528D7"}),s=new l(k,x);s.position.set(0,1.5,0);e.scene.three.add(s);e.meshes.add(s);const n=o.get(f);n.world=e;n.enabled=!0;a.ondblclick=()=>n.create();window.onkeydown=r=>{(r.code==="Delete"||r.code==="Backspace")&&n.deleteAll()};const t=new g;t.showPanel(2);document.body.append(t.dom);t.dom.style.left="0px";t.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>t.begin());e.renderer.onAfterUpdate.add(()=>t.end());
+import{B as d,M as c,a as l}from"./web-ifc-api-nU1-R_1k.js";import{C as m,W as i,S as p,a as w,G as u}from"./index-C8rcJyf0.js";import{L as b,l as f}from"./index-BdoCSKf7.js";import{S as g}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),o=new m,y=o.get(i),e=y.create();e.scene=new p(o);e.renderer=new b(o,r);e.camera=new w(o);o.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const S=o.get(u);S.create(e);e.scene.three.background=null;const h=new d(3,3,3),k=new c({color:"#6528D7"}),s=new l(h,k);s.position.set(0,1.5,0);e.scene.three.add(s);e.meshes.add(s);const t=o.get(f);t.world=e;t.enabled=!0;r.ondblclick=()=>t.create();window.onkeydown=a=>{(a.code==="Delete"||a.code==="Backspace")&&t.deleteAll()};const n=new g;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end());
diff --git a/examples/assets/areaMeasurement.js b/examples/assets/areaMeasurement.js
index 033dfae4..826e25b7 100644
--- a/examples/assets/areaMeasurement.js
+++ b/examples/assets/areaMeasurement.js
@@ -1 +1 @@
-import{B as c,M as d,a as m}from"./web-ifc-api-CpQ3aV8c.js";import{S as i}from"./stats.min-GTpOrGrX.js";import{C as l,T as w,s as p,x as u,L as b}from"./index-B03kGVBW.js";import{b as f,r as g}from"./index-lUHwa_Wd.js";import"./_commonjsHelpers-Cpj98o6Y.js";const s=document.getElementById("container"),t=new l,y=t.get(w),e=y.create();e.scene=new p(t);e.renderer=new f(t,s);e.camera=new u(t);t.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const h=t.get(b);h.create(e);e.scene.three.background=null;const x=new c(3,3,3),k=new d({color:"#6528D7"}),r=new m(x,k);r.position.set(0,1.5,0);e.scene.three.add(r);e.meshes.add(r);const o=t.get(g);o.world=e;o.enabled=!0;s.ondblclick=()=>o.create();s.oncontextmenu=()=>o.endCreation();window.onkeydown=a=>{(a.code==="Delete"||a.code==="Backspace")&&o.deleteAll()};const n=new i;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end());
+import{B as c,M as d,a as m}from"./web-ifc-api-nU1-R_1k.js";import{S as l}from"./stats.min-GTpOrGrX.js";import{C as i,W as p,S as w,a as u,G as b}from"./index-C8rcJyf0.js";import{L as f,c as g}from"./index-BdoCSKf7.js";import"./_commonjsHelpers-Cpj98o6Y.js";const s=document.getElementById("container"),n=new i,y=n.get(p),e=y.create();e.scene=new w(n);e.renderer=new f(n,s);e.camera=new u(n);n.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const S=n.get(b);S.create(e);e.scene.three.background=null;const h=new c(3,3,3),k=new d({color:"#6528D7"}),a=new m(h,k);a.position.set(0,1.5,0);e.scene.three.add(a);e.meshes.add(a);const t=n.get(g);t.world=e;t.enabled=!0;s.ondblclick=()=>t.create();s.oncontextmenu=()=>t.endCreation();window.onkeydown=r=>{(r.code==="Delete"||r.code==="Backspace")&&t.deleteAll()};const o=new l;o.showPanel(2);document.body.append(o.dom);o.dom.style.left="0px";o.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>o.begin());e.renderer.onAfterUpdate.add(()=>o.end());
diff --git a/examples/assets/bCFTopics.js b/examples/assets/bCFTopics.js
index 68f8b611..1f2bf35c 100644
--- a/examples/assets/bCFTopics.js
+++ b/examples/assets/bCFTopics.js
@@ -1,4 +1,4 @@
-import"./web-ifc-api-CpQ3aV8c.js";import{T as p,z as d,m as u}from"./index-BEvRfOoQ.js";import{C as f,W as w,S as b,I as g,B as h,V as y,T as C}from"./index-B_pEH4rh.js";import{S as v,a as T,G as S}from"./index-BqrBcJfH.js";import"./_commonjsHelpers-Cpj98o6Y.js";p.init();const l=document.createElement("bim-viewport"),t=new f,I=t.get(w),o=I.create();o.scene=new v(t);o.scene.setup();o.renderer=new T(t,l);o.camera=new b(t);const B=t.get(S);B.create(o);t.init();o.camera.controls.setLookAt(12,6,8,0,2,-2);const r=t.get(g);await r.setup();const L=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),U=await L.arrayBuffer(),k=new Uint8Array(U),D=await r.load(k);o.scene.three.add(D);const i=t.get(h);i.setup({author:"signed.user@mail.com",types:new Set([...i.config.types,"Information","Coordination"]),statuses:new Set(["Active","In Progress","Done","In Review","Closed"]),users:new Set(["juan.hoyos4@gmail.com"])});const F=t.get(y);i.list.onItemSet.add(({value:e})=>{const n=F.create(o,{title:e.title});e.viewpoints.add(n.guid),e.comments.onItemSet.add(({value:a})=>{a.viewpoint=n})});const s=i.create({title:"Missing information",description:"It seems these elements are badly defined.",dueDate:new Date("08-01-2020"),type:"Clash",priority:"Major",stage:"Design",labels:new Set(["Architecture","Cost Estimation"]),assignedTo:"juan.hoyos@thatopen.com"});C.default={title:"Custom Default Title",type:"Custom Default Topic Type",status:"Custom Default Topic Status",priority:"Custom Default Priority"};const E=s.createComment("What if we talk about this next meeting?"),R=s.createComment("Hi there! I agree.");i.list.onItemUpdated.add(({value:e})=>{console.log(`Topic ${e.title} was updated!`)});s.title="Updated Title";s.set({title:"New Title"});s.comments.onItemUpdated.add(({value:e})=>{console.log("The following comment has been updated:",e)});E.comment="What if we talk about this next meeting with all partners?";R.comment="Will tell you tomorrow when is more convenient!";const j=async()=>{const e=await i.export(),n=new File([e],"topics.bcf"),a=document.createElement("a");a.href=URL.createObjectURL(n),a.download=n.name,a.click(),URL.revokeObjectURL(a.href)},x=()=>{const e=document.createElement("input");e.multiple=!1,e.accept=".bcf",e.type="file",e.addEventListener("change",async()=>{var c;const n=(c=e.files)==null?void 0:c[0];if(!n)return;const a=await n.arrayBuffer();i.load(new Uint8Array(a),o)}),e.click()},A=d.create(()=>u`
+import"./web-ifc-api-nU1-R_1k.js";import{T as p,z as d,m as u}from"./index-BEvRfOoQ.js";import{C as f,W as w,S as b,I as g,B as h,V as y,T as C}from"./index-BboVOtPt.js";import{S as v,a as T,G as S}from"./index-BvJCnCKo.js";import"./_commonjsHelpers-Cpj98o6Y.js";p.init();const l=document.createElement("bim-viewport"),t=new f,I=t.get(w),o=I.create();o.scene=new v(t);o.scene.setup();o.renderer=new T(t,l);o.camera=new b(t);const B=t.get(S);B.create(o);t.init();o.camera.controls.setLookAt(12,6,8,0,2,-2);const r=t.get(g);await r.setup();const L=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),U=await L.arrayBuffer(),k=new Uint8Array(U),D=await r.load(k);o.scene.three.add(D);const i=t.get(h);i.setup({author:"signed.user@mail.com",types:new Set([...i.config.types,"Information","Coordination"]),statuses:new Set(["Active","In Progress","Done","In Review","Closed"]),users:new Set(["juan.hoyos4@gmail.com"])});const F=t.get(y);i.list.onItemSet.add(({value:e})=>{const n=F.create(o,{title:e.title});e.viewpoints.add(n.guid),e.comments.onItemSet.add(({value:a})=>{a.viewpoint=n})});const s=i.create({title:"Missing information",description:"It seems these elements are badly defined.",dueDate:new Date("08-01-2020"),type:"Clash",priority:"Major",stage:"Design",labels:new Set(["Architecture","Cost Estimation"]),assignedTo:"juan.hoyos@thatopen.com"});C.default={title:"Custom Default Title",type:"Custom Default Topic Type",status:"Custom Default Topic Status",priority:"Custom Default Priority"};const E=s.createComment("What if we talk about this next meeting?"),R=s.createComment("Hi there! I agree.");i.list.onItemUpdated.add(({value:e})=>{console.log(`Topic ${e.title} was updated!`)});s.title="Updated Title";s.set({title:"New Title"});s.comments.onItemUpdated.add(({value:e})=>{console.log("The following comment has been updated:",e)});E.comment="What if we talk about this next meeting with all partners?";R.comment="Will tell you tomorrow when is more convenient!";const j=async()=>{const e=await i.export(),n=new File([e],"topics.bcf"),a=document.createElement("a");a.href=URL.createObjectURL(n),a.download=n.name,a.click(),URL.revokeObjectURL(a.href)},x=()=>{const e=document.createElement("input");e.multiple=!1,e.accept=".bcf",e.type="file",e.addEventListener("change",async()=>{var c;const n=(c=e.files)==null?void 0:c[0];if(!n)return;const a=await n.arrayBuffer();i.load(new Uint8Array(a),o)}),e.click()},A=d.create(()=>u`
diff --git a/examples/assets/boundingBoxer.js b/examples/assets/boundingBoxer.js
index 1b979626..56f002b3 100644
--- a/examples/assets/boundingBoxer.js
+++ b/examples/assets/boundingBoxer.js
@@ -1,16 +1,16 @@
-import"./web-ifc-api-CpQ3aV8c.js";import{S as i}from"./stats.min-GTpOrGrX.js";import{T as l,z as a,m as r}from"./index-BEvRfOoQ.js";import{C as d,T as m,s as p,g as b,x as u,L as g,a as f,D as h}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const w=document.getElementById("container"),t=new d,y=t.get(m),e=y.create();e.scene=new p(t);e.renderer=new b(t,w);e.camera=new u(t);t.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const x=t.get(g);x.create(e);e.scene.three.background=null;const B=t.get(f),T=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),L=await T.arrayBuffer(),v=new Uint8Array(L),c=B.load(v);e.scene.three.add(c);const s=t.get(h);s.add(c);const k=s.getMesh();s.reset();const n=new i;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end());l.init();const o=a.create(()=>r`
+import"./web-ifc-api-nU1-R_1k.js";import{S as c}from"./stats.min-GTpOrGrX.js";import{T as l,z as a,m as r}from"./index-BEvRfOoQ.js";import{C as d,W as m,S as p,d as b,a as u,G as g,F as f,q as w}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const h=document.getElementById("container"),t=new d,B=t.get(m),e=B.create();e.scene=new p(t);e.renderer=new b(t,h);e.camera=new u(t);t.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const y=t.get(g);y.create(e);e.scene.three.background=null;const S=t.get(f),x=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),v=await x.arrayBuffer(),k=new Uint8Array(v),i=S.load(k);e.scene.three.add(i);const s=t.get(w);s.add(i);const C=s.getMesh();s.reset();const n=new c;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end());l.init();const o=a.create(()=>r`
{e.camera.controls.fitToSphere(k,!0)}}">
+ @click="${()=>{e.camera.controls.fitToSphere(C,!0)}}">
- `);document.body.append(o);const z=a.create(()=>r`
+ `);document.body.append(o);const L=a.create(()=>r`
{o.classList.contains("options-menu-visible")?o.classList.remove("options-menu-visible"):o.classList.add("options-menu-visible")}}">
- `);document.body.append(z);
+ `);document.body.append(L);
diff --git a/examples/assets/civil3DNavigator.js b/examples/assets/civil3DNavigator.js
index 1ce7fa8e..d1116f22 100644
--- a/examples/assets/civil3DNavigator.js
+++ b/examples/assets/civil3DNavigator.js
@@ -1 +1 @@
-import{s as i,S as p}from"./web-ifc-api-CpQ3aV8c.js";import{C as l,T as m,s as h,x as f,L as g,a as u,O as w}from"./index-B03kGVBW.js";import{S as y}from"./stats.min-GTpOrGrX.js";import{G as b,i as L}from"./index-lUHwa_Wd.js";import"./_commonjsHelpers-Cpj98o6Y.js";const d=document.getElementById("container"),t=new l,S=t.get(m),e=S.create();e.scene=new h(t);e.renderer=new b(t,d);e.camera=new f(t);t.init();e.scene.setup();e.camera.controls.setLookAt(5,5,5,0,0,0);d.appendChild(e.renderer.three2D.domElement);const U=t.get(g);U.create(e);e.scene.three.background=null;const x=t.get(u),T=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),v=await T.arrayBuffer(),A=new Uint8Array(v),r=await x.load(A);e.scene.three.add(r);const B=await fetch("https://thatopen.github.io/engine_components/resources/road.json");r.setLocalProperties(await B.json());const a=t.get(L);a.world=e;a.draw(r);const C=t.get(w),s=C.create(e);s.threshold=10;for(const o of r.children)o instanceof i&&s.add(o);s.needsUpdate=!0;e.camera.controls.addEventListener("sleep",()=>{s.needsUpdate=!0});const c=new p(void 0,20);a.onHighlight.add(({point:o})=>{c.center.copy(o),e.camera.controls.fitToSphere(c,!0)});const n=new y;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end());
+import{s as i,S as l}from"./web-ifc-api-nU1-R_1k.js";import{C as p,W as m,S as h,a as f,G as g,F as u,b as w}from"./index-C8rcJyf0.js";import{S}from"./stats.min-GTpOrGrX.js";import{j as b,o as y}from"./index-BdoCSKf7.js";import"./_commonjsHelpers-Cpj98o6Y.js";const d=document.getElementById("container"),t=new p,C=t.get(m),e=C.create();e.scene=new h(t);e.renderer=new b(t,d);e.camera=new f(t);t.init();e.scene.setup();e.camera.controls.setLookAt(5,5,5,0,0,0);d.appendChild(e.renderer.three2D.domElement);const U=t.get(g);U.create(e);e.scene.three.background=null;const j=t.get(u),v=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),A=await v.arrayBuffer(),B=new Uint8Array(A),r=await j.load(B);e.scene.three.add(r);const E=await fetch("https://thatopen.github.io/engine_components/resources/road.json");r.setLocalProperties(await E.json());const a=t.get(y);a.world=e;a.draw(r);const I=t.get(w),s=I.create(e);s.threshold=10;for(const o of r.children)o instanceof i&&s.add(o);s.needsUpdate=!0;e.camera.controls.addEventListener("sleep",()=>{s.needsUpdate=!0});const c=new l(void 0,20);a.onHighlight.add(({point:o})=>{c.center.copy(o),e.camera.controls.fitToSphere(c,!0)});const n=new S;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end());
diff --git a/examples/assets/civilCrossSectionNavigator.js b/examples/assets/civilCrossSectionNavigator.js
index 20d9eddf..a232ae5e 100644
--- a/examples/assets/civilCrossSectionNavigator.js
+++ b/examples/assets/civilCrossSectionNavigator.js
@@ -1 +1 @@
-import{C as B,L as M}from"./web-ifc-api-CpQ3aV8c.js";import{C as E,T as L,s as S,w as k,L as A,a as C,B as D}from"./index-B03kGVBW.js";import{T}from"./index-BEvRfOoQ.js";import{w as v}from"./index-fOrz5L1Y.js";import{S as x}from"./stats.min-GTpOrGrX.js";import{G as I,g as P,i as U,n as j,A as G}from"./index-lUHwa_Wd.js";import"./_commonjsHelpers-Cpj98o6Y.js";T.init();v.init();const y=document.getElementById("container"),e=new E,H=e.get(L),t=H.create();t.scene=new S(e);t.renderer=new I(e,y);t.camera=new k(e);e.init();t.scene.setup();t.camera.controls.setLookAt(5,5,5,0,0,0);y.appendChild(t.renderer.three2D.domElement);const N=e.get(A);N.create(t);t.scene.three.background=null;const b=e.get(C),W=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),_=await W.arrayBuffer(),z=new Uint8Array(_),d=b.load(z);t.scene.three.add(d);const F=await fetch("https://thatopen.github.io/engine_components/resources/road.json");d.setLocalProperties(await F.json());const w=document.getElementById("scene-2d-left");w.components=e;if(!w.world)throw new Error("World not found!");const c=e.get(P);c.world=w.world;await c.draw(d);const l=e.get(U);l.world=t;l.draw(d);const g=document.getElementById("scene-2d-right");g.components=e;if(!g.world)throw new Error("World not found!");const f=e.get(j);f.world=g.world;f.world3D=t;c.onMarkerChange.add(({alignment:o,percentage:n,type:r,curve:s})=>{if(l.setMarker(o,n,r),r==="select"){const i=s.alignment.absolute[s.index].mesh,m=o.getPointAt(n,"absolute");f.set(i,m)}});c.onHighlight.add(({mesh:o})=>{l.highlighter.select(o);const n=o.curve.index,r=o.curve.alignment.absolute[n];r.mesh.geometry.computeBoundingSphere();const s=r.mesh.geometry.boundingSphere;s&&t.camera.controls.fitToSphere(s,!0)});c.onMarkerHidden.add(({type:o})=>{l.hideMarker(o)});const h=e.get(D);h.byEntity(d);const R=h.list,p=e.get(G),u=p.styles.list;for(const o in R.entities){const n=h.find({entities:[o]}),r=new B(Math.random(),Math.random(),Math.random()),s=new M({color:r});p.styles.create(o,new Set,g.world,s);for(const i in n){const m=b.list.get(i);m&&(u[o].fragments[i]=new Set(n[i]),u[o].meshes.add(m.mesh))}}p.update(!0);const a=new x;a.showPanel(2);document.body.append(a.dom);a.dom.style.left="0px";a.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>a.begin());t.renderer.onAfterUpdate.add(()=>a.end());
+import{C as M,L as S}from"./web-ifc-api-nU1-R_1k.js";import{C as v,W as C,S as B,O as E,G as k,F as D,c as x}from"./index-C8rcJyf0.js";import{T as I}from"./index-BEvRfOoQ.js";import{w as L}from"./index-DGT5XDSa.js";import{S as j}from"./stats.min-GTpOrGrX.js";import{j as A,n as P,o as W,b as F,v as T}from"./index-BdoCSKf7.js";import"./_commonjsHelpers-Cpj98o6Y.js";I.init();L.init();const y=document.getElementById("container"),e=new v,U=e.get(C),t=U.create();t.scene=new B(e);t.renderer=new A(e,y);t.camera=new E(e);e.init();t.scene.setup();t.camera.controls.setLookAt(5,5,5,0,0,0);y.appendChild(t.renderer.three2D.domElement);const G=e.get(k);G.create(t);t.scene.three.background=null;const b=e.get(D),H=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),N=await H.arrayBuffer(),O=new Uint8Array(N),d=b.load(O);t.scene.three.add(d);const _=await fetch("https://thatopen.github.io/engine_components/resources/road.json");d.setLocalProperties(await _.json());const f=document.getElementById("scene-2d-left");f.components=e;if(!f.world)throw new Error("World not found!");const c=e.get(P);c.world=f.world;await c.draw(d);const l=e.get(W);l.world=t;l.draw(d);const g=document.getElementById("scene-2d-right");g.components=e;if(!g.world)throw new Error("World not found!");const p=e.get(F);p.world=g.world;p.world3D=t;c.onMarkerChange.add(({alignment:o,percentage:n,type:r,curve:s})=>{if(l.setMarker(o,n,r),r==="select"){const i=s.alignment.absolute[s.index].mesh,m=o.getPointAt(n,"absolute");p.set(i,m)}});c.onHighlight.add(({mesh:o})=>{l.highlighter.select(o);const n=o.curve.index,r=o.curve.alignment.absolute[n];r.mesh.geometry.computeBoundingSphere();const s=r.mesh.geometry.boundingSphere;s&&t.camera.controls.fitToSphere(s,!0)});c.onMarkerHidden.add(({type:o})=>{l.hideMarker(o)});const h=e.get(x);h.byEntity(d);const z=h.list,w=e.get(T),u=w.styles.list;for(const o in z.entities){const n=h.find({entities:[o]}),r=new M(Math.random(),Math.random(),Math.random()),s=new S({color:r});w.styles.create(o,new Set,g.world,s);for(const i in n){const m=b.list.get(i);m&&(u[o].fragments[i]=new Set(n[i]),u[o].meshes.add(m.mesh))}}w.update(!0);const a=new j;a.showPanel(2);document.body.append(a.dom);a.dom.style.left="0px";a.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>a.begin());t.renderer.onAfterUpdate.add(()=>a.end());
diff --git a/examples/assets/civilElevationNavigator.js b/examples/assets/civilElevationNavigator.js
index cb6f87ba..4c03e4bd 100644
--- a/examples/assets/civilElevationNavigator.js
+++ b/examples/assets/civilElevationNavigator.js
@@ -1 +1 @@
-import"./web-ifc-api-CpQ3aV8c.js";import{C as y,T as S,s as b,w as B,L as T,a as k}from"./index-B03kGVBW.js";import{G as E,i as A,g as C,s as I}from"./index-lUHwa_Wd.js";import{T as L}from"./index-BEvRfOoQ.js";import{w as M}from"./index-fOrz5L1Y.js";import{S as x}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";L.init();M.init();const f=document.getElementById("container"),t=new y,D=t.get(S),e=D.create();e.scene=new b(t);e.renderer=new E(t,f);e.camera=new B(t);t.init();e.scene.setup();e.camera.controls.setLookAt(5,5,5,0,0,0);f.appendChild(e.renderer.three2D.domElement);const U=t.get(T);U.create(e);e.scene.three.background=null;const z=t.get(k),G=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),N=await G.arrayBuffer(),P=new Uint8Array(N),c=z.load(P);e.scene.three.add(c);const i=t.get(A);i.world=e;i.draw(c);const g=document.getElementById("scene-2d-left");g.components=t;if(!g.world)throw new Error("World not found!");const l=new C(t);l.world=g.world;l.draw(c);const s=document.getElementById("scene-2d-right");s.components=t;if(!s.world)throw new Error("World not found!");const a=t.get(I);a.world=s.world;a.draw(c);l.onMarkerChange.add(({alignment:r,percentage:d})=>{a.setMarker(r,d,"hover"),i.setMarker(r,d,"hover")});l.onHighlight.add(({mesh:r,point:d})=>{const{index:v,alignment:h}=r.curve,m=h.getPercentageAt(d,"horizontal");if(m===null)return;const{curve:n}=h.getCurveAt(m,"vertical");if(a.highlighter.select(n.mesh),a.setMarker(n.alignment,m,"select"),s.world){n.mesh.geometry.boundingSphere||n.mesh.geometry.computeBoundingSphere();const u=n.mesh.geometry.boundingSphere.clone();u.radius*=1.5,s.world.camera.controls.fitToSphere(u,!0)}i.highlighter.select(r);const w=r.curve.alignment.absolute[v];w.mesh.geometry.computeBoundingSphere();const p=w.mesh.geometry.boundingSphere;p&&e.camera.controls.fitToSphere(p,!0)});const o=new x;o.showPanel(2);document.body.append(o.dom);o.dom.style.left="0px";o.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>o.begin());e.renderer.onAfterUpdate.add(()=>o.end());
+import"./web-ifc-api-nU1-R_1k.js";import{C as y,W as S,S as b,O as B,G as k,F as C}from"./index-C8rcJyf0.js";import{j as E,o as A,n as M,r as I}from"./index-BdoCSKf7.js";import{T}from"./index-BEvRfOoQ.js";import{w as W}from"./index-DGT5XDSa.js";import{S as x}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";T.init();W.init();const f=document.getElementById("container"),t=new y,D=t.get(S),e=D.create();e.scene=new b(t);e.renderer=new E(t,f);e.camera=new B(t);t.init();e.scene.setup();e.camera.controls.setLookAt(5,5,5,0,0,0);f.appendChild(e.renderer.three2D.domElement);const P=t.get(k);P.create(e);e.scene.three.background=null;const U=t.get(C),j=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),z=await j.arrayBuffer(),F=new Uint8Array(z),c=U.load(F);e.scene.three.add(c);const i=t.get(A);i.world=e;i.draw(c);const g=document.getElementById("scene-2d-left");g.components=t;if(!g.world)throw new Error("World not found!");const l=new M(t);l.world=g.world;l.draw(c);const a=document.getElementById("scene-2d-right");a.components=t;if(!a.world)throw new Error("World not found!");const s=t.get(I);s.world=a.world;s.draw(c);l.onMarkerChange.add(({alignment:r,percentage:d})=>{s.setMarker(r,d,"hover"),i.setMarker(r,d,"hover")});l.onHighlight.add(({mesh:r,point:d})=>{const{index:v,alignment:h}=r.curve,m=h.getPercentageAt(d,"horizontal");if(m===null)return;const{curve:n}=h.getCurveAt(m,"vertical");if(s.highlighter.select(n.mesh),s.setMarker(n.alignment,m,"select"),a.world){n.mesh.geometry.boundingSphere||n.mesh.geometry.computeBoundingSphere();const w=n.mesh.geometry.boundingSphere.clone();w.radius*=1.5,a.world.camera.controls.fitToSphere(w,!0)}i.highlighter.select(r);const p=r.curve.alignment.absolute[v];p.mesh.geometry.computeBoundingSphere();const u=p.mesh.geometry.boundingSphere;u&&e.camera.controls.fitToSphere(u,!0)});const o=new x;o.showPanel(2);document.body.append(o.dom);o.dom.style.left="0px";o.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>o.begin());e.renderer.onAfterUpdate.add(()=>o.end());
diff --git a/examples/assets/civilPlanNavigator.js b/examples/assets/civilPlanNavigator.js
index 672b27f2..c1f1f411 100644
--- a/examples/assets/civilPlanNavigator.js
+++ b/examples/assets/civilPlanNavigator.js
@@ -1 +1 @@
-import"./web-ifc-api-CpQ3aV8c.js";import{C as g,T as p,s as w,w as u,L as h,a as f}from"./index-B03kGVBW.js";import{G as y,i as b,g as T}from"./index-lUHwa_Wd.js";import{T as v}from"./index-BEvRfOoQ.js";import{w as B}from"./index-fOrz5L1Y.js";import{S}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";v.init();B.init();const i=document.getElementById("container"),t=new g,x=t.get(p),e=x.create();e.scene=new w(t);e.renderer=new y(t,i);e.camera=new u(t);t.init();e.scene.setup();e.camera.controls.setLookAt(5,5,5,0,0,0);i.appendChild(e.renderer.three2D.domElement);const A=t.get(h);A.create(e);e.scene.three.background=null;const C=t.get(f),E=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),I=await E.arrayBuffer(),L=new Uint8Array(I),r=C.load(L);e.scene.three.add(r);const a=t.get(b);a.world=e;a.draw(r);const m=document.getElementById("scene-2d"),s=t.get(T);m.components=t;s.world=m.world;await s.draw(r);s.onHighlight.add(({mesh:o})=>{a.highlighter.select(o);const l=o.curve.index,d=o.curve.alignment.absolute[l];d.mesh.geometry.computeBoundingSphere();const c=d.mesh.geometry.boundingSphere;c&&e.camera.controls.fitToSphere(c,!0)});const n=new S;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end());
+import"./web-ifc-api-nU1-R_1k.js";import{C as p,W as g,S as h,O as w,G as f,F as u}from"./index-C8rcJyf0.js";import{j as y,o as S,n as b}from"./index-BdoCSKf7.js";import{T as v}from"./index-BEvRfOoQ.js";import{w as B}from"./index-DGT5XDSa.js";import{S as x}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";v.init();B.init();const i=document.getElementById("container"),t=new p,C=t.get(g),e=C.create();e.scene=new h(t);e.renderer=new y(t,i);e.camera=new w(t);t.init();e.scene.setup();e.camera.controls.setLookAt(5,5,5,0,0,0);i.appendChild(e.renderer.three2D.domElement);const A=t.get(f);A.create(e);e.scene.three.background=null;const E=t.get(u),I=await fetch("https://thatopen.github.io/engine_components/resources/road.frag"),T=await I.arrayBuffer(),U=new Uint8Array(T),r=E.load(U);e.scene.three.add(r);const a=t.get(S);a.world=e;a.draw(r);const m=document.getElementById("scene-2d"),s=t.get(b);m.components=t;s.world=m.world;await s.draw(r);s.onHighlight.add(({mesh:o})=>{a.highlighter.select(o);const l=o.curve.index,d=o.curve.alignment.absolute[l];d.mesh.geometry.computeBoundingSphere();const c=d.mesh.geometry.boundingSphere;c&&e.camera.controls.fitToSphere(c,!0)});const n=new x;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end());
diff --git a/examples/assets/classifier.js b/examples/assets/classifier.js
index c299426a..e3b5808e 100644
--- a/examples/assets/classifier.js
+++ b/examples/assets/classifier.js
@@ -1,25 +1,25 @@
-import{ag as m,C as u}from"./web-ifc-api-CpQ3aV8c.js";import{S as p}from"./stats.min-GTpOrGrX.js";import{T as d,z as a,m as c}from"./index-BEvRfOoQ.js";import{C as b,T as C,s as f,g,x as w,L as I,a as L,B as h}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const y=document.getElementById("container"),s=new b,T=s.get(C),t=T.create();t.scene=new f(s);t.renderer=new g(s,y);t.camera=new w(s);s.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const A=s.get(I);A.create(t);t.scene.three.background=null;const E=new L(s),F=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),R=await F.arrayBuffer(),S=new Uint8Array(R),i=E.load(S);t.scene.three.add(i);const B=await fetch("https://thatopen.github.io/engine_components/resources/small.json");i.setLocalProperties(await B.json());const o=s.get(h);o.byEntity(i);o.byIfcRel(i,m,"storeys");o.byModel(i.uuid,i);const N=o.find({entities:["IFCWALLSTANDARDCASE"]}),$=o.find({entities:["IFCSLAB"]}),U=o.find({entities:["IFCMEMBER","IFCPLATE"]}),v=o.find({entities:["IFCFURNISHINGELEMENT"]}),D=o.find({entities:["IFCDOOR"]}),k=o.find({models:[i.uuid]}),l=new p;l.showPanel(2);document.body.append(l.dom);l.dom.style.left="0px";l.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>l.begin());t.renderer.onAfterUpdate.add(()=>l.end());d.init();const e=new u,r=a.create(()=>c`
+import{ag as m,C as p}from"./web-ifc-api-nU1-R_1k.js";import{S as d}from"./stats.min-GTpOrGrX.js";import{T as u,z as a,m as c}from"./index-BEvRfOoQ.js";import{C as b,W as C,S as f,d as g,a as w,G as I,F as S,c as y}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const h=document.getElementById("container"),s=new b,A=s.get(C),t=A.create();t.scene=new f(s);t.renderer=new g(s,h);t.camera=new w(s);s.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const E=s.get(I);E.create(t);t.scene.three.background=null;const L=new S(s),F=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),R=await F.arrayBuffer(),T=new Uint8Array(R),i=L.load(T);t.scene.three.add(i);const N=await fetch("https://thatopen.github.io/engine_components/resources/small.json");i.setLocalProperties(await N.json());const o=s.get(y);o.byEntity(i);o.byIfcRel(i,m,"storeys");o.byModel(i.uuid,i);const $=o.find({entities:["IFCWALLSTANDARDCASE"]}),U=o.find({entities:["IFCSLAB"]}),v=o.find({entities:["IFCMEMBER","IFCPLATE"]}),B=o.find({entities:["IFCFURNISHINGELEMENT"]}),D=o.find({entities:["IFCDOOR"]}),M=o.find({models:[i.uuid]}),l=new d;l.showPanel(2);document.body.append(l.dom);l.dom.style.left="0px";l.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>l.begin());t.renderer.onAfterUpdate.add(()=>l.end());u.init();const e=new p,r=a.create(()=>c`
{e.set(n.color),o.setColor(N,e)}}">
+ @input="${({target:n})=>{e.set(n.color),o.setColor($,e)}}">
{e.set(n.color),o.setColor($,e)}}">
+ @input="${({target:n})=>{e.set(n.color),o.setColor(U,e)}}">
{e.set(n.color),o.setColor(U,e)}}">
+ @input="${({target:n})=>{e.set(n.color),o.setColor(v,e)}}">
{e.set(n.color),o.setColor(v,e)}}">
+ @input="${({target:n})=>{e.set(n.color),o.setColor(B,e)}}">
{o.resetColor(k)}}">
+ @click="${()=>{o.resetColor(M)}}">
- `);document.body.append(r);const x=a.create(()=>c`
+ `);document.body.append(r);const W=a.create(()=>c`
{r.classList.contains("options-menu-visible")?r.classList.remove("options-menu-visible"):r.classList.add("options-menu-visible")}}">
- `);document.body.append(x);
+ `);document.body.append(W);
diff --git a/examples/assets/clipEdges.js b/examples/assets/clipEdges.js
index 61e03f0b..afef61c2 100644
--- a/examples/assets/clipEdges.js
+++ b/examples/assets/clipEdges.js
@@ -1,4 +1,4 @@
-import{B as M,M as y,a as d,b as c,L as b}from"./web-ifc-api-CpQ3aV8c.js";import{S as f}from"./stats.min-GTpOrGrX.js";import{T as x,z as m,m as p}from"./index-BEvRfOoQ.js";import{C as k,T as v,s as L,x as P,L as B,c as C,N as I}from"./index-B03kGVBW.js";import{b as $,A as z,f as D}from"./index-lUHwa_Wd.js";import"./_commonjsHelpers-Cpj98o6Y.js";const u=document.getElementById("container"),o=new k,T=o.get(v),e=T.create();e.scene=new L(o);e.renderer=new $(o,u);e.camera=new P(o);e.renderer.postproduction.enabled=!0;e.renderer.postproduction.customEffects.outlineEnabled=!0;o.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const A=o.get(B),h=A.create(e);h.config.color.setHex(6710886);e.renderer.postproduction.customEffects.excludedMeshes.push(h.three);e.scene.three.background=null;const g=new M(3,3,3),w=new y({color:"#6528D7"}),a=new d(g,w);a.position.set(-2,1.5,0);e.scene.three.add(a);e.meshes.add(a);const l=new d(g,w);l.position.set(2,1.5,0);e.scene.three.add(l);e.meshes.add(l);const E=o.get(C);E.get(e);const n=o.get(I);n.enabled=!0;const r=o.get(z);n.Type=D;const S=new c({color:"lightblue",side:2}),O=new b({color:"blue"}),F=new c({color:"blue",opacity:.5,side:2,transparent:!0});r.styles.create("Red lines",new Set([a]),e,O,S,F);const G=new c({color:"salmon",side:2}),N=new b({color:"red"}),R=new c({color:"red",opacity:.5,side:2,transparent:!0});r.styles.create("Blue lines",new Set([l]),e,N,G,R);u.ondblclick=()=>{n.enabled&&n.create(e)};window.onkeydown=t=>{(t.code==="Delete"||t.code==="Backspace")&&n.enabled&&n.delete(e)};const s=new f;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end());x.init();const i=m.create(()=>p`
+import{B as M,M as y,a as d,b as c,L as b}from"./web-ifc-api-nU1-R_1k.js";import{S as f}from"./stats.min-GTpOrGrX.js";import{T as k,z as m,m as p}from"./index-BEvRfOoQ.js";import{C as v,W as x,S as C,a as L,G as P,R as S,e as B}from"./index-C8rcJyf0.js";import{L as I,v as $,a as z}from"./index-BdoCSKf7.js";import"./_commonjsHelpers-Cpj98o6Y.js";const u=document.getElementById("container"),o=new v,D=o.get(x),e=D.create();e.scene=new C(o);e.renderer=new I(o,u);e.camera=new L(o);e.renderer.postproduction.enabled=!0;e.renderer.postproduction.customEffects.outlineEnabled=!0;o.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const E=o.get(P),h=E.create(e);h.config.color.setHex(6710886);e.renderer.postproduction.customEffects.excludedMeshes.push(h.three);e.scene.three.background=null;const g=new M(3,3,3),w=new y({color:"#6528D7"}),a=new d(g,w);a.position.set(-2,1.5,0);e.scene.three.add(a);e.meshes.add(a);const l=new d(g,w);l.position.set(2,1.5,0);e.scene.three.add(l);e.meshes.add(l);const G=o.get(S);G.get(e);const n=o.get(B);n.enabled=!0;const r=o.get($);n.Type=z;const R=new c({color:"lightblue",side:2}),T=new b({color:"blue"}),W=new c({color:"blue",opacity:.5,side:2,transparent:!0});r.styles.create("Red lines",new Set([a]),e,T,R,W);const A=new c({color:"salmon",side:2}),O=new b({color:"red"}),F=new c({color:"red",opacity:.5,side:2,transparent:!0});r.styles.create("Blue lines",new Set([l]),e,O,A,F);u.ondblclick=()=>{n.enabled&&n.create(e)};window.onkeydown=t=>{(t.code==="Delete"||t.code==="Backspace")&&n.enabled&&n.delete(e)};const s=new f;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end());k.init();const i=m.create(()=>p`
diff --git a/examples/assets/clipper.js b/examples/assets/clipper.js
index e6c382ac..f2d4a9b5 100644
--- a/examples/assets/clipper.js
+++ b/examples/assets/clipper.js
@@ -1,4 +1,4 @@
-import{B as r,M as m,a as d,C as p}from"./web-ifc-api-CpQ3aV8c.js";import{S as u}from"./stats.min-GTpOrGrX.js";import{T as h,z as s,m as c}from"./index-BEvRfOoQ.js";import{C as g,T as f,s as k,g as w,x as y,c as x,N as v}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const b=document.getElementById("container"),o=new g,M=o.get(f),e=M.create();e.scene=new k(o);e.renderer=new w(o,b);e.camera=new y(o);o.init();e.camera.controls.setLookAt(10,10,10,0,0,0);e.scene.setup();e.scene.three.background=null;const C=new r(3,3,3),$=new m({color:"#6528D7"}),a=new d(C,$);a.position.set(0,1.5,0);e.scene.three.add(a);e.meshes.add(a);const P=o.get(x);P.get(e);const t=o.get(v);t.enabled=!0;b.ondblclick=()=>{t.enabled&&t.create(e)};window.onkeydown=n=>{(n.code==="Delete"||n.code==="Backspace")&&t.enabled&&t.delete(e)};const l=new u;l.showPanel(2);document.body.append(l.dom);l.dom.style.left="0px";l.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>l.begin());e.renderer.onAfterUpdate.add(()=>l.end());h.init();const i=s.create(()=>c`
+import{B as b,M as m,a as p,C as d}from"./web-ifc-api-nU1-R_1k.js";import{S as u}from"./stats.min-GTpOrGrX.js";import{T as h,z as s,m as c}from"./index-BEvRfOoQ.js";import{C as g,W as f,S as k,d as w,a as y,R as C,e as v}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),t=new g,M=t.get(f),e=M.create();e.scene=new k(t);e.renderer=new w(t,r);e.camera=new y(t);t.init();e.camera.controls.setLookAt(10,10,10,0,0,0);e.scene.setup();e.scene.three.background=null;const x=new b(3,3,3),S=new m({color:"#6528D7"}),a=new p(x,S);a.position.set(0,1.5,0);e.scene.three.add(a);e.meshes.add(a);const $=t.get(C);$.get(e);const o=t.get(v);o.enabled=!0;r.ondblclick=()=>{o.enabled&&o.create(e)};window.onkeydown=n=>{(n.code==="Delete"||n.code==="Backspace")&&o.enabled&&o.delete(e)};const l=new u;l.showPanel(2);document.body.append(l.dom);l.dom.style.left="0px";l.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>l.begin());e.renderer.onAfterUpdate.add(()=>l.end());h.init();const i=s.create(()=>c`
@@ -10,31 +10,31 @@ import{B as r,M as m,a as d,C as p}from"./web-ifc-api-CpQ3aV8c.js";import{S as u
{t.config.enabled=n.value}}">
+ @change="${({target:n})=>{o.config.enabled=n.value}}">
{t.config.visible=n.value}}">
+ @change="${({target:n})=>{o.config.visible=n.value}}">
{t.config.color=new p(n.color)}}">
+ @input="${({target:n})=>{o.config.color=new d(n.color)}}">
{t.config.opacity=n.value}}">
+ @change="${({target:n})=>{o.config.opacity=n.value}}">
{t.config.size=n.value}}">
+ @change="${({target:n})=>{o.config.size=n.value}}">
{t.deleteAll()}}">
+ @click="${()=>{o.deleteAll()}}">
- `);document.body.append(i);const z=s.create(()=>c`
+ `);document.body.append(i);const P=s.create(()=>c`
{i.classList.contains("options-menu-visible")?i.classList.remove("options-menu-visible"):i.classList.add("options-menu-visible")}}">
- `);document.body.append(z);
+ `);document.body.append(P);
diff --git a/examples/assets/cullers.js b/examples/assets/cullers.js
index 7a67a5cb..2ddd9ca2 100644
--- a/examples/assets/cullers.js
+++ b/examples/assets/cullers.js
@@ -1 +1 @@
-import{B as c,af as i,a as l}from"./web-ifc-api-CpQ3aV8c.js";import{S as m}from"./stats.min-GTpOrGrX.js";import{C as p,T as u,s as g,g as f,x as y,L as b,O as w}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const h=document.getElementById("container"),t=new p,x=t.get(u),e=x.create();e.scene=new g(t);e.renderer=new f(t,h);e.camera=new y(t);t.init();e.camera.controls.setLookAt(13,13,13,0,0,0);e.scene.setup();const L=t.get(b);L.create(e);e.scene.three.background=null;const M=t.get(w),o=M.create(e);o.threshold=200;o.config.renderDebugFrame=!0;const s=o.renderer.domElement;document.body.appendChild(s);s.style.position="fixed";s.style.left="0";s.style.bottom="0";s.style.visibility="collapse";const B=new c(2,2,2),C=new i({color:"#6528D7"});function d(a){return Math.random()*a}function U(){for(let a=0;a<300;a++){const n=new l(B,C);n.position.x=d(10),n.position.y=d(10),n.position.z=d(10),n.updateMatrix(),e.scene.three.add(n),o.add(n)}}U();o.needsUpdate=!0;e.camera.controls.addEventListener("controlend",()=>{o.needsUpdate=!0});const r=new m;r.showPanel(2);document.body.append(r.dom);r.dom.style.left="0px";r.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>r.begin());e.renderer.onAfterUpdate.add(()=>r.end());
+import{B as c,af as l,a as i}from"./web-ifc-api-nU1-R_1k.js";import{S as m}from"./stats.min-GTpOrGrX.js";import{C as p,W as u,S as b,d as f,a as g,G as y,b as w}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const h=document.getElementById("container"),t=new p,S=t.get(u),e=S.create();e.scene=new b(t);e.renderer=new f(t,h);e.camera=new g(t);t.init();e.camera.controls.setLookAt(13,13,13,0,0,0);e.scene.setup();const x=t.get(y);x.create(e);e.scene.three.background=null;const C=t.get(w),o=C.create(e);o.threshold=200;o.config.renderDebugFrame=!0;const s=o.renderer.domElement;document.body.appendChild(s);s.style.position="fixed";s.style.left="0";s.style.bottom="0";s.style.visibility="collapse";const M=new c(2,2,2),B=new l({color:"#6528D7"});function d(a){return Math.random()*a}function U(){for(let a=0;a<300;a++){const n=new i(M,B);n.position.x=d(10),n.position.y=d(10),n.position.z=d(10),n.updateMatrix(),e.scene.three.add(n),o.add(n)}}U();o.needsUpdate=!0;e.camera.controls.addEventListener("controlend",()=>{o.needsUpdate=!0});const r=new m;r.showPanel(2);document.body.append(r.dom);r.dom.style.left="0px";r.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>r.begin());e.renderer.onAfterUpdate.add(()=>r.end());
diff --git a/examples/assets/edgeMeasurement.js b/examples/assets/edgeMeasurement.js
index 003dc492..c8f0357d 100644
--- a/examples/assets/edgeMeasurement.js
+++ b/examples/assets/edgeMeasurement.js
@@ -1 +1 @@
-import{a as c}from"./web-ifc-api-CpQ3aV8c.js";import{S as i}from"./stats.min-GTpOrGrX.js";import{C as l,T as m,s as f,x as w,L as p,a as g}from"./index-B03kGVBW.js";import{b as h,c as u}from"./index-lUHwa_Wd.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),t=new l,y=t.get(m),e=y.create();e.scene=new f(t);e.renderer=new h(t,r);e.camera=new w(t);t.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const b=t.get(p);b.create(e);e.scene.three.background=null;const L=new g(t),k=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),x=await k.arrayBuffer(),A=new Uint8Array(x),d=L.load(A);e.scene.three.add(d);for(const o of d.children)o instanceof c&&e.meshes.add(o);const n=t.get(u);n.world=e;n.enabled=!0;r.ondblclick=()=>n.create();let a;window.addEventListener("keydown",o=>{o.code==="KeyO"?n.delete():o.code==="KeyS"?(a=n.get(),n.deleteAll()):o.code==="KeyL"&&a&&n.set(a)});const s=new i;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end());
+import{a as c}from"./web-ifc-api-nU1-R_1k.js";import{S as i}from"./stats.min-GTpOrGrX.js";import{C as l,W as m,S as f,a as p,G as w,F as g}from"./index-C8rcJyf0.js";import{L as h,f as u}from"./index-BdoCSKf7.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),t=new l,y=t.get(m),e=y.create();e.scene=new f(t);e.renderer=new h(t,r);e.camera=new p(t);t.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const b=t.get(w);b.create(e);e.scene.three.background=null;const S=new g(t),L=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),k=await L.arrayBuffer(),A=new Uint8Array(k),d=S.load(A);e.scene.three.add(d);for(const o of d.children)o instanceof c&&e.meshes.add(o);const n=t.get(u);n.world=e;n.enabled=!0;r.ondblclick=()=>n.create();let a;window.addEventListener("keydown",o=>{o.code==="KeyO"?n.delete():o.code==="KeyS"?(a=n.get(),n.deleteAll()):o.code==="KeyL"&&a&&n.set(a)});const s=new i;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end());
diff --git a/examples/assets/exploder.js b/examples/assets/exploder.js
index e4eec9f2..42a17df8 100644
--- a/examples/assets/exploder.js
+++ b/examples/assets/exploder.js
@@ -1,15 +1,15 @@
-import{ab as l}from"./web-ifc-api-CpQ3aV8c.js";import{S as m}from"./stats.min-GTpOrGrX.js";import{T as p,z as a,m as i}from"./index-BEvRfOoQ.js";import{C as d,T as b,s as u,g,x as h,L as f,a as w,G as x,X as y,B as L}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const S=document.getElementById("container"),e=new d,T=e.get(b),t=T.create();t.scene=new u(e);t.renderer=new g(e,S);t.camera=new h(e);e.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const v=e.get(f);v.create(t);t.scene.three.background=null;const B=new w(e),k=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),I=await k.arrayBuffer(),C=new Uint8Array(I),o=B.load(C);t.scene.three.add(o);const E=await fetch("https://thatopen.github.io/engine_components/resources/small.json");o.setLocalProperties(await E.json());const r=e.get(x),U=await fetch("https://thatopen.github.io/engine_components/resources/small-relations.json"),j=r.getRelationsMapFromJSON(await U.text());r.setRelationMap(o,j);const z=e.get(y),A=e.get(L);await A.bySpatialStructure(o,{isolate:new Set([l])});const s=new m;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>s.begin());t.renderer.onAfterUpdate.add(()=>s.end());p.init();const n=a.create(()=>i`
+import{ab as l}from"./web-ifc-api-nU1-R_1k.js";import{S as m}from"./stats.min-GTpOrGrX.js";import{T as p,z as a,m as r}from"./index-BEvRfOoQ.js";import{C as d,W as b,S as u,d as g,a as f,G as h,F as w,g as S,E as x,c as y}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const I=document.getElementById("container"),e=new d,v=e.get(b),t=v.create();t.scene=new u(e);t.renderer=new g(e,I);t.camera=new f(e);e.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const C=e.get(h);C.create(t);t.scene.three.background=null;const E=new w(e),L=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),k=await L.arrayBuffer(),F=new Uint8Array(k),s=E.load(F);t.scene.three.add(s);const R=await fetch("https://thatopen.github.io/engine_components/resources/small.json");s.setLocalProperties(await R.json());const i=e.get(S),B=await fetch("https://thatopen.github.io/engine_components/resources/small-relations.json"),T=i.getRelationsMapFromJSON(await B.text());i.setRelationMap(s,T);const U=e.get(x),j=e.get(y);await j.bySpatialStructure(s,{isolate:new Set([l])});const n=new m;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>n.begin());t.renderer.onAfterUpdate.add(()=>n.end());p.init();const o=a.create(()=>r`
{z.set(c.value)}}">
+ @change="${({target:c})=>{U.set(c.value)}}">
- `);document.body.append(n);const F=a.create(()=>i`
+ `);document.body.append(o);const z=a.create(()=>r`
{n.classList.contains("options-menu-visible")?n.classList.remove("options-menu-visible"):n.classList.add("options-menu-visible")}}">
+ @click="${()=>{o.classList.contains("options-menu-visible")?o.classList.remove("options-menu-visible"):o.classList.add("options-menu-visible")}}">
- `);document.body.append(F);
+ `);document.body.append(z);
diff --git a/examples/assets/faceMeasurement.js b/examples/assets/faceMeasurement.js
index 7d440df2..f4314b09 100644
--- a/examples/assets/faceMeasurement.js
+++ b/examples/assets/faceMeasurement.js
@@ -1 +1 @@
-import{a as c}from"./web-ifc-api-CpQ3aV8c.js";import{S as i}from"./stats.min-GTpOrGrX.js";import{C as l,T as m,s as f,x as w,L as p,a as g}from"./index-B03kGVBW.js";import{b as h,l as u}from"./index-lUHwa_Wd.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),t=new l,y=t.get(m),e=y.create();e.scene=new f(t);e.renderer=new h(t,r);e.camera=new w(t);t.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const b=t.get(p);b.create(e);e.scene.three.background=null;const L=new g(t),k=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),x=await k.arrayBuffer(),A=new Uint8Array(x),d=L.load(A);e.scene.three.add(d);for(const o of d.children)o instanceof c&&e.meshes.add(o);const n=t.get(u);n.world=e;n.enabled=!0;r.ondblclick=()=>n.create();let a;window.addEventListener("keydown",o=>{o.code==="KeyO"?n.delete():o.code==="KeyS"?(a=n.get(),n.deleteAll()):o.code==="KeyL"&&a&&n.set(a)});const s=new i;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end());
+import{a as c}from"./web-ifc-api-nU1-R_1k.js";import{S as i}from"./stats.min-GTpOrGrX.js";import{C as l,W as m,S as f,a as p,G as w,F as g}from"./index-C8rcJyf0.js";import{L as u,u as h}from"./index-BdoCSKf7.js";import"./_commonjsHelpers-Cpj98o6Y.js";const r=document.getElementById("container"),t=new l,y=t.get(m),e=y.create();e.scene=new f(t);e.renderer=new u(t,r);e.camera=new p(t);t.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const b=t.get(w);b.create(e);e.scene.three.background=null;const S=new g(t),L=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),k=await L.arrayBuffer(),A=new Uint8Array(k),d=S.load(A);e.scene.three.add(d);for(const o of d.children)o instanceof c&&e.meshes.add(o);const n=t.get(h);n.world=e;n.enabled=!0;r.ondblclick=()=>n.create();let a;window.addEventListener("keydown",o=>{o.code==="KeyO"?n.delete():o.code==="KeyS"?(a=n.get(),n.deleteAll()):o.code==="KeyL"&&a&&n.set(a)});const s=new i;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end());
diff --git a/examples/assets/fragmentsManager.js b/examples/assets/fragmentsManager.js
index 0b3f4ef9..fd2bc27a 100644
--- a/examples/assets/fragmentsManager.js
+++ b/examples/assets/fragmentsManager.js
@@ -1,26 +1,26 @@
-import"./web-ifc-api-CpQ3aV8c.js";import{S as u}from"./stats.min-GTpOrGrX.js";import{C as p,T as b,s as g,g as f,x as w,L as h,a as y}from"./index-B03kGVBW.js";import{T as L,z as l,m}from"./index-BEvRfOoQ.js";import"./_commonjsHelpers-Cpj98o6Y.js";const k=document.getElementById("container"),n=new p,x=n.get(b),e=x.create();e.scene=new g(n);e.renderer=new f(n,k);e.camera=new w(n);n.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const v=n.get(h);v.create(e);e.scene.three.background=null;const s=n.get(y);let d="";async function T(){if(s.groups.size)return;const t=await(await fetch("https://thatopen.github.io/engine_components/resources/small.frag")).arrayBuffer(),c=new Uint8Array(t),r=s.load(c);e.scene.three.add(r),d=r.uuid}function z(o){const t=document.createElement("a");t.href=URL.createObjectURL(o),t.download=o.name,document.body.appendChild(t),t.click(),t.remove()}function F(){if(!s.groups.size)return;const o=s.groups.get(d);if(!o)return;const t=s.export(o),c=new Blob([t]),r=new File([c],"small.frag");z(r)}function U(){s.dispose()}const a=new u;a.showPanel(2);document.body.append(a.dom);a.dom.style.left="0px";a.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>a.begin());e.renderer.onAfterUpdate.add(()=>a.end());L.init();const i=l.create(()=>m`
+import"./web-ifc-api-nU1-R_1k.js";import{S as p}from"./stats.min-GTpOrGrX.js";import{C as u,W as b,S as g,d as f,a as w,G as h,F as y}from"./index-C8rcJyf0.js";import{T as k,z as l,m}from"./index-BEvRfOoQ.js";import"./_commonjsHelpers-Cpj98o6Y.js";const F=document.getElementById("container"),n=new u,L=n.get(b),e=L.create();e.scene=new g(n);e.renderer=new f(n,F);e.camera=new w(n);n.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const S=n.get(h);S.create(e);e.scene.three.background=null;const s=n.get(y);let d="";async function v(){if(s.groups.size)return;const t=await(await fetch("https://thatopen.github.io/engine_components/resources/small.frag")).arrayBuffer(),c=new Uint8Array(t),r=s.load(c);e.scene.three.add(r),d=r.uuid}function x(o){const t=document.createElement("a");t.href=URL.createObjectURL(o),t.download=o.name,document.body.appendChild(t),t.click(),t.remove()}function z(){if(!s.groups.size)return;const o=s.groups.get(d);if(!o)return;const t=s.export(o),c=new Blob([t]),r=new File([c],"small.frag");x(r)}function C(){s.dispose()}const a=new p;a.showPanel(2);document.body.append(a.dom);a.dom.style.left="0px";a.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>a.begin());e.renderer.onAfterUpdate.add(()=>a.end());k.init();const i=l.create(()=>m`
{T()}}">
+ @click="${()=>{v()}}">
{U()}}">
+ @click="${()=>{C()}}">
{F()}}">
+ @click="${()=>{z()}}">
- `);document.body.append(i);const B=l.create(()=>m`
+ `);document.body.append(i);const U=l.create(()=>m`
{i.classList.contains("options-menu-visible")?i.classList.remove("options-menu-visible"):i.classList.add("options-menu-visible")}}">
- `);document.body.append(B);
+ `);document.body.append(U);
diff --git a/examples/assets/grids.js b/examples/assets/grids.js
index 601feaf3..152aee5c 100644
--- a/examples/assets/grids.js
+++ b/examples/assets/grids.js
@@ -1,31 +1,31 @@
-import{a as c,B as l,b as m,C as b}from"./web-ifc-api-CpQ3aV8c.js";import{S as d}from"./stats.min-GTpOrGrX.js";import{C as p,T as u,s as g,g as h,x as f,L as w}from"./index-B03kGVBW.js";import{T as v,z as a,m as r}from"./index-BEvRfOoQ.js";import"./_commonjsHelpers-Cpj98o6Y.js";const y=document.getElementById("container"),o=new p,x=o.get(u),e=x.create();e.scene=new g(o);e.renderer=new h(o,y);e.camera=new f(o);o.init();const z=new c(new l,new m({color:"red"}));e.scene.three.add(z);e.scene.three.background=null;const C=o.get(w),i=C.create(e);console.log(i);v.init();const t=a.create(()=>r`
+import{a as l,B as c,b as m,C as d}from"./web-ifc-api-nU1-R_1k.js";import{S as b}from"./stats.min-GTpOrGrX.js";import{C as p,W as u,S as g,d as f,a as h,G as w}from"./index-C8rcJyf0.js";import{T as v,z as r,m as a}from"./index-BEvRfOoQ.js";import"./_commonjsHelpers-Cpj98o6Y.js";const y=document.getElementById("container"),o=new p,S=o.get(u),e=S.create();e.scene=new g(o);e.renderer=new f(o,y);e.camera=new h(o);o.init();const G=new l(new c,new m({color:"red"}));e.scene.three.add(G);e.scene.three.background=null;const x=o.get(w),s=x.create(e);console.log(s);v.init();const t=r.create(()=>a`
{i.config.visible=n.value}}">
+ @change="${({target:n})=>{s.config.visible=n.value}}">
{i.config.color=new b(n.color)}}">
+ @input="${({target:n})=>{s.config.color=new d(n.color)}}">
{i.config.primarySize=n.value}}">
+ @change="${({target:n})=>{s.config.primarySize=n.value}}">
{i.config.secondarySize=n.value}}">
+ @change="${({target:n})=>{s.config.secondarySize=n.value}}">
- `);document.body.append(t);const G=a.create(()=>r`
+ `);document.body.append(t);const z=r.create(()=>a`
{t.classList.contains("options-menu-visible")?t.classList.remove("options-menu-visible"):t.classList.add("options-menu-visible")}}">
- `);document.body.append(G);const s=new d;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end());
+ `);document.body.append(z);const i=new b;i.showPanel(2);document.body.append(i.dom);i.dom.style.left="0px";i.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>i.begin());e.renderer.onAfterUpdate.add(()=>i.end());
diff --git a/examples/assets/hider.js b/examples/assets/hider.js
index b14aae99..d225f0e4 100644
--- a/examples/assets/hider.js
+++ b/examples/assets/hider.js
@@ -1,4 +1,4 @@
-import{ab as S}from"./web-ifc-api-CpQ3aV8c.js";import{S as k}from"./stats.min-GTpOrGrX.js";import{T as x,z as r,m as l}from"./index-BEvRfOoQ.js";import{C,T as L,s as v,g as F,x as T,L as B,a as I,G as j,d as $,B as E}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const M=document.getElementById("container"),e=new C,N=e.get(L),t=N.create();t.scene=new v(e);t.renderer=new F(e,M);t.camera=new T(e);e.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const O=e.get(B);O.create(t);t.scene.three.background=null;const b=e.get(I),U=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),_=await U.arrayBuffer(),z=new Uint8Array(_),i=b.load(z);t.scene.three.add(i);const A=await fetch("https://thatopen.github.io/engine_components/resources/small.json");i.setLocalProperties(await A.json());const d=e.get(j),G=await fetch("https://thatopen.github.io/engine_components/resources/small-relations.json"),R=d.getRelationsMapFromJSON(await G.text());d.setRelationMap(i,R);const g=e.get($),o=e.get(E);o.byEntity(i);await o.bySpatialStructure(i,{isolate:new Set([S])});const a=new k;a.showPanel(2);document.body.append(a.dom);a.dom.style.left="0px";a.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>a.begin());t.renderer.onAfterUpdate.add(()=>a.end());x.init();const f={},q=Object.keys(o.list.spatialStructures);for(const n of q)f[n]=!0;const h={},D=Object.keys(o.list.entities);for(const n of D)h[n]=!0;const s=r.create(()=>l`
+import{ab as y}from"./web-ifc-api-nU1-R_1k.js";import{S as k}from"./stats.min-GTpOrGrX.js";import{T as x,z as r,m as l}from"./index-BEvRfOoQ.js";import{C,W as F,S as I,d as v,a as L,G as j,F as M,g as R,H as $,c as B}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const E=document.getElementById("container"),e=new C,N=e.get(F),t=N.create();t.scene=new I(e);t.renderer=new v(e,E);t.camera=new L(e);e.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const O=e.get(j);O.create(t);t.scene.three.background=null;const b=e.get(M),T=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),U=await T.arrayBuffer(),_=new Uint8Array(U),i=b.load(_);t.scene.three.add(i);const z=await fetch("https://thatopen.github.io/engine_components/resources/small.json");i.setLocalProperties(await z.json());const d=e.get(R),A=await fetch("https://thatopen.github.io/engine_components/resources/small-relations.json"),G=d.getRelationsMapFromJSON(await A.text());d.setRelationMap(i,G);const f=e.get($),o=e.get(B);o.byEntity(i);await o.bySpatialStructure(i,{isolate:new Set([y])});const a=new k;a.showPanel(2);document.body.append(a.dom);a.dom.style.left="0px";a.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>a.begin());t.renderer.onAfterUpdate.add(()=>a.end());x.init();const g={},H=Object.keys(o.list.spatialStructures);for(const n of H)g[n]=!0;const h={},q=Object.keys(o.list.entities);for(const n of q)h[n]=!0;const s=r.create(()=>l`
@@ -9,16 +9,16 @@ import{ab as S}from"./web-ifc-api-CpQ3aV8c.js";import{S as k}from"./stats.min-GT
- `);document.body.append(s);const P=s.querySelector("bim-panel-section[name='Floors']"),H=s.querySelector("bim-panel-section[name='Categories']");for(const n in f){const m=r.create(()=>l`
+ `);document.body.append(s);const D=s.querySelector("bim-panel-section[name='Floors']"),P=s.querySelector("bim-panel-section[name='Categories']");for(const n in g){const m=r.create(()=>l`
{const c=o.list.spatialStructures[n];if(c&&c.id!==null)for(const[Y,u]of b.groups){const w=d.getEntityChildren(u,c.id),y=u.getFragmentMap(w);g.set(p.value,y)}}}">
+ @change="${({target:p})=>{const c=o.list.spatialStructures[n];if(c&&c.id!==null)for(const[J,u]of b.groups){const S=d.getEntityChildren(u,c.id),w=u.getFragmentMap(S);f.set(p.value,w)}}}">
- `);P.append(m)}for(const n in h){const m=r.create(()=>l`
+ `);D.append(m)}for(const n in h){const m=r.create(()=>l`
{const c=o.find({entities:[n]});g.set(p.value,c)}}">
+ @change="${({target:p})=>{const c=o.find({entities:[n]});f.set(p.value,c)}}">
- `);H.append(m)}const J=r.create(()=>l`
+ `);P.append(m)}const W=r.create(()=>l`
{s.classList.contains("options-menu-visible")?s.classList.remove("options-menu-visible"):s.classList.add("options-menu-visible")}}">
- `);document.body.append(J);
+ `);document.body.append(W);
diff --git a/examples/assets/highlighter.js b/examples/assets/highlighter.js
index 2c426fc6..0c4a12e8 100644
--- a/examples/assets/highlighter.js
+++ b/examples/assets/highlighter.js
@@ -1 +1 @@
-import{b as a}from"./web-ifc-api-CpQ3aV8c.js";import{C as d,T as c,s as i,x as l,L as m,a as p}from"./index-B03kGVBW.js";import{b as u,d as f,V as g}from"./index-lUHwa_Wd.js";import{S as w}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";const h=document.getElementById("container"),t=new d,b=t.get(c),e=b.create();e.scene=new i(t);e.renderer=new u(t,h);e.camera=new l(t);t.init();e.renderer.postproduction.enabled=!0;e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const x=t.get(m),y=x.create(e);e.renderer.postproduction.customEffects.excludedMeshes.push(y.three);e.scene.three.background=null;const B=new p(t),L=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),T=await L.arrayBuffer(),k=new Uint8Array(T),v=B.load(k);e.scene.three.add(v);const r=t.get(f);r.setup({world:e});r.zoomToSelection=!0;const n=t.get(g);n.world=e;n.enabled=!0;n.create("example",new a({color:12382500,transparent:!0,opacity:.5}));r.events.select.onHighlight.add(s=>{n.clear("example"),n.add("example",s)});r.events.select.onClear.add(()=>{n.clear("example")});const o=new w;o.showPanel(2);document.body.append(o.dom);o.dom.style.left="0px";o.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>o.begin());e.renderer.onAfterUpdate.add(()=>o.end());window.addEventListener("keydown",s=>{s.code==="KeyP"&&t.dispose()});
+import{b as s}from"./web-ifc-api-nU1-R_1k.js";import{C as c,W as d,S as l,a as i,G as m,F as p}from"./index-C8rcJyf0.js";import{L as u,p as g,Y as f}from"./index-BdoCSKf7.js";import{S as h}from"./stats.min-GTpOrGrX.js";import"./_commonjsHelpers-Cpj98o6Y.js";const w=document.getElementById("container"),t=new c,b=t.get(d),e=b.create();e.scene=new l(t);e.renderer=new u(t,w);e.camera=new i(t);t.init();e.renderer.postproduction.enabled=!0;e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const x=t.get(m),y=x.create(e);e.renderer.postproduction.customEffects.excludedMeshes.push(y.three);e.scene.three.background=null;const S=new p(t),B=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),C=await B.arrayBuffer(),M=new Uint8Array(C),A=S.load(M);e.scene.three.add(A);const o=t.get(g);o.setup({world:e});o.zoomToSelection=!0;const n=t.get(f);n.world=e;n.enabled=!0;n.create("example",new s({color:12382500,transparent:!0,opacity:.5}));o.events.select.onHighlight.add(a=>{n.clear("example"),n.add("example",a)});o.events.select.onClear.add(()=>{n.clear("example")});const r=new h;r.showPanel(2);document.body.append(r.dom);r.dom.style.left="0px";r.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>r.begin());e.renderer.onAfterUpdate.add(()=>r.end());
diff --git a/examples/assets/iDSSpecifications.js b/examples/assets/iDSSpecifications.js
index 96f3c1d8..bda54185 100644
--- a/examples/assets/iDSSpecifications.js
+++ b/examples/assets/iDSSpecifications.js
@@ -1 +1 @@
-import"./web-ifc-api-CpQ3aV8c.js";import{C as s,I as a,a as o,b as n,c as p}from"./index-B_pEH4rh.js";import"./_commonjsHelpers-Cpj98o6Y.js";const e=new s,r=e.get(a);await r.setup();const t=e.get(o),i=await fetch("/resources/specs.ids"),c=await i.text(),m=t.load(c);console.log(t,m);new n(e,{type:"enumeration",parameter:["IFCSLAB","IFCWALL"]});const l=new p(e,{type:"simple",parameter:"Pset_SlabCommon"},{type:"simple",parameter:"IsExternal"});l.value={type:"simple",parameter:!1};
+import"./web-ifc-api-nU1-R_1k.js";import{C as s,I as a,a as o,b as n,c as p}from"./index-BboVOtPt.js";import"./_commonjsHelpers-Cpj98o6Y.js";const e=new s,r=e.get(a);await r.setup();const t=e.get(o),i=await fetch("/resources/specs.ids"),c=await i.text(),m=t.load(c);console.log(t,m);new n(e,{type:"enumeration",parameter:["IFCSLAB","IFCWALL"]});const l=new p(e,{type:"simple",parameter:"Pset_SlabCommon"},{type:"simple",parameter:"IsExternal"});l.value={type:"simple",parameter:!1};
diff --git a/examples/assets/ifcFinder.js b/examples/assets/ifcFinder.js
index 7bdd67a7..326590a7 100644
--- a/examples/assets/ifcFinder.js
+++ b/examples/assets/ifcFinder.js
@@ -1,8 +1,8 @@
-import"./web-ifc-api-CpQ3aV8c.js";import{T as w,z as r,m as i}from"./index-BEvRfOoQ.js";import{S as h}from"./stats.min-GTpOrGrX.js";import{C as v,T as x,s as F,g as R,x as C,L as I,a as L,G as T,W as $,e as k,A,d as B}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const S=document.getElementById("container"),e=new v,U=e.get(x),t=U.create();t.scene=new F(e);t.renderer=new R(e,S);t.camera=new C(e);e.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const z=e.get(I);z.create(t);t.scene.three.background=null;const E=new L(e),G=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),W=await G.arrayBuffer(),_=new Uint8Array(W),c=E.load(_);t.scene.three.add(c);const m=e.get(T),j=await fetch("https://thatopen.github.io/engine_components/resources/small-relations.json"),M=m.getRelationsMapFromJSON(await j.text());m.setRelationMap(c,M);const N=e.get($),n=N.create(),O=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),b=new File([await O.arrayBuffer()],"example"),u=new k(e,{name:"category",inclusive:!1,rules:[]});n.add(u);const p={type:"category",value:/IfcWallStandardCase/};u.rules.push(p);const d={type:"property",name:/.*/,value:/yeso/},g=new A(e,{name:"property",inclusive:!1,rules:[d]});n.add(g);await n.update(c.uuid,b);const P=n.items,o=e.get(B);o.set(!1);o.set(!0,P);const s=new h;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>s.begin());t.renderer.onAfterUpdate.add(()=>s.end());w.init();const f=r.create(()=>i`
-
+import"./web-ifc-api-nU1-R_1k.js";import{T as w,z as r,m as i}from"./index-BEvRfOoQ.js";import{S as h}from"./stats.min-GTpOrGrX.js";import{C as v,W as x,S as F,d as I,a as R,G as S,F as C,g as $,l as k,m as B,n as L,H as Q}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const U=document.getElementById("container"),e=new v,z=e.get(x),t=z.create();t.scene=new F(e);t.renderer=new I(e,U);t.camera=new R(e);e.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const A=e.get(S);A.create(t);t.scene.three.background=null;const E=new C(e),G=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),M=await G.arrayBuffer(),P=new Uint8Array(M),c=E.load(P);t.scene.three.add(c);const m=e.get($),T=await fetch("https://thatopen.github.io/engine_components/resources/small-relations.json"),W=m.getRelationsMapFromJSON(await T.text());m.setRelationMap(c,W);const _=e.get(k),n=_.create(),j=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),b=new File([await j.arrayBuffer()],"example"),p=new B(e,{name:"category",inclusive:!1,rules:[]});n.add(p);const u={type:"category",value:/IfcWallStandardCase/};p.rules.push(u);const d={type:"property",name:/.*/,value:/yeso/},g=new L(e,{name:"property",inclusive:!1,rules:[d]});n.add(g);await n.update(c.uuid,b);const H=n.items,o=e.get(Q);o.set(!1);o.set(!0,H);const a=new h;a.showPanel(2);document.body.append(a.dom);a.dom.style.left="0px";a.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>a.begin());t.renderer.onAfterUpdate.add(()=>a.end());w.init();const f=r.create(()=>i`
+
`),y=r.create(()=>i`
- `),Q=async()=>{u.clear(),g.clear(),p.value=new RegExp(f.value),d.value=new RegExp(y.value),await n.update(c.uuid,b);const l=n.items;if(console.log(l),Object.keys(l).length===0){alert("No items found!");return}o.set(!1),o.set(!0,l)},a=r.create(()=>i`
+ `),N=async()=>{p.clear(),g.clear(),u.value=new RegExp(f.value),d.value=new RegExp(y.value),await n.update(c.uuid,b);const l=n.items;if(console.log(l),Object.keys(l).length===0){alert("No items found!");return}o.set(!1),o.set(!0,l)},s=r.create(()=>i`
@@ -11,14 +11,14 @@ import"./web-ifc-api-CpQ3aV8c.js";import{T as w,z as r,m as i}from"./index-BEvRf
${y}
{await Q()}}">
+ @click="${async()=>{await N()}}">
- `);document.body.append(a);const q=r.create(()=>i`
+ `);document.body.append(s);const O=r.create(()=>i`
{a.classList.contains("options-menu-visible")?a.classList.remove("options-menu-visible"):a.classList.add("options-menu-visible")}}">
+ @click="${()=>{s.classList.contains("options-menu-visible")?s.classList.remove("options-menu-visible"):s.classList.add("options-menu-visible")}}">
- `);document.body.append(q);
+ `);document.body.append(O);
diff --git a/examples/assets/ifcGeometryTiler.js b/examples/assets/ifcGeometryTiler.js
index 05e5b7ce..9fb78460 100644
--- a/examples/assets/ifcGeometryTiler.js
+++ b/examples/assets/ifcGeometryTiler.js
@@ -1,16 +1,16 @@
-import"./web-ifc-api-CpQ3aV8c.js";import{S as w}from"./stats.min-GTpOrGrX.js";import{T as h,z as b,m as g}from"./index-BEvRfOoQ.js";import{C as y,T as L,s as F,g as B,x as I,L as S,a as T,$ as U}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const k=document.getElementById("container"),a=new y,v=a.get(L),t=v.create();t.scene=new F(a);t.renderer=new B(a,k);t.camera=new I(a);a.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const A=a.get(S);A.create(t);t.scene.three.background=null;const D=new T(a),x=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),z=await x.arrayBuffer(),C=new Uint8Array(z),$=D.load(C);t.scene.three.add($);const i=a.get(U),R={path:"https://unpkg.com/web-ifc@0.0.57/",absolute:!0};i.settings.wasm=R;i.settings.minGeometrySize=20;i.settings.minAssetsSize=1e3;let l=[],f={},u=1;i.onGeometryStreamed.add(e=>{const{buffer:s,data:n}=e,o=`small.ifc-processed-geometries-${u}`;for(const c in n){const p=n[c];p.geometryFile=o,f[c]=p}l.push({name:o,bits:[s]}),u++});let d=[];i.onAssetStreamed.add(e=>{d=[...d,...e]});i.onIfcLoaded.add(e=>{l.push({name:"small.ifc-processed-global",bits:[e]})});function j(e,...s){const n=new File(s,e),o=document.createElement("a"),c=URL.createObjectURL(n);o.href=c,o.download=n.name,o.click(),URL.revokeObjectURL(c)}async function G(e){for(const{name:s,bits:n}of e)j(s,...n),await new Promise(o=>{setTimeout(o,100)})}i.onProgress.add(e=>{e===1&&setTimeout(async()=>{const s={geometries:f,assets:d,globalDataFileId:"small.ifc-processed-global"};l.push({name:"small.ifc-processed.json",bits:[JSON.stringify(s)]}),await G(l),d=[],f={},l=[],u=1})});async function O(){const s=await(await fetch("https://thatopen.github.io/engine_components/resources/small.ifc")).arrayBuffer(),n=new Uint8Array(s);await i.streamFromBuffer(n)}const r=new w;r.showPanel(2);document.body.append(r.dom);r.dom.style.left="0px";r.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>r.begin());t.renderer.onAfterUpdate.add(()=>r.end());h.init();const m=b.create(()=>g`
+import"./web-ifc-api-nU1-R_1k.js";import{S as w}from"./stats.min-GTpOrGrX.js";import{T as y,z as b,m as g}from"./index-BEvRfOoQ.js";import{C as h,W as F,S,d as L,a as I,G as B,F as U,p as k}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const v=document.getElementById("container"),a=new h,A=a.get(F),t=A.create();t.scene=new S(a);t.renderer=new L(a,v);t.camera=new I(a);a.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const C=a.get(B);C.create(t);t.scene.three.background=null;const D=new U(a),G=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),T=await G.arrayBuffer(),z=new Uint8Array(T),R=D.load(z);t.scene.three.add(R);const r=a.get(k),j={path:"https://unpkg.com/web-ifc@0.0.66/",absolute:!0};r.settings.wasm=j;r.settings.minGeometrySize=20;r.settings.minAssetsSize=1e3;let l=[],f={},p=1;r.onGeometryStreamed.add(e=>{const{buffer:s,data:n}=e,o=`small.ifc-processed-geometries-${p}`;for(const c in n){const u=n[c];u.geometryFile=o,f[c]=u}l.push({name:o,bits:[s]}),p++});let d=[];r.onAssetStreamed.add(e=>{d=[...d,...e]});r.onIfcLoaded.add(e=>{l.push({name:"small.ifc-processed-global",bits:[e]})});function x(e,...s){const n=new File(s,e),o=document.createElement("a"),c=URL.createObjectURL(n);o.href=c,o.download=n.name,o.click(),URL.revokeObjectURL(c)}async function O(e){for(const{name:s,bits:n}of e)x(s,...n),await new Promise(o=>{setTimeout(o,100)})}r.onProgress.add(e=>{e===1&&setTimeout(async()=>{const s={geometries:f,assets:d,globalDataFileId:"small.ifc-processed-global"};l.push({name:"small.ifc-processed.json",bits:[JSON.stringify(s)]}),await O(l),d=[],f={},l=[],p=1})});async function P(){const s=await(await fetch("https://thatopen.github.io/engine_components/resources/small.ifc")).arrayBuffer(),n=new Uint8Array(s);await r.streamFromBuffer(n)}const i=new w;i.showPanel(2);document.body.append(i.dom);i.dom.style.left="0px";i.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>i.begin());t.renderer.onAfterUpdate.add(()=>i.end());y.init();const m=b.create(()=>g`
{O()}}">
+ @click="${()=>{P()}}">
- `);document.body.append(m);const P=b.create(()=>g`
+ `);document.body.append(m);const $=b.create(()=>g`
{m.classList.contains("options-menu-visible")?m.classList.remove("options-menu-visible"):m.classList.add("options-menu-visible")}}">
- `);document.body.append(P);
+ `);document.body.append($);
diff --git a/examples/assets/ifcIsolator.js b/examples/assets/ifcIsolator.js
index ea2128d0..f273f238 100644
--- a/examples/assets/ifcIsolator.js
+++ b/examples/assets/ifcIsolator.js
@@ -1,20 +1,20 @@
-import{ae as p}from"./web-ifc-api-CpQ3aV8c.js";import{S as b}from"./stats.min-GTpOrGrX.js";import{T as u,z as m,m as d}from"./index-BEvRfOoQ.js";import{C as f,T as w,s as g,g as I,x as h,L,b as y,k}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const v=document.getElementById("container"),t=new f,x=t.get(w),e=x.create();e.scene=new g(t);e.renderer=new I(t,v);e.camera=new h(t);t.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const C=t.get(L);C.create(e);e.scene.three.background=null;const i=t.get(y);await i.setup();i.settings.webIfc.COORDINATE_TO_ORIGIN=!0;async function T(){const c=await(await fetch("https://thatopen.github.io/engine_components/resources/small.ifc")).arrayBuffer(),s=new Uint8Array(c),n=await i.load(s);n.name="example",e.scene.three.add(n)}const U=t.get(k),r=new p;r.SetWasmPath("https://unpkg.com/web-ifc@0.0.57/",!0);await r.Init();const O=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),R=await O.arrayBuffer(),o=new b;o.showPanel(2);document.body.append(o.dom);o.dom.style.left="0px";o.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>o.begin());e.renderer.onAfterUpdate.add(()=>o.end());u.init();const a=m.create(()=>d`
+import{ae as p}from"./web-ifc-api-nU1-R_1k.js";import{S as b}from"./stats.min-GTpOrGrX.js";import{T as f,z as m,m as d}from"./index-BEvRfOoQ.js";import{C as u,W as w,S as I,d as g,a as h,G as y,I as L,k}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const C=document.getElementById("container"),t=new u,S=t.get(w),e=S.create();e.scene=new I(t);e.renderer=new g(t,C);e.camera=new h(t);t.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const v=t.get(y);v.create(e);e.scene.three.background=null;const i=t.get(L);await i.setup();i.settings.webIfc.COORDINATE_TO_ORIGIN=!0;async function R(){const c=await(await fetch("https://thatopen.github.io/engine_components/resources/small.ifc")).arrayBuffer(),a=new Uint8Array(c),n=await i.load(a);n.name="example",e.scene.three.add(n)}const U=t.get(k),r=new p;r.SetWasmPath("https://unpkg.com/web-ifc@0.0.66/",!0);await r.Init();const O=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),x=await O.arrayBuffer(),o=new b;o.showPanel(2);document.body.append(o.dom);o.dom.style.left="0px";o.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>o.begin());e.renderer.onAfterUpdate.add(()=>o.end());f.init();const s=m.create(()=>d`
{T()}}">
+ @click="${()=>{R()}}">
{const l=await U.splitIfc(r,R,[6518]),c=new File([new Blob([l])],"isolated.ifc"),s=URL.createObjectURL(c),n=document.createElement("a");n.download="isolated.ifc",n.href=s,n.click(),URL.revokeObjectURL(s),n.remove()}}">
+ @click="${async()=>{const l=await U.splitIfc(r,x,[6518]),c=new File([new Blob([l])],"isolated.ifc"),a=URL.createObjectURL(c),n=document.createElement("a");n.download="isolated.ifc",n.href=a,n.click(),URL.revokeObjectURL(a),n.remove()}}">
- `);document.body.append(a);const A=m.create(()=>d`
+ `);document.body.append(s);const A=m.create(()=>d`
{a.classList.contains("options-menu-visible")?a.classList.remove("options-menu-visible"):a.classList.add("options-menu-visible")}}">
+ @click="${()=>{s.classList.contains("options-menu-visible")?s.classList.remove("options-menu-visible"):s.classList.add("options-menu-visible")}}">
`);document.body.append(A);
diff --git a/examples/assets/ifcJsonExporter.js b/examples/assets/ifcJsonExporter.js
index 3acad929..64b0c75f 100644
--- a/examples/assets/ifcJsonExporter.js
+++ b/examples/assets/ifcJsonExporter.js
@@ -1,16 +1,16 @@
-import{ae as d}from"./web-ifc-api-CpQ3aV8c.js";import{S as b}from"./stats.min-GTpOrGrX.js";import{T as f,z as c,m as i}from"./index-BEvRfOoQ.js";import{C as u,T as g,s as w,g as h,x as y,L as x,a as L,y as k}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const I=document.getElementById("container"),t=new u,U=t.get(g),e=U.create();e.scene=new w(t);e.renderer=new h(t,I);e.camera=new y(t);t.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const v=t.get(x);v.create(e);e.scene.three.background=null;const B=new L(t),O=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),S=await O.arrayBuffer(),T=new Uint8Array(S),A=B.load(T);e.scene.three.add(A);const j=t.get(k),a=new d;a.SetWasmPath("https://unpkg.com/web-ifc@0.0.57/",!0);await a.Init();const z=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),C=await z.arrayBuffer(),E=new Uint8Array(C),F=a.OpenModel(E),n=new b;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end());f.init();const s=c.create(()=>i`
+import{ae as d}from"./web-ifc-api-nU1-R_1k.js";import{S as f}from"./stats.min-GTpOrGrX.js";import{T as b,z as i,m as c}from"./index-BEvRfOoQ.js";import{C as u,W as g,S as w,d as h,a as y,G as S,F as x,j as I}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const k=document.getElementById("container"),t=new u,L=t.get(g),e=L.create();e.scene=new w(t);e.renderer=new h(t,k);e.camera=new y(t);t.init();e.camera.controls.setLookAt(12,6,8,0,0,-10);e.scene.setup();const U=t.get(S);U.create(e);e.scene.three.background=null;const v=new x(t),B=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),F=await B.arrayBuffer(),O=new Uint8Array(F),j=v.load(O);e.scene.three.add(j);const A=t.get(I),a=new d;a.SetWasmPath("https://unpkg.com/web-ifc@0.0.66/",!0);await a.Init();const C=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),E=await C.arrayBuffer(),R=new Uint8Array(E),z=a.OpenModel(R),n=new f;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end());b.init();const s=i.create(()=>c`
{const l=await j.export(a,F),p=JSON.stringify(l),m=new File([new Blob([p])],"properties.json"),r=URL.createObjectURL(m),o=document.createElement("a");o.download="properties.json",o.href=r,o.click(),URL.revokeObjectURL(r),o.remove()}}">
+ @click="${async()=>{const l=await A.export(a,z),p=JSON.stringify(l),m=new File([new Blob([p])],"properties.json"),r=URL.createObjectURL(m),o=document.createElement("a");o.download="properties.json",o.href=r,o.click(),URL.revokeObjectURL(r),o.remove()}}">
- `);document.body.append(s);const R=c.create(()=>i`
+ `);document.body.append(s);const J=i.create(()=>c`
{s.classList.contains("options-menu-visible")?s.classList.remove("options-menu-visible"):s.classList.add("options-menu-visible")}}">
- `);document.body.append(R);
+ `);document.body.append(J);
diff --git a/examples/assets/ifcLoader.js b/examples/assets/ifcLoader.js
index 6b7b6994..ccf35022 100644
--- a/examples/assets/ifcLoader.js
+++ b/examples/assets/ifcLoader.js
@@ -1,10 +1,10 @@
-import{bp as b,bq as u,br as f}from"./web-ifc-api-CpQ3aV8c.js";import{T as g,z as m,m as p}from"./index-BEvRfOoQ.js";import{S as w}from"./stats.min-GTpOrGrX.js";import{C as I,T as C,s as L,g as y,x as F,L as h,a as x,b as N}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const E=document.getElementById("container"),o=new I,O=o.get(C),t=O.create();t.scene=new L(o);t.renderer=new y(o,E);t.camera=new F(o);o.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const R=o.get(h);R.create(t);t.scene.three.background=null;const a=o.get(x),c=o.get(N);await c.setup();const T=[b,u,f];for(const e of T)c.settings.excludedCategories.add(e);c.settings.webIfc.COORDINATE_TO_ORIGIN=!0;async function k(){const n=await(await fetch("https://thatopen.github.io/engine_components/resources/small.ifc")).arrayBuffer(),r=new Uint8Array(n),l=await c.load(r);l.name="example",t.scene.three.add(l)}a.onFragmentsLoaded.add(e=>{console.log(e)});function d(e){const n=document.createElement("a");n.href=URL.createObjectURL(e),n.download=e.name,document.body.appendChild(n),n.click(),n.remove()}async function v(){if(!a.groups.size)return;const e=Array.from(a.groups.values())[0],n=a.export(e);d(new File([new Blob([n])],"small.frag"));const r=e.getLocalProperties();r&&d(new File([JSON.stringify(r)],"small.json"))}function A(){a.dispose()}const s=new w;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>s.begin());t.renderer.onAfterUpdate.add(()=>s.end());g.init();const i=m.create(()=>p`
+import{bp as b,bq as u,br as f}from"./web-ifc-api-nU1-R_1k.js";import{T as g,z as m,m as p}from"./index-BEvRfOoQ.js";import{S as w}from"./stats.min-GTpOrGrX.js";import{C as I,W as C,S as y,d as F,a as L,G as N,F as R,I as h}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const E=document.getElementById("container"),o=new I,O=o.get(C),t=O.create();t.scene=new y(o);t.renderer=new F(o,E);t.camera=new L(o);o.init();t.camera.controls.setLookAt(12,6,8,0,0,-10);t.scene.setup();const x=o.get(N);x.create(t);t.scene.three.background=null;const a=o.get(R),c=o.get(h);await c.setup();const k=[b,u,f];for(const e of k)c.settings.excludedCategories.add(e);c.settings.webIfc.COORDINATE_TO_ORIGIN=!0;async function S(){const n=await(await fetch("https://thatopen.github.io/engine_components/resources/small.ifc")).arrayBuffer(),r=new Uint8Array(n),l=await c.load(r);l.name="example",t.scene.three.add(l)}a.onFragmentsLoaded.add(e=>{console.log(e)});function d(e){const n=document.createElement("a");n.href=URL.createObjectURL(e),n.download=e.name,document.body.appendChild(n),n.click(),n.remove()}async function v(){if(!a.groups.size)return;const e=Array.from(a.groups.values())[0],n=a.export(e);d(new File([new Blob([n])],"small.frag"));const r=e.getLocalProperties();r&&d(new File([JSON.stringify(r)],"small.json"))}function A(){a.dispose()}const s=new w;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";t.renderer.onBeforeUpdate.add(()=>s.begin());t.renderer.onAfterUpdate.add(()=>s.end());g.init();const i=m.create(()=>p`
{k()}}">
+ @click="${()=>{S()}}">
- `);document.body.append(i);const B=m.create(()=>p`
+ `);document.body.append(i);const T=m.create(()=>p`
{i.classList.contains("options-menu-visible")?i.classList.remove("options-menu-visible"):i.classList.add("options-menu-visible")}}">
- `);document.body.append(B);
+ `);document.body.append(T);
diff --git a/examples/assets/ifcPropertiesManager.js b/examples/assets/ifcPropertiesManager.js
index fcf85e95..326832fd 100644
--- a/examples/assets/ifcPropertiesManager.js
+++ b/examples/assets/ifcPropertiesManager.js
@@ -1 +1 @@
-import{bo as t,aE as d,as as m}from"./web-ifc-api-CpQ3aV8c.js";import{C as p,b as u,P as I,o as y,G as P}from"./index-B03kGVBW.js";const s=new p,c=s.get(u);await c.setup();const g=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),b=await g.arrayBuffer(),l=new Uint8Array(b),e=await c.load(l),a=s.get(I),{handle:E}=await a.getOwnerHistory(e),r=new t.IfcPropertySet(new t.IfcGloballyUniqueId(y.create()),E,new t.IfcLabel("Custom Property Set"),null,[]);await a.setData(e,r);const f=new t.IfcPropertySingleValue(new t.IfcIdentifier("Custom Property"),null,new t.IfcText("Custom Property Text Value"),null);await a.setData(e,f);r.HasProperties.push(new d(f.expressID));const h=s.get(P);h.addEntitiesRelation(e,r.expressID,{type:m,inv:"DefinesOcurrence"},186);const n=await e.getProperties(186);n&&(n.Name?n.Name.value="New Wall Name":n.Name=new t.IfcIdentifier("New Wall Name"),await a.setData(e,n));await e.setProperties(243,null);a.registerChange(e,243);const L=document.getElementById("download-btn");L.addEventListener("click",async()=>{const w=await a.saveToIfc(e,l),i=new File([w],"small-modified.ifc"),o=document.createElement("a");o.href=URL.createObjectURL(i),o.download=i.name,o.click(),URL.revokeObjectURL(o.href)});
+import{bo as t,aE as d,as as m}from"./web-ifc-api-nU1-R_1k.js";import{C as p,I,i as u,U as y,g}from"./index-C8rcJyf0.js";const s=new p,c=s.get(I);await c.setup();const P=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),E=await P.arrayBuffer(),l=new Uint8Array(E),e=await c.load(l),a=s.get(u),{handle:b}=await a.getOwnerHistory(e),r=new t.IfcPropertySet(new t.IfcGloballyUniqueId(y.create()),b,new t.IfcLabel("Custom Property Set"),null,[]);await a.setData(e,r);const f=new t.IfcPropertySingleValue(new t.IfcIdentifier("Custom Property"),null,new t.IfcText("Custom Property Text Value"),null);await a.setData(e,f);r.HasProperties.push(new d(f.expressID));const h=s.get(g);h.addEntitiesRelation(e,r.expressID,{type:m,inv:"DefinesOcurrence"},186);const n=await e.getProperties(186);n&&(n.Name?n.Name.value="New Wall Name":n.Name=new t.IfcIdentifier("New Wall Name"),await a.setData(e,n));await e.setProperties(243,null);a.registerChange(e,243);const L=document.getElementById("download-btn");L.addEventListener("click",async()=>{const w=await a.saveToIfc(e,l),i=new File([w],"small-modified.ifc"),o=document.createElement("a");o.href=URL.createObjectURL(i),o.download=i.name,o.click(),URL.revokeObjectURL(o.href)});
diff --git a/examples/assets/ifcPropertiesTiler.js b/examples/assets/ifcPropertiesTiler.js
index 6f48c44c..a25b3a70 100644
--- a/examples/assets/ifcPropertiesTiler.js
+++ b/examples/assets/ifcPropertiesTiler.js
@@ -1,4 +1,4 @@
-import"./web-ifc-api-CpQ3aV8c.js";import{S as b}from"./stats.min-GTpOrGrX.js";import{T as g,z as f,m as u}from"./index-BEvRfOoQ.js";import{C as w,T as y,s as h,g as B,x as L,L as F,a as x,f as S,G as T}from"./index-B03kGVBW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const U=document.getElementById("container"),n=new w,k=n.get(y),s=k.create();s.scene=new h(n);s.renderer=new B(n,U);s.camera=new L(n);n.init();s.camera.controls.setLookAt(12,6,8,0,0,-10);s.scene.setup();const v=n.get(F);v.create(s);s.scene.three.background=null;const I=new x(n),R=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),z=await R.arrayBuffer(),A=new Uint8Array(z),P=I.load(A);s.scene.three.add(P);function j(e,o){const t=new File([o],e),a=document.createElement("a"),p=URL.createObjectURL(t);a.href=p,a.download=t.name,a.click(),URL.revokeObjectURL(p)}async function C(e){for(const{name:o,bits:t}of e)j(o,t),await new Promise(a=>{setTimeout(a,100)})}const c=n.get(S);c.settings.wasm={path:"https://unpkg.com/web-ifc@0.0.57/",absolute:!0};const r={types:{},ids:{},indexesFile:"small.ifc-processed-properties-indexes"};let l=0;const d=[];c.onPropertiesStreamed.add(async e=>{r.types[e.type]||(r.types[e.type]=[]),r.types[e.type].push(l);for(const a in e.data)r.ids[a]=l;const o=`small.ifc-processed-properties-${l}`,t=new Blob([JSON.stringify(e.data)]);d.push({bits:t,name:o}),l++});c.onProgress.add(async e=>{console.log(e)});c.onIndicesStreamed.add(async e=>{d.push({name:"small.ifc-processed-properties.json",bits:new Blob([JSON.stringify(r)])});const t=n.get(T).serializeRelations(e);d.push({name:"small.ifc-processed-properties-indexes",bits:new Blob([t])}),await C(d)});async function O(){const o=await(await fetch("https://thatopen.github.io/engine_components/resources/small.ifc")).arrayBuffer(),t=new Uint8Array(o);await c.streamFromBuffer(t)}const i=new b;i.showPanel(2);document.body.append(i.dom);i.dom.style.left="0px";i.dom.style.zIndex="unset";s.renderer.onBeforeUpdate.add(()=>i.begin());s.renderer.onAfterUpdate.add(()=>i.end());g.init();const m=f.create(()=>u`
+import"./web-ifc-api-nU1-R_1k.js";import{S as b}from"./stats.min-GTpOrGrX.js";import{T as g,z as f,m as u}from"./index-BEvRfOoQ.js";import{C as w,W as y,S as h,d as S,a as B,G as F,F as I,o as L,g as R}from"./index-C8rcJyf0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const U=document.getElementById("container"),s=new w,k=s.get(y),n=k.create();n.scene=new h(s);n.renderer=new S(s,U);n.camera=new B(s);s.init();n.camera.controls.setLookAt(12,6,8,0,0,-10);n.scene.setup();const x=s.get(F);x.create(n);n.scene.three.background=null;const v=new I(s),P=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),T=await P.arrayBuffer(),z=new Uint8Array(T),A=v.load(z);n.scene.three.add(A);function C(e,o){const t=new File([o],e),a=document.createElement("a"),p=URL.createObjectURL(t);a.href=p,a.download=t.name,a.click(),URL.revokeObjectURL(p)}async function j(e){for(const{name:o,bits:t}of e)C(o,t),await new Promise(a=>{setTimeout(a,100)})}const c=s.get(L);c.settings.wasm={path:"https://unpkg.com/web-ifc@0.0.66/",absolute:!0};const r={types:{},ids:{},indexesFile:"small.ifc-processed-properties-indexes"};let l=0;const d=[];c.onPropertiesStreamed.add(async e=>{r.types[e.type]||(r.types[e.type]=[]),r.types[e.type].push(l);for(const a in e.data)r.ids[a]=l;const o=`small.ifc-processed-properties-${l}`,t=new Blob([JSON.stringify(e.data)]);d.push({bits:t,name:o}),l++});c.onProgress.add(async e=>{console.log(e)});c.onIndicesStreamed.add(async e=>{d.push({name:"small.ifc-processed-properties.json",bits:new Blob([JSON.stringify(r)])});const t=s.get(R).serializeRelations(e);d.push({name:"small.ifc-processed-properties-indexes",bits:new Blob([t])}),await j(d)});async function O(){const o=await(await fetch("https://thatopen.github.io/engine_components/resources/small.ifc")).arrayBuffer(),t=new Uint8Array(o);await c.streamFromBuffer(t)}const i=new b;i.showPanel(2);document.body.append(i.dom);i.dom.style.left="0px";i.dom.style.zIndex="unset";n.renderer.onBeforeUpdate.add(()=>i.begin());n.renderer.onAfterUpdate.add(()=>i.end());g.init();const m=f.create(()=>u`
diff --git a/examples/assets/ifcRelationsIndexer.js b/examples/assets/ifcRelationsIndexer.js
index e35a64f5..99e16423 100644
--- a/examples/assets/ifcRelationsIndexer.js
+++ b/examples/assets/ifcRelationsIndexer.js
@@ -1,4 +1,4 @@
-import{aF as D,bm as r,aE as L,bn as P,as as I}from"./web-ifc-api-CpQ3aV8c.js";import{S as x}from"./stats.min-GTpOrGrX.js";import{T as U,z as w,m as g}from"./index-BEvRfOoQ.js";import{C,W as O,S as F,I as v,d as A,e as k,f as y,U as B}from"./index-B_pEH4rh.js";import{S as M,a as N,G as j}from"./index-BqrBcJfH.js";import"./_commonjsHelpers-Cpj98o6Y.js";const T=document.getElementById("container"),s=new C,W=s.get(O),a=W.create();a.scene=new M(s);a.renderer=new N(s,T);a.camera=new F(s);s.init();a.camera.controls.setLookAt(12,6,8,0,0,-10);a.scene.setup();const $=s.get(j);$.create(a);a.scene.three.background=null;const R=s.get(v);await R.setup();const z=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),G=await z.arrayBuffer(),S=new Uint8Array(G),e=await R.load(S);a.scene.three.add(e);const t=s.get(A);await t.process(e);const u=t.getEntityRelations(e,6518,"IsDefinedBy");if(u)for(const n of u){const i=await e.getProperties(n);console.log(i),await k.getPsetProps(e,n,async l=>{const o=await e.getProperties(l);console.log(o)})}const H=(n,i)=>{const l=new File([n],i),o=document.createElement("a");o.href=URL.createObjectURL(l),o.download=l.name,o.click(),URL.revokeObjectURL(o.href)},J=t.serializeModelRelations(e);console.log(J);const V=t.serializeAllRelations();delete t.relationMaps[e.uuid];const Y=await fetch("https://thatopen.github.io/engine_components/resources/small-relations.json"),_=t.getRelationsMapFromJSON(await Y.text());t.setRelationMap(e,_);const p=t.getEntityRelations(e,6518,"ContainedInStructure");if(p&&p[0]){const n=await e.getProperties(p[0]);console.log(n)}const q=t.getEntitiesWithRelation(e,"ContainedInStructure",138);console.log(`IfcBuildingStorey 138 has the following IfcElement: ${[...q]}`);const X=t.getEntitiesWithRelation(e,"ContainsElements",186);console.log(`IfcElement 186 is located inside IfcBuildingStorey ${[...X][0]}`);const K=t.getEntitiesWithRelation(e,"IsDefinedBy",303);console.log(`${[...K]} are defined by IfcPropertySet 303`);const m=s.get(y),b=await m.getEntityRef(e,D),E=new r.IfcPropertySingleValue(new r.IfcIdentifier("Property Name"),null,new r.IfcLabel("Property Value"),null);await m.setData(e,E);const f=new r.IfcPropertySet(new r.IfcGloballyUniqueId(B.create()),b?b[0]:null,new r.IfcLabel("My New Pset!"),null,[new L(E.expressID)]);await m.setData(e,f);const h=await e.getAllPropertiesOfType(P),Q=Object.values(h).map(n=>n.expressID);t.addEntitiesRelation(e,f.expressID,{type:I,inv:"DefinesOcurrence"},...Q);for(const n in h)t.addEntitiesRelation(e,Number(n),{type:I,inv:"IsDefinedBy"},f.expressID);const c=new x;c.showPanel(2);document.body.append(c.dom);c.dom.style.left="0px";c.dom.style.zIndex="unset";a.renderer.onBeforeUpdate.add(()=>c.begin());a.renderer.onAfterUpdate.add(()=>c.end());U.init();const d=w.create(()=>g`
+import{aF as D,bm as r,aE as L,bn as P,as as I}from"./web-ifc-api-nU1-R_1k.js";import{S as x}from"./stats.min-GTpOrGrX.js";import{T as U,z as w,m as g}from"./index-BEvRfOoQ.js";import{C,W as O,S as F,I as v,d as A,e as k,f as y,U as B}from"./index-BboVOtPt.js";import{S as M,a as N,G as j}from"./index-BvJCnCKo.js";import"./_commonjsHelpers-Cpj98o6Y.js";const T=document.getElementById("container"),s=new C,W=s.get(O),a=W.create();a.scene=new M(s);a.renderer=new N(s,T);a.camera=new F(s);s.init();a.camera.controls.setLookAt(12,6,8,0,0,-10);a.scene.setup();const $=s.get(j);$.create(a);a.scene.three.background=null;const R=s.get(v);await R.setup();const z=await fetch("https://thatopen.github.io/engine_components/resources/small.ifc"),G=await z.arrayBuffer(),S=new Uint8Array(G),e=await R.load(S);a.scene.three.add(e);const t=s.get(A);await t.process(e);const u=t.getEntityRelations(e,6518,"IsDefinedBy");if(u)for(const n of u){const i=await e.getProperties(n);console.log(i),await k.getPsetProps(e,n,async l=>{const o=await e.getProperties(l);console.log(o)})}const H=(n,i)=>{const l=new File([n],i),o=document.createElement("a");o.href=URL.createObjectURL(l),o.download=l.name,o.click(),URL.revokeObjectURL(o.href)},J=t.serializeModelRelations(e);console.log(J);const V=t.serializeAllRelations();delete t.relationMaps[e.uuid];const Y=await fetch("https://thatopen.github.io/engine_components/resources/small-relations.json"),_=t.getRelationsMapFromJSON(await Y.text());t.setRelationMap(e,_);const p=t.getEntityRelations(e,6518,"ContainedInStructure");if(p&&p[0]){const n=await e.getProperties(p[0]);console.log(n)}const q=t.getEntitiesWithRelation(e,"ContainedInStructure",138);console.log(`IfcBuildingStorey 138 has the following IfcElement: ${[...q]}`);const X=t.getEntitiesWithRelation(e,"ContainsElements",186);console.log(`IfcElement 186 is located inside IfcBuildingStorey ${[...X][0]}`);const K=t.getEntitiesWithRelation(e,"IsDefinedBy",303);console.log(`${[...K]} are defined by IfcPropertySet 303`);const m=s.get(y),b=await m.getEntityRef(e,D),E=new r.IfcPropertySingleValue(new r.IfcIdentifier("Property Name"),null,new r.IfcLabel("Property Value"),null);await m.setData(e,E);const f=new r.IfcPropertySet(new r.IfcGloballyUniqueId(B.create()),b?b[0]:null,new r.IfcLabel("My New Pset!"),null,[new L(E.expressID)]);await m.setData(e,f);const h=await e.getAllPropertiesOfType(P),Q=Object.values(h).map(n=>n.expressID);t.addEntitiesRelation(e,f.expressID,{type:I,inv:"DefinesOcurrence"},...Q);for(const n in h)t.addEntitiesRelation(e,Number(n),{type:I,inv:"IsDefinedBy"},f.expressID);const c=new x;c.showPanel(2);document.body.append(c.dom);c.dom.style.left="0px";c.dom.style.zIndex="unset";a.renderer.onBeforeUpdate.add(()=>c.begin());a.renderer.onAfterUpdate.add(()=>c.end());U.init();const d=w.create(()=>g`
diff --git a/examples/assets/ifcStreamer.js b/examples/assets/ifcStreamer.js
index 2160ace2..7f56ef1d 100644
--- a/examples/assets/ifcStreamer.js
+++ b/examples/assets/ifcStreamer.js
@@ -1 +1 @@
-import"./web-ifc-api-CpQ3aV8c.js";import{S as d}from"./stats.min-GTpOrGrX.js";import{C as l,T as m,s as p,g as u,x as g,L as h}from"./index-B03kGVBW.js";import{h as w}from"./index-lUHwa_Wd.js";import"./_commonjsHelpers-Cpj98o6Y.js";const f=document.getElementById("container"),o=new l,y=o.get(m),e=y.create();e.scene=new p(o);e.renderer=new u(o,f);e.camera=new g(o);o.init();e.scene.setup();e.camera.controls.setLookAt(12,6,8,0,0,-10);const b=o.get(h);b.create(e);e.scene.three.background=null;const t=o.get(w);t.world=e;t.url="https://thatopen.github.io/engine_components/resources/streaming/";async function x(a,r){const c=await(await fetch(a)).json();let n;n=await(await fetch(r)).json();const i=await t.load(c,!0,n);console.log(i)}await x("https://thatopen.github.io/engine_components/resources/streaming/small.ifc-processed.json","https://thatopen.github.io/engine_components/resources/streaming/small.ifc-processed-properties.json");e.camera.controls.addEventListener("sleep",()=>{t.culler.needsUpdate=!0});t.useCache=!0;t.culler.threshold=10;t.culler.maxHiddenTime=1e3;t.culler.maxLostTime=3e3;const s=new d;s.showPanel(2);document.body.append(s.dom);s.dom.style.left="0px";s.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>s.begin());e.renderer.onAfterUpdate.add(()=>s.end());
+import"./web-ifc-api-nU1-R_1k.js";import{S as i}from"./stats.min-GTpOrGrX.js";import{C as l,W as m,S as p,d as u,a as w,G as g}from"./index-C8rcJyf0.js";import{d as h}from"./index-BdoCSKf7.js";import"./_commonjsHelpers-Cpj98o6Y.js";const f=document.getElementById("container"),o=new l,y=o.get(m),e=y.create();e.scene=new p(o);e.renderer=new u(o,f);e.camera=new w(o);o.init();e.scene.setup();e.camera.controls.setLookAt(12,6,8,0,0,-10);const S=o.get(g);S.create(e);e.scene.three.background=null;const t=o.get(h);t.world=e;t.url="https://thatopen.github.io/engine_components/resources/streaming/";async function b(r,s){const c=await(await fetch(r)).json();let a;a=await(await fetch(s)).json();const d=await t.load(c,!0,a);console.log(d)}await b("https://thatopen.github.io/engine_components/resources/streaming/small.ifc-processed.json","https://thatopen.github.io/engine_components/resources/streaming/small.ifc-processed-properties.json");e.camera.controls.addEventListener("sleep",()=>{t.culler.needsUpdate=!0});t.useCache=!0;t.culler.threshold=10;t.culler.maxHiddenTime=1e3;t.culler.maxLostTime=3e3;const n=new i;n.showPanel(2);document.body.append(n.dom);n.dom.style.left="0px";n.dom.style.zIndex="unset";e.renderer.onBeforeUpdate.add(()=>n.begin());e.renderer.onAfterUpdate.add(()=>n.end());
diff --git a/examples/assets/index-B03kGVBW.js b/examples/assets/index-B03kGVBW.js
deleted file mode 100644
index 81a6ba6f..00000000
--- a/examples/assets/index-B03kGVBW.js
+++ /dev/null
@@ -1,310 +0,0 @@
-import{V as U,p as He,t as ds,u as it,T as rs,S as wi,v as Pe,w as _a,q as Bs,o as Ys,x as wa,y as zs,z as ar,n as Ee,W as Ai,H as Pi,J as Vs,b as cs,s as Vt,K as Vi,C as Ue,N as vn,Q as Gt,P as Mn,U as Oi,X as Pa,Y as st,Z as va,_ as Ma,$ as vi,a0 as ao,a as se,O as yi,L as lo,a1 as xe,B as Me,a2 as lr,a3 as Zs,a4 as Ft,a5 as Cs,a6 as Da,a7 as ba,a8 as Bt,I as Dn,a9 as bn,aa as Un,ab as xn,ac as zt,ad as Ua,ae as hs,af as cr,f as xa,ag as Mi,ah as Di,ai as Ba,aj as Ya,ak as Va,al as Ga,am as za,an as co,ao as ho,ap as Bn,aq as Yn,ar as Vn,as as ks,at as Gn,au as zn,av as kn,aw as Hn,ax as Wn,ay as Xn,az as Zn,aA as jn,aB as $n,aC as Us,aD as ht,d as as,e as mi,aE as Nt,aF as ka,aG as Ha,aH as Wa,aI as Xa,aJ as Za,aK as ja,aL as $a,aM as qa,aN as Qa,aO as Ni,aP as Ka,aQ as Ja,g as It,aR as Ht,aS as el,aT as tl,aU as hr,aV as ur,D as uo,A as sl,b8 as dr,ba as il,bc as nl,bs as rl,E as ol}from"./web-ifc-api-CpQ3aV8c.js";var al=Object.defineProperty,ll=(l,e,t)=>e in l?al(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t,p=(l,e,t)=>(ll(l,typeof e!="symbol"?e+"":e,t),t);const Io=0,cl=1,hl=2,Ir=2,Gi=1.25,Er=1,Ri=6*4+4+4,bi=65535,ul=Math.pow(2,-24),zi=Symbol("SKIP_GENERATION");function dl(l){return l.index?l.index.count:l.attributes.position.count}function Is(l){return dl(l)/3}function Il(l,e=ArrayBuffer){return l>65535?new Uint32Array(new e(4*l)):new Uint16Array(new e(2*l))}function El(l,e){if(!l.index){const t=l.attributes.position.count,s=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,i=Il(t,s);l.setIndex(new Ys(i,1));for(let n=0;no-a);for(let o=0;on.offset-r.offset),s=t[t.length-1];s.count=Math.min(e-s.offset,s.count);let i=0;return t.forEach(({count:n})=>i+=n),e!==i}function Oe(l,e,t){return t.min.x=e[l],t.min.y=e[l+1],t.min.z=e[l+2],t.max.x=e[l+3],t.max.y=e[l+4],t.max.z=e[l+5],t}function pl(l){l[0]=l[1]=l[2]=1/0,l[3]=l[4]=l[5]=-1/0}function fr(l){let e=-1,t=-1/0;for(let s=0;s<3;s++){const i=l[s+3]-l[s];i>t&&(t=i,e=s)}return e}function pr(l,e){e.set(l)}function Cr(l,e,t){let s,i;for(let n=0;n<3;n++){const r=n+3;s=l[n],i=e[n],t[n]=si?s:i}}function js(l,e,t){for(let s=0;s<3;s++){const i=e[l+2*s],n=e[l+2*s+1],r=i-n,o=i+n;rt[s+3]&&(t[s+3]=o)}}function Ts(l){const e=l[3]-l[0],t=l[4]-l[1],s=l[5]-l[2];return 2*(e*t+t*s+s*e)}function ki(l,e,t,s,i=null){let n=1/0,r=1/0,o=1/0,a=-1/0,c=-1/0,h=-1/0,d=1/0,I=1/0,u=1/0,f=-1/0,E=-1/0,T=-1/0;const C=i!==null;for(let R=e*6,A=(e+t)*6;Ra&&(a=y),C&&mf&&(f=m);const P=l[R+2],_=l[R+3],M=P-_,B=P+_;Mc&&(c=B),C&&PE&&(E=P);const O=l[R+4],v=l[R+5],F=O-v,b=O+v;Fh&&(h=b),C&&OT&&(T=O)}s[0]=n,s[1]=r,s[2]=o,s[3]=a,s[4]=c,s[5]=h,C&&(i[0]=d,i[1]=I,i[2]=u,i[3]=f,i[4]=E,i[5]=T)}function Cl(l,e,t,s){let i=1/0,n=1/0,r=1/0,o=-1/0,a=-1/0,c=-1/0;for(let h=e*6,d=(e+t)*6;ho&&(o=I);const u=l[h+2];ua&&(a=u);const f=l[h+4];fc&&(c=f)}s[0]=i,s[1]=n,s[2]=r,s[3]=o,s[4]=a,s[5]=c}function Tl(l,e){pl(e);const t=l.attributes.position,s=l.index?l.index.array:null,i=Is(l),n=new Float32Array(i*6),r=t.normalized,o=t.array,a=t.offset||0;let c=3;t.isInterleavedBufferAttribute&&(c=t.data.stride);const h=["getX","getY","getZ"];for(let d=0;dN&&(N=A),m>N&&(N=m);const y=(N-S)/2,P=C*2;n[u+P+0]=S+y,n[u+P+1]=y+(Math.abs(S)+y)*ul,Se[C+3]&&(e[C+3]=N)}}return n}const Et=32,ml=(l,e)=>l.candidate-e.candidate,St=new Array(Et).fill().map(()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0})),$s=new Float32Array(6);function Rl(l,e,t,s,i,n){let r=-1,o=0;if(n===Io)r=fr(e),r!==-1&&(o=(e[r]+e[r+3])/2);else if(n===cl)r=fr(l),r!==-1&&(o=gl(t,s,i,r));else if(n===hl){const a=Ts(l);let c=Gi*i;const h=s*6,d=(s+i)*6;for(let I=0;I<3;I++){const u=e[I],f=(e[I+3]-u)/Et;if(i=S.candidate?js(R,t,S.rightCacheBounds):(js(R,t,S.leftCacheBounds),S.count++)}}for(let R=0;R=Et&&(R=Et-1);const A=St[R];A.count++,js(C,t,A.bounds)}const E=St[Et-1];pr(E.bounds,E.rightCacheBounds);for(let C=Et-2;C>=0;C--){const R=St[C],A=St[C+1];Cr(R.bounds,A.rightCacheBounds,R.rightCacheBounds)}let T=0;for(let C=0;C=a;)o--;if(r=a;)o--;if(r2**16,i=s?4:2,n=e?new SharedArrayBuffer(t*i):new ArrayBuffer(t*i),r=s?new Uint32Array(n):new Uint16Array(n);for(let o=0,a=r.length;o=i&&(d=!0,n&&(console.warn(`MeshBVH: Max depth of ${i} reached when generating BVH. Consider increasing maxDepth.`),console.warn(t))),N<=r||P>=i)return R(S+N),m.offset=S,m.count=N,m;const _=Rl(m.boundingData,y,f,S,N,o);if(_.axis===-1)return R(S+N),m.offset=S,m.count=N,m;const M=E(h,s,f,S,N,_);if(M===S||M===S+N)R(S+N),m.offset=S,m.count=N;else{m.splitAxis=_.axis;const B=new qs,O=S,v=M-S;m.left=B,B.boundingData=new Float32Array(6),ki(f,O,v,B.boundingData,u),A(B,O,v,u,P+1);const F=new qs,b=M,j=N-v;m.right=F,F.boundingData=new Float32Array(6),ki(f,b,j,F.boundingData,u),A(F,b,j,u,P+1)}return m}}function yl(l,e){const t=l.geometry;e.indirect&&(l._indirectBuffer=Al(t,e.useSharedArrayBuffer),fl(t)&&!e.verbose&&console.warn('MeshBVH: Provided geometry contains groups that do not fully span the vertex contents while using the "indirect" option. BVH may incorrectly report intersections on unrendered portions of the geometry.')),l._indirectBuffer||El(t,e);const s=Ol(l,e);let i,n,r;const o=[],a=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;for(let d=0;dMath.pow(2,32))throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return n[u+6]=m/4,m=h(m,R),n[u+7]=A,m}}}class Rt{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(e,t){let s=1/0,i=-1/0;for(let n=0,r=e.length;ni?o:i}this.min=s,this.max=i}setFromPoints(e,t){let s=1/0,i=-1/0;for(let n=0,r=t.length;ni?a:i}this.min=s,this.max=i}isSeparated(e){return this.min>e.max||e.min>this.max}}Rt.prototype.setFromBox=function(){const l=new U;return function(e,t){const s=t.min,i=t.max;let n=1/0,r=-1/0;for(let o=0;o<=1;o++)for(let a=0;a<=1;a++)for(let c=0;c<=1;c++){l.x=s.x*o+i.x*(1-o),l.y=s.y*a+i.y*(1-a),l.z=s.z*c+i.z*(1-c);const h=e.dot(l);n=Math.min(h,n),r=Math.max(h,r)}this.min=n,this.max=r}}();const Nl=function(){const l=new U,e=new U,t=new U;return function(s,i,n){const r=s.start,o=l,a=i.start,c=e;t.subVectors(r,a),l.subVectors(s.end,s.start),e.subVectors(i.end,i.start);const h=t.dot(c),d=c.dot(o),I=c.dot(c),u=t.dot(o),f=o.dot(o)*I-d*d;let E,T;f!==0?E=(h*d-u*I)/f:E=0,T=(h+E*d)/I,n.x=E,n.y=T}}(),qn=function(){const l=new He,e=new U,t=new U;return function(s,i,n,r){Nl(s,i,l);let o=l.x,a=l.y;if(o>=0&&o<=1&&a>=0&&a<=1){s.at(o,n),i.at(a,r);return}else if(o>=0&&o<=1){a<0?i.at(0,r):i.at(1,r),s.closestPointToPoint(r,!0,n);return}else if(a>=0&&a<=1){o<0?s.at(0,n):s.at(1,n),i.closestPointToPoint(n,!0,r);return}else{let c;o<0?c=s.start:c=s.end;let h;a<0?h=i.start:h=i.end;const d=e,I=t;if(s.closestPointToPoint(h,!0,e),i.closestPointToPoint(c,!0,t),d.distanceToSquared(h)<=I.distanceToSquared(c)){n.copy(d),r.copy(h);return}else{n.copy(c),r.copy(I);return}}}}(),Ll=function(){const l=new U,e=new U,t=new ds,s=new it;return function(i,n){const{radius:r,center:o}=i,{a,b:c,c:h}=n;if(s.start=a,s.end=c,s.closestPointToPoint(o,!0,l).distanceTo(o)<=r||(s.start=a,s.end=h,s.closestPointToPoint(o,!0,l).distanceTo(o)<=r)||(s.start=c,s.end=h,s.closestPointToPoint(o,!0,l).distanceTo(o)<=r))return!0;const d=n.getPlane(t);if(Math.abs(d.distanceToPoint(o))<=r){const I=d.projectPoint(o,e);if(n.containsPoint(I))return!0}return!1}}(),_l=1e-15;function Hi(l){return Math.abs(l)<_l}class nt extends rs{constructor(...e){super(...e),this.isExtendedTriangle=!0,this.satAxes=new Array(4).fill().map(()=>new U),this.satBounds=new Array(4).fill().map(()=>new Rt),this.points=[this.a,this.b,this.c],this.sphere=new wi,this.plane=new ds,this.needsUpdate=!0}intersectsSphere(e){return Ll(e,this)}update(){const e=this.a,t=this.b,s=this.c,i=this.points,n=this.satAxes,r=this.satBounds,o=n[0],a=r[0];this.getNormal(o),a.setFromPoints(o,i);const c=n[1],h=r[1];c.subVectors(e,t),h.setFromPoints(c,i);const d=n[2],I=r[2];d.subVectors(t,s),I.setFromPoints(d,i);const u=n[3],f=r[3];u.subVectors(s,e),f.setFromPoints(u,i),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(o,e),this.needsUpdate=!1}}nt.prototype.closestPointToSegment=function(){const l=new U,e=new U,t=new it;return function(s,i=null,n=null){const{start:r,end:o}=s,a=this.points;let c,h=1/0;for(let d=0;d<3;d++){const I=(d+1)%3;t.start.copy(a[d]),t.end.copy(a[I]),qn(t,s,l,e),c=l.distanceToSquared(e),c=2){(m===1?C.start:C.end).copy(u),A=2;break}if(A++,A===2&&m===-1)break}}return A}return function(E,T=null,C=!1){this.needsUpdate&&this.update(),E.isExtendedTriangle?E.needsUpdate&&E.update():(l.copy(E),l.update(),E=l);const R=this.plane,A=E.plane;if(Math.abs(R.normal.dot(A.normal))>1-1e-10){const m=this.satBounds,S=this.satAxes;t[0]=E.a,t[1]=E.b,t[2]=E.c;for(let P=0;P<4;P++){const _=m[P],M=S[P];if(s.setFromPoints(M,t),_.isSeparated(s))return!1}const N=E.satBounds,y=E.satAxes;e[0]=this.a,e[1]=this.b,e[2]=this.c;for(let P=0;P<4;P++){const _=N[P],M=y[P];if(s.setFromPoints(M,e),_.isSeparated(s))return!1}for(let P=0;P<4;P++){const _=S[P];for(let M=0;M<4;M++){const B=y[M];if(n.crossVectors(_,B),s.setFromPoints(n,e),i.setFromPoints(n,t),s.isSeparated(i))return!1}}return T&&(C||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),T.start.set(0,0,0),T.end.set(0,0,0)),!0}else{const m=f(this,A,d);if(m===1&&E.containsPoint(d.end))return T&&(T.start.copy(d.end),T.end.copy(d.end)),!0;if(m!==2)return!1;const S=f(E,R,I);if(S===1&&this.containsPoint(I.end))return T&&(T.start.copy(I.end),T.end.copy(I.end)),!0;if(S!==2)return!1;if(d.delta(o),I.delta(a),o.dot(a)<0){let O=I.start;I.start=I.end,I.end=O}const N=d.start.dot(o),y=d.end.dot(o),P=I.start.dot(o),_=I.end.dot(o),M=y