diff --git a/.gitignore b/.gitignore index 2cf9dd20..ee7af0fe 100644 --- a/.gitignore +++ b/.gitignore @@ -138,3 +138,4 @@ resources/bbbb.* resources/asdf2.frag resources/asdf2.json +resources/umdasch/ diff --git a/examples/AngleMeasurement/index.html b/examples/AngleMeasurement/index.html index 8fd3d8a4..99b2fac7 100644 --- a/examples/AngleMeasurement/index.html +++ b/examples/AngleMeasurement/index.html @@ -59,8 +59,8 @@ - - + + diff --git a/examples/AreaMeasurement/index.html b/examples/AreaMeasurement/index.html index d5bc9c5e..57b88851 100644 --- a/examples/AreaMeasurement/index.html +++ b/examples/AreaMeasurement/index.html @@ -60,8 +60,8 @@ - - + +
diff --git a/examples/BoundingBoxer/index.html b/examples/BoundingBoxer/index.html index e6b6b058..23fe39e7 100644 --- a/examples/BoundingBoxer/index.html +++ b/examples/BoundingBoxer/index.html @@ -61,7 +61,7 @@ - + diff --git a/examples/Civil3DNavigator/index.html b/examples/Civil3DNavigator/index.html index f7ee9b08..35f1f0d6 100644 --- a/examples/Civil3DNavigator/index.html +++ b/examples/Civil3DNavigator/index.html @@ -59,9 +59,9 @@ - + - + diff --git a/examples/CivilCrossSectionNavigator/index.html b/examples/CivilCrossSectionNavigator/index.html index a9e9025d..dd287739 100644 --- a/examples/CivilCrossSectionNavigator/index.html +++ b/examples/CivilCrossSectionNavigator/index.html @@ -77,10 +77,10 @@ - + - - + + diff --git a/examples/CivilElevationNavigator/index.html b/examples/CivilElevationNavigator/index.html index b4416668..dd15045d 100644 --- a/examples/CivilElevationNavigator/index.html +++ b/examples/CivilElevationNavigator/index.html @@ -78,10 +78,10 @@ - - + + - + diff --git a/examples/CivilPlanNavigator/index.html b/examples/CivilPlanNavigator/index.html index 67c9fd9c..53994457 100644 --- a/examples/CivilPlanNavigator/index.html +++ b/examples/CivilPlanNavigator/index.html @@ -67,10 +67,10 @@ - - + + - + diff --git a/examples/Classifier/index.html b/examples/Classifier/index.html index 0ab13e79..7b558a54 100644 --- a/examples/Classifier/index.html +++ b/examples/Classifier/index.html @@ -61,7 +61,7 @@ - + diff --git a/examples/ClipEdges/index.html b/examples/ClipEdges/index.html index 88053e9b..4427e55a 100644 --- a/examples/ClipEdges/index.html +++ b/examples/ClipEdges/index.html @@ -61,8 +61,8 @@ - - + + diff --git a/examples/Clipper/index.html b/examples/Clipper/index.html index 68355d4f..34b91653 100644 --- a/examples/Clipper/index.html +++ b/examples/Clipper/index.html @@ -61,7 +61,7 @@ - + diff --git a/examples/Cullers/index.html b/examples/Cullers/index.html index d69dbded..3c409dfd 100644 --- a/examples/Cullers/index.html +++ b/examples/Cullers/index.html @@ -60,7 +60,7 @@ - + diff --git a/examples/EdgeMeasurement/index.html b/examples/EdgeMeasurement/index.html index 7a1bf471..51572a9c 100644 --- a/examples/EdgeMeasurement/index.html +++ b/examples/EdgeMeasurement/index.html @@ -60,8 +60,8 @@ - - + + diff --git a/examples/Exploder/index.html b/examples/Exploder/index.html index 4fa9810b..b7e386f7 100644 --- a/examples/Exploder/index.html +++ b/examples/Exploder/index.html @@ -61,7 +61,7 @@ - + diff --git a/examples/FaceMeasurement/index.html b/examples/FaceMeasurement/index.html index 997dda85..faf3ebf9 100644 --- a/examples/FaceMeasurement/index.html +++ b/examples/FaceMeasurement/index.html @@ -60,8 +60,8 @@ - - + + diff --git a/examples/FragmentsManager/index.html b/examples/FragmentsManager/index.html index d0ee41f2..c13792b1 100644 --- a/examples/FragmentsManager/index.html +++ b/examples/FragmentsManager/index.html @@ -60,7 +60,7 @@ - + diff --git a/examples/Grids/index.html b/examples/Grids/index.html index bca48600..2e327ad6 100644 --- a/examples/Grids/index.html +++ b/examples/Grids/index.html @@ -65,7 +65,7 @@ - + diff --git a/examples/Hider/index.html b/examples/Hider/index.html index 3524dd73..56dce43c 100644 --- a/examples/Hider/index.html +++ b/examples/Hider/index.html @@ -61,7 +61,7 @@ - + diff --git a/examples/Highlighter/index.html b/examples/Highlighter/index.html index e0757c66..854fe992 100644 --- a/examples/Highlighter/index.html +++ b/examples/Highlighter/index.html @@ -59,8 +59,8 @@ - - + + diff --git a/examples/IfcGeometryTiler/index.html b/examples/IfcGeometryTiler/index.html index ed768ee8..dba8b905 100644 --- a/examples/IfcGeometryTiler/index.html +++ b/examples/IfcGeometryTiler/index.html @@ -61,7 +61,7 @@ - + diff --git a/examples/IfcJsonExporter/index.html b/examples/IfcJsonExporter/index.html index c870c635..ff1ed11f 100644 --- a/examples/IfcJsonExporter/index.html +++ b/examples/IfcJsonExporter/index.html @@ -61,7 +61,7 @@ - + diff --git a/examples/IfcLoader/index.html b/examples/IfcLoader/index.html index 93d44cdc..6f9136c7 100644 --- a/examples/IfcLoader/index.html +++ b/examples/IfcLoader/index.html @@ -61,7 +61,7 @@ - + diff --git a/examples/IfcPropertiesTiler/index.html b/examples/IfcPropertiesTiler/index.html index 3999a326..5a83dc15 100644 --- a/examples/IfcPropertiesTiler/index.html +++ b/examples/IfcPropertiesTiler/index.html @@ -61,7 +61,7 @@ - + diff --git a/examples/IfcRelationsIndexer/index.html b/examples/IfcRelationsIndexer/index.html index d5dc87f1..dca1f77f 100644 --- a/examples/IfcRelationsIndexer/index.html +++ b/examples/IfcRelationsIndexer/index.html @@ -61,7 +61,7 @@ - + diff --git a/examples/IfcStreamer/index.html b/examples/IfcStreamer/index.html index bebf3ee1..8050046b 100644 --- a/examples/IfcStreamer/index.html +++ b/examples/IfcStreamer/index.html @@ -60,8 +60,8 @@ - - + + diff --git a/examples/LengthMeasurement/index.html b/examples/LengthMeasurement/index.html index 61155894..f9846c74 100644 --- a/examples/LengthMeasurement/index.html +++ b/examples/LengthMeasurement/index.html @@ -60,9 +60,9 @@ - + - + diff --git a/examples/Marker/index.html b/examples/Marker/index.html index be90b8fd..2a43fc95 100644 --- a/examples/Marker/index.html +++ b/examples/Marker/index.html @@ -59,8 +59,8 @@ - - + + diff --git a/examples/MeasurementUtils/index.html b/examples/MeasurementUtils/index.html index 067b8cae..568ed100 100644 --- a/examples/MeasurementUtils/index.html +++ b/examples/MeasurementUtils/index.html @@ -60,7 +60,7 @@ - + diff --git a/examples/MiniMap/index.html b/examples/MiniMap/index.html index 1785cec7..7bfe93b8 100644 --- a/examples/MiniMap/index.html +++ b/examples/MiniMap/index.html @@ -67,7 +67,7 @@ - + diff --git a/examples/OrthoPerspectiveCamera/index.html b/examples/OrthoPerspectiveCamera/index.html index 2def0a91..01502390 100644 --- a/examples/OrthoPerspectiveCamera/index.html +++ b/examples/OrthoPerspectiveCamera/index.html @@ -61,7 +61,7 @@ - + diff --git a/examples/Plans/index.html b/examples/Plans/index.html index 83bc45ee..b7031108 100644 --- a/examples/Plans/index.html +++ b/examples/Plans/index.html @@ -59,8 +59,8 @@ - - + + diff --git a/examples/PostproductionRenderer/index.html b/examples/PostproductionRenderer/index.html index f3918ff1..759adb8d 100644 --- a/examples/PostproductionRenderer/index.html +++ b/examples/PostproductionRenderer/index.html @@ -61,8 +61,8 @@ - - + + diff --git a/examples/Raycasters/index.html b/examples/Raycasters/index.html index 9b8a0be8..0f42302d 100644 --- a/examples/Raycasters/index.html +++ b/examples/Raycasters/index.html @@ -60,7 +60,7 @@ - + diff --git a/examples/ShadowDropper/index.html b/examples/ShadowDropper/index.html index dedd1c68..88df9425 100644 --- a/examples/ShadowDropper/index.html +++ b/examples/ShadowDropper/index.html @@ -59,10 +59,10 @@ - + - + diff --git a/examples/VolumeMeasurement/index.html b/examples/VolumeMeasurement/index.html index 5d333381..52261b33 100644 --- a/examples/VolumeMeasurement/index.html +++ b/examples/VolumeMeasurement/index.html @@ -60,8 +60,8 @@ - - + + diff --git a/examples/Worlds/index.html b/examples/Worlds/index.html index 73a46dc0..448ebbf4 100644 --- a/examples/Worlds/index.html +++ b/examples/Worlds/index.html @@ -60,7 +60,7 @@ - + diff --git a/examples/assets/angleMeasurement.js b/examples/assets/angleMeasurement.js index 8390cf44..f5319097 100644 --- a/examples/assets/angleMeasurement.js +++ b/examples/assets/angleMeasurement.js @@ -1 +1 @@ -import{B as d,M as c,a as l}from"./web-ifc-api-CfQNUy7g.js";import{p as i,C as m,i as p,W as w,d as u}from"./index-D2xchnNe.js";import{S as y,y as b}from"./index-Bpjba_Wq.js";import{S as f}from"./stats.min-BpIepu9J.js";const r=document.getElementById("container"),n=new i,g=n.get(m),e=g.create();e.scene=new p(n);e.renderer=new y(n,r);e.camera=new w(n);n.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const h=n.get(u);h.create(e);e.scene.three.background=null;const k=new d(3,3,3),B=new c({color:"#6528D7"}),s=new l(k,B);s.position.set(0,1.5,0);e.scene.three.add(s);e.meshes.add(s);const o=n.get(b);o.world=e;o.enabled=!0;r.ondblclick=()=>o.create();window.onkeydown=a=>{(a.code==="Delete"||a.code==="Backspace")&&o.deleteAll()};const t=new f;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-CfQNUy7g.js";import{p as i,C as m,i as p,W as w,d as u}from"./index-CrrO1BJs.js";import{S as y,y as b}from"./index-BREiuDZQ.js";import{S as f}from"./stats.min-BpIepu9J.js";const r=document.getElementById("container"),n=new i,g=n.get(m),e=g.create();e.scene=new p(n);e.renderer=new y(n,r);e.camera=new w(n);n.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const h=n.get(u);h.create(e);e.scene.three.background=null;const k=new d(3,3,3),B=new c({color:"#6528D7"}),s=new l(k,B);s.position.set(0,1.5,0);e.scene.three.add(s);e.meshes.add(s);const o=n.get(b);o.world=e;o.enabled=!0;r.ondblclick=()=>o.create();window.onkeydown=a=>{(a.code==="Delete"||a.code==="Backspace")&&o.deleteAll()};const t=new f;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()); diff --git a/examples/assets/areaMeasurement.js b/examples/assets/areaMeasurement.js index 611cccbd..96303413 100644 --- a/examples/assets/areaMeasurement.js +++ b/examples/assets/areaMeasurement.js @@ -1 +1 @@ -import{B as d,M as c,a as i}from"./web-ifc-api-CfQNUy7g.js";import{S as m}from"./stats.min-BpIepu9J.js";import{p as l,C as p,i as w,W as u,d as b}from"./index-D2xchnNe.js";import{S as f,I as g}from"./index-Bpjba_Wq.js";const a=document.getElementById("container"),n=new l,y=n.get(p),e=y.create();e.scene=new w(n);e.renderer=new f(n,a);e.camera=new u(n);n.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const h=n.get(b);h.create(e);e.scene.three.background=null;const k=new d(3,3,3),B=new c({color:"#6528D7"}),s=new i(k,B);s.position.set(0,1.5,0);e.scene.three.add(s);e.meshes.add(s);const o=n.get(g);o.world=e;o.enabled=!0;a.ondblclick=()=>o.create();a.oncontextmenu=()=>o.endCreation();window.onkeydown=r=>{(r.code==="Delete"||r.code==="Backspace")&&o.deleteAll()};const t=new m;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 i}from"./web-ifc-api-CfQNUy7g.js";import{S as m}from"./stats.min-BpIepu9J.js";import{p as l,C as p,i as w,W as u,d as b}from"./index-CrrO1BJs.js";import{S as f,I as g}from"./index-BREiuDZQ.js";const a=document.getElementById("container"),n=new l,y=n.get(p),e=y.create();e.scene=new w(n);e.renderer=new f(n,a);e.camera=new u(n);n.init();e.camera.controls.setLookAt(5,5,5,0,0,0);e.scene.setup();const h=n.get(b);h.create(e);e.scene.three.background=null;const k=new d(3,3,3),B=new c({color:"#6528D7"}),s=new i(k,B);s.position.set(0,1.5,0);e.scene.three.add(s);e.meshes.add(s);const o=n.get(g);o.world=e;o.enabled=!0;a.ondblclick=()=>o.create();a.oncontextmenu=()=>o.endCreation();window.onkeydown=r=>{(r.code==="Delete"||r.code==="Backspace")&&o.deleteAll()};const t=new m;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()); diff --git a/examples/assets/boundingBoxer.js b/examples/assets/boundingBoxer.js index bd0d68a3..927317d2 100644 --- a/examples/assets/boundingBoxer.js +++ b/examples/assets/boundingBoxer.js @@ -1,4 +1,4 @@ -import"./web-ifc-api-CfQNUy7g.js";import{S as c}from"./stats.min-BpIepu9J.js";import{m as l,t as a,a as i}from"./index-tywNknxv.js";import{p as d,C as m,i as p,n as b,W as u,d as g,h as f,F as h}from"./index-D2xchnNe.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 B=t.get(g);B.create(e);e.scene.three.background=null;const v=t.get(f),x=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),k=await x.arrayBuffer(),L=new Uint8Array(k),r=v.load(L);e.scene.three.add(r);const s=t.get(h);s.add(r);const A=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(()=>i` +import"./web-ifc-api-CfQNUy7g.js";import{S as c}from"./stats.min-BpIepu9J.js";import{m as l,t as a,a as i}from"./index-tywNknxv.js";import{p as d,C as m,i as p,n as b,W as u,d as g,h as f,F as h}from"./index-CrrO1BJs.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 B=t.get(g);B.create(e);e.scene.three.background=null;const v=t.get(f),x=await fetch("https://thatopen.github.io/engine_components/resources/small.frag"),k=await x.arrayBuffer(),L=new Uint8Array(k),r=v.load(L);e.scene.three.add(r);const s=t.get(h);s.add(r);const A=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(()=>i`_&&(_=U)}return a[l+0]!==R||a[l+1]!==A||a[l+2]!==p||a[l+3]!==F||a[l+4]!==g||a[l+5]!==_?(a[l+0]=R,a[l+1]=A,a[l+2]=p,a[l+3]=F,a[l+4]=g,a[l+5]=_,!0):!1}else{const m=l+8,f=o[l+6],R=m+u,A=f+u;let p=C,F=!1,g=!1;t?p||(F=t.has(R),g=t.has(A),p=!F&&!g):(F=!0,g=!0);const _=p||F,S=p||g;let w=!1;_&&(w=E(m,u,p));let y=!1;S&&(y=E(f,u,p));const L=w||y;if(L)for(let P=0;P<3;P++){const U=m+P,x=f+P,Y=a[U],z=a[U+3],tt=a[x],W=a[x+3];a[l+P]=YW?z:W}return L}}}const Qi=new st;function Yt(c,t,e,s){return j(c,t,Qi),e.intersectBox(Qi,s)}function xr(c,t,e,s,i,n){const{geometry:o,_indirectBuffer:r}=c;for(let a=s,h=s+i;a _&&(_=Y)}}return a[l+0]!==R||a[l+1]!==A||a[l+2]!==p||a[l+3]!==F||a[l+4]!==g||a[l+5]!==_?(a[l+0]=R,a[l+1]=A,a[l+2]=p,a[l+3]=F,a[l+4]=g,a[l+5]=_,!0):!1}else{const m=l+8,f=o[l+6],R=m+u,A=f+u;let p=C,F=!1,g=!1;t?p||(F=t.has(R),g=t.has(A),p=!F&&!g):(F=!0,g=!0);const _=p||F,S=p||g;let w=!1;_&&(w=E(m,u,p));let y=!1;S&&(y=E(f,u,p));const L=w||y;if(L)for(let P=0;P<3;P++){const U=m+P,x=f+P,Y=a[U],z=a[U+3],tt=a[x],W=a[x+3];a[l+P]=YW?z:W}return L}}}const $i=new O;function Qr(c,t,e,s,i){Z.setBuffer(c._roots[t]),ni(0,c,e,s,i),Z.clearBuffer()}function ni(c,t,e,s,i){const{float32Array:n,uint16Array:o,uint32Array:r}=Z,a=c*2;if(ct(a,o)){const h=lt(c,r),d=It(a,o);xr(t,e,s,h,d,i)}else{const h=pt(c);Yt(h,n,s,$i)&&ni(h,t,e,s,i);const d=Ct(c,r);Yt(d,n,s,$i)&&ni(d,t,e,s,i)}}const Ji=new O,jr=["x","y","z"];function qr(c,t,e,s){Z.setBuffer(c._roots[t]);const i=oi(0,c,e,s);return Z.clearBuffer(),i}function oi(c,t,e,s){const{float32Array:i,uint16Array:n,uint32Array:o}=Z;let r=c*2;if(ct(r,n)){const a=lt(c,o),h=It(r,n);return br(t,e,s,a,h)}else{const a=Bn(c,o),h=jr[a],d=s.direction[h]>=0;let E,l;d?(E=pt(c),l=Ct(c,o)):(E=Ct(c,o),l=pt(c));const u=Yt(E,i,s,Ji)?oi(E,t,e,s):null;if(u){const T=u.point[h];if(d?T<=i[l+a]:T>=i[l+a+3])return u}const C=Yt(l,i,s,Ji)?oi(l,t,e,s):null;return u&&C?u.distance<=C.distance?u:C:u||C||null}}const os=new st,oe=new gt,re=new gt,we=new H,tn=new at,rs=new at;function Kr(c,t,e,s){Z.setBuffer(c._roots[t]);const i=ri(0,c,e,s);return Z.clearBuffer(),i}function ri(c,t,e,s,i=null){const{float32Array:n,uint16Array:o,uint32Array:r}=Z;let a=c*2;if(i===null&&(e.boundingBox||e.computeBoundingBox(),tn.set(e.boundingBox.min,e.boundingBox.max,s),i=tn),ct(a,o)){const h=t.geometry,d=h.index,E=h.attributes.position,l=e.index,u=e.attributes.position,C=lt(c,r),T=It(a,o);if(we.copy(s).invert(),e.boundsTree)return j(c,n,rs),rs.matrix.copy(we),rs.needsUpdate=!0,e.boundsTree.shapecast({intersectsBounds:m=>rs.intersectsBox(m),intersectsTriangle:m=>{m.a.applyMatrix4(s),m.b.applyMatrix4(s),m.c.applyMatrix4(s),m.needsUpdate=!0;for(let f=C,R=T+C;fhs.intersectsBox(s),intersectsTriangle:s=>hs.intersectsTriangle(s)})}intersectsSphere(t){return this.shapecast({intersectsBounds:e=>t.intersectsBox(e),intersectsTriangle:e=>e.intersectsSphere(t)})}closestPointToGeometry(t,e,s={},i={},n=0,o=1/0){return(this.indirect?sa:kr)(this,t,e,s,i,n,o)}closestPointToPoint(t,e={},s=0,i=1/0){return wr(this,t,e,s,i)}getBoundingBox(t){return t.makeEmpty(),this._roots.forEach(e=>{j(0,new Float32Array(e),en),t.union(en)}),t}}function sn(c,t,e){return c===null||(c.point.applyMatrix4(t.matrixWorld),c.distance=c.point.distanceTo(e.ray.origin),c.object=t,c.distancethis.tolerance)return!1;return!0}intersectRay(t,e){const s=this.faces;let i=-1/0,n=1/0;for(let o=0,r=s.length;o0?m.start.copy(E.start):m.start.copy(l.start),h.subVectors(E.end,l.end),h.dot(r)<0?m.end.copy(E.end):m.end.copy(l.end)),!0)}}}();gt.prototype.distanceToPoint=function(){const c=new O;return function(t){return this.closestPointToPoint(t,c),t.distanceTo(c)}}();gt.prototype.distanceToTriangle=function(){const c=new O,t=new O,e=["a","b","c"],s=new Ft,i=new Ft;return function(n,o=null,r=null){const a=o||r?s:null;if(this.intersectsTriangle(n,a))return(o||r)&&(o&&a.getCenter(o),r&&a.getCenter(r)),0;let h=1/0;for(let d=0;d<3;d++){let E;const l=e[d],u=n[l];this.closestPointToPoint(u,c),E=u.distanceToSquared(c),E