diff --git a/.eslintrc.js b/.eslintrc.cjs similarity index 98% rename from .eslintrc.js rename to .eslintrc.cjs index d0e069848..942006d09 100644 --- a/.eslintrc.js +++ b/.eslintrc.cjs @@ -41,7 +41,6 @@ module.exports = { "error", "ignorePackages", { - js: "never", ts: "never", }, ], diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index f673a71b7..000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "liveServer.settings.port": 5502 -} \ No newline at end of file diff --git a/README.md b/README.md index f78a669e4..aec03361c 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,14 @@ | documentation | - demo + demo | community | - npm package + npm package
-![cover](resources/cover.png) +![cover](https://thatopen.github.io/engine_components/resources/cover.png)S.x||u.x===S.x&&aa(S,u)))&&(S=u,q=H)),u=u.next;while(u!==O);return S}function aa(c,l){return ne(c.prev,c,l.prev)<0&&ne(l.next,c,c.next)<0}function oa(c,l,u,y){var E=c;do E.z===0&&(E.z=_n(E.x,E.y,l,u,y)),E.prevZ=E.prev,E.nextZ=E.next,E=E.next;while(E!==c);E.prevZ.nextZ=null,E.prevZ=null,sa(E)}function sa(c){var l,u,y,E,k,S,C,O,z=1;do{for(u=c,c=null,k=null,S=0;u;){for(S++,y=u,C=0,l=0;l0||O>0&&y;)C!==0&&(O===0||!y||u.z<=y.z)?(E=u,u=u.nextZ,C--):(E=y,y=y.nextZ,O--),k?k.nextZ=E:c=E,E.prevZ=k,k=E;u=y}k.nextZ=null,z*=2}while(S>1);return c}function _n(c,l,u,y,E){return c=(c-u)*E|0,l=(l-y)*E|0,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,l=(l|l<<8)&16711935,l=(l|l<<4)&252645135,l=(l|l<<2)&858993459,l=(l|l<<1)&1431655765,c|l<<1}function ua(c){var l=c,u=c;do(l.x =(c-S)*(k-C)&&(c-S)*(y-C)>=(u-S)*(l-C)&&(u-S)*(k-C)>=(E-S)*(y-C)}function la(c,l){return c.next.i!==l.i&&c.prev.i!==l.i&&!ca(c,l)&&(kt(c,l)&&kt(l,c)&&fa(c,l)&&(ne(c.prev,c,l.prev)||ne(c,l.prev,l))||un(c,l)&&ne(c.prev,c,c.next)>0&&ne(l.prev,l,l.next)>0)}function ne(c,l,u){return(l.y-c.y)*(u.x-l.x)-(l.x-c.x)*(u.y-l.y)}function un(c,l){return c.x===l.x&&c.y===l.y}function ei(c,l,u,y){var E=an(ne(c,l,u)),k=an(ne(c,l,y)),S=an(ne(u,y,c)),C=an(ne(u,y,l));return!!(E!==k&&S!==C||E===0&&rn(c,u,l)||k===0&&rn(c,y,l)||S===0&&rn(u,c,y)||C===0&&rn(u,l,y))}function rn(c,l,u){return l.x<=Math.max(c.x,u.x)&&l.x>=Math.min(c.x,u.x)&&l.y<=Math.max(c.y,u.y)&&l.y>=Math.min(c.y,u.y)}function an(c){return c>0?1:c<0?-1:0}function ca(c,l){var u=c;do{if(u.i!==c.i&&u.next.i!==c.i&&u.i!==l.i&&u.next.i!==l.i&&ei(u,u.next,c,l))return!0;u=u.next}while(u!==c);return!1}function kt(c,l){return ne(c.prev,c,c.next)<0?ne(c,l,c.next)>=0&&ne(c,c.prev,l)>=0:ne(c,l,c.prev)<0||ne(c,c.next,l)<0}function fa(c,l){var u=c,y=!1,E=(c.x+l.x)/2,k=(c.y+l.y)/2;do u.y>k!=u.next.y>k&&u.next.y!==u.y&&E<(u.next.x-u.x)*(k-u.y)/(u.next.y-u.y)+u.x&&(y=!y),u=u.next;while(u!==c);return y}function ti(c,l){var u=new $n(c.i,c.x,c.y),y=new $n(l.i,l.x,l.y),E=c.next,k=l.prev;return c.next=l,l.prev=c,u.next=E,E.prev=u,y.next=u,u.prev=y,k.next=y,y.prev=k,y}function Zr(c,l,u,y){var E=new $n(c,l,u);return y?(E.next=y.next,E.prev=y,y.next.prev=E,y.next=E):(E.prev=E,E.next=E),E}function Tt(c){c.next.prev=c.prev,c.prev.next=c.next,c.prevZ&&(c.prevZ.nextZ=c.nextZ),c.nextZ&&(c.nextZ.prevZ=c.prevZ)}function $n(c,l,u){this.i=c,this.x=l,this.y=u,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}sn.deviation=function(c,l,u,y){var E=l&&l.length,k=E?l[0]*u:c.length,S=Math.abs(er(c,0,k,u));if(E)for(var C=0,O=l.length;C 0&&(y+=c[E-1].length,u.holes.push(y))}return u};var ha=nr.exports;const Ta=Wr(ha);class pa{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const da=new Gr(-1,1,1,-1,0,1);class va extends Jr{constructor(){super(),this.setAttribute("position",new Qr([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new Qr([0,2,0,0,2,0],2))}}const ma=new va;class Ea{constructor(l){this._mesh=new Xr(ma,l)}dispose(){this._mesh.geometry.dispose()}render(l){l.render(this._mesh,da)}get material(){return this._mesh.material}set material(l){this._mesh.material=l}}const Et=new Jr;Et.setAttribute("position",new _r(new Float32Array([-1,-1,3,-1,-1,3]),2));Et.setAttribute("uv",new _r(new Float32Array([0,0,2,0,0,2]),2));Et.boundingSphere=new Ni;Et.computeBoundingSphere=function(){};const ya=new Gr;class on{constructor(l){this._mesh=new Xr(Et,l),this._mesh.frustumCulled=!1}render(l){l.render(this._mesh,ya)}get material(){return this._mesh.material}set material(l){this._mesh.material=l}dispose(){this._mesh.material.dispose(),this._mesh.geometry.dispose()}}const ga={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},sceneNormal:{value:null},projMat:{value:new he},viewMat:{value:new he},projViewMat:{value:new he},projectionMatrixInv:{value:new he},viewMatrixInv:{value:new he},cameraPos:{value:new St},resolution:{value:new ot},time:{value:0},samples:{value:[]},samplesR:{value:[]},bluenoise:{value:null},distanceFalloff:{value:1},radius:{value:5},near:{value:.1},far:{value:1e3},logDepth:{value:!1},ortho:{value:!1},screenSpaceRadius:{value:!1}},vertexShader:` +varying vec2 vUv; +void main() { + vUv = uv; + gl_Position = vec4(position, 1); +}`,fragmentShader:` + #define SAMPLES 16 + #define FSAMPLES 16.0 +uniform sampler2D sceneDiffuse; +uniform sampler2D sceneNormal; +uniform highp sampler2D sceneDepth; +uniform mat4 projectionMatrixInv; +uniform mat4 viewMatrixInv; +uniform mat4 projMat; +uniform mat4 viewMat; +uniform mat4 projViewMat; +uniform vec3 cameraPos; +uniform vec2 resolution; +uniform float time; +uniform vec3[SAMPLES] samples; +uniform float[SAMPLES] samplesR; +uniform float radius; +uniform float distanceFalloff; +uniform float near; +uniform float far; +uniform bool logDepth; +uniform bool ortho; +uniform bool screenSpaceRadius; +uniform sampler2D bluenoise; + varying vec2 vUv; + highp float linearize_depth(highp float d, highp float zNear,highp float zFar) + { + return (zFar * zNear) / (zFar - d * (zFar - zNear)); + } + highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) { + return nearZ + (farZ - nearZ) * d; + } + highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) { + float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0; + float a = farZ / (farZ - nearZ); + float b = farZ * nearZ / (nearZ - farZ); + float linDepth = a + b / depth; + return ortho ? linearize_depth_ortho( + linDepth, + nearZ, + farZ + ) :linearize_depth(linDepth, nearZ, farZ); + } + + vec3 getWorldPosLog(vec3 posS) { + vec2 uv = posS.xy; + float z = posS.z; + float nearZ =near; + float farZ = far; + float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0; + float a = farZ / (farZ - nearZ); + float b = farZ * nearZ / (nearZ - farZ); + float linDepth = a + b / depth; + vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0; + vec4 wpos = viewMatrixInv * projectionMatrixInv * clipVec; + return wpos.xyz / wpos.w; + } + vec3 getWorldPos(float depth, vec2 coord) { + #ifdef LOGDEPTH + return getWorldPosLog(vec3(coord, depth)); + #endif + float z = depth * 2.0 - 1.0; + vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0); + vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition; + // Perspective division + vec4 worldSpacePosition = viewMatrixInv * viewSpacePosition; + worldSpacePosition.xyz /= worldSpacePosition.w; + return worldSpacePosition.xyz; + } + + vec3 computeNormal(vec3 worldPos, vec2 vUv) { + ivec2 p = ivec2(vUv * resolution); + float c0 = texelFetch(sceneDepth, p, 0).x; + float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x; + float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x; + float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x; + float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x; + float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x; + float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x; + float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x; + float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x; + + float dl = abs((2.0 * l1 - l2) - c0); + float dr = abs((2.0 * r1 - r2) - c0); + float db = abs((2.0 * b1 - b2) - c0); + float dt = abs((2.0 * t1 - t2) - c0); + + vec3 ce = getWorldPos(c0, vUv).xyz; + + vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz + : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz; + vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz + : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz; + + return normalize(cross(dpdx, dpdy)); +} + +void main() { + vec4 diffuse = texture2D(sceneDiffuse, vUv); + float depth = texture2D(sceneDepth, vUv).x; + if (depth == 1.0) { + gl_FragColor = vec4(vec3(1.0), 1.0); + return; + } + vec3 worldPos = getWorldPos(depth, vUv); + // vec3 normal = texture2D(sceneNormal, vUv).rgb;//computeNormal(worldPos, vUv); + #ifdef HALFRES + vec3 normal = texture2D(sceneNormal, vUv).rgb; + #else + vec3 normal = computeNormal(worldPos, vUv); + #endif + vec4 noise = texture2D(bluenoise, gl_FragCoord.xy / 128.0); + vec3 randomVec = normalize(noise.rgb * 2.0 - 1.0); + vec3 tangent = normalize(randomVec - normal * dot(randomVec, normal)); + vec3 bitangent = cross(normal, tangent); + mat3 tbn = mat3(tangent, bitangent, normal); + float occluded = 0.0; + float totalWeight = 0.0; + /* float radiusScreen = distance( + worldPos, + getWorldPos(depth, vUv + + vec2(48.0, 0.0) / resolution) + );/*vUv.x < 0.5 ? radius : min(distance( + worldPos, + getWorldPos(depth, vUv + + vec2(100.0, 0.0) / resolution) + ), radius); + float distanceFalloffScreen = radiusScreen * 0.2;*/ + float radiusToUse = screenSpaceRadius ? distance( + worldPos, + getWorldPos(depth, vUv + + vec2(radius, 0.0) / resolution) + ) : radius; + float distanceFalloffToUse =screenSpaceRadius ? + radiusToUse * distanceFalloff + : distanceFalloff; + float bias = (0.1 / near) * fwidth(distance(worldPos, cameraPos)) / radiusToUse; + for(float i = 0.0; i < FSAMPLES; i++) { + vec3 sampleDirection = + tbn * + samples[int(i)]; + ; + float moveAmt = samplesR[int(mod(i + noise.a * FSAMPLES, FSAMPLES))]; + vec3 samplePos = worldPos + radiusToUse * moveAmt * sampleDirection; + vec4 offset = projViewMat * vec4(samplePos, 1.0); + offset.xyz /= offset.w; + offset.xyz = offset.xyz * 0.5 + 0.5; + float sampleDepth = textureLod(sceneDepth, offset.xy, 0.0).x; + /*float distSample = logDepth ? linearize_depth_log(sampleDepth, near, far) + (ortho ? linearize_depth_ortho(sampleDepth, near, far) : linearize_depth(sampleDepth, near, far));*/ + #ifdef LOGDEPTH + float distSample = linearize_depth_log(sampleDepth, near, far); + #else + float distSample = ortho ? linearize_depth_ortho(sampleDepth, near, far) : linearize_depth(sampleDepth, near, far); + #endif + float distWorld = ortho ? linearize_depth_ortho(offset.z, near, far) : linearize_depth(offset.z, near, far); + float rangeCheck = smoothstep(0.0, 1.0, distanceFalloffToUse / (abs(distSample - distWorld))); + vec2 diff = gl_FragCoord.xy - ( offset.xy * resolution); + float weight = dot(sampleDirection, normal); + occluded += rangeCheck * weight * + (distSample + bias + < distWorld ? 1.0 : 0.0) * ( + (dot( + diff, + diff + + ) < 1.0 || (sampleDepth == depth) || ( + offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0 + ) ? 0.0 : 1.0) + ); + totalWeight += weight; + } + float occ = clamp(1.0 - occluded / totalWeight, 0.0, 1.0); + gl_FragColor = vec4(0.5 + 0.5 * normal, occ); +}`},ba={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},projMat:{value:new he},viewMat:{value:new he},projectionMatrixInv:{value:new he},viewMatrixInv:{value:new he},cameraPos:{value:new St},resolution:{value:new ot},color:{value:new St(0,0,0)},blueNoise:{value:null},downsampledDepth:{value:null},time:{value:0},intensity:{value:10},renderMode:{value:0},gammaCorrection:{value:!1},logDepth:{value:!1},ortho:{value:!1},near:{value:.1},far:{value:1e3},screenSpaceRadius:{value:!1},radius:{value:0},distanceFalloff:{value:1}},vertexShader:` + varying vec2 vUv; + void main() { + vUv = uv; + gl_Position = vec4(position, 1); + }`,fragmentShader:` + uniform sampler2D sceneDiffuse; + uniform sampler2D sceneDepth; + uniform sampler2D downsampledDepth; + uniform sampler2D tDiffuse; + uniform sampler2D blueNoise; + uniform vec2 resolution; + uniform vec3 color; + uniform mat4 projectionMatrixInv; + uniform mat4 viewMatrixInv; + uniform float intensity; + uniform float renderMode; + uniform float near; + uniform float far; + uniform bool gammaCorrection; + uniform bool logDepth; + uniform bool ortho; + uniform bool screenSpaceRadius; + uniform float radius; + uniform float distanceFalloff; + varying vec2 vUv; + highp float linearize_depth(highp float d, highp float zNear,highp float zFar) + { + return (zFar * zNear) / (zFar - d * (zFar - zNear)); + } + highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) { + return nearZ + (farZ - nearZ) * d; + } + highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) { + float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0; + float a = farZ / (farZ - nearZ); + float b = farZ * nearZ / (nearZ - farZ); + float linDepth = a + b / depth; + return ortho ? linearize_depth_ortho( + linDepth, + nearZ, + farZ + ) :linearize_depth(linDepth, nearZ, farZ); + } + vec3 getWorldPosLog(vec3 posS) { + vec2 uv = posS.xy; + float z = posS.z; + float nearZ =near; + float farZ = far; + float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0; + float a = farZ / (farZ - nearZ); + float b = farZ * nearZ / (nearZ - farZ); + float linDepth = a + b / depth; + vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0; + vec4 wpos = viewMatrixInv * projectionMatrixInv * clipVec; + return wpos.xyz / wpos.w; + } + vec3 getWorldPos(float depth, vec2 coord) { + // if (logDepth) { + #ifdef LOGDEPTH + return getWorldPosLog(vec3(coord, depth)); + #endif + // } + float z = depth * 2.0 - 1.0; + vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0); + vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition; + // Perspective division + vec4 worldSpacePosition = viewMatrixInv * viewSpacePosition; + worldSpacePosition.xyz /= worldSpacePosition.w; + return worldSpacePosition.xyz; + } + + vec3 computeNormal(vec3 worldPos, vec2 vUv) { + ivec2 p = ivec2(vUv * resolution); + float c0 = texelFetch(sceneDepth, p, 0).x; + float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x; + float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x; + float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x; + float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x; + float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x; + float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x; + float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x; + float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x; + + float dl = abs((2.0 * l1 - l2) - c0); + float dr = abs((2.0 * r1 - r2) - c0); + float db = abs((2.0 * b1 - b2) - c0); + float dt = abs((2.0 * t1 - t2) - c0); + + vec3 ce = getWorldPos(c0, vUv).xyz; + + vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz + : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz; + vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz + : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz; + + return normalize(cross(dpdx, dpdy)); + } + + #include + #include + void main() { + //vec4 texel = texture2D(tDiffuse, vUv);//vec3(0.0); + vec4 sceneTexel = texture2D(sceneDiffuse, vUv); + + #ifdef HALFRES + float depth = texture2D( + sceneDepth, + vUv + ).x; + vec4 texel; + if (depth == 1.0) { + texel = vec4(0.0, 0.0, 0.0, 1.0); + } else { + vec3 worldPos = getWorldPos(depth, vUv); + vec3 normal = computeNormal(getWorldPos(depth, vUv), vUv); + // vec4 texel = texture2D(tDiffuse, vUv); + // Find closest depth; + float totalWeight = 0.0; + float radiusToUse = screenSpaceRadius ? distance( + worldPos, + getWorldPos(depth, vUv + + vec2(radius, 0.0) / resolution) + ) : radius; + float distanceFalloffToUse =screenSpaceRadius ? + radiusToUse * distanceFalloff + : distanceFalloff; + for(float x = -1.0; x <= 1.0; x++) { + for(float y = -1.0; y <= 1.0; y++) { + vec2 offset = vec2(x, y); + ivec2 p = ivec2( + (vUv * resolution * 0.5) + offset + ); + vec2 pUv = vec2(p) / (resolution * 0.5); + float sampleDepth = texelFetch(downsampledDepth,p, 0).x; + vec4 sampleInfo = texelFetch(tDiffuse, p, 0); + vec3 normalSample = sampleInfo.xyz * 2.0 - 1.0; + vec3 worldPosSample = getWorldPos(sampleDepth, pUv); + float tangentPlaneDist = abs(dot(worldPos - worldPosSample, normal)); + float rangeCheck = exp(-1.0 * tangentPlaneDist * (1.0 / distanceFalloffToUse)) * max(dot(normal, normalSample), 0.0); + float weight = rangeCheck; + totalWeight += weight; + texel += sampleInfo * weight; + } + } + if (totalWeight == 0.0) { + texel = texture2D(tDiffuse, vUv); + } else { + texel /= totalWeight; + } + } + #else + vec4 texel = texture2D(tDiffuse, vUv); + #endif + + + float finalAo = pow(texel.a, intensity); + if (renderMode == 0.0) { + gl_FragColor = vec4( mix(sceneTexel.rgb, color * sceneTexel.rgb, 1.0 - finalAo), sceneTexel.a); + } else if (renderMode == 1.0) { + gl_FragColor = vec4( mix(vec3(1.0), color * sceneTexel.rgb, 1.0 - finalAo), sceneTexel.a); + } else if (renderMode == 2.0) { + gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a); + } else if (renderMode == 3.0) { + if (vUv.x < 0.5) { + gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a); + } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) { + gl_FragColor = vec4(1.0); + } else { + gl_FragColor = vec4( mix(sceneTexel.rgb, color * sceneTexel.rgb, 1.0 - finalAo), sceneTexel.a); + } + } else if (renderMode == 4.0) { + if (vUv.x < 0.5) { + gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a); + } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) { + gl_FragColor = vec4(1.0); + } else { + gl_FragColor = vec4( mix(vec3(1.0), color * sceneTexel.rgb, 1.0 - finalAo), sceneTexel.a); + } + } + #include + if (gammaCorrection) { + gl_FragColor = LinearTosRGB(gl_FragColor); + } + } + `},xa={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},projMat:{value:new he},viewMat:{value:new he},projectionMatrixInv:{value:new he},viewMatrixInv:{value:new he},cameraPos:{value:new St},resolution:{value:new ot},time:{value:0},r:{value:5},blueNoise:{value:null},radius:{value:12},worldRadius:{value:5},index:{value:0},poissonDisk:{value:[]},distanceFalloff:{value:1},near:{value:.1},far:{value:1e3},logDepth:{value:!1},screenSpaceRadius:{value:!1}},vertexShader:` + varying vec2 vUv; + void main() { + vUv = uv; + gl_Position = vec4(position, 1.0); + }`,fragmentShader:` + uniform sampler2D sceneDiffuse; + uniform highp sampler2D sceneDepth; + uniform sampler2D tDiffuse; + uniform sampler2D blueNoise; + uniform mat4 projectionMatrixInv; + uniform mat4 viewMatrixInv; + uniform vec2 resolution; + uniform float r; + uniform float radius; + uniform float worldRadius; + uniform float index; + uniform float near; + uniform float far; + uniform float distanceFalloff; + uniform bool logDepth; + uniform bool screenSpaceRadius; + varying vec2 vUv; + + highp float linearize_depth(highp float d, highp float zNear,highp float zFar) + { + highp float z_n = 2.0 * d - 1.0; + return 2.0 * zNear * zFar / (zFar + zNear - z_n * (zFar - zNear)); + } + highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) { + float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0; + float a = farZ / (farZ - nearZ); + float b = farZ * nearZ / (nearZ - farZ); + float linDepth = a + b / depth; + return linearize_depth(linDepth, nearZ, farZ); + } + highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) { + return nearZ + (farZ - nearZ) * d; + } + vec3 getWorldPosLog(vec3 posS) { + vec2 uv = posS.xy; + float z = posS.z; + float nearZ =near; + float farZ = far; + float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0; + float a = farZ / (farZ - nearZ); + float b = farZ * nearZ / (nearZ - farZ); + float linDepth = a + b / depth; + vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0; + vec4 wpos = viewMatrixInv * projectionMatrixInv * clipVec; + return wpos.xyz / wpos.w; + } + vec3 getWorldPos(float depth, vec2 coord) { + #ifdef LOGDEPTH + return getWorldPosLog(vec3(coord, depth)); + #endif + + float z = depth * 2.0 - 1.0; + vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0); + vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition; + // Perspective division + vec4 worldSpacePosition = viewMatrixInv * viewSpacePosition; + worldSpacePosition.xyz /= worldSpacePosition.w; + return worldSpacePosition.xyz; + } + #include + #define NUM_SAMPLES 16 + uniform vec2 poissonDisk[NUM_SAMPLES]; + void main() { + const float pi = 3.14159; + vec2 texelSize = vec2(1.0 / resolution.x, 1.0 / resolution.y); + vec2 uv = vUv; + vec4 data = texture2D(tDiffuse, vUv); + float occlusion = data.a; + float baseOcc = data.a; + vec3 normal = data.rgb * 2.0 - 1.0; + float count = 1.0; + float d = texture2D(sceneDepth, vUv).x; + vec3 worldPos = getWorldPos(d, vUv); + float size = radius; + float angle; + if (index == 0.0) { + angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).x * PI2; + } else if (index == 1.0) { + angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).y * PI2; + } else if (index == 2.0) { + angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).z * PI2; + } else { + angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).w * PI2; + } + + mat2 rotationMatrix = mat2(cos(angle), -sin(angle), sin(angle), cos(angle)); + float radiusToUse = screenSpaceRadius ? distance( + worldPos, + getWorldPos(d, vUv + + vec2(worldRadius, 0.0) / resolution) + ) : worldRadius; + float distanceFalloffToUse =screenSpaceRadius ? + radiusToUse * distanceFalloff + : distanceFalloff; + + + for(int i = 0; i < NUM_SAMPLES; i++) { + vec2 offset = (rotationMatrix * poissonDisk[i]) * texelSize * size; + vec4 dataSample = texture2D(tDiffuse, uv + offset); + float occSample = dataSample.a; + vec3 normalSample = dataSample.rgb * 2.0 - 1.0; + float dSample = texture2D(sceneDepth, uv + offset).x; + vec3 worldPosSample = getWorldPos(dSample, uv + offset); + float tangentPlaneDist = abs(dot(worldPos - worldPosSample, normal)); + float rangeCheck = exp(-1.0 * tangentPlaneDist * (1.0 / distanceFalloffToUse)) * max(dot(normal, normalSample), 0.0) * (1.0 - abs(occSample - baseOcc)); + occlusion += occSample * rangeCheck; + count += rangeCheck; + } + occlusion /= count; + gl_FragColor = vec4(0.5 + 0.5 * normal, occlusion); + } + `},wa={uniforms:{sceneDepth:{value:null},resolution:{value:new ot},near:{value:.1},far:{value:1e3},viewMatrixInv:{value:new he},projectionMatrixInv:{value:new he},logDepth:{value:!1}},vertexShader:` + varying vec2 vUv; + void main() { + vUv = uv; + gl_Position = vec4(position, 1); + }`,fragmentShader:` + uniform sampler2D sceneDepth; + uniform vec2 resolution; + uniform float near; + uniform float far; + uniform bool logDepth; + uniform mat4 viewMatrixInv; + uniform mat4 projectionMatrixInv; + varying vec2 vUv; + layout(location = 1) out vec4 gNormal; + vec3 getWorldPosLog(vec3 posS) { + vec2 uv = posS.xy; + float z = posS.z; + float nearZ =near; + float farZ = far; + float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0; + float a = farZ / (farZ - nearZ); + float b = farZ * nearZ / (nearZ - farZ); + float linDepth = a + b / depth; + vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0; + vec4 wpos = viewMatrixInv * projectionMatrixInv * clipVec; + return wpos.xyz / wpos.w; + } + vec3 getWorldPos(float depth, vec2 coord) { + if (logDepth) { + return getWorldPosLog(vec3(coord, depth)); + } + float z = depth * 2.0 - 1.0; + vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0); + vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition; + // Perspective division + vec4 worldSpacePosition = viewMatrixInv * viewSpacePosition; + worldSpacePosition.xyz /= worldSpacePosition.w; + return worldSpacePosition.xyz; + } + + vec3 computeNormal(vec3 worldPos, vec2 vUv) { + ivec2 p = ivec2(vUv * resolution); + float c0 = texelFetch(sceneDepth, p, 0).x; + float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x; + float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x; + float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x; + float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x; + float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x; + float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x; + float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x; + float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x; + + float dl = abs((2.0 * l1 - l2) - c0); + float dr = abs((2.0 * r1 - r2) - c0); + float db = abs((2.0 * b1 - b2) - c0); + float dt = abs((2.0 * t1 - t2) - c0); + + vec3 ce = getWorldPos(c0, vUv).xyz; + + vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz + : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz; + vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz + : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz; + + return normalize(cross(dpdx, dpdy)); + } + void main() { + vec2 uv = vUv - vec2(0.5) / resolution; + vec2 pixelSize = vec2(1.0) / resolution; + vec2[] uvSamples = vec2[4]( + uv, + uv + vec2(pixelSize.x, 0.0), + uv + vec2(0.0, pixelSize.y), + uv + pixelSize + ); + float depth00 = texture2D(sceneDepth, uvSamples[0]).r; + float depth10 = texture2D(sceneDepth, uvSamples[1]).r; + float depth01 = texture2D(sceneDepth, uvSamples[2]).r; + float depth11 = texture2D(sceneDepth, uvSamples[3]).r; + float minDepth = min(min(depth00, depth10), min(depth01, depth11)); + float maxDepth = max(max(depth00, depth10), max(depth01, depth11)); + float targetDepth = minDepth; + // Checkerboard pattern to avoid artifacts + if (mod(gl_FragCoord.x + gl_FragCoord.y, 2.0) > 0.5) { + targetDepth = maxDepth; + } + int chosenIndex = 0; + float[] samples = float[4](depth00, depth10, depth01, depth11); + for(int i = 0; i < 4; ++i) { + if (samples[i] == targetDepth) { + chosenIndex = i; + break; + } + } + gl_FragColor = vec4(samples[chosenIndex], 0.0, 0.0, 1.0); + gNormal = vec4(computeNormal( + getWorldPos(samples[chosenIndex], uvSamples[chosenIndex]), uvSamples[chosenIndex] + ), 0.0); + /* float[] samples = float[4](depth00, depth10, depth01, depth11); + float c = 0.25 * (depth00 + depth10 + depth01 + depth11); + float[] distances = float[4](depth00, depth10, depth01, depth11); + float maxDistance = max(max(distances[0], distances[1]), max(distances[2], distances[3])); + + int remaining[3]; + int rejected[3]; + int i, j, k; + + for(i = 0, j = 0, k = 0; i < 4; ++i) { + if (distances[i] < maxDistance) { + remaining[j++] = i; + } else { + rejected[k++] = i; + } + } + for(;j < 3;++j) { + remaining[j] = rejected[--k]; + } + vec3 s = vec3( + samples[remaining[0]], + samples[remaining[1]], + samples[remaining[2]] + ); + c = (s.x + s.y + s.z) / 3.0; + + distances[0] = abs(c - s.x); + distances[1] = abs(c - s.y); + distances[2] = abs(c - s.z); + + float minDistance = min(min(distances[0], distances[1]), distances[2]); + + for(i = 0; i < 3; ++i) { + if (distances[i] == minDistance) { + break; + } + }*/ + /* gl_FragColor = vec4(samples[remaining[i]], 0.0, 0.0, 0.0); + gNormal = vec4(computeNormal( + getWorldPos(samples[remaining[i]], uvSamples[remaining[i]]), uvSamples[remaining[i]] + ), 0.0);*/ + }`};var ni="5L7pP4UXrOIr/VZ1G3f6p89FIWU7lqc7J3DPxKjJUXODJoHQzf/aNVM+ABlvhXeBGN7iC0WkmTjEaAqOItBfBdaK5KSGV1ET5SOKl3x9JOX5w2sAl6+6KjDhVUHgbqq7DZ5EeYzbdSNxtrQLW/KkPJoOTG4u5CBUZkCKHniY9l7DUgjuz708zG1HIC8qfohi1vPjPH9Lq47ksjRrjwXD4MlVCjdAqYFGodQ8tRmHkOfq4wVRIAHvoavPHvN1lpk3X4Y1yzAPGe8S9KBs3crc4GwlU1dEOXiWol/mgQqxkNqB1xd04+0Bmpwj0GcCc4NUi+c731FUxjvaexCkCJ0qhrJJ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TiJ7bxI6o4cBhDaX+adXREThhR+MwA4TqD7rga/o9iY7d6TVRe14CS2S3iSQsD0R6ApnhG/2Wa0A0AY2NtWTjmabdKU+KgIRDP9RQYVjXiF1qC+xyNVG03I9vpmEpY/G/zC4nLOKgXAZ/uTikHI9Afbkhfgfgo9arWbix5eH7WUo9RQygDzwCnVSjbXc7MihEufVj6WGbK963pw8VjY3RS8IH1cy2yZbIcKLO5CgAUcXJfF2+McnDLKtXxyZaf7SPA6KJq+zF2NHyfoeTOwHhGqNcnHVr1hT73pcoyXyfvCYBnG1Bp/aR9t8hoI7CXM3UZOisWGA1SHZ2jf7k9GlRnp3mF/c1AV+JjvUsnZrsybEOQJg/dn/9eJkyykQHjbF56zgcPX6DdMG03WKUMlYz+uOZ+5DZy9E9MZOZ9GMoLFdrIPPQQLjv+GlCMpoyHPXkzIODjHAID2PrnaRpqWVHh0rnieDILKq+Emrd5RnjgE9pDUXWTmHaKuqqYlcgEz4zbi46dbWrAAFBjsQq1rLHIiPJEcwFLCOY4JNlXRXQJqCUKXk2d1RSBGzDP6HDSpo863BhVRFFF6uIpjQV7j5ebFe3UkkO/+coIo2BTAcgBqOtQ134s9a4QJvofuqBYMGOBMsWZ+sn/2AOxDx6SfAnDFGw==";Uint8Array.from(atob(ni),c=>c.charCodeAt(0));const Da=Uint8Array.from(atob(ni),c=>c.charCodeAt(0));function ri(c,l,u){if(l.getQueryParameter(c,l.QUERY_RESULT_AVAILABLE)){const k=l.getQueryParameter(c,l.QUERY_RESULT)/1e6;u.lastTime=k}else setTimeout(()=>{ri(c,l,u)},1)}class Fa extends pa{constructor(l,u,y=512,E=512){super(),this.width=y,this.height=E,this.clear=!0,this.camera=u,this.scene=l,this.configuration=new Proxy({aoSamples:16,aoRadius:5,denoiseSamples:8,denoiseRadius:12,distanceFalloff:1,intensity:5,denoiseIterations:2,renderMode:0,color:new Ur(0,0,0),gammaCorrection:!0,logarithmicDepthBuffer:!1,screenSpaceRadius:!1,halfRes:!1,depthAwareUpsampling:!0},{set:(k,S,C)=>{const O=k[S];return k[S]=C,S==="aoSamples"&&O!==C&&this.configureAOPass(this.configuration.logarithmicDepthBuffer),S==="denoiseSamples"&&O!==C&&this.configureDenoisePass(this.configuration.logarithmicDepthBuffer),S==="halfRes"&&O!==C&&(this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureHalfResTargets(),this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.setSize(this.width,this.height)),S==="depthAwareUpsampling"&&O!==C&&this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),!0}}),this.samples=[],this.samplesR=[],this.samplesDenoise=[],this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.configureSampleDependentPasses(),this.configureHalfResTargets(),this.beautyRenderTarget=new Jn(this.width,this.height,{minFilter:Dt,magFilter:He}),this.beautyRenderTarget.depthTexture=new qi(this.width,this.height,Qi),this.beautyRenderTarget.depthTexture.format=Ui,this.writeTargetInternal=new Jn(this.width,this.height,{minFilter:Dt,magFilter:Dt,depthBuffer:!1}),this.readTargetInternal=new Jn(this.width,this.height,{minFilter:Dt,magFilter:Dt,depthBuffer:!1}),this.bluenoise=new Vi(Da,128,128),this.bluenoise.colorSpace=Zi,this.bluenoise.wrapS=Vr,this.bluenoise.wrapT=Vr,this.bluenoise.minFilter=He,this.bluenoise.magFilter=He,this.bluenoise.needsUpdate=!0,this.lastTime=0,this._r=new ot,this._c=new Ur}configureHalfResTargets(){this.configuration.halfRes?(this.depthDownsampleTarget=new Hi(this.width/2,this.height/2,2),this.depthDownsampleTarget.texture[0].format=Yi,this.depthDownsampleTarget.texture[0].type=Wi,this.depthDownsampleTarget.texture[0].minFilter=He,this.depthDownsampleTarget.texture[0].magFilter=He,this.depthDownsampleTarget.texture[0].depthBuffer=!1,this.depthDownsampleTarget.texture[1].format=Gi,this.depthDownsampleTarget.texture[1].type=Xi,this.depthDownsampleTarget.texture[1].minFilter=He,this.depthDownsampleTarget.texture[1].magFilter=He,this.depthDownsampleTarget.texture[1].depthBuffer=!1,this.depthDownsampleQuad=new on(new Ye(wa))):(this.depthDownsampleTarget&&(this.depthDownsampleTarget.dispose(),this.depthDownsampleTarget=null),this.depthDownsampleQuad&&(this.depthDownsampleQuad.dispose(),this.depthDownsampleQuad=null))}configureSampleDependentPasses(){this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureDenoisePass(this.configuration.logarithmicDepthBuffer)}configureAOPass(l=!1){this.samples=this.generateHemisphereSamples(this.configuration.aoSamples),this.samplesR=this.generateHemisphereSamplesR(this.configuration.aoSamples);const u={...ga};u.fragmentShader=u.fragmentShader.replace("16",this.configuration.aoSamples).replace("16.0",this.configuration.aoSamples+".0"),l&&(u.fragmentShader=`#define LOGDEPTH +`+u.fragmentShader),this.configuration.halfRes&&(u.fragmentShader=`#define HALFRES +`+u.fragmentShader),this.effectShaderQuad?(this.effectShaderQuad.material.dispose(),this.effectShaderQuad.material=new Ye(u)):this.effectShaderQuad=new on(new Ye(u))}configureDenoisePass(l=!1){this.samplesDenoise=this.generateDenoiseSamples(this.configuration.denoiseSamples,11);const u={...xa};u.fragmentShader=u.fragmentShader.replace("16",this.configuration.denoiseSamples),l&&(u.fragmentShader=`#define LOGDEPTH +`+u.fragmentShader),this.poissonBlurQuad?(this.poissonBlurQuad.material.dispose(),this.poissonBlurQuad.material=new Ye(u)):this.poissonBlurQuad=new on(new Ye(u))}configureEffectCompositer(l=!1){const u={...ba};l&&(u.fragmentShader=`#define LOGDEPTH +`+u.fragmentShader),this.configuration.halfRes&&this.configuration.depthAwareUpsampling&&(u.fragmentShader=`#define HALFRES +`+u.fragmentShader),this.effectCompositerQuad?(this.effectCompositerQuad.material.dispose(),this.effectCompositerQuad.material=new Ye(u)):this.effectCompositerQuad=new on(new Ye(u))}generateHemisphereSamples(l){const u=[];for(let y=0;y "u"||k.Promise||(k.Promise=Promise);var z=Object.getPrototypeOf,_={}.hasOwnProperty;function q(e,t){return _.call(e,t)}function H(e,t){typeof t=="function"&&(t=t(z(e))),(typeof Reflect>"u"?S:Reflect.ownKeys)(t).forEach(function(n){W(e,n,t[n])})}var ae=Object.defineProperty;function W(e,t,n,r){ae(e,t,O(n&&q(n,"get")&&typeof n.get=="function"?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function ve(e){return{from:function(t){return e.prototype=Object.create(t.prototype),W(e.prototype,"constructor",e),{extend:H.bind(null,e.prototype)}}}}var Oe=Object.getOwnPropertyDescriptor,Ft=[].slice;function Re(e,t,n){return Ft.call(e,t,n)}function G(e,t){return t(e)}function Y(e){if(!e)throw new Error("Assertion Failed")}function rr(e){k.setImmediate?setImmediate(e):setTimeout(e,0)}function we(e,t){if(typeof t=="string"&&q(e,t))return e[t];if(!t)return e;if(typeof t!="string"){for(var n=[],r=0,i=t.length;r"u"?[]:function(){var e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,z(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,z(t),e]}(),ct=Pe[0],me=Pe[1],Pe=Pe[2],me=me&&me.then,ft=ct&&ct.constructor,dn=!!Pe,ht=function(e,t){pt.push([e,t]),It&&(queueMicrotask(mi),It=!1)},vn=!0,It=!0,Ae=[],Kt=[],mn=ut,Ee={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:$,pgp:!1,env:{},finalize:$},A=Ee,pt=[],je=0,Mt=[];function L(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var t=this._PSD=A;if(typeof e!="function"){if(e!==lt)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&gn(this,this._value))}this._state=null,this._value=null,++t.ref,function n(r,i){try{i(function(a){if(r._state===null){if(a===r)throw new TypeError("A promise cannot be resolved with itself.");var o=r._lib&&_e();a&&typeof a.then=="function"?n(r,function(s,d){a instanceof L?a._then(s,d):a.then(s,d)}):(r._state=!0,r._value=a,hr(r)),o&&$e()}},gn.bind(null,r))}catch(a){gn(r,a)}}(this,e)}var yn={get:function(){var e=A,t=zt;function n(r,i){var a=this,o=!e.global&&(e!==A||t!==zt),s=o&&!Ce(),d=new L(function(h,g){bn(a,new fr(dr(r,e,o,s),dr(i,e,o,s),h,g,e))});return this._consoleTask&&(d._consoleTask=this._consoleTask),d}return n.prototype=lt,n},set:function(e){W(this,"then",e&&e.prototype===lt?yn:{get:function(){return e},set:yn.set})}};function fr(e,t,n,r,i){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.resolve=n,this.reject=r,this.psd=i}function gn(e,t){var n,r;Kt.push(t),e._state===null&&(n=e._lib&&_e(),t=mn(t),e._state=!1,e._value=t,r=e,Ae.some(function(i){return i._value===r._value})||Ae.push(r),hr(e),n&&$e())}function hr(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n .",vr="String expected.",tt=[],jt="__dbnames",Dn="readonly",Sn="readwrite";function Qe(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var mr={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Nt(e){return typeof e!="string"||/\./.test(e)?function(t){return t}:function(t){return t[e]===void 0&&e in t&&delete(t=Te(t))[e],t}}function yr(){throw j.Type()}function J(e,t){try{var n=gr(e),r=gr(t);if(n!==r)return n==="Array"?1:r==="Array"?-1:n==="binary"?1:r==="binary"?-1:n==="string"?1:r==="string"?-1:n==="Date"?1:r!=="Date"?NaN:-1;switch(n){case"number":case"Date":case"string":return t D+P&&w(D+b)})})}return w(0).then(function(){if(0 =b})).length!==0?(g.forEach(function(w){x.push(function(){var D=v,P=w._cfg.dbschema;Wt(f,D,m),Wt(f,P,m),v=f._dbSchema=P;var T=Mn(D,P);T.add.forEach(function(M){On(m,M[0],M[1].primKey,M[1].indexes)}),T.change.forEach(function(M){if(M.recreate)throw new j.Upgrade("Not yet support for changing primary key");var R=m.objectStore(M.name);M.add.forEach(function(N){return Ht(R,N)}),M.change.forEach(function(N){R.deleteIndex(N.name),Ht(R,N)}),M.del.forEach(function(N){return R.deleteIndex(N)})});var F=w._cfg.contentUpgrade;if(F&&w._cfg.version>b){Vt(f,m),p._memoizedTables={};var K=ir(P);T.del.forEach(function(M){K[M]=D[M]}),Kn(f,[f.Transaction.prototype]),Zt(f,[f.Transaction.prototype],S(K),K),p.schema=K;var B,I=fn(F);return I&&et(),T=L.follow(function(){var M;(B=F(p))&&I&&(M=Ce.bind(null,null),B.then(M,M))}),B&&typeof B.then=="function"?L.resolve(B):T.then(function(){return B})}}),x.push(function(D){var P,T,F=w._cfg.dbschema;P=F,T=D,[].slice.call(T.db.objectStoreNames).forEach(function(K){return P[K]==null&&T.db.deleteObjectStore(K)}),Kn(f,[f.Transaction.prototype]),Zt(f,[f.Transaction.prototype],f._storeNames,f._dbSchema),p.schema=f._dbSchema}),x.push(function(D){f.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(f.idbdb.version/10)===w._cfg.version?(f.idbdb.deleteObjectStore("$meta"),delete f._dbSchema.$meta,f._storeNames=f._storeNames.filter(function(P){return P!=="$meta"})):D.objectStore("$meta").put(w._cfg.version,"version"))})}),function w(){return x.length?L.resolve(x.shift()(p.idbtrans)).then(w):L.resolve()}().then(function(){Fr(v,m)})):L.resolve();var f,b,p,m,x,v}).catch(o)):(S(i).forEach(function(g){On(n,g,i[g].primKey,i[g].indexes)}),Vt(e,n),void L.follow(function(){return e.on.populate.fire(a)}).catch(o));var d,h})}function Ci(e,t){Fr(e._dbSchema,t),t.db.version%10!=0||t.objectStoreNames.contains("$meta")||t.db.createObjectStore("$meta").add(Math.ceil(t.db.version/10-1),"version");var n=Yt(0,e.idbdb,t);Wt(e,e._dbSchema,t);for(var r=0,i=Mn(n,e._dbSchema).change;r Math.pow(2,62)?0:v.oldVersion,f=v<1,e.idbdb=x.result,a&&Ci(e,g),Fi(e,v/10,g,p))},p),x.onsuccess=te(function(){g=null;var v,w,D,P,T,F=e.idbdb=x.result,K=Re(F.objectStoreNames);if(0 "u"?L.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(b){function p(){return indexedDB.databases().finally(b)}d=setInterval(p,100),p()}).finally(function(){return clearInterval(d)}):Promise.resolve()).then(s)]).then(function(){return o(),t.onReadyBeingFired=[],L.resolve(zn(function(){return e.on.ready.fire(e.vip)})).then(function b(){if(0 t.limit?b.length=t.limit:e.length===t.limit&&b.length =w.limit&&(!w.values||F.req.values)&&Li(F.req.query.range,w.query.range)}),!1,D,P];case"count":return T=P.find(function(F){return Ar(F.req.query.range,w.query.range)}),[T,!!T,D,P]}}(t,n,"query",a),g=h[0],f=h[1],b=h[2],p=h[3];return g&&f?g.obsSet=a.obsSet:(f=r.query(a).then(function(m){var x=m.result;if(g&&(g.res=x),o){for(var v=0,w=x.length;v t in v?G(v,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):v[t]=e;var r=(v,t,e)=>(H(v,typeof t!="symbol"?t+"":t,e),e);import{U as P,a as q,c as K,J as Q,m as R}from"./index-B3b_h8A8.js";import{M as Y,c as Z,V as L,a as z,P as ee,r as te,e as se,D as ie,s as ne,I as oe,J as re,L as le}from"./web-ifc-api-BiYij3qq.js";import{e as ae}from"./import-wrapper-prod-vMwJRSad.js";import{P as W}from"./index-Cb-lnTew.js";class ce{constructor(t,e,s,i){r(this,"mesh",new Y(new Z));r(this,"world");r(this,"styleName");r(this,"_precission",1e4);r(this,"_tempVector",new L);r(this,"_plane");r(this,"_geometry");r(this,"_plane2DCoordinateSystem",new z);r(this,"_planeAxis");this.world=t,this.mesh.material=i,this.mesh.frustumCulled=!1,this._plane=e;const{x:n,y:l,z:o}=e.normal;Math.abs(n)===1?this._planeAxis="x":Math.abs(l)===1?this._planeAxis="y":Math.abs(o)===1&&(this._planeAxis="z"),this._geometry=s,this.mesh.geometry.attributes.position=s.attributes.position;const a=e.normal.clone().multiplyScalar(.01);this.mesh.position.copy(a),this.visible=!0}get visible(){return this.mesh.parent!==null}set visible(t){const e=this.getStyle();t?(this.world.scene.three.add(this.mesh),e&&e.meshes.add(this.mesh)):(this.mesh.removeFromParent(),e&&e.meshes.delete(this.mesh))}set geometry(t){this._geometry=t,this.mesh.geometry.attributes.position=t.attributes.position}dispose(){const t=this.getStyle();t&&t.meshes.delete(this.mesh),this.mesh.geometry.dispose(),this.mesh.removeFromParent(),this.mesh.geometry=null,this.mesh=null,this._plane=null,this._geometry=null}update(t){const e=this._geometry.attributes.position.array;if(!e)return;this.updatePlane2DCoordinateSystem();const s=[];let i=0;for(let n=0;n this._localPlane.intersectsBox(i),intersectsTriangle:i=>{let n=0;if(this._tempLine.start.copy(i.a),this._tempLine.end.copy(i.b),this._localPlane.intersectLine(this._tempLine,this._tempVector)){const l=this._tempVector.applyMatrix4(t.matrixWorld);e.setXYZ(s,l.x,l.y,l.z),n++,s++}if(this._tempLine.start.copy(i.b),this._tempLine.end.copy(i.c),this._localPlane.intersectLine(this._tempLine,this._tempVector)){const l=this._tempVector.applyMatrix4(t.matrixWorld);e.setXYZ(s,l.x,l.y,l.z),n++,s++}if(this._tempLine.start.copy(i.c),this._tempLine.end.copy(i.a),this._localPlane.intersectLine(this._tempLine,this._tempVector)){const l=this._tempVector.applyMatrix4(t.matrixWorld);e.setXYZ(s,l.x,l.y,l.z),n++,s++}n!==2&&(s-=n)}}),s}updateDeletedEdges(t){const e=Object.keys(this._edges);for(const s of e)t[s]===void 0&&(this.disposeEdge(s),this.disposeOutline(s))}disposeOutline(t){if(!this.world.renderer)return;const e=this.world.renderer;if(e instanceof W){const s=e.postproduction.customEffects.outlinedMeshes;delete s[t]}}disposeEdge(t){const e=this.components.get(q),s=this._edges[t];s.fill&&s.fill.dispose(),e.destroy(s.mesh,!1),delete this._edges[t]}}class X extends K{constructor(e,s,i,n,l,o=5,a=!0){super(e,s,i,n,l,o,a);r(this,"edges");r(this,"edgesMaxUpdateRate",50);r(this,"_visible",!0);r(this,"_edgesVisible",!0);r(this,"updateFill",()=>{this.edges.fillNeedsUpdate=!0,this.edges.update(),this.edges.visible=this._visible});this.edges=new de(e,s,this.three),this.toggleControls(!0),this.edges.visible=!0,this.onDraggingEnded.add(()=>{this.updateFill()}),this.onDraggingStarted.add(()=>this.edges.visible=!1)}get visible(){return this._visible}set visible(e){super.visible=e,this.toggleControls(e)}set enabled(e){this._enabled=e,this.world.renderer&&this.world.renderer.setPlane(e,this.three)}get enabled(){return super.enabled}dispose(){super.dispose(),this.edges.dispose()}}class he{constructor(){r(this,"onDisposed",new P);r(this,"enabled",!0);r(this,"list",{});r(this,"_defaultLineMaterial",new le({color:0,linewidth:.001}));r(this,"onAfterUpdate",new P);r(this,"onBeforeUpdate",new P)}update(t){this.onBeforeUpdate.trigger(this.list),this.onAfterUpdate.trigger(this.list)}create(t,e,s,i,n,l){if(!s.renderer)throw new Error("The given world doesn't have a renderer!");i||(i=this._defaultLineMaterial);for(const g of e)g.geometry.boundsTree||g.geometry.computeBoundsTree();const o=s.renderer;i.clippingPlanes=o.clippingPlanes;const a={name:t,lineMaterial:i,meshes:e,fillMaterial:n,outlineMaterial:l,fragments:{}};return this.list[t]=a,a}dispose(){const t=Object.keys(this.list);for(const e of t)this.deleteStyle(e);this.list={},this.onDisposed.trigger(),this.onDisposed.reset()}deleteStyle(t,e=!0){var i,n;const s=this.list[t];s&&(s.meshes.clear(),e&&(s.lineMaterial.dispose(),(i=s.fillMaterial)==null||i.dispose(),(n=s.outlineMaterial)==null||n.dispose())),delete this.list[t]}}const N=class N extends Q{constructor(e){super(e);r(this,"onDisposed",new P);r(this,"enabled",!0);r(this,"styles");r(this,"fillsNeedUpdate",!1);r(this,"_visible",!0);this.components.list.set(N.uuid,this),this.styles=new he}get visible(){return this._visible}set visible(e){this._visible=e;const s=this.components.get(R);for(const i of s.list)i instanceof X&&(i.edges.visible=e)}dispose(){this.styles.dispose(),this.onDisposed.trigger()}async update(e=!1){if(!this.enabled)return;const s=this.components.get(R);for(const i of s.list)i instanceof X&&(e||this.fillsNeedUpdate?i.updateFill():i.update());this.fillsNeedUpdate=!1}};r(N,"uuid","24dfc306-a3c4-410f-8071-babc4afa5e4d");let E=N;export{E as C,X as E}; diff --git a/examples/assets/index-B3b_h8A8.js b/examples/assets/index-B3b_h8A8.js new file mode 100644 index 000000000..1b00b2fbc --- /dev/null +++ b/examples/assets/index-B3b_h8A8.js @@ -0,0 +1,88 @@ +import{r as At,p as st,T as pe,z as Ti,E as Ro,a as X,V as O,f as Ft,P as fe,y as Os,M as D,C as qt,n as mi,a_ as Ao,a$ as Fo,ah as As,o as fi,at as go,au as Oo,v as _o,Q as Rt,av as So,h as yn,u as No,c as ze,m as Ri,q as wo,K as ke,d as Te,ai as rt,O as Fs,I as Ge,Y as jt,B as it,J as yo,Z as Ln,am as Lo,ad as ti,a2 as _s,_ as Ai,$ as Fi,a0 as gi,a1 as Oi,a3 as _i,a4 as Pn,a5 as Ss,a6 as zt,k as Vi,a7 as Mn,a8 as Un,a9 as $t,N as Po,e as Ve,aa as ft,ab as Mo,ac as Ze,X as Uo,L as Dn,F as Hi,aw as Qe,g as Ut,ax as Do,ay as ge,W as xo,j as Ms,l as bo,aj as Si,ak as Ni,al as wi,i as yi,an as vo,ao as Bo,ap as Yo,aq as zo,ar as ki,as as Go,az as Vo,aO as Ho}from"./web-ifc-api-BiYij3qq.js";var ko=Object.defineProperty,Wo=(h,t,e)=>t in h?ko(h,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):h[t]=e,I=(h,t,e)=>(Wo(h,typeof t!="symbol"?t+"":t,e),e);const xn=0,Xo=1,Zo=2,Wi=2,Us=1.25,Xi=1,ms=6*4+4+4,Ns=65535,Qo=Math.pow(2,-24),Ds=Symbol("SKIP_GENERATION");function jo(h){return h.index?h.index.count:h.attributes.position.count}function Re(h){return jo(h)/3}function qo(h,t=ArrayBuffer){return h>65535?new Uint32Array(new t(4*h)):new Uint16Array(new t(2*h))}function Ko(h,t){if(!h.index){const e=h.attributes.position.count,s=t.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,i=qo(e,s);h.setIndex(new Ve(i,1));for(let n=0;n r-a);for(let r=0;r n.offset-o.offset),s=e[e.length-1];s.count=Math.min(t-s.offset,s.count);let i=0;return e.forEach(({count:n})=>i+=n),t!==i}function j(h,t,e){return e.min.x=t[h],e.min.y=t[h+1],e.min.z=t[h+2],e.max.x=t[h+3],e.max.y=t[h+4],e.max.z=t[h+5],e}function Jo(h){h[0]=h[1]=h[2]=1/0,h[3]=h[4]=h[5]=-1/0}function Zi(h){let t=-1,e=-1/0;for(let s=0;s<3;s++){const i=h[s+3]-h[s];i>e&&(e=i,t=s)}return t}function Qi(h,t){t.set(h)}function ji(h,t,e){let s,i;for(let n=0;n<3;n++){const o=n+3;s=h[n],i=t[n],e[n]=si?s:i}}function je(h,t,e){for(let s=0;s<3;s++){const i=t[h+2*s],n=t[h+2*s+1],o=i-n,r=i+n;o e[s+3]&&(e[s+3]=r)}}function Oe(h){const t=h[3]-h[0],e=h[4]-h[1],s=h[5]-h[2];return 2*(t*e+e*s+s*t)}function xs(h,t,e,s,i=null){let n=1/0,o=1/0,r=1/0,a=-1/0,c=-1/0,d=-1/0,E=1/0,l=1/0,u=1/0,T=-1/0,C=-1/0,f=-1/0;const m=i!==null;for(let R=t*6,F=(t+e)*6;R a&&(a=_),m&&p T&&(T=p);const S=h[R+2],w=h[R+3],y=S-w,L=S+w;y c&&(c=L),m&&S C&&(C=S);const P=h[R+4],U=h[R+5],x=P-U,Y=P+U;x d&&(d=Y),m&&Pf&&(f=P)}s[0]=n,s[1]=o,s[2]=r,s[3]=a,s[4]=c,s[5]=d,m&&(i[0]=E,i[1]=l,i[2]=u,i[3]=T,i[4]=C,i[5]=f)}function tr(h,t,e,s){let i=1/0,n=1/0,o=1/0,r=-1/0,a=-1/0,c=-1/0;for(let d=t*6,E=(t+e)*6;d r&&(r=l);const u=h[d+2];u a&&(a=u);const T=h[d+4];T c&&(c=T)}s[0]=i,s[1]=n,s[2]=o,s[3]=r,s[4]=a,s[5]=c}function er(h,t){Jo(t);const e=h.attributes.position,s=h.index?h.index.array:null,i=Re(h),n=new Float32Array(i*6),o=e.normalized,r=e.array,a=e.offset||0;let c=3;e.isInterleavedBufferAttribute&&(c=e.data.stride);const d=["getX","getY","getZ"];for(let E=0;Eg&&(g=F),p>g&&(g=p);const _=(g-A)/2,S=m*2;n[u+S+0]=A+_,n[u+S+1]=_+(Math.abs(A)+_)*Qo,A t[m+3]&&(t[m+3]=g)}}return n}const yt=32,sr=(h,t)=>h.candidate-t.candidate,Dt=new Array(yt).fill().map(()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0})),qe=new Float32Array(6);function ir(h,t,e,s,i,n){let o=-1,r=0;if(n===xn)o=Zi(t),o!==-1&&(r=(t[o]+t[o+3])/2);else if(n===Xo)o=Zi(h),o!==-1&&(r=nr(e,s,i,o));else if(n===Zo){const a=Oe(h);let c=Us*i;const d=s*6,E=(s+i)*6;for(let l=0;l<3;l++){const u=t[l],T=(t[l+3]-u)/yt;if(i =A.candidate?je(R,e,A.rightCacheBounds):(je(R,e,A.leftCacheBounds),A.count++)}}for(let R=0;R =yt&&(R=yt-1);const F=Dt[R];F.count++,je(m,e,F.bounds)}const C=Dt[yt-1];Qi(C.bounds,C.rightCacheBounds);for(let m=yt-2;m>=0;m--){const R=Dt[m],F=Dt[m+1];ji(R.bounds,F.rightCacheBounds,R.rightCacheBounds)}let f=0;for(let m=0;m =a;)r--;if(o =a;)r--;if(o 2**16,i=s?4:2,n=t?new SharedArrayBuffer(e*i):new ArrayBuffer(e*i),o=s?new Uint32Array(n):new Uint16Array(n);for(let r=0,a=o.length;r=i&&(E=!0,n&&(console.warn(`MeshBVH: Max depth of ${i} reached when generating BVH. Consider increasing maxDepth.`),console.warn(e))),g<=o||S>=i)return R(A+g),p.offset=A,p.count=g,p;const w=ir(p.boundingData,_,T,A,g,r);if(w.axis===-1)return R(A+g),p.offset=A,p.count=g,p;const y=C(d,s,T,A,g,w);if(y===A||y===A+g)R(A+g),p.offset=A,p.count=g;else{p.splitAxis=w.axis;const L=new Ke,P=A,U=y-A;p.left=L,L.boundingData=new Float32Array(6),xs(T,P,U,L.boundingData,u),F(L,P,U,u,S+1);const x=new Ke,Y=y,z=g-U;p.right=x,x.boundingData=new Float32Array(6),xs(T,Y,z,x.boundingData,u),F(x,Y,z,u,S+1)}return p}}function cr(h,t){const e=h.geometry;t.indirect&&(h._indirectBuffer=ar(e,t.useSharedArrayBuffer),$o(e)&&!t.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.')),h._indirectBuffer||Ko(e,t);const s=hr(h,t);let i,n,o;const r=[],a=t.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;for(let E=0;E Math.pow(2,32))throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return n[u+6]=p/4,p=d(p,R),n[u+7]=F,p}}}class Pt{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(t,e){let s=1/0,i=-1/0;for(let n=0,o=t.length;n i?r:i}this.min=s,this.max=i}setFromPoints(t,e){let s=1/0,i=-1/0;for(let n=0,o=e.length;n i?a:i}this.min=s,this.max=i}isSeparated(t){return this.min>t.max||t.min>this.max}}Pt.prototype.setFromBox=function(){const h=new O;return function(t,e){const s=e.min,i=e.max;let n=1/0,o=-1/0;for(let r=0;r<=1;r++)for(let a=0;a<=1;a++)for(let c=0;c<=1;c++){h.x=s.x*r+i.x*(1-r),h.y=s.y*a+i.y*(1-a),h.z=s.z*c+i.z*(1-c);const d=t.dot(h);n=Math.min(d,n),o=Math.max(d,o)}this.min=n,this.max=o}}();const lr=function(){const h=new O,t=new O,e=new O;return function(s,i,n){const o=s.start,r=h,a=i.start,c=t;e.subVectors(o,a),h.subVectors(s.end,s.start),t.subVectors(i.end,i.start);const d=e.dot(c),E=c.dot(r),l=c.dot(c),u=e.dot(r),T=r.dot(r)*l-E*E;let C,f;T!==0?C=(d*E-u*l)/T:C=0,f=(d+C*E)/l,n.x=C,n.y=f}}(),Li=function(){const h=new Ft,t=new O,e=new O;return function(s,i,n,o){lr(s,i,h);let r=h.x,a=h.y;if(r>=0&&r<=1&&a>=0&&a<=1){s.at(r,n),i.at(a,o);return}else if(r>=0&&r<=1){a<0?i.at(0,o):i.at(1,o),s.closestPointToPoint(o,!0,n);return}else if(a>=0&&a<=1){r<0?s.at(0,n):s.at(1,n),i.closestPointToPoint(n,!0,o);return}else{let c;r<0?c=s.start:c=s.end;let d;a<0?d=i.start:d=i.end;const E=t,l=e;if(s.closestPointToPoint(d,!0,t),i.closestPointToPoint(c,!0,e),E.distanceToSquared(d)<=l.distanceToSquared(c)){n.copy(E),o.copy(d);return}else{n.copy(c),o.copy(l);return}}}}(),dr=function(){const h=new O,t=new O,e=new fe,s=new At;return function(i,n){const{radius:o,center:r}=i,{a,b:c,c:d}=n;if(s.start=a,s.end=c,s.closestPointToPoint(r,!0,h).distanceTo(r)<=o||(s.start=a,s.end=d,s.closestPointToPoint(r,!0,h).distanceTo(r)<=o)||(s.start=c,s.end=d,s.closestPointToPoint(r,!0,h).distanceTo(r)<=o))return!0;const E=n.getPlane(e);if(Math.abs(E.distanceToPoint(r))<=o){const l=E.projectPoint(r,t);if(n.containsPoint(l))return!0}return!1}}(),Er=1e-15;function bs(h){return Math.abs(h) new O),this.satBounds=new Array(4).fill().map(()=>new Pt),this.points=[this.a,this.b,this.c],this.sphere=new Os,this.plane=new fe,this.needsUpdate=!0}intersectsSphere(t){return dr(t,this)}update(){const t=this.a,e=this.b,s=this.c,i=this.points,n=this.satAxes,o=this.satBounds,r=n[0],a=o[0];this.getNormal(r),a.setFromPoints(r,i);const c=n[1],d=o[1];c.subVectors(t,e),d.setFromPoints(c,i);const E=n[2],l=o[2];E.subVectors(e,s),l.setFromPoints(E,i);const u=n[3],T=o[3];u.subVectors(s,t),T.setFromPoints(u,i),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(r,t),this.needsUpdate=!1}}gt.prototype.closestPointToSegment=function(){const h=new O,t=new O,e=new At;return function(s,i=null,n=null){const{start:o,end:r}=s,a=this.points;let c,d=1/0;for(let E=0;E<3;E++){const l=(E+1)%3;e.start.copy(a[E]),e.end.copy(a[l]),Li(e,s,h,t),c=h.distanceToSquared(t),c =2){(p===1?m.start:m.end).copy(u),F=2;break}if(F++,F===2&&p===-1)break}}return F}return function(C,f=null,m=!1){this.needsUpdate&&this.update(),C.isExtendedTriangle?C.needsUpdate&&C.update():(h.copy(C),h.update(),C=h);const R=this.plane,F=C.plane;if(Math.abs(R.normal.dot(F.normal))>1-1e-10){const p=this.satBounds,A=this.satAxes;e[0]=C.a,e[1]=C.b,e[2]=C.c;for(let S=0;S<4;S++){const w=p[S],y=A[S];if(s.setFromPoints(y,e),w.isSeparated(s))return!1}const g=C.satBounds,_=C.satAxes;t[0]=this.a,t[1]=this.b,t[2]=this.c;for(let S=0;S<4;S++){const w=g[S],y=_[S];if(s.setFromPoints(y,t),w.isSeparated(s))return!1}for(let S=0;S<4;S++){const w=A[S];for(let y=0;y<4;y++){const L=_[y];if(n.crossVectors(w,L),s.setFromPoints(n,t),i.setFromPoints(n,e),s.isSeparated(i))return!1}}return f&&(m||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),f.start.set(0,0,0),f.end.set(0,0,0)),!0}else{const p=T(this,F,E);if(p===1&&C.containsPoint(E.end))return f&&(f.start.copy(E.end),f.end.copy(E.end)),!0;if(p!==2)return!1;const A=T(C,R,l);if(A===1&&this.containsPoint(l.end))return f&&(f.start.copy(l.end),f.end.copy(l.end)),!0;if(A!==2)return!1;if(E.delta(r),l.delta(a),r.dot(a)<0){let P=l.start;l.start=l.end,l.end=P}const g=E.start.dot(r),_=E.end.dot(r),S=l.start.dot(r),w=l.end.dot(r),y=_ 0?f.start.copy(E.start):f.start.copy(l.start),c.subVectors(E.end,l.end),c.dot(r)<0?f.end.copy(E.end):f.end.copy(l.end)),!0)}}}();gt.prototype.distanceToPoint=function(){const h=new O;return function(t){return this.closestPointToPoint(t,h),t.distanceTo(h)}}();gt.prototype.distanceToTriangle=function(){const h=new O,t=new O,e=["a","b","c"],s=new At,i=new At;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 c=1/0;for(let d=0;d<3;d++){let E;const l=e[d],u=n[l];this.closestPointToPoint(u,h),E=u.distanceToSquared(h),Enew O),this.satAxes=new Array(3).fill().map(()=>new O),this.satBounds=new Array(3).fill().map(()=>new Pt),this.alignedSatBounds=new Array(3).fill().map(()=>new Pt),this.needsUpdate=!1,t&&this.min.copy(t),e&&this.max.copy(e),s&&this.matrix.copy(s)}set(t,e,s){this.min.copy(t),this.max.copy(e),this.matrix.copy(s),this.needsUpdate=!0}copy(t){this.min.copy(t.min),this.max.copy(t.max),this.matrix.copy(t.matrix),this.needsUpdate=!0}}at.prototype.update=function(){return function(){const h=this.matrix,t=this.min,e=this.max,s=this.points;for(let a=0;a<=1;a++)for(let c=0;c<=1;c++)for(let d=0;d<=1;d++){const E=1*a|2*c|4*d,l=s[E];l.x=a?e.x:t.x,l.y=c?e.y:t.y,l.z=d?e.z:t.z,l.applyMatrix4(h)}const i=this.satBounds,n=this.satAxes,o=s[0];for(let a=0;a<3;a++){const c=n[a],d=i[a],E=1<new At),e=new Array(12).fill().map(()=>new At),s=new O,i=new O;return function(n,o=0,r=null,a=null){if(this.needsUpdate&&this.update(),this.intersectsBox(n))return(r||a)&&(n.getCenter(i),this.closestPointToPoint(i,s),n.closestPointToPoint(s,i),r&&r.copy(s),a&&a.copy(i)),0;const c=o*o,d=n.min,E=n.max,l=this.points;let u=1/0;for(let C=0;C<8;C++){const f=l[C];i.copy(f).clamp(d,E);const m=f.distanceToSquared(i);if(mnew gt)}}const Et=new Ir;function ct(h,t){return t[h+15]===65535}function lt(h,t){return t[h+6]}function It(h,t){return t[h+14]}function ut(h){return h+8}function pt(h,t){return t[h+6]}function Bn(h,t){return t[h+7]}class ur{constructor(){this.float32Array=null,this.uint16Array=null,this.uint32Array=null;const t=[];let e=null;this.setBuffer=s=>{e&&t.push(e),e=s,this.float32Array=new Float32Array(s),this.uint16Array=new Uint16Array(s),this.uint32Array=new Uint32Array(s)},this.clearBuffer=()=>{e=null,this.float32Array=null,this.uint16Array=null,this.uint32Array=null,t.length!==0&&this.setBuffer(t.pop())}}}const Z=new ur;let Bt,Ce;const te=[],$e=new Pi(()=>new st);function pr(h,t,e,s,i,n){Bt=$e.getPrimitive(),Ce=$e.getPrimitive(),te.push(Bt,Ce),Z.setBuffer(h._roots[t]);const o=ei(0,h.geometry,e,s,i,n);Z.clearBuffer(),$e.releasePrimitive(Bt),$e.releasePrimitive(Ce),te.pop(),te.pop();const r=te.length;return r>0&&(Ce=te[r-1],Bt=te[r-2]),o}function ei(h,t,e,s,i=null,n=0,o=0){const{float32Array:r,uint16Array:a,uint32Array:c}=Z;let d=h*2;if(ct(d,a)){const E=lt(h,c),l=It(d,a);return j(h,r,Bt),s(E,l,!1,o,n+h,Bt)}else{let E=function(L){const{uint16Array:P,uint32Array:U}=Z;let x=L*2;for(;!ct(x,P);)L=ut(L),x=L*2;return lt(L,U)},l=function(L){const{uint16Array:P,uint32Array:U}=Z;let x=L*2;for(;!ct(x,P);)L=pt(L,U),x=L*2;return lt(L,U)+It(x,P)};const u=ut(h),T=pt(h,c);let C=u,f=T,m,R,F,p;if(i&&(F=Bt,p=Ce,j(C,r,F),j(f,r,p),m=i(F),R=i(p),R (_e.copy(t).clamp(d.min,d.max),_e.distanceToSquared(t)),intersectsBounds:(d,E,l)=>l {d.closestPointToPoint(t,_e);const l=t.distanceToSquared(_e);return l 0&&c.normal.multiplyScalar(-1));const d={a:n,b:o,c:r,normal:new O,materialIndex:0};pe.getNormal(ee,se,ie,d.normal),c.face=d,c.faceIndex=n}return c}function ws(h,t,e,s,i){const n=s*3;let o=n+0,r=n+1,a=n+2;const c=h.index;h.index&&(o=c.getX(o),r=c.getX(r),a=c.getX(a));const{position:d,normal:E,uv:l,uv1:u}=h.attributes,T=mr(e,d,E,l,u,o,r,a,t);return T?(T.faceIndex=s,i&&i.push(T),T):null}function $(h,t,e,s){const i=h.a,n=h.b,o=h.c;let r=t,a=t+1,c=t+2;e&&(r=e.getX(r),a=e.getX(a),c=e.getX(c)),i.x=s.getX(r),i.y=s.getY(r),i.z=s.getZ(r),n.x=s.getX(a),n.y=s.getY(a),n.z=s.getZ(a),o.x=s.getX(c),o.y=s.getY(c),o.z=s.getZ(c)}function fr(h,t,e,s,i,n){const{geometry:o,_indirectBuffer:r}=h;for(let a=s,c=s+i;a A&&(A=L),P g&&(g=P),U _&&(_=U)}return a[l+0]!==R||a[l+1]!==F||a[l+2]!==p||a[l+3]!==A||a[l+4]!==g||a[l+5]!==_?(a[l+0]=R,a[l+1]=F,a[l+2]=p,a[l+3]=A,a[l+4]=g,a[l+5]=_,!0):!1}else{const f=l+8,m=o[l+6],R=f+u,F=m+u;let p=T,A=!1,g=!1;t?p||(A=t.has(R),g=t.has(F),p=!A&&!g):(A=!0,g=!0);const _=p||A,S=p||g;let w=!1;_&&(w=E(f,u,p));let y=!1;S&&(y=E(m,u,p));const L=w||y;if(L)for(let P=0;P<3;P++){const U=f+P,x=m+P,Y=a[U],z=a[U+3],tt=a[x],H=a[x+3];a[l+P]=YH?z:H}return L}}}const Ji=new st;function Gt(h,t,e,s){return j(h,t,Ji),e.intersectBox(Ji,s)}function gr(h,t,e,s,i,n){const{geometry:o,_indirectBuffer:r}=h;for(let a=s,c=s+i;a
=0;let E,l;d?(E=ut(h),l=pt(h,o)):(E=pt(h,o),l=ut(h));const u=Gt(E,i,s,en)?ii(E,t,e,s):null;if(u){const C=u.point[c];if(d?C<=i[l+a]:C>=i[l+a+3])return u}const T=Gt(l,i,s,en)?ii(l,t,e,s):null;return u&&T?u.distance<=T.distance?u:T:u||T||null}}const is=new st,ne=new gt,oe=new gt,Se=new X,sn=new at,ns=new at;function yr(h,t,e,s){Z.setBuffer(h._roots[t]);const i=ni(0,h,e,s);return Z.clearBuffer(),i}function ni(h,t,e,s,i=null){const{float32Array:n,uint16Array:o,uint32Array:r}=Z;let a=h*2;if(i===null&&(e.boundingBox||e.computeBoundingBox(),sn.set(e.boundingBox.min,e.boundingBox.max,s),i=sn),ct(a,o)){const c=t.geometry,d=c.index,E=c.attributes.position,l=e.index,u=e.attributes.position,T=lt(h,r),C=It(a,o);if(Se.copy(s).invert(),e.boundsTree)return j(h,n,ns),ns.matrix.copy(Se),ns.needsUpdate=!0,e.boundsTree.shapecast({intersectsBounds:f=>ns.intersectsBox(f),intersectsTriangle:f=>{f.a.applyMatrix4(s),f.b.applyMatrix4(s),f.c.applyMatrix4(s),f.needsUpdate=!0;for(let m=T*3,R=(C+T)*3;m Bs.distanceToBox(A),intersectsBounds:(A,g,_)=>_ {if(t.boundsTree)return t.boundsTree.shapecast({boundsTraverseOrder:_=>Ne.distanceToBox(_),intersectsBounds:(_,S,w)=>w {for(let w=_,y=_+S;w A&&(A=U),x g&&(g=x),Y _&&(_=Y)}}return a[l+0]!==R||a[l+1]!==F||a[l+2]!==p||a[l+3]!==A||a[l+4]!==g||a[l+5]!==_?(a[l+0]=R,a[l+1]=F,a[l+2]=p,a[l+3]=A,a[l+4]=g,a[l+5]=_,!0):!1}else{const f=l+8,m=o[l+6],R=f+u,F=m+u;let p=T,A=!1,g=!1;t?p||(A=t.has(R),g=t.has(F),p=!A&&!g):(A=!0,g=!0);const _=p||A,S=p||g;let w=!1;_&&(w=E(f,u,p));let y=!1;S&&(y=E(m,u,p));const L=w||y;if(L)for(let P=0;P<3;P++){const U=f+P,x=m+P,Y=a[U],z=a[U+3],tt=a[x],H=a[x+3];a[l+P]=YH?z:H}return L}}}const nn=new O;function br(h,t,e,s,i){Z.setBuffer(h._roots[t]),oi(0,h,e,s,i),Z.clearBuffer()}function oi(h,t,e,s,i){const{float32Array:n,uint16Array:o,uint32Array:r}=Z,a=h*2;if(ct(a,o)){const c=lt(h,r),d=It(a,o);gr(t,e,s,c,d,i)}else{const c=ut(h);Gt(c,n,s,nn)&&oi(c,t,e,s,i);const d=pt(h,r);Gt(d,n,s,nn)&&oi(d,t,e,s,i)}}const on=new O,vr=["x","y","z"];function Br(h,t,e,s){Z.setBuffer(h._roots[t]);const i=ri(0,h,e,s);return Z.clearBuffer(),i}function ri(h,t,e,s){const{float32Array:i,uint16Array:n,uint32Array:o}=Z;let r=h*2;if(ct(r,n)){const a=lt(h,o),c=It(r,n);return Or(t,e,s,a,c)}else{const a=Bn(h,o),c=vr[a],d=s.direction[c]>=0;let E,l;d?(E=ut(h),l=pt(h,o)):(E=pt(h,o),l=ut(h));const u=Gt(E,i,s,on)?ri(E,t,e,s):null;if(u){const C=u.point[c];if(d?C<=i[l+a]:C>=i[l+a+3])return u}const T=Gt(l,i,s,on)?ri(l,t,e,s):null;return u&&T?u.distance<=T.distance?u:T:u||T||null}}const rs=new st,re=new gt,ae=new gt,we=new X,rn=new at,as=new at;function Yr(h,t,e,s){Z.setBuffer(h._roots[t]);const i=ai(0,h,e,s);return Z.clearBuffer(),i}function ai(h,t,e,s,i=null){const{float32Array:n,uint16Array:o,uint32Array:r}=Z;let a=h*2;if(i===null&&(e.boundingBox||e.computeBoundingBox(),rn.set(e.boundingBox.min,e.boundingBox.max,s),i=rn),ct(a,o)){const c=t.geometry,d=c.index,E=c.attributes.position,l=e.index,u=e.attributes.position,T=lt(h,r),C=It(a,o);if(we.copy(s).invert(),e.boundsTree)return j(h,n,as),as.matrix.copy(we),as.needsUpdate=!0,e.boundsTree.shapecast({intersectsBounds:f=>as.intersectsBox(f),intersectsTriangle:f=>{f.a.applyMatrix4(s),f.b.applyMatrix4(s),f.c.applyMatrix4(s),f.needsUpdate=!0;for(let m=T,R=C+T;m
Ys.distanceToBox(A),intersectsBounds:(A,g,_)=>_ {if(t.boundsTree){const _=t.boundsTree;return _.shapecast({boundsTraverseOrder:S=>ye.distanceToBox(S),intersectsBounds:(S,w,y)=>y {for(let y=S,L=S+w;y new st),he=new st,ce=new st,zs=new st,Gs=new st;let Vs=!1;function Xr(h,t,e,s){if(Vs)throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");Vs=!0;const i=h._roots,n=t._roots;let o,r=0,a=0;const c=new X().copy(e).invert();for(let d=0,E=i.length;d a.slice()),index:o.array.slice(),indirectBuffer:n?n.slice():null}:r={roots:i,index:o.array,indirectBuffer:n},r}static deserialize(t,e,s={}){s={setIndex:!0,indirect:!!t.indirectBuffer,...s};const{index:i,roots:n,indirectBuffer:o}=t,r=new Mi(e,{...s,[Ds]:!0});if(r._roots=n,r._indirectBuffer=o||null,s.setIndex){const a=e.getIndex();if(a===null){const c=new Ve(t.index,1,!1);e.setIndex(c)}else a.array!==i&&(a.array.set(i),a.needsUpdate=!0)}return r}get indirect(){return!!this._indirectBuffer}constructor(t,e={}){if(t.isBufferGeometry){if(t.index&&t.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.")}else throw new Error("MeshBVH: Only BufferGeometries are supported.");if(e=Object.assign({strategy:xn,maxDepth:40,maxLeafTris:10,verbose:!0,useSharedArrayBuffer:!1,setBoundingBox:!0,onProgress:null,indirect:!1,[Ds]:!1},e),e.useSharedArrayBuffer&&!Wr())throw new Error("MeshBVH: SharedArrayBuffer is not available.");this.geometry=t,this._roots=null,this._indirectBuffer=null,e[Ds]||(cr(this,e),!t.boundingBox&&e.setBoundingBox&&(t.boundingBox=this.getBoundingBox(new st)));const{_indirectBuffer:s}=this;this.resolveTriangleIndex=e.indirect?i=>s[i]:i=>i}refit(t=null){return(this.indirect?xr:Fr)(this,t)}traverse(t,e=0){const s=this._roots[e],i=new Uint32Array(s),n=new Uint16Array(s);o(0);function o(r,a=0){const c=r*2,d=n[c+15]===Ns;if(d){const E=i[r+6],l=n[c+14];t(a,d,new Float32Array(s,r*4,6),E,l)}else{const E=r+ms/4,l=i[r+6],u=i[r+7];t(a,d,new Float32Array(s,r*4,6),u)||(o(E,a+1),o(l,a+1))}}}raycast(t,e=ki){const s=this._roots,i=this.geometry,n=[],o=e.isMaterial,r=Array.isArray(e),a=i.groups,c=o?e.side:e,d=this.indirect?br:Sr;for(let E=0,l=s.length;E E(l,u,T,C,f)?!0:s(l,u,this,r,T,C,e)}else o||(r?o=(E,l,u,T)=>s(E,l,this,r,u,T,e):o=(E,l,u)=>u);let a=!1,c=0;const d=this._roots;for(let E=0,l=d.length;E {const C=this.resolveTriangleIndex(T);$(o,C*3,r,a)}:T=>{$(o,T*3,r,a)},d=Et.getPrimitive(),E=t.geometry.index,l=t.geometry.attributes.position,u=t.indirect?T=>{const C=t.resolveTriangleIndex(T);$(d,C*3,E,l)}:T=>{$(d,T*3,E,l)};if(n){const T=(C,f,m,R,F,p,A,g)=>{for(let _=m,S=m+R;_ cs.intersectsBox(s),intersectsTriangle:s=>cs.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?kr:Dr)(this,t,e,s,i,n,o)}closestPointToPoint(t,e={},s=0,i=1/0){return Cr(this,t,e,s,i)}getBoundingBox(t){return t.makeEmpty(),this._roots.forEach(e=>{j(0,new Float32Array(e),an),t.union(an)}),t}}function hn(h,t,e){return h===null||(h.point.applyMatrix4(t.matrixWorld),h.distance=h.point.distanceTo(e.ray.origin),h.object=t,h.distancee.far)?null:h}const Hs=new Go,cn=new X,Zr=D.prototype.raycast;function Qr(h,t){if(this.geometry.boundsTree){if(this.material===void 0)return;cn.copy(this.matrixWorld).invert(),Hs.copy(h.ray).applyMatrix4(cn);const e=this.geometry.boundsTree;if(h.firstHitOnly===!0){const s=hn(e.raycastFirst(Hs,this.material),this,h);s&&t.push(s)}else{const s=e.raycast(Hs,this.material);for(let i=0,n=s.length;i {const e=this.handlers.slice(0);for(const s of e)s(t)}),I(this,"handlers",[])}add(t){this.handlers.push(t)}remove(t){this.handlers=this.handlers.filter(e=>e!==t)}reset(){this.handlers.length=0}}class Kt{constructor(){I(this,"trigger",async t=>{const e=this.handlers.slice(0);for(const s of e)await s(t)}),I(this,"handlers",[])}add(t){this.handlers.push(t)}remove(t){this.handlers=this.handlers.filter(e=>e!==t)}reset(){this.handlers.length=0}}class Ui{constructor(t){I(this,"isDisposeable",()=>"dispose"in this&&"onDisposed"in this),I(this,"isResizeable",()=>"resize"in this&&"getSize"in this),I(this,"isUpdateable",()=>"onAfterUpdate"in this&&"onBeforeUpdate"in this&&"update"in this),I(this,"isHideable",()=>"visible"in this),I(this,"isConfigurable",()=>"setup"in this&&"config"in this&&"onSetup"in this),this.components=t}}class q extends Ui{}class Di extends Ui{constructor(t){super(t),I(this,"worlds",new Map),I(this,"onWorldChanged",new M),I(this,"currentWorld",null),this.onWorldChanged.add(({world:e,action:s})=>{s==="removed"&&this.worlds.delete(e.uuid)})}}class Kr extends Di{constructor(){super(...arguments),I(this,"hasCameraControls",()=>"controls"in this)}}class $r extends Di{constructor(){super(...arguments),I(this,"onAfterUpdate",new M),I(this,"onBeforeUpdate",new M),I(this,"onDisposed",new M),I(this,"onResize",new M),I(this,"onClippingPlanesUpdated",new M),I(this,"clippingPlanes",[])}updateClippingPlanes(){this.onClippingPlanesUpdated.trigger()}setPlane(t,e,s){e.isLocal=s;const i=this.clippingPlanes.indexOf(e);t&&i===-1?this.clippingPlanes.push(e):!t&&i>-1&&this.clippingPlanes.splice(i,1),this.three.clippingPlanes=this.clippingPlanes.filter(n=>!n.isLocal)}}const Yn=class hi extends q{constructor(t){super(t),I(this,"_disposedComponents",new Set),I(this,"enabled",!0),t.add(hi.uuid,this)}get(){return this._disposedComponents}destroy(t,e=!0,s=!0){t.removeFromParent();const i=t;i.dispose&&i.dispose(),this.disposeGeometryAndMaterials(t,e),s&&i.children&&i.children.length&&this.disposeChildren(i),t.children.length=0}disposeGeometry(t){const e=t;e.boundsTree&&e.disposeBoundsTree(),t.dispose()}disposeGeometryAndMaterials(t,e){const s=t;s.geometry&&this.disposeGeometry(s.geometry),e&&s.material&&hi.disposeMaterial(s),s.material=[],s.geometry=null}disposeChildren(t){for(const e of t.children)this.destroy(e)}static disposeMaterial(t){if(t.material)if(Array.isArray(t.material))for(const e of t.material)e.dispose();else t.material.dispose()}};I(Yn,"uuid","76e9cd8e-ad8f-4753-9ef6-cbc60f7247fe");let me=Yn;class Jr extends Di{constructor(t){super(t),I(this,"onDisposed",new M)}dispose(){const t=this.components.get(me);for(const e of this.three.children){const s=e;s.geometry&&t.destroy(s)}this.three.children=[],this.onDisposed.trigger(),this.onDisposed.reset()}}const fs=0,ta=1,ea=new O,ln=new At,ks=new fe,dn=new O,ls=new pe;class sa{constructor(){this.tolerance=-1,this.faces=[],this.newFaces=[],this.assigned=new En,this.unassigned=new En,this.vertices=[]}setFromPoints(t){if(t.length>=4){this.makeEmpty();for(let e=0,s=t.length;e this.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&&d>=0)return null;const E=d!==0?-c/d:0;if(!(E<=0)&&(d>0?n=Math.min(E,n):i=Math.max(E,i),i>n))return null}return i!==-1/0?t.at(i,e):t.at(n,e),e}intersectsRay(t){return this.intersectRay(t,ea)!==null}makeEmpty(){return this.faces=[],this.vertices=[],this}addVertexToFace(t,e){return t.face=e,e.outside===null?this.assigned.append(t):this.assigned.insertBefore(e.outside,t),e.outside=t,this}removeVertexFromFace(t,e){return t===e.outside&&(t.next!==null&&t.next.face===e?e.outside=t.next:e.outside=null),this.assigned.remove(t),this}removeAllVerticesFromFace(t){if(t.outside!==null){const e=t.outside;let s=t.outside;for(;s.next!==null&&s.next.face===t;)s=s.next;return this.assigned.removeSubList(e,s),e.prev=s.next=null,t.outside=null,e}}deleteFaceVertices(t,e){const s=this.removeAllVerticesFromFace(t);if(s!==void 0)if(e===void 0)this.unassigned.appendChain(s);else{let i=s;do{const n=i.next;e.distanceToPoint(i.point)>this.tolerance?this.addVertexToFace(i,e):this.unassigned.append(i),i=n}while(i!==null)}return this}resolveUnassignedPoints(t){if(this.unassigned.isEmpty()===!1){let e=this.unassigned.first();do{const s=e.next;let i=this.tolerance,n=null;for(let o=0;o i&&(i=a,n=r),i>1e3*this.tolerance)break}}n!==null&&this.addVertexToFace(e,n),e=s}while(e!==null)}return this}computeExtremes(){const t=new O,e=new O,s=[],i=[];for(let n=0;n<3;n++)s[n]=i[n]=this.vertices[0];t.copy(this.vertices[0].point),e.copy(this.vertices[0].point);for(let n=0,o=this.vertices.length;n e.getComponent(c)&&(e.setComponent(c,a.getComponent(c)),i[c]=r)}return this.tolerance=3*Number.EPSILON*(Math.max(Math.abs(t.x),Math.abs(e.x))+Math.max(Math.abs(t.y),Math.abs(e.y))+Math.max(Math.abs(t.z),Math.abs(e.z))),{min:s,max:i}}computeInitialHull(){const t=this.vertices,e=this.computeExtremes(),s=e.min,i=e.max;let n=0,o=0;for(let l=0;l<3;l++){const u=i[l].point.getComponent(l)-s[l].point.getComponent(l);u>n&&(n=u,o=l)}const r=s[o],a=i[o];let c,d;n=0,ln.set(r.point,a.point);for(let l=0,u=this.vertices.length;ln&&(n=C,c=T)}}n=-1,ks.setFromCoplanarPoints(r.point,a.point,c.point);for(let l=0,u=this.vertices.length;ln&&(n=C,d=T)}}const E=[];if(ks.distanceToPoint(d.point)<0){E.push(mt.create(r,a,c),mt.create(d,a,r),mt.create(d,c,a),mt.create(d,r,c));for(let l=0;l<3;l++){const u=(l+1)%3;E[l+1].getEdge(2).setTwin(E[0].getEdge(u)),E[l+1].getEdge(1).setTwin(E[u+1].getEdge(0))}}else{E.push(mt.create(r,c,a),mt.create(d,r,a),mt.create(d,a,c),mt.create(d,c,r));for(let l=0;l<3;l++){const u=(l+1)%3;E[l+1].getEdge(2).setTwin(E[0].getEdge((3-l)%3)),E[l+1].getEdge(0).setTwin(E[u+1].getEdge(1))}}for(let l=0;l<4;l++)this.faces.push(E[l]);for(let l=0,u=t.length;ln&&(n=m,C=this.faces[f])}C!==null&&this.addVertexToFace(T,C)}}return this}reindexFaces(){const t=[];for(let e=0;e e&&(e=n,t=i),i=i.next}while(i!==null&&i.face===s);return t}}computeHorizon(t,e,s,i){this.deleteFaceVertices(s),s.mark=ta;let n;e===null?n=e=s.getEdge(0):n=e.next;do{const o=n.twin,r=o.face;r.mark===fs&&(r.distanceToPoint(t)>this.tolerance?this.computeHorizon(t,o,r,i):i.push(n)),n=n.next}while(n!==e);return this}addAdjoiningFace(t,e){const s=mt.create(t,e.tail(),e.head());return this.faces.push(s),s.getEdge(-1).setTwin(e.twin),s.getEdge(0)}addNewFaces(t,e){this.newFaces=[];let s=null,i=null;for(let n=0;n 0;)e=e.next,t--;for(;t<0;)e=e.prev,t++;return e}compute(){const t=this.edge.tail(),e=this.edge.head(),s=this.edge.next.head();return ls.set(t.point,e.point,s.point),ls.getNormal(this.normal),ls.getMidpoint(this.midpoint),this.area=ls.getArea(),this.constant=this.normal.dot(this.midpoint),this}distanceToPoint(t){return this.normal.dot(t)-this.constant}}class Ws{constructor(t,e){this.vertex=t,this.prev=null,this.next=null,this.twin=null,this.face=e}head(){return this.vertex}tail(){return this.prev?this.prev.vertex:null}length(){const t=this.head(),e=this.tail();return e!==null?e.point.distanceTo(t.point):-1}lengthSquared(){const t=this.head(),e=this.tail();return e!==null?e.point.distanceToSquared(t.point):-1}setTwin(t){return this.twin=t,t.twin=this,this}}class ia{constructor(t){this.point=t,this.prev=null,this.next=null,this.face=null}}class En{constructor(){this.head=null,this.tail=null}first(){return this.head}last(){return this.tail}clear(){return this.head=this.tail=null,this}insertBefore(t,e){return e.prev=t.prev,e.next=t,e.prev===null?this.head=e:e.prev.next=e,t.prev=e,this}insertAfter(t,e){return e.prev=t,e.next=t.next,e.next===null?this.tail=e:e.next.prev=e,t.next=e,this}append(t){return this.head===null?this.head=t:this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t,this}appendChain(t){for(this.head===null?this.head=t:this.tail.next=t,t.prev=this.tail;t.next!==null;)t=t.next;return this.tail=t,this}remove(t){return t.prev===null?this.head=t.next:t.prev.next=t.next,t.next===null?this.tail=t.prev:t.next.prev=t.prev,this}removeSubList(t,e){return t.prev===null?this.head=e.next:t.prev.next=e.next,e.next===null?this.tail=t.prev:e.next.prev=t.prev,this}isEmpty(){return this.head===null}}const ci=[2,2,1],li=[1,0,0];function Nt(h,t){return h*3+t}function na(h){const t=h.elements;let e=0;for(let s=0;s<9;s++)e+=t[s]*t[s];return Math.sqrt(e)}function oa(h){const t=h.elements;let e=0;for(let s=0;s<3;s++){const i=t[Nt(ci[s],li[s])];e+=2*i*i}return Math.sqrt(e)}function ra(h,t){let e=0,s=1;const i=h.elements;for(let c=0;c<3;c++){const d=Math.abs(i[Nt(ci[c],li[c])]);d>e&&(e=d,s=c)}let n=1,o=0;const r=li[s],a=ci[s];if(Math.abs(i[Nt(a,r)])>Number.EPSILON){const c=i[Nt(a,a)],d=i[Nt(r,r)],E=i[Nt(a,r)],l=(c-d)/2/E;let u;l<0?u=-1/(-l+Math.sqrt(1+l*l)):u=1/(l+Math.sqrt(1+l*l)),n=1/Math.sqrt(1+u*u),o=u*n}return t.identity(),t.elements[Nt(r,r)]=n,t.elements[Nt(a,a)]=n,t.elements[Nt(a,r)]=o,t.elements[Nt(r,a)]=-o,t}function aa(h,t){let e=0,s=0;const i=10;t.unitary.identity(),t.diagonal.copy(h);const n=t.unitary,o=t.diagonal,r=new jt,a=new jt,c=Number.EPSILON*na(o);for(;sc;)ra(o,r),a.copy(r).transpose(),o.multiply(r),o.premultiply(a),n.multiply(r),++e>2&&(s++,e=0);return t}function ha(h){const t=[];for(let J=0;J 0}class In{static isTransparent(t){return t.transparent&&t.opacity<1}}const di=class et{static create(){const t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,s=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return`${et._lut[t&255]+et._lut[t>>8&255]+et._lut[t>>16&255]+et._lut[t>>24&255]}-${et._lut[e&255]}${et._lut[e>>8&255]}-${et._lut[e>>16&15|64]}${et._lut[e>>24&255]}-${et._lut[s&63|128]}${et._lut[s>>8&255]}-${et._lut[s>>16&255]}${et._lut[s>>24&255]}${et._lut[i&255]}${et._lut[i>>8&255]}${et._lut[i>>16&255]}${et._lut[i>>24&255]}`.toLowerCase()}static validate(t){if(!et._pattern.test(t))throw new Error(`${t} is not a valid UUID v4. + +- If you're the tool creator, you can take one from https://www.uuidgenerator.net/. + +- If you're using a platform tool, verify the uuid isn't misspelled or contact the tool creator.`)}};I(di,"_pattern",/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/),I(di,"_lut",["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"]);let xi=di;class th extends q{constructor(t,e){super(t),I(this,"onVertexFound",new M),I(this,"onVertexLost",new M),I(this,"components"),I(this,"_pickedPoint",null),I(this,"_config"),I(this,"_enabled",!1),I(this,"_workingPlane",null),this.components=t,this.config={snapDistance:.25,showOnlyVertex:!1,...e},this.enabled=!1}set enabled(t){this._enabled=t,t||(this._pickedPoint=null)}get enabled(){return this._enabled}set workingPlane(t){this._workingPlane=t}get workingPlane(){return this._workingPlane}set config(t){this._config={...this._config,...t}}get config(){return this._config}dispose(){this.onVertexFound.reset(),this.onVertexLost.reset(),this.components=null}get(t){if(!this.enabled)return this._pickedPoint;const e=this.components.get(Ei).get(t).castRay();if(!e)return this._pickedPoint!==null&&(this.onVertexLost.trigger(),this._pickedPoint=null),this._pickedPoint;const s=this.getClosestVertex(e);return s?!this.workingPlane||Math.abs(this.workingPlane.distanceToPoint(s))<.001?((this._pickedPoint===null||!this._pickedPoint.equals(s))&&(this._pickedPoint=s.clone(),this.onVertexFound.trigger(this._pickedPoint)),this._pickedPoint):(this._pickedPoint=null,this._pickedPoint):(this._pickedPoint!==null&&(this.onVertexLost.trigger(),this._pickedPoint=null),this._pickedPoint)}getClosestVertex(t){let e=new O,s=!1,i=Number.MAX_SAFE_INTEGER;const n=this.getVertices(t);return n==null||n.forEach(o=>{if(!o)return;const r=t.point.distanceTo(o);r>i||r>this._config.snapDistance||(s=!0,e=o,i=t.point.distanceTo(o))}),s?e:this.config.showOnlyVertex?null:t.point}getVertices(t){const e=t.object;if(!t.face||!e)return null;const s=e.geometry;return[this.getVertex(t.face.a,s),this.getVertex(t.face.b,s),this.getVertex(t.face.c,s)].map(i=>i==null?void 0:i.applyMatrix4(e.matrixWorld))}getVertex(t,e){if(t===void 0)return null;const s=e.attributes.position;return new O(s.getX(t),s.getY(t),s.getZ(t))}}const zn=class Gn{constructor(){I(this,"onDisposed",new M),I(this,"list",new Map),I(this,"enabled",!1),I(this,"_clock"),I(this,"update",()=>{if(!this.enabled)return;const t=this._clock.getDelta();for(const[e,s]of this.list)s.enabled&&s.isUpdateable()&&s.update(t);requestAnimationFrame(this.update)}),this._clock=new No,Gn.setupBVH()}add(t,e){if(this.list.has(t))throw new Error("You're trying to add a component that already exists in the components intance. Use Components.get() instead.");xi.validate(t),this.list.set(t,e)}get(t){const e=t.uuid;if(!this.list.has(e)){const s=new t(this);return this.list.has(e)||this.add(e,s),s}return this.list.get(e)}init(){this.enabled=!0,this._clock.start(),this.update()}dispose(){this.enabled=!1;for(const[t,e]of this.list)e.enabled=!1,e.isDisposeable()&&e.dispose();this._clock.stop(),this.onDisposed.trigger(),this.onDisposed.reset()}static setupBVH(){ze.prototype.computeBoundsTree=jr,ze.prototype.disposeBoundsTree=qr,D.prototype.raycast=Qr}};I(zn,"release","1.4.21");let la=zn;class da{constructor(t){I(this,"_event"),I(this,"_position",new Ft),I(this,"onDisposed",new M),I(this,"updateMouseInfo",e=>{this._event=e}),this.dom=t,this.setupEvents(!0)}get position(){if(this._event){const t=this.dom.getBoundingClientRect();this._position.x=this.getPositionX(t,this._event),this._position.y=this.getPositionY(t,this._event)}return this._position}dispose(){this.setupEvents(!1),this.onDisposed.trigger(),this.onDisposed.reset()}getPositionY(t,e){return-((e.clientY-t.top)/(t.bottom-t.top))*2+1}getPositionX(t,e){return(e.clientX-t.left)/(t.right-t.left)*2-1}setupEvents(t){t?this.dom.addEventListener("mousemove",this.updateMouseInfo):this.dom.removeEventListener("mousemove",this.updateMouseInfo)}}class Ea{constructor(t,e){I(this,"enabled",!0),I(this,"components"),I(this,"onDisposed",new M),I(this,"mouse"),I(this,"three",new Ti),I(this,"world");const s=e.renderer;if(!s)throw new Error("A renderer is needed for the raycaster to work!");this.world=e,this.mouse=new da(s.three.domElement),this.components=t}dispose(){this.mouse.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}castRay(t=Array.from(this.world.meshes)){if(!this.world)throw new Error("A world is needed to cast rays!");const e=this.world.camera.three;return this.three.setFromCamera(this.mouse.position,e),this.intersect(t)}castRayFromVector(t,e,s=Array.from(this.world.meshes)){return this.three.set(t,e),this.intersect(s)}intersect(t=Array.from(this.world.meshes)){const e=this.three.intersectObjects(t),s=this.filterClippingPlanes(e);return s.length>0?s[0]:null}filterClippingPlanes(t){if(!this.world.renderer)throw new Error("Renderer not found!");const e=this.world.renderer.three;if(!e.clippingPlanes)return t;const s=e.clippingPlanes;return t.length<=0||!s||(s==null?void 0:s.length)<=0?t:t.filter(i=>s.every(n=>n.distanceToPoint(i.point)>0))}}const Vn=class Hn extends q{constructor(t){super(t),I(this,"enabled",!0),I(this,"list",new Map),I(this,"onDisposed",new M),t.add(Hn.uuid,this)}get(t){if(this.list.has(t.uuid))return this.list.get(t.uuid);const e=new Ea(this.components,t);return this.list.set(t.uuid,e),t.onDisposed.add(()=>{this.delete(t)}),e}delete(t){const e=this.list.get(t.uuid);e&&e.dispose(),this.list.delete(t.uuid)}dispose(){for(const[t,e]of this.list)e.dispose();this.list.clear(),this.onDisposed.trigger()}};I(Vn,"uuid","d5d8bdf0-db25-4952-b951-b643af207ace");let Ei=Vn;class Ia extends Ui{constructor(t){super(t),I(this,"meshes",new Set),I(this,"onAfterUpdate",new M),I(this,"onBeforeUpdate",new M),I(this,"enabled",!0),I(this,"uuid",xi.create()),I(this,"onDisposed",new M),I(this,"_scene"),I(this,"_camera"),I(this,"_renderer",null)}get scene(){if(!this._scene)throw new Error("No scene initialized!");return this._scene}set scene(t){this._scene=t,t.worlds.set(this.uuid,this),t.currentWorld=this,t.onWorldChanged.trigger({world:this,action:"added"})}get camera(){if(!this._camera)throw new Error("No camera initialized!");return this._camera}set camera(t){this._camera=t,t.worlds.set(this.uuid,this),t.currentWorld=this,t.onWorldChanged.trigger({world:this,action:"added"})}get renderer(){return this._renderer}set renderer(t){this._renderer=t,t&&(t.worlds.set(this.uuid,this),t.currentWorld=this,t.onWorldChanged.trigger({world:this,action:"added"}))}update(t){this.enabled&&(!this._scene||!this._camera||(this.scene.currentWorld=this,this.camera.currentWorld=this,this.renderer&&(this.renderer.currentWorld=this),this.onBeforeUpdate.trigger(),this.scene.isUpdateable()&&this.scene.update(t),this.camera.isUpdateable()&&this.camera.update(t),this.renderer&&this.renderer.update(t),this.onAfterUpdate.trigger()))}dispose(t=!0){if(this.enabled=!1,this.scene.onWorldChanged.trigger({world:this,action:"removed"}),this.camera.onWorldChanged.trigger({world:this,action:"removed"}),this.renderer&&this.renderer.onWorldChanged.trigger({world:this,action:"removed"}),t){const e=this.components.get(me);this.scene.dispose(),this.camera.isDisposeable()&&this.camera.dispose(),this.renderer&&this.renderer.dispose();for(const s of this.meshes)e.destroy(s);this.meshes.clear()}this._scene=null,this._camera=null,this._renderer=null,this.onDisposed.trigger()}}class eh extends Jr{constructor(t){super(t),I(this,"isSetup",!1),I(this,"three"),I(this,"onSetup",new M),I(this,"config",{directionalLight:{color:new qt("white"),intensity:1.5,position:new O(5,10,3)},ambientLight:{color:new qt("white"),intensity:1}}),this.three=new mi,this.three.background=new qt(2107698)}setup(t){this.config={...this.config,...t};const e=new Ao(this.config.directionalLight.color,this.config.directionalLight.intensity);e.position.copy(this.config.directionalLight.position);const s=new Fo(this.config.ambientLight.color,this.config.ambientLight.intensity);this.three.add(e,s),this.isSetup=!0,this.onSetup.trigger(this)}}class sh extends $r{constructor(t,e,s){super(t),I(this,"enabled",!0),I(this,"container"),I(this,"three"),I(this,"_canvas"),I(this,"_parameters"),I(this,"_resizeObserver",null),I(this,"onContainerUpdated",new M),I(this,"resize",o=>{this.onContainerUpdated.trigger();const r=o?o.x:this.container.clientWidth,a=o?o.y:this.container.clientHeight;this.three.setSize(r,a),this.onResize.trigger(new Ft(r,a))}),I(this,"resizeEvent",()=>{this.resize()}),I(this,"onContextLost",o=>{o.preventDefault(),this.enabled=!1}),I(this,"onContextBack",()=>{this.three.setRenderTarget(null),this.three.dispose(),this.three=new As({canvas:this._canvas,antialias:!0,alpha:!0,...this._parameters}),this.enabled=!0}),this.container=e,this._parameters=s,this.three=new As({antialias:!0,alpha:!0,...s}),this.three.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.setupRenderer(),this.setupEvents(!0),this.resize(),this._canvas=this.three.domElement;const i=this.three.getContext(),{canvas:n}=i;n.addEventListener("webglcontextlost",this.onContextLost,!1),n.addEventListener("webglcontextrestored",this.onContextBack,!1)}update(){if(!this.enabled||!this.currentWorld)return;this.onBeforeUpdate.trigger(this);const t=this.currentWorld.scene.three,e=this.currentWorld.camera.three;this.three.render(t,e),this.onAfterUpdate.trigger(this)}dispose(){this.enabled=!1,this.setupEvents(!1),this.three.domElement.remove(),this.three.dispose(),this.onResize.reset(),this.onAfterUpdate.reset(),this.onBeforeUpdate.reset(),this.onDisposed.trigger(),this.onDisposed.reset()}getSize(){return new Ft(this.three.domElement.clientWidth,this.three.domElement.clientHeight)}setupEvents(t){const e=this.three.domElement.parentElement;if(!e)throw new Error("This renderer needs to have an HTML container!");this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),window.removeEventListener("resize",this.resizeEvent),t&&(this._resizeObserver=new ResizeObserver(this.resizeEvent),this._resizeObserver.observe(e),this._resizeObserver.observe(document.body),window.addEventListener("resize",this.resizeEvent))}setupRenderer(){this.three.localClippingEnabled=!0,this.container&&this.container.appendChild(this.three.domElement),this.onContainerUpdated.trigger()}}/*! + * camera-controls + * https://github.com/yomotsu/camera-controls + * (c) 2017 @yomotsu + * Released under the MIT License. + */const v={LEFT:1,RIGHT:2,MIDDLE:4},N=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),le={NONE:0,IN:1,OUT:-1};function Wt(h){return h.isPerspectiveCamera}function bt(h){return h.isOrthographicCamera}const de=Math.PI*2,un=Math.PI/2,kn=1e-5,Le=Math.PI/180;function Tt(h,t,e){return Math.max(t,Math.min(e,h))}function W(h,t=kn){return Math.abs(h) 0==u>d&&(u=d,e.value=(u-d)/n),u}function Cn(h,t,e,s,i=1/0,n,o){s=Math.max(1e-4,s);const r=2/s,a=r*n,c=1/(1+a+.48*a*a+.235*a*a*a);let d=t.x,E=t.y,l=t.z,u=h.x-d,T=h.y-E,C=h.z-l;const f=d,m=E,R=l,F=i*s,p=F*F,A=u*u+T*T+C*C;if(A>p){const Y=Math.sqrt(A);u=u/Y*F,T=T/Y*F,C=C/Y*F}d=h.x-u,E=h.y-T,l=h.z-C;const g=(e.x+r*u)*n,_=(e.y+r*T)*n,S=(e.z+r*C)*n;e.x=(e.x-r*g)*c,e.y=(e.y-r*_)*c,e.z=(e.z-r*S)*c,o.x=d+(u+g)*c,o.y=E+(T+_)*c,o.z=l+(C+S)*c;const w=f-h.x,y=m-h.y,L=R-h.z,P=o.x-f,U=o.y-m,x=o.z-R;return w*P+y*U+L*x>0&&(o.x=f,o.y=m,o.z=R,e.x=(o.x-f)/n,e.y=(o.y-m)/n,e.z=(o.z-R)/n),o}function Xs(h,t){t.set(0,0),h.forEach(e=>{t.x+=e.clientX,t.y+=e.clientY}),t.x/=h.length,t.y/=h.length}function Zs(h,t){return bt(h)?(console.warn(`${t} is not supported in OrthographicCamera`),!0):!1}class ua{constructor(){this._listeners={}}addEventListener(t,e){const s=this._listeners;s[t]===void 0&&(s[t]=[]),s[t].indexOf(e)===-1&&s[t].push(e)}hasEventListener(t,e){const s=this._listeners;return s[t]!==void 0&&s[t].indexOf(e)!==-1}removeEventListener(t,e){const s=this._listeners[t];if(s!==void 0){const i=s.indexOf(e);i!==-1&&s.splice(i,1)}}removeAllEventListeners(t){if(!t){this._listeners={};return}Array.isArray(this._listeners[t])&&(this._listeners[t].length=0)}dispatchEvent(t){const e=this._listeners[t.type];if(e!==void 0){t.target=this;const s=e.slice(0);for(let i=0,n=s.length;i {},this._enabled=!0,this._state=N.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._dragNeedsUpdate=!0,this._activePointers=[],this._lockedPointer=null,this._interactiveArea=new DOMRect(0,0,1,1),this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=le.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new b.Vector3,this._focalOffsetVelocity=new b.Vector3,this._zoomVelocity={value:0},this._truckInternal=(p,A,g)=>{let _,S;if(Wt(this._camera)){const w=B.copy(this._camera.position).sub(this._target),y=this._camera.getEffectiveFOV()*Le,L=w.length()*Math.tan(y*.5);_=this.truckSpeed*p*L/this._elementRect.height,S=this.truckSpeed*A*L/this._elementRect.height}else if(bt(this._camera)){const w=this._camera;_=p*(w.right-w.left)/w.zoom/this._elementRect.width,S=A*(w.top-w.bottom)/w.zoom/this._elementRect.height}else return;this.verticalDragToForward?(g?this.setFocalOffset(this._focalOffsetEnd.x+_,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(_,0,!0),this.forward(-S,!0)):g?this.setFocalOffset(this._focalOffsetEnd.x+_,this._focalOffsetEnd.y+S,this._focalOffsetEnd.z,!0):this.truck(_,S,!0)},this._rotateInternal=(p,A)=>{const g=de*this.azimuthRotateSpeed*p/this._elementRect.height,_=de*this.polarRotateSpeed*A/this._elementRect.height;this.rotate(g,_,!0)},this._dollyInternal=(p,A,g)=>{const _=Math.pow(.95,-p*this.dollySpeed),S=this._sphericalEnd.radius,w=this._sphericalEnd.radius*_,y=Tt(w,this.minDistance,this.maxDistance),L=y-w;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(w,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(L,!0),this._dollyToNoClamp(y,!0)):this._dollyToNoClamp(y,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?w:y)-S,this._dollyControlCoord.set(A,g)),this._lastDollyDirection=Math.sign(-p)},this._zoomInternal=(p,A,g)=>{const _=Math.pow(.95,p*this.dollySpeed),S=this._zoom,w=this._zoom*_;this.zoomTo(w,!0),this.dollyToCursor&&(this._changedZoom+=w-S,this._dollyControlCoord.set(A,g))},typeof b>"u"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=t,this._yAxisUpSpace=new b.Quaternion().setFromUnitVectors(this._camera.up,Is),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=N.NONE,this._target=new b.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new b.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new b.Spherical().setFromVector3(B.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new b.Vector3,new b.Vector3,new b.Vector3,new b.Vector3],this._updateNearPlaneCorners(),this._boundary=new b.Box3(new b.Vector3(-1/0,-1/0,-1/0),new b.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new b.Vector2,this.mouseButtons={left:N.ROTATE,middle:N.DOLLY,right:N.TRUCK,wheel:Wt(this._camera)?N.DOLLY:bt(this._camera)?N.ZOOM:N.NONE},this.touches={one:N.TOUCH_ROTATE,two:Wt(this._camera)?N.TOUCH_DOLLY_TRUCK:bt(this._camera)?N.TOUCH_ZOOM_TRUCK:N.NONE,three:N.TOUCH_TRUCK};const s=new b.Vector2,i=new b.Vector2,n=new b.Vector2,o=p=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const _=this._domElement.getBoundingClientRect(),S=p.clientX/_.width,w=p.clientY/_.height;if(S this._interactiveArea.right||w this._interactiveArea.bottom)return}const A=p.pointerType!=="mouse"?null:(p.buttons&v.LEFT)===v.LEFT?v.LEFT:(p.buttons&v.MIDDLE)===v.MIDDLE?v.MIDDLE:(p.buttons&v.RIGHT)===v.RIGHT?v.RIGHT:null;if(A!==null){const _=this._findPointerByMouseButton(A);_&&this._disposePointer(_)}if((p.buttons&v.LEFT)===v.LEFT&&this._lockedPointer)return;const g={pointerId:p.pointerId,clientX:p.clientX,clientY:p.clientY,deltaX:0,deltaY:0,mouseButton:A};this._activePointers.push(g),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",d),this._domElement.ownerDocument.addEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",d),this._isDragging=!0,C(p)},r=p=>{if(!this._enabled||!this._domElement||this._lockedPointer)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const _=this._domElement.getBoundingClientRect(),S=p.clientX/_.width,w=p.clientY/_.height;if(S this._interactiveArea.right||w this._interactiveArea.bottom)return}const A=(p.buttons&v.LEFT)===v.LEFT?v.LEFT:(p.buttons&v.MIDDLE)===v.MIDDLE?v.MIDDLE:(p.buttons&v.RIGHT)===v.RIGHT?v.RIGHT:null;if(A!==null){const _=this._findPointerByMouseButton(A);_&&this._disposePointer(_)}const g={pointerId:1,clientX:p.clientX,clientY:p.clientY,deltaX:0,deltaY:0,mouseButton:(p.buttons&v.LEFT)===v.LEFT?v.LEFT:(p.buttons&v.MIDDLE)===v.LEFT?v.MIDDLE:(p.buttons&v.RIGHT)===v.LEFT?v.RIGHT:null};this._activePointers.push(g),this._domElement.ownerDocument.removeEventListener("mousemove",c),this._domElement.ownerDocument.removeEventListener("mouseup",E),this._domElement.ownerDocument.addEventListener("mousemove",c),this._domElement.ownerDocument.addEventListener("mouseup",E),this._isDragging=!0,C(p)},a=p=>{p.cancelable&&p.preventDefault();const A=p.pointerId,g=this._lockedPointer||this._findPointerById(A);if(g){if(g.clientX=p.clientX,g.clientY=p.clientY,g.deltaX=p.movementX,g.deltaY=p.movementY,this._state=0,p.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(p.buttons&v.LEFT)===v.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(p.buttons&v.MIDDLE)===v.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(p.buttons&v.RIGHT)===v.RIGHT&&(this._state=this._state|this.mouseButtons.right);f()}},c=p=>{const A=this._lockedPointer||this._findPointerById(1);A&&(A.clientX=p.clientX,A.clientY=p.clientY,A.deltaX=p.movementX,A.deltaY=p.movementY,this._state=0,(this._lockedPointer||(p.buttons&v.LEFT)===v.LEFT)&&(this._state=this._state|this.mouseButtons.left),(p.buttons&v.MIDDLE)===v.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(p.buttons&v.RIGHT)===v.RIGHT&&(this._state=this._state|this.mouseButtons.right),f())},d=p=>{const A=this._findPointerById(p.pointerId);if(!(A&&A===this._lockedPointer)){if(A&&this._disposePointer(A),p.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=N.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=N.NONE;m()}},E=()=>{const p=this._findPointerById(1);p&&p===this._lockedPointer||(p&&this._disposePointer(p),this._state=N.NONE,m())};let l=-1;const u=p=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===N.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const w=this._domElement.getBoundingClientRect(),y=p.clientX/w.width,L=p.clientY/w.height;if(y this._interactiveArea.right||L this._interactiveArea.bottom)return}if(p.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===N.ROTATE||this.mouseButtons.wheel===N.TRUCK){const w=performance.now();l-w<1e3&&this._getClientRect(this._elementRect),l=w}const A=Ca?-1:-3,g=p.deltaMode===1?p.deltaY/A:p.deltaY/(A*10),_=this.dollyToCursor?(p.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,S=this.dollyToCursor?(p.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case N.ROTATE:{this._rotateInternal(p.deltaX,p.deltaY),this._isUserControllingRotate=!0;break}case N.TRUCK:{this._truckInternal(p.deltaX,p.deltaY,!1),this._isUserControllingTruck=!0;break}case N.OFFSET:{this._truckInternal(p.deltaX,p.deltaY,!0),this._isUserControllingOffset=!0;break}case N.DOLLY:{this._dollyInternal(-g,_,S),this._isUserControllingDolly=!0;break}case N.ZOOM:{this._zoomInternal(-g,_,S),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},T=p=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===ot.ACTION.NONE){const A=p instanceof PointerEvent?p.pointerId:0,g=this._findPointerById(A);g&&this._disposePointer(g),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",d),this._domElement.ownerDocument.removeEventListener("mousemove",c),this._domElement.ownerDocument.removeEventListener("mouseup",E);return}p.preventDefault()}},C=p=>{if(this._enabled){if(Xs(this._activePointers,ht),this._getClientRect(this._elementRect),s.copy(ht),i.copy(ht),this._activePointers.length>=2){const A=ht.x-this._activePointers[1].clientX,g=ht.y-this._activePointers[1].clientY,_=Math.sqrt(A*A+g*g);n.set(0,_);const S=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,w=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;i.set(S,w)}if(this._state=0,!p)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in p&&p.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else!this._lockedPointer&&(p.buttons&v.LEFT)===v.LEFT&&(this._state=this._state|this.mouseButtons.left),(p.buttons&v.MIDDLE)===v.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(p.buttons&v.RIGHT)===v.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&N.ROTATE)===N.ROTATE||(this._state&N.TOUCH_ROTATE)===N.TOUCH_ROTATE||(this._state&N.TOUCH_DOLLY_ROTATE)===N.TOUCH_DOLLY_ROTATE||(this._state&N.TOUCH_ZOOM_ROTATE)===N.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&N.TRUCK)===N.TRUCK||(this._state&N.TOUCH_TRUCK)===N.TOUCH_TRUCK||(this._state&N.TOUCH_DOLLY_TRUCK)===N.TOUCH_DOLLY_TRUCK||(this._state&N.TOUCH_ZOOM_TRUCK)===N.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&N.DOLLY)===N.DOLLY||(this._state&N.TOUCH_DOLLY)===N.TOUCH_DOLLY||(this._state&N.TOUCH_DOLLY_TRUCK)===N.TOUCH_DOLLY_TRUCK||(this._state&N.TOUCH_DOLLY_OFFSET)===N.TOUCH_DOLLY_OFFSET||(this._state&N.TOUCH_DOLLY_ROTATE)===N.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&N.ZOOM)===N.ZOOM||(this._state&N.TOUCH_ZOOM)===N.TOUCH_ZOOM||(this._state&N.TOUCH_ZOOM_TRUCK)===N.TOUCH_ZOOM_TRUCK||(this._state&N.TOUCH_ZOOM_OFFSET)===N.TOUCH_ZOOM_OFFSET||(this._state&N.TOUCH_ZOOM_ROTATE)===N.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&N.OFFSET)===N.OFFSET||(this._state&N.TOUCH_OFFSET)===N.TOUCH_OFFSET||(this._state&N.TOUCH_DOLLY_OFFSET)===N.TOUCH_DOLLY_OFFSET||(this._state&N.TOUCH_ZOOM_OFFSET)===N.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})}},f=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,Xs(this._activePointers,ht);const p=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,A=p?-p.deltaX:i.x-ht.x,g=p?-p.deltaY:i.y-ht.y;if(i.copy(ht),((this._state&N.ROTATE)===N.ROTATE||(this._state&N.TOUCH_ROTATE)===N.TOUCH_ROTATE||(this._state&N.TOUCH_DOLLY_ROTATE)===N.TOUCH_DOLLY_ROTATE||(this._state&N.TOUCH_ZOOM_ROTATE)===N.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(A,g),this._isUserControllingRotate=!0),(this._state&N.DOLLY)===N.DOLLY||(this._state&N.ZOOM)===N.ZOOM){const _=this.dollyToCursor?(s.x-this._elementRect.x)/this._elementRect.width*2-1:0,S=this.dollyToCursor?(s.y-this._elementRect.y)/this._elementRect.height*-2+1:0,w=this.dollyDragInverted?-1:1;(this._state&N.DOLLY)===N.DOLLY?(this._dollyInternal(w*g*Es,_,S),this._isUserControllingDolly=!0):(this._zoomInternal(w*g*Es,_,S),this._isUserControllingZoom=!0)}if((this._state&N.TOUCH_DOLLY)===N.TOUCH_DOLLY||(this._state&N.TOUCH_ZOOM)===N.TOUCH_ZOOM||(this._state&N.TOUCH_DOLLY_TRUCK)===N.TOUCH_DOLLY_TRUCK||(this._state&N.TOUCH_ZOOM_TRUCK)===N.TOUCH_ZOOM_TRUCK||(this._state&N.TOUCH_DOLLY_OFFSET)===N.TOUCH_DOLLY_OFFSET||(this._state&N.TOUCH_ZOOM_OFFSET)===N.TOUCH_ZOOM_OFFSET||(this._state&N.TOUCH_DOLLY_ROTATE)===N.TOUCH_DOLLY_ROTATE||(this._state&N.TOUCH_ZOOM_ROTATE)===N.TOUCH_ZOOM_ROTATE){const _=ht.x-this._activePointers[1].clientX,S=ht.y-this._activePointers[1].clientY,w=Math.sqrt(_*_+S*S),y=n.y-w;n.set(0,w);const L=this.dollyToCursor?(i.x-this._elementRect.x)/this._elementRect.width*2-1:0,P=this.dollyToCursor?(i.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&N.TOUCH_DOLLY)===N.TOUCH_DOLLY||(this._state&N.TOUCH_DOLLY_ROTATE)===N.TOUCH_DOLLY_ROTATE||(this._state&N.TOUCH_DOLLY_TRUCK)===N.TOUCH_DOLLY_TRUCK||(this._state&N.TOUCH_DOLLY_OFFSET)===N.TOUCH_DOLLY_OFFSET?(this._dollyInternal(y*Es,L,P),this._isUserControllingDolly=!0):(this._zoomInternal(y*Es,L,P),this._isUserControllingZoom=!0)}((this._state&N.TRUCK)===N.TRUCK||(this._state&N.TOUCH_TRUCK)===N.TOUCH_TRUCK||(this._state&N.TOUCH_DOLLY_TRUCK)===N.TOUCH_DOLLY_TRUCK||(this._state&N.TOUCH_ZOOM_TRUCK)===N.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(A,g,!1),this._isUserControllingTruck=!0),((this._state&N.OFFSET)===N.OFFSET||(this._state&N.TOUCH_OFFSET)===N.TOUCH_OFFSET||(this._state&N.TOUCH_DOLLY_OFFSET)===N.TOUCH_DOLLY_OFFSET||(this._state&N.TOUCH_ZOOM_OFFSET)===N.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(A,g,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},m=()=>{Xs(this._activePointers,ht),i.copy(ht),this._dragNeedsUpdate=!1,(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",c),this._domElement.ownerDocument.removeEventListener("pointerup",d),this._domElement.ownerDocument.removeEventListener("mouseup",E),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",d),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",R),this._domElement.ownerDocument.addEventListener("pointerlockerror",F),this._domElement.ownerDocument.addEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",d),C())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),document.exitPointerLock(),this.cancel(),this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointerlockchange",R),this._domElement.ownerDocument.removeEventListener("pointerlockerror",F))};const R=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},F=()=>{this.unlockPointer()};this._addAllEventListeners=p=>{this._domElement=p,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",o),Ta&&this._domElement.addEventListener("mousedown",r),this._domElement.addEventListener("pointercancel",d),this._domElement.addEventListener("wheel",u,{passive:!1}),this._domElement.addEventListener("contextmenu",T)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",o),this._domElement.removeEventListener("mousedown",r),this._domElement.removeEventListener("pointercancel",d),this._domElement.removeEventListener("wheel",u,{passive:!1}),this._domElement.removeEventListener("contextmenu",T),this._domElement.ownerDocument.removeEventListener("pointermove",a,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",c),this._domElement.ownerDocument.removeEventListener("pointerup",d),this._domElement.ownerDocument.removeEventListener("mouseup",E),this._domElement.ownerDocument.removeEventListener("pointerlockchange",R),this._domElement.ownerDocument.removeEventListener("pointerlockerror",F))},this.cancel=()=>{this._state!==N.NONE&&(this._state=N.NONE,this._activePointers.length=0,m())},e&&this.connect(e),this.update(0)}get camera(){return this._camera}set camera(t){this._camera=t,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._domElement&&(t?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(t){this._spherical.radius===t&&this._sphericalEnd.radius===t||(this._spherical.radius=t,this._sphericalEnd.radius=t,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(t){this._spherical.theta===t&&this._sphericalEnd.theta===t||(this._spherical.theta=t,this._sphericalEnd.theta=t,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(t){this._spherical.phi===t&&this._sphericalEnd.phi===t||(this._spherical.phi=t,this._sphericalEnd.phi=t,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(t){this._boundaryEnclosesCamera=t,this._needsUpdate=!0}set interactiveArea(t){this._interactiveArea.width=Tt(t.width,0,1),this._interactiveArea.height=Tt(t.height,0,1),this._interactiveArea.x=Tt(t.x,0,1-this._interactiveArea.width),this._interactiveArea.y=Tt(t.y,0,1-this._interactiveArea.height)}addEventListener(t,e){super.addEventListener(t,e)}removeEventListener(t,e){super.removeEventListener(t,e)}rotate(t,e,s=!1){return this.rotateTo(this._sphericalEnd.theta+t,this._sphericalEnd.phi+e,s)}rotateAzimuthTo(t,e=!1){return this.rotateTo(t,this._sphericalEnd.phi,e)}rotatePolarTo(t,e=!1){return this.rotateTo(this._sphericalEnd.theta,t,e)}rotateTo(t,e,s=!1){this._isUserControllingRotate=!1;const i=Tt(t,this.minAzimuthAngle,this.maxAzimuthAngle),n=Tt(e,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=i,this._sphericalEnd.phi=n,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,s||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const o=!s||V(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&V(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(o)}dolly(t,e=!1){return this.dollyTo(this._sphericalEnd.radius-t,e)}dollyTo(t,e=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=le.NONE,this._changedDolly=0,this._dollyToNoClamp(Tt(t,this.minDistance,this.maxDistance),e)}_dollyToNoClamp(t,e=!1){const s=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const n=this._collisionTest(),o=V(n,this._spherical.radius);if(!(s>t)&&o)return Promise.resolve();this._sphericalEnd.radius=Math.min(t,n)}else this._sphericalEnd.radius=t;this._needsUpdate=!0,e||(this._spherical.radius=this._sphericalEnd.radius);const i=!e||V(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(i)}dollyInFixed(t,e=!1){this._targetEnd.add(this._getCameraDirection(Ue).multiplyScalar(t)),e||this._target.copy(this._targetEnd);const s=!e||V(this._target.x,this._targetEnd.x,this.restThreshold)&&V(this._target.y,this._targetEnd.y,this.restThreshold)&&V(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(s)}zoom(t,e=!1){return this.zoomTo(this._zoomEnd+t,e)}zoomTo(t,e=!1){this._isUserControllingZoom=!1,this._zoomEnd=Tt(t,this.minZoom,this.maxZoom),this._needsUpdate=!0,e||(this._zoom=this._zoomEnd);const s=!e||V(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(s)}pan(t,e,s=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(t,e,s)}truck(t,e,s=!1){this._camera.updateMatrix(),Ot.setFromMatrixColumn(this._camera.matrix,0),_t.setFromMatrixColumn(this._camera.matrix,1),Ot.multiplyScalar(t),_t.multiplyScalar(-e);const i=B.copy(Ot).add(_t),n=G.copy(this._targetEnd).add(i);return this.moveTo(n.x,n.y,n.z,s)}forward(t,e=!1){B.setFromMatrixColumn(this._camera.matrix,0),B.crossVectors(this._camera.up,B),B.multiplyScalar(t);const s=G.copy(this._targetEnd).add(B);return this.moveTo(s.x,s.y,s.z,e)}elevate(t,e=!1){return B.copy(this._camera.up).multiplyScalar(t),this.moveTo(this._targetEnd.x+B.x,this._targetEnd.y+B.y,this._targetEnd.z+B.z,e)}moveTo(t,e,s,i=!1){this._isUserControllingTruck=!1;const n=B.set(t,e,s).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,n,this.boundaryFriction),this._needsUpdate=!0,i||this._target.copy(this._targetEnd);const o=!i||V(this._target.x,this._targetEnd.x,this.restThreshold)&&V(this._target.y,this._targetEnd.y,this.restThreshold)&&V(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(o)}lookInDirectionOf(t,e,s,i=!1){const n=B.set(t,e,s).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(n.x,n.y,n.z,i)}fitToBox(t,e,{cover:s=!1,paddingLeft:i=0,paddingRight:n=0,paddingBottom:o=0,paddingTop:r=0}={}){const a=[],c=t.isBox3?Ie.copy(t):Ie.setFromObject(t);c.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const d=pn(this._sphericalEnd.theta,un),E=pn(this._sphericalEnd.phi,un);a.push(this.rotateTo(d,E,e));const l=B.setFromSpherical(this._sphericalEnd).normalize(),u=An.setFromUnitVectors(l,Qs),T=V(Math.abs(l.y),1);T&&u.multiply(qs.setFromAxisAngle(Is,d)),u.multiply(this._yAxisUpSpaceInverse);const C=Rn.makeEmpty();G.copy(c.min).applyQuaternion(u),C.expandByPoint(G),G.copy(c.min).setX(c.max.x).applyQuaternion(u),C.expandByPoint(G),G.copy(c.min).setY(c.max.y).applyQuaternion(u),C.expandByPoint(G),G.copy(c.max).setZ(c.min.z).applyQuaternion(u),C.expandByPoint(G),G.copy(c.min).setZ(c.max.z).applyQuaternion(u),C.expandByPoint(G),G.copy(c.max).setY(c.min.y).applyQuaternion(u),C.expandByPoint(G),G.copy(c.max).setX(c.min.x).applyQuaternion(u),C.expandByPoint(G),G.copy(c.max).applyQuaternion(u),C.expandByPoint(G),C.min.x-=i,C.min.y-=o,C.max.x+=n,C.max.y+=r,u.setFromUnitVectors(Qs,l),T&&u.premultiply(qs.invert()),u.premultiply(this._yAxisUpSpace);const f=C.getSize(B),m=C.getCenter(G).applyQuaternion(u);if(Wt(this._camera)){const R=this.getDistanceToFitBox(f.x,f.y,f.z,s);a.push(this.moveTo(m.x,m.y,m.z,e)),a.push(this.dollyTo(R,e)),a.push(this.setFocalOffset(0,0,0,e))}else if(bt(this._camera)){const R=this._camera,F=R.right-R.left,p=R.top-R.bottom,A=s?Math.max(F/f.x,p/f.y):Math.min(F/f.x,p/f.y);a.push(this.moveTo(m.x,m.y,m.z,e)),a.push(this.zoomTo(A,e)),a.push(this.setFocalOffset(0,0,0,e))}return Promise.all(a)}fitToSphere(t,e){const s=[],i=t instanceof b.Sphere?js.copy(t):ot.createBoundingSphere(t,js);if(s.push(this.moveTo(i.center.x,i.center.y,i.center.z,e)),Wt(this._camera)){const n=this.getDistanceToFitSphere(i.radius);s.push(this.dollyTo(n,e))}else if(bt(this._camera)){const n=this._camera.right-this._camera.left,o=this._camera.top-this._camera.bottom,r=2*i.radius,a=Math.min(n/r,o/r);s.push(this.zoomTo(a,e))}return s.push(this.setFocalOffset(0,0,0,e)),Promise.all(s)}setLookAt(t,e,s,i,n,o,r=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=le.NONE,this._changedDolly=0;const a=G.set(i,n,o),c=B.set(t,e,s);this._targetEnd.copy(a),this._sphericalEnd.setFromVector3(c.sub(a).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,r||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const d=!r||V(this._target.x,this._targetEnd.x,this.restThreshold)&&V(this._target.y,this._targetEnd.y,this.restThreshold)&&V(this._target.z,this._targetEnd.z,this.restThreshold)&&V(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&V(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&V(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(d)}lerpLookAt(t,e,s,i,n,o,r,a,c,d,E,l,u,T=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=le.NONE,this._changedDolly=0;const C=B.set(i,n,o),f=G.set(t,e,s);dt.setFromVector3(f.sub(C).applyQuaternion(this._yAxisUpSpace));const m=Ee.set(d,E,l),R=G.set(r,a,c);De.setFromVector3(R.sub(m).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(C.lerp(m,u));const F=De.theta-dt.theta,p=De.phi-dt.phi,A=De.radius-dt.radius;this._sphericalEnd.set(dt.radius+A*u,dt.phi+p*u,dt.theta+F*u),this.normalizeRotations(),this._needsUpdate=!0,T||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const g=!T||V(this._target.x,this._targetEnd.x,this.restThreshold)&&V(this._target.y,this._targetEnd.y,this.restThreshold)&&V(this._target.z,this._targetEnd.z,this.restThreshold)&&V(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&V(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&V(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(g)}setPosition(t,e,s,i=!1){return this.setLookAt(t,e,s,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,i)}setTarget(t,e,s,i=!1){const n=this.getPosition(B),o=this.setLookAt(n.x,n.y,n.z,t,e,s,i);return this._sphericalEnd.phi=Tt(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),o}setFocalOffset(t,e,s,i=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(t,e,s),this._needsUpdate=!0,i||this._focalOffset.copy(this._focalOffsetEnd);const n=!i||V(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&V(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&V(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}setOrbitPoint(t,e,s){this._camera.updateMatrixWorld(),Ot.setFromMatrixColumn(this._camera.matrixWorldInverse,0),_t.setFromMatrixColumn(this._camera.matrixWorldInverse,1),Xt.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const i=B.set(t,e,s),n=i.distanceTo(this._camera.position),o=i.sub(this._camera.position);Ot.multiplyScalar(o.x),_t.multiplyScalar(o.y),Xt.multiplyScalar(o.z),B.copy(Ot).add(_t).add(Xt),B.z=B.z+n,this.dollyTo(n,!1),this.setFocalOffset(-B.x,B.y,-B.z,!1),this.moveTo(t,e,s,!1)}setBoundary(t){if(!t){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(t),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(t,e,s,i){if(t===null){this._viewport=null;return}this._viewport=this._viewport||new b.Vector4,typeof t=="number"?this._viewport.set(t,e,s,i):this._viewport.copy(t)}getDistanceToFitBox(t,e,s,i=!1){if(Zs(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const n=t/e,o=this._camera.getEffectiveFOV()*Le,r=this._camera.aspect;return((i?n>r:n e.pointerId===t)}_findPointerByMouseButton(t){return this._activePointers.find(e=>e.mouseButton===t)}_disposePointer(t){this._activePointers.splice(this._activePointers.indexOf(t),1)}_encloseToBoundary(t,e,s){const i=e.lengthSq();if(i===0)return t;const n=G.copy(e).add(t),o=this._boundary.clampPoint(n,Ee).sub(n),r=o.lengthSq();if(r===0)return t.add(e);if(r===i)return t;if(s===0)return t.add(e).add(o);{const a=1+s*r/e.dot(o);return t.add(G.copy(e).multiplyScalar(a)).add(o.multiplyScalar(1-s))}}_updateNearPlaneCorners(){if(Wt(this._camera)){const t=this._camera,e=t.near,s=t.getEffectiveFOV()*Le,i=Math.tan(s*.5)*e,n=i*t.aspect;this._nearPlaneCorners[0].set(-n,-i,0),this._nearPlaneCorners[1].set(n,-i,0),this._nearPlaneCorners[2].set(n,i,0),this._nearPlaneCorners[3].set(-n,i,0)}else if(bt(this._camera)){const t=this._camera,e=1/t.zoom,s=t.left*e,i=t.right*e,n=t.top*e,o=t.bottom*e;this._nearPlaneCorners[0].set(s,n,0),this._nearPlaneCorners[1].set(i,n,0),this._nearPlaneCorners[2].set(i,o,0),this._nearPlaneCorners[3].set(s,o,0)}}_collisionTest(){let t=1/0;if(!(this.colliderMeshes.length>=1)||Zs(this._camera,"_collisionTest"))return t;const e=this._getTargetDirection(Ue);Ks.lookAt(Tn,e,this._camera.up);for(let s=0;s<4;s++){const i=G.copy(this._nearPlaneCorners[s]);i.applyMatrix4(Ks);const n=Ee.addVectors(this._target,i);us.set(n,e),us.far=this._spherical.radius+1;const o=us.intersectObjects(this.colliderMeshes);o.length!==0&&o[0].distance {const s=()=>{this.removeEventListener("rest",s),e()};this.addEventListener("rest",s)}))}_addAllEventListeners(t){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(t){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(t){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(t,e=new b.Sphere){const s=e,i=s.center;Ie.makeEmpty(),t.traverseVisible(o=>{o.isMesh&&Ie.expandByObject(o)}),Ie.getCenter(i);let n=0;return t.traverseVisible(o=>{if(!o.isMesh)return;const r=o,a=r.geometry.clone();a.applyMatrix4(r.matrixWorld);const c=a.attributes.position;for(let d=0,E=c.count;d {var e;if(!(!this.currentWorld||!this.currentWorld.renderer)){if(this.three instanceof fi){this.onAspectUpdated.trigger();return}if((e=this.currentWorld.renderer)!=null&&e.isResizeable()){const s=this.currentWorld.renderer.getSize();this.three.aspect=s.width/s.height,this.three.updateProjectionMatrix(),this.onAspectUpdated.trigger()}}}),this.three=this.setupCamera(),this.setupEvents(!0),this.onWorldChanged.add(({action:e,world:s})=>{if(e==="added"){const i=this.newCameraControls();this._allControls.set(s.uuid,i)}if(e==="removed"){const i=this._allControls.get(s.uuid);i&&(i.dispose(),this._allControls.delete(s.uuid))}})}get controls(){if(!this.currentWorld)throw new Error("This camera needs a world to work!");const t=this._allControls.get(this.currentWorld.uuid);if(!t)throw new Error("Controls not found!");return t}get enabled(){return this.currentWorld===null?!1:this.controls.enabled}set enabled(t){this.controls.enabled=t}dispose(){this.setupEvents(!1),this.enabled=!1,this.onAspectUpdated.reset(),this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.three.removeFromParent(),this.onDisposed.trigger(),this.onDisposed.reset();for(const[t,e]of this._allControls)e.dispose()}update(t){this.enabled&&(this.onBeforeUpdate.trigger(this),this.controls.update(t),this.onAfterUpdate.trigger(this))}setupCamera(){const t=window.innerWidth/window.innerHeight,e=new go(60,t,1,1e3);return e.position.set(50,50,50),e.lookAt(new O(0,0,0)),e}newCameraControls(){if(!this.currentWorld)throw new Error("This camera needs a world to work!");if(!this.currentWorld.renderer)throw new Error("This camera needs a renderer to work!");ot.install({THREE:He.getSubsetOfThree()});const{domElement:t}=this.currentWorld.renderer.three,e=new ot(this.three,t);return e.smoothTime=.2,e.dollyToCursor=!0,e.infinityDolly=!0,e}setupEvents(t){t?window.addEventListener("resize",this.updateAspect):window.removeEventListener("resize",this.updateAspect)}static getSubsetOfThree(){return{MOUSE:Oo,Vector2:Ft,Vector3:O,Vector4:_o,Quaternion:Rt,Matrix4:X,Spherical:So,Box3:st,Sphere:Os,Raycaster:Ti,MathUtils:yn}}}const Xn=class Zn extends q{constructor(t){super(t),I(this,"onAfterUpdate",new M),I(this,"onBeforeUpdate",new M),I(this,"onDisposed",new M),I(this,"list",new Map),I(this,"enabled",!0),t.add(Zn.uuid,this)}create(){const t=new Ia(this.components),e=t.uuid;if(this.list.has(e))throw new Error("There is already a world with this name!");return this.list.set(e,t),t}delete(t){this.list.delete(t.uuid),t.dispose()}dispose(){this.enabled=!1;for(const[t,e]of this.list)e.dispose();this.list.clear(),this.onDisposed.trigger()}update(t){if(this.enabled)for(const[e,s]of this.list)s.update(t)}};I(Xn,"uuid","fdb61dc4-2ec1-4966-b83d-54ea795fad4a");let ma=Xn;class fa{constructor(t,e,s){I(this,"onDisposed",new M),I(this,"world"),I(this,"components"),I(this,"three"),I(this,"_fade",3),I(this,"updateZoom",()=>{this.world.camera instanceof He&&(this.material.uniforms.uZoom.value=this.world.camera.three.zoom)}),this.world=e;const{color:i,size1:n,size2:o,distance:r}=s;this.components=t;const a=new Ri(2,2,1,1),c=new wo({side:ke,uniforms:{uSize1:{value:n},uSize2:{value:o},uColor:{value:i},uDistance:{value:r},uFade:{value:this._fade},uZoom:{value:1}},transparent:!0,vertexShader:` + + varying vec3 worldPosition; + + uniform float uDistance; + + void main() { + + vec3 pos = position.xzy * uDistance; + pos.xz += cameraPosition.xz; + + worldPosition = pos; + + gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0); + + } + `,fragmentShader:` + + varying vec3 worldPosition; + + uniform float uZoom; + uniform float uFade; + uniform float uSize1; + uniform float uSize2; + uniform vec3 uColor; + uniform float uDistance; + + + + float getGrid(float size) { + + vec2 r = worldPosition.xz / size; + + + vec2 grid = abs(fract(r - 0.5) - 0.5) / fwidth(r); + float line = min(grid.x, grid.y); + + + return 1.0 - min(line, 1.0); + } + + void main() { + + + float d = 1.0 - min(distance(cameraPosition.xz, worldPosition.xz) / uDistance, 1.0); + + float g1 = getGrid(uSize1); + float g2 = getGrid(uSize2); + + // Ortho camera fades the grid away when zooming out + float minZoom = step(0.2, uZoom); + float zoomFactor = pow(min(uZoom, 1.), 2.) * minZoom; + + gl_FragColor = vec4(uColor.rgb, mix(g2, g1, g1) * pow(d, uFade)); + gl_FragColor.a = mix(0.5 * gl_FragColor.a, gl_FragColor.a, g2) * zoomFactor; + + if ( gl_FragColor.a <= 0.0 ) discard; + + + } + + `,extensions:{derivatives:!0}});this.three=new D(a,c),this.three.frustumCulled=!1,e.scene.three.add(this.three),this.setupEvents(!0)}get visible(){return this.three.visible}set visible(t){t?this.world.scene.three.add(this.three):this.three.removeFromParent()}get material(){return this.three.material}get fade(){return this._fade===3}set fade(t){this._fade=t?3:0,this.material.uniforms.uFade.value=this._fade}[Symbol.dispose](){throw new Error("Method not implemented.")}dispose(){this.setupEvents(!1),this.components.get(me).destroy(this.three),this.onDisposed.trigger(),this.onDisposed.reset(),this.world=null,this.components=null}setupEvents(t){if(!(this.world.camera instanceof He))return;const e=this.world.camera.controls;t?e.addEventListener("update",this.updateZoom):e.removeEventListener("update",this.updateZoom)}}class Ra extends q{constructor(){super(...arguments),I(this,"list",new Map),I(this,"onDisposed",new M),I(this,"config",{color:new qt(12303291),size1:1,size2:10,distance:500}),I(this,"enabled",!0)}create(t){if(this.list.has(t.uuid))throw new Error("This world already has a grid!");const e=new fa(this.components,t,this.config);return this.list.set(t.uuid,e),t.onDisposed.add(()=>{this.delete(t)}),e}delete(t){const e=this.list.get(t.uuid);e&&e.dispose(),this.list.delete(t.uuid)}dispose(){for(const[t,e]of this.list)e.dispose();this.list.clear(),this.onDisposed.trigger()}}I(Ra,"uuid","d1e814d5-b81c-4452-87a2-f039375e0489");const Zt=new Ti,nt=new O,xt=new O,Q=new Rt,Fn={X:new O(1,0,0),Y:new O(0,1,0),Z:new O(0,0,1)},$s={type:"change"},gn={type:"mouseDown"},On={type:"mouseUp",mode:null},_n={type:"objectChange"};class Aa extends Fs{constructor(t,e){super(),e===void 0&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),e=document),this.isTransformControls=!0,this.visible=!1,this.domElement=e,this.domElement.style.touchAction="none";const s=new Na;this._gizmo=s,this.add(s);const i=new wa;this._plane=i,this.add(i);const n=this;function o(R,F){let p=F;Object.defineProperty(n,R,{get:function(){return p!==void 0?p:F},set:function(A){p!==A&&(p=A,i[R]=A,s[R]=A,n.dispatchEvent({type:R+"-changed",value:A}),n.dispatchEvent($s))}}),n[R]=F,i[R]=F,s[R]=F}o("camera",t),o("object",void 0),o("enabled",!0),o("axis",null),o("mode","translate"),o("translationSnap",null),o("rotationSnap",null),o("scaleSnap",null),o("space","world"),o("size",1),o("dragging",!1),o("showX",!0),o("showY",!0),o("showZ",!0);const r=new O,a=new O,c=new Rt,d=new Rt,E=new O,l=new Rt,u=new O,T=new O,C=new O,f=0,m=new O;o("worldPosition",r),o("worldPositionStart",a),o("worldQuaternion",c),o("worldQuaternionStart",d),o("cameraPosition",E),o("cameraQuaternion",l),o("pointStart",u),o("pointEnd",T),o("rotationAxis",C),o("rotationAngle",f),o("eye",m),this._offset=new O,this._startNorm=new O,this._endNorm=new O,this._cameraScale=new O,this._parentPosition=new O,this._parentQuaternion=new Rt,this._parentQuaternionInv=new Rt,this._parentScale=new O,this._worldScaleStart=new O,this._worldQuaternionInv=new Rt,this._worldScale=new O,this._positionStart=new O,this._quaternionStart=new Rt,this._scaleStart=new O,this._getPointer=Fa.bind(this),this._onPointerDown=Oa.bind(this),this._onPointerHover=ga.bind(this),this._onPointerMove=_a.bind(this),this._onPointerUp=Sa.bind(this),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp)}updateMatrixWorld(){this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this._parentPosition,this._parentQuaternion,this._parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this._worldScale),this._parentQuaternionInv.copy(this._parentQuaternion).invert(),this._worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this._cameraScale),this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye).negate():this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld(this)}pointerHover(t){if(this.object===void 0||this.dragging===!0)return;Zt.setFromCamera(t,this.camera);const e=Js(this._gizmo.picker[this.mode],Zt);e?this.axis=e.object.name:this.axis=null}pointerDown(t){if(!(this.object===void 0||this.dragging===!0||t.button!==0)&&this.axis!==null){Zt.setFromCamera(t,this.camera);const e=Js(this._plane,Zt,!0);e&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(e.point).sub(this.worldPositionStart)),this.dragging=!0,gn.mode=this.mode,this.dispatchEvent(gn)}}pointerMove(t){const e=this.axis,s=this.mode,i=this.object;let n=this.space;if(s==="scale"?n="local":(e==="E"||e==="XYZE"||e==="XYZ")&&(n="world"),i===void 0||e===null||this.dragging===!1||t.button!==-1)return;Zt.setFromCamera(t,this.camera);const o=Js(this._plane,Zt,!0);if(o){if(this.pointEnd.copy(o.point).sub(this.worldPositionStart),s==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),n==="local"&&e!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),e.indexOf("X")===-1&&(this._offset.x=0),e.indexOf("Y")===-1&&(this._offset.y=0),e.indexOf("Z")===-1&&(this._offset.z=0),n==="local"&&e!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),i.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(n==="local"&&(i.position.applyQuaternion(Q.copy(this._quaternionStart).invert()),e.search("X")!==-1&&(i.position.x=Math.round(i.position.x/this.translationSnap)*this.translationSnap),e.search("Y")!==-1&&(i.position.y=Math.round(i.position.y/this.translationSnap)*this.translationSnap),e.search("Z")!==-1&&(i.position.z=Math.round(i.position.z/this.translationSnap)*this.translationSnap),i.position.applyQuaternion(this._quaternionStart)),n==="world"&&(i.parent&&i.position.add(nt.setFromMatrixPosition(i.parent.matrixWorld)),e.search("X")!==-1&&(i.position.x=Math.round(i.position.x/this.translationSnap)*this.translationSnap),e.search("Y")!==-1&&(i.position.y=Math.round(i.position.y/this.translationSnap)*this.translationSnap),e.search("Z")!==-1&&(i.position.z=Math.round(i.position.z/this.translationSnap)*this.translationSnap),i.parent&&i.position.sub(nt.setFromMatrixPosition(i.parent.matrixWorld))));else if(s==="scale"){if(e.search("XYZ")!==-1){let r=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(r*=-1),xt.set(r,r,r)}else nt.copy(this.pointStart),xt.copy(this.pointEnd),nt.applyQuaternion(this._worldQuaternionInv),xt.applyQuaternion(this._worldQuaternionInv),xt.divide(nt),e.search("X")===-1&&(xt.x=1),e.search("Y")===-1&&(xt.y=1),e.search("Z")===-1&&(xt.z=1);i.scale.copy(this._scaleStart).multiply(xt),this.scaleSnap&&(e.search("X")!==-1&&(i.scale.x=Math.round(i.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),e.search("Y")!==-1&&(i.scale.y=Math.round(i.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),e.search("Z")!==-1&&(i.scale.z=Math.round(i.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(s==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const r=20/this.worldPosition.distanceTo(nt.setFromMatrixPosition(this.camera.matrixWorld));let a=!1;e==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(nt.copy(this.rotationAxis).cross(this.eye))*r):(e==="X"||e==="Y"||e==="Z")&&(this.rotationAxis.copy(Fn[e]),nt.copy(Fn[e]),n==="local"&&nt.applyQuaternion(this.worldQuaternion),nt.cross(this.eye),nt.length()===0?a=!0:this.rotationAngle=this._offset.dot(nt.normalize())*r),(e==="E"||a)&&(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),n==="local"&&e!=="E"&&e!=="XYZE"?(i.quaternion.copy(this._quaternionStart),i.quaternion.multiply(Q.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),i.quaternion.copy(Q.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),i.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent($s),this.dispatchEvent(_n)}}pointerUp(t){t.button===0&&(this.dragging&&this.axis!==null&&(On.mode=this.mode,this.dispatchEvent(On)),this.dragging=!1,this.axis=null)}dispose(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.traverse(function(t){t.geometry&&t.geometry.dispose(),t.material&&t.material.dispose()})}attach(t){return this.object=t,this.visible=!0,this}detach(){return this.object=void 0,this.visible=!1,this.axis=null,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent($s),this.dispatchEvent(_n),this.pointStart.copy(this.pointEnd))}getRaycaster(){return Zt}getMode(){return this.mode}setMode(t){this.mode=t}setTranslationSnap(t){this.translationSnap=t}setRotationSnap(t){this.rotationSnap=t}setScaleSnap(t){this.scaleSnap=t}setSize(t){this.size=t}setSpace(t){this.space=t}}function Fa(h){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:h.button};{const t=this.domElement.getBoundingClientRect();return{x:(h.clientX-t.left)/t.width*2-1,y:-(h.clientY-t.top)/t.height*2+1,button:h.button}}}function ga(h){if(this.enabled)switch(h.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(h));break}}function Oa(h){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(h.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(h)),this.pointerDown(this._getPointer(h)))}function _a(h){this.enabled&&this.pointerMove(this._getPointer(h))}function Sa(h){this.enabled&&(this.domElement.releasePointerCapture(h.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(h)))}function Js(h,t,e){const s=t.intersectObject(h,!0);for(let i=0;i .9&&(n.visible=!1)),this.axis==="Y"&&(Q.setFromEuler(ps.set(0,0,Math.PI/2)),n.quaternion.copy(e).multiply(Q),Math.abs(k.copy(Qt).applyQuaternion(e).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="Z"&&(Q.setFromEuler(ps.set(0,Math.PI/2,0)),n.quaternion.copy(e).multiply(Q),Math.abs(k.copy(Be).applyQuaternion(e).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="XYZE"&&(Q.setFromEuler(ps.set(0,Math.PI/2,0)),k.copy(this.rotationAxis),n.quaternion.setFromRotationMatrix(Nn.lookAt(Sn,k,Qt)),n.quaternion.multiply(Q),n.visible=this.dragging),this.axis==="E"&&(n.visible=!1)):n.name==="START"?(n.position.copy(this.worldPositionStart),n.visible=this.dragging):n.name==="END"?(n.position.copy(this.worldPosition),n.visible=this.dragging):n.name==="DELTA"?(n.position.copy(this.worldPositionStart),n.quaternion.copy(this.worldQuaternionStart),nt.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),nt.applyQuaternion(this.worldQuaternionStart.clone().invert()),n.scale.copy(nt),n.visible=this.dragging):(n.quaternion.copy(e),this.dragging?n.position.copy(this.worldPositionStart):n.position.copy(this.worldPosition),this.axis&&(n.visible=this.axis.search(n.name)!==-1));continue}n.quaternion.copy(e),this.mode==="translate"||this.mode==="scale"?(n.name==="X"&&Math.abs(k.copy(ve).applyQuaternion(e).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="Y"&&Math.abs(k.copy(Qt).applyQuaternion(e).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="Z"&&Math.abs(k.copy(Be).applyQuaternion(e).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="XY"&&Math.abs(k.copy(Be).applyQuaternion(e).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="YZ"&&Math.abs(k.copy(ve).applyQuaternion(e).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="XZ"&&Math.abs(k.copy(Qt).applyQuaternion(e).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1)):this.mode==="rotate"&&(Cs.copy(e),k.copy(this.eye).applyQuaternion(Q.copy(e).invert()),n.name.search("E")!==-1&&n.quaternion.setFromRotationMatrix(Nn.lookAt(this.eye,Sn,Qt)),n.name==="X"&&(Q.setFromAxisAngle(ve,Math.atan2(-k.y,k.z)),Q.multiplyQuaternions(Cs,Q),n.quaternion.copy(Q)),n.name==="Y"&&(Q.setFromAxisAngle(Qt,Math.atan2(k.x,k.z)),Q.multiplyQuaternions(Cs,Q),n.quaternion.copy(Q)),n.name==="Z"&&(Q.setFromAxisAngle(Be,Math.atan2(k.y,k.x)),Q.multiplyQuaternions(Cs,Q),n.quaternion.copy(Q))),n.visible=n.visible&&(n.name.indexOf("X")===-1||this.showX),n.visible=n.visible&&(n.name.indexOf("Y")===-1||this.showY),n.visible=n.visible&&(n.name.indexOf("Z")===-1||this.showZ),n.visible=n.visible&&(n.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),n.material._color=n.material._color||n.material.color.clone(),n.material._opacity=n.material._opacity||n.material.opacity,n.material.color.copy(n.material._color),n.material.opacity=n.material._opacity,this.enabled&&this.axis&&(n.name===this.axis||this.axis.split("").some(function(r){return n.name===r}))&&(n.material.color.setHex(16776960),n.material.opacity=1)}super.updateMatrixWorld(t)}}class wa extends D{constructor(){super(new Ri(1e5,1e5,2,2),new Te({visible:!1,wireframe:!0,side:ke,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(t){let e=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(e="local"),Ts.copy(ve).applyQuaternion(e==="local"?this.worldQuaternion:Rs),xe.copy(Qt).applyQuaternion(e==="local"?this.worldQuaternion:Rs),be.copy(Be).applyQuaternion(e==="local"?this.worldQuaternion:Rs),k.copy(xe),this.mode){case"translate":case"scale":switch(this.axis){case"X":k.copy(this.eye).cross(Ts),St.copy(Ts).cross(k);break;case"Y":k.copy(this.eye).cross(xe),St.copy(xe).cross(k);break;case"Z":k.copy(this.eye).cross(be),St.copy(be).cross(k);break;case"XY":St.copy(be);break;case"YZ":St.copy(Ts);break;case"XZ":k.copy(be),St.copy(xe);break;case"XYZ":case"E":St.set(0,0,0);break}break;case"rotate":default:St.set(0,0,0)}St.length()===0?this.quaternion.copy(this.cameraQuaternion):(wn.lookAt(nt.set(0,0,0),St,k),this.quaternion.setFromRotationMatrix(wn)),super.updateMatrixWorld(t)}}class bi{constructor(t,e,s,i,n,o=5,r=!0){if(I(this,"onDraggingStarted",new M),I(this,"onDraggingEnded",new M),I(this,"onDisposed",new M),I(this,"normal"),I(this,"origin"),I(this,"three",new fe),I(this,"_helper"),I(this,"_visible",!0),I(this,"_enabled",!0),I(this,"components"),I(this,"world"),I(this,"_controlsActive",!1),I(this,"_arrowBoundBox",new D),I(this,"_planeMesh"),I(this,"_controls"),I(this,"_hiddenMaterial",new Te({visible:!1})),I(this,"update",()=>{this._enabled&&this.three.setFromNormalAndCoplanarPoint(this.normal,this._helper.position)}),I(this,"changeDrag",a=>{this._visible=!a.value,this.preventCameraMovement(),this.notifyDraggingChanged(a)}),this.components=t,this.world=e,!e.renderer)throw new Error("The given world must have a renderer!");this.normal=i,this.origin=s,e.renderer.setPlane(!0,this.three),this._planeMesh=bi.newPlaneMesh(o,n),this._helper=this.newHelper(),this._controls=this.newTransformControls(),this.three.setFromNormalAndCoplanarPoint(i,s),r&&this.toggleControls(!0)}get enabled(){return this._enabled}set enabled(t){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");this._enabled=t,this.world.renderer.setPlane(t,this.three)}get visible(){return this._visible}set visible(t){this._visible=t,this._controls.visible=t,this._helper.visible=t,this.toggleControls(t)}get meshes(){return[this._planeMesh,this._arrowBoundBox]}get planeMaterial(){return this._planeMesh.material}set planeMaterial(t){this._planeMesh.material=t}get size(){return this._planeMesh.scale.x}set size(t){this._planeMesh.scale.set(t,t,t)}get helper(){return this._helper}setFromNormalAndCoplanarPoint(t,e){this.reset(),this.normal.equals(t)||(this.normal.copy(t),this._helper.lookAt(t)),this.origin.copy(e),this._helper.position.copy(e),this._helper.updateMatrix(),this.update()}dispose(){this._enabled=!1,this.onDraggingStarted.reset(),this.onDraggingEnded.reset(),this._helper.removeFromParent(),this.world.renderer&&this.world.renderer.setPlane(!1,this.three),this._arrowBoundBox.removeFromParent(),this._arrowBoundBox.geometry.dispose(),this._planeMesh.geometry.dispose(),this._controls.removeFromParent(),this._controls.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}reset(){const t=new O(1,0,0),e=new O;this.normal.equals(t)||(this.normal.copy(t),this._helper.lookAt(t)),this.origin.copy(e),this._helper.position.copy(e),this._helper.updateMatrix()}toggleControls(t){if(t){if(this._controlsActive)return;this._controls.addEventListener("change",this.update),this._controls.addEventListener("dragging-changed",this.changeDrag)}else this._controls.removeEventListener("change",this.update),this._controls.removeEventListener("dragging-changed",this.changeDrag);this._controlsActive=t}newTransformControls(){if(!this.world.renderer)throw new Error("No renderer found for clipping plane!");const t=this.world.camera.three,e=this.world.renderer.three.domElement,s=new Aa(t,e);return this.initializeControls(s),this.world.scene.three.add(s),s}initializeControls(t){t.attach(this._helper),t.showX=!1,t.showY=!1,t.setSpace("local"),this.createArrowBoundingBox(),t.children[0].children[0].add(this._arrowBoundBox)}createArrowBoundingBox(){this._arrowBoundBox.geometry=new rt(.18,.18,1.2),this._arrowBoundBox.material=this._hiddenMaterial,this._arrowBoundBox.rotateX(Math.PI/2),this._arrowBoundBox.updateMatrix(),this._arrowBoundBox.geometry.applyMatrix4(this._arrowBoundBox.matrix)}notifyDraggingChanged(t){t.value?this.onDraggingStarted.trigger():this.onDraggingEnded.trigger()}preventCameraMovement(){this.world.camera.enabled=this._visible}newHelper(){const t=new Fs;return t.lookAt(this.normal),t.position.copy(this.origin),this._planeMesh.position.z+=.01,t.add(this._planeMesh),this.world.scene.three.add(t),t}static newPlaneMesh(t,e){const s=new Ri(1),i=new D(s,e);return i.scale.set(t,t,t),i}}const Qn=class Ii extends q{constructor(t){super(t),I(this,"onAfterCreate",new M),I(this,"onAfterDelete",new M),I(this,"onBeforeDrag",new M),I(this,"onAfterDrag",new M),I(this,"onBeforeCreate",new M),I(this,"onBeforeCancel",new M),I(this,"onAfterCancel",new M),I(this,"onBeforeDelete",new M),I(this,"onDisposed",new M),I(this,"orthogonalY",!1),I(this,"toleranceOrthogonalY",.7),I(this,"Type",bi),I(this,"list",[]),I(this,"_material",new Te({color:12255487,side:ke,transparent:!0,opacity:.2})),I(this,"_size",5),I(this,"_enabled",!1),I(this,"_visible",!0),I(this,"_onStartDragging",()=>{this.onBeforeDrag.trigger()}),I(this,"_onEndDragging",()=>{this.onAfterDrag.trigger()}),this.components.add(Ii.uuid,this)}get enabled(){return this._enabled}set enabled(t){this._enabled=t;for(const e of this.list)e.enabled=t;this.updateMaterialsAndPlanes()}get visible(){return this._visible}set visible(t){this._visible=t;for(const e of this.list)e.visible=t}get material(){return this._material}set material(t){this._material=t;for(const e of this.list)e.planeMaterial=t}get size(){return this._size}set size(t){this._size=t;for(const e of this.list)e.size=t}dispose(){this._enabled=!1;for(const t of this.list)t.dispose();this.list.length=0,this._material.dispose(),this.onBeforeCreate.reset(),this.onBeforeCancel.reset(),this.onBeforeDelete.reset(),this.onBeforeDrag.reset(),this.onAfterCreate.reset(),this.onAfterCancel.reset(),this.onAfterDelete.reset(),this.onAfterDrag.reset(),this.onDisposed.trigger(Ii.uuid),this.onDisposed.reset()}create(t){if(!this.enabled)return;const e=this.components.get(Ei).get(t).castRay();e&&this.createPlaneFromIntersection(t,e)}createFromNormalAndCoplanarPoint(t,e,s){const i=this.newPlane(t,s,e);return this.updateMaterialsAndPlanes(),i}delete(t,e){this.enabled&&(e||(e=this.pickPlane(t)),e&&this.deletePlane(e))}deleteAll(){for(;this.list.length>0;){const t=this.list[0];this.delete(t.world,t)}}deletePlane(t){const e=this.list.indexOf(t);if(e!==-1){if(this.list.splice(e,1),!t.world.renderer)throw new Error("Renderer not found for this plane's world!");t.world.renderer.setPlane(!1,t.three),t.dispose(),this.updateMaterialsAndPlanes(),this.onAfterDelete.trigger(t)}}pickPlane(t){const e=this.components.get(Ei).get(t),s=this.getAllPlaneMeshes(),i=e.castRay(s);if(i){const n=i.object;return this.list.find(o=>o.meshes.includes(n))}}getAllPlaneMeshes(){const t=[];for(const e of this.list)t.push(...e.meshes);return t}createPlaneFromIntersection(t,e){var s;if(!t.renderer)throw new Error("The given world must have a renderer!");const i=e.point.distanceTo(new O(0,0,0)),n=(s=e.face)==null?void 0:s.normal;if(!i||!n)return;const o=this.getWorldNormal(e,n),r=this.newPlane(t,e.point,o.negate());r.visible=this._visible,r.size=this._size,t.renderer.setPlane(!0,r.three),this.updateMaterialsAndPlanes()}getWorldNormal(t,e){const s=t.object;let i=t.object.matrixWorld.clone();if(s instanceof Ge&&t.instanceId!==void 0){const r=new X;s.getMatrixAt(t.instanceId,r),i=r.multiply(i)}const n=new jt().getNormalMatrix(i),o=e.clone().applyMatrix3(n).normalize();return this.normalizePlaneDirectionY(o),o}normalizePlaneDirectionY(t){this.orthogonalY&&(t.y>this.toleranceOrthogonalY&&(t.x=0,t.y=1,t.z=0),t.y<-this.toleranceOrthogonalY&&(t.x=0,t.y=-1,t.z=0))}newPlane(t,e,s){const i=new this.Type(this.components,t,e,s,this._material);return i.onDraggingStarted.add(this._onStartDragging),i.onDraggingEnded.add(this._onEndDragging),this.list.push(i),this.onAfterCreate.trigger(i),i}updateMaterialsAndPlanes(){const t=this.components.get(ma);for(const[e,s]of t.list){if(!s.renderer)continue;s.renderer.updateClippingPlanes();const{clippingPlanes:i}=s.renderer;for(const n of s.meshes)if(Array.isArray(n.material))for(const o of n.material)o.clippingPlanes=i;else n.material.clippingPlanes=i}}};I(Qn,"uuid","66290bc5-18c4-4cd1-9379-2e17a0617611");let ih=Qn;function ya(h,t,e,s){return new Promise((i,n)=>{function o(){const r=h.clientWaitSync(t,e,0);if(r===h.WAIT_FAILED){n();return}if(r===h.TIMEOUT_EXPIRED){setTimeout(o,s);return}i()}o()})}async function La(h,t,e,s,i,n,o){const r=h.fenceSync(h.SYNC_GPU_COMMANDS_COMPLETE,0);h.flush(),await ya(h,r,0,10),h.deleteSync(r),h.bindBuffer(t,e),h.getBufferSubData(t,s,i,n,o),h.bindBuffer(t,null)}async function Pa(h,t,e,s,i,n,o,r){const a=h.createBuffer();return h.bindBuffer(h.PIXEL_PACK_BUFFER,a),h.bufferData(h.PIXEL_PACK_BUFFER,r.byteLength,h.STREAM_READ),h.readPixels(t,e,s,i,n,o,0),h.bindBuffer(h.PIXEL_PACK_BUFFER,null),await La(h,h.PIXEL_PACK_BUFFER,a,0,r),h.deleteBuffer(a),r}class Ma{constructor(t,e,s){if(I(this,"onDisposed",new M),I(this,"onViewUpdated",new Kt),I(this,"enabled",!0),I(this,"needsUpdate",!1),I(this,"renderDebugFrame",!1),I(this,"components"),I(this,"world"),I(this,"renderer"),I(this,"autoUpdate",!0),I(this,"updateInterval",1e3),I(this,"worker"),I(this,"scene",new mi),I(this,"_width",512),I(this,"_height",512),I(this,"_availableColor",1),I(this,"renderTarget"),I(this,"bufferSize"),I(this,"_buffer"),I(this,"_isWorkerBusy",!1),I(this,"updateVisibility",async o=>{if(!this.enabled||!this.needsUpdate&&!o||this._isWorkerBusy)return;this._isWorkerBusy=!0;const r=this.world.camera.three;r.updateMatrix(),this.renderer.setSize(this._width,this._height),this.renderer.setRenderTarget(this.renderTarget),this.renderer.render(this.scene,r);const a=this.renderer.getContext();await Pa(a,0,0,this._width,this._height,a.RGBA,a.UNSIGNED_BYTE,this._buffer),this.renderer.setRenderTarget(null),this.renderDebugFrame&&this.renderer.render(this.scene,r),this.worker.postMessage({buffer:this._buffer}),this.needsUpdate=!1}),!e.renderer)throw new Error("The given world must have a renderer!");this.components=t,this.applySettings(s),this.world=e,this.renderer=new As,this.renderTarget=new xo(this._width,this._height),this.bufferSize=this._width*this._height*4,this._buffer=new Uint8Array(this.bufferSize),this.renderer.clippingPlanes=e.renderer.clippingPlanes;const i=` + addEventListener("message", (event) => { + const { buffer } = event.data; + const colors = new Map(); + for (let i = 0; i < buffer.length; i += 4) { + const r = buffer[i]; + const g = buffer[i + 1]; + const b = buffer[i + 2]; + const code = "" + r + "-" + g + "-" + b; + if(colors.has(code)) { + colors.set(code, colors.get(code) + 1); + } else { + colors.set(code, 1); + } + } + postMessage({ colors }); + }); + `,n=new Blob([i],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(n))}dispose(){this.enabled=!1;for(const t of this.scene.children)t.removeFromParent();this.onViewUpdated.reset(),this.worker.terminate(),this.renderer.dispose(),this.renderTarget.dispose(),this._buffer=null,this.onDisposed.reset()}getAvailableColor(){let t=BigInt(this._availableColor.toString());const e=[];do e.unshift(Number(t%256n)),t/=256n;while(t);for(;e.length!==3;)e.unshift(0);const[s,i,n]=e,o=`${s}-${i}-${n}`;return{r:s,g:i,b:n,code:o}}increaseColor(){if(this._availableColor===256*256*256){console.warn("Color can't be increased over 256 x 256 x 256!");return}this._availableColor++}decreaseColor(){if(this._availableColor===1){console.warn("Color can't be decreased under 0!");return}this._availableColor--}applySettings(t){t&&(t.updateInterval!==void 0&&(this.updateInterval=t.updateInterval),t.height!==void 0&&(this._height=t.height),t.width!==void 0&&(this._width=t.width),t.autoUpdate!==void 0&&(this.autoUpdate=t.autoUpdate))}}class Ua extends Ma{constructor(t,e,s){super(t,e,s),I(this,"threshold",100),I(this,"onViewUpdated",new M),I(this,"colorMeshes",new Map),I(this,"isProcessing",!1),I(this,"_colorCodeMeshMap",new Map),I(this,"_meshIDColorCodeMap",new Map),I(this,"_currentVisibleMeshes",new Set),I(this,"_recentlyHiddenMeshes",new Set),I(this,"_intervalID",null),I(this,"_transparentMat",new Te({transparent:!0,opacity:0})),I(this,"handleWorkerMessage",async i=>{if(this.isProcessing)return;const n=i.data.colors;this._recentlyHiddenMeshes=new Set(this._currentVisibleMeshes),this._currentVisibleMeshes.clear();for(const[o,r]of n){if(r {this.isProcessing||await this.updateVisibility()},this.updateInterval),this.onViewUpdated.add(({seen:i,unseen:n})=>{for(const o of i)o.visible=!0;for(const o of n)o.visible=!1})}dispose(){super.dispose(),this._intervalID!==null&&(window.clearInterval(this._intervalID),this._intervalID=null),this._currentVisibleMeshes.clear(),this._recentlyHiddenMeshes.clear(),this._meshIDColorCodeMap.clear(),this._transparentMat.dispose(),this._colorCodeMeshMap.clear();const t=this.components.get(me);for(const e in this.colorMeshes){const s=this.colorMeshes.get(e);s&&t.destroy(s,!0)}this.colorMeshes.clear()}add(t){if(!this.enabled)return;if(this.isProcessing){console.log("Culler processing not finished yet.");return}this.isProcessing=!0;const e=t instanceof Ge,{geometry:s,material:i}=t,{colorMaterial:n,code:o}=this.getAvailableMaterial();let r;if(Array.isArray(i)){let d=!0;const E=[];for(const l of i)In.isTransparent(l)?E.push(this._transparentMat):(d=!1,E.push(n));if(d){n.dispose(),this.isProcessing=!1;return}r=E}else if(In.isTransparent(i)){n.dispose(),this.isProcessing=!1;return}else r=n;this._colorCodeMeshMap.set(o,t),this._meshIDColorCodeMap.set(t.uuid,o);const a=e?t.count:1,c=new Ge(s,r,a);e?c.instanceMatrix=t.instanceMatrix:c.setMatrixAt(0,new X),t.visible=!1,c.applyMatrix4(t.matrix),c.updateMatrix(),this.scene.add(c),this.colorMeshes.set(t.uuid,c),this.increaseColor(),this.isProcessing=!1}remove(t){if(this.isProcessing){console.log("Culler processing not finished yet.");return}this.isProcessing=!0;const e=this.components.get(me);this._currentVisibleMeshes.delete(t),this._recentlyHiddenMeshes.delete(t);const s=this.colorMeshes.get(t.uuid),i=this._meshIDColorCodeMap.get(t.uuid);if(!s||!i){this.isProcessing=!1,console.log(t.visible);return}this._colorCodeMeshMap.delete(i),this._meshIDColorCodeMap.delete(t.uuid),this.colorMeshes.delete(t.uuid),s.geometry=void 0,s.material=[],e.destroy(s,!0),this._recentlyHiddenMeshes.delete(t),this._currentVisibleMeshes.delete(t),this.isProcessing=!1}getAvailableMaterial(){const{r:t,g:e,b:s,code:i}=this.getAvailableColor(),n=Ms.enabled;Ms.enabled=!1;const o=new qt(`rgb(${t}, ${e}, ${s})`);if(!this.world.renderer)throw new Error("Renderer not found in the world!");const r=this.world.renderer.clippingPlanes,a=new Te({color:o,clippingPlanes:r,side:ke});return Ms.enabled=n,{colorMaterial:a,code:i}}}const jn=class ui extends q{constructor(t){super(t),I(this,"_enabled",!0),I(this,"list",new Map),I(this,"onDisposed",new M),t.add(ui.uuid,this)}get enabled(){return this._enabled}set enabled(t){this._enabled=t;for(const[e,s]of this.list)s.enabled=t}create(t,e){if(this.list.has(t.uuid))return this.list.get(t.uuid);const s=new Ua(this.components,t,e);return this.list.set(t.uuid,s),s}delete(t){const e=this.list.get(t.uuid);e&&e.dispose(),this.list.delete(t.uuid)}dispose(){this.enabled=!1,this.onDisposed.trigger(ui.uuid),this.onDisposed.reset();for(const[t,e]of this.list)e.dispose();this.list.clear()}};I(jn,"uuid","69f2a50d-c266-44fc-b1bd-fa4d34be89e6");let Da=jn;class xa{constructor(t){if(I(this,"onDisposed",new M),I(this,"onAfterUpdate",new M),I(this,"onBeforeUpdate",new M),I(this,"onResize",new M),I(this,"frontOffset",0),I(this,"overrideMaterial",new bo),I(this,"backgroundColor",new qt(395274)),I(this,"renderer"),I(this,"enabled",!0),I(this,"world"),I(this,"_lockRotation",!0),I(this,"_camera"),I(this,"_plane"),I(this,"_size",new Ft(320,160)),I(this,"_tempVector1",new O),I(this,"_tempVector2",new O),I(this,"_tempTarget",new O),I(this,"down",new O(0,-1,0)),I(this,"updatePlanes",()=>{if(!this.world.renderer)throw new Error("The given world must have a renderer!");const i=[],n=this.world.renderer.three;for(const o of n.clippingPlanes)i.push(o);i.push(this._plane),this.renderer.clippingPlanes=i}),this.world=t,!this.world.renderer)throw new Error("The given world must have a renderer!");this.renderer=new As,this.renderer.setSize(this._size.x,this._size.y);const e=1,s=this._size.x/this._size.y;this._camera=new fi(e*s/-2,e*s/2,e/2,e/-2),this.world.renderer.onClippingPlanesUpdated.add(this.updatePlanes),this._camera.position.set(0,200,0),this._camera.zoom=.1,this._camera.rotation.x=-Math.PI/2,this._plane=new fe(this.down,200),this.updatePlanes()}get lockRotation(){return this._lockRotation}set lockRotation(t){this._lockRotation=t,t&&(this._camera.rotation.z=0)}get zoom(){return this._camera.zoom}set zoom(t){this._camera.zoom=t,this._camera.updateProjectionMatrix()}dispose(){this.enabled=!1,this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.onResize.reset(),this.overrideMaterial.dispose(),this.renderer.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}get(){return this._camera}update(){if(!this.enabled)return;this.onBeforeUpdate.trigger();const t=this.world.scene.three,e=this.world.camera;if(!e.hasCameraControls())throw new Error("The given world must use camera controls!");if(!(t instanceof mi))throw new Error("The given world must have a THREE.Scene as a root!");const s=e.controls;if(s.getPosition(this._tempVector1),this._camera.position.x=this._tempVector1.x,this._camera.position.z=this._tempVector1.z,this.frontOffset!==0&&(s.getTarget(this._tempVector2),this._tempVector2.sub(this._tempVector1),this._tempVector2.normalize().multiplyScalar(this.frontOffset),this._camera.position.x+=this._tempVector2.x,this._camera.position.z+=this._tempVector2.z),!this._lockRotation){s.getTarget(this._tempTarget);const n=Math.atan2(this._tempTarget.x-this._tempVector1.x,this._tempTarget.z-this._tempVector1.z);this._camera.rotation.z=n+Math.PI}this._plane.set(this.down,this._tempVector1.y);const i=t.background;t.background=this.backgroundColor,this.renderer.render(t,this._camera),t.background=i,this.onAfterUpdate.trigger()}getSize(){return this._size}resize(t){if(t){this._size.copy(t),this.renderer.setSize(t.x,t.y);const e=t.x/t.y,s=1;this._camera.left=s*e/-2,this._camera.right=s*e/2,this._camera.top=s/2,this._camera.bottom=-s/2,this._camera.updateProjectionMatrix(),this.onResize.trigger(t)}}}const ba=class qn extends q{constructor(t){super(t),I(this,"onAfterUpdate",new M),I(this,"onBeforeUpdate",new M),I(this,"onDisposed",new M),I(this,"enabled",!0),I(this,"list",new Map),this.components.add(qn.uuid,this)}create(t){if(this.list.has(t.uuid))throw new Error("This world already has a minimap!");const e=new xa(t);return this.list.set(t.uuid,e),e}delete(t){const e=this.list.get(t);e&&e.dispose(),this.list.delete(t)}dispose(){for(const[t,e]of this.list)e.dispose();this.list.clear(),this.onDisposed.trigger()}update(){for(const[t,e]of this.list)e.update()}};I(ba,"uuid","39ad6aad-84c8-4adf-a1e0-7f25313a9e7f");class va{constructor(t){I(this,"enabled",!1),I(this,"id","FirstPerson"),this.camera=t}set(t){if(this.enabled=t,t){if(this.camera.projection.current!=="Perspective"){this.camera.set("Orbit");return}this.setupFirstPersonCamera()}}setupFirstPersonCamera(){const t=this.camera.controls,e=new O;t.distance--,t.getPosition(e),t.minDistance=1,t.maxDistance=1,t.distance=1,t.moveTo(e.x,e.y,e.z),t.truckSpeed=50,t.mouseButtons.wheel=ot.ACTION.DOLLY,t.touches.two=ot.ACTION.TOUCH_ZOOM_TRUCK}}class Ba{constructor(t){I(this,"enabled",!0),I(this,"id","Orbit"),this.camera=t,this.activateOrbitControls()}set(t){this.enabled=t,t&&this.activateOrbitControls()}activateOrbitControls(){const t=this.camera.controls;t.minDistance=1,t.maxDistance=300;const e=new O;t.getPosition(e);const s=e.length();t.distance=s,t.truckSpeed=2;const{rotation:i}=this.camera.three,n=new O(0,0,-1).applyEuler(i),o=e.addScaledVector(n,s);t.moveTo(o.x,o.y,o.z)}}class Ya{constructor(t){I(this,"enabled",!1),I(this,"id","Plan"),I(this,"mouseAction1"),I(this,"mouseAction2"),I(this,"mouseInitialized",!1),I(this,"defaultAzimuthSpeed"),I(this,"defaultPolarSpeed"),this.camera=t,this.defaultAzimuthSpeed=t.controls.azimuthRotateSpeed,this.defaultPolarSpeed=t.controls.polarRotateSpeed}set(t){this.enabled=t;const e=this.camera.controls;e.azimuthRotateSpeed=t?0:this.defaultAzimuthSpeed,e.polarRotateSpeed=t?0:this.defaultPolarSpeed,this.mouseInitialized||(this.mouseAction1=e.touches.one,this.mouseAction2=e.touches.two,this.mouseInitialized=!0),t?(e.mouseButtons.left=ot.ACTION.TRUCK,e.touches.one=ot.ACTION.TOUCH_TRUCK,e.touches.two=ot.ACTION.TOUCH_ZOOM):(e.mouseButtons.left=ot.ACTION.ROTATE,e.touches.one=this.mouseAction1,e.touches.two=this.mouseAction2)}}class za{constructor(t){I(this,"onChanged",new M),I(this,"current","Perspective"),I(this,"camera"),I(this,"_component"),I(this,"_previousDistance",-1),I(this,"matchOrthoDistanceEnabled",!1),this._component=t,this.camera=t.three}async set(t){this.current!==t&&(t==="Orthographic"?this.setOrthoCamera():await this.setPerspectiveCamera(),this.onChanged.trigger(this.camera))}async toggle(){const t=this.current==="Perspective"?"Orthographic":"Perspective";await this.set(t)}setOrthoCamera(){if(this._component.mode===null||this._component.mode.id==="FirstPerson")return;this._previousDistance=this._component.controls.distance,this._component.controls.distance=200;const t=this.getPerspectiveDims();if(!t)return;const{width:e,height:s}=t;this.setupOrthoCamera(s,e),this.camera=this._component.threeOrtho,this.current="Orthographic"}getPerspectiveDims(){const t=this._component.currentWorld;if(!t||!t.renderer)return null;const e=new O;this._component.threePersp.getWorldDirection(e);const s=new O;this._component.controls.getTarget(s);const i=s.clone().sub(this._component.threePersp.position).dot(e),n=t.renderer.getSize(),o=n.x/n.y,r=this._component.threePersp,a=i*2*Math.atan(r.fov*(Math.PI/180)/2);return{width:a*o,height:a}}setupOrthoCamera(t,e){this._component.controls.mouseButtons.wheel=ot.ACTION.ZOOM,this._component.controls.mouseButtons.middle=ot.ACTION.ZOOM;const s=this._component.threePersp,i=this._component.threeOrtho;i.zoom=1,i.left=e/-2,i.right=e/2,i.top=t/2,i.bottom=t/-2,i.updateProjectionMatrix(),i.position.copy(s.position),i.quaternion.copy(s.quaternion),this._component.controls.camera=i}getDistance(){const t=this._component.threePersp,e=this._component.threeOrtho;return(e.top-e.bottom)/e.zoom/(2*Math.atan(t.fov*(Math.PI/180)/2))}async setPerspectiveCamera(){this._component.controls.mouseButtons.wheel=ot.ACTION.DOLLY,this._component.controls.mouseButtons.middle=ot.ACTION.DOLLY;const t=this._component.threePersp,e=this._component.threeOrtho;t.position.copy(e.position),t.quaternion.copy(e.quaternion),this._component.controls.mouseButtons.wheel=ot.ACTION.DOLLY,this.matchOrthoDistanceEnabled?this._component.controls.distance=this.getDistance():this._component.controls.distance=this._previousDistance,await this._component.controls.zoomTo(1),t.updateProjectionMatrix(),this._component.controls.camera=t,this.camera=t,this.current="Perspective"}}class nh extends He{constructor(t){super(t),I(this,"_mode",null),I(this,"projection"),I(this,"threeOrtho"),I(this,"threePersp"),I(this,"_userInputButtons",{}),I(this,"_frustumSize",50),I(this,"_navigationModes",new Map),this.threePersp=this.three,this.threeOrtho=this.newOrthoCamera(),this.projection=new za(this),this.onAspectUpdated.add(()=>{this.setOrthoCameraAspect()}),this.projection.onChanged.add(e=>{this.three=e}),this.onWorldChanged.add(()=>{this._navigationModes.clear(),this._navigationModes.set("Orbit",new Ba(this)),this._navigationModes.set("FirstPerson",new va(this)),this._navigationModes.set("Plan",new Ya(this)),this._mode=this._navigationModes.get("Orbit"),this.mode.set(!0,{preventTargetAdjustment:!0})})}get mode(){if(!this._mode)throw new Error("Mode not found, camera not initialized");return this._mode}dispose(){super.dispose(),this.threeOrtho.removeFromParent()}set(t){if(this.mode!==null&&this.mode.id!==t){if(this.mode.set(!1),!this._navigationModes.has(t))throw new Error("The specified mode does not exist!");this._mode=this._navigationModes.get(t),this.mode.set(!0)}}async fit(t,e=1.5){if(!this.enabled)return;const s=Number.MAX_VALUE,i=Number.MIN_VALUE,n=new O(s,s,s),o=new O(i,i,i);for(const l of t){const u=new st().setFromObject(l);u.min.x o.x&&(o.x=u.max.x),u.max.y>o.y&&(o.y=u.max.y),u.max.z>o.z&&(o.z=u.max.z)}const r=new st(n,o),a=new O;r.getSize(a);const c=new O;r.getCenter(c);const d=Math.max(a.x,a.y,a.z)*e,E=new Os(c,d);await this.controls.fitToSphere(E,!0)}setUserInput(t){t?this.enableUserInput():this.disableUserInput()}disableUserInput(){this._userInputButtons.left=this.controls.mouseButtons.left,this._userInputButtons.right=this.controls.mouseButtons.right,this._userInputButtons.middle=this.controls.mouseButtons.middle,this._userInputButtons.wheel=this.controls.mouseButtons.wheel,this.controls.mouseButtons.left=0,this.controls.mouseButtons.right=0,this.controls.mouseButtons.middle=0,this.controls.mouseButtons.wheel=0}enableUserInput(){Object.keys(this._userInputButtons).length!==0&&(this.controls.mouseButtons.left=this._userInputButtons.left,this.controls.mouseButtons.right=this._userInputButtons.right,this.controls.mouseButtons.middle=this._userInputButtons.middle,this.controls.mouseButtons.wheel=this._userInputButtons.wheel)}newOrthoCamera(){const t=window.innerWidth/window.innerHeight;return new fi(this._frustumSize*t/-2,this._frustumSize*t/2,this._frustumSize/2,this._frustumSize/-2,.1,1e3)}setOrthoCameraAspect(){if(!this.currentWorld||!this.currentWorld.renderer)return;const t=new O;this.threePersp.getWorldDirection(t);const e=new O;this.controls.getTarget(e);const s=e.clone().sub(this.threePersp.position).dot(t),i=this.currentWorld.renderer.getSize(),n=i.x/i.y,o=this.threePersp,r=s*2*Math.atan(o.fov*(Math.PI/180)/2),a=r*n;this.threeOrtho.zoom=1,this.threeOrtho.left=a/-2,this.threeOrtho.right=a/2,this.threeOrtho.top=r/2,this.threeOrtho.bottom=r/-2,this.threeOrtho.updateProjectionMatrix()}}const Kn=class Lt extends q{constructor(t){super(t),I(this,"enabled",!0),I(this,"onDisposed",new M),I(this,"_absoluteMin"),I(this,"_absoluteMax"),I(this,"_meshes",[]),this.components.add(Lt.uuid,this),this._absoluteMin=Lt.newBound(!0),this._absoluteMax=Lt.newBound(!1)}static getDimensions(t){const{min:e,max:s}=t,i=Math.abs(s.x-e.x),n=Math.abs(s.y-e.y),o=Math.abs(s.z-e.z),r=new O;return r.subVectors(s,e).divideScalar(2).add(e),{width:i,height:n,depth:o,center:r}}static newBound(t){const e=t?1:-1;return new O(e*Number.MAX_VALUE,e*Number.MAX_VALUE,e*Number.MAX_VALUE)}static getBounds(t,e,s){const i=s||this.newBound(!1),n=e||this.newBound(!0);for(const o of t)o.x i.x&&(i.x=o.x),o.y>i.y&&(i.y=o.y),o.z>i.z&&(i.z=o.z);return new st(e,s)}dispose(){const t=this.components.get(me);for(const e of this._meshes)t.destroy(e);this._meshes=[],this.onDisposed.trigger(Lt.uuid),this.onDisposed.reset()}get(){const t=this._absoluteMin.clone(),e=this._absoluteMax.clone();return new st(t,e)}getSphere(){const t=this._absoluteMin.clone(),e=this._absoluteMax.clone(),s=Math.abs((e.x-t.x)/2),i=Math.abs((e.y-t.y)/2),n=Math.abs((e.z-t.z)/2),o=new O(t.x+s,t.y+i,t.z+n),r=o.distanceTo(t);return new Os(o,r)}getMesh(){const t=new st(this._absoluteMin,this._absoluteMax),e=Lt.getDimensions(t),{width:s,height:i,depth:n,center:o}=e,r=new it(s,i,n),a=new D(r);return this._meshes.push(a),a.position.copy(o),a}reset(){this._absoluteMin=Lt.newBound(!0),this._absoluteMax=Lt.newBound(!1)}add(t){for(const e of t.items)this.addMesh(e.mesh)}addMesh(t,e){if(!t.geometry.index)return;const s=Lt.getFragmentBounds(t);t.updateMatrixWorld();const i=t.matrixWorld,n=new X,o=t instanceof Ge,r=new Set;if(e&&t instanceof yo)for(const a of e){const c=t.fragment.getInstancesIDs(a);if(c)for(const d of c)r.add(d)}else r.add(0);for(const a of r){const c=s.min.clone(),d=s.max.clone();o&&(t.getMatrixAt(a,n),c.applyMatrix4(n),d.applyMatrix4(n)),c.applyMatrix4(i),d.applyMatrix4(i),c.x this._absoluteMax.x&&(this._absoluteMax.x=c.x),c.y>this._absoluteMax.y&&(this._absoluteMax.y=c.y),c.z>this._absoluteMax.z&&(this._absoluteMax.z=c.z),d.x>this._absoluteMax.x&&(this._absoluteMax.x=d.x),d.y>this._absoluteMax.y&&(this._absoluteMax.y=d.y),d.z>this._absoluteMax.z&&(this._absoluteMax.z=d.z),d.x o.x&&(o.x=d),E>o.y&&(o.y=E),l>o.z&&(o.z=l)}return new st(n,o)}};I(Kn,"uuid","d1444724-dba6-4cdd-a0c7-68ee1450d166");let oh=Kn;const vi=new Set([1123145078,574549367,1675464909,2059837836,3798115385,32440307,3125803723,3207858831,2740243338,2624227202,4240577450,3615266464,3724593414,220341763,477187591,1878645084,1300840506,3303107099,1607154358,1878645084,846575682,1351298697,2417041796,3049322572,3331915920,1416205885,776857604,3285139300,3958052878,2827736869,2732653382,673634403,3448662350,4142052618,2924175390,803316827,2556980723,1809719519,2205249479,807026263,3737207727,1660063152,2347385850,3940055652,2705031697,3732776249,2485617015,2611217952,1704287377,2937912522,2770003689,1281925730,1484403080,3448662350,4142052618,3800577675,4006246654,3590301190,1383045692,2775532180,2047409740,370225590,3593883385,2665983363,4124623270,812098782,3649129432,987898635,1105321065,3510044353,1635779807,2603310189,3406155212,1310608509,4261334040,2736907675,3649129432,1136057603,1260505505,4182860854,2713105998,2898889636,59481748,3749851601,3486308946,3150382593,1062206242,3264961684,15328376,1485152156,370225590,1981873012,2859738748,45288368,2614616156,2732653382,775493141,2147822146,2601014836,2629017746,1186437898,2367409068,1213902940,3632507154,3900360178,476780140,1472233963,2804161546,3008276851,738692330,374418227,315944413,3905492369,3570813810,2571569899,178912537,2294589976,1437953363,2133299955,572779678,3092502836,388784114,2624227202,1425443689,3057273783,2347385850,1682466193,2519244187,2839578677,3958567839,2513912981,2830218821,427810014]),$n=class Jn extends q{constructor(t){super(t),I(this,"enabled",!0),t.add(Jn.uuid,this)}async export(t,e,s=!1,i=!0){const n={},o=new Set(t.GetIfcEntityList(e)),r=new Set([Si,Ni,wi,yi,$t]);for(const a of r)o.add(a);for(const a of o){if(vi.has(a))continue;const c=r.has(a)&&i,d=t.GetLineIDsWithType(e,a);for(const E of d){const l=t.GetLine(0,E,c,s);n[l.expressID]=l}}return n}};I($n,"uuid","b32c4332-cd67-436e-ba7f-196646c7a635");let Ga=$n;const to=class eo extends q{constructor(t){super(t),I(this,"onDisposed",new M),I(this,"onFragmentsLoaded",new M),I(this,"onFragmentsDisposed",new M),I(this,"list",new Map),I(this,"groups",new Map),I(this,"enabled",!0),I(this,"baseCoordinationModel",""),I(this,"_loader",new Ln),this.components.add(eo.uuid,this)}get meshes(){const t=[];for(const[e,s]of this.list)t.push(s.mesh);return t}dispose(){for(const[t,e]of this.groups)e.dispose(!0);this.baseCoordinationModel="",this.groups.clear(),this.list.clear(),this.onFragmentsLoaded.reset(),this.onFragmentsDisposed.reset(),this.onDisposed.trigger(),this.onDisposed.reset()}disposeGroup(t){const{uuid:e}=t,s=[];for(const i of t.items)s.push(i.id),this.list.delete(i.id);t.dispose(!0),this.groups.delete(t.uuid),this.onFragmentsDisposed.trigger({groupID:e,fragmentIDs:s})}load(t,e){const s={coordinate:!0,...e},{coordinate:i,properties:n,relationsMap:o}=s,r=this._loader.import(t);for(const a of r.items)a.group=r,this.list.set(a.id,a);return i&&this.coordinate([r]),this.groups.set(r.uuid,r),n&&r.setLocalProperties(n),o&&this.components.get(no).setRelationMap(r,o),this.onFragmentsLoaded.trigger(r),r}export(t){return this._loader.export(t)}coordinate(t=Array.from(this.groups.values())){if(this.baseCoordinationModel.length===0){const s=t.pop();if(!s)return;this.baseCoordinationModel=s.uuid}if(!t.length)return;const e=this.groups.get(this.baseCoordinationModel);if(!e){console.log("No base model found for coordination!");return}for(const s of t)s!==e&&(s.position.set(0,0,0),s.rotation.set(0,0,0),s.scale.set(1,1,1),s.updateMatrix(),s.applyMatrix4(s.coordinationMatrix.clone().invert()),s.applyMatrix4(e.coordinationMatrix))}};I(to,"uuid","fef46874-46a3-461b-8c44-2922ab77c806");let wt=to;const so={950732822:"IFCURIREFERENCE",4075327185:"IFCTIME",1209108979:"IFCTEMPERATURERATEOFCHANGEMEASURE",3457685358:"IFCSOUNDPRESSURELEVELMEASURE",4157543285:"IFCSOUNDPOWERLEVELMEASURE",2798247006:"IFCPROPERTYSETDEFINITIONSET",1790229001:"IFCPOSITIVEINTEGER",525895558:"IFCNONNEGATIVELENGTHMEASURE",1774176899:"IFCLINEINDEX",1275358634:"IFCLANGUAGEID",2541165894:"IFCDURATION",3701338814:"IFCDAYINWEEKNUMBER",2195413836:"IFCDATETIME",937566702:"IFCDATE",1683019596:"IFCCARDINALPOINTREFERENCE",2314439260:"IFCBINARY",1500781891:"IFCAREADENSITYMEASURE",3683503648:"IFCARCINDEX",4065007721:"IFCYEARNUMBER",1718600412:"IFCWARPINGMOMENTMEASURE",51269191:"IFCWARPINGCONSTANTMEASURE",2593997549:"IFCVOLUMETRICFLOWRATEMEASURE",3458127941:"IFCVOLUMEMEASURE",3345633955:"IFCVAPORPERMEABILITYMEASURE",1278329552:"IFCTORQUEMEASURE",2591213694:"IFCTIMESTAMP",2726807636:"IFCTIMEMEASURE",743184107:"IFCTHERMODYNAMICTEMPERATUREMEASURE",2016195849:"IFCTHERMALTRANSMITTANCEMEASURE",857959152:"IFCTHERMALRESISTANCEMEASURE",2281867870:"IFCTHERMALEXPANSIONCOEFFICIENTMEASURE",2645777649:"IFCTHERMALCONDUCTIVITYMEASURE",232962298:"IFCTHERMALADMITTANCEMEASURE",296282323:"IFCTEXTTRANSFORMATION",603696268:"IFCTEXTFONTNAME",3490877962:"IFCTEXTDECORATION",1460886941:"IFCTEXTALIGNMENT",2801250643:"IFCTEXT",58845555:"IFCTEMPERATUREGRADIENTMEASURE",361837227:"IFCSPECULARROUGHNESS",2757832317:"IFCSPECULAREXPONENT",3477203348:"IFCSPECIFICHEATCAPACITYMEASURE",993287707:"IFCSOUNDPRESSUREMEASURE",846465480:"IFCSOUNDPOWERMEASURE",3471399674:"IFCSOLIDANGLEMEASURE",408310005:"IFCSHEARMODULUSMEASURE",2190458107:"IFCSECTIONALAREAINTEGRALMEASURE",3467162246:"IFCSECTIONMODULUSMEASURE",2766185779:"IFCSECONDINMINUTE",3211557302:"IFCROTATIONALSTIFFNESSMEASURE",1755127002:"IFCROTATIONALMASSMEASURE",2133746277:"IFCROTATIONALFREQUENCYMEASURE",200335297:"IFCREAL",96294661:"IFCRATIOMEASURE",3972513137:"IFCRADIOACTIVITYMEASURE",3665567075:"IFCPRESSUREMEASURE",2169031380:"IFCPRESENTABLETEXT",1364037233:"IFCPOWERMEASURE",1245737093:"IFCPOSITIVERATIOMEASURE",3054510233:"IFCPOSITIVEPLANEANGLEMEASURE",2815919920:"IFCPOSITIVELENGTHMEASURE",4042175685:"IFCPLANEANGLEMEASURE",2642773653:"IFCPLANARFORCEMEASURE",2260317790:"IFCPARAMETERVALUE",929793134:"IFCPHMEASURE",2395907400:"IFCNUMERICMEASURE",2095195183:"IFCNORMALISEDRATIOMEASURE",765770214:"IFCMONTHINYEARNUMBER",2615040989:"IFCMONETARYMEASURE",3114022597:"IFCMOMENTOFINERTIAMEASURE",1648970520:"IFCMOLECULARWEIGHTMEASURE",3177669450:"IFCMOISTUREDIFFUSIVITYMEASURE",1753493141:"IFCMODULUSOFSUBGRADEREACTIONMEASURE",1052454078:"IFCMODULUSOFROTATIONALSUBGRADEREACTIONMEASURE",2173214787:"IFCMODULUSOFLINEARSUBGRADEREACTIONMEASURE",3341486342:"IFCMODULUSOFELASTICITYMEASURE",102610177:"IFCMINUTEINHOUR",3531705166:"IFCMASSPERLENGTHMEASURE",3124614049:"IFCMASSMEASURE",4017473158:"IFCMASSFLOWRATEMEASURE",1477762836:"IFCMASSDENSITYMEASURE",2486716878:"IFCMAGNETICFLUXMEASURE",286949696:"IFCMAGNETICFLUXDENSITYMEASURE",151039812:"IFCLUMINOUSINTENSITYMEASURE",2755797622:"IFCLUMINOUSINTENSITYDISTRIBUTIONMEASURE",2095003142:"IFCLUMINOUSFLUXMEASURE",503418787:"IFCLOGICAL",3086160713:"IFCLINEARVELOCITYMEASURE",1307019551:"IFCLINEARSTIFFNESSMEASURE",2128979029:"IFCLINEARMOMENTMEASURE",191860431:"IFCLINEARFORCEMEASURE",1243674935:"IFCLENGTHMEASURE",3258342251:"IFCLABEL",2054016361:"IFCKINEMATICVISCOSITYMEASURE",3192672207:"IFCISOTHERMALMOISTURECAPACITYMEASURE",3686016028:"IFCIONCONCENTRATIONMEASURE",3809634241:"IFCINTEGERCOUNTRATEMEASURE",1939436016:"IFCINTEGER",2679005408:"IFCINDUCTANCEMEASURE",3358199106:"IFCILLUMINANCEMEASURE",983778844:"IFCIDENTIFIER",2589826445:"IFCHOURINDAY",1158859006:"IFCHEATINGVALUEMEASURE",3113092358:"IFCHEATFLUXDENSITYMEASURE",3064340077:"IFCGLOBALLYUNIQUEID",3044325142:"IFCFREQUENCYMEASURE",1361398929:"IFCFORCEMEASURE",2590844177:"IFCFONTWEIGHT",2715512545:"IFCFONTVARIANT",1102727119:"IFCFONTSTYLE",2078135608:"IFCENERGYMEASURE",2506197118:"IFCELECTRICVOLTAGEMEASURE",2951915441:"IFCELECTRICRESISTANCEMEASURE",3790457270:"IFCELECTRICCURRENTMEASURE",2093906313:"IFCELECTRICCONDUCTANCEMEASURE",3818826038:"IFCELECTRICCHARGEMEASURE",1827137117:"IFCELECTRICCAPACITANCEMEASURE",69416015:"IFCDYNAMICVISCOSITYMEASURE",524656162:"IFCDOSEEQUIVALENTMEASURE",4134073009:"IFCDIMENSIONCOUNT",1514641115:"IFCDESCRIPTIVEMEASURE",300323983:"IFCDAYLIGHTSAVINGHOUR",86635668:"IFCDAYINMONTHNUMBER",94842927:"IFCCURVATUREMEASURE",1778710042:"IFCCOUNTMEASURE",3238673880:"IFCCONTEXTDEPENDENTMEASURE",3812528620:"IFCCOMPOUNDPLANEANGLEMEASURE",2991860651:"IFCCOMPLEXNUMBER",1867003952:"IFCBOXALIGNMENT",2735952531:"IFCBOOLEAN",2650437152:"IFCAREAMEASURE",632304761:"IFCANGULARVELOCITYMEASURE",360377573:"IFCAMOUNTOFSUBSTANCEMEASURE",4182062534:"IFCACCELERATIONMEASURE",3699917729:"IFCABSORBEDDOSEMEASURE",1971632696:"IFCGEOSLICE",2680139844:"IFCGEOMODEL",24726584:"IFCELECTRICFLOWTREATMENTDEVICE",3693000487:"IFCDISTRIBUTIONBOARD",3460952963:"IFCCONVEYORSEGMENT",3999819293:"IFCCAISSONFOUNDATION",3314249567:"IFCBOREHOLE",4196446775:"IFCBEARING",325726236:"IFCALIGNMENT",3425753595:"IFCTRACKELEMENT",991950508:"IFCSIGNAL",3798194928:"IFCREINFORCEDSOIL",3290496277:"IFCRAIL",1383356374:"IFCPAVEMENT",2182337498:"IFCNAVIGATIONELEMENT",234836483:"IFCMOORINGDEVICE",2078563270:"IFCMOBILETELECOMMUNICATIONSAPPLIANCE",1638804497:"IFCLIQUIDTERMINAL",1154579445:"IFCLINEARPOSITIONINGELEMENT",2696325953:"IFCKERB",2713699986:"IFCGEOTECHNICALASSEMBLY",2142170206:"IFCELECTRICFLOWTREATMENTDEVICETYPE",3376911765:"IFCEARTHWORKSFILL",1077100507:"IFCEARTHWORKSELEMENT",3071239417:"IFCEARTHWORKSCUT",479945903:"IFCDISTRIBUTIONBOARDTYPE",3426335179:"IFCDEEPFOUNDATION",1502416096:"IFCCOURSE",2940368186:"IFCCONVEYORSEGMENTTYPE",3203706013:"IFCCAISSONFOUNDATIONTYPE",3862327254:"IFCBUILTSYSTEM",1876633798:"IFCBUILTELEMENT",963979645:"IFCBRIDGEPART",644574406:"IFCBRIDGE",3649138523:"IFCBEARINGTYPE",1662888072:"IFCALIGNMENTVERTICAL",317615605:"IFCALIGNMENTSEGMENT",1545765605:"IFCALIGNMENTHORIZONTAL",4266260250:"IFCALIGNMENTCANT",3956297820:"IFCVIBRATIONDAMPERTYPE",1530820697:"IFCVIBRATIONDAMPER",840318589:"IFCVEHICLE",1953115116:"IFCTRANSPORTATIONDEVICE",618700268:"IFCTRACKELEMENTTYPE",2281632017:"IFCTENDONCONDUITTYPE",3663046924:"IFCTENDONCONDUIT",42703149:"IFCSINESPIRAL",1894708472:"IFCSIGNALTYPE",3599934289:"IFCSIGNTYPE",33720170:"IFCSIGN",1027922057:"IFCSEVENTHORDERPOLYNOMIALSPIRAL",544395925:"IFCSEGMENTEDREFERENCECURVE",3649235739:"IFCSECONDORDERPOLYNOMIALSPIRAL",550521510:"IFCROADPART",146592293:"IFCROAD",3818125796:"IFCRELADHERESTOELEMENT",4021432810:"IFCREFERENT",1891881377:"IFCRAILWAYPART",3992365140:"IFCRAILWAY",1763565496:"IFCRAILTYPE",1946335990:"IFCPOSITIONINGELEMENT",514975943:"IFCPAVEMENTTYPE",506776471:"IFCNAVIGATIONELEMENTTYPE",710110818:"IFCMOORINGDEVICETYPE",1950438474:"IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE",976884017:"IFCMARINEPART",525669439:"IFCMARINEFACILITY",1770583370:"IFCLIQUIDTERMINALTYPE",2176059722:"IFCLINEARELEMENT",679976338:"IFCKERBTYPE",3948183225:"IFCIMPACTPROTECTIONDEVICETYPE",2568555532:"IFCIMPACTPROTECTIONDEVICE",2898700619:"IFCGRADIENTCURVE",1594536857:"IFCGEOTECHNICALSTRATUM",4230923436:"IFCGEOTECHNICALELEMENT",4228831410:"IFCFACILITYPARTCOMMON",1310830890:"IFCFACILITYPART",24185140:"IFCFACILITY",4234616927:"IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID",1306400036:"IFCDEEPFOUNDATIONTYPE",4189326743:"IFCCOURSETYPE",2000195564:"IFCCOSINESPIRAL",3497074424:"IFCCLOTHOID",1626504194:"IFCBUILTELEMENTTYPE",3651464721:"IFCVEHICLETYPE",1229763772:"IFCTRIANGULATEDIRREGULARNETWORK",3665877780:"IFCTRANSPORTATIONDEVICETYPE",782932809:"IFCTHIRDORDERPOLYNOMIALSPIRAL",2735484536:"IFCSPIRAL",1356537516:"IFCSECTIONEDSURFACE",1290935644:"IFCSECTIONEDSOLIDHORIZONTAL",1862484736:"IFCSECTIONEDSOLID",1441486842:"IFCRELPOSITIONS",1033248425:"IFCRELASSOCIATESPROFILEDEF",3381221214:"IFCPOLYNOMIALCURVE",2485787929:"IFCOFFSETCURVEBYDISTANCES",590820931:"IFCOFFSETCURVE",3465909080:"IFCINDEXEDPOLYGONALTEXTUREMAP",593015953:"IFCDIRECTRIXCURVESWEPTAREASOLID",4212018352:"IFCCURVESEGMENT",3425423356:"IFCAXIS2PLACEMENTLINEAR",823603102:"IFCSEGMENT",2165702409:"IFCPOINTBYDISTANCEEXPRESSION",182550632:"IFCOPENCROSSPROFILEDEF",388784114:"IFCLINEARPLACEMENT",536804194:"IFCALIGNMENTHORIZONTALSEGMENT",3752311538:"IFCALIGNMENTCANTSEGMENT",1010789467:"IFCTEXTURECOORDINATEINDICESWITHVOIDS",222769930:"IFCTEXTURECOORDINATEINDICES",2691318326:"IFCQUANTITYNUMBER",3633395639:"IFCALIGNMENTVERTICALSEGMENT",2879124712:"IFCALIGNMENTPARAMETERSEGMENT",25142252:"IFCCONTROLLER",3087945054:"IFCALARM",4288193352:"IFCACTUATOR",630975310:"IFCUNITARYCONTROLELEMENT",4086658281:"IFCSENSOR",2295281155:"IFCPROTECTIVEDEVICETRIPPINGUNIT",182646315:"IFCFLOWINSTRUMENT",1426591983:"IFCFIRESUPPRESSIONTERMINAL",819412036:"IFCFILTER",3415622556:"IFCFAN",1003880860:"IFCELECTRICTIMECONTROL",402227799:"IFCELECTRICMOTOR",264262732:"IFCELECTRICGENERATOR",3310460725:"IFCELECTRICFLOWSTORAGEDEVICE",862014818:"IFCELECTRICDISTRIBUTIONBOARD",1904799276:"IFCELECTRICAPPLIANCE",1360408905:"IFCDUCTSILENCER",3518393246:"IFCDUCTSEGMENT",342316401:"IFCDUCTFITTING",562808652:"IFCDISTRIBUTIONCIRCUIT",4074379575:"IFCDAMPER",3640358203:"IFCCOOLINGTOWER",4136498852:"IFCCOOLEDBEAM",2272882330:"IFCCONDENSER",3571504051:"IFCCOMPRESSOR",3221913625:"IFCCOMMUNICATIONSAPPLIANCE",639361253:"IFCCOIL",3902619387:"IFCCHILLER",4217484030:"IFCCABLESEGMENT",1051757585:"IFCCABLEFITTING",3758799889:"IFCCABLECARRIERSEGMENT",635142910:"IFCCABLECARRIERFITTING",2938176219:"IFCBURNER",32344328:"IFCBOILER",2906023776:"IFCBEAMSTANDARDCASE",277319702:"IFCAUDIOVISUALAPPLIANCE",2056796094:"IFCAIRTOAIRHEATRECOVERY",177149247:"IFCAIRTERMINALBOX",1634111441:"IFCAIRTERMINAL",486154966:"IFCWINDOWSTANDARDCASE",4237592921:"IFCWASTETERMINAL",4156078855:"IFCWALLELEMENTEDCASE",4207607924:"IFCVALVE",4292641817:"IFCUNITARYEQUIPMENT",3179687236:"IFCUNITARYCONTROLELEMENTTYPE",3026737570:"IFCTUBEBUNDLE",3825984169:"IFCTRANSFORMER",812556717:"IFCTANK",1162798199:"IFCSWITCHINGDEVICE",385403989:"IFCSTRUCTURALLOADCASE",1404847402:"IFCSTACKTERMINAL",1999602285:"IFCSPACEHEATER",3420628829:"IFCSOLARDEVICE",3027962421:"IFCSLABSTANDARDCASE",3127900445:"IFCSLABELEMENTEDCASE",1329646415:"IFCSHADINGDEVICE",3053780830:"IFCSANITARYTERMINAL",2572171363:"IFCREINFORCINGBARTYPE",1232101972:"IFCRATIONALBSPLINECURVEWITHKNOTS",90941305:"IFCPUMP",655969474:"IFCPROTECTIVEDEVICETRIPPINGUNITTYPE",738039164:"IFCPROTECTIVEDEVICE",1156407060:"IFCPLATESTANDARDCASE",3612865200:"IFCPIPESEGMENT",310824031:"IFCPIPEFITTING",3694346114:"IFCOUTLET",144952367:"IFCOUTERBOUNDARYCURVE",2474470126:"IFCMOTORCONNECTION",1911478936:"IFCMEMBERSTANDARDCASE",1437502449:"IFCMEDICALDEVICE",629592764:"IFCLIGHTFIXTURE",76236018:"IFCLAMP",2176052936:"IFCJUNCTIONBOX",4175244083:"IFCINTERCEPTOR",2068733104:"IFCHUMIDIFIER",3319311131:"IFCHEATEXCHANGER",2188021234:"IFCFLOWMETER",1209101575:"IFCEXTERNALSPATIALELEMENT",484807127:"IFCEVAPORATOR",3747195512:"IFCEVAPORATIVECOOLER",2814081492:"IFCENGINE",2417008758:"IFCELECTRICDISTRIBUTIONBOARDTYPE",3242481149:"IFCDOORSTANDARDCASE",3205830791:"IFCDISTRIBUTIONSYSTEM",400855858:"IFCCOMMUNICATIONSAPPLIANCETYPE",905975707:"IFCCOLUMNSTANDARDCASE",1677625105:"IFCCIVILELEMENT",3296154744:"IFCCHIMNEY",2674252688:"IFCCABLEFITTINGTYPE",2188180465:"IFCBURNERTYPE",1177604601:"IFCBUILDINGSYSTEM",39481116:"IFCBUILDINGELEMENTPARTTYPE",1136057603:"IFCBOUNDARYCURVE",2461110595:"IFCBSPLINECURVEWITHKNOTS",1532957894:"IFCAUDIOVISUALAPPLIANCETYPE",4088093105:"IFCWORKCALENDAR",4009809668:"IFCWINDOWTYPE",926996030:"IFCVOIDINGFEATURE",2391383451:"IFCVIBRATIONISOLATOR",2415094496:"IFCTENDONTYPE",3081323446:"IFCTENDONANCHORTYPE",413509423:"IFCSYSTEMFURNITUREELEMENT",3101698114:"IFCSURFACEFEATURE",3657597509:"IFCSTRUCTURALSURFACEACTION",2757150158:"IFCSTRUCTURALCURVEREACTION",1004757350:"IFCSTRUCTURALCURVEACTION",338393293:"IFCSTAIRTYPE",1072016465:"IFCSOLARDEVICETYPE",4074543187:"IFCSHADINGDEVICETYPE",2157484638:"IFCSEAMCURVE",2781568857:"IFCROOFTYPE",2310774935:"IFCREINFORCINGMESHTYPE",964333572:"IFCREINFORCINGELEMENTTYPE",683857671:"IFCRATIONALBSPLINESURFACEWITHKNOTS",1469900589:"IFCRAMPTYPE",2839578677:"IFCPOLYGONALFACESET",1158309216:"IFCPILETYPE",3079942009:"IFCOPENINGSTANDARDCASE",1114901282:"IFCMEDICALDEVICETYPE",3113134337:"IFCINTERSECTIONCURVE",3946677679:"IFCINTERCEPTORTYPE",2571569899:"IFCINDEXEDPOLYCURVE",3493046030:"IFCGEOGRAPHICELEMENT",1509553395:"IFCFURNITURE",1893162501:"IFCFOOTINGTYPE",2853485674:"IFCEXTERNALSPATIALSTRUCTUREELEMENT",4148101412:"IFCEVENT",132023988:"IFCENGINETYPE",2397081782:"IFCELEMENTASSEMBLYTYPE",2323601079:"IFCDOORTYPE",1213902940:"IFCCYLINDRICALSURFACE",1525564444:"IFCCONSTRUCTIONPRODUCTRESOURCETYPE",4105962743:"IFCCONSTRUCTIONMATERIALRESOURCETYPE",2185764099:"IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE",15328376:"IFCCOMPOSITECURVEONSURFACE",3875453745:"IFCCOMPLEXPROPERTYTEMPLATE",3893394355:"IFCCIVILELEMENTTYPE",2197970202:"IFCCHIMNEYTYPE",167062518:"IFCBSPLINESURFACEWITHKNOTS",2887950389:"IFCBSPLINESURFACE",2603310189:"IFCADVANCEDBREPWITHVOIDS",1635779807:"IFCADVANCEDBREP",2916149573:"IFCTRIANGULATEDFACESET",1935646853:"IFCTOROIDALSURFACE",2387106220:"IFCTESSELLATEDFACESET",3206491090:"IFCTASKTYPE",699246055:"IFCSURFACECURVE",4095615324:"IFCSUBCONTRACTRESOURCETYPE",603775116:"IFCSTRUCTURALSURFACEREACTION",4015995234:"IFCSPHERICALSURFACE",2481509218:"IFCSPATIALZONETYPE",463610769:"IFCSPATIALZONE",710998568:"IFCSPATIALELEMENTTYPE",1412071761:"IFCSPATIALELEMENT",3663146110:"IFCSIMPLEPROPERTYTEMPLATE",3243963512:"IFCREVOLVEDAREASOLIDTAPERED",816062949:"IFCREPARAMETRISEDCOMPOSITECURVESEGMENT",1521410863:"IFCRELSPACEBOUNDARY2NDLEVEL",3523091289:"IFCRELSPACEBOUNDARY1STLEVEL",427948657:"IFCRELINTERFERESELEMENTS",307848117:"IFCRELDEFINESBYTEMPLATE",1462361463:"IFCRELDEFINESBYOBJECT",2565941209:"IFCRELDECLARES",1027710054:"IFCRELASSIGNSTOGROUPBYFACTOR",3521284610:"IFCPROPERTYTEMPLATE",492091185:"IFCPROPERTYSETTEMPLATE",653396225:"IFCPROJECTLIBRARY",569719735:"IFCPROCEDURETYPE",3967405729:"IFCPREDEFINEDPROPERTYSET",1682466193:"IFCPCURVE",428585644:"IFCLABORRESOURCETYPE",2294589976:"IFCINDEXEDPOLYGONALFACEWITHVOIDS",178912537:"IFCINDEXEDPOLYGONALFACE",4095422895:"IFCGEOGRAPHICELEMENTTYPE",2652556860:"IFCFIXEDREFERENCESWEPTAREASOLID",2804161546:"IFCEXTRUDEDAREASOLIDTAPERED",4024345920:"IFCEVENTTYPE",2629017746:"IFCCURVEBOUNDEDSURFACE",1815067380:"IFCCREWRESOURCETYPE",3419103109:"IFCCONTEXT",2574617495:"IFCCONSTRUCTIONRESOURCETYPE",2059837836:"IFCCARTESIANPOINTLIST3D",1675464909:"IFCCARTESIANPOINTLIST2D",574549367:"IFCCARTESIANPOINTLIST",3406155212:"IFCADVANCEDFACE",3698973494:"IFCTYPERESOURCE",3736923433:"IFCTYPEPROCESS",901063453:"IFCTESSELLATEDITEM",1096409881:"IFCSWEPTDISKSOLIDPOLYGONAL",1042787934:"IFCRESOURCETIME",1608871552:"IFCRESOURCECONSTRAINTRELATIONSHIP",2943643501:"IFCRESOURCEAPPROVALRELATIONSHIP",2090586900:"IFCQUANTITYSET",1482703590:"IFCPROPERTYTEMPLATEDEFINITION",3778827333:"IFCPREDEFINEDPROPERTIES",2998442950:"IFCMIRROREDPROFILEDEF",853536259:"IFCMATERIALRELATIONSHIP",3404854881:"IFCMATERIALPROFILESETUSAGETAPERING",3079605661:"IFCMATERIALPROFILESETUSAGE",2852063980:"IFCMATERIALCONSTITUENTSET",3708119e3:"IFCMATERIALCONSTITUENT",1585845231:"IFCLAGTIME",2133299955:"IFCINDEXEDTRIANGLETEXTUREMAP",1437953363:"IFCINDEXEDTEXTUREMAP",3570813810:"IFCINDEXEDCOLOURMAP",1437805879:"IFCEXTERNALREFERENCERELATIONSHIP",297599258:"IFCEXTENDEDPROPERTIES",211053100:"IFCEVENTTIME",2713554722:"IFCCONVERSIONBASEDUNITWITHOFFSET",3285139300:"IFCCOLOURRGBLIST",1236880293:"IFCWORKTIME",1199560280:"IFCTIMEPERIOD",3611470254:"IFCTEXTUREVERTEXLIST",2771591690:"IFCTASKTIMERECURRING",1549132990:"IFCTASKTIME",2043862942:"IFCTABLECOLUMN",2934153892:"IFCSURFACEREINFORCEMENTAREA",609421318:"IFCSTRUCTURALLOADORRESULT",3478079324:"IFCSTRUCTURALLOADCONFIGURATION",1054537805:"IFCSCHEDULINGTIME",2439245199:"IFCRESOURCELEVELRELATIONSHIP",2433181523:"IFCREFERENCE",3915482550:"IFCRECURRENCEPATTERN",986844984:"IFCPROPERTYABSTRACTION",3843373140:"IFCPROJECTEDCRS",677532197:"IFCPRESENTATIONITEM",1507914824:"IFCMATERIALUSAGEDEFINITION",552965576:"IFCMATERIALPROFILEWITHOFFSETS",164193824:"IFCMATERIALPROFILESET",2235152071:"IFCMATERIALPROFILE",1847252529:"IFCMATERIALLAYERWITHOFFSETS",760658860:"IFCMATERIALDEFINITION",3057273783:"IFCMAPCONVERSION",4294318154:"IFCEXTERNALINFORMATION",1466758467:"IFCCOORDINATEREFERENCESYSTEM",1785450214:"IFCCOORDINATEOPERATION",775493141:"IFCCONNECTIONVOLUMEGEOMETRY",979691226:"IFCREINFORCINGBAR",3700593921:"IFCELECTRICDISTRIBUTIONPOINT",1062813311:"IFCDISTRIBUTIONCONTROLELEMENT",1052013943:"IFCDISTRIBUTIONCHAMBERELEMENT",578613899:"IFCCONTROLLERTYPE",2454782716:"IFCCHAMFEREDGEFEATURE",753842376:"IFCBEAM",3001207471:"IFCALARMTYPE",2874132201:"IFCACTUATORTYPE",3304561284:"IFCWINDOW",3512223829:"IFCWALLSTANDARDCASE",2391406946:"IFCWALL",3313531582:"IFCVIBRATIONISOLATORTYPE",2347447852:"IFCTENDONANCHOR",3824725483:"IFCTENDON",2515109513:"IFCSTRUCTURALANALYSISMODEL",4252922144:"IFCSTAIRFLIGHT",331165859:"IFCSTAIR",1529196076:"IFCSLAB",1783015770:"IFCSENSORTYPE",1376911519:"IFCROUNDEDEDGEFEATURE",2016517767:"IFCROOF",2320036040:"IFCREINFORCINGMESH",3027567501:"IFCREINFORCINGELEMENT",3055160366:"IFCRATIONALBEZIERCURVE",3283111854:"IFCRAMPFLIGHT",3024970846:"IFCRAMP",2262370178:"IFCRAILING",3171933400:"IFCPLATE",1687234759:"IFCPILE",1073191201:"IFCMEMBER",900683007:"IFCFOOTING",3508470533:"IFCFLOWTREATMENTDEVICE",2223149337:"IFCFLOWTERMINAL",707683696:"IFCFLOWSTORAGEDEVICE",987401354:"IFCFLOWSEGMENT",3132237377:"IFCFLOWMOVINGDEVICE",4037862832:"IFCFLOWINSTRUMENTTYPE",4278956645:"IFCFLOWFITTING",2058353004:"IFCFLOWCONTROLLER",4222183408:"IFCFIRESUPPRESSIONTERMINALTYPE",1810631287:"IFCFILTERTYPE",346874300:"IFCFANTYPE",1658829314:"IFCENERGYCONVERSIONDEVICE",857184966:"IFCELECTRICALELEMENT",1634875225:"IFCELECTRICALCIRCUIT",712377611:"IFCELECTRICTIMECONTROLTYPE",1217240411:"IFCELECTRICMOTORTYPE",1365060375:"IFCELECTRICHEATERTYPE",1534661035:"IFCELECTRICGENERATORTYPE",3277789161:"IFCELECTRICFLOWSTORAGEDEVICETYPE",663422040:"IFCELECTRICAPPLIANCETYPE",855621170:"IFCEDGEFEATURE",2030761528:"IFCDUCTSILENCERTYPE",3760055223:"IFCDUCTSEGMENTTYPE",869906466:"IFCDUCTFITTINGTYPE",395920057:"IFCDOOR",3041715199:"IFCDISTRIBUTIONPORT",3040386961:"IFCDISTRIBUTIONFLOWELEMENT",1945004755:"IFCDISTRIBUTIONELEMENT",2063403501:"IFCDISTRIBUTIONCONTROLELEMENTTYPE",1599208980:"IFCDISTRIBUTIONCHAMBERELEMENTTYPE",2635815018:"IFCDISCRETEACCESSORYTYPE",1335981549:"IFCDISCRETEACCESSORY",4147604152:"IFCDIAMETERDIMENSION",3961806047:"IFCDAMPERTYPE",3495092785:"IFCCURTAINWALL",1973544240:"IFCCOVERING",2954562838:"IFCCOOLINGTOWERTYPE",335055490:"IFCCOOLEDBEAMTYPE",488727124:"IFCCONSTRUCTIONPRODUCTRESOURCE",1060000209:"IFCCONSTRUCTIONMATERIALRESOURCE",3898045240:"IFCCONSTRUCTIONEQUIPMENTRESOURCE",1163958913:"IFCCONDITIONCRITERION",2188551683:"IFCCONDITION",2816379211:"IFCCONDENSERTYPE",3850581409:"IFCCOMPRESSORTYPE",843113511:"IFCCOLUMN",2301859152:"IFCCOILTYPE",2611217952:"IFCCIRCLE",2951183804:"IFCCHILLERTYPE",1285652485:"IFCCABLESEGMENTTYPE",3293546465:"IFCCABLECARRIERSEGMENTTYPE",395041908:"IFCCABLECARRIERFITTINGTYPE",1909888760:"IFCBUILDINGELEMENTPROXYTYPE",1095909175:"IFCBUILDINGELEMENTPROXY",2979338954:"IFCBUILDINGELEMENTPART",52481810:"IFCBUILDINGELEMENTCOMPONENT",3299480353:"IFCBUILDINGELEMENT",231477066:"IFCBOILERTYPE",1916977116:"IFCBEZIERCURVE",819618141:"IFCBEAMTYPE",1967976161:"IFCBSPLINECURVE",3460190687:"IFCASSET",2470393545:"IFCANGULARDIMENSION",1871374353:"IFCAIRTOAIRHEATRECOVERYTYPE",3352864051:"IFCAIRTERMINALTYPE",1411407467:"IFCAIRTERMINALBOXTYPE",3821786052:"IFCACTIONREQUEST",1213861670:"IFC2DCOMPOSITECURVE",1033361043:"IFCZONE",3342526732:"IFCWORKSCHEDULE",4218914973:"IFCWORKPLAN",1028945134:"IFCWORKCONTROL",1133259667:"IFCWASTETERMINALTYPE",1898987631:"IFCWALLTYPE",2769231204:"IFCVIRTUALELEMENT",728799441:"IFCVALVETYPE",1911125066:"IFCUNITARYEQUIPMENTTYPE",1600972822:"IFCTUBEBUNDLETYPE",3593883385:"IFCTRIMMEDCURVE",1620046519:"IFCTRANSPORTELEMENT",1692211062:"IFCTRANSFORMERTYPE",1637806684:"IFCTIMESERIESSCHEDULE",5716631:"IFCTANKTYPE",2254336722:"IFCSYSTEM",2315554128:"IFCSWITCHINGDEVICETYPE",148013059:"IFCSUBCONTRACTRESOURCE",1975003073:"IFCSTRUCTURALSURFACECONNECTION",2986769608:"IFCSTRUCTURALRESULTGROUP",1235345126:"IFCSTRUCTURALPOINTREACTION",734778138:"IFCSTRUCTURALPOINTCONNECTION",2082059205:"IFCSTRUCTURALPOINTACTION",3987759626:"IFCSTRUCTURALPLANARACTIONVARYING",1621171031:"IFCSTRUCTURALPLANARACTION",1252848954:"IFCSTRUCTURALLOADGROUP",1721250024:"IFCSTRUCTURALLINEARACTIONVARYING",1807405624:"IFCSTRUCTURALLINEARACTION",2445595289:"IFCSTRUCTURALCURVEMEMBERVARYING",214636428:"IFCSTRUCTURALCURVEMEMBER",4243806635:"IFCSTRUCTURALCURVECONNECTION",1179482911:"IFCSTRUCTURALCONNECTION",682877961:"IFCSTRUCTURALACTION",1039846685:"IFCSTAIRFLIGHTTYPE",3112655638:"IFCSTACKTERMINALTYPE",3812236995:"IFCSPACETYPE",652456506:"IFCSPACEPROGRAM",1305183839:"IFCSPACEHEATERTYPE",3856911033:"IFCSPACE",2533589738:"IFCSLABTYPE",4097777520:"IFCSITE",4105383287:"IFCSERVICELIFE",3517283431:"IFCSCHEDULETIMECONTROL",1768891740:"IFCSANITARYTERMINALTYPE",2863920197:"IFCRELASSIGNSTASKS",160246688:"IFCRELAGGREGATES",2324767716:"IFCRAMPFLIGHTTYPE",2893384427:"IFCRAILINGTYPE",3248260540:"IFCRADIUSDIMENSION",2250791053:"IFCPUMPTYPE",1842657554:"IFCPROTECTIVEDEVICETYPE",3651124850:"IFCPROJECTIONELEMENT",3642467123:"IFCPROJECTORDERRECORD",2904328755:"IFCPROJECTORDER",2744685151:"IFCPROCEDURE",3740093272:"IFCPORT",3724593414:"IFCPOLYLINE",4017108033:"IFCPLATETYPE",4231323485:"IFCPIPESEGMENTTYPE",804291784:"IFCPIPEFITTINGTYPE",3327091369:"IFCPERMIT",2382730787:"IFCPERFORMANCEHISTORY",2837617999:"IFCOUTLETTYPE",3425660407:"IFCORDERACTION",3588315303:"IFCOPENINGELEMENT",4143007308:"IFCOCCUPANT",1916936684:"IFCMOVE",977012517:"IFCMOTORCONNECTIONTYPE",3181161470:"IFCMEMBERTYPE",2108223431:"IFCMECHANICALFASTENERTYPE",377706215:"IFCMECHANICALFASTENER",2506943328:"IFCLINEARDIMENSION",1161773419:"IFCLIGHTFIXTURETYPE",1051575348:"IFCLAMPTYPE",3827777499:"IFCLABORRESOURCE",4288270099:"IFCJUNCTIONBOXTYPE",2391368822:"IFCINVENTORY",1806887404:"IFCHUMIDIFIERTYPE",1251058090:"IFCHEATEXCHANGERTYPE",2706460486:"IFCGROUP",3009204131:"IFCGRID",200128114:"IFCGASTERMINALTYPE",814719939:"IFCFURNITURESTANDARD",263784265:"IFCFURNISHINGELEMENT",3009222698:"IFCFLOWTREATMENTDEVICETYPE",2297155007:"IFCFLOWTERMINALTYPE",1339347760:"IFCFLOWSTORAGEDEVICETYPE",1834744321:"IFCFLOWSEGMENTTYPE",1482959167:"IFCFLOWMOVINGDEVICETYPE",3815607619:"IFCFLOWMETERTYPE",3198132628:"IFCFLOWFITTINGTYPE",3907093117:"IFCFLOWCONTROLLERTYPE",1287392070:"IFCFEATUREELEMENTSUBTRACTION",2143335405:"IFCFEATUREELEMENTADDITION",2827207264:"IFCFEATUREELEMENT",2489546625:"IFCFASTENERTYPE",647756555:"IFCFASTENER",3737207727:"IFCFACETEDBREPWITHVOIDS",807026263:"IFCFACETEDBREP",3390157468:"IFCEVAPORATORTYPE",3174744832:"IFCEVAPORATIVECOOLERTYPE",3272907226:"IFCEQUIPMENTSTANDARD",1962604670:"IFCEQUIPMENTELEMENT",2107101300:"IFCENERGYCONVERSIONDEVICETYPE",1704287377:"IFCELLIPSE",2590856083:"IFCELEMENTCOMPONENTTYPE",1623761950:"IFCELEMENTCOMPONENT",4123344466:"IFCELEMENTASSEMBLY",1758889154:"IFCELEMENT",360485395:"IFCELECTRICALBASEPROPERTIES",3849074793:"IFCDISTRIBUTIONFLOWELEMENTTYPE",3256556792:"IFCDISTRIBUTIONELEMENTTYPE",681481545:"IFCDIMENSIONCURVEDIRECTEDCALLOUT",1457835157:"IFCCURTAINWALLTYPE",3295246426:"IFCCREWRESOURCE",1916426348:"IFCCOVERINGTYPE",1419761937:"IFCCOSTSCHEDULE",3895139033:"IFCCOSTITEM",3293443760:"IFCCONTROL",2559216714:"IFCCONSTRUCTIONRESOURCE",2510884976:"IFCCONIC",3732776249:"IFCCOMPOSITECURVE",300633059:"IFCCOLUMNTYPE",2937912522:"IFCCIRCLEHOLLOWPROFILEDEF",3124254112:"IFCBUILDINGSTOREY",1950629157:"IFCBUILDINGELEMENTTYPE",4031249490:"IFCBUILDING",1260505505:"IFCBOUNDEDCURVE",3649129432:"IFCBOOLEANCLIPPINGRESULT",1334484129:"IFCBLOCK",3207858831:"IFCASYMMETRICISHAPEPROFILEDEF",1674181508:"IFCANNOTATION",2296667514:"IFCACTOR",2097647324:"IFCTRANSPORTELEMENTTYPE",3473067441:"IFCTASK",1580310250:"IFCSYSTEMFURNITUREELEMENTTYPE",4124788165:"IFCSURFACEOFREVOLUTION",2809605785:"IFCSURFACEOFLINEAREXTRUSION",2028607225:"IFCSURFACECURVESWEPTAREASOLID",4070609034:"IFCSTRUCTUREDDIMENSIONCALLOUT",2218152070:"IFCSTRUCTURALSURFACEMEMBERVARYING",3979015343:"IFCSTRUCTURALSURFACEMEMBER",3689010777:"IFCSTRUCTURALREACTION",530289379:"IFCSTRUCTURALMEMBER",3136571912:"IFCSTRUCTURALITEM",3544373492:"IFCSTRUCTURALACTIVITY",451544542:"IFCSPHERE",3893378262:"IFCSPATIALSTRUCTUREELEMENTTYPE",2706606064:"IFCSPATIALSTRUCTUREELEMENT",3626867408:"IFCRIGHTCIRCULARCYLINDER",4158566097:"IFCRIGHTCIRCULARCONE",1856042241:"IFCREVOLVEDAREASOLID",2914609552:"IFCRESOURCE",1401173127:"IFCRELVOIDSELEMENT",3451746338:"IFCRELSPACEBOUNDARY",366585022:"IFCRELSERVICESBUILDINGS",4122056220:"IFCRELSEQUENCE",1058617721:"IFCRELSCHEDULESCOSTITEMS",1245217292:"IFCRELREFERENCEDINSPATIALSTRUCTURE",750771296:"IFCRELPROJECTSELEMENT",202636808:"IFCRELOVERRIDESPROPERTIES",2051452291:"IFCRELOCCUPIESSPACES",3268803585:"IFCRELNESTS",4189434867:"IFCRELINTERACTIONREQUIREMENTS",279856033:"IFCRELFLOWCONTROLELEMENTS",3940055652:"IFCRELFILLSELEMENT",781010003:"IFCRELDEFINESBYTYPE",4186316022:"IFCRELDEFINESBYPROPERTIES",693640335:"IFCRELDEFINES",2551354335:"IFCRELDECOMPOSES",2802773753:"IFCRELCOVERSSPACES",886880790:"IFCRELCOVERSBLDGELEMENTS",3242617779:"IFCRELCONTAINEDINSPATIALSTRUCTURE",3678494232:"IFCRELCONNECTSWITHREALIZINGELEMENTS",504942748:"IFCRELCONNECTSWITHECCENTRICITY",1638771189:"IFCRELCONNECTSSTRUCTURALMEMBER",3912681535:"IFCRELCONNECTSSTRUCTURALELEMENT",2127690289:"IFCRELCONNECTSSTRUCTURALACTIVITY",3190031847:"IFCRELCONNECTSPORTS",4201705270:"IFCRELCONNECTSPORTTOELEMENT",3945020480:"IFCRELCONNECTSPATHELEMENTS",1204542856:"IFCRELCONNECTSELEMENTS",826625072:"IFCRELCONNECTS",2851387026:"IFCRELASSOCIATESPROFILEPROPERTIES",2655215786:"IFCRELASSOCIATESMATERIAL",3840914261:"IFCRELASSOCIATESLIBRARY",982818633:"IFCRELASSOCIATESDOCUMENT",2728634034:"IFCRELASSOCIATESCONSTRAINT",919958153:"IFCRELASSOCIATESCLASSIFICATION",4095574036:"IFCRELASSOCIATESAPPROVAL",1327628568:"IFCRELASSOCIATESAPPLIEDVALUE",1865459582:"IFCRELASSOCIATES",205026976:"IFCRELASSIGNSTORESOURCE",3372526763:"IFCRELASSIGNSTOPROJECTORDER",2857406711:"IFCRELASSIGNSTOPRODUCT",4278684876:"IFCRELASSIGNSTOPROCESS",1307041759:"IFCRELASSIGNSTOGROUP",2495723537:"IFCRELASSIGNSTOCONTROL",1683148259:"IFCRELASSIGNSTOACTOR",3939117080:"IFCRELASSIGNS",3454111270:"IFCRECTANGULARTRIMMEDSURFACE",2798486643:"IFCRECTANGULARPYRAMID",2770003689:"IFCRECTANGLEHOLLOWPROFILEDEF",3219374653:"IFCPROXY",1451395588:"IFCPROPERTYSET",4194566429:"IFCPROJECTIONCURVE",103090709:"IFCPROJECT",4208778838:"IFCPRODUCT",2945172077:"IFCPROCESS",220341763:"IFCPLANE",603570806:"IFCPLANARBOX",3566463478:"IFCPERMEABLECOVERINGPROPERTIES",3505215534:"IFCOFFSETCURVE3D",3388369263:"IFCOFFSETCURVE2D",3888040117:"IFCOBJECT",1425443689:"IFCMANIFOLDSOLIDBREP",1281925730:"IFCLINE",572779678:"IFCLSHAPEPROFILEDEF",1484403080:"IFCISHAPEPROFILEDEF",987898635:"IFCGEOMETRICCURVESET",1268542332:"IFCFURNITURETYPE",4238390223:"IFCFURNISHINGELEMENTTYPE",3455213021:"IFCFLUIDFLOWPROPERTIES",315944413:"IFCFILLAREASTYLETILES",4203026998:"IFCFILLAREASTYLETILESYMBOLWITHSTYLE",374418227:"IFCFILLAREASTYLEHATCHING",2047409740:"IFCFACEBASEDSURFACEMODEL",477187591:"IFCEXTRUDEDAREASOLID",80994333:"IFCENERGYPROPERTIES",2835456948:"IFCELLIPSEPROFILEDEF",2777663545:"IFCELEMENTARYSURFACE",339256511:"IFCELEMENTTYPE",1883228015:"IFCELEMENTQUANTITY",1472233963:"IFCEDGELOOP",4006246654:"IFCDRAUGHTINGPREDEFINEDCURVEFONT",445594917:"IFCDRAUGHTINGPREDEFINEDCOLOUR",3073041342:"IFCDRAUGHTINGCALLOUT",526551008:"IFCDOORSTYLE",1714330368:"IFCDOORPANELPROPERTIES",2963535650:"IFCDOORLININGPROPERTIES",32440307:"IFCDIRECTION",4054601972:"IFCDIMENSIONCURVETERMINATOR",606661476:"IFCDIMENSIONCURVE",693772133:"IFCDEFINEDSYMBOL",2827736869:"IFCCURVEBOUNDEDPLANE",2601014836:"IFCCURVE",2147822146:"IFCCSGSOLID",2506170314:"IFCCSGPRIMITIVE3D",194851669:"IFCCRANERAILFSHAPEPROFILEDEF",4133800736:"IFCCRANERAILASHAPEPROFILEDEF",2485617015:"IFCCOMPOSITECURVESEGMENT",2205249479:"IFCCLOSEDSHELL",1383045692:"IFCCIRCLEPROFILEDEF",1416205885:"IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM",3331915920:"IFCCARTESIANTRANSFORMATIONOPERATOR3D",3486308946:"IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM",3749851601:"IFCCARTESIANTRANSFORMATIONOPERATOR2D",59481748:"IFCCARTESIANTRANSFORMATIONOPERATOR",1123145078:"IFCCARTESIANPOINT",2898889636:"IFCCSHAPEPROFILEDEF",2713105998:"IFCBOXEDHALFSPACE",2581212453:"IFCBOUNDINGBOX",4182860854:"IFCBOUNDEDSURFACE",2736907675:"IFCBOOLEANRESULT",2740243338:"IFCAXIS2PLACEMENT3D",3125803723:"IFCAXIS2PLACEMENT2D",4261334040:"IFCAXIS1PLACEMENT",1302238472:"IFCANNOTATIONSURFACE",2265737646:"IFCANNOTATIONFILLAREAOCCURRENCE",669184980:"IFCANNOTATIONFILLAREA",3288037868:"IFCANNOTATIONCURVEOCCURRENCE",2543172580:"IFCZSHAPEPROFILEDEF",1299126871:"IFCWINDOWSTYLE",512836454:"IFCWINDOWPANELPROPERTIES",336235671:"IFCWINDOWLININGPROPERTIES",2759199220:"IFCVERTEXLOOP",1417489154:"IFCVECTOR",427810014:"IFCUSHAPEPROFILEDEF",2347495698:"IFCTYPEPRODUCT",1628702193:"IFCTYPEOBJECT",1345879162:"IFCTWODIRECTIONREPEATFACTOR",2715220739:"IFCTRAPEZIUMPROFILEDEF",3124975700:"IFCTEXTLITERALWITHEXTENT",4282788508:"IFCTEXTLITERAL",3028897424:"IFCTERMINATORSYMBOL",3071757647:"IFCTSHAPEPROFILEDEF",230924584:"IFCSWEPTSURFACE",1260650574:"IFCSWEPTDISKSOLID",2247615214:"IFCSWEPTAREASOLID",1878645084:"IFCSURFACESTYLERENDERING",2513912981:"IFCSURFACE",2233826070:"IFCSUBEDGE",3653947884:"IFCSTRUCTURALSTEELPROFILEPROPERTIES",3843319758:"IFCSTRUCTURALPROFILEPROPERTIES",1190533807:"IFCSTRUCTURALLOADSINGLEFORCEWARPING",1597423693:"IFCSTRUCTURALLOADSINGLEFORCE",1973038258:"IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION",2473145415:"IFCSTRUCTURALLOADSINGLEDISPLACEMENT",2668620305:"IFCSTRUCTURALLOADPLANARFORCE",1595516126:"IFCSTRUCTURALLOADLINEARFORCE",390701378:"IFCSPACETHERMALLOADPROPERTIES",1202362311:"IFCSOUNDVALUE",2485662743:"IFCSOUNDPROPERTIES",723233188:"IFCSOLIDMODEL",2609359061:"IFCSLIPPAGECONNECTIONCONDITION",4124623270:"IFCSHELLBASEDSURFACEMODEL",2411513650:"IFCSERVICELIFEFACTOR",1509187699:"IFCSECTIONEDSPINE",2778083089:"IFCROUNDEDRECTANGLEPROFILEDEF",478536968:"IFCRELATIONSHIP",3765753017:"IFCREINFORCEMENTDEFINITIONPROPERTIES",3413951693:"IFCREGULARTIMESERIES",3615266464:"IFCRECTANGLEPROFILEDEF",110355661:"IFCPROPERTYTABLEVALUE",3650150729:"IFCPROPERTYSINGLEVALUE",3357820518:"IFCPROPERTYSETDEFINITION",941946838:"IFCPROPERTYREFERENCEVALUE",2752243245:"IFCPROPERTYLISTVALUE",4166981789:"IFCPROPERTYENUMERATEDVALUE",1680319473:"IFCPROPERTYDEFINITION",871118103:"IFCPROPERTYBOUNDEDVALUE",673634403:"IFCPRODUCTDEFINITIONSHAPE",179317114:"IFCPREDEFINEDPOINTMARKERSYMBOL",433424934:"IFCPREDEFINEDDIMENSIONSYMBOL",2559016684:"IFCPREDEFINEDCURVEFONT",759155922:"IFCPREDEFINEDCOLOUR",2775532180:"IFCPOLYGONALBOUNDEDHALFSPACE",2924175390:"IFCPOLYLOOP",1423911732:"IFCPOINTONSURFACE",4022376103:"IFCPOINTONCURVE",2067069095:"IFCPOINT",1663979128:"IFCPLANAREXTENT",2004835150:"IFCPLACEMENT",597895409:"IFCPIXELTEXTURE",3021840470:"IFCPHYSICALCOMPLEXQUANTITY",2519244187:"IFCPATH",2529465313:"IFCPARAMETERIZEDPROFILEDEF",1029017970:"IFCORIENTEDEDGE",2665983363:"IFCOPENSHELL",2833995503:"IFCONEDIRECTIONREPEATFACTOR",219451334:"IFCOBJECTDEFINITION",1430189142:"IFCMECHANICALCONCRETEMATERIALPROPERTIES",2022407955:"IFCMATERIALDEFINITIONREPRESENTATION",2347385850:"IFCMAPPEDITEM",1008929658:"IFCLOOP",2624227202:"IFCLOCALPLACEMENT",3422422726:"IFCLIGHTSOURCESPOT",1520743889:"IFCLIGHTSOURCEPOSITIONAL",4266656042:"IFCLIGHTSOURCEGONIOMETRIC",2604431987:"IFCLIGHTSOURCEDIRECTIONAL",125510826:"IFCLIGHTSOURCEAMBIENT",1402838566:"IFCLIGHTSOURCE",3741457305:"IFCIRREGULARTIMESERIES",3905492369:"IFCIMAGETEXTURE",2445078500:"IFCHYGROSCOPICMATERIALPROPERTIES",812098782:"IFCHALFSPACESOLID",178086475:"IFCGRIDPLACEMENT",3590301190:"IFCGEOMETRICSET",4142052618:"IFCGEOMETRICREPRESENTATIONSUBCONTEXT",2453401579:"IFCGEOMETRICREPRESENTATIONITEM",3448662350:"IFCGEOMETRICREPRESENTATIONCONTEXT",1446786286:"IFCGENERALPROFILEPROPERTIES",803998398:"IFCGENERALMATERIALPROPERTIES",3857492461:"IFCFUELPROPERTIES",738692330:"IFCFILLAREASTYLE",4219587988:"IFCFAILURECONNECTIONCONDITION",3008276851:"IFCFACESURFACE",803316827:"IFCFACEOUTERBOUND",1809719519:"IFCFACEBOUND",2556980723:"IFCFACE",1860660968:"IFCEXTENDEDMATERIALPROPERTIES",476780140:"IFCEDGECURVE",3900360178:"IFCEDGE",4170525392:"IFCDRAUGHTINGPREDEFINEDTEXTFONT",3732053477:"IFCDOCUMENTREFERENCE",1694125774:"IFCDIMENSIONPAIR",2273265877:"IFCDIMENSIONCALLOUTRELATIONSHIP",3632507154:"IFCDERIVEDPROFILEDEF",3800577675:"IFCCURVESTYLE",2889183280:"IFCCONVERSIONBASEDUNIT",3050246964:"IFCCONTEXTDEPENDENTUNIT",45288368:"IFCCONNECTIONPOINTECCENTRICITY",1981873012:"IFCCONNECTIONCURVEGEOMETRY",370225590:"IFCCONNECTEDFACESET",1485152156:"IFCCOMPOSITEPROFILEDEF",2542286263:"IFCCOMPLEXPROPERTY",776857604:"IFCCOLOURRGB",647927063:"IFCCLASSIFICATIONREFERENCE",3150382593:"IFCCENTERLINEPROFILEDEF",616511568:"IFCBLOBTEXTURE",2705031697:"IFCARBITRARYPROFILEDEFWITHVOIDS",1310608509:"IFCARBITRARYOPENPROFILEDEF",3798115385:"IFCARBITRARYCLOSEDPROFILEDEF",2297822566:"IFCANNOTATIONTEXTOCCURRENCE",3612888222:"IFCANNOTATIONSYMBOLOCCURRENCE",962685235:"IFCANNOTATIONSURFACEOCCURRENCE",2442683028:"IFCANNOTATIONOCCURRENCE",1065908215:"IFCWATERPROPERTIES",891718957:"IFCVIRTUALGRIDINTERSECTION",1907098498:"IFCVERTEXPOINT",3304826586:"IFCVERTEXBASEDTEXTUREMAP",2799835756:"IFCVERTEX",180925521:"IFCUNITASSIGNMENT",1735638870:"IFCTOPOLOGYREPRESENTATION",1377556343:"IFCTOPOLOGICALREPRESENTATIONITEM",581633288:"IFCTIMESERIESVALUE",1718945513:"IFCTIMESERIESREFERENCERELATIONSHIP",3101149627:"IFCTIMESERIES",3317419933:"IFCTHERMALMATERIALPROPERTIES",1210645708:"IFCTEXTUREVERTEX",2552916305:"IFCTEXTUREMAP",1742049831:"IFCTEXTURECOORDINATEGENERATOR",280115917:"IFCTEXTURECOORDINATE",1484833681:"IFCTEXTSTYLEWITHBOXCHARACTERISTICS",1640371178:"IFCTEXTSTYLETEXTMODEL",2636378356:"IFCTEXTSTYLEFORDEFINEDFONT",1983826977:"IFCTEXTSTYLEFONTMODEL",1447204868:"IFCTEXTSTYLE",912023232:"IFCTELECOMADDRESS",531007025:"IFCTABLEROW",985171141:"IFCTABLE",1290481447:"IFCSYMBOLSTYLE",626085974:"IFCSURFACETEXTURE",1351298697:"IFCSURFACESTYLEWITHTEXTURES",846575682:"IFCSURFACESTYLESHADING",1607154358:"IFCSURFACESTYLEREFRACTION",3303107099:"IFCSURFACESTYLELIGHTING",1300840506:"IFCSURFACESTYLE",3049322572:"IFCSTYLEDREPRESENTATION",3958052878:"IFCSTYLEDITEM",2830218821:"IFCSTYLEMODEL",3408363356:"IFCSTRUCTURALLOADTEMPERATURE",2525727697:"IFCSTRUCTURALLOADSTATIC",2162789131:"IFCSTRUCTURALLOAD",2273995522:"IFCSTRUCTURALCONNECTIONCONDITION",3692461612:"IFCSIMPLEPROPERTY",4240577450:"IFCSHAPEREPRESENTATION",3982875396:"IFCSHAPEMODEL",867548509:"IFCSHAPEASPECT",4165799628:"IFCSECTIONREINFORCEMENTPROPERTIES",2042790032:"IFCSECTIONPROPERTIES",448429030:"IFCSIUNIT",2341007311:"IFCROOT",3679540991:"IFCRIBPLATEPROFILEPROPERTIES",1660063152:"IFCREPRESENTATIONMAP",3008791417:"IFCREPRESENTATIONITEM",3377609919:"IFCREPRESENTATIONCONTEXT",1076942058:"IFCREPRESENTATION",1222501353:"IFCRELAXATION",1580146022:"IFCREINFORCEMENTBARPROPERTIES",2692823254:"IFCREFERENCESVALUEDOCUMENT",825690147:"IFCQUANTITYWEIGHT",2405470396:"IFCQUANTITYVOLUME",3252649465:"IFCQUANTITYTIME",931644368:"IFCQUANTITYLENGTH",2093928680:"IFCQUANTITYCOUNT",2044713172:"IFCQUANTITYAREA",3710013099:"IFCPROPERTYENUMERATION",148025276:"IFCPROPERTYDEPENDENCYRELATIONSHIP",3896028662:"IFCPROPERTYCONSTRAINTRELATIONSHIP",2598011224:"IFCPROPERTY",2802850158:"IFCPROFILEPROPERTIES",3958567839:"IFCPROFILEDEF",2267347899:"IFCPRODUCTSOFCOMBUSTIONPROPERTIES",2095639259:"IFCPRODUCTREPRESENTATION",2417041796:"IFCPRESENTATIONSTYLEASSIGNMENT",3119450353:"IFCPRESENTATIONSTYLE",1304840413:"IFCPRESENTATIONLAYERWITHSTYLE",2022622350:"IFCPRESENTATIONLAYERASSIGNMENT",1775413392:"IFCPREDEFINEDTEXTFONT",3213052703:"IFCPREDEFINEDTERMINATORSYMBOL",990879717:"IFCPREDEFINEDSYMBOL",3727388367:"IFCPREDEFINEDITEM",3355820592:"IFCPOSTALADDRESS",2226359599:"IFCPHYSICALSIMPLEQUANTITY",2483315170:"IFCPHYSICALQUANTITY",101040310:"IFCPERSONANDORGANIZATION",2077209135:"IFCPERSON",1207048766:"IFCOWNERHISTORY",1411181986:"IFCORGANIZATIONRELATIONSHIP",4251960020:"IFCORGANIZATION",1227763645:"IFCOPTICALMATERIALPROPERTIES",2251480897:"IFCOBJECTIVE",3701648758:"IFCOBJECTPLACEMENT",1918398963:"IFCNAMEDUNIT",2706619895:"IFCMONETARYUNIT",3368373690:"IFCMETRIC",677618848:"IFCMECHANICALSTEELMATERIALPROPERTIES",4256014907:"IFCMECHANICALMATERIALPROPERTIES",2597039031:"IFCMEASUREWITHUNIT",3265635763:"IFCMATERIALPROPERTIES",2199411900:"IFCMATERIALLIST",1303795690:"IFCMATERIALLAYERSETUSAGE",3303938423:"IFCMATERIALLAYERSET",248100487:"IFCMATERIALLAYER",1847130766:"IFCMATERIALCLASSIFICATIONRELATIONSHIP",1838606355:"IFCMATERIAL",30780891:"IFCLOCALTIME",1566485204:"IFCLIGHTINTENSITYDISTRIBUTION",4162380809:"IFCLIGHTDISTRIBUTIONDATA",3452421091:"IFCLIBRARYREFERENCE",2655187982:"IFCLIBRARYINFORMATION",3020489413:"IFCIRREGULARTIMESERIESVALUE",852622518:"IFCGRIDAXIS",3548104201:"IFCEXTERNALLYDEFINEDTEXTFONT",3207319532:"IFCEXTERNALLYDEFINEDSYMBOL",1040185647:"IFCEXTERNALLYDEFINEDSURFACESTYLE",2242383968:"IFCEXTERNALLYDEFINEDHATCHSTYLE",3200245327:"IFCEXTERNALREFERENCE",1648886627:"IFCENVIRONMENTALIMPACTVALUE",3796139169:"IFCDRAUGHTINGCALLOUTRELATIONSHIP",770865208:"IFCDOCUMENTINFORMATIONRELATIONSHIP",1154170062:"IFCDOCUMENTINFORMATION",1376555844:"IFCDOCUMENTELECTRONICFORMAT",2949456006:"IFCDIMENSIONALEXPONENTS",1045800335:"IFCDERIVEDUNITELEMENT",1765591967:"IFCDERIVEDUNIT",1072939445:"IFCDATEANDTIME",3510044353:"IFCCURVESTYLEFONTPATTERN",2367409068:"IFCCURVESTYLEFONTANDSCALING",1105321065:"IFCCURVESTYLEFONT",539742890:"IFCCURRENCYRELATIONSHIP",602808272:"IFCCOSTVALUE",1065062679:"IFCCOORDINATEDUNIVERSALTIMEOFFSET",347226245:"IFCCONSTRAINTRELATIONSHIP",613356794:"IFCCONSTRAINTCLASSIFICATIONRELATIONSHIP",1658513725:"IFCCONSTRAINTAGGREGATIONRELATIONSHIP",1959218052:"IFCCONSTRAINT",2732653382:"IFCCONNECTIONSURFACEGEOMETRY",4257277454:"IFCCONNECTIONPORTGEOMETRY",2614616156:"IFCCONNECTIONPOINTGEOMETRY",2859738748:"IFCCONNECTIONGEOMETRY",3264961684:"IFCCOLOURSPECIFICATION",3639012971:"IFCCLASSIFICATIONNOTATIONFACET",938368621:"IFCCLASSIFICATIONNOTATION",1098599126:"IFCCLASSIFICATIONITEMRELATIONSHIP",1767535486:"IFCCLASSIFICATIONITEM",747523909:"IFCCLASSIFICATION",622194075:"IFCCALENDARDATE",2069777674:"IFCBOUNDARYNODECONDITIONWARPING",1387855156:"IFCBOUNDARYNODECONDITION",3367102660:"IFCBOUNDARYFACECONDITION",1560379544:"IFCBOUNDARYEDGECONDITION",4037036970:"IFCBOUNDARYCONDITION",3869604511:"IFCAPPROVALRELATIONSHIP",390851274:"IFCAPPROVALPROPERTYRELATIONSHIP",2080292479:"IFCAPPROVALACTORRELATIONSHIP",130549933:"IFCAPPROVAL",1110488051:"IFCAPPLIEDVALUERELATIONSHIP",411424972:"IFCAPPLIEDVALUE",639542469:"IFCAPPLICATION",618182010:"IFCADDRESS",3630933823:"IFCACTORROLE",599546466:"FILE_DESCRIPTION",1390159747:"FILE_NAME",1109904537:"FILE_SCHEMA"};class Yt{static async getUnits(t){var e;const{IFCUNITASSIGNMENT:s}=ft,i=await t.getAllPropertiesOfType(s);if(!i)return 1;const n=Object.keys(i),o=i[parseInt(n[0],10)];for(const r of o.Units){if(r.value===void 0||r.value===null)continue;const a=await t.getProperties(r.value);if(!a||!a.UnitType||!a.UnitType.value||a.UnitType.value!=="LENGTHUNIT")continue;let c=1,d=1;return a.Name.value==="METRE"&&(d=1),a.Name.value==="FOOT"&&(d=.3048),((e=a.Prefix)==null?void 0:e.value)==="MILLI"&&(c=.001),d*c}return 1}static async findItemByGuid(t,e){var s;const i=t.getAllPropertiesIDs();for(const n of i){const o=await t.getProperties(n);if(o&&((s=o.GlobalId)==null?void 0:s.value)===e)return o}return null}static async getRelationMap(t,e,s){var i;const n=s??(()=>{}),o={},r=t.getAllPropertiesIDs();for(const a of r){const c=await t.getProperties(a);if(!c)continue;const d=c.type===e,E=Object.keys(c).find(f=>f.startsWith("Relating")),l=Object.keys(c).find(f=>f.startsWith("Related"));if(!(d&&E&&l))continue;const u=await t.getProperties((i=c[E])==null?void 0:i.value),T=c[l];if(!u||!T||!(T&&Array.isArray(T)))continue;const C=T.map(f=>f.value);n(u.expressID,C),o[u.expressID]=C}return o}static async getQsetQuantities(t,e,s){const i=s??(()=>{}),n=await t.getProperties(e);return!n||n.type!==Lo?null:(n.Quantities??[{}]).map(o=>(o.value&&i(o.value),o.value)).filter(o=>o!==null)}static async getPsetProps(t,e,s){const i=s??(()=>{}),n=await t.getProperties(e);return!n||n.type!==ti?null:(n.HasProperties??[{}]).map(o=>(o.value&&i(o.value),o.value)).filter(o=>o!==null)}static async getPsetRel(t,e){var s;if(!await t.getProperties(e))return null;const i=await t.getAllPropertiesOfType(_s);if(!i)return null;const n=Object.values(i);let o=null;for(const r of n)((s=r.RelatingPropertyDefinition)==null?void 0:s.value)===e&&(o=r.expressID);return o}static async getQsetRel(t,e){return Yt.getPsetRel(t,e)}static async getEntityName(t,e){var s;const i=await t.getProperties(e);if(!i)return{key:null,name:null};const n=Object.keys(i).find(r=>r.endsWith("Name"))??null,o=n?(s=i[n])==null?void 0:s.value:null;return{key:n,name:o}}static async getQuantityValue(t,e){const s=await t.getProperties(e);if(!s)return{key:null,value:null};const i=Object.keys(s).find(o=>o.endsWith("Value"))??null;let n;return i===null||s[i]===void 0||s[i]===null?n=null:n=s[i].value,{key:i,value:n}}static isRel(t){return so[t].startsWith("IFCREL")}static async attributeExists(t,e,s){const i=await t.getProperties(e);return i?Object.keys(i).includes(s):!1}static async groupEntitiesByType(t,e){var s;const i=new Map;for(const n of e){const o=await t.getProperties(n);if(!o)continue;const r=o.type;i.get(r)||i.set(r,new Set),(s=i.get(r))==null||s.add(n)}return i}}const Va=new Map([[Ai,{forRelating:"IsDecomposedBy",forRelated:"Decomposes"}],[Fi,{forRelating:"AssociatedTo",forRelated:"HasAssociations"}],[gi,{forRelating:"ClassificationForObjects",forRelated:"HasAssociations"}],[Oi,{forRelating:"IsGroupedBy",forRelated:"HasAssignments"}],[_s,{forRelated:"IsDefinedBy",forRelating:"DefinesOcurrence"}],[_i,{forRelated:"IsTypedBy",forRelating:"Types"}],[Pn,{forRelated:"IsDefinedBy",forRelating:"Defines"}],[Ss,{forRelated:"ContainedInStructure",forRelating:"ContainsElements"}]]),io=class pi extends q{constructor(t){super(t),I(this,"onDisposed",new M),I(this,"enabled",!0),I(this,"onRelationsIndexed",new M),I(this,"_relToAttributesMap",Va),I(this,"_inverseAttributes",["IsDecomposedBy","Decomposes","AssociatedTo","HasAssociations","ClassificationForObjects","IsGroupedBy","HasAssignments","IsDefinedBy","DefinesOcurrence","IsTypedBy","Types","Defines","ContainedInStructure","ContainsElements"]),I(this,"_ifcRels",[Ai,Fi,gi,Oi,_s,_i,Pn,Ss]),I(this,"relationMaps",{}),I(this,"onFragmentsDisposed",e=>{delete this.relationMaps[e.groupID]}),this.components.add(pi.uuid,this),t.get(wt).onFragmentsDisposed.add(this.onFragmentsDisposed)}setRelationMap(t,e){this.relationMaps[t.uuid]=e,this.onRelationsIndexed.trigger({modelID:t.uuid,relationsMap:e})}async process(t){if(!t.hasProperties)throw new Error("FragmentsGroup properties not found");let e=this.relationMaps[t.uuid];if(e)return e;e=new Map;for(const s of this._ifcRels)await Yt.getRelationMap(t,s,async(i,n)=>{const o=this._relToAttributesMap.get(s);if(!o)return;const{forRelated:r,forRelating:a}=o,c=e.get(i)??new Map,d=this._inverseAttributes.indexOf(a);c.set(d,n),e.set(i,c);for(const E of n){const l=e.get(E)??new Map,u=this._inverseAttributes.indexOf(r),T=l.get(u)??[];T.push(i),l.set(u,T),e.set(E,l)}});return this.setRelationMap(t,e),e}async processFromWebIfc(t,e){const s=new Map;for(const i of this._ifcRels){const n=this._relToAttributesMap.get(i);if(!n)continue;const{forRelated:o,forRelating:r}=n,a=t.GetLineIDsWithType(e,i);for(let c=0;c m.startsWith("Relating")),l=Object.keys(d).find(m=>m.startsWith("Related"));if(!(E&&l))continue;const u=d[E].value,T=d[l].map(m=>m.value),C=s.get(u)??new Map,f=this._inverseAttributes.indexOf(r);C.set(f,T),s.set(u,C);for(const m of T){const R=s.get(m)??new Map,F=this._inverseAttributes.indexOf(o),p=R.get(F)??[];p.push(u),R.set(F,p),s.set(m,R)}}}return this.onRelationsIndexed.trigger({modelID:e.toString(),relationsMap:s}),s}getEntityRelations(t,e,s){const i=this.relationMaps[t.uuid];if(!i)return null;const n=i.get(e),o=this._inverseAttributes.indexOf(s);return!n||o===-1?null:n.get(o)||null}serializeRelations(t){const e={};for(const[s,i]of t.entries()){e[s]||(e[s]={});for(const[n,o]of i.entries())e[s][n]=o}return JSON.stringify(e)}serializeModelRelations(t){const e=this.relationMaps[t.uuid];return e?this.serializeRelations(e):null}serializeAllRelations(){const t={};for(const e in this.relationMaps){const s=this.relationMaps[e],i={};for(const[n,o]of s.entries()){i[n]||(i[n]={});for(const[r,a]of o.entries())i[n][r]=a}t[e]=i}return JSON.stringify(t)}getRelationsMapFromJSON(t){const e=JSON.parse(t),s=new Map;for(const i in e){const n=e[i],o=new Map;for(const r in n)o.set(Number(r),n[r]);s.set(Number(i),o)}return s}dispose(){this.relationMaps={},this.components.get(wt).onFragmentsDisposed.remove(this.onFragmentsDisposed),this.onDisposed.trigger(pi.uuid),this.onDisposed.reset()}};I(io,"uuid","23a889ab-83b3-44a4-8bee-ead83438370b");let no=io;class Ha{constructor(){I(this,"factor",1),I(this,"complement",1)}apply(t){const e=this.getScaleMatrix().multiply(t);t.copy(e)}setUp(t){var e;this.factor=1;const s=this.getLengthUnits(t);if(!s)return;const i=s==null,n=s.Name===void 0||s.Name===null;i||n||(s.Name.value==="FOOT"?this.factor=.3048:((e=s.Prefix)==null?void 0:e.value)==="MILLI"&&(this.complement=.001))}getLengthUnits(t){try{const e=t.GetLineIDsWithType(0,Vo).get(0),s=t.GetLine(0,e);for(const i of s.Units){if(!i||i.value===null||i.value===void 0)continue;const n=t.GetLine(0,i.value);if(n.UnitType&&n.UnitType.value==="LENGTHUNIT")return n}return null}catch{return console.log("Could not get units"),null}}getScaleMatrix(){const t=this.factor;return new X().fromArray([t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1])}}class oo{constructor(){I(this,"itemsByFloor",{}),I(this,"_units",new Ha)}setUp(t){this._units.setUp(t),this.cleanUp();try{const e=t.GetLineIDsWithType(0,Ss),s=new Set,i=t.GetLineIDsWithType(0,$t);for(let c=0;c {this.getMesh(r,e)});for(const r of this._visitedFragments){const{index:a,fragment:c}=r[1];e.keyFragments.set(a,c.id)}for(const r of e.items){const a=this._fragmentInstances.get(r.id);if(!a)throw new Error("Fragment not found!");const c=[];for(const[d,E]of a)c.push(E);r.add(c)}const o=this.webIfc.GetCoordinationMatrix(0);return e.coordinationMatrix.fromArray(o),e.civilData=this._civil.read(this.webIfc),e}cleanUp(){this.webIfc=null,this.webIfc=new zt,this._visitedFragments.clear(),this._fragmentInstances.clear()}getMesh(t,e){const s=t.geometries.size(),i=t.expressID;for(let n=0;n parseInt(o,10)),i=e[s[0]],n=new Ze(i.expressID);return{ownerHistory:i,ownerHistoryHandle:n}}registerChange(t,...e){this.changeMap[t.uuid]||(this.changeMap[t.uuid]=new Set);for(const s of e)this.changeMap[t.uuid].add(s),this.onDataChanged.trigger({model:t,expressID:s})}async setData(t,...e){for(const s of e){const i=s.expressID;i&&(await t.setProperties(i,s),this.registerChange(t,i))}}async newPset(t,e,s){const i=ue.getIFCSchema(t),{ownerHistoryHandle:n}=await this.getOwnerHistory(t),o=this.newGUID(t),r=new ft[i].IfcLabel(e),a=s?new ft[i].IfcText(s):null,c=new ft[i].IfcPropertySet(o,n,r,a,[]);c.expressID=this.increaseMaxID(t);const d=this.newGUID(t),E=new ft[i].IfcRelDefinesByProperties(d,n,null,null,[],new Ze(c.expressID));return E.expressID=this.increaseMaxID(t),await this.setData(t,c,E),{pset:c,rel:E}}async removePset(t,...e){for(const s of e){const i=await t.getProperties(s);if((i==null?void 0:i.type)!==ti)continue;const n=await Yt.getPsetRel(t,s);if(n&&(await t.setProperties(n,null),this.registerChange(t,n)),i){for(const o of i.HasProperties)await t.setProperties(o.value,null);await t.setProperties(s,null),this.onPsetRemoved.trigger({model:t,psetID:s}),this.registerChange(t,s)}}}async newSingleProperty(t,e,s,i){const n=ue.getIFCSchema(t),o=new ft[n].IfcIdentifier(s),r=new ft[n][e](i),a=new ft[n].IfcPropertySingleValue(o,null,r,null);return a.expressID=this.increaseMaxID(t),await this.setData(t,a),a}newSingleStringProperty(t,e,s,i){return this.newSingleProperty(t,e,s,i)}newSingleNumericProperty(t,e,s,i){return this.newSingleProperty(t,e,s,i)}newSingleBooleanProperty(t,e,s,i){return this.newSingleProperty(t,e,s,i)}async removePsetProp(t,e,s){const i=await t.getProperties(e),n=await t.getProperties(s);!i||!n||i.type===ti&&n&&(i.HasProperties=i.HasProperties.filter(o=>o.value!==s),await t.setProperties(s,null),this.registerChange(t,e,s))}async addElementToPset(t,e,...s){const i=await Yt.getPsetRel(t,e);if(!i)return;const n=await t.getProperties(i);if(n){for(const o of s){const r=new Ze(o);n.RelatedObjects.push(r),this.onElementToPset.trigger({model:t,psetID:e,elementID:o})}this.registerChange(t,e)}}async addPropToPset(t,e,...s){const i=await t.getProperties(e);if(i){for(const n of s){if(i.HasProperties.includes(n))continue;const o=new Ze(n);i.HasProperties.push(o),this.onPropToPset.trigger({model:t,psetID:e,propID:n})}this.registerChange(t,e)}}async saveToIfc(t,e){const s=this.components.get(ka),i=s.webIfc,n=await s.readIfcFile(e),o=this.changeMap[t.uuid]??[];for(const a of o){const c=await t.getProperties(a);if(c)try{i.WriteLine(n,c)}catch{}else try{i.DeleteLine(n,a)}catch{}}const r=i.SaveModel(n);return s.webIfc.CloseModel(n),s.cleanUp(),r}async setAttributeListener(t,e,s){this.attributeListeners[t.uuid]||(this.attributeListeners[t.uuid]={});const i=this.attributeListeners[t.uuid][e]?this.attributeListeners[t.uuid][e][s]:null;if(i)return i;const n=await t.getProperties(e);if(!n)throw new Error(`Entity with expressID ${e} doesn't exists.`);const o=n[s];if(Array.isArray(o)||!o)throw new Error(`Attribute ${s} is array or null, and it can't have a listener.`);const r=o.value;if(r===void 0||r==null)throw new Error(`Attribute ${s} has a badly defined handle.`);const a=new M;return Object.defineProperty(n[s],"value",{get(){return this._value},async set(c){this._value=c,a.trigger(c)}}),n[s].value=r,this.attributeListeners[t.uuid][e]||(this.attributeListeners[t.uuid][e]={}),this.attributeListeners[t.uuid][e][s]=a,a}};I(Wa,"uuid","58c2d9f0-183c-48d6-a402-dfcf5b9a34df");const co=class lo extends q{constructor(t){super(t),I(this,"enabled",!0),I(this,"list",{}),I(this,"onDisposed",new M),I(this,"onFragmentsDisposed",e=>{const{groupID:s,fragmentIDs:i}=e;for(const n in this.list){const o=this.list[n],r=Object.keys(o);if(r.includes(s))delete o[s],Object.values(o).length===0&&delete this.list[n];else for(const a of r){const c=o[a];for(const d of i)delete c[d];Object.values(c).length===0&&delete o[a]}}}),t.add(lo.uuid,this),t.get(wt).onFragmentsDisposed.add(this.onFragmentsDisposed)}dispose(){this.list={},this.components.get(wt).onFragmentsDisposed.remove(this.onFragmentsDisposed),this.onDisposed.trigger(),this.onDisposed.reset()}remove(t){for(const e in this.list){const s=this.list[e];for(const i in s){const n=s[i];delete n[t]}}}find(t){const e=this.components.get(wt);if(!t){const o={};for(const[r,a]of e.list)o[r]=new Set(a.ids);return o}const s=Object.keys(t).length,i={};for(const o in t){const r=t[o];if(!this.list[o]){console.warn(`Classification ${o} does not exist.`);continue}for(const a of r){const c=this.list[o][a];if(c)for(const d in c){i[d]||(i[d]=new Map);for(const E of c[d]){const l=i[d].get(E);l===void 0?i[d].set(E,1):i[d].set(E,l+1)}}}}const n={};for(const o in i){const r=i[o];for(const[a,c]of r){if(c===void 0)throw new Error("Malformed fragments map!");c===s&&(n[o]||(n[o]=new Set),n[o].add(a))}}return n}byModel(t,e){this.list.models||(this.list.models={});const s=this.list.models;s[t]||(s[t]={});const i=s[t];for(const[n,o]of e.data){const r=o[0];for(const a of r){const c=e.keyFragments.get(a);c&&(i[c]||(i[c]=new Set),i[c].add(n))}}}async byPredefinedType(t){var e;this.list.predefinedTypes||(this.list.predefinedTypes={});const s=this.list.predefinedTypes,i=t.getAllPropertiesIDs();for(const n of i){const o=await t.getProperties(n);if(!o)continue;const r=String((e=o.PredefinedType)==null?void 0:e.value).toUpperCase();s[r]||(s[r]={});const a=s[r];for(const[c,d]of t.data){const E=d[0];for(const l of E){const u=t.keyFragments.get(l);if(!u)throw new Error("Fragment ID not found!");a[u]||(a[u]=new Set),a[u].add(o.expressID)}}}}byEntity(t){this.list.entities||(this.list.entities={});for(const[e,s]of t.data){const i=s[1][1],n=so[i];this.saveItem(t,"entities",n,e)}}byStorey(t){for(const[e,s]of t.data){const i=s[1][0].toString();this.saveItem(t,"storeys",i,e)}}async byIfcRel(t,e,s){Yt.isRel(e)&&await Yt.getRelationMap(t,e,async(i,n)=>{const{name:o}=await Yt.getEntityName(t,i);for(const r of n)this.saveItem(t,s,o??"NO REL NAME",r)})}setColor(t,e,s=!1){const i=this.components.get(wt);for(const n in t){const o=i.list.get(n);if(!o)continue;const r=t[n];o.setColor(e,r,s)}}resetColor(t){const e=this.components.get(wt);for(const s in t){const i=e.list.get(s);if(!i)continue;const n=t[s];i.resetColor(n)}}saveItem(t,e,s,i){this.list[e]||(this.list[e]={});const n=t.data.get(i);if(n)for(const o of n[0]){const r=t.keyFragments.get(o);if(r){const a=this.list[e];a[s]||(a[s]={}),a[s][r]||(a[s][r]=new Set),a[s][r].add(i)}}}};I(co,"uuid","e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7");let Xa=co;const Za=class Eo extends q{constructor(t){super(t),I(this,"enabled",!0),I(this,"height",10),I(this,"groupName","storeys"),I(this,"onDisposed",new M),I(this,"list",new Set),t.add(Eo.uuid,this)}dispose(){this.list.clear(),this.onDisposed.trigger(),this.onDisposed.reset()}set(t){if(!this.enabled)return;const e=this.components.get(Xa),s=this.components.get(wt),i=t?1:-1;let n=0;const o=e.list[this.groupName],r=new X;for(const a in o){r.elements[13]=n*i*this.height;for(const c in o[a]){const d=s.list.get(c),E=a+c,l=this.list.has(E);if(!d||t&&l||!t&&!l)continue;t?this.list.add(E):this.list.delete(E);const u=o[a][c];d.applyTransform(u,r)}n++}}};I(Za,"uuid","d260618b-ce88-4c7d-826c-6debb91de3e2");const Qa=class Io extends q{constructor(t){super(t),I(this,"enabled",!0),this.components.add(Io.uuid,this)}set(t,e){const s=this.components.get(wt);if(!e){for(const i in s.list){const n=s.list.get(i);n&&(n.setVisibility(t),this.updateCulledVisibility(n))}return}for(const i in e){const n=e[i],o=s.list.get(i);o&&(o.setVisibility(t,n),this.updateCulledVisibility(o))}}isolate(t){this.set(!1),this.set(!0,t)}updateCulledVisibility(t){const e=this.components.get(Da);for(const[s,i]of e.list){const n=i.colorMeshes.get(t.id);n&&(n.count=t.mesh.count)}}};I(Qa,"uuid","dd9ccf2d-8a21-4821-b7f6-2949add16a29");class ja extends Bi{constructor(){super(...arguments),I(this,"minGeometrySize",10),I(this,"minAssetsSize",1e3)}}class uo extends Bi{constructor(){super(...arguments),I(this,"propertiesSize",100)}}class qa extends q{constructor(){super(...arguments),I(this,"onPropertiesStreamed",new Kt),I(this,"onProgress",new Kt),I(this,"onIndicesStreamed",new Kt),I(this,"onDisposed",new M),I(this,"enabled",!0),I(this,"settings",new uo),I(this,"webIfc",new zt)}async dispose(){this.onIndicesStreamed.reset(),this.onPropertiesStreamed.reset(),this.webIfc=null,this.onDisposed.reset()}async streamFromBuffer(t){const e=performance.now();await this.readIfcFile(t),await this.streamAllProperties(),this.cleanUp(),console.log(`Streaming the IFC took ${performance.now()-e} ms!`)}async streamFromCallBack(t){const e=performance.now();await this.streamIfcFile(t),await this.streamAllProperties(),this.cleanUp(),console.log(`Streaming the IFC took ${performance.now()-e} ms!`)}async readIfcFile(t){const{path:e,absolute:s,logLevel:i}=this.settings.wasm;this.webIfc.SetWasmPath(e,s),await this.webIfc.Init(),i&&this.webIfc.SetLogLevel(i),this.webIfc.OpenModel(t,this.settings.webIfc)}async streamIfcFile(t){const{path:e,absolute:s,logLevel:i}=this.settings.wasm;this.webIfc.SetWasmPath(e,s),await this.webIfc.Init(),i&&this.webIfc.SetLogLevel(i),this.webIfc.OpenModelFromCallback(t,this.settings.webIfc)}async streamAllProperties(){const{propertiesSize:t}=this.settings,e=new Set(this.webIfc.GetIfcEntityList(0)),s=[_s,_i,Fi,Ss,gi,Oi],i=new Map,n=new Set([Si,Ni,wi,yi,$t]);for(const c of n)e.add(c);let o=.01,r=0;for(const c of e){if(r++,vi.has(c))continue;const d=n.has(c),E=this.webIfc.GetLineIDsWithType(0,c),l=E.size();let u=0;for(let C=0;Co&&(o+=.01,o=Math.max(o,T),await this.onProgress.trigger(Math.round(o*100)/100))}const a=[];for(const[c,d]of i)a.push([c,...d]);await this.onIndicesStreamed.trigger(a)}getIndices(t,e,s){const i=t.RelatedObjects||t.RelatedElements;if(!i){console.log(`Related objects not found: ${e}`);return}const n=t.RelatingType||t.RelatingMaterial||t.RelatingStructure||t.RelatingPropertyDefinition||t.RelatingGroup||t.RelatingClassification;if(!n){console.log(`Relating object not found: ${e}`);return}if(!Array.isArray(i)||n.value===void 0)return;const o=n.value;for(const r of i){if(r.value===void 0||r.value===null)continue;const a=r.value;s.has(a)||s.set(a,new Set),s.get(a).add(o)}}cleanUp(){this.webIfc=null,this.webIfc=new zt}}I(qa,"uuid","88d2c89c-ce32-47d7-8cb6-d51e4b311a0b");const Ka=class po extends q{constructor(t){super(t),I(this,"onGeometryStreamed",new M),I(this,"onAssetStreamed",new M),I(this,"onProgress",new M),I(this,"onIfcLoaded",new M),I(this,"onDisposed",new M),I(this,"settings",new ja),I(this,"enabled",!0),I(this,"webIfc",new zt),I(this,"_spatialTree",new oo),I(this,"_metaData",new ao),I(this,"_visitedGeometries",new Map),I(this,"_streamSerializer",new Uo),I(this,"_geometries",new Map),I(this,"_geometryCount",0),I(this,"_civil",new ro),I(this,"_groupSerializer",new Ln),I(this,"_assets",[]),I(this,"_meshesWithHoles",new Set),this.components.add(po.uuid,this),this.settings.excludedCategories.add(Mn)}dispose(){this.onIfcLoaded.reset(),this.onGeometryStreamed.reset(),this.onAssetStreamed.reset(),this.webIfc=null,this.onDisposed.trigger(),this.onDisposed.reset()}async streamFromBuffer(t){const e=performance.now();await this.readIfcFile(t),await this.streamAllGeometries(),this.cleanUp(),console.log(`Streaming the IFC took ${performance.now()-e} ms!`)}async streamFromCallBack(t){const e=performance.now();await this.streamIfcFile(t),await this.streamAllGeometries(),this.cleanUp(),console.log(`Streaming the IFC took ${performance.now()-e} ms!`)}async readIfcFile(t){const{path:e,absolute:s,logLevel:i}=this.settings.wasm;this.webIfc.SetWasmPath(e,s),await this.webIfc.Init(),i&&this.webIfc.SetLogLevel(i),this.webIfc.OpenModel(t,this.settings.webIfc)}async streamIfcFile(t){const{path:e,absolute:s,logLevel:i}=this.settings.wasm;this.webIfc.SetWasmPath(e,s),await this.webIfc.Init(),i&&this.webIfc.SetLogLevel(i),this.webIfc.OpenModelFromCallback(t,this.settings.webIfc)}async streamAllGeometries(){const{minGeometrySize:t,minAssetsSize:e}=this.settings;this._spatialTree.setUp(this.webIfc);const s=this.webIfc.GetIfcEntityList(0),i=[[]],n=new Un,{FILE_NAME:o,FILE_DESCRIPTION:r}=ft;n.ifcMetadata={name:this._metaData.get(this.webIfc,o),description:this._metaData.get(this.webIfc,r),schema:this.webIfc.GetModelSchema(0)||"IFC2X3",maxExpressID:this.webIfc.GetMaxExpressID(0)};let a=0,c=0;for(const m of s){if(!this.webIfc.IsIfcElement(m)&&m!==$t||this.settings.excludedCategories.has(m))continue;const R=this.webIfc.GetLineIDsWithType(0,m),F=R.size();console.log(F);for(let p=0;p t&&(a=0,c++,i.push([]));const A=R.get(p);i[c].push(A);const g=this._spatialTree.itemsByFloor[A]||0;n.data.set(A,[[],[g,m]]),a++}}this._spatialTree.cleanUp();let d=.01,E=0;for(const m of i){E++,this.webIfc.StreamMeshes(0,m,F=>{this.getMesh(this.webIfc,F,n)}),this._geometryCount>t&&await this.streamGeometries(),this._assets.length>e&&await this.streamAssets();const R=E/i.length;R>d&&(d+=.01,d=Math.max(d,R),this.onProgress.trigger(Math.round(d*100)/100))}this._geometryCount&&await this.streamGeometries(),this._assets.length&&await this.streamAssets();const{opaque:l,transparent:u}=n.geometryIDs;for(const[m,{index:R,uuid:F}]of this._visitedGeometries)n.keyFragments.set(R,F),(m>1?l:u).set(m,R);const T=n.data.keys();for(const m of T){const[R]=n.data.get(m);R.length||n.data.delete(m)}const C=this.webIfc.GetCoordinationMatrix(0);n.coordinationMatrix.fromArray(C),n.civilData=this._civil.read(this.webIfc);const f=this._groupSerializer.export(n);this.onIfcLoaded.trigger(f),n.dispose(!0)}cleanUp(){this.webIfc=null,this.webIfc=new zt,this._visitedGeometries.clear(),this._geometries.clear(),this._assets=[],this._meshesWithHoles.clear()}getMesh(t,e,s){const i=e.geometries.size(),n=e.expressID,o={id:n,geometries:[]};for(let r=0;ri&&(i+=.01,i=Math.max(i,l),await this.onProgress.trigger(Math.round(i*100)/100))}const o=await this.components.get(no).processFromWebIfc(this.webIfc,0);await this.onIndicesStreamed.trigger(o)}cleanUp(){this.webIfc=null,this.webIfc=new zt}}I($a,"uuid","88d2c89c-ce32-47d7-8cb6-d51e4b311a0b");const Co=class To extends q{constructor(t){super(t),I(this,"enabled",!0),t.add(To.uuid,this)}getFace(t,e,s){if(!t.geometry.index)throw new Error("Geometry must be indexed!");const i=new Map,n=t.geometry.index.array,{plane:o}=this.getFaceData(e,s,t),r=[];for(let E=0;E p.id);if(!u.size){const p=a++;for(const{id:A}of l)c.set(A,p);d.set(p,{edges:new Set(T),indices:new Set([E])});continue}let C=null;const f=new Set,m=new Set(T);for(const[p,A]of u){C===null?C=A:A!==C&&f.add(A),c.delete(p);const{edges:g}=d.get(A);g.delete(p),m.delete(p)}if(C===null)throw new Error("Error computing face!");const R=d.get(C),{indices:F}=R;F.add(E);for(const p of m){c.set(p,C);const{edges:A}=R;A.add(p)}for(const p of f){const A=d.get(p),{edges:g,indices:_}=A,S=d.get(C),{edges:w,indices:y}=S;for(const L of g)w.add(L),c.set(L,C);for(const L of _)y.add(L);d.delete(p)}}for(const[E,{indices:l,edges:u}]of d)if(l.has(e)){const T=[];for(const C of u){const f=i.get(C);T.push(f)}return{edges:T,indices:l}}return null}static distanceFromPointToLine(t,e,s,i=!1){const n=new At,o=new O;return n.set(e,s),n.closestPointToPoint(t,i,o),o.distanceTo(t)}getFaceData(t,e,s){const i=this.getVerticesAndNormal(s,t,e),{p1:n,p2:o,p3:r,faceNormal:a}=i;this.round(n),this.round(o),this.round(r),this.round(a);const c=[{id:`${n.x}|${n.y}|${n.z}`,value:n},{id:`${o.x}|${o.y}|${o.z}`,value:o},{id:`${r.x}|${r.y}|${r.z}`,value:r}];c.sort((R,F)=>R.id F.id?1:0);const[{id:d,value:E},{id:l,value:u},{id:T,value:C}]=c,f=[{id:`${d}|${l}`,distance:E.distanceTo(u),points:[E,u]},{id:`${l}|${T}`,distance:u.distanceTo(C),points:[u,C]},{id:`${d}|${T}`,distance:E.distanceTo(C),points:[E,C]}],m=new fe;return m.setFromNormalAndCoplanarPoint(a,n),m.constant=Math.round(m.constant*10)/10,{plane:m,edges:f}}getVerticesAndNormal(t,e,s){if(!t.geometry.index)throw new Error("Geometry must be indexed!");const i=t.geometry.index.array,n=t.geometry.attributes.position.array,o=t.geometry.attributes.normal.array,r=i[e*3]*3,a=i[e*3+1]*3,c=i[e*3+2]*3,d=new O(n[r],n[r+1],n[r+2]),E=new O(n[a],n[a+1],n[a+2]),l=new O(n[c],n[c+1],n[c+2]),u=new O(o[r],o[r+1],o[r+2]),T=new O(o[a],o[a+1],o[a+2]),C=new O(o[c],o[c+1],o[c+2]),f=(u.x+T.x+C.x)/3,m=(u.y+T.y+C.y)/3,R=(u.z+T.z+C.z)/3,F=new O(f,m,R);if(!F.x&&!F.y&&!F.z&&console.log("hey"),s!==void 0&&t instanceof Ge){const p=new X;t.getMatrixAt(s,p);const A=new X;A.extractRotation(p),F.applyMatrix4(A),d.applyMatrix4(p),E.applyMatrix4(p),l.applyMatrix4(p)}return{p1:d,p2:E,p3:l,faceNormal:F}}round(t){t.x=Math.trunc(t.x*1e3)/1e3,t.y=Math.trunc(t.y*1e3)/1e3,t.z=Math.trunc(t.z*1e3)/1e3}};I(Co,"uuid","267ca032-672f-4cb0-afa9-d24e904f39d6");let rh=Co;export{oh as A,Da as C,Yt as G,Ei as H,wt as I,q as J,Kt as K,Ra as N,Xa as R,M as U,Ma as Y,rh as _,me as a,no as b,bi as c,ka as d,th as e,la as f,so as g,sh as i,He as k,ih as m,nh as n,ma as p,eh as s}; diff --git a/examples/assets/index-Ba8czaZS.js b/examples/assets/index-Ba8czaZS.js new file mode 100644 index 000000000..5b5d1a12e --- /dev/null +++ b/examples/assets/index-Ba8czaZS.js @@ -0,0 +1 @@ +var h=Object.defineProperty;var m=(n,F,E)=>F in n?h(n,F,{enumerable:!0,configurable:!0,writable:!0,value:E}):n[F]=E;var L=(n,F,E)=>(m(n,typeof F!="symbol"?F+"":F,E),E);import{Z as b,am as v,ad as x,a2 as V,aa as w,_ as H,$ as p,a0 as f,a1 as d,a3 as W,a4 as g,a5 as X}from"./web-ifc-api-BiYij3qq.js";import{C as y,E as o}from"./index-DsPLPeA6.js";const Y=class Y extends y{constructor(E){super(E);L(this,"onDisposed",new o);L(this,"onFragmentsLoaded",new o);L(this,"onFragmentsDisposed",new o);L(this,"list",new Map);L(this,"groups",new Map);L(this,"enabled",!0);L(this,"baseCoordinationModel","");L(this,"_loader",new b);this.components.add(Y.uuid,this)}get meshes(){const E=[];for(const[I,C]of this.list)E.push(C.mesh);return E}dispose(){for(const[E,I]of this.groups)I.dispose(!0);this.baseCoordinationModel="",this.groups.clear(),this.list.clear(),this.onFragmentsLoaded.reset(),this.onFragmentsDisposed.reset(),this.onDisposed.trigger(),this.onDisposed.reset()}disposeGroup(E){const{uuid:I}=E,C=[];for(const T of E.items)C.push(T.id),this.list.delete(T.id);E.dispose(!0),this.groups.delete(E.uuid),this.onFragmentsDisposed.trigger({groupID:I,fragmentIDs:C})}load(E,I){const T={...{coordinate:!0},...I},{coordinate:R,properties:A,relationsMap:N}=T,O=this._loader.import(E);for(const S of O.items)S.group=O,this.list.set(S.id,S);return R&&this.coordinate([O]),this.groups.set(O.uuid,O),A&&O.setLocalProperties(A),N&&this.components.get(l).setRelationMap(O,N),this.onFragmentsLoaded.trigger(O),O}export(E){return this._loader.export(E)}coordinate(E=Array.from(this.groups.values())){if(this.baseCoordinationModel.length===0){const T=E.pop();if(!T)return;this.baseCoordinationModel=T.uuid}if(!E.length)return;const C=this.groups.get(this.baseCoordinationModel);if(!C){console.log("No base model found for coordination!");return}for(const T of E)T!==C&&(T.position.set(0,0,0),T.rotation.set(0,0,0),T.scale.set(1,1,1),T.updateMatrix(),T.applyMatrix4(T.coordinationMatrix.clone().invert()),T.applyMatrix4(C.coordinationMatrix))}};L(Y,"uuid","fef46874-46a3-461b-8c44-2922ab77c806");let a=Y;const K={950732822:"IFCURIREFERENCE",4075327185:"IFCTIME",1209108979:"IFCTEMPERATURERATEOFCHANGEMEASURE",3457685358:"IFCSOUNDPRESSURELEVELMEASURE",4157543285:"IFCSOUNDPOWERLEVELMEASURE",2798247006:"IFCPROPERTYSETDEFINITIONSET",1790229001:"IFCPOSITIVEINTEGER",525895558:"IFCNONNEGATIVELENGTHMEASURE",1774176899:"IFCLINEINDEX",1275358634:"IFCLANGUAGEID",2541165894:"IFCDURATION",3701338814:"IFCDAYINWEEKNUMBER",2195413836:"IFCDATETIME",937566702:"IFCDATE",1683019596:"IFCCARDINALPOINTREFERENCE",2314439260:"IFCBINARY",1500781891:"IFCAREADENSITYMEASURE",3683503648:"IFCARCINDEX",4065007721:"IFCYEARNUMBER",1718600412:"IFCWARPINGMOMENTMEASURE",51269191:"IFCWARPINGCONSTANTMEASURE",2593997549:"IFCVOLUMETRICFLOWRATEMEASURE",3458127941:"IFCVOLUMEMEASURE",3345633955:"IFCVAPORPERMEABILITYMEASURE",1278329552:"IFCTORQUEMEASURE",2591213694:"IFCTIMESTAMP",2726807636:"IFCTIMEMEASURE",743184107:"IFCTHERMODYNAMICTEMPERATUREMEASURE",2016195849:"IFCTHERMALTRANSMITTANCEMEASURE",857959152:"IFCTHERMALRESISTANCEMEASURE",2281867870:"IFCTHERMALEXPANSIONCOEFFICIENTMEASURE",2645777649:"IFCTHERMALCONDUCTIVITYMEASURE",232962298:"IFCTHERMALADMITTANCEMEASURE",296282323:"IFCTEXTTRANSFORMATION",603696268:"IFCTEXTFONTNAME",3490877962:"IFCTEXTDECORATION",1460886941:"IFCTEXTALIGNMENT",2801250643:"IFCTEXT",58845555:"IFCTEMPERATUREGRADIENTMEASURE",361837227:"IFCSPECULARROUGHNESS",2757832317:"IFCSPECULAREXPONENT",3477203348:"IFCSPECIFICHEATCAPACITYMEASURE",993287707:"IFCSOUNDPRESSUREMEASURE",846465480:"IFCSOUNDPOWERMEASURE",3471399674:"IFCSOLIDANGLEMEASURE",408310005:"IFCSHEARMODULUSMEASURE",2190458107:"IFCSECTIONALAREAINTEGRALMEASURE",3467162246:"IFCSECTIONMODULUSMEASURE",2766185779:"IFCSECONDINMINUTE",3211557302:"IFCROTATIONALSTIFFNESSMEASURE",1755127002:"IFCROTATIONALMASSMEASURE",2133746277:"IFCROTATIONALFREQUENCYMEASURE",200335297:"IFCREAL",96294661:"IFCRATIOMEASURE",3972513137:"IFCRADIOACTIVITYMEASURE",3665567075:"IFCPRESSUREMEASURE",2169031380:"IFCPRESENTABLETEXT",1364037233:"IFCPOWERMEASURE",1245737093:"IFCPOSITIVERATIOMEASURE",3054510233:"IFCPOSITIVEPLANEANGLEMEASURE",2815919920:"IFCPOSITIVELENGTHMEASURE",4042175685:"IFCPLANEANGLEMEASURE",2642773653:"IFCPLANARFORCEMEASURE",2260317790:"IFCPARAMETERVALUE",929793134:"IFCPHMEASURE",2395907400:"IFCNUMERICMEASURE",2095195183:"IFCNORMALISEDRATIOMEASURE",765770214:"IFCMONTHINYEARNUMBER",2615040989:"IFCMONETARYMEASURE",3114022597:"IFCMOMENTOFINERTIAMEASURE",1648970520:"IFCMOLECULARWEIGHTMEASURE",3177669450:"IFCMOISTUREDIFFUSIVITYMEASURE",1753493141:"IFCMODULUSOFSUBGRADEREACTIONMEASURE",1052454078:"IFCMODULUSOFROTATIONALSUBGRADEREACTIONMEASURE",2173214787:"IFCMODULUSOFLINEARSUBGRADEREACTIONMEASURE",3341486342:"IFCMODULUSOFELASTICITYMEASURE",102610177:"IFCMINUTEINHOUR",3531705166:"IFCMASSPERLENGTHMEASURE",3124614049:"IFCMASSMEASURE",4017473158:"IFCMASSFLOWRATEMEASURE",1477762836:"IFCMASSDENSITYMEASURE",2486716878:"IFCMAGNETICFLUXMEASURE",286949696:"IFCMAGNETICFLUXDENSITYMEASURE",151039812:"IFCLUMINOUSINTENSITYMEASURE",2755797622:"IFCLUMINOUSINTENSITYDISTRIBUTIONMEASURE",2095003142:"IFCLUMINOUSFLUXMEASURE",503418787:"IFCLOGICAL",3086160713:"IFCLINEARVELOCITYMEASURE",1307019551:"IFCLINEARSTIFFNESSMEASURE",2128979029:"IFCLINEARMOMENTMEASURE",191860431:"IFCLINEARFORCEMEASURE",1243674935:"IFCLENGTHMEASURE",3258342251:"IFCLABEL",2054016361:"IFCKINEMATICVISCOSITYMEASURE",3192672207:"IFCISOTHERMALMOISTURECAPACITYMEASURE",3686016028:"IFCIONCONCENTRATIONMEASURE",3809634241:"IFCINTEGERCOUNTRATEMEASURE",1939436016:"IFCINTEGER",2679005408:"IFCINDUCTANCEMEASURE",3358199106:"IFCILLUMINANCEMEASURE",983778844:"IFCIDENTIFIER",2589826445:"IFCHOURINDAY",1158859006:"IFCHEATINGVALUEMEASURE",3113092358:"IFCHEATFLUXDENSITYMEASURE",3064340077:"IFCGLOBALLYUNIQUEID",3044325142:"IFCFREQUENCYMEASURE",1361398929:"IFCFORCEMEASURE",2590844177:"IFCFONTWEIGHT",2715512545:"IFCFONTVARIANT",1102727119:"IFCFONTSTYLE",2078135608:"IFCENERGYMEASURE",2506197118:"IFCELECTRICVOLTAGEMEASURE",2951915441:"IFCELECTRICRESISTANCEMEASURE",3790457270:"IFCELECTRICCURRENTMEASURE",2093906313:"IFCELECTRICCONDUCTANCEMEASURE",3818826038:"IFCELECTRICCHARGEMEASURE",1827137117:"IFCELECTRICCAPACITANCEMEASURE",69416015:"IFCDYNAMICVISCOSITYMEASURE",524656162:"IFCDOSEEQUIVALENTMEASURE",4134073009:"IFCDIMENSIONCOUNT",1514641115:"IFCDESCRIPTIVEMEASURE",300323983:"IFCDAYLIGHTSAVINGHOUR",86635668:"IFCDAYINMONTHNUMBER",94842927:"IFCCURVATUREMEASURE",1778710042:"IFCCOUNTMEASURE",3238673880:"IFCCONTEXTDEPENDENTMEASURE",3812528620:"IFCCOMPOUNDPLANEANGLEMEASURE",2991860651:"IFCCOMPLEXNUMBER",1867003952:"IFCBOXALIGNMENT",2735952531:"IFCBOOLEAN",2650437152:"IFCAREAMEASURE",632304761:"IFCANGULARVELOCITYMEASURE",360377573:"IFCAMOUNTOFSUBSTANCEMEASURE",4182062534:"IFCACCELERATIONMEASURE",3699917729:"IFCABSORBEDDOSEMEASURE",1971632696:"IFCGEOSLICE",2680139844:"IFCGEOMODEL",24726584:"IFCELECTRICFLOWTREATMENTDEVICE",3693000487:"IFCDISTRIBUTIONBOARD",3460952963:"IFCCONVEYORSEGMENT",3999819293:"IFCCAISSONFOUNDATION",3314249567:"IFCBOREHOLE",4196446775:"IFCBEARING",325726236:"IFCALIGNMENT",3425753595:"IFCTRACKELEMENT",991950508:"IFCSIGNAL",3798194928:"IFCREINFORCEDSOIL",3290496277:"IFCRAIL",1383356374:"IFCPAVEMENT",2182337498:"IFCNAVIGATIONELEMENT",234836483:"IFCMOORINGDEVICE",2078563270:"IFCMOBILETELECOMMUNICATIONSAPPLIANCE",1638804497:"IFCLIQUIDTERMINAL",1154579445:"IFCLINEARPOSITIONINGELEMENT",2696325953:"IFCKERB",2713699986:"IFCGEOTECHNICALASSEMBLY",2142170206:"IFCELECTRICFLOWTREATMENTDEVICETYPE",3376911765:"IFCEARTHWORKSFILL",1077100507:"IFCEARTHWORKSELEMENT",3071239417:"IFCEARTHWORKSCUT",479945903:"IFCDISTRIBUTIONBOARDTYPE",3426335179:"IFCDEEPFOUNDATION",1502416096:"IFCCOURSE",2940368186:"IFCCONVEYORSEGMENTTYPE",3203706013:"IFCCAISSONFOUNDATIONTYPE",3862327254:"IFCBUILTSYSTEM",1876633798:"IFCBUILTELEMENT",963979645:"IFCBRIDGEPART",644574406:"IFCBRIDGE",3649138523:"IFCBEARINGTYPE",1662888072:"IFCALIGNMENTVERTICAL",317615605:"IFCALIGNMENTSEGMENT",1545765605:"IFCALIGNMENTHORIZONTAL",4266260250:"IFCALIGNMENTCANT",3956297820:"IFCVIBRATIONDAMPERTYPE",1530820697:"IFCVIBRATIONDAMPER",840318589:"IFCVEHICLE",1953115116:"IFCTRANSPORTATIONDEVICE",618700268:"IFCTRACKELEMENTTYPE",2281632017:"IFCTENDONCONDUITTYPE",3663046924:"IFCTENDONCONDUIT",42703149:"IFCSINESPIRAL",1894708472:"IFCSIGNALTYPE",3599934289:"IFCSIGNTYPE",33720170:"IFCSIGN",1027922057:"IFCSEVENTHORDERPOLYNOMIALSPIRAL",544395925:"IFCSEGMENTEDREFERENCECURVE",3649235739:"IFCSECONDORDERPOLYNOMIALSPIRAL",550521510:"IFCROADPART",146592293:"IFCROAD",3818125796:"IFCRELADHERESTOELEMENT",4021432810:"IFCREFERENT",1891881377:"IFCRAILWAYPART",3992365140:"IFCRAILWAY",1763565496:"IFCRAILTYPE",1946335990:"IFCPOSITIONINGELEMENT",514975943:"IFCPAVEMENTTYPE",506776471:"IFCNAVIGATIONELEMENTTYPE",710110818:"IFCMOORINGDEVICETYPE",1950438474:"IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE",976884017:"IFCMARINEPART",525669439:"IFCMARINEFACILITY",1770583370:"IFCLIQUIDTERMINALTYPE",2176059722:"IFCLINEARELEMENT",679976338:"IFCKERBTYPE",3948183225:"IFCIMPACTPROTECTIONDEVICETYPE",2568555532:"IFCIMPACTPROTECTIONDEVICE",2898700619:"IFCGRADIENTCURVE",1594536857:"IFCGEOTECHNICALSTRATUM",4230923436:"IFCGEOTECHNICALELEMENT",4228831410:"IFCFACILITYPARTCOMMON",1310830890:"IFCFACILITYPART",24185140:"IFCFACILITY",4234616927:"IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID",1306400036:"IFCDEEPFOUNDATIONTYPE",4189326743:"IFCCOURSETYPE",2000195564:"IFCCOSINESPIRAL",3497074424:"IFCCLOTHOID",1626504194:"IFCBUILTELEMENTTYPE",3651464721:"IFCVEHICLETYPE",1229763772:"IFCTRIANGULATEDIRREGULARNETWORK",3665877780:"IFCTRANSPORTATIONDEVICETYPE",782932809:"IFCTHIRDORDERPOLYNOMIALSPIRAL",2735484536:"IFCSPIRAL",1356537516:"IFCSECTIONEDSURFACE",1290935644:"IFCSECTIONEDSOLIDHORIZONTAL",1862484736:"IFCSECTIONEDSOLID",1441486842:"IFCRELPOSITIONS",1033248425:"IFCRELASSOCIATESPROFILEDEF",3381221214:"IFCPOLYNOMIALCURVE",2485787929:"IFCOFFSETCURVEBYDISTANCES",590820931:"IFCOFFSETCURVE",3465909080:"IFCINDEXEDPOLYGONALTEXTUREMAP",593015953:"IFCDIRECTRIXCURVESWEPTAREASOLID",4212018352:"IFCCURVESEGMENT",3425423356:"IFCAXIS2PLACEMENTLINEAR",823603102:"IFCSEGMENT",2165702409:"IFCPOINTBYDISTANCEEXPRESSION",182550632:"IFCOPENCROSSPROFILEDEF",388784114:"IFCLINEARPLACEMENT",536804194:"IFCALIGNMENTHORIZONTALSEGMENT",3752311538:"IFCALIGNMENTCANTSEGMENT",1010789467:"IFCTEXTURECOORDINATEINDICESWITHVOIDS",222769930:"IFCTEXTURECOORDINATEINDICES",2691318326:"IFCQUANTITYNUMBER",3633395639:"IFCALIGNMENTVERTICALSEGMENT",2879124712:"IFCALIGNMENTPARAMETERSEGMENT",25142252:"IFCCONTROLLER",3087945054:"IFCALARM",4288193352:"IFCACTUATOR",630975310:"IFCUNITARYCONTROLELEMENT",4086658281:"IFCSENSOR",2295281155:"IFCPROTECTIVEDEVICETRIPPINGUNIT",182646315:"IFCFLOWINSTRUMENT",1426591983:"IFCFIRESUPPRESSIONTERMINAL",819412036:"IFCFILTER",3415622556:"IFCFAN",1003880860:"IFCELECTRICTIMECONTROL",402227799:"IFCELECTRICMOTOR",264262732:"IFCELECTRICGENERATOR",3310460725:"IFCELECTRICFLOWSTORAGEDEVICE",862014818:"IFCELECTRICDISTRIBUTIONBOARD",1904799276:"IFCELECTRICAPPLIANCE",1360408905:"IFCDUCTSILENCER",3518393246:"IFCDUCTSEGMENT",342316401:"IFCDUCTFITTING",562808652:"IFCDISTRIBUTIONCIRCUIT",4074379575:"IFCDAMPER",3640358203:"IFCCOOLINGTOWER",4136498852:"IFCCOOLEDBEAM",2272882330:"IFCCONDENSER",3571504051:"IFCCOMPRESSOR",3221913625:"IFCCOMMUNICATIONSAPPLIANCE",639361253:"IFCCOIL",3902619387:"IFCCHILLER",4217484030:"IFCCABLESEGMENT",1051757585:"IFCCABLEFITTING",3758799889:"IFCCABLECARRIERSEGMENT",635142910:"IFCCABLECARRIERFITTING",2938176219:"IFCBURNER",32344328:"IFCBOILER",2906023776:"IFCBEAMSTANDARDCASE",277319702:"IFCAUDIOVISUALAPPLIANCE",2056796094:"IFCAIRTOAIRHEATRECOVERY",177149247:"IFCAIRTERMINALBOX",1634111441:"IFCAIRTERMINAL",486154966:"IFCWINDOWSTANDARDCASE",4237592921:"IFCWASTETERMINAL",4156078855:"IFCWALLELEMENTEDCASE",4207607924:"IFCVALVE",4292641817:"IFCUNITARYEQUIPMENT",3179687236:"IFCUNITARYCONTROLELEMENTTYPE",3026737570:"IFCTUBEBUNDLE",3825984169:"IFCTRANSFORMER",812556717:"IFCTANK",1162798199:"IFCSWITCHINGDEVICE",385403989:"IFCSTRUCTURALLOADCASE",1404847402:"IFCSTACKTERMINAL",1999602285:"IFCSPACEHEATER",3420628829:"IFCSOLARDEVICE",3027962421:"IFCSLABSTANDARDCASE",3127900445:"IFCSLABELEMENTEDCASE",1329646415:"IFCSHADINGDEVICE",3053780830:"IFCSANITARYTERMINAL",2572171363:"IFCREINFORCINGBARTYPE",1232101972:"IFCRATIONALBSPLINECURVEWITHKNOTS",90941305:"IFCPUMP",655969474:"IFCPROTECTIVEDEVICETRIPPINGUNITTYPE",738039164:"IFCPROTECTIVEDEVICE",1156407060:"IFCPLATESTANDARDCASE",3612865200:"IFCPIPESEGMENT",310824031:"IFCPIPEFITTING",3694346114:"IFCOUTLET",144952367:"IFCOUTERBOUNDARYCURVE",2474470126:"IFCMOTORCONNECTION",1911478936:"IFCMEMBERSTANDARDCASE",1437502449:"IFCMEDICALDEVICE",629592764:"IFCLIGHTFIXTURE",76236018:"IFCLAMP",2176052936:"IFCJUNCTIONBOX",4175244083:"IFCINTERCEPTOR",2068733104:"IFCHUMIDIFIER",3319311131:"IFCHEATEXCHANGER",2188021234:"IFCFLOWMETER",1209101575:"IFCEXTERNALSPATIALELEMENT",484807127:"IFCEVAPORATOR",3747195512:"IFCEVAPORATIVECOOLER",2814081492:"IFCENGINE",2417008758:"IFCELECTRICDISTRIBUTIONBOARDTYPE",3242481149:"IFCDOORSTANDARDCASE",3205830791:"IFCDISTRIBUTIONSYSTEM",400855858:"IFCCOMMUNICATIONSAPPLIANCETYPE",905975707:"IFCCOLUMNSTANDARDCASE",1677625105:"IFCCIVILELEMENT",3296154744:"IFCCHIMNEY",2674252688:"IFCCABLEFITTINGTYPE",2188180465:"IFCBURNERTYPE",1177604601:"IFCBUILDINGSYSTEM",39481116:"IFCBUILDINGELEMENTPARTTYPE",1136057603:"IFCBOUNDARYCURVE",2461110595:"IFCBSPLINECURVEWITHKNOTS",1532957894:"IFCAUDIOVISUALAPPLIANCETYPE",4088093105:"IFCWORKCALENDAR",4009809668:"IFCWINDOWTYPE",926996030:"IFCVOIDINGFEATURE",2391383451:"IFCVIBRATIONISOLATOR",2415094496:"IFCTENDONTYPE",3081323446:"IFCTENDONANCHORTYPE",413509423:"IFCSYSTEMFURNITUREELEMENT",3101698114:"IFCSURFACEFEATURE",3657597509:"IFCSTRUCTURALSURFACEACTION",2757150158:"IFCSTRUCTURALCURVEREACTION",1004757350:"IFCSTRUCTURALCURVEACTION",338393293:"IFCSTAIRTYPE",1072016465:"IFCSOLARDEVICETYPE",4074543187:"IFCSHADINGDEVICETYPE",2157484638:"IFCSEAMCURVE",2781568857:"IFCROOFTYPE",2310774935:"IFCREINFORCINGMESHTYPE",964333572:"IFCREINFORCINGELEMENTTYPE",683857671:"IFCRATIONALBSPLINESURFACEWITHKNOTS",1469900589:"IFCRAMPTYPE",2839578677:"IFCPOLYGONALFACESET",1158309216:"IFCPILETYPE",3079942009:"IFCOPENINGSTANDARDCASE",1114901282:"IFCMEDICALDEVICETYPE",3113134337:"IFCINTERSECTIONCURVE",3946677679:"IFCINTERCEPTORTYPE",2571569899:"IFCINDEXEDPOLYCURVE",3493046030:"IFCGEOGRAPHICELEMENT",1509553395:"IFCFURNITURE",1893162501:"IFCFOOTINGTYPE",2853485674:"IFCEXTERNALSPATIALSTRUCTUREELEMENT",4148101412:"IFCEVENT",132023988:"IFCENGINETYPE",2397081782:"IFCELEMENTASSEMBLYTYPE",2323601079:"IFCDOORTYPE",1213902940:"IFCCYLINDRICALSURFACE",1525564444:"IFCCONSTRUCTIONPRODUCTRESOURCETYPE",4105962743:"IFCCONSTRUCTIONMATERIALRESOURCETYPE",2185764099:"IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE",15328376:"IFCCOMPOSITECURVEONSURFACE",3875453745:"IFCCOMPLEXPROPERTYTEMPLATE",3893394355:"IFCCIVILELEMENTTYPE",2197970202:"IFCCHIMNEYTYPE",167062518:"IFCBSPLINESURFACEWITHKNOTS",2887950389:"IFCBSPLINESURFACE",2603310189:"IFCADVANCEDBREPWITHVOIDS",1635779807:"IFCADVANCEDBREP",2916149573:"IFCTRIANGULATEDFACESET",1935646853:"IFCTOROIDALSURFACE",2387106220:"IFCTESSELLATEDFACESET",3206491090:"IFCTASKTYPE",699246055:"IFCSURFACECURVE",4095615324:"IFCSUBCONTRACTRESOURCETYPE",603775116:"IFCSTRUCTURALSURFACEREACTION",4015995234:"IFCSPHERICALSURFACE",2481509218:"IFCSPATIALZONETYPE",463610769:"IFCSPATIALZONE",710998568:"IFCSPATIALELEMENTTYPE",1412071761:"IFCSPATIALELEMENT",3663146110:"IFCSIMPLEPROPERTYTEMPLATE",3243963512:"IFCREVOLVEDAREASOLIDTAPERED",816062949:"IFCREPARAMETRISEDCOMPOSITECURVESEGMENT",1521410863:"IFCRELSPACEBOUNDARY2NDLEVEL",3523091289:"IFCRELSPACEBOUNDARY1STLEVEL",427948657:"IFCRELINTERFERESELEMENTS",307848117:"IFCRELDEFINESBYTEMPLATE",1462361463:"IFCRELDEFINESBYOBJECT",2565941209:"IFCRELDECLARES",1027710054:"IFCRELASSIGNSTOGROUPBYFACTOR",3521284610:"IFCPROPERTYTEMPLATE",492091185:"IFCPROPERTYSETTEMPLATE",653396225:"IFCPROJECTLIBRARY",569719735:"IFCPROCEDURETYPE",3967405729:"IFCPREDEFINEDPROPERTYSET",1682466193:"IFCPCURVE",428585644:"IFCLABORRESOURCETYPE",2294589976:"IFCINDEXEDPOLYGONALFACEWITHVOIDS",178912537:"IFCINDEXEDPOLYGONALFACE",4095422895:"IFCGEOGRAPHICELEMENTTYPE",2652556860:"IFCFIXEDREFERENCESWEPTAREASOLID",2804161546:"IFCEXTRUDEDAREASOLIDTAPERED",4024345920:"IFCEVENTTYPE",2629017746:"IFCCURVEBOUNDEDSURFACE",1815067380:"IFCCREWRESOURCETYPE",3419103109:"IFCCONTEXT",2574617495:"IFCCONSTRUCTIONRESOURCETYPE",2059837836:"IFCCARTESIANPOINTLIST3D",1675464909:"IFCCARTESIANPOINTLIST2D",574549367:"IFCCARTESIANPOINTLIST",3406155212:"IFCADVANCEDFACE",3698973494:"IFCTYPERESOURCE",3736923433:"IFCTYPEPROCESS",901063453:"IFCTESSELLATEDITEM",1096409881:"IFCSWEPTDISKSOLIDPOLYGONAL",1042787934:"IFCRESOURCETIME",1608871552:"IFCRESOURCECONSTRAINTRELATIONSHIP",2943643501:"IFCRESOURCEAPPROVALRELATIONSHIP",2090586900:"IFCQUANTITYSET",1482703590:"IFCPROPERTYTEMPLATEDEFINITION",3778827333:"IFCPREDEFINEDPROPERTIES",2998442950:"IFCMIRROREDPROFILEDEF",853536259:"IFCMATERIALRELATIONSHIP",3404854881:"IFCMATERIALPROFILESETUSAGETAPERING",3079605661:"IFCMATERIALPROFILESETUSAGE",2852063980:"IFCMATERIALCONSTITUENTSET",3708119e3:"IFCMATERIALCONSTITUENT",1585845231:"IFCLAGTIME",2133299955:"IFCINDEXEDTRIANGLETEXTUREMAP",1437953363:"IFCINDEXEDTEXTUREMAP",3570813810:"IFCINDEXEDCOLOURMAP",1437805879:"IFCEXTERNALREFERENCERELATIONSHIP",297599258:"IFCEXTENDEDPROPERTIES",211053100:"IFCEVENTTIME",2713554722:"IFCCONVERSIONBASEDUNITWITHOFFSET",3285139300:"IFCCOLOURRGBLIST",1236880293:"IFCWORKTIME",1199560280:"IFCTIMEPERIOD",3611470254:"IFCTEXTUREVERTEXLIST",2771591690:"IFCTASKTIMERECURRING",1549132990:"IFCTASKTIME",2043862942:"IFCTABLECOLUMN",2934153892:"IFCSURFACEREINFORCEMENTAREA",609421318:"IFCSTRUCTURALLOADORRESULT",3478079324:"IFCSTRUCTURALLOADCONFIGURATION",1054537805:"IFCSCHEDULINGTIME",2439245199:"IFCRESOURCELEVELRELATIONSHIP",2433181523:"IFCREFERENCE",3915482550:"IFCRECURRENCEPATTERN",986844984:"IFCPROPERTYABSTRACTION",3843373140:"IFCPROJECTEDCRS",677532197:"IFCPRESENTATIONITEM",1507914824:"IFCMATERIALUSAGEDEFINITION",552965576:"IFCMATERIALPROFILEWITHOFFSETS",164193824:"IFCMATERIALPROFILESET",2235152071:"IFCMATERIALPROFILE",1847252529:"IFCMATERIALLAYERWITHOFFSETS",760658860:"IFCMATERIALDEFINITION",3057273783:"IFCMAPCONVERSION",4294318154:"IFCEXTERNALINFORMATION",1466758467:"IFCCOORDINATEREFERENCESYSTEM",1785450214:"IFCCOORDINATEOPERATION",775493141:"IFCCONNECTIONVOLUMEGEOMETRY",979691226:"IFCREINFORCINGBAR",3700593921:"IFCELECTRICDISTRIBUTIONPOINT",1062813311:"IFCDISTRIBUTIONCONTROLELEMENT",1052013943:"IFCDISTRIBUTIONCHAMBERELEMENT",578613899:"IFCCONTROLLERTYPE",2454782716:"IFCCHAMFEREDGEFEATURE",753842376:"IFCBEAM",3001207471:"IFCALARMTYPE",2874132201:"IFCACTUATORTYPE",3304561284:"IFCWINDOW",3512223829:"IFCWALLSTANDARDCASE",2391406946:"IFCWALL",3313531582:"IFCVIBRATIONISOLATORTYPE",2347447852:"IFCTENDONANCHOR",3824725483:"IFCTENDON",2515109513:"IFCSTRUCTURALANALYSISMODEL",4252922144:"IFCSTAIRFLIGHT",331165859:"IFCSTAIR",1529196076:"IFCSLAB",1783015770:"IFCSENSORTYPE",1376911519:"IFCROUNDEDEDGEFEATURE",2016517767:"IFCROOF",2320036040:"IFCREINFORCINGMESH",3027567501:"IFCREINFORCINGELEMENT",3055160366:"IFCRATIONALBEZIERCURVE",3283111854:"IFCRAMPFLIGHT",3024970846:"IFCRAMP",2262370178:"IFCRAILING",3171933400:"IFCPLATE",1687234759:"IFCPILE",1073191201:"IFCMEMBER",900683007:"IFCFOOTING",3508470533:"IFCFLOWTREATMENTDEVICE",2223149337:"IFCFLOWTERMINAL",707683696:"IFCFLOWSTORAGEDEVICE",987401354:"IFCFLOWSEGMENT",3132237377:"IFCFLOWMOVINGDEVICE",4037862832:"IFCFLOWINSTRUMENTTYPE",4278956645:"IFCFLOWFITTING",2058353004:"IFCFLOWCONTROLLER",4222183408:"IFCFIRESUPPRESSIONTERMINALTYPE",1810631287:"IFCFILTERTYPE",346874300:"IFCFANTYPE",1658829314:"IFCENERGYCONVERSIONDEVICE",857184966:"IFCELECTRICALELEMENT",1634875225:"IFCELECTRICALCIRCUIT",712377611:"IFCELECTRICTIMECONTROLTYPE",1217240411:"IFCELECTRICMOTORTYPE",1365060375:"IFCELECTRICHEATERTYPE",1534661035:"IFCELECTRICGENERATORTYPE",3277789161:"IFCELECTRICFLOWSTORAGEDEVICETYPE",663422040:"IFCELECTRICAPPLIANCETYPE",855621170:"IFCEDGEFEATURE",2030761528:"IFCDUCTSILENCERTYPE",3760055223:"IFCDUCTSEGMENTTYPE",869906466:"IFCDUCTFITTINGTYPE",395920057:"IFCDOOR",3041715199:"IFCDISTRIBUTIONPORT",3040386961:"IFCDISTRIBUTIONFLOWELEMENT",1945004755:"IFCDISTRIBUTIONELEMENT",2063403501:"IFCDISTRIBUTIONCONTROLELEMENTTYPE",1599208980:"IFCDISTRIBUTIONCHAMBERELEMENTTYPE",2635815018:"IFCDISCRETEACCESSORYTYPE",1335981549:"IFCDISCRETEACCESSORY",4147604152:"IFCDIAMETERDIMENSION",3961806047:"IFCDAMPERTYPE",3495092785:"IFCCURTAINWALL",1973544240:"IFCCOVERING",2954562838:"IFCCOOLINGTOWERTYPE",335055490:"IFCCOOLEDBEAMTYPE",488727124:"IFCCONSTRUCTIONPRODUCTRESOURCE",1060000209:"IFCCONSTRUCTIONMATERIALRESOURCE",3898045240:"IFCCONSTRUCTIONEQUIPMENTRESOURCE",1163958913:"IFCCONDITIONCRITERION",2188551683:"IFCCONDITION",2816379211:"IFCCONDENSERTYPE",3850581409:"IFCCOMPRESSORTYPE",843113511:"IFCCOLUMN",2301859152:"IFCCOILTYPE",2611217952:"IFCCIRCLE",2951183804:"IFCCHILLERTYPE",1285652485:"IFCCABLESEGMENTTYPE",3293546465:"IFCCABLECARRIERSEGMENTTYPE",395041908:"IFCCABLECARRIERFITTINGTYPE",1909888760:"IFCBUILDINGELEMENTPROXYTYPE",1095909175:"IFCBUILDINGELEMENTPROXY",2979338954:"IFCBUILDINGELEMENTPART",52481810:"IFCBUILDINGELEMENTCOMPONENT",3299480353:"IFCBUILDINGELEMENT",231477066:"IFCBOILERTYPE",1916977116:"IFCBEZIERCURVE",819618141:"IFCBEAMTYPE",1967976161:"IFCBSPLINECURVE",3460190687:"IFCASSET",2470393545:"IFCANGULARDIMENSION",1871374353:"IFCAIRTOAIRHEATRECOVERYTYPE",3352864051:"IFCAIRTERMINALTYPE",1411407467:"IFCAIRTERMINALBOXTYPE",3821786052:"IFCACTIONREQUEST",1213861670:"IFC2DCOMPOSITECURVE",1033361043:"IFCZONE",3342526732:"IFCWORKSCHEDULE",4218914973:"IFCWORKPLAN",1028945134:"IFCWORKCONTROL",1133259667:"IFCWASTETERMINALTYPE",1898987631:"IFCWALLTYPE",2769231204:"IFCVIRTUALELEMENT",728799441:"IFCVALVETYPE",1911125066:"IFCUNITARYEQUIPMENTTYPE",1600972822:"IFCTUBEBUNDLETYPE",3593883385:"IFCTRIMMEDCURVE",1620046519:"IFCTRANSPORTELEMENT",1692211062:"IFCTRANSFORMERTYPE",1637806684:"IFCTIMESERIESSCHEDULE",5716631:"IFCTANKTYPE",2254336722:"IFCSYSTEM",2315554128:"IFCSWITCHINGDEVICETYPE",148013059:"IFCSUBCONTRACTRESOURCE",1975003073:"IFCSTRUCTURALSURFACECONNECTION",2986769608:"IFCSTRUCTURALRESULTGROUP",1235345126:"IFCSTRUCTURALPOINTREACTION",734778138:"IFCSTRUCTURALPOINTCONNECTION",2082059205:"IFCSTRUCTURALPOINTACTION",3987759626:"IFCSTRUCTURALPLANARACTIONVARYING",1621171031:"IFCSTRUCTURALPLANARACTION",1252848954:"IFCSTRUCTURALLOADGROUP",1721250024:"IFCSTRUCTURALLINEARACTIONVARYING",1807405624:"IFCSTRUCTURALLINEARACTION",2445595289:"IFCSTRUCTURALCURVEMEMBERVARYING",214636428:"IFCSTRUCTURALCURVEMEMBER",4243806635:"IFCSTRUCTURALCURVECONNECTION",1179482911:"IFCSTRUCTURALCONNECTION",682877961:"IFCSTRUCTURALACTION",1039846685:"IFCSTAIRFLIGHTTYPE",3112655638:"IFCSTACKTERMINALTYPE",3812236995:"IFCSPACETYPE",652456506:"IFCSPACEPROGRAM",1305183839:"IFCSPACEHEATERTYPE",3856911033:"IFCSPACE",2533589738:"IFCSLABTYPE",4097777520:"IFCSITE",4105383287:"IFCSERVICELIFE",3517283431:"IFCSCHEDULETIMECONTROL",1768891740:"IFCSANITARYTERMINALTYPE",2863920197:"IFCRELASSIGNSTASKS",160246688:"IFCRELAGGREGATES",2324767716:"IFCRAMPFLIGHTTYPE",2893384427:"IFCRAILINGTYPE",3248260540:"IFCRADIUSDIMENSION",2250791053:"IFCPUMPTYPE",1842657554:"IFCPROTECTIVEDEVICETYPE",3651124850:"IFCPROJECTIONELEMENT",3642467123:"IFCPROJECTORDERRECORD",2904328755:"IFCPROJECTORDER",2744685151:"IFCPROCEDURE",3740093272:"IFCPORT",3724593414:"IFCPOLYLINE",4017108033:"IFCPLATETYPE",4231323485:"IFCPIPESEGMENTTYPE",804291784:"IFCPIPEFITTINGTYPE",3327091369:"IFCPERMIT",2382730787:"IFCPERFORMANCEHISTORY",2837617999:"IFCOUTLETTYPE",3425660407:"IFCORDERACTION",3588315303:"IFCOPENINGELEMENT",4143007308:"IFCOCCUPANT",1916936684:"IFCMOVE",977012517:"IFCMOTORCONNECTIONTYPE",3181161470:"IFCMEMBERTYPE",2108223431:"IFCMECHANICALFASTENERTYPE",377706215:"IFCMECHANICALFASTENER",2506943328:"IFCLINEARDIMENSION",1161773419:"IFCLIGHTFIXTURETYPE",1051575348:"IFCLAMPTYPE",3827777499:"IFCLABORRESOURCE",4288270099:"IFCJUNCTIONBOXTYPE",2391368822:"IFCINVENTORY",1806887404:"IFCHUMIDIFIERTYPE",1251058090:"IFCHEATEXCHANGERTYPE",2706460486:"IFCGROUP",3009204131:"IFCGRID",200128114:"IFCGASTERMINALTYPE",814719939:"IFCFURNITURESTANDARD",263784265:"IFCFURNISHINGELEMENT",3009222698:"IFCFLOWTREATMENTDEVICETYPE",2297155007:"IFCFLOWTERMINALTYPE",1339347760:"IFCFLOWSTORAGEDEVICETYPE",1834744321:"IFCFLOWSEGMENTTYPE",1482959167:"IFCFLOWMOVINGDEVICETYPE",3815607619:"IFCFLOWMETERTYPE",3198132628:"IFCFLOWFITTINGTYPE",3907093117:"IFCFLOWCONTROLLERTYPE",1287392070:"IFCFEATUREELEMENTSUBTRACTION",2143335405:"IFCFEATUREELEMENTADDITION",2827207264:"IFCFEATUREELEMENT",2489546625:"IFCFASTENERTYPE",647756555:"IFCFASTENER",3737207727:"IFCFACETEDBREPWITHVOIDS",807026263:"IFCFACETEDBREP",3390157468:"IFCEVAPORATORTYPE",3174744832:"IFCEVAPORATIVECOOLERTYPE",3272907226:"IFCEQUIPMENTSTANDARD",1962604670:"IFCEQUIPMENTELEMENT",2107101300:"IFCENERGYCONVERSIONDEVICETYPE",1704287377:"IFCELLIPSE",2590856083:"IFCELEMENTCOMPONENTTYPE",1623761950:"IFCELEMENTCOMPONENT",4123344466:"IFCELEMENTASSEMBLY",1758889154:"IFCELEMENT",360485395:"IFCELECTRICALBASEPROPERTIES",3849074793:"IFCDISTRIBUTIONFLOWELEMENTTYPE",3256556792:"IFCDISTRIBUTIONELEMENTTYPE",681481545:"IFCDIMENSIONCURVEDIRECTEDCALLOUT",1457835157:"IFCCURTAINWALLTYPE",3295246426:"IFCCREWRESOURCE",1916426348:"IFCCOVERINGTYPE",1419761937:"IFCCOSTSCHEDULE",3895139033:"IFCCOSTITEM",3293443760:"IFCCONTROL",2559216714:"IFCCONSTRUCTIONRESOURCE",2510884976:"IFCCONIC",3732776249:"IFCCOMPOSITECURVE",300633059:"IFCCOLUMNTYPE",2937912522:"IFCCIRCLEHOLLOWPROFILEDEF",3124254112:"IFCBUILDINGSTOREY",1950629157:"IFCBUILDINGELEMENTTYPE",4031249490:"IFCBUILDING",1260505505:"IFCBOUNDEDCURVE",3649129432:"IFCBOOLEANCLIPPINGRESULT",1334484129:"IFCBLOCK",3207858831:"IFCASYMMETRICISHAPEPROFILEDEF",1674181508:"IFCANNOTATION",2296667514:"IFCACTOR",2097647324:"IFCTRANSPORTELEMENTTYPE",3473067441:"IFCTASK",1580310250:"IFCSYSTEMFURNITUREELEMENTTYPE",4124788165:"IFCSURFACEOFREVOLUTION",2809605785:"IFCSURFACEOFLINEAREXTRUSION",2028607225:"IFCSURFACECURVESWEPTAREASOLID",4070609034:"IFCSTRUCTUREDDIMENSIONCALLOUT",2218152070:"IFCSTRUCTURALSURFACEMEMBERVARYING",3979015343:"IFCSTRUCTURALSURFACEMEMBER",3689010777:"IFCSTRUCTURALREACTION",530289379:"IFCSTRUCTURALMEMBER",3136571912:"IFCSTRUCTURALITEM",3544373492:"IFCSTRUCTURALACTIVITY",451544542:"IFCSPHERE",3893378262:"IFCSPATIALSTRUCTUREELEMENTTYPE",2706606064:"IFCSPATIALSTRUCTUREELEMENT",3626867408:"IFCRIGHTCIRCULARCYLINDER",4158566097:"IFCRIGHTCIRCULARCONE",1856042241:"IFCREVOLVEDAREASOLID",2914609552:"IFCRESOURCE",1401173127:"IFCRELVOIDSELEMENT",3451746338:"IFCRELSPACEBOUNDARY",366585022:"IFCRELSERVICESBUILDINGS",4122056220:"IFCRELSEQUENCE",1058617721:"IFCRELSCHEDULESCOSTITEMS",1245217292:"IFCRELREFERENCEDINSPATIALSTRUCTURE",750771296:"IFCRELPROJECTSELEMENT",202636808:"IFCRELOVERRIDESPROPERTIES",2051452291:"IFCRELOCCUPIESSPACES",3268803585:"IFCRELNESTS",4189434867:"IFCRELINTERACTIONREQUIREMENTS",279856033:"IFCRELFLOWCONTROLELEMENTS",3940055652:"IFCRELFILLSELEMENT",781010003:"IFCRELDEFINESBYTYPE",4186316022:"IFCRELDEFINESBYPROPERTIES",693640335:"IFCRELDEFINES",2551354335:"IFCRELDECOMPOSES",2802773753:"IFCRELCOVERSSPACES",886880790:"IFCRELCOVERSBLDGELEMENTS",3242617779:"IFCRELCONTAINEDINSPATIALSTRUCTURE",3678494232:"IFCRELCONNECTSWITHREALIZINGELEMENTS",504942748:"IFCRELCONNECTSWITHECCENTRICITY",1638771189:"IFCRELCONNECTSSTRUCTURALMEMBER",3912681535:"IFCRELCONNECTSSTRUCTURALELEMENT",2127690289:"IFCRELCONNECTSSTRUCTURALACTIVITY",3190031847:"IFCRELCONNECTSPORTS",4201705270:"IFCRELCONNECTSPORTTOELEMENT",3945020480:"IFCRELCONNECTSPATHELEMENTS",1204542856:"IFCRELCONNECTSELEMENTS",826625072:"IFCRELCONNECTS",2851387026:"IFCRELASSOCIATESPROFILEPROPERTIES",2655215786:"IFCRELASSOCIATESMATERIAL",3840914261:"IFCRELASSOCIATESLIBRARY",982818633:"IFCRELASSOCIATESDOCUMENT",2728634034:"IFCRELASSOCIATESCONSTRAINT",919958153:"IFCRELASSOCIATESCLASSIFICATION",4095574036:"IFCRELASSOCIATESAPPROVAL",1327628568:"IFCRELASSOCIATESAPPLIEDVALUE",1865459582:"IFCRELASSOCIATES",205026976:"IFCRELASSIGNSTORESOURCE",3372526763:"IFCRELASSIGNSTOPROJECTORDER",2857406711:"IFCRELASSIGNSTOPRODUCT",4278684876:"IFCRELASSIGNSTOPROCESS",1307041759:"IFCRELASSIGNSTOGROUP",2495723537:"IFCRELASSIGNSTOCONTROL",1683148259:"IFCRELASSIGNSTOACTOR",3939117080:"IFCRELASSIGNS",3454111270:"IFCRECTANGULARTRIMMEDSURFACE",2798486643:"IFCRECTANGULARPYRAMID",2770003689:"IFCRECTANGLEHOLLOWPROFILEDEF",3219374653:"IFCPROXY",1451395588:"IFCPROPERTYSET",4194566429:"IFCPROJECTIONCURVE",103090709:"IFCPROJECT",4208778838:"IFCPRODUCT",2945172077:"IFCPROCESS",220341763:"IFCPLANE",603570806:"IFCPLANARBOX",3566463478:"IFCPERMEABLECOVERINGPROPERTIES",3505215534:"IFCOFFSETCURVE3D",3388369263:"IFCOFFSETCURVE2D",3888040117:"IFCOBJECT",1425443689:"IFCMANIFOLDSOLIDBREP",1281925730:"IFCLINE",572779678:"IFCLSHAPEPROFILEDEF",1484403080:"IFCISHAPEPROFILEDEF",987898635:"IFCGEOMETRICCURVESET",1268542332:"IFCFURNITURETYPE",4238390223:"IFCFURNISHINGELEMENTTYPE",3455213021:"IFCFLUIDFLOWPROPERTIES",315944413:"IFCFILLAREASTYLETILES",4203026998:"IFCFILLAREASTYLETILESYMBOLWITHSTYLE",374418227:"IFCFILLAREASTYLEHATCHING",2047409740:"IFCFACEBASEDSURFACEMODEL",477187591:"IFCEXTRUDEDAREASOLID",80994333:"IFCENERGYPROPERTIES",2835456948:"IFCELLIPSEPROFILEDEF",2777663545:"IFCELEMENTARYSURFACE",339256511:"IFCELEMENTTYPE",1883228015:"IFCELEMENTQUANTITY",1472233963:"IFCEDGELOOP",4006246654:"IFCDRAUGHTINGPREDEFINEDCURVEFONT",445594917:"IFCDRAUGHTINGPREDEFINEDCOLOUR",3073041342:"IFCDRAUGHTINGCALLOUT",526551008:"IFCDOORSTYLE",1714330368:"IFCDOORPANELPROPERTIES",2963535650:"IFCDOORLININGPROPERTIES",32440307:"IFCDIRECTION",4054601972:"IFCDIMENSIONCURVETERMINATOR",606661476:"IFCDIMENSIONCURVE",693772133:"IFCDEFINEDSYMBOL",2827736869:"IFCCURVEBOUNDEDPLANE",2601014836:"IFCCURVE",2147822146:"IFCCSGSOLID",2506170314:"IFCCSGPRIMITIVE3D",194851669:"IFCCRANERAILFSHAPEPROFILEDEF",4133800736:"IFCCRANERAILASHAPEPROFILEDEF",2485617015:"IFCCOMPOSITECURVESEGMENT",2205249479:"IFCCLOSEDSHELL",1383045692:"IFCCIRCLEPROFILEDEF",1416205885:"IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM",3331915920:"IFCCARTESIANTRANSFORMATIONOPERATOR3D",3486308946:"IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM",3749851601:"IFCCARTESIANTRANSFORMATIONOPERATOR2D",59481748:"IFCCARTESIANTRANSFORMATIONOPERATOR",1123145078:"IFCCARTESIANPOINT",2898889636:"IFCCSHAPEPROFILEDEF",2713105998:"IFCBOXEDHALFSPACE",2581212453:"IFCBOUNDINGBOX",4182860854:"IFCBOUNDEDSURFACE",2736907675:"IFCBOOLEANRESULT",2740243338:"IFCAXIS2PLACEMENT3D",3125803723:"IFCAXIS2PLACEMENT2D",4261334040:"IFCAXIS1PLACEMENT",1302238472:"IFCANNOTATIONSURFACE",2265737646:"IFCANNOTATIONFILLAREAOCCURRENCE",669184980:"IFCANNOTATIONFILLAREA",3288037868:"IFCANNOTATIONCURVEOCCURRENCE",2543172580:"IFCZSHAPEPROFILEDEF",1299126871:"IFCWINDOWSTYLE",512836454:"IFCWINDOWPANELPROPERTIES",336235671:"IFCWINDOWLININGPROPERTIES",2759199220:"IFCVERTEXLOOP",1417489154:"IFCVECTOR",427810014:"IFCUSHAPEPROFILEDEF",2347495698:"IFCTYPEPRODUCT",1628702193:"IFCTYPEOBJECT",1345879162:"IFCTWODIRECTIONREPEATFACTOR",2715220739:"IFCTRAPEZIUMPROFILEDEF",3124975700:"IFCTEXTLITERALWITHEXTENT",4282788508:"IFCTEXTLITERAL",3028897424:"IFCTERMINATORSYMBOL",3071757647:"IFCTSHAPEPROFILEDEF",230924584:"IFCSWEPTSURFACE",1260650574:"IFCSWEPTDISKSOLID",2247615214:"IFCSWEPTAREASOLID",1878645084:"IFCSURFACESTYLERENDERING",2513912981:"IFCSURFACE",2233826070:"IFCSUBEDGE",3653947884:"IFCSTRUCTURALSTEELPROFILEPROPERTIES",3843319758:"IFCSTRUCTURALPROFILEPROPERTIES",1190533807:"IFCSTRUCTURALLOADSINGLEFORCEWARPING",1597423693:"IFCSTRUCTURALLOADSINGLEFORCE",1973038258:"IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION",2473145415:"IFCSTRUCTURALLOADSINGLEDISPLACEMENT",2668620305:"IFCSTRUCTURALLOADPLANARFORCE",1595516126:"IFCSTRUCTURALLOADLINEARFORCE",390701378:"IFCSPACETHERMALLOADPROPERTIES",1202362311:"IFCSOUNDVALUE",2485662743:"IFCSOUNDPROPERTIES",723233188:"IFCSOLIDMODEL",2609359061:"IFCSLIPPAGECONNECTIONCONDITION",4124623270:"IFCSHELLBASEDSURFACEMODEL",2411513650:"IFCSERVICELIFEFACTOR",1509187699:"IFCSECTIONEDSPINE",2778083089:"IFCROUNDEDRECTANGLEPROFILEDEF",478536968:"IFCRELATIONSHIP",3765753017:"IFCREINFORCEMENTDEFINITIONPROPERTIES",3413951693:"IFCREGULARTIMESERIES",3615266464:"IFCRECTANGLEPROFILEDEF",110355661:"IFCPROPERTYTABLEVALUE",3650150729:"IFCPROPERTYSINGLEVALUE",3357820518:"IFCPROPERTYSETDEFINITION",941946838:"IFCPROPERTYREFERENCEVALUE",2752243245:"IFCPROPERTYLISTVALUE",4166981789:"IFCPROPERTYENUMERATEDVALUE",1680319473:"IFCPROPERTYDEFINITION",871118103:"IFCPROPERTYBOUNDEDVALUE",673634403:"IFCPRODUCTDEFINITIONSHAPE",179317114:"IFCPREDEFINEDPOINTMARKERSYMBOL",433424934:"IFCPREDEFINEDDIMENSIONSYMBOL",2559016684:"IFCPREDEFINEDCURVEFONT",759155922:"IFCPREDEFINEDCOLOUR",2775532180:"IFCPOLYGONALBOUNDEDHALFSPACE",2924175390:"IFCPOLYLOOP",1423911732:"IFCPOINTONSURFACE",4022376103:"IFCPOINTONCURVE",2067069095:"IFCPOINT",1663979128:"IFCPLANAREXTENT",2004835150:"IFCPLACEMENT",597895409:"IFCPIXELTEXTURE",3021840470:"IFCPHYSICALCOMPLEXQUANTITY",2519244187:"IFCPATH",2529465313:"IFCPARAMETERIZEDPROFILEDEF",1029017970:"IFCORIENTEDEDGE",2665983363:"IFCOPENSHELL",2833995503:"IFCONEDIRECTIONREPEATFACTOR",219451334:"IFCOBJECTDEFINITION",1430189142:"IFCMECHANICALCONCRETEMATERIALPROPERTIES",2022407955:"IFCMATERIALDEFINITIONREPRESENTATION",2347385850:"IFCMAPPEDITEM",1008929658:"IFCLOOP",2624227202:"IFCLOCALPLACEMENT",3422422726:"IFCLIGHTSOURCESPOT",1520743889:"IFCLIGHTSOURCEPOSITIONAL",4266656042:"IFCLIGHTSOURCEGONIOMETRIC",2604431987:"IFCLIGHTSOURCEDIRECTIONAL",125510826:"IFCLIGHTSOURCEAMBIENT",1402838566:"IFCLIGHTSOURCE",3741457305:"IFCIRREGULARTIMESERIES",3905492369:"IFCIMAGETEXTURE",2445078500:"IFCHYGROSCOPICMATERIALPROPERTIES",812098782:"IFCHALFSPACESOLID",178086475:"IFCGRIDPLACEMENT",3590301190:"IFCGEOMETRICSET",4142052618:"IFCGEOMETRICREPRESENTATIONSUBCONTEXT",2453401579:"IFCGEOMETRICREPRESENTATIONITEM",3448662350:"IFCGEOMETRICREPRESENTATIONCONTEXT",1446786286:"IFCGENERALPROFILEPROPERTIES",803998398:"IFCGENERALMATERIALPROPERTIES",3857492461:"IFCFUELPROPERTIES",738692330:"IFCFILLAREASTYLE",4219587988:"IFCFAILURECONNECTIONCONDITION",3008276851:"IFCFACESURFACE",803316827:"IFCFACEOUTERBOUND",1809719519:"IFCFACEBOUND",2556980723:"IFCFACE",1860660968:"IFCEXTENDEDMATERIALPROPERTIES",476780140:"IFCEDGECURVE",3900360178:"IFCEDGE",4170525392:"IFCDRAUGHTINGPREDEFINEDTEXTFONT",3732053477:"IFCDOCUMENTREFERENCE",1694125774:"IFCDIMENSIONPAIR",2273265877:"IFCDIMENSIONCALLOUTRELATIONSHIP",3632507154:"IFCDERIVEDPROFILEDEF",3800577675:"IFCCURVESTYLE",2889183280:"IFCCONVERSIONBASEDUNIT",3050246964:"IFCCONTEXTDEPENDENTUNIT",45288368:"IFCCONNECTIONPOINTECCENTRICITY",1981873012:"IFCCONNECTIONCURVEGEOMETRY",370225590:"IFCCONNECTEDFACESET",1485152156:"IFCCOMPOSITEPROFILEDEF",2542286263:"IFCCOMPLEXPROPERTY",776857604:"IFCCOLOURRGB",647927063:"IFCCLASSIFICATIONREFERENCE",3150382593:"IFCCENTERLINEPROFILEDEF",616511568:"IFCBLOBTEXTURE",2705031697:"IFCARBITRARYPROFILEDEFWITHVOIDS",1310608509:"IFCARBITRARYOPENPROFILEDEF",3798115385:"IFCARBITRARYCLOSEDPROFILEDEF",2297822566:"IFCANNOTATIONTEXTOCCURRENCE",3612888222:"IFCANNOTATIONSYMBOLOCCURRENCE",962685235:"IFCANNOTATIONSURFACEOCCURRENCE",2442683028:"IFCANNOTATIONOCCURRENCE",1065908215:"IFCWATERPROPERTIES",891718957:"IFCVIRTUALGRIDINTERSECTION",1907098498:"IFCVERTEXPOINT",3304826586:"IFCVERTEXBASEDTEXTUREMAP",2799835756:"IFCVERTEX",180925521:"IFCUNITASSIGNMENT",1735638870:"IFCTOPOLOGYREPRESENTATION",1377556343:"IFCTOPOLOGICALREPRESENTATIONITEM",581633288:"IFCTIMESERIESVALUE",1718945513:"IFCTIMESERIESREFERENCERELATIONSHIP",3101149627:"IFCTIMESERIES",3317419933:"IFCTHERMALMATERIALPROPERTIES",1210645708:"IFCTEXTUREVERTEX",2552916305:"IFCTEXTUREMAP",1742049831:"IFCTEXTURECOORDINATEGENERATOR",280115917:"IFCTEXTURECOORDINATE",1484833681:"IFCTEXTSTYLEWITHBOXCHARACTERISTICS",1640371178:"IFCTEXTSTYLETEXTMODEL",2636378356:"IFCTEXTSTYLEFORDEFINEDFONT",1983826977:"IFCTEXTSTYLEFONTMODEL",1447204868:"IFCTEXTSTYLE",912023232:"IFCTELECOMADDRESS",531007025:"IFCTABLEROW",985171141:"IFCTABLE",1290481447:"IFCSYMBOLSTYLE",626085974:"IFCSURFACETEXTURE",1351298697:"IFCSURFACESTYLEWITHTEXTURES",846575682:"IFCSURFACESTYLESHADING",1607154358:"IFCSURFACESTYLEREFRACTION",3303107099:"IFCSURFACESTYLELIGHTING",1300840506:"IFCSURFACESTYLE",3049322572:"IFCSTYLEDREPRESENTATION",3958052878:"IFCSTYLEDITEM",2830218821:"IFCSTYLEMODEL",3408363356:"IFCSTRUCTURALLOADTEMPERATURE",2525727697:"IFCSTRUCTURALLOADSTATIC",2162789131:"IFCSTRUCTURALLOAD",2273995522:"IFCSTRUCTURALCONNECTIONCONDITION",3692461612:"IFCSIMPLEPROPERTY",4240577450:"IFCSHAPEREPRESENTATION",3982875396:"IFCSHAPEMODEL",867548509:"IFCSHAPEASPECT",4165799628:"IFCSECTIONREINFORCEMENTPROPERTIES",2042790032:"IFCSECTIONPROPERTIES",448429030:"IFCSIUNIT",2341007311:"IFCROOT",3679540991:"IFCRIBPLATEPROFILEPROPERTIES",1660063152:"IFCREPRESENTATIONMAP",3008791417:"IFCREPRESENTATIONITEM",3377609919:"IFCREPRESENTATIONCONTEXT",1076942058:"IFCREPRESENTATION",1222501353:"IFCRELAXATION",1580146022:"IFCREINFORCEMENTBARPROPERTIES",2692823254:"IFCREFERENCESVALUEDOCUMENT",825690147:"IFCQUANTITYWEIGHT",2405470396:"IFCQUANTITYVOLUME",3252649465:"IFCQUANTITYTIME",931644368:"IFCQUANTITYLENGTH",2093928680:"IFCQUANTITYCOUNT",2044713172:"IFCQUANTITYAREA",3710013099:"IFCPROPERTYENUMERATION",148025276:"IFCPROPERTYDEPENDENCYRELATIONSHIP",3896028662:"IFCPROPERTYCONSTRAINTRELATIONSHIP",2598011224:"IFCPROPERTY",2802850158:"IFCPROFILEPROPERTIES",3958567839:"IFCPROFILEDEF",2267347899:"IFCPRODUCTSOFCOMBUSTIONPROPERTIES",2095639259:"IFCPRODUCTREPRESENTATION",2417041796:"IFCPRESENTATIONSTYLEASSIGNMENT",3119450353:"IFCPRESENTATIONSTYLE",1304840413:"IFCPRESENTATIONLAYERWITHSTYLE",2022622350:"IFCPRESENTATIONLAYERASSIGNMENT",1775413392:"IFCPREDEFINEDTEXTFONT",3213052703:"IFCPREDEFINEDTERMINATORSYMBOL",990879717:"IFCPREDEFINEDSYMBOL",3727388367:"IFCPREDEFINEDITEM",3355820592:"IFCPOSTALADDRESS",2226359599:"IFCPHYSICALSIMPLEQUANTITY",2483315170:"IFCPHYSICALQUANTITY",101040310:"IFCPERSONANDORGANIZATION",2077209135:"IFCPERSON",1207048766:"IFCOWNERHISTORY",1411181986:"IFCORGANIZATIONRELATIONSHIP",4251960020:"IFCORGANIZATION",1227763645:"IFCOPTICALMATERIALPROPERTIES",2251480897:"IFCOBJECTIVE",3701648758:"IFCOBJECTPLACEMENT",1918398963:"IFCNAMEDUNIT",2706619895:"IFCMONETARYUNIT",3368373690:"IFCMETRIC",677618848:"IFCMECHANICALSTEELMATERIALPROPERTIES",4256014907:"IFCMECHANICALMATERIALPROPERTIES",2597039031:"IFCMEASUREWITHUNIT",3265635763:"IFCMATERIALPROPERTIES",2199411900:"IFCMATERIALLIST",1303795690:"IFCMATERIALLAYERSETUSAGE",3303938423:"IFCMATERIALLAYERSET",248100487:"IFCMATERIALLAYER",1847130766:"IFCMATERIALCLASSIFICATIONRELATIONSHIP",1838606355:"IFCMATERIAL",30780891:"IFCLOCALTIME",1566485204:"IFCLIGHTINTENSITYDISTRIBUTION",4162380809:"IFCLIGHTDISTRIBUTIONDATA",3452421091:"IFCLIBRARYREFERENCE",2655187982:"IFCLIBRARYINFORMATION",3020489413:"IFCIRREGULARTIMESERIESVALUE",852622518:"IFCGRIDAXIS",3548104201:"IFCEXTERNALLYDEFINEDTEXTFONT",3207319532:"IFCEXTERNALLYDEFINEDSYMBOL",1040185647:"IFCEXTERNALLYDEFINEDSURFACESTYLE",2242383968:"IFCEXTERNALLYDEFINEDHATCHSTYLE",3200245327:"IFCEXTERNALREFERENCE",1648886627:"IFCENVIRONMENTALIMPACTVALUE",3796139169:"IFCDRAUGHTINGCALLOUTRELATIONSHIP",770865208:"IFCDOCUMENTINFORMATIONRELATIONSHIP",1154170062:"IFCDOCUMENTINFORMATION",1376555844:"IFCDOCUMENTELECTRONICFORMAT",2949456006:"IFCDIMENSIONALEXPONENTS",1045800335:"IFCDERIVEDUNITELEMENT",1765591967:"IFCDERIVEDUNIT",1072939445:"IFCDATEANDTIME",3510044353:"IFCCURVESTYLEFONTPATTERN",2367409068:"IFCCURVESTYLEFONTANDSCALING",1105321065:"IFCCURVESTYLEFONT",539742890:"IFCCURRENCYRELATIONSHIP",602808272:"IFCCOSTVALUE",1065062679:"IFCCOORDINATEDUNIVERSALTIMEOFFSET",347226245:"IFCCONSTRAINTRELATIONSHIP",613356794:"IFCCONSTRAINTCLASSIFICATIONRELATIONSHIP",1658513725:"IFCCONSTRAINTAGGREGATIONRELATIONSHIP",1959218052:"IFCCONSTRAINT",2732653382:"IFCCONNECTIONSURFACEGEOMETRY",4257277454:"IFCCONNECTIONPORTGEOMETRY",2614616156:"IFCCONNECTIONPOINTGEOMETRY",2859738748:"IFCCONNECTIONGEOMETRY",3264961684:"IFCCOLOURSPECIFICATION",3639012971:"IFCCLASSIFICATIONNOTATIONFACET",938368621:"IFCCLASSIFICATIONNOTATION",1098599126:"IFCCLASSIFICATIONITEMRELATIONSHIP",1767535486:"IFCCLASSIFICATIONITEM",747523909:"IFCCLASSIFICATION",622194075:"IFCCALENDARDATE",2069777674:"IFCBOUNDARYNODECONDITIONWARPING",1387855156:"IFCBOUNDARYNODECONDITION",3367102660:"IFCBOUNDARYFACECONDITION",1560379544:"IFCBOUNDARYEDGECONDITION",4037036970:"IFCBOUNDARYCONDITION",3869604511:"IFCAPPROVALRELATIONSHIP",390851274:"IFCAPPROVALPROPERTYRELATIONSHIP",2080292479:"IFCAPPROVALACTORRELATIONSHIP",130549933:"IFCAPPROVAL",1110488051:"IFCAPPLIEDVALUERELATIONSHIP",411424972:"IFCAPPLIEDVALUE",639542469:"IFCAPPLICATION",618182010:"IFCADDRESS",3630933823:"IFCACTORROLE",599546466:"FILE_DESCRIPTION",1390159747:"FILE_NAME",1109904537:"FILE_SCHEMA"};class c{static async getUnits(F){var R;const{IFCUNITASSIGNMENT:E}=w,I=await F.getAllPropertiesOfType(E);if(!I)return 1;const C=Object.keys(I),T=I[parseInt(C[0],10)];for(const A of T.Units){if(A.value===void 0||A.value===null)continue;const N=await F.getProperties(A.value);if(!N||!N.UnitType||!N.UnitType.value||N.UnitType.value!=="LENGTHUNIT")continue;let S=1,P=1;return N.Name.value==="METRE"&&(P=1),N.Name.value==="FOOT"&&(P=.3048),((R=N.Prefix)==null?void 0:R.value)==="MILLI"&&(S=.001),P*S}return 1}static async findItemByGuid(F,E){var C;const I=F.getAllPropertiesIDs();for(const T of I){const R=await F.getProperties(T);if(R&&((C=R.GlobalId)==null?void 0:C.value)===E)return R}return null}static async getRelationMap(F,E,I){var N;const T=I??(()=>{}),R={},A=F.getAllPropertiesIDs();for(const O of A){const S=await F.getProperties(O);if(!S)continue;const P=S.type===E,M=Object.keys(S).find(s=>s.startsWith("Relating")),e=Object.keys(S).find(s=>s.startsWith("Related"));if(!(P&&M&&e))continue;const t=await F.getProperties((N=S[M])==null?void 0:N.value),U=S[e];if(!t||!U||!(U&&Array.isArray(U)))continue;const i=U.map(s=>s.value);T(t.expressID,i),R[t.expressID]=i}return R}static async getQsetQuantities(F,E,I){const T=I??(()=>{}),R=await F.getProperties(E);return!R||R.type!==v?null:(R.Quantities??[{}]).map(O=>(O.value&&T(O.value),O.value)).filter(O=>O!==null)}static async getPsetProps(F,E,I){const T=I??(()=>{}),R=await F.getProperties(E);return!R||R.type!==x?null:(R.HasProperties??[{}]).map(O=>(O.value&&T(O.value),O.value)).filter(O=>O!==null)}static async getPsetRel(F,E){var A;if(!await F.getProperties(E))return null;const C=await F.getAllPropertiesOfType(V);if(!C)return null;const T=Object.values(C);let R=null;for(const N of T)((A=N.RelatingPropertyDefinition)==null?void 0:A.value)===E&&(R=N.expressID);return R}static async getQsetRel(F,E){return c.getPsetRel(F,E)}static async getEntityName(F,E){var R;const I=await F.getProperties(E);if(!I)return{key:null,name:null};const C=Object.keys(I).find(A=>A.endsWith("Name"))??null,T=C?(R=I[C])==null?void 0:R.value:null;return{key:C,name:T}}static async getQuantityValue(F,E){const I=await F.getProperties(E);if(!I)return{key:null,value:null};const C=Object.keys(I).find(R=>R.endsWith("Value"))??null;let T;return C===null||I[C]===void 0||I[C]===null?T=null:T=I[C].value,{key:C,value:T}}static isRel(F){return K[F].startsWith("IFCREL")}static async attributeExists(F,E,I){const C=await F.getProperties(E);return C?Object.keys(C).includes(I):!1}static async groupEntitiesByType(F,E){var C;const I=new Map;for(const T of E){const R=await F.getProperties(T);if(!R)continue;const A=R.type;I.get(A)||I.set(A,new Set),(C=I.get(A))==null||C.add(T)}return I}}const Q=new Map([[H,{forRelating:"IsDecomposedBy",forRelated:"Decomposes"}],[p,{forRelating:"AssociatedTo",forRelated:"HasAssociations"}],[f,{forRelating:"ClassificationForObjects",forRelated:"HasAssociations"}],[d,{forRelating:"IsGroupedBy",forRelated:"HasAssignments"}],[V,{forRelated:"IsDefinedBy",forRelating:"DefinesOcurrence"}],[W,{forRelated:"IsTypedBy",forRelating:"Types"}],[g,{forRelated:"IsDefinedBy",forRelating:"Defines"}],[X,{forRelated:"ContainedInStructure",forRelating:"ContainsElements"}]]),r=class r extends y{constructor(E){super(E);L(this,"onDisposed",new o);L(this,"enabled",!0);L(this,"onRelationsIndexed",new o);L(this,"_relToAttributesMap",Q);L(this,"_inverseAttributes",["IsDecomposedBy","Decomposes","AssociatedTo","HasAssociations","ClassificationForObjects","IsGroupedBy","HasAssignments","IsDefinedBy","DefinesOcurrence","IsTypedBy","Types","Defines","ContainedInStructure","ContainsElements"]);L(this,"_ifcRels",[H,p,f,d,V,W,g,X]);L(this,"relationMaps",{});L(this,"onFragmentsDisposed",E=>{delete this.relationMaps[E.groupID]});this.components.add(r.uuid,this),E.get(a).onFragmentsDisposed.add(this.onFragmentsDisposed)}setRelationMap(E,I){this.relationMaps[E.uuid]=I,this.onRelationsIndexed.trigger({modelID:E.uuid,relationsMap:I})}async process(E){if(!E.hasProperties)throw new Error("FragmentsGroup properties not found");let I=this.relationMaps[E.uuid];if(I)return I;I=new Map;for(const C of this._ifcRels)await c.getRelationMap(E,C,async(T,R)=>{const A=this._relToAttributesMap.get(C);if(!A)return;const{forRelated:N,forRelating:O}=A,S=I.get(T)??new Map,P=this._inverseAttributes.indexOf(O);S.set(P,R),I.set(T,S);for(const M of R){const e=I.get(M)??new Map,t=this._inverseAttributes.indexOf(N),U=e.get(t)??[];U.push(T),e.set(t,U),I.set(M,e)}});return this.setRelationMap(E,I),I}async processFromWebIfc(E,I){const C=new Map;for(const T of this._ifcRels){const R=this._relToAttributesMap.get(T);if(!R)continue;const{forRelated:A,forRelating:N}=R,O=E.GetLineIDsWithType(I,T);for(let S=0;S D.startsWith("Relating")),e=Object.keys(P).find(D=>D.startsWith("Related"));if(!(M&&e))continue;const t=P[M].value,U=P[e].map(D=>D.value),i=C.get(t)??new Map,s=this._inverseAttributes.indexOf(N);i.set(s,U),C.set(t,i);for(const D of U){const G=C.get(D)??new Map,B=this._inverseAttributes.indexOf(A),u=G.get(B)??[];u.push(t),G.set(B,u),C.set(D,G)}}}return this.onRelationsIndexed.trigger({modelID:I.toString(),relationsMap:C}),C}getEntityRelations(E,I,C){const T=this.relationMaps[E.uuid];if(!T)return null;const R=T.get(I),A=this._inverseAttributes.indexOf(C);if(!R||A===-1)return null;const N=R.get(A);return N||null}serializeRelations(E){const I={};for(const[C,T]of E.entries()){I[C]||(I[C]={});for(const[R,A]of T.entries())I[C][R]=A}return JSON.stringify(I)}serializeModelRelations(E){const I=this.relationMaps[E.uuid];return I?this.serializeRelations(I):null}serializeAllRelations(){const E={};for(const I in this.relationMaps){const C=this.relationMaps[I],T={};for(const[R,A]of C.entries()){T[R]||(T[R]={});for(const[N,O]of A.entries())T[R][N]=O}E[I]=T}return JSON.stringify(E)}getRelationsMapFromJSON(E){const I=JSON.parse(E),C=new Map;for(const T in I){const R=I[T],A=new Map;for(const N in R)A.set(Number(N),R[N]);C.set(Number(T),A)}return C}dispose(){this.relationMaps={},this.components.get(a).onFragmentsDisposed.remove(this.onFragmentsDisposed),this.onDisposed.trigger(r.uuid),this.onDisposed.reset()}};L(r,"uuid","23a889ab-83b3-44a4-8bee-ead83438370b");let l=r;export{a as F,l as I,c as a,K as b}; diff --git a/examples/assets/index-BaUDpV7F.js b/examples/assets/index-BaUDpV7F.js new file mode 100644 index 000000000..6ddae9615 --- /dev/null +++ b/examples/assets/index-BaUDpV7F.js @@ -0,0 +1 @@ +var z=Object.defineProperty;var x=(w,l,e)=>l in w?z(w,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):w[l]=e;var o=(w,l,e)=>(x(w,typeof l!="symbol"?l+"":l,e),e);import{C as M}from"./web-ifc-api-BiYij3qq.js";import{J as U,U as m,I as C,H as k,A as F}from"./index-B3b_h8A8.js";const S=class S extends U{constructor(e){super(e);o(this,"onDisposed",new m);o(this,"onBeforeUpdate",new m);o(this,"onAfterUpdate",new m);o(this,"onSetup",new m);o(this,"isSetup",!1);o(this,"enabled",!0);o(this,"events",{});o(this,"multiple","ctrlKey");o(this,"zoomFactor",1.5);o(this,"zoomToSelection",!1);o(this,"backupColor",null);o(this,"selection",{});o(this,"config",{selectName:"select",hoverName:"hover",selectionColor:new M("#BCF124"),hoverColor:new M("#6528D7"),autoHighlightOnClick:!0,world:null});o(this,"colors",new Map);o(this,"_mouseState",{down:!1,moved:!1});o(this,"clearHover",()=>{this.selection[this.config.hoverName]={}});o(this,"onMouseDown",()=>{this.enabled&&(this._mouseState.down=!0)});o(this,"onMouseUp",async e=>{const t=this.config.world;if(!t)throw new Error("No world found!");if(!t.renderer)throw new Error("This world doesn't have a renderer!");if(this.enabled&&e.target===t.renderer.three.domElement){if(this._mouseState.down=!1,this._mouseState.moved||e.button!==0){this._mouseState.moved=!1;return}if(this._mouseState.moved=!1,this.config.autoHighlightOnClick){const s=this.multiple==="none"?!0:!e[this.multiple];await this.highlight(this.config.selectName,s,this.zoomToSelection)}}});o(this,"onMouseMove",async()=>{if(!this.enabled)return;if(this._mouseState.moved){this.clear(this.config.hoverName);return}this._mouseState.moved=this._mouseState.down;const e=this.selection[this.config.selectName];await this.highlight(this.config.hoverName,!0,!1,e)});this.components.add(S.uuid,this)}async dispose(){this.setupEvents(!1),this.onBeforeUpdate.reset(),this.onAfterUpdate.reset(),this.selection={};for(const e in this.events)this.events[e].onClear.reset(),this.events[e].onHighlight.reset();this.onSetup.reset(),this.events={},this.onDisposed.trigger(S.uuid),this.onDisposed.reset()}add(e,t){if(this.selection[e]||this.colors.has(e))throw new Error("A selection with that name already exists!");this.colors.set(e,t),this.selection[e]={},this.events[e]={onHighlight:new m,onClear:new m}}async highlight(e,t=!0,s=this.zoomToSelection,a={}){if(!this.enabled)return null;if(!this.config.world)throw new Error("No world found in config!");const h=this.config.world;if(!this.selection[e])throw new Error(`Selection ${e} does not exist.`);const n=this.components.get(C).meshes,c=this.components.get(k).get(h).castRay(n);if(!c||!c.face)return this.clear(e),null;const u=c.object,I=u.geometry,E=c.instanceId;if(!I||E===void 0)return null;const v=u.fragment.getItemID(E);if(v===null)throw new Error("Item ID not found!");const b=u.fragment.group;if(!b)throw new Error("Fragment must belong to a FragmentsGroup!");const g=b.getFragmentMap([v]),f={};for(const d in g){const H=g[d],D=a[d];for(const y of H)(!D||!D.has(y))&&(f[d]||(f[d]=new Set),f[d].add(y))}return await this.highlightByID(e,f,t,s),{id:v,fragments:g}}async highlightByID(e,t,s=!0,a=this.zoomToSelection){if(!this.enabled)return;s&&this.clear(e);const h=this.components.get(C),i=this.colors.get(e);if(!i)throw new Error("Color for selection not found!");for(const n in t){const r=h.list.get(n);if(!r)continue;this.selection[e][n]||(this.selection[e][n]=new Set);const p=t[n];for(const c of p)this.selection[e][n].add(c),r.setColor(i,[c])}this.events[e].onHighlight.trigger(this.selection[e]),a&&await this.zoomSelection(e)}clear(e){const t=e?[e]:Object.keys(this.selection);for(const s of t){const a=this.components.get(C),h=this.selection[s];for(const i in this.selection[s]){const n=a.list.get(i);if(!n)continue;const r=h[i];r&&(this.backupColor?n.setColor(this.backupColor):n.resetColor(r))}this.events[s].onClear.trigger(null),this.selection[s]={}}}setup(e){this.config={...this.config,...e},this.add(this.config.selectName,this.config.selectionColor),this.add(this.config.hoverName,this.config.hoverColor),this.setupEvents(!0),this.enabled=!0,this.isSetup=!0,this.onSetup.trigger(this)}async zoomSelection(e){if(!this.config.world)throw new Error("No world found in config!");const t=this.config.world;if(!t.camera.hasCameraControls())return;const s=this.components.get(F),a=this.components.get(C);s.reset();const h=this.selection[e];if(!Object.keys(h).length)return;for(const g in h){const f=a.list.get(g);if(!f)continue;const d=h[g];s.addMesh(f.mesh,d)}const i=s.getSphere(),n=1/0,r=-1/0,{x:p,y:c,z:u}=i.center,I=i.radius===n||p===n||c===n||u===n,E=i.radius===r||p===r||c===r||u===r,v=i.radius===0;if(I||E||v)return;i.radius*=this.zoomFactor,await t.camera.controls.fitToSphere(i,!0)}setupEvents(e){if(!this.config.world)throw new Error("No world found while setting up events!");if(!this.config.world.renderer)throw new Error("The given world doesn't have a renderer!");const t=this.config.world.renderer.three.domElement,s=this.events[this.config.selectName].onHighlight;s.remove(this.clearHover),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mousemove",this.onMouseMove),e&&(s.add(this.clearHover),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("mousemove",this.onMouseMove))}};o(S,"uuid","cb8a76f2-654a-4b50-80c6-66fd83cafd77");let N=S;export{N as H}; diff --git a/examples/assets/index-BbNf6YQR.js b/examples/assets/index-BbNf6YQR.js new file mode 100644 index 000000000..4310eac8a --- /dev/null +++ b/examples/assets/index-BbNf6YQR.js @@ -0,0 +1 @@ +var L=Object.defineProperty;var k=(p,g,t)=>g in p?L(p,g,{enumerable:!0,configurable:!0,writable:!0,value:t}):p[g]=t;var c=(p,g,t)=>(k(p,typeof g!="symbol"?g+"":g,t),t);import{a6 as G,k as S,a7 as T,a8 as z,a9 as N,N as P,C as W,a as j,c as B,e as C,aa as $}from"./web-ifc-api-BiYij3qq.js";import{S as O,I as R,C as U}from"./ifc-metadata-reader-BbwPg7JM.js";import{I as V}from"./ifc-fragment-settings-BGI4Rkzj.js";import{F as J}from"./index-Ba8czaZS.js";import{C as X,E as D,a as q}from"./index-DsPLPeA6.js";import{I as H}from"./index-BwEpfrPv.js";const l=class l extends X{constructor(t){super(t);c(this,"onIfcStartedLoading",new D);c(this,"onSetup",new D);c(this,"onDisposed",new D);c(this,"settings",new V);c(this,"enabled",!0);c(this,"webIfc",new G);c(this,"_material",new S);c(this,"_spatialTree",new O);c(this,"_metaData",new R);c(this,"_fragmentInstances",new Map);c(this,"_civil",new U);c(this,"_visitedFragments",new Map);c(this,"_materialT",new S({transparent:!0,opacity:.5}));this.components.add(l.uuid,this),this.settings.excludedCategories.add(T)}dispose(){this.webIfc=null,this.onDisposed.trigger(l.uuid),this.onDisposed.reset()}async setup(t){this.settings={...this.settings,...t},this.settings.autoSetWasm&&await this.autoSetWasm(),this.onSetup.trigger()}async load(t,n=!0){const r=performance.now();this.onIfcStartedLoading.trigger(),await this.readIfcFile(t);const a=await this.getAllGeometries(),m=await this.components.get(H).export(this.webIfc,0);a.setLocalProperties(m),this.cleanUp();const e=this.components.get(J);e.groups.set(a.uuid,a);for(const i of a.items)e.list.set(i.id,i),i.mesh.uuid=i.id,i.group=a;return e.onFragmentsLoaded.trigger(a),n&&e.coordinate([a]),console.log(`Streaming the IFC took ${performance.now()-r} ms!`),a}async readIfcFile(t){const{path:n,absolute:r,logLevel:a}=this.settings.wasm;return this.webIfc.SetWasmPath(n,r),await this.webIfc.Init(),a&&this.webIfc.SetLogLevel(a),this.webIfc.OpenModel(t,this.settings.webIfc)}async getAllGeometries(){this._spatialTree.setUp(this.webIfc);const t=this.webIfc.GetIfcEntityList(0),n=new z,{FILE_NAME:r,FILE_DESCRIPTION:a}=$;n.ifcMetadata={name:this._metaData.get(this.webIfc,r),description:this._metaData.get(this.webIfc,a),schema:this.webIfc.GetModelSchema(0)||"IFC2X3",maxExpressID:this.webIfc.GetMaxExpressID(0)};const o=[];for(const e of t){if(!this.webIfc.IsIfcElement(e)&&e!==N||this.settings.excludedCategories.has(e))continue;const i=this.webIfc.GetLineIDsWithType(0,e),f=i.size();for(let h=0;h {this.getMesh(e,n)});for(const e of this._visitedFragments){const{index:i,fragment:f}=e[1];n.keyFragments.set(i,f.id)}for(const e of n.items){const i=this._fragmentInstances.get(e.id);if(!i)throw new Error("Fragment not found!");const f=[];for(const[h,s]of i)f.push(s);e.add(f)}const m=this.webIfc.GetCoordinationMatrix(0);return n.coordinationMatrix.fromArray(m),n.civilData=this._civil.read(this.webIfc),n}cleanUp(){this.webIfc=null,this.webIfc=new G,this._visitedFragments.clear(),this._fragmentInstances.clear()}getMesh(t,n){const r=t.geometries.size(),a=t.expressID;for(let o=0;o n in d?f(d,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[n]=e;var t=(d,n,e)=>(g(d,typeof n!="symbol"?n+"":n,e),e);import{L as u,V as m,O as _}from"./web-ifc-api-BiYij3qq.js";import{J as v,U as l,H as c}from"./index-B3b_h8A8.js";import{S as b}from"./index-Csb2AJ1X.js";import{n as p}from"./dimension-mark-BiAWnjiH.js";import{G as x}from"./graphic-vertex-picker-C182o4t3.js";const h=class h extends v{constructor(e){super(e);t(this,"onDisposed",new l);t(this,"onBeforeUpdate",new l);t(this,"onAfterUpdate",new l);t(this,"snapDistance",.25);t(this,"_vertexPicker");t(this,"_lineMaterial",new u({color:"#DC2626",linewidth:2,depthTest:!1}));t(this,"list",[]);t(this,"world");t(this,"_visible",!0);t(this,"_enabled",!1);t(this,"_temp",{isDragging:!1,start:new m,end:new m,dimension:void 0});t(this,"create",e=>{const s=e instanceof _?e:void 0;if(this._enabled){if(!this._temp.isDragging){this.drawStart(s);return}this.endCreation()}});t(this,"onMouseMove",()=>{this.world&&this._vertexPicker.get(this.world)});this.components.add(h.uuid,this),this._vertexPicker=new x(e,{previewElement:p(),snapDistance:this.snapDistance})}get enabled(){return this._enabled}set enabled(e){e||this.cancelCreation(),this._enabled=e,this._vertexPicker.enabled=e,this.setupEvents(e)}get visible(){return this._visible}set visible(e){this._visible=e;for(const s of this.list)s.visible=e}get color(){return this._lineMaterial.color}set color(e){this._lineMaterial.color=e}dispose(){this.setupEvents(!1),this.enabled=!1;for(const e of this.list)e.dispose();this._lineMaterial.dispose(),this.list=[],this._vertexPicker.dispose(),this.onDisposed.trigger(h.uuid),this.onDisposed.reset()}async update(e){this._enabled&&this._temp.isDragging&&this.drawInProcess()}createOnPoints(e,s){const i=this.drawDimension();i.startPoint=e,i.endPoint=s,i.createBoundingBox(),this.list.push(i)}delete(){if(!this.world)throw new Error("World is needed for Length Measurement!");if(!this._enabled||this.list.length===0)return;const e=this.getBoundingBoxes(),r=this.components.get(c).get(this.world).castRay(e);if(!r)return;const o=this.list.find(a=>a.boundingBox===r.object);if(o){const a=this.list.indexOf(o);this.list.splice(a,1),o.dispose()}}async deleteMeasurement(e){if(e){const s=this.list.indexOf(e);this.list.splice(s,1),e.dispose()}}deleteAll(){for(const e of this.list)e.dispose();this.list=[]}cancelCreation(){var e;this._temp.dimension&&(this._temp.isDragging=!1,(e=this._temp.dimension)==null||e.dispose(),this._temp.dimension=void 0)}drawStart(e){if(!this.world)throw new Error("The length measurement needs a world to work!");const s=e?[e]:void 0,o=this.components.get(c).get(this.world).castRay(s),a=this._vertexPicker.get(this.world);o&&a&&(this._temp.isDragging=!0,this._temp.start=e?o.point:a)}drawInProcess(){if(!this.world)throw new Error("The length measurement needs a world to work!");if(!this.components.get(c).get(this.world).castRay())return;const r=this._vertexPicker.get(this.world);r&&(this._temp.end=r,this._temp.dimension||(this._temp.dimension=this.drawDimension()),this._temp.dimension.endPoint=this._temp.end)}endCreation(){this._temp.dimension&&(this._temp.dimension.createBoundingBox(),this.list.push(this._temp.dimension),this._temp.dimension=void 0,this._temp.isDragging=!1)}drawDimension(){if(!this.world)throw new Error("The length measurement needs a world to work!");return new b(this.components,this.world,{start:this._temp.start,end:this._temp.end,lineMaterial:this._lineMaterial,endpointElement:p()})}getBoundingBoxes(){return this.list.map(e=>e.boundingBox).filter(e=>e!==void 0)}setupEvents(e){if(!this.world)throw new Error("The length measurement needs a world to work!");if(!this.world.renderer)throw new Error("The world of the length measurement needs a renderer!");const i=this.world.renderer.three.domElement.parentElement;i&&(i.removeEventListener("click",this.create),e&&i.addEventListener("mousemove",this.onMouseMove))}};t(h,"uuid","2f9bcacf-18a9-4be6-a293-e898eae64ea1");let w=h;export{w as L}; diff --git a/examples/assets/index-Bn4wotfq.js b/examples/assets/index-Bn4wotfq.js new file mode 100644 index 000000000..a436087e1 --- /dev/null +++ b/examples/assets/index-Bn4wotfq.js @@ -0,0 +1 @@ +var g=Object.defineProperty;var f=(n,h,e)=>h in n?g(n,h,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[h]=e;var o=(n,h,e)=>(f(n,typeof h!="symbol"?h+"":h,e),e);import{J as w,U as c}from"./index-B3b_h8A8.js";import{C as k}from"./curve-highlighter-B2XYj340.js";import{M as v}from"./mark-B9TqPH3U.js";import"./web-ifc-api-BiYij3qq.js";import"./import-wrapper-prod-vMwJRSad.js";const l=class l extends w{constructor(e){super(e);o(this,"onHighlight",new c);o(this,"enabled",!0);o(this,"_highlighter");o(this,"mouseMarkers");o(this,"onMarkerChange",new c);o(this,"onMarkerHidden",new c);o(this,"_curves",[]);o(this,"_world",null);o(this,"onClick",e=>{if(!this.enabled||!this._highlighter)return;if(!this.world)throw new Error("No world found!");if(!this.world.renderer)return;const r=this.world.renderer.three.domElement,s=this.world.camera.three,t=this._highlighter.castRay(e,s,r,this._curves);if(t){const i=t.object;this._highlighter.select(i),this.updateMarker(t,"select");const{point:u,index:a}=t;a!==void 0&&this.onHighlight.trigger({curve:i,point:u,index:a});return}this._highlighter.unSelect(),this.mouseMarkers&&(this.mouseMarkers.hover.visible=!1),this.onMarkerHidden.trigger({type:"hover"})});o(this,"onMouseMove",async e=>{if(!this.enabled||!this._highlighter)return;if(!this.world)throw new Error("No world found!");if(!this.world.renderer)return;const r=this.world.renderer.three.domElement,s=this.world.camera.three,t=this._highlighter.castRay(e,s,r,this._curves);if(t){this._highlighter.hover(t.object),this.updateMarker(t,"hover");return}this._highlighter.unHover()});this.components.add(l.uuid,this)}get world(){return this._world}set world(e){var s,t,i;if(e===this._world||(this._world&&this.setupEvents(!1),this._world=e,(s=this._highlighter)==null||s.dispose(),(t=this.mouseMarkers)==null||t.hover.dispose(),(i=this.mouseMarkers)==null||i.select.dispose(),!e))return;const r=e.scene.three;this._highlighter=new k(r,"absolute"),this.mouseMarkers={select:this.newMouseMarker("#ffffff",e),hover:this.newMouseMarker("#575757",e)},this.setupEvents(!0)}get highlighter(){if(!this._highlighter)throw new Error("Navigator not initialized!");return this._highlighter}draw(e){if(!e.civilData)throw new Error("Model must have civil data!");if(!this.world)throw new Error("A world must be given before drawing an alignment!");const r=this.world.scene.three;for(const[s,t]of e.civilData.alignments)for(const{mesh:i}of t.absolute)r.add(i),this._curves.push(i)}newMouseMarker(e,r){const s=r.scene.three,t=document.createElement("div");t.style.backgroundColor=e,t.style.width="1rem",t.style.height="1rem",t.style.borderRadius="1rem";const i=new v(r,t,s);return i.visible=!1,i}setMarker(e,r,s){if(!this.mouseMarkers)throw new Error("No mouse markers found! Initialize the world before using this.");const t=e.getPointAt(r,"absolute");this.mouseMarkers[s].visible=!0,this.mouseMarkers[s].three.position.copy(t)}hideMarker(e){if(!this.mouseMarkers)throw new Error("No mouse markers found! Initialize the world before using this.");const r=this.mouseMarkers[e].three;r.visible=!1}setupEvents(e){if(!this.world)throw new Error("No world found!");if(!this.world.renderer)return;const r=this.world.renderer.three.domElement;e?(r.addEventListener("click",this.onClick),r.addEventListener("mousemove",this.onMouseMove)):(r.removeEventListener("click",this.onClick),r.removeEventListener("mousemove",this.onMouseMove))}updateMarker(e,r){if(!this.mouseMarkers)return;const{point:s,object:t}=e,i=t,u=i.curve,a=i.curve.alignment,d=a.getPercentageAt(s,"absolute");this.mouseMarkers[r].visible=!0,this.mouseMarkers[r].three.position.copy(s),d!==null&&this.onMarkerChange.trigger({alignment:a,percentage:d,type:r,curve:u})}};o(l,"uuid","0a59c09e-2b49-474a-9320-99f51f40f182");let m=l;export{m as C}; diff --git a/examples/assets/index-Bq1KDtuM.js b/examples/assets/index-Bq1KDtuM.js new file mode 100644 index 000000000..ef1fb0021 --- /dev/null +++ b/examples/assets/index-Bq1KDtuM.js @@ -0,0 +1 @@ +var v=Object.defineProperty;var K=(c,a,t)=>a in c?v(c,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[a]=t;var o=(c,a,t)=>(K(c,typeof a!="symbol"?a+"":a,t),t);import{V as m,c as L,e as _,M as w}from"./web-ifc-api-BiYij3qq.js";import{J as C}from"./index-B3b_h8A8.js";import{M as g}from"./mark-B9TqPH3U.js";const u=class u extends C{constructor(t){super(t);o(this,"enabled",!0);o(this,"threshold",50);o(this,"autoCluster",!0);o(this,"list",new Map);o(this,"clusterLabels",new Set);o(this,"currentKeys",new Set);o(this,"_color","white");o(this,"_markerKey",0);o(this,"_clusterKey",0);o(this,"isNavigating",!1);o(this,"_setupWorlds",new Set);t.add(u.uuid,this)}get color(){return this._color}set color(t){this._color=t;for(const[e,s]of this.list)s.label.three.element.style.color=t}create(t,e,s,r=!1){this.setupEvents(t,!0);const i=document.createElement("span");i.innerHTML=e,i.style.color=this._color;const n=new g(t,i);n.three.position.copy(s);const l=this._markerKey.toString();return this.list.set(l,{key:l,label:n,merged:!1,static:r}),this._markerKey++,l}delete(t){const e=this.list.get(t);e&&e.label.dispose(),this.list.delete(t)}clear(t){const e=[...this.list.keys()];for(const s of e){const r=this.list.get(s);t&&r.type!==t||(r.label.dispose(),this.list.delete(s))}this.list.clear(),this._markerKey=0}dispose(){for(const[t,e]of this.list)e.label.dispose();this.list.clear(),this._markerKey=0;for(const t of this.clusterLabels)t.label.dispose();this.clusterLabels.clear(),this._clusterKey=0,this.currentKeys.clear()}setupEvents(t,e){e&&this._setupWorlds.has(t.uuid)||t.camera.hasCameraControls()&&(e?(t.camera.controls.addEventListener("sleep",()=>{this.manageCluster()}),t.camera.controls.addEventListener("rest",()=>{this.isNavigating&&(this.manageCluster(),this.isNavigating=!1)})):(t.camera.controls.removeEventListener("sleep",()=>{this.manageCluster()}),t.camera.controls.removeEventListener("rest",()=>{this.isNavigating&&(this.manageCluster(),this.isNavigating=!1)})))}resetMarkers(){for(const[t,e]of this.list)e.merged=!1;for(const t of this.clusterLabels)t.label.dispose();this.clusterLabels.clear(),this._clusterKey=0}removeMergeMarkers(){for(const[t,e]of this.list)e.merged?e.label.dispose():e.label.world.scene.three.add(e.label.three);for(const t of this.clusterLabels)if(t.markerKeys.length===1){const e=this.list.get(t.markerKeys[0]);e&&(e.label.world.scene.three.add(e.label.three),e.merged=!1),t.label.dispose(),this.clusterLabels.delete(t)}}manageCluster(){if(this.autoCluster){this.resetMarkers();for(const[t,e]of this.list)if(!e.merged&&!e.static){this.currentKeys.clear();for(const[s,r]of this.list)r.static||e.key!==r.key&&!r.merged&&this.distance(e.label,r.label) 0){this.currentKeys.add(e.key),e.merged=!0;const s=Array.from(this.currentKeys),r=this.getAveragePositionFromLabels(s),i=new g(e.label.world,this.createClusterElement(this._clusterKey.toString())),{element:n}=i.three;n.textContent=s.length.toString(),i.three.position.copy(r),this.clusterLabels.add({key:this._clusterKey.toString(),markerKeys:s,label:i}),this._clusterKey++}}this.removeMergeMarkers()}}getAveragePositionFromLabels(t){const e=t.map(s=>{const r=this.list.get(s);return r?r.label.three.position:new m});return e.reduce((s,r)=>s.add(r),new m).divideScalar(e.length)}createClusterElement(t){const e=document.createElement("div");return e.textContent=t,e.style.color="#000000",e.style.background="#FFFFFF",e.style.fontSize="1.2rem",e.style.fontWeight="500",e.style.pointerEvents="auto",e.style.borderRadius="50%",e.style.padding="5px 11px",e.style.textAlign="center",e.style.cursor="pointer",e.addEventListener("pointerdown",()=>{this.navigateToCluster(t)}),e.addEventListener("pointerover",()=>{e.style.background="#BCF124"}),e.addEventListener("pointerout",()=>{e.style.background="#FFFFFF"}),e}getScreenPosition(t){const e=new m;if(!t.world.renderer)throw new Error("Renderer not found!");const s=t.three.position.clone();s.project(t.world.camera.three);const r=t.world.renderer.getSize();return e.x=s.x*r.x/2+r.x/2,e.y=-(s.y*r.y/2)+r.y/2,e}distance(t,e){const s=this.getScreenPosition(t),r=this.getScreenPosition(e),i=s.x-r.x,n=s.y-r.y,l=Math.sqrt(i*i+n*n)*.5;return l===0?this.threshold+1:l}navigateToCluster(t){const e=[],s=Array.from(this.clusterLabels).find(d=>d.key===t);if(!s)return;const r=s.label.world.camera;if(!r.hasCameraControls()){console.warn("Zoom to clusters only supported with Camera Controls!");return}for(const d of s.markerKeys){const f=this.list.get(d);if(f){const{x:p,y:b,z:k}=f.label.three.position;e.push(p,b,k)}}s.label.dispose(),this.clusterLabels.delete(s);const i=new L,n=new Float32Array(e),l=new _(n,3);i.setAttribute("position",l);const h=new w(i);h.geometry.computeBoundingSphere(),h.geometry.boundingSphere&&r.controls.fitToSphere(h,!0),this.isNavigating=!0,i.dispose(),h.clear(),e.length=0}};o(u,"uuid","4079eb91-79b0-4ede-bcf2-15b837129236");let y=u;export{y as M}; diff --git a/examples/assets/index-BuSG1Eje.js b/examples/assets/index-BuSG1Eje.js new file mode 100644 index 000000000..5eb111ef7 --- /dev/null +++ b/examples/assets/index-BuSG1Eje.js @@ -0,0 +1,18 @@ +var P=Object.defineProperty;var I=(i,s,e)=>s in i?P(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e;var t=(i,s,e)=>(I(i,typeof s!="symbol"?s+"":s,e),e);import{E as b,D as M,C as D}from"./index-DsPLPeA6.js";import{n as E,ah as m,W as A,d as w,I as g,a as U,j as p,C as B,K as S}from"./web-ifc-api-BiYij3qq.js";import{A as x}from"./async-event-D8tC9awa.js";class y{static isTransparent(s){return s.transparent&&s.opacity<1}}function T(i,s,e,r){return new Promise((n,o)=>{function a(){const l=i.clientWaitSync(s,e,0);if(l===i.WAIT_FAILED){o();return}if(l===i.TIMEOUT_EXPIRED){setTimeout(a,r);return}n()}a()})}async function R(i,s,e,r,n,o,a){const l=i.fenceSync(i.SYNC_GPU_COMMANDS_COMPLETE,0);i.flush(),await T(i,l,0,10),i.deleteSync(l),i.bindBuffer(s,e),i.getBufferSubData(s,r,n,o,a),i.bindBuffer(s,null)}async function V(i,s,e,r,n,o,a,l){const d=i.createBuffer();return i.bindBuffer(i.PIXEL_PACK_BUFFER,d),i.bufferData(i.PIXEL_PACK_BUFFER,l.byteLength,i.STREAM_READ),i.readPixels(s,e,r,n,o,a,0),i.bindBuffer(i.PIXEL_PACK_BUFFER,null),await R(i,i.PIXEL_PACK_BUFFER,d,0,l),i.deleteBuffer(d),l}class L{constructor(s,e,r){t(this,"onDisposed",new b);t(this,"onViewUpdated",new x);t(this,"enabled",!0);t(this,"needsUpdate",!1);t(this,"renderDebugFrame",!1);t(this,"components");t(this,"world");t(this,"renderer");t(this,"autoUpdate",!0);t(this,"updateInterval",1e3);t(this,"worker");t(this,"scene",new E);t(this,"_width",512);t(this,"_height",512);t(this,"_availableColor",1);t(this,"renderTarget");t(this,"bufferSize");t(this,"_buffer");t(this,"_isWorkerBusy",!1);t(this,"updateVisibility",async s=>{if(!this.enabled||!this.needsUpdate&&!s||this._isWorkerBusy)return;this._isWorkerBusy=!0;const e=this.world.camera.three;e.updateMatrix(),this.renderer.setSize(this._width,this._height),this.renderer.setRenderTarget(this.renderTarget),this.renderer.render(this.scene,e);const r=this.renderer.getContext();await V(r,0,0,this._width,this._height,r.RGBA,r.UNSIGNED_BYTE,this._buffer),this.renderer.setRenderTarget(null),this.renderDebugFrame&&this.renderer.render(this.scene,e),this.worker.postMessage({buffer:this._buffer}),this.needsUpdate=!1});if(!e.renderer)throw new Error("The given world must have a renderer!");this.components=s,this.applySettings(r),this.world=e,this.renderer=new m,this.renderTarget=new A(this._width,this._height),this.bufferSize=this._width*this._height*4,this._buffer=new Uint8Array(this.bufferSize),this.renderer.clippingPlanes=e.renderer.clippingPlanes;const n=` + addEventListener("message", (event) => { + const { buffer } = event.data; + const colors = new Map(); + for (let i = 0; i < buffer.length; i += 4) { + const r = buffer[i]; + const g = buffer[i + 1]; + const b = buffer[i + 2]; + const code = "" + r + "-" + g + "-" + b; + if(colors.has(code)) { + colors.set(code, colors.get(code) + 1); + } else { + colors.set(code, 1); + } + } + postMessage({ colors }); + }); + `,o=new Blob([n],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(o))}dispose(){this.enabled=!1;for(const s of this.scene.children)s.removeFromParent();this.onViewUpdated.reset(),this.worker.terminate(),this.renderer.dispose(),this.renderTarget.dispose(),this._buffer=null,this.onDisposed.reset()}getAvailableColor(){let s=BigInt(this._availableColor.toString());const e=[];do e.unshift(Number(s%256n)),s/=256n;while(s);for(;e.length!==3;)e.unshift(0);const[r,n,o]=e,a=`${r}-${n}-${o}`;return{r,g:n,b:o,code:a}}increaseColor(){if(this._availableColor===256*256*256){console.warn("Color can't be increased over 256 x 256 x 256!");return}this._availableColor++}decreaseColor(){if(this._availableColor===1){console.warn("Color can't be decreased under 0!");return}this._availableColor--}applySettings(s){s&&(s.updateInterval!==void 0&&(this.updateInterval=s.updateInterval),s.height!==void 0&&(this._height=s.height),s.width!==void 0&&(this._width=s.width),s.autoUpdate!==void 0&&(this.autoUpdate=s.autoUpdate))}}class W extends L{constructor(e,r,n){super(e,r,n);t(this,"threshold",100);t(this,"onViewUpdated",new b);t(this,"colorMeshes",new Map);t(this,"isProcessing",!1);t(this,"_colorCodeMeshMap",new Map);t(this,"_meshIDColorCodeMap",new Map);t(this,"_currentVisibleMeshes",new Set);t(this,"_recentlyHiddenMeshes",new Set);t(this,"_intervalID",null);t(this,"_transparentMat",new w({transparent:!0,opacity:0}));t(this,"handleWorkerMessage",async e=>{if(this.isProcessing)return;const r=e.data.colors;this._recentlyHiddenMeshes=new Set(this._currentVisibleMeshes),this._currentVisibleMeshes.clear();for(const[n,o]of r){if(o {this.isProcessing||await this.updateVisibility()},this.updateInterval),this.onViewUpdated.add(({seen:o,unseen:a})=>{for(const l of o)l.visible=!0;for(const l of a)l.visible=!1})}dispose(){super.dispose(),this._intervalID!==null&&(window.clearInterval(this._intervalID),this._intervalID=null),this._currentVisibleMeshes.clear(),this._recentlyHiddenMeshes.clear(),this._meshIDColorCodeMap.clear(),this._transparentMat.dispose(),this._colorCodeMeshMap.clear();const e=this.components.get(M);for(const r in this.colorMeshes){const n=this.colorMeshes.get(r);n&&e.destroy(n,!0)}this.colorMeshes.clear()}add(e){if(!this.enabled)return;if(this.isProcessing){console.log("Culler processing not finished yet.");return}this.isProcessing=!0;const r=e instanceof g,{geometry:n,material:o}=e,{colorMaterial:a,code:l}=this.getAvailableMaterial();let d;if(Array.isArray(o)){let _=!0;const f=[];for(const v of o)y.isTransparent(v)?f.push(this._transparentMat):(_=!1,f.push(a));if(_){a.dispose(),this.isProcessing=!1;return}d=f}else if(y.isTransparent(o)){a.dispose(),this.isProcessing=!1;return}else d=a;this._colorCodeMeshMap.set(l,e),this._meshIDColorCodeMap.set(e.uuid,l);const u=r?e.count:1,h=new g(n,d,u);r?h.instanceMatrix=e.instanceMatrix:h.setMatrixAt(0,new U),e.visible=!1,h.applyMatrix4(e.matrix),h.updateMatrix(),this.scene.add(h),this.colorMeshes.set(e.uuid,h),this.increaseColor(),this.isProcessing=!1}remove(e){if(this.isProcessing){console.log("Culler processing not finished yet.");return}this.isProcessing=!0;const r=this.components.get(M);this._currentVisibleMeshes.delete(e),this._recentlyHiddenMeshes.delete(e);const n=this.colorMeshes.get(e.uuid),o=this._meshIDColorCodeMap.get(e.uuid);if(!n||!o){this.isProcessing=!1,console.log(e.visible);return}this._colorCodeMeshMap.delete(o),this._meshIDColorCodeMap.delete(e.uuid),this.colorMeshes.delete(e.uuid),n.geometry=void 0,n.material=[],r.destroy(n,!0),this._recentlyHiddenMeshes.delete(e),this._currentVisibleMeshes.delete(e),this.isProcessing=!1}getAvailableMaterial(){const{r:e,g:r,b:n,code:o}=this.getAvailableColor(),a=p.enabled;p.enabled=!1;const l=new B(`rgb(${e}, ${r}, ${n})`);if(!this.world.renderer)throw new Error("Renderer not found in the world!");const d=this.world.renderer.clippingPlanes,u=new w({color:l,clippingPlanes:d,side:S});return p.enabled=a,{colorMaterial:u,code:o}}}const c=class c extends D{constructor(e){super(e);t(this,"_enabled",!0);t(this,"list",new Map);t(this,"onDisposed",new b);e.add(c.uuid,this)}get enabled(){return this._enabled}set enabled(e){this._enabled=e;for(const[r,n]of this.list)n.enabled=e}create(e,r){if(this.list.has(e.uuid))return this.list.get(e.uuid);const n=new W(this.components,e,r);return this.list.set(e.uuid,n),n}delete(e){const r=this.list.get(e.uuid);r&&r.dispose(),this.list.delete(e.uuid)}dispose(){this.enabled=!1,this.onDisposed.trigger(c.uuid),this.onDisposed.reset();for(const[e,r]of this.list)r.dispose();this.list.clear()}};t(c,"uuid","69f2a50d-c266-44fc-b1bd-fa4d34be89e6");let C=c;export{C}; diff --git a/examples/assets/index-BwEpfrPv.js b/examples/assets/index-BwEpfrPv.js new file mode 100644 index 000000000..868e6c1c3 --- /dev/null +++ b/examples/assets/index-BwEpfrPv.js @@ -0,0 +1 @@ +var l=Object.defineProperty;var m=(e,s,t)=>s in e?l(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t;var r=(e,s,t)=>(m(e,typeof s!="symbol"?s+"":s,t),t);import{aj as S,ak as F,al as L,i as T,a9 as h}from"./web-ifc-api-BiYij3qq.js";import{G as E}from"./ifc-geometry-types-C3SKrzrZ.js";import{C as D}from"./index-DsPLPeA6.js";const o=class o extends D{constructor(t){super(t);r(this,"enabled",!0);t.add(o.uuid,this)}async export(t,i,f=!1,I=!0){const n={},c=new Set(t.GetIfcEntityList(i)),p=new Set([S,F,L,T,h]);for(const a of p)c.add(a);for(const a of c){if(E.has(a))continue;const C=p.has(a)&&I,y=t.GetLineIDsWithType(i,a);for(const G of y){const u=t.GetLine(0,G,C,f);n[u.expressID]=u}}return n}};r(o,"uuid","b32c4332-cd67-436e-ba7f-196646c7a635");let d=o;export{d as I}; diff --git a/examples/assets/index-Ca45K5im.js b/examples/assets/index-Ca45K5im.js new file mode 100644 index 000000000..aee5feb23 --- /dev/null +++ b/examples/assets/index-Ca45K5im.js @@ -0,0 +1 @@ +var Q=Object.defineProperty;var q=(b,h,n)=>h in b?Q(b,h,{enumerable:!0,configurable:!0,writable:!0,value:n}):b[h]=n;var p=(b,h,n)=>(q(b,typeof h!="symbol"?h+"":h,n),n);import{V as m,E as J,h as W,c as f,g as y,L as T,Q as tt,p as I,o as et}from"./web-ifc-api-BiYij3qq.js";import{J as Z,U as V,A as nt}from"./index-B3b_h8A8.js";import{C as ot}from"./curve-highlighter-B2XYj340.js";import{M as P}from"./index-Bq1KDtuM.js";import"./import-wrapper-prod-vMwJRSad.js";import{M}from"./mark-B9TqPH3U.js";const st=["Station","Radius","Length","InitialKP","FinalKP","KP","Slope","Height","InitialKPV","FinalKPV"],C=class C extends Z{constructor(n){super(n);p(this,"enabled",!0);p(this,"world",null);p(this,"list",new Map);p(this,"_markerKey",0);p(this,"type","horizontal");p(this,"divisionLength",100);n.add(C.uuid,this)}addKPStation(n,i,t){const e=this.components.get(P),s=document.createElement("div"),o=document.createElement("div");s.appendChild(o),o.innerHTML=i,o.style.color=e.color,o.style.borderBottom="1px dotted white",o.style.width="160px",o.style.textAlign="left";const l=new M(n,s),a=new m;a.x=t.geometry.attributes.position.getX(t.geometry.attributes.position.count-1),a.y=t.geometry.attributes.position.getY(t.geometry.attributes.position.count-1),a.z=t.geometry.attributes.position.getZ(t.geometry.attributes.position.count-1);const r=new m;r.x=t.geometry.attributes.position.getX(t.geometry.attributes.position.count-2),r.y=t.geometry.attributes.position.getY(t.geometry.attributes.position.count-2),r.z=t.geometry.attributes.position.getZ(t.geometry.attributes.position.count-2);const c=new m;c.x=(a.x+r.x)/2,c.y=(a.y+r.y)/2,c.z=(a.z+r.z)/2,l.three.position.copy(c);const d=new m;d.subVectors(a,r).normalize();const u=new tt;u.setFromUnitVectors(new m(0,1,0),d);const g=new J().setFromQuaternion(u).z,w=W.radToDeg(g);o.style.transform=`rotate(${-w-90}deg) translate(-35%, -50%)`;const v=this._markerKey.toString();e.list.set(v,{label:l,key:v,merged:!1,static:!1}),this._markerKey++,this.save(v,"KP")}addVerticalMarker(n,i,t,e,s){const o=this.components.get(P),l=document.createElement("span");l.innerHTML=i,l.style.color=o.color;const a=new M(n,l,s);if(e==="Height"){const c=document.createElement("span");c.innerHTML=i,c.style.color=o.color;const{position:d}=t.geometry.attributes,g=(d.array.length/3-1)*3,w=d.array.slice(g,g+3);a.three.position.set(w[0],w[1]+10,w[2])}else if(e==="InitialKPV"){const{position:c}=t.geometry.attributes,d=c.getX(0),u=c.getY(0),g=c.getZ(0);a.three.position.set(d-20,u,g)}else if(e==="FinalKPV"){const{position:c}=t.geometry.attributes,d=c.getX(t.geometry.attributes.position.count-1),u=c.getY(t.geometry.attributes.position.count-1),g=c.getZ(t.geometry.attributes.position.count-1);a.three.position.set(d+20,u,g)}else if(e==="Slope"){l.style.color="grey";const{position:c}=t.geometry.attributes,d=new m;d.x=c.getX(0),d.y=c.getY(0),d.z=c.getZ(0);const u=new m;u.x=c.getX(c.count-1),u.y=c.getY(c.count-1),u.z=c.getZ(c.count-1);const g=new m;g.addVectors(d,u).multiplyScalar(.5),a.three.position.set(g.x,g.y-10,g.z)}const r=this._markerKey.toString();return o.list.set(r,{label:a,key:r,type:e,merged:!1,static:!1}),this._markerKey++,this.save(r,e),a}addCivilMarker(n,i,t,e){const s=this.components.get(P),o=document.createElement("span");o.innerHTML=i,o.style.color=s.color;const l=new M(n,o);if(e==="InitialKP"){const r=t.geometry.attributes.position.getX(0),c=t.geometry.attributes.position.getY(0),d=t.geometry.attributes.position.getZ(0);l.three.position.set(r+2,c+2,d)}else if(e==="FinalKP"){const r=t.geometry.attributes.position.getX(t.geometry.attributes.position.count-1),c=t.geometry.attributes.position.getY(t.geometry.attributes.position.count-1),d=t.geometry.attributes.position.getZ(t.geometry.attributes.position.count-1);l.three.position.set(r+2,c-2,d)}else if(e==="Length"){const r=new m;r.x=t.geometry.attributes.position.getX(0),r.y=t.geometry.attributes.position.getY(0),r.z=t.geometry.attributes.position.getZ(0);const c=new m;c.x=t.geometry.attributes.position.getX(t.geometry.attributes.position.count-1),c.y=t.geometry.attributes.position.getY(t.geometry.attributes.position.count-1),c.z=t.geometry.attributes.position.getZ(t.geometry.attributes.position.count-1);const d=r.distanceTo(c);l.three.element.innerText=d.toFixed(2);const u=c.clone().add(r).divideScalar(2);l.three.position.copy(u)}const a=this._markerKey.toString();return s.list.set(a,{label:l,key:a,type:e,merged:!1,static:!1}),this._markerKey++,this.save(a,e),l}showKPStations(n){if(!this.world)throw new Error("A world is needed for this component to work!");if(this.type==="horizontal"){const i=this.generateStartAndEndKP(n);for(const[,e]of i)this.addKPStation(this.world,e.value,e.normal);const t=this.generateConstantKP(n);for(const[,e]of t)this.addKPStation(this.world,e.value,e.normal)}}showCurveLength(n,i){if(!this.world)throw new Error("A world is needed for this component to work!");const t=this.components.get(P),e=n.length,s=`${i.toFixed(2)} m`,o=Math.round(e/2),l=n[o],a=t.create(this.world,s,l,!0);this.save(a,"Length")}showLineLength(n,i){if(!this.world)throw new Error("A world is needed for this component to work!");const t=this.components.get(P),e=new m;e.x=n.geometry.getAttribute("position").getX(0),e.y=n.geometry.getAttribute("position").getY(0),e.z=n.geometry.getAttribute("position").getZ(0);const s=new m;s.x=n.geometry.getAttribute("position").getX(1),s.y=n.geometry.getAttribute("position").getY(1),s.z=n.geometry.getAttribute("position").getZ(1);const o=`${i.toFixed(2)} m`,l=new m;l.addVectors(e,s).multiplyScalar(.5);const a=t.create(this.world,o,l,!0);this.save(a,"Length")}showCurveRadius(n,i){if(!this.world)throw new Error("A world is needed for this component to work!");const t=this.components.get(P),e=new m;e.x=n.geometry.getAttribute("position").getX(0),e.y=n.geometry.getAttribute("position").getY(0),e.z=n.geometry.getAttribute("position").getZ(0);const s=new m;s.x=n.geometry.getAttribute("position").getX(1),s.y=n.geometry.getAttribute("position").getY(1),s.z=n.geometry.getAttribute("position").getZ(1);const o=`R = ${i.toFixed(2)} m`,l=new m;l.addVectors(e,s).multiplyScalar(.5);const a=t.create(this.world,o,l,!0);this.save(a,"Radius")}deleteByType(n=st){const i=this.components.get(P);for(const t of n){const e=this.list.get(t);if(e){for(const s of e)i.delete(s);this.list.delete(t)}}}generateStartAndEndKP(n){const{alignment:i}=n.curve,t=new Map;for(const e of i.horizontal){const s=e.getLength();if(t.size>0){const o=e.index-1,a=t.get(o).distance+s,r=e.mesh.geometry.getAttribute("position"),c=r.count-1,d=new m;d.x=r.getX(c),d.y=r.getY(c),d.z=r.getZ(c);const u=this.createNormalLine(e.mesh);t.set(e.index,{value:this.getShortendKPValue(a),distance:a,point:d,normal:u})}else{const o=e.mesh.geometry.getAttribute("position"),l=o.count-1,a=new m;a.x=o.getX(l),a.y=o.getY(l),a.z=o.getZ(l);const r=this.createNormalLine(e.mesh);t.set(e.index,{value:this.getShortendKPValue(s),distance:s,point:a,normal:r})}}return t}createNormalLine(n){const i=n.geometry.attributes.position.count-1,t=i-1,e=new m;e.x=n.geometry.attributes.position.getX(i),e.y=n.geometry.attributes.position.getY(i),e.z=n.geometry.attributes.position.getZ(i);const s=new m;s.x=n.geometry.attributes.position.getX(t),s.y=n.geometry.attributes.position.getY(t),s.z=n.geometry.attributes.position.getZ(t);const l=new m().subVectors(e,s).clone().applyAxisAngle(new m(0,0,1),Math.PI*.5).normalize(),a=new f().setFromPoints([l.clone().setLength(10).add(e),l.clone().setLength(-10).add(e)]);return new y(a)}generateConstantKP(n){const{alignment:i}=n.curve,t=new Map,e=i.getLength("horizontal"),s=Math.floor(e/this.divisionLength);for(let o=0;o 1e3&&parseInt(t,10)<1e4){const[o,...l]=t;return`${o}+${l.join("")}.${s}`}if(parseInt(t,10)>1e4){const[o,l,...a]=t;return`${o}${l}+${a.join("")}.${s}`}return`0+${t.padStart(3,"0")}.${s}`}save(n,i){this.list.has(i)||this.list.set(i,new Set),this.list.get(i).add(n)}};p(C,"uuid","0af12c32-81ee-4100-a030-e9ae546f6170");let k=C;class it extends Z{constructor(n){super(n);p(this,"enabled",!0);p(this,"highlighter");p(this,"onHighlight",new V);p(this,"onMarkerChange",new V);p(this,"mouseMarkers");p(this,"onMarkerHidden",new V);p(this,"_curves",[]);p(this,"_previousAlignment",null);p(this,"_world",null);p(this,"onMouseMove",n=>{var o,l,a;if(!this._world)throw new Error("No world was given for this navigator!");if(!this._world.renderer)return;const t=this._world.renderer.three.domElement.parentElement,e=this._world.camera.three,s=(o=this.highlighter)==null?void 0:o.castRay(n,e,t,this._curves);if(s){const{object:r}=s;(l=this.highlighter)==null||l.hover(r),this.updateMarker(s,"hover");return}this.mouseMarkers&&(this.mouseMarkers.hover.visible=!1),(a=this.highlighter)==null||a.unHover(),this.onMarkerHidden.trigger({type:"hover"})});p(this,"onClick",n=>{var o,l;if(!this._world)throw new Error("No world was given for this navigator!");if(!this._world.renderer)return;const t=this._world.renderer.three.domElement.parentElement,e=this._world.camera.three,s=(o=this.highlighter)==null?void 0:o.castRay(n,e,t,this._curves);if(s){const a=s,r=a.object;if((l=this.highlighter)==null||l.select(r),this.updateMarker(a,"select"),this._world.camera.hasCameraControls()&&(r.geometry.boundingBox||r.geometry.computeBoundingBox(),r.geometry.boundingBox)){const c=this.getScaledBox(r.geometry.boundingBox,2);this._world.camera.controls.fitToBox(c,!0)}if(this.onHighlight.trigger({mesh:r,point:a.point}),this._previousAlignment!==r.curve.alignment){const c=this.components.get(k);c.deleteByType(),c.showKPStations(r),this._previousAlignment=r.curve.alignment}}});p(this,"onControlsUpdated",()=>{if(!this._world)throw new Error("No world was given for this navigator!");if(!(this._world.camera.three instanceof et)||!this.highlighter)return;const{zoom:n,left:i,right:t,top:e,bottom:s}=this._world.camera.three,o=i-t,l=e-s,r=Math.max(o,l)/n,c=40,{caster:d}=this.highlighter;d.params.Line.threshold=r/c})}get world(){return this._world}set world(n){var t,e,s;if(n===this._world||(this._world&&this.setupEvents(!1),this._world=n,(t=this.highlighter)==null||t.dispose(),(e=this.mouseMarkers)==null||e.hover.dispose(),(s=this.mouseMarkers)==null||s.select.dispose(),!n))return;const i=n.scene.three;this.highlighter=new ot(i,this.view),this.mouseMarkers={select:this.newMouseMarker("#ffffff",n),hover:this.newMouseMarker("#575757",n)},this.setupEvents(!0)}async draw(n,i){if(!n.civilData)throw new Error("The provided model doesn't have civil data!");if(!this._world)throw new Error("No world was given for this navigator!");const{alignments:t}=n.civilData,e=i||t.values(),s=this._world.scene.three,o=new I;o.makeEmpty(),o.min.set(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),o.max.set(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(const a of e){if(!a)throw new Error("Alignment not found!");for(const r of a[this.view])if(s.add(r.mesh),this._curves.push(r.mesh),!o.isEmpty())o.expandByObject(r.mesh);else{r.mesh.geometry.computeBoundingBox();const c=r.mesh.geometry.boundingBox;c instanceof I&&o.copy(c).applyMatrix4(r.mesh.matrixWorld)}}const l=this.getScaledBox(o,1.2);this._world.camera.hasCameraControls()&&await this._world.camera.controls.fitToBox(l,!1)}async dispose(){var n;(n=this.highlighter)==null||n.dispose(),this.clear(),this.onHighlight.reset(),this._curves=[]}clear(){var n,i;(n=this.highlighter)==null||n.unSelect(),(i=this.highlighter)==null||i.unHover();for(const t of this._curves)t.removeFromParent();this._curves=[]}setMarker(n,i,t){if(!this._curves.length)return;const e=n.getCurveAt(i,this.view),s=n.getPointAt(i,this.view),{index:o}=e.curve.getSegmentAt(e.percentage);this.setMouseMarker(s,e.curve.mesh,o,t)}setDefSegments(n){const i=[],t=[],e=(s,o)=>{const l=o[1]-s[1],a=o[0]-s[0];return l/a};for(let s=0;s=0;g--)if(o[g*3]!==void 0&&o[g*3+1]!==void 0){r=o[g*3],c=o[g*3+1];break}const u=(e([l,a],[r,c])*100).toFixed(2);t.push({slope:u})}for(const s of n)for(let o=0;o s.clone().add(t))}showLineInfo(h,n){const i=this.components.get(k);i.world=this._world,i.deleteByType(["Length","Radius"]);const t=h.geometry.attributes.position.array,e=this.calculateParallelCurve(t,t.length/3,n),s=new f().setFromPoints(e),o=new y(s,this.markupMaterial);i.showLineLength(o,h.curve.getLength()),this._scene.add(o),this.markupLines.push(o);const{startDimensionPoints:l,endDimensionPoints:a}=this.calculateDimensionLines(h,o),r=this.offsetDimensionLine(l,n*.1),c=this.offsetDimensionLine(a,n*.1),d=new f().setFromPoints(r),u=new f().setFromPoints(c),g=new y(d,this.markupMaterial);this._scene.add(g),this.markupLines.push(g);const w=new y(u,this.markupMaterial);this._scene.add(w),this.markupLines.push(w)}showClothoidInfo(h,n){const i=this.components.get(k);i.world=this._world,i.deleteByType(["Length","Radius"]);const t=h.geometry.attributes.position.array,e=this.calculateParallelCurve(t,t.length/3,n),s=new f().setFromPoints(e);i.showCurveLength(e,h.curve.getLength());const o=new y(s,this.markupMaterial);this._scene.add(o),this.markupLines.push(o);const{startDimensionPoints:l,endDimensionPoints:a}=this.calculateDimensionLines(h,o),r=this.offsetDimensionLine(l,n*.1),c=this.offsetDimensionLine(a,n*.1),d=new f().setFromPoints(r),u=new f().setFromPoints(c),g=new y(d,this.markupMaterial);this._scene.add(g),this.markupLines.push(g);const w=new y(u,this.markupMaterial);this._scene.add(w),this.markupLines.push(w)}showCircularArcInfo(h,n){const i=this.components.get(k);i.world=this._world,i.deleteByType(["Length","Radius"]);const t=h.curve.data.RADIUS,e=h.geometry.attributes.position.array,s=h.geometry.attributes.position.count,o=[],l=new m(e[0],e[1],e[2]),a=(s-1)*3,r=new m(e[a],e[a+1],e[a+2]),c=s/2*3,d=new m(e[c],e[c+1],e[c+2]),u=r.clone().sub(l).normalize(),g=new m(-u.y,u.x,0);g.multiplyScalar(t);const w=d.clone().add(g);o.push(d),o.push(w);const v=new f().setFromPoints(o),L=new y(v,this.markupMaterial);i.showCurveRadius(L,Math.abs(t)),this._scene.add(L),this.markupLines.push(L);const _=[];for(let x=0;x {!this.highlighter||!this.planHighlighter||(this.planHighlighter.showCurveInfo(i),this.fitCameraToAlignment(i))})}set world(n){var i;super.world=n,n&&((i=this.planHighlighter)==null||i.dispose(),this.planHighlighter=new rt(this.components,n.scene.three,n))}async fitCameraToAlignment(n){const i=this.components.get(nt),t=n.curve.alignment;for(const c of t.horizontal)i.addMesh(c.mesh);const e=i.get(),s=new m,{min:o,max:l}=e,a=1.2,r=new m((l.x-o.x)*a,(l.y-o.y)*a,(l.z-o.z)*a);e.getCenter(s),e.setFromCenterAndSize(s,r),i.reset(),this.world&&this.world.camera.hasCameraControls()&&await this.world.camera.controls.fitToBox(e,!0)}};p(A,"uuid","3096dea0-5bc2-41c7-abce-9089b6c9431b");let Y=A;export{Y as C,it as a,k as b}; diff --git a/examples/assets/index-Cb-lnTew.js b/examples/assets/index-Cb-lnTew.js new file mode 100644 index 000000000..2c2ef6180 --- /dev/null +++ b/examples/assets/index-Cb-lnTew.js @@ -0,0 +1,316 @@ +var S=Object.defineProperty;var T=(l,t,e)=>t in l?S(l,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[t]=e;var o=(l,t,e)=>(T(l,typeof t!="symbol"?t+"":t,e),e);import{q as h,U as E,f as m,W as v,H as B,t as R,u as M,C as _,n as w,d as y,I as b,v as z,R as k,w as x,x as V}from"./web-ifc-api-BiYij3qq.js";import{a as L,n as G}from"./index-B3b_h8A8.js";import{P as d,F as P,$ as O}from"./import-wrapper-prod-vMwJRSad.js";import{R as N}from"./renderer-with-2d-Dwkf_fcQ.js";const A={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:` + + varying vec2 vUv; + + void main() { + + vUv = uv; + gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); + + }`,fragmentShader:` + + uniform float opacity; + + uniform sampler2D tDiffuse; + + varying vec2 vUv; + + void main() { + + vec4 texel = texture2D( tDiffuse, vUv ); + gl_FragColor = opacity * texel; + + + }`};class D extends d{constructor(t,e){super(),this.textureID=e!==void 0?e:"tDiffuse",t instanceof h?(this.uniforms=t.uniforms,this.material=t):t&&(this.uniforms=E.clone(t.uniforms),this.material=new h({name:t.name!==void 0?t.name:"unspecified",defines:Object.assign({},t.defines),uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader})),this.fsQuad=new P(this.material)}render(t,e,s){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=s.texture),this.fsQuad.material=this.material,this.renderToScreen?(t.setRenderTarget(null),this.fsQuad.render(t)):(t.setRenderTarget(e),this.clear&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),this.fsQuad.render(t))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class C extends d{constructor(t,e){super(),this.scene=t,this.camera=e,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(t,e,s){const i=t.getContext(),r=t.state;r.buffers.color.setMask(!1),r.buffers.depth.setMask(!1),r.buffers.color.setLocked(!0),r.buffers.depth.setLocked(!0);let n,f;this.inverse?(n=0,f=1):(n=1,f=0),r.buffers.stencil.setTest(!0),r.buffers.stencil.setOp(i.REPLACE,i.REPLACE,i.REPLACE),r.buffers.stencil.setFunc(i.ALWAYS,n,4294967295),r.buffers.stencil.setClear(f),r.buffers.stencil.setLocked(!0),t.setRenderTarget(s),this.clear&&t.clear(),t.render(this.scene,this.camera),t.setRenderTarget(e),this.clear&&t.clear(),t.render(this.scene,this.camera),r.buffers.color.setLocked(!1),r.buffers.depth.setLocked(!1),r.buffers.color.setMask(!0),r.buffers.depth.setMask(!0),r.buffers.stencil.setLocked(!1),r.buffers.stencil.setFunc(i.EQUAL,1,4294967295),r.buffers.stencil.setOp(i.KEEP,i.KEEP,i.KEEP),r.buffers.stencil.setLocked(!0)}}class Q extends d{constructor(){super(),this.needsSwap=!1}render(t){t.state.buffers.stencil.setLocked(!1),t.state.buffers.stencil.setTest(!1)}}class U{constructor(t,e){if(this.renderer=t,this._pixelRatio=t.getPixelRatio(),e===void 0){const s=t.getSize(new m);this._width=s.width,this._height=s.height,e=new v(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:B}),e.texture.name="EffectComposer.rt1"}else this._width=e.width,this._height=e.height;this.renderTarget1=e,this.renderTarget2=e.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new D(A),this.copyPass.material.blending=R,this.clock=new M}swapBuffers(){const t=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=t}addPass(t){this.passes.push(t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(t,e){this.passes.splice(e,0,t),t.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(t){const e=this.passes.indexOf(t);e!==-1&&this.passes.splice(e,1)}isLastEnabledPass(t){for(let e=t+1;e+ + void main() { + #include + + vec4 absPosition = vec4(position, 1.0); + vec3 trueNormal = normal; + + #ifdef USE_INSTANCING + absPosition = instanceMatrix * absPosition; + trueNormal = (instanceMatrix * vec4(normal, 0.)).xyz; + #endif + + absPosition = modelMatrix * absPosition; + trueNormal = (normalize(modelMatrix * vec4(trueNormal, 0.))).xyz; + + vec3 planePosition = absPosition.xyz / 40.; + float d = abs(dot(trueNormal, planePosition)); + vColor = vec4(abs(trueNormal), d); + gl_Position = projectionMatrix * viewMatrix * absPosition; + + #include + #include + } + `,fragmentShader:` + varying vec4 vColor; + + #include + + void main() { + #include + gl_FragColor = vColor; + } + `})}function j(){return new h({side:2,clipping:!0,uniforms:{},vertexShader:` + varying vec3 vCameraPosition; + varying vec3 vPosition; + varying vec3 vNormal; + + #include + + void main() { + #include + + vec4 absPosition = vec4(position, 1.0); + vNormal = normal; + + #ifdef USE_INSTANCING + absPosition = instanceMatrix * absPosition; + vNormal = (instanceMatrix * vec4(normal, 0.)).xyz; + #endif + + absPosition = modelMatrix * absPosition; + vNormal = (normalize(modelMatrix * vec4(vNormal, 0.))).xyz; + + gl_Position = projectionMatrix * viewMatrix * absPosition; + + vCameraPosition = cameraPosition; + vPosition = absPosition.xyz; + + #include + #include + } + `,fragmentShader:` + varying vec3 vCameraPosition; + varying vec3 vPosition; + varying vec3 vNormal; + + #include + + void main() { + #include + vec3 cameraPixelVec = normalize(vCameraPosition - vPosition); + float difference = abs(dot(vNormal, cameraPixelVec)); + + // This achieves a double gloss effect: when the surface is perpendicular and when it's parallel + difference = abs((difference * 2.) - 1.); + + gl_FragColor = vec4(difference, difference, difference, 1.); + } + `})}class H extends d{constructor(e,s,i,r,n){super();o(this,"components");o(this,"resolution");o(this,"renderScene");o(this,"renderCamera");o(this,"fsQuad");o(this,"normalOverrideMaterial");o(this,"glossOverrideMaterial");o(this,"planeBuffer");o(this,"glossBuffer");o(this,"outlineBuffer");o(this,"excludedMeshes",[]);o(this,"outlinedMeshes",{});o(this,"_outlineScene",new w);o(this,"_outlineEnabled",!1);o(this,"_lineColor",10066329);o(this,"_opacity",.4);o(this,"_tolerance",3);o(this,"_glossEnabled",!0);o(this,"_glossExponent",1.9);o(this,"_minGloss",-.1);o(this,"_maxGloss",.1);o(this,"_outlinesNeedsUpdate",!1);if(!i.renderer)throw new Error("The given world must have a renderer!");this.components=s,this.renderScene=r,this.renderCamera=n,this.resolution=new m(e.x,e.y),this.fsQuad=new P,this.fsQuad.material=this.createOutlinePostProcessMaterial(),this.planeBuffer=this.newRenderTarget(),this.glossBuffer=this.newRenderTarget(),this.outlineBuffer=this.newRenderTarget();const f=W();f.clippingPlanes=i.renderer.clippingPlanes,this.normalOverrideMaterial=f;const u=j();u.clippingPlanes=i.renderer.clippingPlanes,this.glossOverrideMaterial=u}get lineColor(){return this._lineColor}set lineColor(e){this._lineColor=e,this.fsQuad.material.uniforms.lineColor.value.set(e)}get tolerance(){return this._tolerance}set tolerance(e){this._tolerance=e;const s=this.fsQuad.material;s.uniforms.tolerance.value=e}get opacity(){return this._opacity}set opacity(e){this._opacity=e;const s=this.fsQuad.material;s.uniforms.opacity.value=e}get glossEnabled(){return this._glossEnabled}set glossEnabled(e){if(e===this._glossEnabled)return;this._glossEnabled=e;const s=this.fsQuad.material;s.uniforms.glossEnabled.value=e?1:0}get glossExponent(){return this._glossExponent}set glossExponent(e){this._glossExponent=e;const s=this.fsQuad.material;s.uniforms.glossExponent.value=e}get minGloss(){return this._minGloss}set minGloss(e){this._minGloss=e;const s=this.fsQuad.material;s.uniforms.minGloss.value=e}get maxGloss(){return new y().color.convertLinearToSRGB(),this._maxGloss}set maxGloss(e){this._maxGloss=e;const s=this.fsQuad.material;s.uniforms.maxGloss.value=e}get outlineEnabled(){return this._outlineEnabled}set outlineEnabled(e){if(e===this._outlineEnabled)return;this._outlineEnabled=e;const s=this.fsQuad.material;s.uniforms.outlineEnabled.value=e?1:0}async dispose(){this.planeBuffer.dispose(),this.glossBuffer.dispose(),this.outlineBuffer.dispose(),this.normalOverrideMaterial.dispose(),this.glossOverrideMaterial.dispose(),this.fsQuad.dispose(),this.excludedMeshes=[],this._outlineScene.children=[];const e=this.components.get(L);for(const s in this.outlinedMeshes){const i=this.outlinedMeshes[s];for(const r of i.meshes)e.destroy(r,!0,!0);i.material.dispose()}}setSize(e,s){this.planeBuffer.setSize(e,s),this.glossBuffer.setSize(e,s),this.outlineBuffer.setSize(e,s),this.resolution.set(e,s),this.fsQuad.material.uniforms.screenSize.value.set(this.resolution.x,this.resolution.y,1/this.resolution.x,1/this.resolution.y)}render(e,s,i){const r=s.depthBuffer;s.depthBuffer=!1;const n=this.renderScene.overrideMaterial,f=this.renderScene.background;this.renderScene.background=null;for(const c of this.excludedMeshes)c.visible=!1;if(e.setRenderTarget(this.planeBuffer),this.renderScene.overrideMaterial=this.normalOverrideMaterial,e.render(this.renderScene,this.renderCamera),this._glossEnabled&&(e.setRenderTarget(this.glossBuffer),this.renderScene.overrideMaterial=this.glossOverrideMaterial,e.render(this.renderScene,this.renderCamera)),this.renderScene.overrideMaterial=n,this._outlineEnabled){let c=!1;for(const g in this.outlinedMeshes){const p=this.outlinedMeshes[g];for(const a of p.meshes)c=!0,a.userData.materialPreOutline=a.material,a.material=p.material,a.userData.groupsPreOutline=a.geometry.groups,a.geometry.groups=[],a instanceof b&&(a.userData.colorPreOutline=a.instanceColor,a.instanceColor=null),a.userData.parentPreOutline=a.parent,this._outlineScene.add(a)}(c||this._outlinesNeedsUpdate)&&(e.setRenderTarget(this.outlineBuffer),e.render(this._outlineScene,this.renderCamera),this._outlinesNeedsUpdate=c);for(const g in this.outlinedMeshes){const p=this.outlinedMeshes[g];for(const a of p.meshes)a.material=a.userData.materialPreOutline,a.geometry.groups=a.userData.groupsPreOutline,a instanceof b&&(a.instanceColor=a.userData.colorPreOutline),a.userData.parentPreOutline&&a.userData.parentPreOutline.add(a),a.userData.materialPreOutline=void 0,a.userData.groupsPreOutline=void 0,a.userData.colorPreOutline=void 0,a.userData.parentPreOutline=void 0}}for(const c of this.excludedMeshes)c.visible=!0;this.renderScene.background=f;const u=this.fsQuad.material;u.uniforms.planeBuffer.value=this.planeBuffer.texture,u.uniforms.glossBuffer.value=this.glossBuffer.texture,u.uniforms.outlineBuffer.value=this.outlineBuffer.texture,u.uniforms.sceneColorBuffer.value=i.texture,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(s),this.fsQuad.render(e)),s.depthBuffer=r}get vertexShader(){return` + varying vec2 vUv; + void main() { + vUv = uv; + gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); + } + `}get fragmentShader(){return` + uniform sampler2D sceneColorBuffer; + uniform sampler2D planeBuffer; + uniform sampler2D glossBuffer; + uniform sampler2D outlineBuffer; + uniform vec4 screenSize; + uniform vec3 lineColor; + + uniform float outlineEnabled; + + uniform int width; + uniform float opacity; + uniform float tolerance; + uniform float glossExponent; + uniform float minGloss; + uniform float maxGloss; + uniform float glossEnabled; + + varying vec2 vUv; + + vec4 getValue(sampler2D buffer, int x, int y) { + return texture2D(buffer, vUv + screenSize.zw * vec2(x, y)); + } + + float normalDiff(vec3 normal1, vec3 normal2) { + return ((dot(normal1, normal2) - 1.) * -1.) / 2.; + } + + // Returns 0 if it's background, 1 if it's not + float getIsBackground(vec3 normal) { + float background = 1.0; + background *= step(normal.x, 0.); + background *= step(normal.y, 0.); + background *= step(normal.z, 0.); + background = (background - 1.) * -1.; + return background; + } + + void main() { + + vec4 sceneColor = getValue(sceneColorBuffer, 0, 0); + vec3 normSceneColor = normalize(sceneColor.rgb); + + vec4 plane = getValue(planeBuffer, 0, 0); + vec3 normal = plane.xyz; + float distance = plane.w; + + vec3 normalTop = getValue(planeBuffer, 0, width).rgb; + vec3 normalBottom = getValue(planeBuffer, 0, -width).rgb; + vec3 normalRight = getValue(planeBuffer, width, 0).rgb; + vec3 normalLeft = getValue(planeBuffer, -width, 0).rgb; + vec3 normalTopRight = getValue(planeBuffer, width, width).rgb; + vec3 normalTopLeft = getValue(planeBuffer, -width, width).rgb; + vec3 normalBottomRight = getValue(planeBuffer, width, -width).rgb; + vec3 normalBottomLeft = getValue(planeBuffer, -width, -width).rgb; + + float distanceTop = getValue(planeBuffer, 0, width).a; + float distanceBottom = getValue(planeBuffer, 0, -width).a; + float distanceRight = getValue(planeBuffer, width, 0).a; + float distanceLeft = getValue(planeBuffer, -width, 0).a; + float distanceTopRight = getValue(planeBuffer, width, width).a; + float distanceTopLeft = getValue(planeBuffer, -width, width).a; + float distanceBottomRight = getValue(planeBuffer, width, -width).a; + float distanceBottomLeft = getValue(planeBuffer, -width, -width).a; + + vec3 sceneColorTop = normalize(getValue(sceneColorBuffer, 1, 0).rgb); + vec3 sceneColorBottom = normalize(getValue(sceneColorBuffer, -1, 0).rgb); + vec3 sceneColorLeft = normalize(getValue(sceneColorBuffer, 0, -1).rgb); + vec3 sceneColorRight = normalize(getValue(sceneColorBuffer, 0, 1).rgb); + vec3 sceneColorTopRight = normalize(getValue(sceneColorBuffer, 1, 1).rgb); + vec3 sceneColorBottomRight = normalize(getValue(sceneColorBuffer, -1, 1).rgb); + vec3 sceneColorTopLeft = normalize(getValue(sceneColorBuffer, 1, 1).rgb); + vec3 sceneColorBottomLeft = normalize(getValue(sceneColorBuffer, -1, 1).rgb); + + // Checks if the planes of this texel and the neighbour texels are different + + float planeDiff = 0.0; + + planeDiff += step(0.001, normalDiff(normal, normalTop)); + planeDiff += step(0.001, normalDiff(normal, normalBottom)); + planeDiff += step(0.001, normalDiff(normal, normalLeft)); + planeDiff += step(0.001, normalDiff(normal, normalRight)); + planeDiff += step(0.001, normalDiff(normal, normalTopRight)); + planeDiff += step(0.001, normalDiff(normal, normalTopLeft)); + planeDiff += step(0.001, normalDiff(normal, normalBottomRight)); + planeDiff += step(0.001, normalDiff(normal, normalBottomLeft)); + + planeDiff += step(0.001, normalDiff(normSceneColor, sceneColorTop)); + planeDiff += step(0.001, normalDiff(normSceneColor, sceneColorBottom)); + planeDiff += step(0.001, normalDiff(normSceneColor, sceneColorLeft)); + planeDiff += step(0.001, normalDiff(normSceneColor, sceneColorRight)); + planeDiff += step(0.001, normalDiff(normSceneColor, sceneColorTopRight)); + planeDiff += step(0.001, normalDiff(normSceneColor, sceneColorTopLeft)); + planeDiff += step(0.001, normalDiff(normSceneColor, sceneColorBottomRight)); + planeDiff += step(0.001, normalDiff(normSceneColor, sceneColorBottomLeft)); + + planeDiff += step(0.001, abs(distance - distanceTop)); + planeDiff += step(0.001, abs(distance - distanceBottom)); + planeDiff += step(0.001, abs(distance - distanceLeft)); + planeDiff += step(0.001, abs(distance - distanceRight)); + planeDiff += step(0.001, abs(distance - distanceTopRight)); + planeDiff += step(0.001, abs(distance - distanceTopLeft)); + planeDiff += step(0.001, abs(distance - distanceBottomRight)); + planeDiff += step(0.001, abs(distance - distanceBottomLeft)); + + // Add extra background outline + + int width2 = width + 1; + vec3 normalTop2 = getValue(planeBuffer, 0, width2).rgb; + vec3 normalBottom2 = getValue(planeBuffer, 0, -width2).rgb; + vec3 normalRight2 = getValue(planeBuffer, width2, 0).rgb; + vec3 normalLeft2 = getValue(planeBuffer, -width2, 0).rgb; + vec3 normalTopRight2 = getValue(planeBuffer, width2, width2).rgb; + vec3 normalTopLeft2 = getValue(planeBuffer, -width2, width2).rgb; + vec3 normalBottomRight2 = getValue(planeBuffer, width2, -width2).rgb; + vec3 normalBottomLeft2 = getValue(planeBuffer, -width2, -width2).rgb; + + planeDiff += -(getIsBackground(normalTop2) - 1.); + planeDiff += -(getIsBackground(normalBottom2) - 1.); + planeDiff += -(getIsBackground(normalRight2) - 1.); + planeDiff += -(getIsBackground(normalLeft2) - 1.); + planeDiff += -(getIsBackground(normalTopRight2) - 1.); + planeDiff += -(getIsBackground(normalBottomRight2) - 1.); + planeDiff += -(getIsBackground(normalBottomRight2) - 1.); + planeDiff += -(getIsBackground(normalBottomLeft2) - 1.); + + // Tolerance sets the minimum amount of differences to consider + // this texel an edge + + float line = step(tolerance, planeDiff); + + // Exclude background and apply opacity + + float background = getIsBackground(normal); + line *= background; + line *= opacity; + + // Add gloss + + vec3 gloss = getValue(glossBuffer, 0, 0).xyz; + float diffGloss = abs(maxGloss - minGloss); + vec3 glossExpVector = vec3(glossExponent,glossExponent,glossExponent); + gloss = min(pow(gloss, glossExpVector), vec3(1.,1.,1.)); + gloss *= diffGloss; + gloss += minGloss; + vec4 glossedColor = sceneColor + vec4(gloss, 1.) * glossEnabled; + + vec4 corrected = mix(sceneColor, glossedColor, background); + + // Draw lines + + corrected = mix(corrected, vec4(lineColor, 1.), line); + + // Add outline + + vec4 outlinePreview =getValue(outlineBuffer, 0, 0); + float outlineColorCorrection = 1. / max(0.2, outlinePreview.a); + vec3 outlineColor = outlinePreview.rgb * outlineColorCorrection; + + // thickness between 10 and 2, opacity between 1 and 0.2 + int outlineThickness = int(outlinePreview.a * 10.); + + float outlineDiff = 0.; + + outlineDiff += step(0.1, getValue(outlineBuffer, 0, 0).a); + outlineDiff += step(0.1, getValue(outlineBuffer, 1, 0).a); + outlineDiff += step(0.1, getValue(outlineBuffer, -1, 0).a); + outlineDiff += step(0.1, getValue(outlineBuffer, 0, -1).a); + outlineDiff += step(0.1, getValue(outlineBuffer, 0, 1).a); + outlineDiff += step(0.1, getValue(outlineBuffer, outlineThickness, 0).a); + outlineDiff += step(0.1, getValue(outlineBuffer, -outlineThickness, 0).a); + outlineDiff += step(0.1, getValue(outlineBuffer, 0, -outlineThickness).a); + outlineDiff += step(0.1, getValue(outlineBuffer, 0, outlineThickness).a); + outlineDiff += step(0.1, getValue(outlineBuffer, outlineThickness, outlineThickness).a); + outlineDiff += step(0.1, getValue(outlineBuffer, -outlineThickness, outlineThickness).a); + outlineDiff += step(0.1, getValue(outlineBuffer, -outlineThickness, -outlineThickness).a); + outlineDiff += step(0.1, getValue(outlineBuffer, outlineThickness, -outlineThickness).a); + + float outLine = step(4., outlineDiff) * step(outlineDiff, 12.) * outlineEnabled; + corrected = mix(corrected, vec4(outlineColor, 1.), outLine); + + gl_FragColor = corrected; + } + `}createOutlinePostProcessMaterial(){return new h({uniforms:{opacity:{value:this._opacity},debugVisualize:{value:0},sceneColorBuffer:{value:null},tolerance:{value:this._tolerance},planeBuffer:{value:null},glossBuffer:{value:null},outlineBuffer:{value:null},glossEnabled:{value:1},minGloss:{value:this._minGloss},maxGloss:{value:this._maxGloss},outlineEnabled:{value:0},glossExponent:{value:this._glossExponent},width:{value:1},lineColor:{value:new _(this._lineColor)},screenSize:{value:new z(this.resolution.x,this.resolution.y,1/this.resolution.x,1/this.resolution.y)}},vertexShader:this.vertexShader,fragmentShader:this.fragmentShader})}newRenderTarget(){const e=new v(this.resolution.x,this.resolution.y);return e.texture.colorSpace="srgb-linear",e.texture.format=k,e.texture.type=B,e.texture.minFilter=x,e.texture.magFilter=x,e.texture.generateMipmaps=!1,e.stencilBuffer=!1,e}}class ${constructor(t,e,s){o(this,"overrideClippingPlanes",!1);o(this,"composer");o(this,"_enabled",!1);o(this,"_initialized",!1);o(this,"_n8ao");o(this,"_customEffects");o(this,"_basePass");o(this,"_gammaPass");o(this,"_depthTexture");o(this,"_settings",{gamma:!0,custom:!0,ao:!1});o(this,"_renderer");o(this,"_components");o(this,"_world");o(this,"_renderTarget");if(!s.renderer)throw new Error("The given world must have a renderer!");this._components=t,this._renderer=e,this._world=s,this._renderTarget=new v(window.innerWidth,window.innerHeight),this._renderTarget.texture.colorSpace="srgb-linear",this.composer=new U(e,this._renderTarget),this.composer.setSize(window.innerWidth,window.innerHeight)}get basePass(){if(!this._basePass)throw new Error("Custom effects not initialized!");return this._basePass}get gammaPass(){if(!this._gammaPass)throw new Error("Custom effects not initialized!");return this._gammaPass}get customEffects(){if(!this._customEffects)throw new Error("Custom effects not initialized!");return this._customEffects}get n8ao(){if(!this._n8ao)throw new Error("Custom effects not initialized!");return this._n8ao}get enabled(){return this._enabled}set enabled(t){this._initialized||this.initialize(),this._enabled=t}get settings(){return{...this._settings}}dispose(){var t,e,s,i;this._renderTarget.dispose(),(t=this._depthTexture)==null||t.dispose(),(e=this._customEffects)==null||e.dispose(),(s=this._gammaPass)==null||s.dispose(),(i=this._n8ao)==null||i.dispose()}setPasses(t){let e=!1;for(const s in t){const i=s;if(this.settings[i]!==t[i]){e=!0;break}}if(e){for(const s in t){const i=s;this._settings[i]!==void 0&&(this._settings[i]=t[i])}this.updatePasses()}}setSize(t,e){this._initialized&&(this.composer.setSize(t,e),this.basePass.setSize(t,e),this.n8ao.setSize(t,e),this.customEffects.setSize(t,e),this.gammaPass.setSize(t,e))}update(){this._enabled&&this.composer.render()}updateCamera(){const t=this._world.camera.three;this._n8ao&&(this._n8ao.camera=t),this._customEffects&&(this._customEffects.renderCamera=t),this._basePass&&(this._basePass.camera=t)}initialize(){if(!this._world.renderer)throw new Error("The given world must have a renderer!");const t=this._world.scene.three,e=this._world.camera.three;if(!(t instanceof w))throw new Error("The given scene must have a THREE.Scene as core!");this._world.camera instanceof G&&this._world.camera.projection.onChanged.add(()=>{this.updateCamera()});const s=this._world.renderer;this.overrideClippingPlanes||(this._renderer.clippingPlanes=s.clippingPlanes),this._renderer.outputColorSpace="srgb",this._renderer.toneMapping=V,this.newBasePass(t,e),this.newSaoPass(t,e),this.newGammaPass(),this.newCustomPass(t,e),this._initialized=!0,this.updatePasses()}updateProjection(t){this.composer.passes.forEach(e=>{e.camera=t}),this.update()}updatePasses(){for(const t of this.composer.passes)this.composer.removePass(t);this._basePass&&this.composer.addPass(this.basePass),this._settings.gamma&&this.composer.addPass(this.gammaPass),this._settings.ao&&this.composer.addPass(this.n8ao),this._settings.custom&&this.composer.addPass(this.customEffects)}newCustomPass(t,e){this._customEffects=new H(new m(window.innerWidth,window.innerHeight),this._components,this._world,t,e)}newGammaPass(){this._gammaPass=new D(I)}newSaoPass(t,e){if(!this._world.renderer)throw new Error("The given world must have a renderer!");const{width:s,height:i}=this._world.renderer.getSize();this._n8ao=new O(t,e,s,i);const{configuration:r}=this._n8ao;r.aoSamples=16,r.denoiseSamples=1,r.denoiseRadius=13,r.aoRadius=1,r.distanceFalloff=4,r.aoRadius=1,r.intensity=4,r.halfRes=!0,r.color=new _().setHex(13421772,"srgb-linear")}newBasePass(t,e){this._basePass=new F(t,e)}}class Z extends N{constructor(e,s,i){super(e,s,i);o(this,"_postproduction");this.onResize.add(r=>this.resizePostproduction(r)),this.onWorldChanged.add(()=>{this.currentWorld&&(this._postproduction&&this._postproduction.dispose(),this._postproduction=new $(e,this.three,this.currentWorld),this.setPostproductionSize())})}get postproduction(){if(!this._postproduction)throw new Error("Renderer not initialized yet with a world!");return this._postproduction}update(){if(!this.enabled||!this.currentWorld)return;this.onBeforeUpdate.trigger();const e=this.currentWorld.scene.three,s=this.currentWorld.camera.three;this.postproduction.enabled?this.postproduction.composer.render():this.three.render(e,s),e instanceof w&&this.three2D.render(e,s),this.onAfterUpdate.trigger()}dispose(){super.dispose(),this.postproduction.dispose()}resizePostproduction(e){this.postproduction&&this.setPostproductionSize(e)}setPostproductionSize(e){if(!this.container)return;const s=e?e.x:this.container.clientWidth,i=e?e.y:this.container.clientHeight;this.postproduction.setSize(s,i)}}export{Z as P}; diff --git a/examples/assets/index-Csb2AJ1X.js b/examples/assets/index-Csb2AJ1X.js new file mode 100644 index 000000000..bd0abed42 --- /dev/null +++ b/examples/assets/index-Csb2AJ1X.js @@ -0,0 +1 @@ +var c=Object.defineProperty;var _=(r,t,e)=>t in r?c(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var s=(r,t,e)=>(_(r,typeof t!="symbol"?t+"":t,e),e);import{M as p,G as g,B as b,c as m,g as u}from"./web-ifc-api-BiYij3qq.js";import{a as x}from"./index-B3b_h8A8.js";import{M as d}from"./mark-B9TqPH3U.js";import"./import-wrapper-prod-vMwJRSad.js";import{n as w}from"./dimension-mark-BiAWnjiH.js";const o=class o{constructor(t,e,i){s(this,"label");s(this,"boundingBox",new p);s(this,"world");s(this,"components");s(this,"_length");s(this,"_visible",!0);s(this,"_start");s(this,"_end");s(this,"_root",new g);s(this,"_endpoints",[]);s(this,"_line");this.components=t,this.world=e,this._start=i.start,this._end=i.end,this._length=this.getLength(),this._line=this.createLine(i),this.newEndpointElement(i.endpointElement),this.newEndpointElement(i.endpointElement.cloneNode(!0)),this.label=this.newText(),this._root.renderOrder=2,this.world.scene.three.add(this._root)}get visible(){return this._visible}set visible(t){this._visible=t,this.label.visible=t,this._endpoints[0].visible=t,this._endpoints[1].visible=t;const[e,i]=this._endpoints,n=e.three,h=i.three,l=this.label.three;t?(this.world.scene.three.add(this._root),this._root.add(l,n,h)):(l.removeFromParent(),n.removeFromParent(),h.removeFromParent(),this._root.removeFromParent())}get endPoint(){return this._end}set endPoint(t){this._end=t;const e=this._line.geometry.attributes.position;e.setXYZ(1,t.x,t.y,t.z),e.needsUpdate=!0,this._endpoints[1].three.position.copy(t),this.updateLabel()}get startPoint(){return this._start}set startPoint(t){this._start=t;const e=this._line.geometry.attributes.position;e.setXYZ(0,t.x,t.y,t.z),e.needsUpdate=!0,this._endpoints[0].three.position.copy(t),this.updateLabel()}get _center(){let t=this._end.clone().sub(this._start);const e=t.length()*.5;return t=t.normalize().multiplyScalar(e),this._start.clone().add(t)}dispose(){const t=this.components.get(x);this.visible=!1,t.destroy(this._root),t.destroy(this._line);for(const e of this._endpoints)e.dispose();this._endpoints.length=0,this.label.dispose(),this.boundingBox&&t.destroy(this.boundingBox),this.components=null}createBoundingBox(){this.boundingBox.geometry=new b(1,1,this._length),this.boundingBox.position.copy(this._center),this.boundingBox.lookAt(this._end),this.boundingBox.visible=!1,this._root.add(this.boundingBox)}toggleLabel(){this.label.toggleVisibility()}newEndpointElement(t){const i=this._endpoints.length===0?this._start:this._end,n=new d(this.world,t);n.three.position.copy(i),this._endpoints.push(n),this._root.add(n.three)}updateLabel(){this._length=this.getLength(),this.label.three.element.textContent=this.getTextContent(),this.label.three.position.copy(this._center),this._line.computeLineDistances()}createLine(t){const e=new m;e.setFromPoints([t.start,t.end]);const i=new u(e,t.lineMaterial);return this._root.add(i),i}newText(){const t=w();t.textContent=this.getTextContent();const e=new d(this.world,t);return e.three.position.copy(this._center),this._root.add(e.three),e}getTextContent(){return`${this._length/o.scale} ${o.units}`}getLength(){return parseFloat(this._start.distanceTo(this._end).toFixed(2))}};s(o,"scale",1),s(o,"units","m");let a=o;export{a as S}; diff --git a/examples/assets/index-D_3pJs_2.js b/examples/assets/index-D_3pJs_2.js new file mode 100644 index 000000000..f328660da --- /dev/null +++ b/examples/assets/index-D_3pJs_2.js @@ -0,0 +1 @@ +var u=Object.defineProperty;var c=(r,e,t)=>e in r?u(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var i=(r,e,t)=>(c(r,typeof e!="symbol"?e+"":e,t),t);import{E as n,C as l}from"./index-DsPLPeA6.js";import{f as p,z as m}from"./web-ifc-api-BiYij3qq.js";class f{constructor(e){i(this,"_event");i(this,"_position",new p);i(this,"onDisposed",new n);i(this,"updateMouseInfo",e=>{this._event=e});this.dom=e,this.setupEvents(!0)}get position(){if(this._event){const e=this.dom.getBoundingClientRect();this._position.x=this.getPositionX(e,this._event),this._position.y=this.getPositionY(e,this._event)}return this._position}dispose(){this.setupEvents(!1),this.onDisposed.trigger(),this.onDisposed.reset()}getPositionY(e,t){return-((t.clientY-e.top)/(e.bottom-e.top))*2+1}getPositionX(e,t){return(t.clientX-e.left)/(e.right-e.left)*2-1}setupEvents(e){e?this.dom.addEventListener("mousemove",this.updateMouseInfo):this.dom.removeEventListener("mousemove",this.updateMouseInfo)}}class g{constructor(e,t){i(this,"enabled",!0);i(this,"components");i(this,"onDisposed",new n);i(this,"mouse");i(this,"three",new m);i(this,"world");const s=t.renderer;if(!s)throw new Error("A renderer is needed for the raycaster to work!");this.world=t,this.mouse=new f(s.three.domElement),this.components=e}dispose(){this.mouse.dispose(),this.onDisposed.trigger(),this.onDisposed.reset()}castRay(e=Array.from(this.world.meshes)){if(!this.world)throw new Error("A world is needed to cast rays!");const t=this.world.camera.three;return this.three.setFromCamera(this.mouse.position,t),this.intersect(e)}castRayFromVector(e,t,s=Array.from(this.world.meshes)){return this.three.set(e,t),this.intersect(s)}intersect(e=Array.from(this.world.meshes)){const t=this.three.intersectObjects(e),s=this.filterClippingPlanes(t);return s.length>0?s[0]:null}filterClippingPlanes(e){if(!this.world.renderer)throw new Error("Renderer not found!");const t=this.world.renderer.three;if(!t.clippingPlanes)return e;const s=t.clippingPlanes;return e.length<=0||!s||(s==null?void 0:s.length)<=0?e:e.filter(d=>s.every(a=>a.distanceToPoint(d.point)>0))}}const o=class o extends l{constructor(t){super(t);i(this,"enabled",!0);i(this,"list",new Map);i(this,"onDisposed",new n);t.add(o.uuid,this)}get(t){if(this.list.has(t.uuid))return this.list.get(t.uuid);const s=new g(this.components,t);return this.list.set(t.uuid,s),t.onDisposed.add(()=>{this.delete(t)}),s}delete(t){const s=this.list.get(t.uuid);s&&s.dispose(),this.list.delete(t.uuid)}dispose(){for(const[t,s]of this.list)s.dispose();this.list.clear(),this.onDisposed.trigger()}};i(o,"uuid","d5d8bdf0-db25-4952-b951-b643af207ace");let h=o;export{h as R}; diff --git a/examples/assets/index-DsPLPeA6.js b/examples/assets/index-DsPLPeA6.js new file mode 100644 index 000000000..5293476e6 --- /dev/null +++ b/examples/assets/index-DsPLPeA6.js @@ -0,0 +1,10 @@ +var qs=Object.defineProperty;var Ws=(n,e,t)=>e in n?qs(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var L=(n,e,t)=>(Ws(n,typeof e!="symbol"?e+"":e,t),t);import{e as Bs,V as S,f as ht,P as zs,r as lt,T as Qt,y as Fs,a as ut,p as st,aO as $s,K as Ks,ar as is,M as Rs,as as Qs,u as Gs,c as ns,C as Pe,n as js,a_ as Js,a$ as ti,ah as os,o as ei,at as si,au as ii,v as ni,Q as oi,av as ri,z as ai,h as ci}from"./web-ifc-api-BiYij3qq.js";const Is=0,li=1,hi=2,rs=2,ve=1.25,as=1,Te=6*4+4+4,Ce=65535,ui=Math.pow(2,-24),Ue=Symbol("SKIP_GENERATION");function fi(n){return n.index?n.index.count:n.attributes.position.count}function zt(n){return fi(n)/3}function di(n,e=ArrayBuffer){return n>65535?new Uint32Array(new e(4*n)):new Uint16Array(new e(2*n))}function pi(n,e){if(!n.index){const t=n.attributes.position.count,s=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,i=di(t,s);n.setIndex(new Bs(i,1));for(let r=0;r a-c);for(let a=0;a r.offset-o.offset),s=t[t.length-1];s.count=Math.min(e-s.offset,s.count);let i=0;return t.forEach(({count:r})=>i+=r),e!==i}function Y(n,e,t){return t.min.x=e[n],t.min.y=e[n+1],t.min.z=e[n+2],t.max.x=e[n+3],t.max.y=e[n+4],t.max.z=e[n+5],t}function mi(n){n[0]=n[1]=n[2]=1/0,n[3]=n[4]=n[5]=-1/0}function cs(n){let e=-1,t=-1/0;for(let s=0;s<3;s++){const i=n[s+3]-n[s];i>t&&(t=i,e=s)}return e}function ls(n,e){e.set(n)}function hs(n,e,t){let s,i;for(let r=0;r<3;r++){const o=r+3;s=n[r],i=e[r],t[r]=si?s:i}}function te(n,e,t){for(let s=0;s<3;s++){const i=e[n+2*s],r=e[n+2*s+1],o=i-r,a=i+r;o t[s+3]&&(t[s+3]=a)}}function Ht(n){const e=n[3]-n[0],t=n[4]-n[1],s=n[5]-n[2];return 2*(e*t+t*s+s*e)}function Le(n,e,t,s,i=null){let r=1/0,o=1/0,a=1/0,c=-1/0,d=-1/0,f=-1/0,u=1/0,l=1/0,p=1/0,y=-1/0,O=-1/0,T=-1/0;const m=i!==null;for(let g=e*6,E=(e+t)*6;g c&&(c=w),m&&hy&&(y=h);const C=n[g+2],b=n[g+3],P=C-b,U=C+b;P d&&(d=U),m&&C O&&(O=C);const v=n[g+4],D=n[g+5],M=v-D,R=v+D;Mf&&(f=R),m&&v T&&(T=v)}s[0]=r,s[1]=o,s[2]=a,s[3]=c,s[4]=d,s[5]=f,m&&(i[0]=u,i[1]=l,i[2]=p,i[3]=y,i[4]=O,i[5]=T)}function yi(n,e,t,s){let i=1/0,r=1/0,o=1/0,a=-1/0,c=-1/0,d=-1/0;for(let f=e*6,u=(e+t)*6;fa&&(a=l);const p=n[f+2];p
c&&(c=p);const y=n[f+4];y d&&(d=y)}s[0]=i,s[1]=r,s[2]=o,s[3]=a,s[4]=c,s[5]=d}function gi(n,e){mi(e);const t=n.attributes.position,s=n.index?n.index.array:null,i=zt(n),r=new Float32Array(i*6),o=t.normalized,a=t.array,c=t.offset||0;let d=3;t.isInterleavedBufferAttribute&&(d=t.data.stride);const f=["getX","getY","getZ"];for(let u=0;ux&&(x=E),h>x&&(x=h);const w=(x-_)/2,C=m*2;r[p+C+0]=_+w,r[p+C+1]=w+(Math.abs(_)+w)*ui,_ e[m+3]&&(e[m+3]=x)}}return r}const ct=32,Ti=(n,e)=>n.candidate-e.candidate,dt=new Array(ct).fill().map(()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0})),ee=new Float32Array(6);function Ei(n,e,t,s,i,r){let o=-1,a=0;if(r===Is)o=cs(e),o!==-1&&(a=(e[o]+e[o+3])/2);else if(r===li)o=cs(n),o!==-1&&(a=xi(t,s,i,o));else if(r===hi){const c=Ht(n);let d=ve*i;const f=s*6,u=(s+i)*6;for(let l=0;l<3;l++){const p=e[l],T=(e[l+3]-p)/ct;if(i =w.candidate?te(h,t,w.rightCacheBounds):(te(h,t,w.leftCacheBounds),w.count++)}}for(let h=0;h =ct&&(x=ct-1);const w=dt[x];w.count++,te(E,t,w.bounds)}const m=dt[ct-1];ls(m.bounds,m.rightCacheBounds);for(let E=ct-2;E>=0;E--){const h=dt[E],_=dt[E+1];hs(h.bounds,_.rightCacheBounds,h.rightCacheBounds)}let g=0;for(let E=0;E =c;)a--;if(o=c;)a--;if(o2**16,i=s?4:2,r=e?new SharedArrayBuffer(t*i):new ArrayBuffer(t*i),o=s?new Uint32Array(r):new Uint16Array(r);for(let a=0,c=o.length;a =i&&(u=!0,r&&(console.warn(`MeshBVH: Max depth of ${i} reached when generating BVH. Consider increasing maxDepth.`),console.warn(t))),x<=o||C>=i)return g(_+x),h.offset=_,h.count=x,h;const b=Ei(h.boundingData,w,y,_,x,a);if(b.axis===-1)return g(_+x),h.offset=_,h.count=x,h;const P=O(f,s,y,_,x,b);if(P===_||P===_+x)g(_+x),h.offset=_,h.count=x;else{h.splitAxis=b.axis;const U=new se,v=_,D=P-_;h.left=U,U.boundingData=new Float32Array(6),Le(y,v,D,U.boundingData,p),E(U,v,D,p,C+1);const M=new se,R=P,N=x-D;h.right=M,M.boundingData=new Float32Array(6),Le(y,R,N,M.boundingData,p),E(M,R,N,p,C+1)}return h}}function bi(n,e){const t=n.geometry;e.indirect&&(n._indirectBuffer=Ai(t,e.useSharedArrayBuffer),_i(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.')),n._indirectBuffer||pi(t,e);const s=Ci(n,e);let i,r,o;const a=[],c=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;for(let u=0;u Math.pow(2,32))throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return r[p+6]=h/4,h=f(h,g),r[p+7]=E,h}}}class ft{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(e,t){let s=1/0,i=-1/0;for(let r=0,o=e.length;r i?c:i}this.min=s,this.max=i}setFromPoints(e,t){let s=1/0,i=-1/0;for(let r=0,o=t.length;r i?c:i}this.min=s,this.max=i}isSeparated(e){return this.min>e.max||e.min>this.max}}ft.prototype.setFromBox=function(){const n=new S;return function(t,s){const i=s.min,r=s.max;let o=1/0,a=-1/0;for(let c=0;c<=1;c++)for(let d=0;d<=1;d++)for(let f=0;f<=1;f++){n.x=i.x*c+r.x*(1-c),n.y=i.y*d+r.y*(1-d),n.z=i.z*f+r.z*(1-f);const u=t.dot(n);o=Math.min(u,o),a=Math.max(u,a)}this.min=o,this.max=a}}();const Pi=function(){const n=new S,e=new S,t=new S;return function(i,r,o){const a=i.start,c=n,d=r.start,f=e;t.subVectors(a,d),n.subVectors(i.end,i.start),e.subVectors(r.end,r.start);const u=t.dot(f),l=f.dot(c),p=f.dot(f),y=t.dot(c),T=c.dot(c)*p-l*l;let m,g;T!==0?m=(u*l-y*p)/T:m=0,g=(u+m*l)/p,o.x=m,o.y=g}}(),je=function(){const n=new ht,e=new S,t=new S;return function(i,r,o,a){Pi(i,r,n);let c=n.x,d=n.y;if(c>=0&&c<=1&&d>=0&&d<=1){i.at(c,o),r.at(d,a);return}else if(c>=0&&c<=1){d<0?r.at(0,a):r.at(1,a),i.closestPointToPoint(a,!0,o);return}else if(d>=0&&d<=1){c<0?i.at(0,o):i.at(1,o),r.closestPointToPoint(o,!0,a);return}else{let f;c<0?f=i.start:f=i.end;let u;d<0?u=r.start:u=r.end;const l=e,p=t;if(i.closestPointToPoint(u,!0,e),r.closestPointToPoint(f,!0,t),l.distanceToSquared(u)<=p.distanceToSquared(f)){o.copy(l),a.copy(u);return}else{o.copy(f),a.copy(p);return}}}}(),vi=function(){const n=new S,e=new S,t=new zs,s=new lt;return function(r,o){const{radius:a,center:c}=r,{a:d,b:f,c:u}=o;if(s.start=d,s.end=f,s.closestPointToPoint(c,!0,n).distanceTo(c)<=a||(s.start=d,s.end=u,s.closestPointToPoint(c,!0,n).distanceTo(c)<=a)||(s.start=f,s.end=u,s.closestPointToPoint(c,!0,n).distanceTo(c)<=a))return!0;const O=o.getPlane(t);if(Math.abs(O.distanceToPoint(c))<=a){const m=O.projectPoint(c,e);if(o.containsPoint(m))return!0}return!1}}(),Ui=1e-15;function De(n){return Math.abs(n) new S),this.satBounds=new Array(4).fill().map(()=>new ft),this.points=[this.a,this.b,this.c],this.sphere=new Fs,this.plane=new zs,this.needsUpdate=!0}intersectsSphere(e){return vi(e,this)}update(){const e=this.a,t=this.b,s=this.c,i=this.points,r=this.satAxes,o=this.satBounds,a=r[0],c=o[0];this.getNormal(a),c.setFromPoints(a,i);const d=r[1],f=o[1];d.subVectors(e,t),f.setFromPoints(d,i);const u=r[2],l=o[2];u.subVectors(t,s),l.setFromPoints(u,i);const p=r[3],y=o[3];p.subVectors(s,e),y.setFromPoints(p,i),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(a,e),this.needsUpdate=!1}}ot.prototype.closestPointToSegment=function(){const n=new S,e=new S,t=new lt;return function(i,r=null,o=null){const{start:a,end:c}=i,d=this.points;let f,u=1/0;for(let l=0;l<3;l++){const p=(l+1)%3;t.start.copy(d[l]),t.end.copy(d[p]),je(t,i,n,e),f=n.distanceToSquared(e),f=2){(h===1?m.start:m.end).copy(p),E=2;break}if(E++,E===2&&h===-1)break}}return E}return function(T,m=null,g=!1){this.needsUpdate&&this.update(),T.isExtendedTriangle?T.needsUpdate&&T.update():(n.copy(T),n.update(),T=n);const E=this.plane,h=T.plane;if(Math.abs(E.normal.dot(h.normal))>1-1e-10){const _=this.satBounds,x=this.satAxes;t[0]=T.a,t[1]=T.b,t[2]=T.c;for(let b=0;b<4;b++){const P=_[b],U=x[b];if(s.setFromPoints(U,t),P.isSeparated(s))return!1}const w=T.satBounds,C=T.satAxes;e[0]=this.a,e[1]=this.b,e[2]=this.c;for(let b=0;b<4;b++){const P=w[b],U=C[b];if(s.setFromPoints(U,e),P.isSeparated(s))return!1}for(let b=0;b<4;b++){const P=x[b];for(let U=0;U<4;U++){const v=C[U];if(r.crossVectors(P,v),s.setFromPoints(r,e),i.setFromPoints(r,t),s.isSeparated(i))return!1}}return m&&(g||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),m.start.set(0,0,0),m.end.set(0,0,0)),!0}else{const _=y(this,h,u);if(_===1&&T.containsPoint(u.end))return m&&(m.start.copy(u.end),m.end.copy(u.end)),!0;if(_!==2)return!1;const x=y(T,E,l);if(x===1&&this.containsPoint(l.end))return m&&(m.start.copy(l.end),m.end.copy(l.end)),!0;if(x!==2)return!1;if(u.delta(a),l.delta(c),a.dot(c)<0){let D=l.start;l.start=l.end,l.end=D}const w=u.start.dot(a),C=u.end.dot(a),b=l.start.dot(a),P=l.end.dot(a),U=C0?m.start.copy(u.start):m.start.copy(l.start),d.subVectors(u.end,l.end),d.dot(a)<0?m.end.copy(u.end):m.end.copy(l.end)),!0)}}}();ot.prototype.distanceToPoint=function(){const n=new S;return function(t){return this.closestPointToPoint(t,n),t.distanceTo(n)}}();ot.prototype.distanceToTriangle=function(){const n=new S,e=new S,t=["a","b","c"],s=new lt,i=new lt;return function(o,a=null,c=null){const d=a||c?s:null;if(this.intersectsTriangle(o,d))return(a||c)&&(a&&d.getCenter(a),c&&d.getCenter(c)),0;let f=1/0;for(let u=0;u<3;u++){let l;const p=t[u],y=o[p];this.closestPointToPoint(y,n),l=y.distanceToSquared(n),l new S),this.satAxes=new Array(3).fill().map(()=>new S),this.satBounds=new Array(3).fill().map(()=>new ft),this.alignedSatBounds=new Array(3).fill().map(()=>new ft),this.needsUpdate=!1,e&&this.min.copy(e),t&&this.max.copy(t),s&&this.matrix.copy(s)}set(e,t,s){this.min.copy(e),this.max.copy(t),this.matrix.copy(s),this.needsUpdate=!0}copy(e){this.min.copy(e.min),this.max.copy(e.max),this.matrix.copy(e.matrix),this.needsUpdate=!0}}W.prototype.update=function(){return function(){const e=this.matrix,t=this.min,s=this.max,i=this.points;for(let d=0;d<=1;d++)for(let f=0;f<=1;f++)for(let u=0;u<=1;u++){const l=1*d|2*f|4*u,p=i[l];p.x=d?s.x:t.x,p.y=f?s.y:t.y,p.z=u?s.z:t.z,p.applyMatrix4(e)}const r=this.satBounds,o=this.satAxes,a=i[0];for(let d=0;d<3;d++){const f=o[d],u=r[d],l=1< new lt),t=new Array(12).fill().map(()=>new lt),s=new S,i=new S;return function(o,a=0,c=null,d=null){if(this.needsUpdate&&this.update(),this.intersectsBox(o))return(c||d)&&(o.getCenter(i),this.closestPointToPoint(i,s),o.closestPointToPoint(s,i),c&&c.copy(s),d&&d.copy(i)),0;const f=a*a,u=o.min,l=o.max,p=this.points;let y=1/0;for(let T=0;T<8;T++){const m=p[T];i.copy(m).clamp(u,l);const g=m.distanceToSquared(i);if(g new ot)}}const j=new Li;function K(n,e){return e[n+15]===65535}function Q(n,e){return e[n+6]}function J(n,e){return e[n+14]}function tt(n){return n+8}function et(n,e){return e[n+6]}function Vs(n,e){return e[n+7]}class Di{constructor(){this.float32Array=null,this.uint16Array=null,this.uint32Array=null;const e=[];let t=null;this.setBuffer=s=>{t&&e.push(t),t=s,this.float32Array=new Float32Array(s),this.uint16Array=new Uint16Array(s),this.uint32Array=new Uint32Array(s)},this.clearBuffer=()=>{t=null,this.float32Array=null,this.uint16Array=null,this.uint32Array=null,e.length!==0&&this.setBuffer(e.pop())}}}const V=new Di;let mt,Bt;const Et=[],ie=new Je(()=>new st);function Si(n,e,t,s,i,r){mt=ie.getPrimitive(),Bt=ie.getPrimitive(),Et.push(mt,Bt),V.setBuffer(n._roots[e]);const o=Xe(0,n.geometry,t,s,i,r);V.clearBuffer(),ie.releasePrimitive(mt),ie.releasePrimitive(Bt),Et.pop(),Et.pop();const a=Et.length;return a>0&&(Bt=Et[a-1],mt=Et[a-2]),o}function Xe(n,e,t,s,i=null,r=0,o=0){const{float32Array:a,uint16Array:c,uint32Array:d}=V;let f=n*2;if(K(f,c)){const l=Q(n,d),p=J(f,c);return Y(n,a,mt),s(l,p,!1,o,r+n,mt)}else{let P=function(v){const{uint16Array:D,uint32Array:M}=V;let R=v*2;for(;!K(R,D);)v=tt(v),R=v*2;return Q(v,M)},U=function(v){const{uint16Array:D,uint32Array:M}=V;let R=v*2;for(;!K(R,D);)v=et(v,M),R=v*2;return Q(v,M)+J(R,D)};const l=tt(n),p=et(n,d);let y=l,O=p,T,m,g,E;if(i&&(g=mt,E=Bt,Y(y,a,g),Y(O,a,E),T=i(g),m=i(E),m (kt.copy(e).clamp(f.min,f.max),kt.distanceToSquared(e)),intersectsBounds:(f,u,l)=>l{f.closestPointToPoint(e,kt);const l=e.distanceToSquared(kt);return l0&&d.normal.multiplyScalar(-1));const f={a:r,b:o,c:a,normal:new S,materialIndex:0};Qt.getNormal(xt,wt,Ot,f.normal),d.face=f,d.faceIndex=r}return d}function be(n,e,t,s,i){const r=s*3;let o=r+0,a=r+1,c=r+2;const d=n.index;n.index&&(o=d.getX(o),a=d.getX(a),c=d.getX(c));const{position:f,normal:u,uv:l,uv1:p}=n.attributes,y=zi(t,f,u,l,p,o,a,c,e);return y?(y.faceIndex=s,i&&i.push(y),y):null}function q(n,e,t,s){const i=n.a,r=n.b,o=n.c;let a=e,c=e+1,d=e+2;t&&(a=t.getX(a),c=t.getX(c),d=t.getX(d)),i.x=s.getX(a),i.y=s.getY(a),i.z=s.getZ(a),r.x=s.getX(c),r.y=s.getY(c),r.z=s.getZ(c),o.x=s.getX(d),o.y=s.getY(d),o.z=s.getZ(d)}function Fi(n,e,t,s,i,r){const{geometry:o,_indirectBuffer:a}=n;for(let c=s,d=s+i;c x&&(x=v),D w&&(w=D),M<_&&(_=M),M>C&&(C=M)}return c[l+0]!==E||c[l+1]!==h||c[l+2]!==_||c[l+3]!==x||c[l+4]!==w||c[l+5]!==C?(c[l+0]=E,c[l+1]=h,c[l+2]=_,c[l+3]=x,c[l+4]=w,c[l+5]=C,!0):!1}else{const m=l+8,g=o[l+6],E=m+p,h=g+p;let _=y,x=!1,w=!1;e?_||(x=e.has(E),w=e.has(h),_=!x&&!w):(x=!0,w=!0);const C=_||x,b=_||w;let P=!1;C&&(P=u(m,p,_));let U=!1;b&&(U=u(g,p,_));const v=P||U;if(v)for(let D=0;D<3;D++){const M=m+D,R=g+D,N=c[M],Ft=c[M+3],Rt=c[R],It=c[R+3];c[l+D]=N