From f373e0c0797e1800bf066fdfbb748bb9242230f6 Mon Sep 17 00:00:00 2001
From: wangjuncheng <1>
Date: 星期二, 08 七月 2025 17:46:02 +0800
Subject: [PATCH] 泥位计

---
 public/CimSDK/Workers/createPolygonGeometry.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/public/CimSDK/Workers/createPolygonGeometry.js b/public/CimSDK/Workers/createPolygonGeometry.js
index 4b6b419..165ec74 100644
--- a/public/CimSDK/Workers/createPolygonGeometry.js
+++ b/public/CimSDK/Workers/createPolygonGeometry.js
@@ -1,6 +1,6 @@
 /**
  * SmartEarth WebSDK - https://websdk.terra-it.cn
- * Version 5.3.1
+ * Version 5.4.1
  */
 
-import{a as pt}from"./chunk-LZCCFKBI.js";import{a as F}from"./chunk-GN3R6MXA.js";import{a as lt}from"./chunk-3B3UDCHP.js";import{a as ct}from"./chunk-S5MWIP3D.js";import{a as At}from"./chunk-OOGG7EHS.js";import"./chunk-EZRSLM27.js";import"./chunk-E5FOJ77O.js";import{a as ut}from"./chunk-55FFQILS.js";import{a as q}from"./chunk-32UDSAPU.js";import{a as tt}from"./chunk-TBSK33NR.js";import"./chunk-LSAUAD4X.js";import{a as Pt,b as it}from"./chunk-VDNLYVKB.js";import"./chunk-EX67AA2G.js";import"./chunk-V5KKODOM.js";import{a as bt,b as Ot}from"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import{a as ft}from"./chunk-563CJZT3.js";import"./chunk-LH4TAMBV.js";import{c as gt,d as $}from"./chunk-WI5KIEME.js";import{d as yt}from"./chunk-ZPW6H6BB.js";import{f as ht,i as wt}from"./chunk-HMXXHGCW.js";import{a as X}from"./chunk-NFDMGE7Q.js";import{b as c,c as nt,d as A,e as V,f as U}from"./chunk-VDZXURWO.js";import{a as l}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as L}from"./chunk-5HWP5DW7.js";import{a as dt,b as Y}from"./chunk-3K67FZLU.js";import{e as P}from"./chunk-55TU6MJR.js";function O(t,e){this.position=t,P(this.position)||(this.position=new A),this.tangentPlane=e,P(this.tangentPlane)||(this.tangentPlane=O.NORTH_POLE_TANGENT_PLANE)}Object.defineProperties(O.prototype,{ellipsoid:{get:function(){return this.tangentPlane.ellipsoid}},x:{get:function(){return this.position.x}},y:{get:function(){return this.position.y}},conformalLatitude:{get:function(){let t=A.magnitude(this.position),e=2*this.ellipsoid.maximumRadius;return this.tangentPlane.plane.normal.z*(l.PI_OVER_TWO-2*Math.atan2(t,e))}},longitude:{get:function(){let t=l.PI_OVER_TWO+Math.atan2(this.y,this.x);return t>Math.PI&&(t-=l.TWO_PI),t}}});var rt=new nt,Ft=new c;O.prototype.getLatitude=function(t){P(t)||(t=V.default),rt.latitude=this.conformalLatitude,rt.longitude=this.longitude,rt.height=0;let e=this.ellipsoid.cartographicToCartesian(rt,Ft);return t.cartesianToCartographic(e,rt),rt.latitude};var vt=new bt,St=new c,Vt=new c;O.fromCartesian=function(t,e){Y.defined("cartesian",t);let o=l.signNotZero(t.z),n=O.NORTH_POLE_TANGENT_PLANE,s=O.SOUTH_POLE;o<0&&(n=O.SOUTH_POLE_TANGENT_PLANE,s=O.NORTH_POLE);let i=vt;i.origin=n.ellipsoid.scaleToGeocentricSurface(t,i.origin),i.direction=c.subtract(i.origin,s,St),c.normalize(i.direction,i.direction);let r=Ot.rayPlane(i,n.plane,Vt),f=c.subtract(r,s,r),m=c.dot(n.xAxis,f),g=o*c.dot(n.yAxis,f);return P(e)?(e.position=new A(m,g),e.tangentPlane=n,e):new O(new A(m,g),n)};O.fromCartesianArray=function(t,e){Y.defined("cartesians",t);let o=t.length;P(e)?e.length=o:e=new Array(o);for(let n=0;n<o;n++)e[n]=O.fromCartesian(t[n],e[n]);return e};O.clone=function(t,e){if(P(t))return P(e)?(e.position=t.position,e.tangentPlane=t.tangentPlane,e):new O(t.position,t.tangentPlane)};O.HALF_UNIT_SPHERE=Object.freeze(new V(.5,.5,.5));O.NORTH_POLE=Object.freeze(new c(0,0,.5));O.SOUTH_POLE=Object.freeze(new c(0,0,-.5));O.NORTH_POLE_TANGENT_PLANE=Object.freeze(new tt(O.NORTH_POLE,O.HALF_UNIT_SPHERE));O.SOUTH_POLE_TANGENT_PLANE=Object.freeze(new tt(O.SOUTH_POLE,O.HALF_UNIT_SPHERE));var z=O;var Bt=new nt,Et=new nt;function Mt(t,e,o,n){let i=n.cartesianToCartographic(t,Bt).height,r=n.cartesianToCartographic(e,Et);r.height=i,n.cartographicToCartesian(r,e);let f=n.cartesianToCartographic(o,Et);f.height=i-100,n.cartographicToCartesian(f,o)}var Ht=new pt,jt=new c,kt=new c,zt=new c,Dt=new c,Ut=new c,Wt=new c,mt=new c,Q=new c,st=new c,Gt=new A,Yt=new A,qt=new c,xt=new ht,Qt=new U,Zt=new U;function _t(t){let e=t.vertexFormat,o=t.geometry,n=t.shadowVolume,s=o.attributes.position.values,i=P(o.attributes.st)?o.attributes.st.values:void 0,r=s.length,f=t.wall,m=t.top||f,g=t.bottom||f;if(e.st||e.normal||e.tangent||e.bitangent||n){let w=t.boundingRectangle,a=t.rotationAxis,H=t.projectTo2d,x=t.ellipsoid,M=t.stRotation,C=t.perPositionHeight,R=Gt;R.x=w.x,R.y=w.y;let B=e.st?new Float32Array(2*(r/3)):void 0,_=new Float32Array(r/3),Z=0,y;e.normal&&(C&&m&&!f?y=o.attributes.normal.values:y=new Float32Array(r));let T=e.tangent?new Float32Array(r):void 0,d=e.bitangent?new Float32Array(r):void 0,k=n?new Float32Array(r):void 0,D=0,u=0,h=kt,p=zt,I=Dt,at=!0,N=Qt,E=Zt;if(M!==0){let j=ht.fromAxisAngle(a,M,xt);N=U.fromQuaternion(j,N),j=ht.fromAxisAngle(a,-M,xt),E=U.fromQuaternion(j,E)}else N=U.clone(U.IDENTITY,N),E=U.clone(U.IDENTITY,E);let b=0,K=0;m&&g&&(b=r/2,K=r/3,r/=2);for(let j=0;j<r;j+=3){let J=c.fromArray(s,j,qt);if(e.st&&!P(i)){let v=U.multiplyByVector(N,J,jt);v=x.scaleToGeodeticSurface(v,v);let S=H([v],Yt)[0];A.subtract(S,R,S);let et=l.clamp(S.x/w.width,0,1),ot=l.clamp(S.y/w.height,0,1);g&&(B[D+K]=et,B[D+1+K]=ot),m&&(B[D]=et,B[D+1]=ot);let Lt=nt.fromCartesian(J);_[Z++]=Math.floor(Lt.height+1e-5),D+=2}if(e.normal||e.tangent||e.bitangent||n){let v=u+1,S=u+2;if(f){if(j+3<r){let et=c.fromArray(s,j+3,Ut);if(at){let ot=c.fromArray(s,j+r,Wt);C&&Mt(J,et,ot,x),c.subtract(et,J,et),c.subtract(ot,J,ot),h=c.normalize(c.cross(ot,et,h),h),at=!1}c.equalsEpsilon(et,J,l.EPSILON10)&&(at=!0)}(e.tangent||e.bitangent)&&(I=x.geodeticSurfaceNormal(J,I),e.tangent&&(p=c.normalize(c.cross(I,h,p),p)))}else h=x.geodeticSurfaceNormal(J,h),(e.tangent||e.bitangent)&&(C&&(mt=c.fromArray(y,u,mt),Q=c.cross(c.UNIT_Z,mt,Q),Q=c.normalize(U.multiplyByVector(E,Q,Q),Q),e.bitangent&&(st=c.normalize(c.cross(mt,Q,st),st))),p=c.cross(c.UNIT_Z,h,p),p=c.normalize(U.multiplyByVector(E,p,p),p),e.bitangent&&(I=c.normalize(c.cross(h,p,I),I)));e.normal&&(t.wall?(y[u+b]=h.x,y[v+b]=h.y,y[S+b]=h.z):g&&(y[u+b]=-h.x,y[v+b]=-h.y,y[S+b]=-h.z),(m&&!C||f)&&(y[u]=h.x,y[v]=h.y,y[S]=h.z)),n&&(f&&(h=x.geodeticSurfaceNormal(J,h)),k[u+b]=-h.x,k[v+b]=-h.y,k[S+b]=-h.z),e.tangent&&(t.wall?(T[u+b]=p.x,T[v+b]=p.y,T[S+b]=p.z):g&&(T[u+b]=-p.x,T[v+b]=-p.y,T[S+b]=-p.z),m&&(C?(T[u]=Q.x,T[v]=Q.y,T[S]=Q.z):(T[u]=p.x,T[v]=p.y,T[S]=p.z))),e.bitangent&&(g&&(d[u+b]=I.x,d[v+b]=I.y,d[S+b]=I.z),m&&(C?(d[u]=st.x,d[v]=st.y,d[S]=st.z):(d[u]=I.x,d[v]=I.y,d[S]=I.z))),u+=3}}e.st&&!P(i)&&(o.attributes.st=new $({componentDatatype:X.FLOAT,componentsPerAttribute:2,values:B}),o.attributes.height=new $({componentDatatype:X.FLOAT,componentsPerAttribute:1,values:_})),e.normal&&(o.attributes.normal=new $({componentDatatype:X.FLOAT,componentsPerAttribute:3,values:y})),e.tangent&&(o.attributes.tangent=new $({componentDatatype:X.FLOAT,componentsPerAttribute:3,values:T})),e.bitangent&&(o.attributes.bitangent=new $({componentDatatype:X.FLOAT,componentsPerAttribute:3,values:d})),n&&(o.attributes.extrudeDirection=new $({componentDatatype:X.FLOAT,componentsPerAttribute:3,values:k}))}if(t.extrude&&P(t.offsetAttribute)){let w=s.length/3,a=new Uint8Array(w);if(t.offsetAttribute===ut.TOP)m&&g||f?a=a.fill(1,0,w/2):m&&(a=a.fill(1));else{let H=t.offsetAttribute===ut.NONE?0:1;a=a.fill(H)}o.attributes.applyOffset=new $({componentDatatype:X.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}return o}var Ct=[];function Kt(t,e,o,n,s,i,r,f,m,g){let w={walls:[]},a;if(r||f){let _=F.createGeometryFromPositions(t,e,o,n,i,m,g),Z=_.attributes.position.values,y=_.indices,T,d;if(r&&f){let k=Z.concat(Z);T=k.length/3,d=ft.createTypedArray(T,y.length*2),d.set(y);let D=y.length,u=T/2;for(a=0;a<D;a+=3){let h=d[a]+u,p=d[a+1]+u,I=d[a+2]+u;d[a+D]=I,d[a+1+D]=p,d[a+2+D]=h}if(_.attributes.position.values=k,i&&m.normal){let h=_.attributes.normal.values;_.attributes.normal.values=new Float32Array(k.length),_.attributes.normal.values.set(h)}if(m.st&&P(o)){let h=_.attributes.st.values;_.attributes.st.values=new Float32Array(T*2),_.attributes.st.values=h.concat(h)}_.indices=d}else if(f){for(T=Z.length/3,d=ft.createTypedArray(T,y.length),a=0;a<y.length;a+=3)d[a]=y[a+2],d[a+1]=y[a+1],d[a+2]=y[a];_.indices=d}w.topAndBottom=new ct({geometry:_})}let H=s.outerRing,x=tt.fromPoints(H,t),M=x.projectPointsOntoPlane(H,Ct),C=it.computeWindingOrder2D(M);C===Pt.CLOCKWISE&&(H=H.slice().reverse());let R=F.computeWallGeometry(H,o,t,n,i,g);w.walls.push(new ct({geometry:R}));let B=s.holes;for(a=0;a<B.length;a++){let _=B[a];M=x.projectPointsOntoPlane(_,Ct),C=it.computeWindingOrder2D(M),C===Pt.COUNTER_CLOCKWISE&&(_=_.slice().reverse()),R=F.computeWallGeometry(_,o,t,n,i,g),w.walls.push(new ct({geometry:R}))}return w}function G(t){if(Y.typeOf.object("options",t),Y.typeOf.object("options.polygonHierarchy",t.polygonHierarchy),P(t.perPositionHeight)&&t.perPositionHeight&&P(t.height))throw new dt("Cannot use both options.perPositionHeight and options.height");if(P(t.arcType)&&t.arcType!==lt.GEODESIC&&t.arcType!==lt.RHUMB)throw new dt("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let e=t.polygonHierarchy,o=L(t.vertexFormat,q.DEFAULT),n=L(t.ellipsoid,V.default),s=L(t.granularity,l.RADIANS_PER_DEGREE),i=L(t.stRotation,0),r=t.textureCoordinates,f=L(t.perPositionHeight,!1),m=f&&P(t.extrudedHeight),g=L(t.height,0),w=L(t.extrudedHeight,g);if(!m){let a=Math.max(g,w);w=Math.min(g,w),g=a}this._vertexFormat=q.clone(o),this._ellipsoid=V.clone(n),this._granularity=s,this._stRotation=i,this._height=g,this._extrudedHeight=w,this._closeTop=L(t.closeTop,!0),this._closeBottom=L(t.closeBottom,!0),this._polygonHierarchy=e,this._perPositionHeight=f,this._perPositionHeightExtrude=m,this._shadowVolume=L(t.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=t.offsetAttribute,this._arcType=L(t.arcType,lt.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=r,this.packedLength=F.computeHierarchyPackedLength(e,c)+V.packedLength+q.packedLength+(r?F.computeHierarchyPackedLength(r,A):1)+12}G.fromPositions=function(t){t=L(t,L.EMPTY_OBJECT),Y.defined("options.positions",t.positions);let e={polygonHierarchy:{positions:t.positions},height:t.height,extrudedHeight:t.extrudedHeight,vertexFormat:t.vertexFormat,stRotation:t.stRotation,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,closeTop:t.closeTop,closeBottom:t.closeBottom,offsetAttribute:t.offsetAttribute,arcType:t.arcType,textureCoordinates:t.textureCoordinates};return new G(e)};G.pack=function(t,e,o){return Y.typeOf.object("value",t),Y.defined("array",e),o=L(o,0),o=F.packPolygonHierarchy(t._polygonHierarchy,e,o,c),V.pack(t._ellipsoid,e,o),o+=V.packedLength,q.pack(t._vertexFormat,e,o),o+=q.packedLength,e[o++]=t._height,e[o++]=t._extrudedHeight,e[o++]=t._granularity,e[o++]=t._stRotation,e[o++]=t._perPositionHeightExtrude?1:0,e[o++]=t._perPositionHeight?1:0,e[o++]=t._closeTop?1:0,e[o++]=t._closeBottom?1:0,e[o++]=t._shadowVolume?1:0,e[o++]=L(t._offsetAttribute,-1),e[o++]=t._arcType,P(t._textureCoordinates)?o=F.packPolygonHierarchy(t._textureCoordinates,e,o,A):e[o++]=-1,e[o++]=t.packedLength,e};var Jt=V.clone(V.UNIT_SPHERE),Xt=new q,$t={polygonHierarchy:{}};G.unpack=function(t,e,o){Y.defined("array",t),e=L(e,0);let n=F.unpackPolygonHierarchy(t,e,c);e=n.startingIndex,delete n.startingIndex;let s=V.unpack(t,e,Jt);e+=V.packedLength;let i=q.unpack(t,e,Xt);e+=q.packedLength;let r=t[e++],f=t[e++],m=t[e++],g=t[e++],w=t[e++]===1,a=t[e++]===1,H=t[e++]===1,x=t[e++]===1,M=t[e++]===1,C=t[e++],R=t[e++],B=t[e]===-1?void 0:F.unpackPolygonHierarchy(t,e,A);P(B)?(e=B.startingIndex,delete B.startingIndex):e++;let _=t[e++];return P(o)||(o=new G($t)),o._polygonHierarchy=n,o._ellipsoid=V.clone(s,o._ellipsoid),o._vertexFormat=q.clone(i,o._vertexFormat),o._height=r,o._extrudedHeight=f,o._granularity=m,o._stRotation=g,o._perPositionHeightExtrude=w,o._perPositionHeight=a,o._closeTop=H,o._closeBottom=x,o._shadowVolume=M,o._offsetAttribute=C===-1?void 0:C,o._arcType=R,o._textureCoordinates=B,o.packedLength=_,o};var te=new A,ee=new A,oe=new z;function Nt(t,e,o,n,s,i){let r=t.longitude,f=r>=0?r:r+l.TWO_PI;s.westOverIdl=Math.min(s.westOverIdl,f),s.eastOverIdl=Math.max(s.eastOverIdl,f),i.west=Math.min(i.west,r),i.east=Math.max(i.east,r);let m=t.getLatitude(o),g=m;if(i.south=Math.min(i.south,m),i.north=Math.max(i.north,m),n!==lt.RHUMB){let H=A.subtract(e.position,t.position,te),x=A.dot(e.position,H)/A.dot(H,H);if(x>0&&x<1){let M=A.add(e.position,A.multiplyByScalar(H,-x,H),ee),C=z.clone(e,oe);C.position=M;let R=C.getLatitude(o);i.south=Math.min(i.south,R),i.north=Math.max(i.north,R),Math.abs(m)>Math.abs(R)&&(g=R)}}let w=e.x*t.y-t.x*e.y,a=Math.sign(w);a!==0&&(a*=A.angleBetween(e.position,t.position)),g>=0&&(s.northAngle+=a),g<=0&&(s.southAngle+=a)}var Rt=new z,ne=new z,W={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};G.computeRectangleFromPositions=function(t,e,o,n){if(Y.defined("positions",t),P(n)||(n=new wt),t.length<3)return n;n.west=Number.POSITIVE_INFINITY,n.east=Number.NEGATIVE_INFINITY,n.south=Number.POSITIVE_INFINITY,n.north=Number.NEGATIVE_INFINITY,W.northAngle=0,W.southAngle=0,W.westOverIdl=Number.POSITIVE_INFINITY,W.eastOverIdl=Number.NEGATIVE_INFINITY;let s=t.length,i=z.fromCartesian(t[0],ne);for(let r=1;r<s;r++){let f=z.fromCartesian(t[r],Rt);Nt(f,i,e,o,W,n),i=z.clone(f,i)}return Nt(z.fromCartesian(t[0],Rt),i,e,o,W,n),n.east-n.west>W.eastOverIdl-W.westOverIdl&&(n.west=W.westOverIdl,n.east=W.eastOverIdl,n.east>l.PI&&(n.east=n.east-l.TWO_PI),n.west>l.PI&&(n.west=n.west-l.TWO_PI)),l.equalsEpsilon(Math.abs(W.northAngle),l.TWO_PI,l.EPSILON10)&&(n.north=l.PI_OVER_TWO,n.east=l.PI,n.west=-l.PI),l.equalsEpsilon(Math.abs(W.southAngle),l.TWO_PI,l.EPSILON10)&&(n.south=-l.PI_OVER_TWO,n.east=l.PI,n.west=-l.PI),n};var ie=new z;function re(t,e,o){return t.height>=l.PI||t.width>=l.PI?z.fromCartesian(e[0],ie).tangentPlane:tt.fromPoints(e,o)}var It=new nt;function se(t,e,o){return(n,s)=>{if(t.height>=l.PI||t.width>=l.PI){if(t.south<0&&t.north>0){P(s)||(s=[]);for(let r=0;r<n.length;++r){let f=o.cartesianToCartographic(n[r],It);s[r]=new A(f.longitude/l.PI,f.latitude/l.PI_OVER_TWO)}return s.length=n.length,s}return z.fromCartesianArray(n,s)}return tt.fromPoints(e,o).projectPointsOntoPlane(n,s)}}function ae(t,e,o){if(t.height>=l.PI||t.width>=l.PI)return(s,i)=>{if(t.south<0&&t.north>0){let r=o.cartesianToCartographic(s,It);return P(i)||(i=new A),i.x=r.longitude/l.PI,i.y=r.latitude/l.PI_OVER_TWO,i}return z.fromCartesian(s,i)};let n=tt.fromPoints(e,o);return(s,i)=>n.projectPointsOntoPlane(s,i)}function ce(t,e,o,n){return(s,i)=>!n&&(t.height>=l.PI_OVER_TWO||t.width>=2*l.PI_OVER_THREE)?F.splitPolygonsOnEquator(s,e,o,i):s}function le(t,e,o,n){if(e.height>=l.PI||e.width>=l.PI)return pt.fromRectangle(e,void 0,Ht);let s=t,i=tt.fromPoints(s,o);return F.computeBoundingRectangle(i.plane.normal,i.projectPointOntoPlane.bind(i),s,n,Ht)}G.createGeometry=function(t){let e=t._vertexFormat,o=t._ellipsoid,n=t._granularity,s=t._stRotation,i=t._polygonHierarchy,r=t._perPositionHeight,f=t._closeTop,m=t._closeBottom,g=t._arcType,w=t._textureCoordinates,a=P(w),H=i.positions;if(H.length<3)return;let x=t.rectangle,M=F.polygonsFromHierarchy(i,a,se(x,H,o),!r,o,ce(x,o,g,r)),C=M.hierarchy,R=M.polygons,B=function(N){return N},_=a?F.polygonsFromHierarchy(w,!0,B,!1,o).polygons:void 0;if(C.length===0)return;let Z=C[0].outerRing,y=le(Z,x,o,s),T=[],d=t._height,k=t._extrudedHeight,D=t._perPositionHeightExtrude||!l.equalsEpsilon(d,k,0,l.EPSILON2),u={perPositionHeight:r,vertexFormat:e,geometry:void 0,rotationAxis:re(x,Z,o).plane.normal,projectTo2d:ae(x,Z,o),boundingRectangle:y,ellipsoid:o,stRotation:s,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:g},h;if(D)for(u.extrude=!0,u.top=f,u.bottom=m,u.shadowVolume=t._shadowVolume,u.offsetAttribute=t._offsetAttribute,h=0;h<R.length;h++){let N=Kt(o,R[h],a?_[h]:void 0,n,C[h],r,f,m,e,g),E;f&&m?(E=N.topAndBottom,u.geometry=F.scaleToGeodeticHeightExtruded(E.geometry,d,k,o,r)):f?(E=N.topAndBottom,E.geometry.attributes.position.values=it.scaleToGeodeticHeight(E.geometry.attributes.position.values,d,o,!r),u.geometry=E.geometry):m&&(E=N.topAndBottom,E.geometry.attributes.position.values=it.scaleToGeodeticHeight(E.geometry.attributes.position.values,k,o,!0),u.geometry=E.geometry),(f||m)&&(u.wall=!1,E.geometry=_t(u),T.push(E));let b=N.walls;u.wall=!0;for(let K=0;K<b.length;K++){let j=b[K];u.geometry=F.scaleToGeodeticHeightExtruded(j.geometry,d,k,o,r),j.geometry=_t(u),T.push(j)}}else for(h=0;h<R.length;h++){let N=new ct({geometry:F.createGeometryFromPositions(o,R[h],a?_[h]:void 0,n,r,e,g)});if(N.geometry.attributes.position.values=it.scaleToGeodeticHeight(N.geometry.attributes.position.values,d,o,!r),u.geometry=N.geometry,N.geometry=_t(u),P(t._offsetAttribute)){let E=N.geometry.attributes.position.values.length,b=t._offsetAttribute===ut.NONE?0:1,K=new Uint8Array(E/3).fill(b);N.geometry.attributes.applyOffset=new $({componentDatatype:X.UNSIGNED_BYTE,componentsPerAttribute:1,values:K})}T.push(N)}let p=At.combineInstances(T)[0];p.attributes.position.values=new Float64Array(p.attributes.position.values),p.indices=ft.createTypedArray(p.attributes.position.values.length/3,p.indices);let I=p.attributes,at=yt.fromVertices(I.position.values);return e.position||delete I.position,new gt({attributes:I,indices:p.indices,primitiveType:p.primitiveType,boundingSphere:at,offsetAttribute:t._offsetAttribute})};G.createShadowVolume=function(t,e,o){let n=t._granularity,s=t._ellipsoid,i=e(n,s),r=o(n,s);return new G({polygonHierarchy:t._polygonHierarchy,ellipsoid:s,stRotation:t._stRotation,granularity:n,perPositionHeight:!1,extrudedHeight:i,height:r,vertexFormat:q.POSITION_ONLY,shadowVolume:!0,arcType:t._arcType})};function he(t){let e=-t._stRotation;if(e===0)return[0,0,0,1,1,0];let o=t._ellipsoid,n=t._polygonHierarchy.positions,s=t.rectangle;return gt._textureCoordinateRotationPoints(n,e,o,s)}Object.defineProperties(G.prototype,{rectangle:{get:function(){if(!P(this._rectangle)){let t=this._polygonHierarchy.positions;this._rectangle=G.computeRectangleFromPositions(t,this._ellipsoid,this._arcType)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return P(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=he(this)),this._textureCoordinateRotationPoints}}});var Tt=G;function fe(t,e){return P(e)&&(t=Tt.unpack(t,e)),t._ellipsoid=V.clone(t._ellipsoid),Tt.createGeometry(t)}var eo=fe;export{eo as default};
+import{a as gt}from"./chunk-JD47PROB.js";import{a as L}from"./chunk-T2CEZF5S.js";import{a as ct}from"./chunk-R6MANQZ2.js";import{a as at}from"./chunk-3YQEVL2U.js";import{a as At}from"./chunk-DUJ55QTE.js";import"./chunk-7635WVJB.js";import"./chunk-YCO6GHZ4.js";import{a as ft}from"./chunk-BTGKTRUU.js";import{a as Y}from"./chunk-VPVZKJ47.js";import{a as $}from"./chunk-FVZBCGC7.js";import"./chunk-PVXELJ4I.js";import{a as pt,b as nt}from"./chunk-FTVLHTAP.js";import"./chunk-DA6K763I.js";import"./chunk-TWEYJPY7.js";import{a as bt,b as Ot}from"./chunk-5HPENZ6M.js";import"./chunk-SY6XZLBE.js";import{a as ht}from"./chunk-TO2OYNR6.js";import"./chunk-MZR3JOBY.js";import{c as dt,d as X}from"./chunk-6SNQZF7I.js";import{d as yt}from"./chunk-CLGTNV2A.js";import{f as lt,h as wt}from"./chunk-RQCJJCAO.js";import{a as J}from"./chunk-7J4RJR4J.js";import{b as c,c as ot,d as A,e as S,f as D,g as Tt}from"./chunk-UMC5CP2H.js";import{a as l}from"./chunk-72V3KRTJ.js";import"./chunk-7M2TDEJ6.js";import"./chunk-W5CDIT4C.js";import{a as mt,b as G}from"./chunk-VJ26MOOM.js";import{e as P}from"./chunk-E3YQ3WWZ.js";function O(t,e){this.position=t,P(this.position)||(this.position=new A),this.tangentPlane=e,P(this.tangentPlane)||(this.tangentPlane=O.NORTH_POLE_TANGENT_PLANE)}Object.defineProperties(O.prototype,{ellipsoid:{get:function(){return this.tangentPlane.ellipsoid}},x:{get:function(){return this.position.x}},y:{get:function(){return this.position.y}},conformalLatitude:{get:function(){let t=A.magnitude(this.position),e=2*this.ellipsoid.maximumRadius;return this.tangentPlane.plane.normal.z*(l.PI_OVER_TWO-2*Math.atan2(t,e))}},longitude:{get:function(){let t=l.PI_OVER_TWO+Math.atan2(this.y,this.x);return t>Math.PI&&(t-=l.TWO_PI),t}}});var it=new ot,Ft=new c;O.prototype.getLatitude=function(t){P(t)||(t=S.default),it.latitude=this.conformalLatitude,it.longitude=this.longitude,it.height=0;let e=this.ellipsoid.cartographicToCartesian(it,Ft);return t.cartesianToCartographic(e,it),it.latitude};var vt=new bt,St=new c,Vt=new c;O.fromCartesian=function(t,e){G.defined("cartesian",t);let o=l.signNotZero(t.z),n=O.NORTH_POLE_TANGENT_PLANE,s=O.SOUTH_POLE;o<0&&(n=O.SOUTH_POLE_TANGENT_PLANE,s=O.NORTH_POLE);let i=vt;i.origin=n.ellipsoid.scaleToGeocentricSurface(t,i.origin),i.direction=c.subtract(i.origin,s,St),c.normalize(i.direction,i.direction);let r=Ot.rayPlane(i,n.plane,Vt),f=c.subtract(r,s,r),m=c.dot(n.xAxis,f),g=o*c.dot(n.yAxis,f);return P(e)?(e.position=new A(m,g),e.tangentPlane=n,e):new O(new A(m,g),n)};O.fromCartesianArray=function(t,e){G.defined("cartesians",t);let o=t.length;P(e)?e.length=o:e=new Array(o);for(let n=0;n<o;n++)e[n]=O.fromCartesian(t[n],e[n]);return e};O.clone=function(t,e){if(P(t))return P(e)?(e.position=t.position,e.tangentPlane=t.tangentPlane,e):new O(t.position,t.tangentPlane)};O.HALF_UNIT_SPHERE=Object.freeze(new S(.5,.5,.5));O.NORTH_POLE=Object.freeze(new c(0,0,.5));O.SOUTH_POLE=Object.freeze(new c(0,0,-.5));O.NORTH_POLE_TANGENT_PLANE=Object.freeze(new $(O.NORTH_POLE,O.HALF_UNIT_SPHERE));O.SOUTH_POLE_TANGENT_PLANE=Object.freeze(new $(O.SOUTH_POLE,O.HALF_UNIT_SPHERE));var k=O;var Bt=new ot,Et=new ot;function Mt(t,e,o,n){let i=n.cartesianToCartographic(t,Bt).height,r=n.cartesianToCartographic(e,Et);r.height=i,n.cartographicToCartesian(r,e);let f=n.cartesianToCartographic(o,Et);f.height=i-100,n.cartographicToCartesian(f,o)}var Ht=new gt,jt=new c,kt=new c,zt=new c,Dt=new c,Ut=new c,Wt=new c,ut=new c,q=new c,rt=new c,Gt=new A,Yt=new A,qt=new c,xt=new lt,Qt=new D,Zt=new D;function Pt(t){let e=t.vertexFormat,o=t.geometry,n=t.shadowVolume,s=o.attributes.position.values,i=P(o.attributes.st)?o.attributes.st.values:void 0,r=s.length,f=t.wall,m=t.top||f,g=t.bottom||f;if(e.st||e.normal||e.tangent||e.bitangent||n){let w=t.boundingRectangle,a=t.rotationAxis,H=t.projectTo2d,x=t.ellipsoid,B=t.stRotation,C=t.perPositionHeight,R=Gt;R.x=w.x,R.y=w.y;let V=e.st?new Float32Array(2*(r/3)):void 0,_=new Float32Array(r/3),Q=0,y;e.normal&&(C&&m&&!f?y=o.attributes.normal.values:y=new Float32Array(r));let T=e.tangent?new Float32Array(r):void 0,d=e.bitangent?new Float32Array(r):void 0,j=n?new Float32Array(r):void 0,z=0,u=0,h=kt,p=zt,I=Dt,st=!0,N=Qt,E=Zt;if(B!==0){let M=lt.fromAxisAngle(a,B,xt);N=D.fromQuaternion(M,N),M=lt.fromAxisAngle(a,-B,xt),E=D.fromQuaternion(M,E)}else N=D.clone(D.IDENTITY,N),E=D.clone(D.IDENTITY,E);let b=0,Z=0;m&&g&&(b=r/2,Z=r/3,r/=2);for(let M=0;M<r;M+=3){let K=c.fromArray(s,M,qt);if(e.st&&!P(i)){let F=D.multiplyByVector(N,K,jt);F=x.scaleToGeodeticSurface(F,F);let v=H([F],Yt)[0];A.subtract(v,R,v);let tt=l.clamp(v.x/w.width,0,1),et=l.clamp(v.y/w.height,0,1);g&&(V[z+Z]=tt,V[z+1+Z]=et),m&&(V[z]=tt,V[z+1]=et);let Lt=ot.fromCartesian(K);_[Q++]=Math.floor(Lt.height+1e-5),z+=2}if(e.normal||e.tangent||e.bitangent||n){let F=u+1,v=u+2;if(f){if(M+3<r){let tt=c.fromArray(s,M+3,Ut);if(st){let et=c.fromArray(s,M+r,Wt);C&&Mt(K,tt,et,x),c.subtract(tt,K,tt),c.subtract(et,K,et),h=c.normalize(c.cross(et,tt,h),h),st=!1}c.equalsEpsilon(tt,K,l.EPSILON10)&&(st=!0)}(e.tangent||e.bitangent)&&(I=x.geodeticSurfaceNormal(K,I),e.tangent&&(p=c.normalize(c.cross(I,h,p),p)))}else h=x.geodeticSurfaceNormal(K,h),(e.tangent||e.bitangent)&&(C&&(ut=c.fromArray(y,u,ut),q=c.cross(c.UNIT_Z,ut,q),q=c.normalize(D.multiplyByVector(E,q,q),q),e.bitangent&&(rt=c.normalize(c.cross(ut,q,rt),rt))),p=c.cross(c.UNIT_Z,h,p),p=c.normalize(D.multiplyByVector(E,p,p),p),e.bitangent&&(I=c.normalize(c.cross(h,p,I),I)));e.normal&&(t.wall?(y[u+b]=h.x,y[F+b]=h.y,y[v+b]=h.z):g&&(y[u+b]=-h.x,y[F+b]=-h.y,y[v+b]=-h.z),(m&&!C||f)&&(y[u]=h.x,y[F]=h.y,y[v]=h.z)),n&&(f&&(h=x.geodeticSurfaceNormal(K,h)),j[u+b]=-h.x,j[F+b]=-h.y,j[v+b]=-h.z),e.tangent&&(t.wall?(T[u+b]=p.x,T[F+b]=p.y,T[v+b]=p.z):g&&(T[u+b]=-p.x,T[F+b]=-p.y,T[v+b]=-p.z),m&&(C?(T[u]=q.x,T[F]=q.y,T[v]=q.z):(T[u]=p.x,T[F]=p.y,T[v]=p.z))),e.bitangent&&(g&&(d[u+b]=I.x,d[F+b]=I.y,d[v+b]=I.z),m&&(C?(d[u]=rt.x,d[F]=rt.y,d[v]=rt.z):(d[u]=I.x,d[F]=I.y,d[v]=I.z))),u+=3}}e.st&&!P(i)&&(o.attributes.st=new X({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:V}),o.attributes.height=new X({componentDatatype:J.FLOAT,componentsPerAttribute:1,values:_})),e.normal&&(o.attributes.normal=new X({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:y})),e.tangent&&(o.attributes.tangent=new X({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:T})),e.bitangent&&(o.attributes.bitangent=new X({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:d})),n&&(o.attributes.extrudeDirection=new X({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:j}))}if(t.extrude&&P(t.offsetAttribute)){let w=s.length/3,a=new Uint8Array(w);if(t.offsetAttribute===ft.TOP)m&&g||f?a=a.fill(1,0,w/2):m&&(a=a.fill(1));else{let H=t.offsetAttribute===ft.NONE?0:1;a=a.fill(H)}o.attributes.applyOffset=new X({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}return o}var Ct=[];function Kt(t,e,o,n,s,i,r,f,m,g){let w={walls:[]},a;if(r||f){let _=L.createGeometryFromPositions(t,e,o,n,i,m,g),Q=_.attributes.position.values,y=_.indices,T,d;if(r&&f){let j=Q.concat(Q);T=j.length/3,d=ht.createTypedArray(T,y.length*2),d.set(y);let z=y.length,u=T/2;for(a=0;a<z;a+=3){let h=d[a]+u,p=d[a+1]+u,I=d[a+2]+u;d[a+z]=I,d[a+1+z]=p,d[a+2+z]=h}if(_.attributes.position.values=j,i&&m.normal){let h=_.attributes.normal.values;_.attributes.normal.values=new Float32Array(j.length),_.attributes.normal.values.set(h)}if(m.st&&P(o)){let h=_.attributes.st.values;_.attributes.st.values=new Float32Array(T*2),_.attributes.st.values=h.concat(h)}_.indices=d}else if(f){for(T=Q.length/3,d=ht.createTypedArray(T,y.length),a=0;a<y.length;a+=3)d[a]=y[a+2],d[a+1]=y[a+1],d[a+2]=y[a];_.indices=d}w.topAndBottom=new at({geometry:_})}let H=s.outerRing,x=$.fromPoints(H,t),B=x.projectPointsOntoPlane(H,Ct),C=nt.computeWindingOrder2D(B);C===pt.CLOCKWISE&&(H=H.slice().reverse());let R=L.computeWallGeometry(H,o,t,n,i,g);w.walls.push(new at({geometry:R}));let V=s.holes;for(a=0;a<V.length;a++){let _=V[a];B=x.projectPointsOntoPlane(_,Ct),C=nt.computeWindingOrder2D(B),C===pt.COUNTER_CLOCKWISE&&(_=_.slice().reverse()),R=L.computeWallGeometry(_,o,t,n,i,g),w.walls.push(new at({geometry:R}))}return w}function W(t){if(G.typeOf.object("options",t),G.typeOf.object("options.polygonHierarchy",t.polygonHierarchy),P(t.perPositionHeight)&&t.perPositionHeight&&P(t.height))throw new mt("Cannot use both options.perPositionHeight and options.height");if(P(t.arcType)&&t.arcType!==ct.GEODESIC&&t.arcType!==ct.RHUMB)throw new mt("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let e=t.polygonHierarchy,o=t.vertexFormat??Y.DEFAULT,n=t.ellipsoid??S.default,s=t.granularity??l.RADIANS_PER_DEGREE,i=t.stRotation??0,r=t.textureCoordinates,f=t.perPositionHeight??!1,m=f&&P(t.extrudedHeight),g=t.height??0,w=t.extrudedHeight??g;if(!m){let a=Math.max(g,w);w=Math.min(g,w),g=a}this._vertexFormat=Y.clone(o),this._ellipsoid=S.clone(n),this._granularity=s,this._stRotation=i,this._height=g,this._extrudedHeight=w,this._closeTop=t.closeTop??!0,this._closeBottom=t.closeBottom??!0,this._polygonHierarchy=e,this._perPositionHeight=f,this._perPositionHeightExtrude=m,this._shadowVolume=t.shadowVolume??!1,this._workerName="createPolygonGeometry",this._offsetAttribute=t.offsetAttribute,this._arcType=t.arcType??ct.GEODESIC,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=r,this.packedLength=L.computeHierarchyPackedLength(e,c)+S.packedLength+Y.packedLength+(r?L.computeHierarchyPackedLength(r,A):1)+12}W.fromPositions=function(t){t=t??Tt.EMPTY_OBJECT,G.defined("options.positions",t.positions);let e={polygonHierarchy:{positions:t.positions},height:t.height,extrudedHeight:t.extrudedHeight,vertexFormat:t.vertexFormat,stRotation:t.stRotation,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,closeTop:t.closeTop,closeBottom:t.closeBottom,offsetAttribute:t.offsetAttribute,arcType:t.arcType,textureCoordinates:t.textureCoordinates};return new W(e)};W.pack=function(t,e,o){return G.typeOf.object("value",t),G.defined("array",e),o=o??0,o=L.packPolygonHierarchy(t._polygonHierarchy,e,o,c),S.pack(t._ellipsoid,e,o),o+=S.packedLength,Y.pack(t._vertexFormat,e,o),o+=Y.packedLength,e[o++]=t._height,e[o++]=t._extrudedHeight,e[o++]=t._granularity,e[o++]=t._stRotation,e[o++]=t._perPositionHeightExtrude?1:0,e[o++]=t._perPositionHeight?1:0,e[o++]=t._closeTop?1:0,e[o++]=t._closeBottom?1:0,e[o++]=t._shadowVolume?1:0,e[o++]=t._offsetAttribute??-1,e[o++]=t._arcType,P(t._textureCoordinates)?o=L.packPolygonHierarchy(t._textureCoordinates,e,o,A):e[o++]=-1,e[o++]=t.packedLength,e};var Jt=S.clone(S.UNIT_SPHERE),Xt=new Y,$t={polygonHierarchy:{}};W.unpack=function(t,e,o){G.defined("array",t),e=e??0;let n=L.unpackPolygonHierarchy(t,e,c);e=n.startingIndex,delete n.startingIndex;let s=S.unpack(t,e,Jt);e+=S.packedLength;let i=Y.unpack(t,e,Xt);e+=Y.packedLength;let r=t[e++],f=t[e++],m=t[e++],g=t[e++],w=t[e++]===1,a=t[e++]===1,H=t[e++]===1,x=t[e++]===1,B=t[e++]===1,C=t[e++],R=t[e++],V=t[e]===-1?void 0:L.unpackPolygonHierarchy(t,e,A);P(V)?(e=V.startingIndex,delete V.startingIndex):e++;let _=t[e++];return P(o)||(o=new W($t)),o._polygonHierarchy=n,o._ellipsoid=S.clone(s,o._ellipsoid),o._vertexFormat=Y.clone(i,o._vertexFormat),o._height=r,o._extrudedHeight=f,o._granularity=m,o._stRotation=g,o._perPositionHeightExtrude=w,o._perPositionHeight=a,o._closeTop=H,o._closeBottom=x,o._shadowVolume=B,o._offsetAttribute=C===-1?void 0:C,o._arcType=R,o._textureCoordinates=V,o.packedLength=_,o};var te=new A,ee=new A,oe=new k;function Nt(t,e,o,n,s,i){let r=t.longitude,f=r>=0?r:r+l.TWO_PI;s.westOverIdl=Math.min(s.westOverIdl,f),s.eastOverIdl=Math.max(s.eastOverIdl,f),i.west=Math.min(i.west,r),i.east=Math.max(i.east,r);let m=t.getLatitude(o),g=m;if(i.south=Math.min(i.south,m),i.north=Math.max(i.north,m),n!==ct.RHUMB){let H=A.subtract(e.position,t.position,te),x=A.dot(e.position,H)/A.dot(H,H);if(x>0&&x<1){let B=A.add(e.position,A.multiplyByScalar(H,-x,H),ee),C=k.clone(e,oe);C.position=B;let R=C.getLatitude(o);i.south=Math.min(i.south,R),i.north=Math.max(i.north,R),Math.abs(m)>Math.abs(R)&&(g=R)}}let w=e.x*t.y-t.x*e.y,a=Math.sign(w);a!==0&&(a*=A.angleBetween(e.position,t.position)),g>=0&&(s.northAngle+=a),g<=0&&(s.southAngle+=a)}var Rt=new k,ne=new k,U={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};W.computeRectangleFromPositions=function(t,e,o,n){if(G.defined("positions",t),P(n)||(n=new wt),t.length<3)return n;n.west=Number.POSITIVE_INFINITY,n.east=Number.NEGATIVE_INFINITY,n.south=Number.POSITIVE_INFINITY,n.north=Number.NEGATIVE_INFINITY,U.northAngle=0,U.southAngle=0,U.westOverIdl=Number.POSITIVE_INFINITY,U.eastOverIdl=Number.NEGATIVE_INFINITY;let s=t.length,i=k.fromCartesian(t[0],ne);for(let r=1;r<s;r++){let f=k.fromCartesian(t[r],Rt);Nt(f,i,e,o,U,n),i=k.clone(f,i)}return Nt(k.fromCartesian(t[0],Rt),i,e,o,U,n),n.east-n.west>U.eastOverIdl-U.westOverIdl&&(n.west=U.westOverIdl,n.east=U.eastOverIdl,n.east>l.PI&&(n.east=n.east-l.TWO_PI),n.west>l.PI&&(n.west=n.west-l.TWO_PI)),l.equalsEpsilon(Math.abs(U.northAngle),l.TWO_PI,l.EPSILON10)&&(n.north=l.PI_OVER_TWO,n.east=l.PI,n.west=-l.PI),l.equalsEpsilon(Math.abs(U.southAngle),l.TWO_PI,l.EPSILON10)&&(n.south=-l.PI_OVER_TWO,n.east=l.PI,n.west=-l.PI),n};var ie=new k;function re(t,e,o){return t.height>=l.PI||t.width>=l.PI?k.fromCartesian(e[0],ie).tangentPlane:$.fromPoints(e,o)}var It=new ot;function se(t,e,o){return(n,s)=>{if(t.height>=l.PI||t.width>=l.PI){if(t.south<0&&t.north>0){P(s)||(s=[]);for(let r=0;r<n.length;++r){let f=o.cartesianToCartographic(n[r],It);s[r]=new A(f.longitude/l.PI,f.latitude/l.PI_OVER_TWO)}return s.length=n.length,s}return k.fromCartesianArray(n,s)}return $.fromPoints(e,o).projectPointsOntoPlane(n,s)}}function ae(t,e,o){if(t.height>=l.PI||t.width>=l.PI)return(s,i)=>{if(t.south<0&&t.north>0){let r=o.cartesianToCartographic(s,It);return P(i)||(i=new A),i.x=r.longitude/l.PI,i.y=r.latitude/l.PI_OVER_TWO,i}return k.fromCartesian(s,i)};let n=$.fromPoints(e,o);return(s,i)=>n.projectPointsOntoPlane(s,i)}function ce(t,e,o,n){return(s,i)=>!n&&(t.height>=l.PI_OVER_TWO||t.width>=2*l.PI_OVER_THREE)?L.splitPolygonsOnEquator(s,e,o,i):s}function le(t,e,o,n){if(e.height>=l.PI||e.width>=l.PI)return gt.fromRectangle(e,void 0,Ht);let s=t,i=$.fromPoints(s,o);return L.computeBoundingRectangle(i.plane.normal,i.projectPointOntoPlane.bind(i),s,n,Ht)}W.createGeometry=function(t){let e=t._vertexFormat,o=t._ellipsoid,n=t._granularity,s=t._stRotation,i=t._polygonHierarchy,r=t._perPositionHeight,f=t._closeTop,m=t._closeBottom,g=t._arcType,w=t._textureCoordinates,a=P(w),H=i.positions;if(H.length<3)return;let x=t.rectangle,B=L.polygonsFromHierarchy(i,a,se(x,H,o),!r,o,ce(x,o,g,r)),C=B.hierarchy,R=B.polygons,V=function(N){return N},_=a?L.polygonsFromHierarchy(w,!0,V,!1,o).polygons:void 0;if(C.length===0)return;let Q=C[0].outerRing,y=le(Q,x,o,s),T=[],d=t._height,j=t._extrudedHeight,z=t._perPositionHeightExtrude||!l.equalsEpsilon(d,j,0,l.EPSILON2),u={perPositionHeight:r,vertexFormat:e,geometry:void 0,rotationAxis:re(x,Q,o).plane.normal,projectTo2d:ae(x,Q,o),boundingRectangle:y,ellipsoid:o,stRotation:s,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:g},h;if(z)for(u.extrude=!0,u.top=f,u.bottom=m,u.shadowVolume=t._shadowVolume,u.offsetAttribute=t._offsetAttribute,h=0;h<R.length;h++){let N=Kt(o,R[h],a?_[h]:void 0,n,C[h],r,f,m,e,g),E;f&&m?(E=N.topAndBottom,u.geometry=L.scaleToGeodeticHeightExtruded(E.geometry,d,j,o,r)):f?(E=N.topAndBottom,E.geometry.attributes.position.values=nt.scaleToGeodeticHeight(E.geometry.attributes.position.values,d,o,!r),u.geometry=E.geometry):m&&(E=N.topAndBottom,E.geometry.attributes.position.values=nt.scaleToGeodeticHeight(E.geometry.attributes.position.values,j,o,!0),u.geometry=E.geometry),(f||m)&&(u.wall=!1,E.geometry=Pt(u),T.push(E));let b=N.walls;u.wall=!0;for(let Z=0;Z<b.length;Z++){let M=b[Z];u.geometry=L.scaleToGeodeticHeightExtruded(M.geometry,d,j,o,r),M.geometry=Pt(u),T.push(M)}}else for(h=0;h<R.length;h++){let N=new at({geometry:L.createGeometryFromPositions(o,R[h],a?_[h]:void 0,n,r,e,g)});if(N.geometry.attributes.position.values=nt.scaleToGeodeticHeight(N.geometry.attributes.position.values,d,o,!r),u.geometry=N.geometry,N.geometry=Pt(u),P(t._offsetAttribute)){let E=N.geometry.attributes.position.values.length,b=t._offsetAttribute===ft.NONE?0:1,Z=new Uint8Array(E/3).fill(b);N.geometry.attributes.applyOffset=new X({componentDatatype:J.UNSIGNED_BYTE,componentsPerAttribute:1,values:Z})}T.push(N)}let p=At.combineInstances(T)[0];p.attributes.position.values=new Float64Array(p.attributes.position.values),p.indices=ht.createTypedArray(p.attributes.position.values.length/3,p.indices);let I=p.attributes,st=yt.fromVertices(I.position.values);return e.position||delete I.position,new dt({attributes:I,indices:p.indices,primitiveType:p.primitiveType,boundingSphere:st,offsetAttribute:t._offsetAttribute})};W.createShadowVolume=function(t,e,o){let n=t._granularity,s=t._ellipsoid,i=e(n,s),r=o(n,s);return new W({polygonHierarchy:t._polygonHierarchy,ellipsoid:s,stRotation:t._stRotation,granularity:n,perPositionHeight:!1,extrudedHeight:i,height:r,vertexFormat:Y.POSITION_ONLY,shadowVolume:!0,arcType:t._arcType})};function he(t){let e=-t._stRotation;if(e===0)return[0,0,0,1,1,0];let o=t._ellipsoid,n=t._polygonHierarchy.positions,s=t.rectangle;return dt._textureCoordinateRotationPoints(n,e,o,s)}Object.defineProperties(W.prototype,{rectangle:{get:function(){if(!P(this._rectangle)){let t=this._polygonHierarchy.positions;this._rectangle=W.computeRectangleFromPositions(t,this._ellipsoid,this._arcType)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return P(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=he(this)),this._textureCoordinateRotationPoints}}});var _t=W;function fe(t,e){return P(e)&&(t=_t.unpack(t,e)),t._ellipsoid=S.clone(t._ellipsoid),_t.createGeometry(t)}var eo=fe;export{eo as default};

--
Gitblit v1.9.3