import{a as pt}from"./chunk-UDJW7K3P.js";import{a as F}from"./chunk-YBGQTN3R.js";import{a as lt}from"./chunk-3B3UDCHP.js";import{a as ct}from"./chunk-KBTPUVX4.js";import{a as At}from"./chunk-NLFLNVCF.js";import"./chunk-HV57XH4K.js";import"./chunk-X2QIAW2L.js";import{a as ut}from"./chunk-55FFQILS.js";import{a as q}from"./chunk-WF3WCQMH.js";import{a as tt}from"./chunk-P5SE5XVC.js";import"./chunk-ZPRLAWII.js";import{a as Pt,b as it}from"./chunk-IRIBHMN7.js";import"./chunk-A6RR2BLJ.js";import"./chunk-EPQZOCRV.js";import{a as bt,b as Ot}from"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import{a as ft}from"./chunk-ZDNS2GYV.js";import"./chunk-LH4TAMBV.js";import{c as gt,d as $}from"./chunk-TNSV6TPX.js";import{d as yt}from"./chunk-QHUUGFLC.js";import{f as ht,i as wt}from"./chunk-BHJLM5NY.js";import{a as X}from"./chunk-3LWOQSP3.js";import{b as c,c as nt,d as A,e as V,f as U}from"./chunk-7DK7KB7Q.js";import{a as l}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as L}from"./chunk-5HWP5DW7.js";import{a as dt,b as Y}from"./chunk-INT7THOB.js";import{e as P}from"./chunk-PPCZYYBW.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};
|