gis-cesium-helper 4.1.1 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Cesium/Assets/approximateTerrainHeights.json +1 -1
- package/dist/Cesium/Cesium.d.ts +46350 -0
- package/dist/Cesium/Cesium.js +16062 -15091
- package/dist/Cesium/Core/Check.d.ts +127 -0
- package/dist/Cesium/ThirdParty/Workers/z-worker-pako.js +1 -1
- package/dist/Cesium/ThirdParty/draco_decoder.wasm +0 -0
- package/dist/Cesium/Widgets/CesiumWidget/CesiumWidget.css +0 -5
- package/dist/Cesium/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +27 -0
- package/dist/Cesium/Widgets/Timeline/Timeline.css +8 -1
- package/dist/Cesium/Widgets/Timeline/lighter.css +6 -1
- package/dist/Cesium/Widgets/lighter.css +6 -1
- package/dist/Cesium/Widgets/widgets.css +36 -5
- package/dist/Cesium/Workers/{chunk-FAMH7QPQ.js → chunk-23HMYUSJ.js} +2 -2
- package/dist/Cesium/Workers/{chunk-XUP5J7GQ.js → chunk-34X2ZL32.js} +2 -2
- package/dist/Cesium/Workers/{chunk-ZD25UQM7.js → chunk-3FCK4U2N.js} +2 -2
- package/dist/Cesium/Workers/{chunk-ZBFGV7QI.js → chunk-3MV3BMN5.js} +2 -2
- package/dist/Cesium/Workers/{chunk-LXL44TDT.js → chunk-5JSDDVN4.js} +2 -2
- package/dist/Cesium/Workers/chunk-5XCWZRKD.js +26 -0
- package/dist/Cesium/Workers/{chunk-4DWHRTTP.js → chunk-6IQGHKR5.js} +2 -2
- package/dist/Cesium/Workers/chunk-6V3AGY4C.js +26 -0
- package/dist/Cesium/Workers/{chunk-KLK65KFE.js → chunk-763AHQX3.js} +2 -2
- package/dist/Cesium/Workers/{chunk-JJYRRIWN.js → chunk-7K5QPZEL.js} +2 -2
- package/dist/Cesium/Workers/chunk-BVGVBIA4.js +26 -0
- package/dist/Cesium/Workers/{chunk-T4QAV6EX.js → chunk-CDIJULSW.js} +1 -1
- package/dist/Cesium/Workers/{chunk-F2VBKMFQ.js → chunk-CZPBEN7H.js} +2 -2
- package/dist/Cesium/Workers/{chunk-STB6TCFY.js → chunk-D3CSG3S2.js} +1 -1
- package/dist/Cesium/Workers/{chunk-I2A6O4RG.js → chunk-D776FCVJ.js} +2 -2
- package/dist/Cesium/Workers/{chunk-ECIWWYM6.js → chunk-DG7CB3DY.js} +2 -2
- package/dist/Cesium/Workers/{chunk-D3TZ2KW7.js → chunk-EARE55VU.js} +2 -2
- package/dist/Cesium/Workers/chunk-EBGE3XTZ.js +28 -0
- package/dist/Cesium/Workers/{chunk-UYEV4TJN.js → chunk-ECDOQM3R.js} +2 -2
- package/dist/Cesium/Workers/chunk-ED5MX6OB.js +26 -0
- package/dist/Cesium/Workers/{chunk-BLQIHQVM.js → chunk-FFJN4UXE.js} +2 -2
- package/dist/Cesium/Workers/chunk-HIKVO3YB.js +26 -0
- package/dist/Cesium/Workers/{chunk-W2RVA34K.js → chunk-IY53UJII.js} +2 -2
- package/dist/Cesium/Workers/{chunk-5APIVAIA.js → chunk-J4YKEZKQ.js} +2 -2
- package/dist/Cesium/Workers/{chunk-Y6JLAJTJ.js → chunk-J63AP2GZ.js} +2 -2
- package/dist/Cesium/Workers/{chunk-7GPSWUNQ.js → chunk-J63NMQMY.js} +2 -2
- package/dist/Cesium/Workers/{chunk-PXJWIUYV.js → chunk-KCWT4TOH.js} +2 -2
- package/dist/Cesium/Workers/{chunk-SOPLNYSA.js → chunk-LPL3F3FU.js} +1 -1
- package/dist/Cesium/Workers/chunk-MNKVHNSN.js +26 -0
- package/dist/Cesium/Workers/{chunk-C4OMKOTM.js → chunk-NW4BJ3IZ.js} +2 -2
- package/dist/Cesium/Workers/chunk-OE6BOPXI.js +26 -0
- package/dist/Cesium/Workers/chunk-P2A4LTBW.js +26 -0
- package/dist/Cesium/Workers/{chunk-HXIAOT7H.js → chunk-PQF7YB7C.js} +1 -1
- package/dist/Cesium/Workers/{chunk-NVQN2WQZ.js → chunk-QC664SDS.js} +2 -2
- package/dist/Cesium/Workers/chunk-QLA567VU.js +66 -0
- package/dist/Cesium/Workers/{chunk-HBEVV6IK.js → chunk-QMNXCAC6.js} +2 -2
- package/dist/Cesium/Workers/chunk-S5WJXCZO.js +26 -0
- package/dist/Cesium/Workers/{chunk-4RJDMIO4.js → chunk-TAU7Y5S5.js} +2 -2
- package/dist/Cesium/Workers/{chunk-E2BL2RZG.js → chunk-TBESXZ5I.js} +2 -2
- package/dist/Cesium/Workers/chunk-TICQDDS3.js +26 -0
- package/dist/Cesium/Workers/chunk-U6VPCTVK.js +26 -0
- package/dist/Cesium/Workers/{chunk-BYGMMPBC.js → chunk-VEDHIHCJ.js} +2 -2
- package/dist/Cesium/Workers/chunk-VUWKCLE2.js +26 -0
- package/dist/Cesium/Workers/chunk-VV7VOBQF.js +26 -0
- package/dist/Cesium/Workers/{chunk-5HTTNN4T.js → chunk-W5OYQDXN.js} +2 -2
- package/dist/Cesium/Workers/{chunk-TQL3YWK4.js → chunk-WUKOSFF5.js} +2 -2
- package/dist/Cesium/Workers/chunk-XAZPIEZX.js +26 -0
- package/dist/Cesium/Workers/chunk-XKCVKWJ5.js +26 -0
- package/dist/Cesium/Workers/{chunk-HKVMSEEW.js → chunk-YXBVEKWI.js} +1 -1
- package/dist/Cesium/Workers/chunk-YXTGMGCC.js +26 -0
- package/dist/Cesium/Workers/chunk-Z7K6WT6T.js +26 -0
- package/dist/Cesium/Workers/{chunk-YJTMGLB7.js → chunk-ZHH5JPWV.js} +2 -2
- package/dist/Cesium/Workers/combineGeometry.js +2 -2
- package/dist/Cesium/Workers/createBoxGeometry.js +2 -2
- package/dist/Cesium/Workers/createBoxOutlineGeometry.js +2 -2
- package/dist/Cesium/Workers/createCircleGeometry.js +2 -2
- package/dist/Cesium/Workers/createCircleOutlineGeometry.js +2 -2
- package/dist/Cesium/Workers/createCoplanarPolygonGeometry.js +2 -2
- package/dist/Cesium/Workers/createCoplanarPolygonOutlineGeometry.js +2 -2
- package/dist/Cesium/Workers/createCorridorGeometry.js +2 -2
- package/dist/Cesium/Workers/createCorridorOutlineGeometry.js +2 -2
- package/dist/Cesium/Workers/createCylinderGeometry.js +2 -2
- package/dist/Cesium/Workers/createCylinderOutlineGeometry.js +2 -2
- package/dist/Cesium/Workers/createEllipseGeometry.js +2 -2
- package/dist/Cesium/Workers/createEllipseOutlineGeometry.js +2 -2
- package/dist/Cesium/Workers/createEllipsoidGeometry.js +2 -2
- package/dist/Cesium/Workers/createEllipsoidOutlineGeometry.js +2 -2
- package/dist/Cesium/Workers/createFrustumGeometry.js +2 -2
- package/dist/Cesium/Workers/createFrustumOutlineGeometry.js +2 -2
- package/dist/Cesium/Workers/createGeometry.js +2 -2
- package/dist/Cesium/Workers/createGroundPolylineGeometry.js +2 -2
- package/dist/Cesium/Workers/createPlaneGeometry.js +2 -2
- package/dist/Cesium/Workers/createPlaneOutlineGeometry.js +2 -2
- package/dist/Cesium/Workers/createPolygonGeometry.js +2 -2
- package/dist/Cesium/Workers/createPolygonOutlineGeometry.js +2 -2
- package/dist/Cesium/Workers/createPolylineGeometry.js +2 -2
- package/dist/Cesium/Workers/createPolylineVolumeGeometry.js +2 -2
- package/dist/Cesium/Workers/createPolylineVolumeOutlineGeometry.js +2 -2
- package/dist/Cesium/Workers/createRectangleGeometry.js +2 -2
- package/dist/Cesium/Workers/createRectangleOutlineGeometry.js +2 -2
- package/dist/Cesium/Workers/createSimplePolylineGeometry.js +2 -2
- package/dist/Cesium/Workers/createSphereGeometry.js +2 -2
- package/dist/Cesium/Workers/createSphereOutlineGeometry.js +2 -2
- package/dist/Cesium/Workers/createTaskProcessorWorker.js +2 -2
- package/dist/Cesium/Workers/createVectorTileClampedPolylines.js +2 -2
- package/dist/Cesium/Workers/createVectorTileGeometries.js +2 -2
- package/dist/Cesium/Workers/createVectorTilePoints.js +2 -2
- package/dist/Cesium/Workers/createVectorTilePolygons.js +2 -2
- package/dist/Cesium/Workers/createVectorTilePolylines.js +2 -2
- package/dist/Cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -2
- package/dist/Cesium/Workers/createVerticesFromHeightmap.js +2 -2
- package/dist/Cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -2
- package/dist/Cesium/Workers/createWallGeometry.js +2 -2
- package/dist/Cesium/Workers/createWallOutlineGeometry.js +2 -2
- package/dist/Cesium/Workers/decodeDraco.js +2 -2
- package/dist/Cesium/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2
- package/dist/Cesium/Workers/decodeI3S.js +2 -2
- package/dist/Cesium/Workers/transcodeKTX2.js +21 -21
- package/dist/Cesium/Workers/transferTypedArrayTest.js +1 -1
- package/dist/Cesium/Workers/upsampleQuantizedTerrainMesh.js +2 -2
- package/dist/Cesium/index.cjs +16085 -0
- package/dist/Cesium/index.js +16085 -0
- package/dist/gis-cesium-helper.es.js +43 -23
- package/dist/gis-cesium-helper.umd.js +2 -2
- package/dist/gis3d/gis3d.css +62 -2
- package/dist/gis3d/gis3d.js +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/src/BaseGlobe.d.ts +2 -0
- package/dist/src/feature/radar/RadarCircle.d.ts +1 -0
- package/dist/src/feature/radar/RadarSector.d.ts +1 -0
- package/dist/src/feature/radar/index.d.ts +5 -3
- package/dist/src/manager/BaseGraphic.d.ts +1 -1
- package/package.json +1 -1
- package/dist/Cesium/ThirdParty/Workers/draco_decoder_nodejs.js +0 -1
- package/dist/Cesium/Workers/chunk-2BUTAXOJ.js +0 -26
- package/dist/Cesium/Workers/chunk-4Y673DAX.js +0 -26
- package/dist/Cesium/Workers/chunk-6JIR5UA6.js +0 -26
- package/dist/Cesium/Workers/chunk-7JE52M2E.js +0 -26
- package/dist/Cesium/Workers/chunk-A2GTHHER.js +0 -26
- package/dist/Cesium/Workers/chunk-EH5BIXGS.js +0 -26
- package/dist/Cesium/Workers/chunk-EJ4M7ZWT.js +0 -26
- package/dist/Cesium/Workers/chunk-FRIKFALT.js +0 -26
- package/dist/Cesium/Workers/chunk-GCHOMXEL.js +0 -26
- package/dist/Cesium/Workers/chunk-H4IFK52P.js +0 -26
- package/dist/Cesium/Workers/chunk-HQCE7D5L.js +0 -26
- package/dist/Cesium/Workers/chunk-IYA25EHI.js +0 -26
- package/dist/Cesium/Workers/chunk-LJJKLY2N.js +0 -26
- package/dist/Cesium/Workers/chunk-LO4XCY55.js +0 -26
- package/dist/Cesium/Workers/chunk-OPGPRG5D.js +0 -26
- package/dist/Cesium/Workers/chunk-PEHZZEN4.js +0 -26
- package/dist/Cesium/Workers/chunk-PTGCDCSG.js +0 -26
- package/dist/Cesium/Workers/chunk-Q3IJMJJ2.js +0 -62
- package/dist/Cesium/Workers/chunk-X7PMFMCX.js +0 -30
- package/dist/Cesium/Workers/chunk-YGFN6UZV.js +0 -26
- package/dist/Cesium/Workers/chunk-ZGGJSLK5.js +0 -28
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.120.2
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{a as _e}from"./chunk-I2A6O4RG.js";import{a as Z}from"./chunk-STB6TCFY.js";import{a as _t}from"./chunk-XUP5J7GQ.js";import{a as Oe}from"./chunk-ZD25UQM7.js";import{a as Le}from"./chunk-4DWHRTTP.js";import{a as te}from"./chunk-4Y673DAX.js";import{b as Qt}from"./chunk-C4OMKOTM.js";import{a as jt}from"./chunk-NVQN2WQZ.js";import{c as Ce,d as zt}from"./chunk-7JE52M2E.js";import{a as Pt,d as U,f as Kt,g as xe,h as Ne}from"./chunk-Q3IJMJJ2.js";import"./chunk-OPGPRG5D.js";import{c as G,d as Bt}from"./chunk-X7PMFMCX.js";import{a as vt}from"./chunk-FAMH7QPQ.js";import{a as t,b as u,c as z,d as bt}from"./chunk-ZGGJSLK5.js";import{a as p}from"./chunk-BYGMMPBC.js";import"./chunk-HXIAOT7H.js";import"./chunk-E2BL2RZG.js";import{a as O}from"./chunk-HKVMSEEW.js";import{a as St,b as et}from"./chunk-Y6JLAJTJ.js";import{e as g}from"./chunk-SOPLNYSA.js";function rt(e){e=O(e,O.EMPTY_OBJECT),this._ellipsoid=O(e.ellipsoid,z.WGS84),this._rectangle=O(e.rectangle,G.MAX_VALUE),this._projection=new Pt(this._ellipsoid),this._numberOfLevelZeroTilesX=O(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=O(e.numberOfLevelZeroTilesY,1)}Object.defineProperties(rt.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});rt.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e};rt.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e};rt.prototype.rectangleToNativeRectangle=function(e,i){et.defined("rectangle",e);let r=p.toDegrees(e.west),n=p.toDegrees(e.south),o=p.toDegrees(e.east),a=p.toDegrees(e.north);return g(i)?(i.west=r,i.south=n,i.east=o,i.north=a,i):new G(r,n,o,a)};rt.prototype.tileXYToNativeRectangle=function(e,i,r,n){let o=this.tileXYToRectangle(e,i,r,n);return o.west=p.toDegrees(o.west),o.south=p.toDegrees(o.south),o.east=p.toDegrees(o.east),o.north=p.toDegrees(o.north),o};rt.prototype.tileXYToRectangle=function(e,i,r,n){let o=this._rectangle,a=this.getNumberOfXTilesAtLevel(r),c=this.getNumberOfYTilesAtLevel(r),l=o.width/a,s=e*l+o.west,d=(e+1)*l+o.west,h=o.height/c,N=o.north-i*h,S=o.north-(i+1)*h;return g(n)||(n=new G(s,S,d,N)),n.west=s,n.south=S,n.east=d,n.north=N,n};rt.prototype.positionToTileXY=function(e,i,r){let n=this._rectangle;if(!G.contains(n,e))return;let o=this.getNumberOfXTilesAtLevel(i),a=this.getNumberOfYTilesAtLevel(i),c=n.width/o,l=n.height/a,s=e.longitude;n.east<n.west&&(s+=p.TWO_PI);let d=(s-n.west)/c|0;d>=o&&(d=o-1);let h=(n.north-e.latitude)/l|0;return h>=a&&(h=a-1),g(r)?(r.x=d,r.y=h,r):new Bt(d,h)};var De=rt;var Ie=new t,He=new t,ke=new u,ee=new t,hn=new t,ye=new U,pn=new De,Lt=[new u,new u,new u,new u],Ot=new Bt,w={};w.initialize=function(){let e=w._initPromise;return g(e)||(e=xe.fetchJson(Ne("Assets/approximateTerrainHeights.json")).then(function(i){w._terrainHeights=i}),w._initPromise=e),e};w.getMinimumMaximumHeights=function(e,i){if(et.defined("rectangle",e),!g(w._terrainHeights))throw new St("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");i=O(i,z.WGS84);let r=Ae(e),n=w._defaultMinTerrainHeight,o=w._defaultMaxTerrainHeight;if(g(r)){let a=`${r.level}-${r.x}-${r.y}`,c=w._terrainHeights[a];g(c)&&(n=c[0],o=c[1]),i.cartographicToCartesian(G.northeast(e,ke),Ie),i.cartographicToCartesian(G.southwest(e,ke),He),t.midpoint(He,Ie,ee);let l=i.scaleToGeodeticSurface(ee,hn);if(g(l)){let s=t.distance(ee,l);n=Math.min(n,-s)}else n=w._defaultMinTerrainHeight}return n=Math.max(w._defaultMinTerrainHeight,n),{minimumTerrainHeight:n,maximumTerrainHeight:o}};w.getBoundingSphere=function(e,i){if(et.defined("rectangle",e),!g(w._terrainHeights))throw new St("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");i=O(i,z.WGS84);let r=Ae(e),n=w._defaultMaxTerrainHeight;if(g(r)){let a=`${r.level}-${r.x}-${r.y}`,c=w._terrainHeights[a];g(c)&&(n=c[1])}let o=U.fromRectangle3D(e,i,0);return U.fromRectangle3D(e,i,n,ye),U.union(o,ye,o)};function Ae(e){u.fromRadians(e.east,e.north,0,Lt[0]),u.fromRadians(e.west,e.north,0,Lt[1]),u.fromRadians(e.east,e.south,0,Lt[2]),u.fromRadians(e.west,e.south,0,Lt[3]);let i=0,r=0,n=0,o=0,a=w._terrainHeightsMaxLevel,c;for(c=0;c<=a;++c){let l=!1;for(let s=0;s<4;++s){let d=Lt[s];if(pn.positionToTileXY(d,c,Ot),s===0)n=Ot.x,o=Ot.y;else if(n!==Ot.x||o!==Ot.y){l=!0;break}}if(l)break;i=n,r=o}if(c!==0)return{x:i,y:r,level:c>a?a:c-1}}w._terrainHeightsMaxLevel=6;w._defaultMaxTerrainHeight=9e3;w._defaultMinTerrainHeight=-1e5;w._terrainHeights=void 0;w._initPromise=void 0;Object.defineProperties(w,{initialized:{get:function(){return g(w._terrainHeights)}}});var Xt=w;var le=[Pt,_e],dn=le.length,Ke=Math.cos(p.toRadians(30)),Me=Math.cos(p.toRadians(150)),Qe=0,tn=1e3;function ct(e){e=O(e,O.EMPTY_OBJECT);let i=e.positions;if(!g(i)||i.length<2)throw new St("At least two positions are required.");if(g(e.arcType)&&e.arcType!==Z.GEODESIC&&e.arcType!==Z.RHUMB)throw new St("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=O(e.width,1),this._positions=i,this.granularity=O(e.granularity,9999),this.loop=O(e.loop,!1),this.arcType=O(e.arcType,Z.GEODESIC),this._ellipsoid=z.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(ct.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+z.packedLength+1+1}}});ct.setProjectionAndEllipsoid=function(e,i){let r=0;for(let n=0;n<dn;n++)if(i instanceof le[n]){r=n;break}e._projectionIndex=r,e._ellipsoid=i.ellipsoid};var fn=new t,Re=new t,Pe=new t;function se(e,i,r,n,o){let a=P(n,e,0,fn),c=P(n,e,r,Re),l=P(n,i,0,Pe),s=nt(c,a,Re),d=nt(l,a,Pe);return t.cross(d,s,o),t.normalize(o,o)}var mn=new u,gn=new t,un=new t,wn=new t;function ne(e,i,r,n,o,a,c,l,s,d,h){if(o===0)return;let N;a===Z.GEODESIC?N=new Oe(e,i,c):a===Z.RHUMB&&(N=new te(e,i,c));let S=N.surfaceDistance;if(S<o)return;let R=se(e,i,n,c,wn),D=Math.ceil(S/o),I=S/D,j=I,W=D-1,f=l.length;for(let X=0;X<W;X++){let v=N.interpolateUsingSurfaceDistance(j,mn),y=P(c,v,r,gn),H=P(c,v,n,un);t.pack(R,l,f),t.pack(y,s,f),t.pack(H,d,f),h.push(v.latitude),h.push(v.longitude),f+=3,j+=I}}var oe=new u;function P(e,i,r,n){return u.clone(i,oe),oe.height=r,u.toCartesian(oe,e,n)}ct.pack=function(e,i,r){et.typeOf.object("value",e),et.defined("array",i);let n=O(r,0),o=e._positions,a=o.length;i[n++]=a;for(let c=0;c<a;++c){let l=o[c];t.pack(l,i,n),n+=3}return i[n++]=e.granularity,i[n++]=e.loop?1:0,i[n++]=e.arcType,z.pack(e._ellipsoid,i,n),n+=z.packedLength,i[n++]=e._projectionIndex,i[n++]=e._scene3DOnly?1:0,i};ct.unpack=function(e,i,r){et.defined("array",e);let n=O(i,0),o=e[n++],a=new Array(o);for(let S=0;S<o;S++)a[S]=t.unpack(e,n),n+=3;let c=e[n++],l=e[n++]===1,s=e[n++],d=z.unpack(e,n);n+=z.packedLength;let h=e[n++],N=e[n++]===1;return g(r)||(r=new ct({positions:a})),r._positions=a,r.granularity=c,r.loop=l,r.arcType=s,r._ellipsoid=d,r._projectionIndex=h,r._scene3DOnly=N,r};function nt(e,i,r){return t.subtract(e,i,r),t.normalize(r,r),r}function be(e,i,r,n){return n=nt(e,i,n),n=t.cross(n,r,n),n=t.normalize(n,n),n=t.cross(r,n,n),n}var Sn=new t,Tn=new t,En=new t,en=new t,xn=0,Nn=-1;function ie(e,i,r,n,o){let a=nt(r,i,en),c=be(e,i,a,Sn),l=be(n,i,a,Tn);if(p.equalsEpsilon(t.dot(c,l),Nn,p.EPSILON5))return o=t.cross(a,c,o),o=t.normalize(o,o),o;o=t.add(l,c,o),o=t.normalize(o,o);let s=t.cross(a,o,En);return t.dot(l,s)<xn&&(o=t.negate(o,o)),o}var Ut=jt.fromPointNormal(t.ZERO,t.UNIT_Y),Cn=new t,_n=new t,Ln=new t,On=new t,Dn=new t,Yt=new t,Ft=new u,ve=new u,Be=new u;ct.createGeometry=function(e){let i=!e._scene3DOnly,r=e.loop,n=e._ellipsoid,o=e.granularity,a=e.arcType,c=new le[e._projectionIndex](n),l=Qe,s=tn,d,h,N=e._positions,S=N.length;S===2&&(r=!1);let R,D,I,j,W=new te(void 0,void 0,n),f,X,v,y=[N[0]];for(h=0;h<S-1;h++)R=N[h],D=N[h+1],f=Qt.lineSegmentPlane(R,D,Ut,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&(e.arcType===Z.GEODESIC?y.push(t.clone(f)):e.arcType===Z.RHUMB&&(v=n.cartesianToCartographic(f,Ft).longitude,I=n.cartesianToCartographic(R,Ft),j=n.cartesianToCartographic(D,ve),W.setEndPoints(I,j),X=W.findIntersectionWithLongitude(v,Be),f=n.cartographicToCartesian(X,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&y.push(t.clone(f)))),y.push(D);r&&(R=N[S-1],D=N[0],f=Qt.lineSegmentPlane(R,D,Ut,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&(e.arcType===Z.GEODESIC?y.push(t.clone(f)):e.arcType===Z.RHUMB&&(v=n.cartesianToCartographic(f,Ft).longitude,I=n.cartesianToCartographic(R,Ft),j=n.cartesianToCartographic(D,ve),W.setEndPoints(I,j),X=W.findIntersectionWithLongitude(v,Be),f=n.cartographicToCartesian(X,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&y.push(t.clone(f)))));let H=y.length,C=new Array(H);for(h=0;h<H;h++){let F=u.fromCartesian(y[h],n);F.height=0,C[h]=F}if(C=Le(C,u.equalsEpsilon),H=C.length,H<2)return;let k=[],b=[],B=[],E=[],x=Cn,L=_n,_=Ln,Y=On,A=Dn,m=C[0],V=C[1],It=C[H-1];for(x=P(n,It,l,x),Y=P(n,V,l,Y),L=P(n,m,l,L),_=P(n,m,s,_),r?A=ie(x,L,_,Y,A):A=se(m,V,s,n,A),t.pack(A,b,0),t.pack(L,B,0),t.pack(_,E,0),k.push(m.latitude),k.push(m.longitude),ne(m,V,l,s,o,a,n,b,B,E,k),h=1;h<H-1;++h){x=t.clone(L,x),L=t.clone(Y,L);let F=C[h];P(n,F,s,_),P(n,C[h+1],l,Y),ie(x,L,_,Y,A),d=b.length,t.pack(A,b,d),t.pack(L,B,d),t.pack(_,E,d),k.push(F.latitude),k.push(F.longitude),ne(C[h],C[h+1],l,s,o,a,n,b,B,E,k)}let M=C[H-1],Tt=C[H-2];if(L=P(n,M,l,L),_=P(n,M,s,_),r){let F=C[0];x=P(n,Tt,l,x),Y=P(n,F,l,Y),A=ie(x,L,_,Y,A)}else A=se(Tt,M,s,n,A);if(d=b.length,t.pack(A,b,d),t.pack(L,B,d),t.pack(_,E,d),k.push(M.latitude),k.push(M.longitude),r){for(ne(M,m,l,s,o,a,n,b,B,E,k),d=b.length,h=0;h<3;++h)b[d+h]=b[h],B[d+h]=B[h],E[d+h]=E[h];k.push(m.latitude),k.push(m.longitude)}return Qn(r,c,B,E,b,k,i)};var In=new t,Hn=new bt,kn=new Kt;function ze(e,i,r,n){let o=nt(r,i,In),a=t.dot(o,e);if(a>Ke||a<Me){let c=nt(n,r,en),l=a<Me?p.PI_OVER_TWO:-p.PI_OVER_TWO,s=Kt.fromAxisAngle(c,l,kn),d=bt.fromQuaternion(s,Hn);return bt.multiplyByVector(d,e,e),!0}return!1}var je=new u,yn=new t,Xe=new t;function Dt(e,i,r,n,o){let a=u.toCartesian(i,e._ellipsoid,yn),c=t.add(a,r,Xe),l=!1,s=e._ellipsoid,d=s.cartesianToCartographic(c,je);Math.abs(i.longitude-d.longitude)>p.PI_OVER_TWO&&(l=!0,c=t.subtract(a,r,Xe),d=s.cartesianToCartographic(c,je)),d.height=0;let h=e.project(d,o);return o=t.subtract(h,n,o),o.z=0,o=t.normalize(o,o),l&&t.negate(o,o),o}var An=new t,Ye=new t;function Fe(e,i,r,n,o,a){let c=t.subtract(i,e,An);t.normalize(c,c);let l=r-Qe,s=t.multiplyByScalar(c,l,Ye);t.add(e,s,o);let d=n-tn;s=t.multiplyByScalar(c,d,Ye),t.add(i,s,a)}var Mn=new t;function Gt(e,i){let r=jt.getPointDistance(Ut,e),n=jt.getPointDistance(Ut,i),o=Mn;p.equalsEpsilon(r,0,p.EPSILON2)?(o=nt(i,e,o),t.multiplyByScalar(o,p.EPSILON2,o),t.add(e,o,e)):p.equalsEpsilon(n,0,p.EPSILON2)&&(o=nt(e,i,o),t.multiplyByScalar(o,p.EPSILON2,o),t.add(i,o,i))}function Rn(e,i){let r=Math.abs(e.longitude),n=Math.abs(i.longitude);if(p.equalsEpsilon(r,p.PI,p.EPSILON11)){let o=p.sign(i.longitude);return e.longitude=o*(r-p.EPSILON11),1}else if(p.equalsEpsilon(n,p.PI,p.EPSILON11)){let o=p.sign(e.longitude);return i.longitude=o*(n-p.EPSILON11),2}return 0}var nn=new u,on=new u,Ge=new t,re=new t,Ue=new t,We=new t,Pn=new t,qe=new t,bn=[nn,on],vn=new G,Bn=new t,zn=new t,jn=new t,Xn=new t,Yn=new t,Fn=new t,ae=new t,ce=new t,Gn=new t,Un=new t,Wn=new t,Ze=new t,qn=new t,Zn=new t,Vn=new _t,$n=new _t,Ve=new t,Jn=new t,$e=new t,Kn=[new U,new U],rn=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],Je=rn.length;function Qn(e,i,r,n,o,a,c){let l,s,d=i._ellipsoid,h=r.length/3-1,N=h*8,S=N*4,R=h*36,D=N>65535?new Uint32Array(R):new Uint16Array(R),I=new Float64Array(N*3),j=new Float32Array(S),W=new Float32Array(S),f=new Float32Array(S),X=new Float32Array(S),v=new Float32Array(S),y,H,C,k;c&&(y=new Float32Array(S),H=new Float32Array(S),C=new Float32Array(S),k=new Float32Array(N*2));let b=a.length/2,B=0,E=nn;E.height=0;let x=on;x.height=0;let L=Ge,_=re;if(c)for(s=0,l=1;l<b;l++)E.latitude=a[s],E.longitude=a[s+1],x.latitude=a[s+2],x.longitude=a[s+3],L=i.project(E,L),_=i.project(x,_),B+=t.distance(L,_),s+=2;let Y=n.length/3;_=t.unpack(n,0,_);let A=0;for(s=3,l=1;l<Y;l++)L=t.clone(_,L),_=t.unpack(n,s,_),A+=t.distance(L,_),s+=3;let m;s=3;let V=0,It=0,M=0,Tt=0,F=!1,st=t.unpack(r,0,We),lt=t.unpack(n,0,re),q=t.unpack(o,0,qe);if(e){let ht=t.unpack(r,r.length-6,Ue);ze(q,ht,st,lt)&&(q=t.negate(q,q))}let pe=0,de=0,Wt=0;for(l=0;l<h;l++){let ht=t.clone(st,Ue),Zt=t.clone(lt,Ge),mt=t.clone(q,Pn);F&&(mt=t.negate(mt,mt)),st=t.unpack(r,s,We),lt=t.unpack(n,s,re),q=t.unpack(o,s,qe),F=ze(q,ht,st,lt),E.latitude=a[V],E.longitude=a[V+1],x.latitude=a[V+2],x.longitude=a[V+3];let pt,gt,ot,it;if(c){let T=Rn(E,x);pt=i.project(E,Yn),gt=i.project(x,Fn);let wt=nt(gt,pt,Ve);wt.y=Math.abs(wt.y),ot=ae,it=ce,T===0||t.dot(wt,t.UNIT_Y)>Ke?(ot=Dt(i,E,mt,pt,ae),it=Dt(i,x,q,gt,ce)):T===1?(it=Dt(i,x,q,gt,ce),ot.x=0,ot.y=p.sign(E.longitude-Math.abs(x.longitude)),ot.z=0):(ot=Dt(i,E,mt,pt,ae),it.x=0,it.y=p.sign(E.longitude-x.longitude),it.z=0)}let ge=t.distance(Zt,lt),ue=_t.fromCartesian(ht,Vn),Ht=t.subtract(st,ht,Gn),an=t.normalize(Ht,Ze),xt=t.subtract(Zt,ht,Un);xt=t.normalize(xt,xt);let ut=t.cross(an,xt,Ze);ut=t.normalize(ut,ut);let kt=t.cross(xt,mt,qn);kt=t.normalize(kt,kt);let yt=t.subtract(lt,st,Wn);yt=t.normalize(yt,yt);let At=t.cross(q,yt,Zn);At=t.normalize(At,At);let cn=ge/A,sn=pe/A,Vt=0,Nt,Mt,dt,we=0,Se=0;if(c){Vt=t.distance(pt,gt),Nt=_t.fromCartesian(pt,$n),Mt=t.subtract(gt,pt,Ve),dt=t.normalize(Mt,Jn);let T=dt.x;dt.x=dt.y,dt.y=-T,we=Vt/B,Se=de/B}for(m=0;m<8;m++){let T=Tt+m*4,wt=It+m*2,Ct=T+3,Ee=m<4?1:-1,Rt=m===2||m===3||m===6||m===7?1:-1;t.pack(ue.high,j,T),j[Ct]=Ht.x,t.pack(ue.low,W,T),W[Ct]=Ht.y,t.pack(kt,f,T),f[Ct]=Ht.z,t.pack(At,X,T),X[Ct]=cn*Ee,t.pack(ut,v,T);let ft=sn*Rt;ft===0&&Rt<0&&(ft=9),v[Ct]=ft,c&&(y[T]=Nt.high.x,y[T+1]=Nt.high.y,y[T+2]=Nt.low.x,y[T+3]=Nt.low.y,C[T]=-ot.y,C[T+1]=ot.x,C[T+2]=it.y,C[T+3]=-it.x,H[T]=Mt.x,H[T+1]=Mt.y,H[T+2]=dt.x,H[T+3]=dt.y,k[wt]=we*Ee,ft=Se*Rt,ft===0&&Rt<0&&(ft=9),k[wt+1]=ft)}let $=jn,J=Xn,K=Bn,Q=zn,ln=G.fromCartographicArray(bn,vn),Te=Xt.getMinimumMaximumHeights(ln,d),$t=Te.minimumTerrainHeight,Jt=Te.maximumTerrainHeight;Wt+=Math.abs($t),Wt+=Math.abs(Jt),Fe(ht,Zt,$t,Jt,$,K),Fe(st,lt,$t,Jt,J,Q);let tt=t.multiplyByScalar(ut,p.EPSILON5,$e);t.add($,tt,$),t.add(J,tt,J),t.add(K,tt,K),t.add(Q,tt,Q),Gt($,J),Gt(K,Q),t.pack($,I,M),t.pack(J,I,M+3),t.pack(Q,I,M+6),t.pack(K,I,M+9),tt=t.multiplyByScalar(ut,-2*p.EPSILON5,$e),t.add($,tt,$),t.add(J,tt,J),t.add(K,tt,K),t.add(Q,tt,Q),Gt($,J),Gt(K,Q),t.pack($,I,M+12),t.pack(J,I,M+15),t.pack(Q,I,M+18),t.pack(K,I,M+21),V+=2,s+=3,It+=16,M+=24,Tt+=32,pe+=ge,de+=Vt}s=0;let fe=0;for(l=0;l<h;l++){for(m=0;m<Je;m++)D[s+m]=rn[m]+fe;fe+=8,s+=Je}let qt=Kn;U.fromVertices(r,t.ZERO,3,qt[0]),U.fromVertices(n,t.ZERO,3,qt[1]);let me=U.fromBoundingSpheres(qt);me.radius+=Wt/(h*2);let Et={position:new zt({componentDatatype:vt.DOUBLE,componentsPerAttribute:3,normalize:!1,values:I}),startHiAndForwardOffsetX:at(j),startLoAndForwardOffsetY:at(W),startNormalAndForwardOffsetZ:at(f),endNormalAndTextureCoordinateNormalizationX:at(X),rightNormalAndTextureCoordinateNormalizationY:at(v)};return c&&(Et.startHiLo2D=at(y),Et.offsetAndRight2D=at(H),Et.startEndNormals2D=at(C),Et.texcoordNormalization2D=new zt({componentDatatype:vt.FLOAT,componentsPerAttribute:2,normalize:!1,values:k})),new Ce({attributes:Et,indices:D,boundingSphere:me})}function at(e){return new zt({componentDatatype:vt.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}ct._projectNormal=Dt;var he=ct;function to(e,i){return Xt.initialize().then(function(){return g(i)&&(e=he.unpack(e,i)),he.createGeometry(e)})}var ti=to;export{ti as default};
|
|
26
|
+
import{a as _e}from"./chunk-D776FCVJ.js";import{a as Z}from"./chunk-D3CSG3S2.js";import{a as _t}from"./chunk-34X2ZL32.js";import{a as Oe}from"./chunk-3FCK4U2N.js";import{a as Le}from"./chunk-6IQGHKR5.js";import{a as te}from"./chunk-P2A4LTBW.js";import{b as Qt}from"./chunk-NW4BJ3IZ.js";import{a as jt}from"./chunk-QC664SDS.js";import{c as Ce,d as zt}from"./chunk-6V3AGY4C.js";import{a as bt,d as G}from"./chunk-MNKVHNSN.js";import{d as xe,e as Ne,f as Kt,h as U}from"./chunk-QLA567VU.js";import{a as Bt}from"./chunk-23HMYUSJ.js";import{a as t,b as u,c as Pt,d as z,e as vt}from"./chunk-EBGE3XTZ.js";import{a as p}from"./chunk-VEDHIHCJ.js";import"./chunk-PQF7YB7C.js";import"./chunk-TBESXZ5I.js";import{a as O}from"./chunk-YXBVEKWI.js";import{a as St,b as et}from"./chunk-J63AP2GZ.js";import{e as g}from"./chunk-LPL3F3FU.js";function rt(e){e=O(e,O.EMPTY_OBJECT),this._ellipsoid=O(e.ellipsoid,z.default),this._rectangle=O(e.rectangle,U.MAX_VALUE),this._projection=new bt(this._ellipsoid),this._numberOfLevelZeroTilesX=O(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=O(e.numberOfLevelZeroTilesY,1)}Object.defineProperties(rt.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});rt.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e};rt.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e};rt.prototype.rectangleToNativeRectangle=function(e,i){et.defined("rectangle",e);let r=p.toDegrees(e.west),n=p.toDegrees(e.south),o=p.toDegrees(e.east),a=p.toDegrees(e.north);return g(i)?(i.west=r,i.south=n,i.east=o,i.north=a,i):new U(r,n,o,a)};rt.prototype.tileXYToNativeRectangle=function(e,i,r,n){let o=this.tileXYToRectangle(e,i,r,n);return o.west=p.toDegrees(o.west),o.south=p.toDegrees(o.south),o.east=p.toDegrees(o.east),o.north=p.toDegrees(o.north),o};rt.prototype.tileXYToRectangle=function(e,i,r,n){let o=this._rectangle,a=this.getNumberOfXTilesAtLevel(r),c=this.getNumberOfYTilesAtLevel(r),l=o.width/a,s=e*l+o.west,d=(e+1)*l+o.west,h=o.height/c,N=o.north-i*h,S=o.north-(i+1)*h;return g(n)||(n=new U(s,S,d,N)),n.west=s,n.south=S,n.east=d,n.north=N,n};rt.prototype.positionToTileXY=function(e,i,r){let n=this._rectangle;if(!U.contains(n,e))return;let o=this.getNumberOfXTilesAtLevel(i),a=this.getNumberOfYTilesAtLevel(i),c=n.width/o,l=n.height/a,s=e.longitude;n.east<n.west&&(s+=p.TWO_PI);let d=(s-n.west)/c|0;d>=o&&(d=o-1);let h=(n.north-e.latitude)/l|0;return h>=a&&(h=a-1),g(r)?(r.x=d,r.y=h,r):new Pt(d,h)};var De=rt;var Ie=new t,He=new t,ke=new u,ee=new t,hn=new t,ye=new G,pn=new De,Lt=[new u,new u,new u,new u],Ot=new Pt,w={};w.initialize=function(){let e=w._initPromise;return g(e)||(e=xe.fetchJson(Ne("Assets/approximateTerrainHeights.json")).then(function(i){w._terrainHeights=i}),w._initPromise=e),e};w.getMinimumMaximumHeights=function(e,i){if(et.defined("rectangle",e),!g(w._terrainHeights))throw new St("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");i=O(i,z.default);let r=Ae(e),n=w._defaultMinTerrainHeight,o=w._defaultMaxTerrainHeight;if(g(r)){let a=`${r.level}-${r.x}-${r.y}`,c=w._terrainHeights[a];g(c)&&(n=c[0],o=c[1]),i.cartographicToCartesian(U.northeast(e,ke),Ie),i.cartographicToCartesian(U.southwest(e,ke),He),t.midpoint(He,Ie,ee);let l=i.scaleToGeodeticSurface(ee,hn);if(g(l)){let s=t.distance(ee,l);n=Math.min(n,-s)}else n=w._defaultMinTerrainHeight}return n=Math.max(w._defaultMinTerrainHeight,n),{minimumTerrainHeight:n,maximumTerrainHeight:o}};w.getBoundingSphere=function(e,i){if(et.defined("rectangle",e),!g(w._terrainHeights))throw new St("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");i=O(i,z.default);let r=Ae(e),n=w._defaultMaxTerrainHeight;if(g(r)){let a=`${r.level}-${r.x}-${r.y}`,c=w._terrainHeights[a];g(c)&&(n=c[1])}let o=G.fromRectangle3D(e,i,0);return G.fromRectangle3D(e,i,n,ye),G.union(o,ye,o)};function Ae(e){u.fromRadians(e.east,e.north,0,Lt[0]),u.fromRadians(e.west,e.north,0,Lt[1]),u.fromRadians(e.east,e.south,0,Lt[2]),u.fromRadians(e.west,e.south,0,Lt[3]);let i=0,r=0,n=0,o=0,a=w._terrainHeightsMaxLevel,c;for(c=0;c<=a;++c){let l=!1;for(let s=0;s<4;++s){let d=Lt[s];if(pn.positionToTileXY(d,c,Ot),s===0)n=Ot.x,o=Ot.y;else if(n!==Ot.x||o!==Ot.y){l=!0;break}}if(l)break;i=n,r=o}if(c!==0)return{x:i,y:r,level:c>a?a:c-1}}w._terrainHeightsMaxLevel=6;w._defaultMaxTerrainHeight=9e3;w._defaultMinTerrainHeight=-1e5;w._terrainHeights=void 0;w._initPromise=void 0;Object.defineProperties(w,{initialized:{get:function(){return g(w._terrainHeights)}}});var Xt=w;var le=[bt,_e],dn=le.length,Ke=Math.cos(p.toRadians(30)),Me=Math.cos(p.toRadians(150)),Qe=0,tn=1e3;function ct(e){e=O(e,O.EMPTY_OBJECT);let i=e.positions;if(!g(i)||i.length<2)throw new St("At least two positions are required.");if(g(e.arcType)&&e.arcType!==Z.GEODESIC&&e.arcType!==Z.RHUMB)throw new St("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=O(e.width,1),this._positions=i,this.granularity=O(e.granularity,9999),this.loop=O(e.loop,!1),this.arcType=O(e.arcType,Z.GEODESIC),this._ellipsoid=z.default,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(ct.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+z.packedLength+1+1}}});ct.setProjectionAndEllipsoid=function(e,i){let r=0;for(let n=0;n<dn;n++)if(i instanceof le[n]){r=n;break}e._projectionIndex=r,e._ellipsoid=i.ellipsoid};var fn=new t,Re=new t,Pe=new t;function se(e,i,r,n,o){let a=P(n,e,0,fn),c=P(n,e,r,Re),l=P(n,i,0,Pe),s=nt(c,a,Re),d=nt(l,a,Pe);return t.cross(d,s,o),t.normalize(o,o)}var mn=new u,gn=new t,un=new t,wn=new t;function ne(e,i,r,n,o,a,c,l,s,d,h){if(o===0)return;let N;a===Z.GEODESIC?N=new Oe(e,i,c):a===Z.RHUMB&&(N=new te(e,i,c));let S=N.surfaceDistance;if(S<o)return;let R=se(e,i,n,c,wn),D=Math.ceil(S/o),I=S/D,j=I,q=D-1,f=l.length;for(let X=0;X<q;X++){let v=N.interpolateUsingSurfaceDistance(j,mn),y=P(c,v,r,gn),H=P(c,v,n,un);t.pack(R,l,f),t.pack(y,s,f),t.pack(H,d,f),h.push(v.latitude),h.push(v.longitude),f+=3,j+=I}}var oe=new u;function P(e,i,r,n){return u.clone(i,oe),oe.height=r,u.toCartesian(oe,e,n)}ct.pack=function(e,i,r){et.typeOf.object("value",e),et.defined("array",i);let n=O(r,0),o=e._positions,a=o.length;i[n++]=a;for(let c=0;c<a;++c){let l=o[c];t.pack(l,i,n),n+=3}return i[n++]=e.granularity,i[n++]=e.loop?1:0,i[n++]=e.arcType,z.pack(e._ellipsoid,i,n),n+=z.packedLength,i[n++]=e._projectionIndex,i[n++]=e._scene3DOnly?1:0,i};ct.unpack=function(e,i,r){et.defined("array",e);let n=O(i,0),o=e[n++],a=new Array(o);for(let S=0;S<o;S++)a[S]=t.unpack(e,n),n+=3;let c=e[n++],l=e[n++]===1,s=e[n++],d=z.unpack(e,n);n+=z.packedLength;let h=e[n++],N=e[n++]===1;return g(r)||(r=new ct({positions:a})),r._positions=a,r.granularity=c,r.loop=l,r.arcType=s,r._ellipsoid=d,r._projectionIndex=h,r._scene3DOnly=N,r};function nt(e,i,r){return t.subtract(e,i,r),t.normalize(r,r),r}function be(e,i,r,n){return n=nt(e,i,n),n=t.cross(n,r,n),n=t.normalize(n,n),n=t.cross(r,n,n),n}var Sn=new t,Tn=new t,En=new t,en=new t,xn=0,Nn=-1;function ie(e,i,r,n,o){let a=nt(r,i,en),c=be(e,i,a,Sn),l=be(n,i,a,Tn);if(p.equalsEpsilon(t.dot(c,l),Nn,p.EPSILON5))return o=t.cross(a,c,o),o=t.normalize(o,o),o;o=t.add(l,c,o),o=t.normalize(o,o);let s=t.cross(a,o,En);return t.dot(l,s)<xn&&(o=t.negate(o,o)),o}var Gt=jt.fromPointNormal(t.ZERO,t.UNIT_Y),Cn=new t,_n=new t,Ln=new t,On=new t,Dn=new t,Yt=new t,Ft=new u,ve=new u,Be=new u;ct.createGeometry=function(e){let i=!e._scene3DOnly,r=e.loop,n=e._ellipsoid,o=e.granularity,a=e.arcType,c=new le[e._projectionIndex](n),l=Qe,s=tn,d,h,N=e._positions,S=N.length;S===2&&(r=!1);let R,D,I,j,q=new te(void 0,void 0,n),f,X,v,y=[N[0]];for(h=0;h<S-1;h++)R=N[h],D=N[h+1],f=Qt.lineSegmentPlane(R,D,Gt,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&(e.arcType===Z.GEODESIC?y.push(t.clone(f)):e.arcType===Z.RHUMB&&(v=n.cartesianToCartographic(f,Ft).longitude,I=n.cartesianToCartographic(R,Ft),j=n.cartesianToCartographic(D,ve),q.setEndPoints(I,j),X=q.findIntersectionWithLongitude(v,Be),f=n.cartographicToCartesian(X,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&y.push(t.clone(f)))),y.push(D);r&&(R=N[S-1],D=N[0],f=Qt.lineSegmentPlane(R,D,Gt,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&(e.arcType===Z.GEODESIC?y.push(t.clone(f)):e.arcType===Z.RHUMB&&(v=n.cartesianToCartographic(f,Ft).longitude,I=n.cartesianToCartographic(R,Ft),j=n.cartesianToCartographic(D,ve),q.setEndPoints(I,j),X=q.findIntersectionWithLongitude(v,Be),f=n.cartographicToCartesian(X,Yt),g(f)&&!t.equalsEpsilon(f,R,p.EPSILON7)&&!t.equalsEpsilon(f,D,p.EPSILON7)&&y.push(t.clone(f)))));let H=y.length,C=new Array(H);for(h=0;h<H;h++){let F=u.fromCartesian(y[h],n);F.height=0,C[h]=F}if(C=Le(C,u.equalsEpsilon),H=C.length,H<2)return;let k=[],b=[],B=[],E=[],x=Cn,L=_n,_=Ln,Y=On,A=Dn,m=C[0],V=C[1],It=C[H-1];for(x=P(n,It,l,x),Y=P(n,V,l,Y),L=P(n,m,l,L),_=P(n,m,s,_),r?A=ie(x,L,_,Y,A):A=se(m,V,s,n,A),t.pack(A,b,0),t.pack(L,B,0),t.pack(_,E,0),k.push(m.latitude),k.push(m.longitude),ne(m,V,l,s,o,a,n,b,B,E,k),h=1;h<H-1;++h){x=t.clone(L,x),L=t.clone(Y,L);let F=C[h];P(n,F,s,_),P(n,C[h+1],l,Y),ie(x,L,_,Y,A),d=b.length,t.pack(A,b,d),t.pack(L,B,d),t.pack(_,E,d),k.push(F.latitude),k.push(F.longitude),ne(C[h],C[h+1],l,s,o,a,n,b,B,E,k)}let M=C[H-1],Tt=C[H-2];if(L=P(n,M,l,L),_=P(n,M,s,_),r){let F=C[0];x=P(n,Tt,l,x),Y=P(n,F,l,Y),A=ie(x,L,_,Y,A)}else A=se(Tt,M,s,n,A);if(d=b.length,t.pack(A,b,d),t.pack(L,B,d),t.pack(_,E,d),k.push(M.latitude),k.push(M.longitude),r){for(ne(M,m,l,s,o,a,n,b,B,E,k),d=b.length,h=0;h<3;++h)b[d+h]=b[h],B[d+h]=B[h],E[d+h]=E[h];k.push(m.latitude),k.push(m.longitude)}return Qn(r,c,B,E,b,k,i)};var In=new t,Hn=new vt,kn=new Kt;function ze(e,i,r,n){let o=nt(r,i,In),a=t.dot(o,e);if(a>Ke||a<Me){let c=nt(n,r,en),l=a<Me?p.PI_OVER_TWO:-p.PI_OVER_TWO,s=Kt.fromAxisAngle(c,l,kn),d=vt.fromQuaternion(s,Hn);return vt.multiplyByVector(d,e,e),!0}return!1}var je=new u,yn=new t,Xe=new t;function Dt(e,i,r,n,o){let a=u.toCartesian(i,e._ellipsoid,yn),c=t.add(a,r,Xe),l=!1,s=e._ellipsoid,d=s.cartesianToCartographic(c,je);Math.abs(i.longitude-d.longitude)>p.PI_OVER_TWO&&(l=!0,c=t.subtract(a,r,Xe),d=s.cartesianToCartographic(c,je)),d.height=0;let h=e.project(d,o);return o=t.subtract(h,n,o),o.z=0,o=t.normalize(o,o),l&&t.negate(o,o),o}var An=new t,Ye=new t;function Fe(e,i,r,n,o,a){let c=t.subtract(i,e,An);t.normalize(c,c);let l=r-Qe,s=t.multiplyByScalar(c,l,Ye);t.add(e,s,o);let d=n-tn;s=t.multiplyByScalar(c,d,Ye),t.add(i,s,a)}var Mn=new t;function Ut(e,i){let r=jt.getPointDistance(Gt,e),n=jt.getPointDistance(Gt,i),o=Mn;p.equalsEpsilon(r,0,p.EPSILON2)?(o=nt(i,e,o),t.multiplyByScalar(o,p.EPSILON2,o),t.add(e,o,e)):p.equalsEpsilon(n,0,p.EPSILON2)&&(o=nt(e,i,o),t.multiplyByScalar(o,p.EPSILON2,o),t.add(i,o,i))}function Rn(e,i){let r=Math.abs(e.longitude),n=Math.abs(i.longitude);if(p.equalsEpsilon(r,p.PI,p.EPSILON11)){let o=p.sign(i.longitude);return e.longitude=o*(r-p.EPSILON11),1}else if(p.equalsEpsilon(n,p.PI,p.EPSILON11)){let o=p.sign(e.longitude);return i.longitude=o*(n-p.EPSILON11),2}return 0}var nn=new u,on=new u,Ue=new t,re=new t,Ge=new t,qe=new t,Pn=new t,We=new t,bn=[nn,on],vn=new U,Bn=new t,zn=new t,jn=new t,Xn=new t,Yn=new t,Fn=new t,ae=new t,ce=new t,Un=new t,Gn=new t,qn=new t,Ze=new t,Wn=new t,Zn=new t,Vn=new _t,$n=new _t,Ve=new t,Jn=new t,$e=new t,Kn=[new G,new G],rn=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],Je=rn.length;function Qn(e,i,r,n,o,a,c){let l,s,d=i._ellipsoid,h=r.length/3-1,N=h*8,S=N*4,R=h*36,D=N>65535?new Uint32Array(R):new Uint16Array(R),I=new Float64Array(N*3),j=new Float32Array(S),q=new Float32Array(S),f=new Float32Array(S),X=new Float32Array(S),v=new Float32Array(S),y,H,C,k;c&&(y=new Float32Array(S),H=new Float32Array(S),C=new Float32Array(S),k=new Float32Array(N*2));let b=a.length/2,B=0,E=nn;E.height=0;let x=on;x.height=0;let L=Ue,_=re;if(c)for(s=0,l=1;l<b;l++)E.latitude=a[s],E.longitude=a[s+1],x.latitude=a[s+2],x.longitude=a[s+3],L=i.project(E,L),_=i.project(x,_),B+=t.distance(L,_),s+=2;let Y=n.length/3;_=t.unpack(n,0,_);let A=0;for(s=3,l=1;l<Y;l++)L=t.clone(_,L),_=t.unpack(n,s,_),A+=t.distance(L,_),s+=3;let m;s=3;let V=0,It=0,M=0,Tt=0,F=!1,st=t.unpack(r,0,qe),lt=t.unpack(n,0,re),W=t.unpack(o,0,We);if(e){let ht=t.unpack(r,r.length-6,Ge);ze(W,ht,st,lt)&&(W=t.negate(W,W))}let pe=0,de=0,qt=0;for(l=0;l<h;l++){let ht=t.clone(st,Ge),Zt=t.clone(lt,Ue),mt=t.clone(W,Pn);F&&(mt=t.negate(mt,mt)),st=t.unpack(r,s,qe),lt=t.unpack(n,s,re),W=t.unpack(o,s,We),F=ze(W,ht,st,lt),E.latitude=a[V],E.longitude=a[V+1],x.latitude=a[V+2],x.longitude=a[V+3];let pt,gt,ot,it;if(c){let T=Rn(E,x);pt=i.project(E,Yn),gt=i.project(x,Fn);let wt=nt(gt,pt,Ve);wt.y=Math.abs(wt.y),ot=ae,it=ce,T===0||t.dot(wt,t.UNIT_Y)>Ke?(ot=Dt(i,E,mt,pt,ae),it=Dt(i,x,W,gt,ce)):T===1?(it=Dt(i,x,W,gt,ce),ot.x=0,ot.y=p.sign(E.longitude-Math.abs(x.longitude)),ot.z=0):(ot=Dt(i,E,mt,pt,ae),it.x=0,it.y=p.sign(E.longitude-x.longitude),it.z=0)}let ge=t.distance(Zt,lt),ue=_t.fromCartesian(ht,Vn),Ht=t.subtract(st,ht,Un),an=t.normalize(Ht,Ze),xt=t.subtract(Zt,ht,Gn);xt=t.normalize(xt,xt);let ut=t.cross(an,xt,Ze);ut=t.normalize(ut,ut);let kt=t.cross(xt,mt,Wn);kt=t.normalize(kt,kt);let yt=t.subtract(lt,st,qn);yt=t.normalize(yt,yt);let At=t.cross(W,yt,Zn);At=t.normalize(At,At);let cn=ge/A,sn=pe/A,Vt=0,Nt,Mt,dt,we=0,Se=0;if(c){Vt=t.distance(pt,gt),Nt=_t.fromCartesian(pt,$n),Mt=t.subtract(gt,pt,Ve),dt=t.normalize(Mt,Jn);let T=dt.x;dt.x=dt.y,dt.y=-T,we=Vt/B,Se=de/B}for(m=0;m<8;m++){let T=Tt+m*4,wt=It+m*2,Ct=T+3,Ee=m<4?1:-1,Rt=m===2||m===3||m===6||m===7?1:-1;t.pack(ue.high,j,T),j[Ct]=Ht.x,t.pack(ue.low,q,T),q[Ct]=Ht.y,t.pack(kt,f,T),f[Ct]=Ht.z,t.pack(At,X,T),X[Ct]=cn*Ee,t.pack(ut,v,T);let ft=sn*Rt;ft===0&&Rt<0&&(ft=9),v[Ct]=ft,c&&(y[T]=Nt.high.x,y[T+1]=Nt.high.y,y[T+2]=Nt.low.x,y[T+3]=Nt.low.y,C[T]=-ot.y,C[T+1]=ot.x,C[T+2]=it.y,C[T+3]=-it.x,H[T]=Mt.x,H[T+1]=Mt.y,H[T+2]=dt.x,H[T+3]=dt.y,k[wt]=we*Ee,ft=Se*Rt,ft===0&&Rt<0&&(ft=9),k[wt+1]=ft)}let $=jn,J=Xn,K=Bn,Q=zn,ln=U.fromCartographicArray(bn,vn),Te=Xt.getMinimumMaximumHeights(ln,d),$t=Te.minimumTerrainHeight,Jt=Te.maximumTerrainHeight;qt+=Math.abs($t),qt+=Math.abs(Jt),Fe(ht,Zt,$t,Jt,$,K),Fe(st,lt,$t,Jt,J,Q);let tt=t.multiplyByScalar(ut,p.EPSILON5,$e);t.add($,tt,$),t.add(J,tt,J),t.add(K,tt,K),t.add(Q,tt,Q),Ut($,J),Ut(K,Q),t.pack($,I,M),t.pack(J,I,M+3),t.pack(Q,I,M+6),t.pack(K,I,M+9),tt=t.multiplyByScalar(ut,-2*p.EPSILON5,$e),t.add($,tt,$),t.add(J,tt,J),t.add(K,tt,K),t.add(Q,tt,Q),Ut($,J),Ut(K,Q),t.pack($,I,M+12),t.pack(J,I,M+15),t.pack(Q,I,M+18),t.pack(K,I,M+21),V+=2,s+=3,It+=16,M+=24,Tt+=32,pe+=ge,de+=Vt}s=0;let fe=0;for(l=0;l<h;l++){for(m=0;m<Je;m++)D[s+m]=rn[m]+fe;fe+=8,s+=Je}let Wt=Kn;G.fromVertices(r,t.ZERO,3,Wt[0]),G.fromVertices(n,t.ZERO,3,Wt[1]);let me=G.fromBoundingSpheres(Wt);me.radius+=qt/(h*2);let Et={position:new zt({componentDatatype:Bt.DOUBLE,componentsPerAttribute:3,normalize:!1,values:I}),startHiAndForwardOffsetX:at(j),startLoAndForwardOffsetY:at(q),startNormalAndForwardOffsetZ:at(f),endNormalAndTextureCoordinateNormalizationX:at(X),rightNormalAndTextureCoordinateNormalizationY:at(v)};return c&&(Et.startHiLo2D=at(y),Et.offsetAndRight2D=at(H),Et.startEndNormals2D=at(C),Et.texcoordNormalization2D=new zt({componentDatatype:Bt.FLOAT,componentsPerAttribute:2,normalize:!1,values:k})),new Ce({attributes:Et,indices:D,boundingSphere:me})}function at(e){return new zt({componentDatatype:Bt.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}ct._projectNormal=Dt;var he=ct;function to(e,i){return Xt.initialize().then(function(){return g(i)&&(e=he.unpack(e,i)),he.createGeometry(e)})}var ti=to;export{ti as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.120.2
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{a as m}from"./chunk-
|
|
26
|
+
import{a as m}from"./chunk-ZHH5JPWV.js";import{a as b}from"./chunk-5JSDDVN4.js";import{b as v,c as x,d as p}from"./chunk-6V3AGY4C.js";import{d as A}from"./chunk-MNKVHNSN.js";import"./chunk-QLA567VU.js";import{a as c}from"./chunk-23HMYUSJ.js";import{a as y}from"./chunk-EBGE3XTZ.js";import"./chunk-VEDHIHCJ.js";import"./chunk-PQF7YB7C.js";import"./chunk-TBESXZ5I.js";import{a as i}from"./chunk-YXBVEKWI.js";import{b as u}from"./chunk-J63AP2GZ.js";import{e as f}from"./chunk-LPL3F3FU.js";function s(r){r=i(r,i.EMPTY_OBJECT);let e=i(r.vertexFormat,m.DEFAULT);this._vertexFormat=e,this._workerName="createPlaneGeometry"}s.packedLength=m.packedLength;s.pack=function(r,e,o){return u.typeOf.object("value",r),u.defined("array",e),o=i(o,0),m.pack(r._vertexFormat,e,o),e};var d=new m,P={vertexFormat:d};s.unpack=function(r,e,o){u.defined("array",r),e=i(e,0);let a=m.unpack(r,e,d);return f(o)?(o._vertexFormat=m.clone(a,o._vertexFormat),o):new s(P)};var F=new y(-.5,-.5,0),l=new y(.5,.5,0);s.createGeometry=function(r){let e=r._vertexFormat,o=new b,a,n;if(e.position){if(n=new Float64Array(4*3),n[0]=F.x,n[1]=F.y,n[2]=0,n[3]=l.x,n[4]=F.y,n[5]=0,n[6]=l.x,n[7]=l.y,n[8]=0,n[9]=F.x,n[10]=l.y,n[11]=0,o.position=new p({componentDatatype:c.DOUBLE,componentsPerAttribute:3,values:n}),e.normal){let t=new Float32Array(12);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=1,t[9]=0,t[10]=0,t[11]=1,o.normal=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}if(e.st){let t=new Float32Array(8);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=1,t[5]=1,t[6]=0,t[7]=1,o.st=new p({componentDatatype:c.FLOAT,componentsPerAttribute:2,values:t})}if(e.tangent){let t=new Float32Array(12);t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=1,t[10]=0,t[11]=0,o.tangent=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}if(e.bitangent){let t=new Float32Array(12);t[0]=0,t[1]=1,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=1,t[8]=0,t[9]=0,t[10]=1,t[11]=0,o.bitangent=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}a=new Uint16Array(2*3),a[0]=0,a[1]=1,a[2]=2,a[3]=0,a[4]=2,a[5]=3}return new x({attributes:o,indices:a,primitiveType:v.TRIANGLES,boundingSphere:new A(y.ZERO,Math.sqrt(2))})};var w=s;function h(r,e){return f(e)&&(r=w.unpack(r,e)),w.createGeometry(r)}var M=h;export{M as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.120.2
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{a as l}from"./chunk-
|
|
26
|
+
import{a as l}from"./chunk-5JSDDVN4.js";import{b as d,c as y,d as s}from"./chunk-6V3AGY4C.js";import{d as c}from"./chunk-MNKVHNSN.js";import"./chunk-QLA567VU.js";import{a as f}from"./chunk-23HMYUSJ.js";import{a}from"./chunk-EBGE3XTZ.js";import"./chunk-VEDHIHCJ.js";import"./chunk-PQF7YB7C.js";import"./chunk-TBESXZ5I.js";import"./chunk-YXBVEKWI.js";import{b as m}from"./chunk-J63AP2GZ.js";import{e as i}from"./chunk-LPL3F3FU.js";function o(){this._workerName="createPlaneOutlineGeometry"}o.packedLength=0;o.pack=function(r,e){return m.defined("value",r),m.defined("array",e),e};o.unpack=function(r,e,t){return m.defined("array",r),i(t)?t:new o};var n=new a(-.5,-.5,0),p=new a(.5,.5,0);o.createGeometry=function(){let r=new l,e=new Uint16Array(4*2),t=new Float64Array(4*3);return t[0]=n.x,t[1]=n.y,t[2]=n.z,t[3]=p.x,t[4]=n.y,t[5]=n.z,t[6]=p.x,t[7]=p.y,t[8]=n.z,t[9]=n.x,t[10]=p.y,t[11]=n.z,r.position=new s({componentDatatype:f.DOUBLE,componentsPerAttribute:3,values:t}),e[0]=0,e[1]=1,e[2]=1,e[3]=2,e[4]=2,e[5]=3,e[6]=3,e[7]=0,new y({attributes:r,indices:e,primitiveType:d.LINES,boundingSphere:new c(a.ZERO,Math.sqrt(2))})};var u=o;function w(r,e){return i(e)&&(r=u.unpack(r,e)),u.createGeometry(r)}var D=w;export{D as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.120.2
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{a as Pt}from"./chunk-2BUTAXOJ.js";import{a as S}from"./chunk-EJ4M7ZWT.js";import{a as X}from"./chunk-STB6TCFY.js";import{a as ft}from"./chunk-4RJDMIO4.js";import{a as It}from"./chunk-5HTTNN4T.js";import"./chunk-D3TZ2KW7.js";import"./chunk-XUP5J7GQ.js";import{a as At}from"./chunk-FRIKFALT.js";import{a as Tt}from"./chunk-ZD25UQM7.js";import{a as dt}from"./chunk-T4QAV6EX.js";import{a as Q}from"./chunk-YJTMGLB7.js";import{a as K}from"./chunk-EH5BIXGS.js";import"./chunk-KLK65KFE.js";import{a as _t,b as at}from"./chunk-GCHOMXEL.js";import"./chunk-4DWHRTTP.js";import"./chunk-4Y673DAX.js";import{a as bt,b as Et}from"./chunk-C4OMKOTM.js";import"./chunk-NVQN2WQZ.js";import{a as ut}from"./chunk-JJYRRIWN.js";import"./chunk-LXL44TDT.js";import{c as pt,d as ot}from"./chunk-7JE52M2E.js";import{d as Ot,f as mt}from"./chunk-Q3IJMJJ2.js";import"./chunk-OPGPRG5D.js";import{c as lt,d as E}from"./chunk-X7PMFMCX.js";import{a as et}from"./chunk-FAMH7QPQ.js";import{a as f,b as Z,c as v,d as U}from"./chunk-ZGGJSLK5.js";import{a as c}from"./chunk-BYGMMPBC.js";import"./chunk-HXIAOT7H.js";import"./chunk-E2BL2RZG.js";import{a as N}from"./chunk-HKVMSEEW.js";import{a as rt,b as G}from"./chunk-Y6JLAJTJ.js";import{e as P}from"./chunk-SOPLNYSA.js";function Dt(t,e){if(!P(t)||!P(e))throw new rt("identifier and message are required.");At(t,e)}var Nt=Dt;function b(t,e){this.position=t,P(this.position)||(this.position=new E),this.tangentPlane=e,P(this.tangentPlane)||(this.tangentPlane=b.NORTH_POLE_TANGENT_PLANE)}Object.defineProperties(b.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=E.magnitude(this.position),e=2*this.ellipsoid.maximumRadius;return this.tangentPlane.plane.normal.z*(c.PI_OVER_TWO-2*Math.atan2(t,e))}},longitude:{get:function(){let t=c.PI_OVER_TWO+Math.atan2(this.y,this.x);return t>Math.PI&&(t-=c.TWO_PI),t}}});var st=new Z,Vt=new f;b.prototype.getLatitude=function(t){P(t)||(t=v.WGS84),st.latitude=this.conformalLatitude,st.longitude=this.longitude,st.height=0;let e=this.ellipsoid.cartographicToCartesian(st,Vt);return t.cartesianToCartographic(e,st),st.latitude};var Mt=new bt,Bt=new f,jt=new f;b.fromCartesian=function(t,e){G.defined("cartesian",t);let o=c.signNotZero(t.z),n=b.NORTH_POLE_TANGENT_PLANE,i=b.SOUTH_POLE;o<0&&(n=b.SOUTH_POLE_TANGENT_PLANE,i=b.NORTH_POLE);let r=Mt;r.origin=n.ellipsoid.scaleToGeocentricSurface(t,r.origin),r.direction=f.subtract(r.origin,i,Bt),f.normalize(r.direction,r.direction);let a=Et.rayPlane(r,n.plane,jt),h=f.subtract(a,i,a),l=f.dot(n.xAxis,h),u=o*f.dot(n.yAxis,h);return P(e)?(e.position=new E(l,u),e.tangentPlane=n,e):new b(new E(l,u),n)};b.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]=b.fromCartesian(t[n],e[n]);return e};b.clone=function(t,e){if(P(t))return P(e)?(e.position=t.position,e.tangentPlane=t.tangentPlane,e):new b(t.position,t.tangentPlane)};b.HALF_UNIT_SPHERE=Object.freeze(new v(.5,.5,.5));b.NORTH_POLE=Object.freeze(new f(0,0,.5));b.SOUTH_POLE=Object.freeze(new f(0,0,-.5));b.NORTH_POLE_TANGENT_PLANE=Object.freeze(new K(b.NORTH_POLE,b.HALF_UNIT_SPHERE));b.SOUTH_POLE_TANGENT_PLANE=Object.freeze(new K(b.SOUTH_POLE,b.HALF_UNIT_SPHERE));var k=b;var Wt=new Z,Ht=new Z;function Gt(t,e,o,n){let r=n.cartesianToCartographic(t,Wt).height,a=n.cartesianToCartographic(e,Ht);a.height=r,n.cartographicToCartesian(a,e);let h=n.cartesianToCartographic(o,Ht);h.height=r-100,n.cartographicToCartesian(h,o)}var Ct=new Pt,kt=new f,zt=new f,Ut=new f,Yt=new f,qt=new f,Qt=new f,gt=new f,J=new f,ct=new f,Jt=new E,Zt=new E,Kt=new f,xt=new mt,Xt=new U,$t=new U;function wt(t){let e=t.vertexFormat,o=t.geometry,n=t.shadowVolume,i=o.attributes.position.values,r=P(o.attributes.st)?o.attributes.st.values:void 0,a=i.length,h=t.wall,l=t.top||h,u=t.bottom||h;if(e.st||e.normal||e.tangent||e.bitangent||n){let g=t.boundingRectangle,s=t.rotationAxis,O=t.projectTo2d,H=t.ellipsoid,B=t.stRotation,C=t.perPositionHeight,R=Jt;R.x=g.x,R.y=g.y;let V=e.st?new Float32Array(2*(a/3)):void 0,d;e.normal&&(C&&l&&!h?d=o.attributes.normal.values:d=new Float32Array(a));let I=e.tangent?new Float32Array(a):void 0,A=e.bitangent?new Float32Array(a):void 0,F=n?new Float32Array(a):void 0,w=0,y=0,T=zt,m=Ut,_=Yt,j=!0,q=Xt,$=$t;if(B!==0){let M=mt.fromAxisAngle(s,B,xt);q=U.fromQuaternion(M,q),M=mt.fromAxisAngle(s,-B,xt),$=U.fromQuaternion(M,$)}else q=U.clone(U.IDENTITY,q),$=U.clone(U.IDENTITY,$);let p=0,L=0;l&&u&&(p=a/2,L=a/3,a/=2);for(let M=0;M<a;M+=3){let W=f.fromArray(i,M,Kt);if(e.st&&!P(r)){let x=U.multiplyByVector(q,W,kt);x=H.scaleToGeodeticSurface(x,x);let D=O(x,Zt);E.subtract(D,R,D);let tt=c.clamp(D.x/g.width,0,1),it=c.clamp(D.y/g.height,0,1);u&&(V[w+L]=tt,V[w+1+L]=it),l&&(V[w]=tt,V[w+1]=it),w+=2}if(e.normal||e.tangent||e.bitangent||n){let x=y+1,D=y+2;if(h){if(M+3<a){let tt=f.fromArray(i,M+3,qt);if(j){let it=f.fromArray(i,M+a,Qt);C&&Gt(W,tt,it,H),f.subtract(tt,W,tt),f.subtract(it,W,it),T=f.normalize(f.cross(it,tt,T),T),j=!1}f.equalsEpsilon(tt,W,c.EPSILON10)&&(j=!0)}(e.tangent||e.bitangent)&&(_=H.geodeticSurfaceNormal(W,_),e.tangent&&(m=f.normalize(f.cross(_,T,m),m)))}else T=H.geodeticSurfaceNormal(W,T),(e.tangent||e.bitangent)&&(C&&(gt=f.fromArray(d,y,gt),J=f.cross(f.UNIT_Z,gt,J),J=f.normalize(U.multiplyByVector($,J,J),J),e.bitangent&&(ct=f.normalize(f.cross(gt,J,ct),ct))),m=f.cross(f.UNIT_Z,T,m),m=f.normalize(U.multiplyByVector($,m,m),m),e.bitangent&&(_=f.normalize(f.cross(T,m,_),_)));e.normal&&(t.wall?(d[y+p]=T.x,d[x+p]=T.y,d[D+p]=T.z):u&&(d[y+p]=-T.x,d[x+p]=-T.y,d[D+p]=-T.z),(l&&!C||h)&&(d[y]=T.x,d[x]=T.y,d[D]=T.z)),n&&(h&&(T=H.geodeticSurfaceNormal(W,T)),F[y+p]=-T.x,F[x+p]=-T.y,F[D+p]=-T.z),e.tangent&&(t.wall?(I[y+p]=m.x,I[x+p]=m.y,I[D+p]=m.z):u&&(I[y+p]=-m.x,I[x+p]=-m.y,I[D+p]=-m.z),l&&(C?(I[y]=J.x,I[x]=J.y,I[D]=J.z):(I[y]=m.x,I[x]=m.y,I[D]=m.z))),e.bitangent&&(u&&(A[y+p]=_.x,A[x+p]=_.y,A[D+p]=_.z),l&&(C?(A[y]=ct.x,A[x]=ct.y,A[D]=ct.z):(A[y]=_.x,A[x]=_.y,A[D]=_.z))),y+=3}}e.st&&!P(r)&&(o.attributes.st=new ot({componentDatatype:et.FLOAT,componentsPerAttribute:2,values:V})),e.normal&&(o.attributes.normal=new ot({componentDatatype:et.FLOAT,componentsPerAttribute:3,values:d})),e.tangent&&(o.attributes.tangent=new ot({componentDatatype:et.FLOAT,componentsPerAttribute:3,values:I})),e.bitangent&&(o.attributes.bitangent=new ot({componentDatatype:et.FLOAT,componentsPerAttribute:3,values:A})),n&&(o.attributes.extrudeDirection=new ot({componentDatatype:et.FLOAT,componentsPerAttribute:3,values:F}))}if(t.extrude&&P(t.offsetAttribute)){let g=i.length/3,s=new Uint8Array(g);if(t.offsetAttribute===dt.TOP)l&&u||h?s=s.fill(1,0,g/2):l&&(s=s.fill(1));else{let O=t.offsetAttribute===dt.NONE?0:1;s=s.fill(O)}o.attributes.applyOffset=new ot({componentDatatype:et.UNSIGNED_BYTE,componentsPerAttribute:1,values:s})}return o}var te=new Z,ee=new Z,nt={westOverIDL:0,eastOverIDL:0},ht=new Tt;function oe(t,e,o,n,i){if(i=N(i,new lt),!P(t)||t.length<3)return i.west=0,i.north=0,i.south=0,i.east=0,i;if(o===X.RHUMB)return lt.fromCartesianArray(t,e,i);ht.ellipsoid.equals(e)||(ht=new Tt(void 0,void 0,e)),i.west=Number.POSITIVE_INFINITY,i.east=Number.NEGATIVE_INFINITY,i.south=Number.POSITIVE_INFINITY,i.north=Number.NEGATIVE_INFINITY,nt.westOverIDL=Number.POSITIVE_INFINITY,nt.eastOverIDL=Number.NEGATIVE_INFINITY;let r=1/c.chordLength(n,e.maximumRadius),a=t.length,h=e.cartesianToCartographic(t[0],ee),l=te,u;for(let g=1;g<a;g++)u=l,l=h,h=e.cartesianToCartographic(t[g],u),ht.setEndPoints(l,h),Rt(ht,r,i,nt);return u=l,l=h,h=e.cartesianToCartographic(t[0],u),ht.setEndPoints(l,h),Rt(ht,r,i,nt),i.east-i.west>nt.eastOverIDL-nt.westOverIDL&&(i.west=nt.westOverIDL,i.east=nt.eastOverIDL,i.east>c.PI&&(i.east=i.east-c.TWO_PI),i.west>c.PI&&(i.west=i.west-c.TWO_PI)),i}var ne=new Z;function Rt(t,e,o,n){let i=t.surfaceDistance,r=Math.ceil(i*e),a=r>0?i/(r-1):Number.POSITIVE_INFINITY,h=0;for(let l=0;l<r;l++){let u=t.interpolateUsingSurfaceDistance(h,ne);h+=a;let g=u.longitude,s=u.latitude;o.west=Math.min(o.west,g),o.east=Math.max(o.east,g),o.south=Math.min(o.south,s),o.north=Math.max(o.north,s);let O=g>=0?g:g+c.TWO_PI;n.westOverIDL=Math.min(n.westOverIDL,O),n.eastOverIDL=Math.max(n.eastOverIDL,O)}}var Lt=[];function ie(t,e,o,n,i,r,a,h,l,u){let g={walls:[]},s;if(a||h){let d=S.createGeometryFromPositions(t,e,o,n,r,l,u),I=d.attributes.position.values,A=d.indices,F,w;if(a&&h){let y=I.concat(I);F=y.length/3,w=ut.createTypedArray(F,A.length*2),w.set(A);let T=A.length,m=F/2;for(s=0;s<T;s+=3){let _=w[s]+m,j=w[s+1]+m,q=w[s+2]+m;w[s+T]=q,w[s+1+T]=j,w[s+2+T]=_}if(d.attributes.position.values=y,r&&l.normal){let _=d.attributes.normal.values;d.attributes.normal.values=new Float32Array(y.length),d.attributes.normal.values.set(_)}if(l.st&&P(o)){let _=d.attributes.st.values;d.attributes.st.values=new Float32Array(F*2),d.attributes.st.values=_.concat(_)}d.indices=w}else if(h){for(F=I.length/3,w=ut.createTypedArray(F,A.length),s=0;s<A.length;s+=3)w[s]=A[s+2],w[s+1]=A[s+1],w[s+2]=A[s];d.indices=w}g.topAndBottom=new ft({geometry:d})}let O=i.outerRing,H=K.fromPoints(O,t),B=H.projectPointsOntoPlane(O,Lt),C=at.computeWindingOrder2D(B);C===_t.CLOCKWISE&&(O=O.slice().reverse());let R=S.computeWallGeometry(O,o,t,n,r,u);g.walls.push(new ft({geometry:R}));let V=i.holes;for(s=0;s<V.length;s++){let d=V[s];B=H.projectPointsOntoPlane(d,Lt),C=at.computeWindingOrder2D(B),C===_t.COUNTER_CLOCKWISE&&(d=d.slice().reverse()),R=S.computeWallGeometry(d,o,t,n,r,u),g.walls.push(new ft({geometry:R}))}return g}function z(t){if(G.typeOf.object("options",t),G.typeOf.object("options.polygonHierarchy",t.polygonHierarchy),P(t.perPositionHeight)&&t.perPositionHeight&&P(t.height))throw new rt("Cannot use both options.perPositionHeight and options.height");if(P(t.arcType)&&t.arcType!==X.GEODESIC&&t.arcType!==X.RHUMB)throw new rt("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let e=t.polygonHierarchy,o=N(t.vertexFormat,Q.DEFAULT),n=N(t.ellipsoid,v.WGS84),i=N(t.granularity,c.RADIANS_PER_DEGREE),r=N(t.stRotation,0),a=t.textureCoordinates,h=N(t.perPositionHeight,!1),l=h&&P(t.extrudedHeight),u=N(t.height,0),g=N(t.extrudedHeight,u);if(!l){let s=Math.max(u,g);g=Math.min(u,g),u=s}this._vertexFormat=Q.clone(o),this._ellipsoid=v.clone(n),this._granularity=i,this._stRotation=r,this._height=u,this._extrudedHeight=g,this._closeTop=N(t.closeTop,!0),this._closeBottom=N(t.closeBottom,!0),this._polygonHierarchy=e,this._perPositionHeight=h,this._perPositionHeightExtrude=l,this._shadowVolume=N(t.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=t.offsetAttribute,this._arcType=N(t.arcType,X.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=a,this.packedLength=S.computeHierarchyPackedLength(e,f)+v.packedLength+Q.packedLength+(a?S.computeHierarchyPackedLength(a,E):1)+12}z.fromPositions=function(t){t=N(t,N.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 z(e)};z.pack=function(t,e,o){return G.typeOf.object("value",t),G.defined("array",e),o=N(o,0),o=S.packPolygonHierarchy(t._polygonHierarchy,e,o,f),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++]=N(t._offsetAttribute,-1),e[o++]=t._arcType,P(t._textureCoordinates)?o=S.packPolygonHierarchy(t._textureCoordinates,e,o,E):e[o++]=-1,e[o++]=t.packedLength,e};var re=v.clone(v.UNIT_SPHERE),ae=new Q,se={polygonHierarchy:{}};z.unpack=function(t,e,o){G.defined("array",t),e=N(e,0);let n=S.unpackPolygonHierarchy(t,e,f);e=n.startingIndex,delete n.startingIndex;let i=v.unpack(t,e,re);e+=v.packedLength;let r=Q.unpack(t,e,ae);e+=Q.packedLength;let a=t[e++],h=t[e++],l=t[e++],u=t[e++],g=t[e++]===1,s=t[e++]===1,O=t[e++]===1,H=t[e++]===1,B=t[e++]===1,C=t[e++],R=t[e++],V=t[e]===-1?void 0:S.unpackPolygonHierarchy(t,e,E);P(V)?(e=V.startingIndex,delete V.startingIndex):e++;let d=t[e++];return P(o)||(o=new z(se)),o._polygonHierarchy=n,o._ellipsoid=v.clone(i,o._ellipsoid),o._vertexFormat=Q.clone(r,o._vertexFormat),o._height=a,o._extrudedHeight=h,o._granularity=l,o._stRotation=u,o._perPositionHeightExtrude=g,o._perPositionHeight=s,o._closeTop=O,o._closeBottom=H,o._shadowVolume=B,o._offsetAttribute=C===-1?void 0:C,o._arcType=R,o._textureCoordinates=V,o.packedLength=d,o};var ce=new E,he=new E,fe=new k;function vt(t,e,o,n,i,r){let a=t.longitude,h=a>=0?a:a+c.TWO_PI;i.westOverIdl=Math.min(i.westOverIdl,h),i.eastOverIdl=Math.max(i.eastOverIdl,h),r.west=Math.min(r.west,a),r.east=Math.max(r.east,a);let l=t.getLatitude(o),u=l;if(r.south=Math.min(r.south,l),r.north=Math.max(r.north,l),n!==X.RHUMB){let O=E.subtract(e.position,t.position,ce),H=E.dot(e.position,O)/E.dot(O,O);if(H>0&&H<1){let B=E.add(e.position,E.multiplyByScalar(O,-H,O),he),C=k.clone(e,fe);C.position=B;let R=C.getLatitude(o);r.south=Math.min(r.south,R),r.north=Math.max(r.north,R),Math.abs(l)>Math.abs(R)&&(u=R)}}let g=e.x*t.y-t.x*e.y,s=Math.sign(g);s!==0&&(s*=E.angleBetween(e.position,t.position)),u>=0&&(i.northAngle+=s),u<=0&&(i.southAngle+=s)}var St=new k,le=new k,Y={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};z.computeRectangleFromPositions=function(t,e,o,n){if(G.defined("positions",t),P(n)||(n=new lt),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,Y.northAngle=0,Y.southAngle=0,Y.westOverIdl=Number.POSITIVE_INFINITY,Y.eastOverIdl=Number.NEGATIVE_INFINITY;let i=t.length,r=k.fromCartesian(t[0],le);for(let a=1;a<i;a++){let h=k.fromCartesian(t[a],St);vt(h,r,e,o,Y,n),r=k.clone(h,r)}return vt(k.fromCartesian(t[0],St),r,e,o,Y,n),n.east-n.west>Y.eastOverIdl-Y.westOverIdl&&(n.west=Y.westOverIdl,n.east=Y.eastOverIdl,n.east>c.PI&&(n.east=n.east-c.TWO_PI),n.west>c.PI&&(n.west=n.west-c.TWO_PI)),c.equalsEpsilon(Math.abs(Y.northAngle),c.TWO_PI,c.EPSILON10)&&(n.north=c.PI_OVER_TWO,n.east=c.PI,n.west=-c.PI),c.equalsEpsilon(Math.abs(Y.southAngle),c.TWO_PI,c.EPSILON10)&&(n.south=-c.PI_OVER_TWO,n.east=c.PI,n.west=-c.PI),n};z.computeRectangle=function(t,e){G.typeOf.object("options",t),G.typeOf.object("options.polygonHierarchy",t.polygonHierarchy),Nt("PolygonGeometry.computeRectangle","PolygonGeometry.computeRectangle was deprecated in CesiumJS 1.110. It will be removed in CesiumJS 1.112. Use PolygonGeometry.computeRectangleFromPositions instead.");let o=N(t.granularity,c.RADIANS_PER_DEGREE),n=N(t.arcType,X.GEODESIC);if(n!==X.GEODESIC&&n!==X.RHUMB)throw new rt("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let i=t.polygonHierarchy,r=N(t.ellipsoid,v.WGS84);return oe(i.positions,r,n,o,e)};var me=new k;function ue(t,e,o){return t.height>=c.PI||t.width>=c.PI?k.fromCartesian(e[0],me).tangentPlane:K.fromPoints(e,o)}var Ft=new Z;function de(t,e,o){return(n,i)=>{if(t.height>=c.PI||t.width>=c.PI){if(t.south<0&&t.north>0){P(i)||(i=[]);for(let a=0;a<n.length;++a){let h=o.cartesianToCartographic(n[a],Ft);i[a]=new E(h.longitude/c.PI,h.latitude/c.PI_OVER_TWO)}return i.length=n.length,i}return k.fromCartesianArray(n,i)}return K.fromPoints(e,o).projectPointsOntoPlane(n,i)}}function ge(t,e,o){if(t.height>=c.PI||t.width>=c.PI)return(i,r)=>{if(t.south<0&&t.north>0){let a=o.cartesianToCartographic(i,Ft);return P(r)||(r=new E),r.x=a.longitude/c.PI,r.y=a.latitude/c.PI_OVER_TWO,r}return k.fromCartesian(i,r)};let n=K.fromPoints(e,o);return(i,r)=>n.projectPointOntoPlane(i,r)}function pe(t,e,o,n){return(i,r)=>!n&&(t.height>=c.PI_OVER_TWO||t.width>=2*c.PI_OVER_THREE)?S.splitPolygonsOnEquator(i,e,o,r):i}function Pe(t,e,o,n){if(e.height>=c.PI||e.width>=c.PI)return Pt.fromRectangle(e,void 0,Ct);let i=t,r=K.fromPoints(i,o);return S.computeBoundingRectangle(r.plane.normal,r.projectPointOntoPlane.bind(r),i,n,Ct)}z.createGeometry=function(t){let e=t._vertexFormat,o=t._ellipsoid,n=t._granularity,i=t._stRotation,r=t._polygonHierarchy,a=t._perPositionHeight,h=t._closeTop,l=t._closeBottom,u=t._arcType,g=t._textureCoordinates,s=P(g),O=r.positions;if(O.length<3)return;let H=t.rectangle,B=S.polygonsFromHierarchy(r,s,de(H,O,o),!a,o,pe(H,o,u,a)),C=B.hierarchy,R=B.polygons,V=function(p){return p},d=s?S.polygonsFromHierarchy(g,!0,V,!1,o).polygons:void 0;if(C.length===0)return;let I=C[0].outerRing,A=Pe(I,H,o,i),F=[],w=t._height,y=t._extrudedHeight,T=t._perPositionHeightExtrude||!c.equalsEpsilon(w,y,0,c.EPSILON2),m={perPositionHeight:a,vertexFormat:e,geometry:void 0,rotationAxis:ue(H,I,o).plane.normal,projectTo2d:ge(H,I,o),boundingRectangle:A,ellipsoid:o,stRotation:i,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:u},_;if(T)for(m.extrude=!0,m.top=h,m.bottom=l,m.shadowVolume=t._shadowVolume,m.offsetAttribute=t._offsetAttribute,_=0;_<R.length;_++){let p=ie(o,R[_],s?d[_]:void 0,n,C[_],a,h,l,e,u),L;h&&l?(L=p.topAndBottom,m.geometry=S.scaleToGeodeticHeightExtruded(L.geometry,w,y,o,a)):h?(L=p.topAndBottom,L.geometry.attributes.position.values=at.scaleToGeodeticHeight(L.geometry.attributes.position.values,w,o,!a),m.geometry=L.geometry):l&&(L=p.topAndBottom,L.geometry.attributes.position.values=at.scaleToGeodeticHeight(L.geometry.attributes.position.values,y,o,!0),m.geometry=L.geometry),(h||l)&&(m.wall=!1,L.geometry=wt(m),F.push(L));let M=p.walls;m.wall=!0;for(let W=0;W<M.length;W++){let x=M[W];m.geometry=S.scaleToGeodeticHeightExtruded(x.geometry,w,y,o,a),x.geometry=wt(m),F.push(x)}}else for(_=0;_<R.length;_++){let p=new ft({geometry:S.createGeometryFromPositions(o,R[_],s?d[_]:void 0,n,a,e,u)});if(p.geometry.attributes.position.values=at.scaleToGeodeticHeight(p.geometry.attributes.position.values,w,o,!a),m.geometry=p.geometry,p.geometry=wt(m),P(t._offsetAttribute)){let L=p.geometry.attributes.position.values.length,M=t._offsetAttribute===dt.NONE?0:1,W=new Uint8Array(L/3).fill(M);p.geometry.attributes.applyOffset=new ot({componentDatatype:et.UNSIGNED_BYTE,componentsPerAttribute:1,values:W})}F.push(p)}let j=It.combineInstances(F)[0];j.attributes.position.values=new Float64Array(j.attributes.position.values),j.indices=ut.createTypedArray(j.attributes.position.values.length/3,j.indices);let q=j.attributes,$=Ot.fromVertices(q.position.values);return e.position||delete q.position,new pt({attributes:q,indices:j.indices,primitiveType:j.primitiveType,boundingSphere:$,offsetAttribute:t._offsetAttribute})};z.createShadowVolume=function(t,e,o){let n=t._granularity,i=t._ellipsoid,r=e(n,i),a=o(n,i);return new z({polygonHierarchy:t._polygonHierarchy,ellipsoid:i,stRotation:t._stRotation,granularity:n,perPositionHeight:!1,extrudedHeight:r,height:a,vertexFormat:Q.POSITION_ONLY,shadowVolume:!0,arcType:t._arcType})};function _e(t){let e=-t._stRotation;if(e===0)return[0,0,0,1,1,0];let o=t._ellipsoid,n=t._polygonHierarchy.positions,i=t.rectangle;return pt._textureCoordinateRotationPoints(n,e,o,i)}Object.defineProperties(z.prototype,{rectangle:{get:function(){if(!P(this._rectangle)){let t=this._polygonHierarchy.positions;this._rectangle=z.computeRectangleFromPositions(t,this._ellipsoid,this._arcType)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return P(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=_e(this)),this._textureCoordinateRotationPoints}}});var yt=z;function Te(t,e){return P(e)&&(t=yt.unpack(t,e)),t._ellipsoid=v.clone(t._ellipsoid),yt.createGeometry(t)}var po=Te;export{po as default};
|
|
26
|
+
import{a as dt}from"./chunk-HIKVO3YB.js";import{a as F}from"./chunk-BVGVBIA4.js";import{a as at}from"./chunk-D3CSG3S2.js";import{a as st}from"./chunk-TAU7Y5S5.js";import{a as bt}from"./chunk-W5OYQDXN.js";import"./chunk-EARE55VU.js";import"./chunk-34X2ZL32.js";import{a as ht}from"./chunk-CDIJULSW.js";import{a as Q}from"./chunk-ZHH5JPWV.js";import{a as K}from"./chunk-U6VPCTVK.js";import"./chunk-763AHQX3.js";import{a as gt,b as nt}from"./chunk-S5WJXCZO.js";import"./chunk-6IQGHKR5.js";import"./chunk-P2A4LTBW.js";import{a as wt,b as yt}from"./chunk-NW4BJ3IZ.js";import"./chunk-QC664SDS.js";import{a as lt}from"./chunk-7K5QPZEL.js";import"./chunk-5JSDDVN4.js";import{c as mt,d as tt}from"./chunk-6V3AGY4C.js";import{d as Tt}from"./chunk-MNKVHNSN.js";import{f as ct,h as _t}from"./chunk-QLA567VU.js";import{a as $}from"./chunk-23HMYUSJ.js";import{a as c,b as ot,c as O,d as V,e as U}from"./chunk-EBGE3XTZ.js";import{a as l}from"./chunk-VEDHIHCJ.js";import"./chunk-PQF7YB7C.js";import"./chunk-TBESXZ5I.js";import{a as L}from"./chunk-YXBVEKWI.js";import{a as ut,b as q}from"./chunk-J63AP2GZ.js";import{e as P}from"./chunk-LPL3F3FU.js";function b(t,e){this.position=t,P(this.position)||(this.position=new O),this.tangentPlane=e,P(this.tangentPlane)||(this.tangentPlane=b.NORTH_POLE_TANGENT_PLANE)}Object.defineProperties(b.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=O.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,Rt=new c;b.prototype.getLatitude=function(t){P(t)||(t=V.default),it.latitude=this.conformalLatitude,it.longitude=this.longitude,it.height=0;let e=this.ellipsoid.cartographicToCartesian(it,Rt);return t.cartesianToCartographic(e,it),it.latitude};var It=new wt,Lt=new c,Ft=new c;b.fromCartesian=function(t,e){q.defined("cartesian",t);let o=l.signNotZero(t.z),n=b.NORTH_POLE_TANGENT_PLANE,s=b.SOUTH_POLE;o<0&&(n=b.SOUTH_POLE_TANGENT_PLANE,s=b.NORTH_POLE);let i=It;i.origin=n.ellipsoid.scaleToGeocentricSurface(t,i.origin),i.direction=c.subtract(i.origin,s,Lt),c.normalize(i.direction,i.direction);let r=yt.rayPlane(i,n.plane,Ft),f=c.subtract(r,s,r),d=c.dot(n.xAxis,f),p=o*c.dot(n.yAxis,f);return P(e)?(e.position=new O(d,p),e.tangentPlane=n,e):new b(new O(d,p),n)};b.fromCartesianArray=function(t,e){q.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]=b.fromCartesian(t[n],e[n]);return e};b.clone=function(t,e){if(P(t))return P(e)?(e.position=t.position,e.tangentPlane=t.tangentPlane,e):new b(t.position,t.tangentPlane)};b.HALF_UNIT_SPHERE=Object.freeze(new V(.5,.5,.5));b.NORTH_POLE=Object.freeze(new c(0,0,.5));b.SOUTH_POLE=Object.freeze(new c(0,0,-.5));b.NORTH_POLE_TANGENT_PLANE=Object.freeze(new K(b.NORTH_POLE,b.HALF_UNIT_SPHERE));b.SOUTH_POLE_TANGENT_PLANE=Object.freeze(new K(b.SOUTH_POLE,b.HALF_UNIT_SPHERE));var D=b;var vt=new ot,Ot=new ot;function St(t,e,o,n){let i=n.cartesianToCartographic(t,vt).height,r=n.cartesianToCartographic(e,Ot);r.height=i,n.cartographicToCartesian(r,e);let f=n.cartesianToCartographic(o,Ot);f.height=i-100,n.cartographicToCartesian(f,o)}var Et=new dt,Vt=new c,Bt=new c,Mt=new c,jt=new c,kt=new c,zt=new c,ft=new c,Z=new c,rt=new c,Dt=new O,Ut=new O,Wt=new c,At=new ct,Gt=new U,Yt=new U;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,d=t.top||f,p=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,j=t.stRotation,C=t.perPositionHeight,R=Dt;R.x=w.x,R.y=w.y;let B=e.st?new Float32Array(2*(r/3)):void 0,u;e.normal&&(C&&d&&!f?u=o.attributes.normal.values:u=new Float32Array(r));let E=e.tangent?new Float32Array(r):void 0,A=e.bitangent?new Float32Array(r):void 0,v=n?new Float32Array(r):void 0,T=0,y=0,_=Bt,h=Mt,g=jt,k=!0,Y=Gt,J=Yt;if(j!==0){let M=ct.fromAxisAngle(a,j,At);Y=U.fromQuaternion(M,Y),M=ct.fromAxisAngle(a,-j,At),J=U.fromQuaternion(M,J)}else Y=U.clone(U.IDENTITY,Y),J=U.clone(U.IDENTITY,J);let m=0,I=0;d&&p&&(m=r/2,I=r/3,r/=2);for(let M=0;M<r;M+=3){let z=c.fromArray(s,M,Wt);if(e.st&&!P(i)){let N=U.multiplyByVector(Y,z,Vt);N=x.scaleToGeodeticSurface(N,N);let S=H([N],Ut)[0];O.subtract(S,R,S);let X=l.clamp(S.x/w.width,0,1),et=l.clamp(S.y/w.height,0,1);p&&(B[T+I]=X,B[T+1+I]=et),d&&(B[T]=X,B[T+1]=et),T+=2}if(e.normal||e.tangent||e.bitangent||n){let N=y+1,S=y+2;if(f){if(M+3<r){let X=c.fromArray(s,M+3,kt);if(k){let et=c.fromArray(s,M+r,zt);C&&St(z,X,et,x),c.subtract(X,z,X),c.subtract(et,z,et),_=c.normalize(c.cross(et,X,_),_),k=!1}c.equalsEpsilon(X,z,l.EPSILON10)&&(k=!0)}(e.tangent||e.bitangent)&&(g=x.geodeticSurfaceNormal(z,g),e.tangent&&(h=c.normalize(c.cross(g,_,h),h)))}else _=x.geodeticSurfaceNormal(z,_),(e.tangent||e.bitangent)&&(C&&(ft=c.fromArray(u,y,ft),Z=c.cross(c.UNIT_Z,ft,Z),Z=c.normalize(U.multiplyByVector(J,Z,Z),Z),e.bitangent&&(rt=c.normalize(c.cross(ft,Z,rt),rt))),h=c.cross(c.UNIT_Z,_,h),h=c.normalize(U.multiplyByVector(J,h,h),h),e.bitangent&&(g=c.normalize(c.cross(_,h,g),g)));e.normal&&(t.wall?(u[y+m]=_.x,u[N+m]=_.y,u[S+m]=_.z):p&&(u[y+m]=-_.x,u[N+m]=-_.y,u[S+m]=-_.z),(d&&!C||f)&&(u[y]=_.x,u[N]=_.y,u[S]=_.z)),n&&(f&&(_=x.geodeticSurfaceNormal(z,_)),v[y+m]=-_.x,v[N+m]=-_.y,v[S+m]=-_.z),e.tangent&&(t.wall?(E[y+m]=h.x,E[N+m]=h.y,E[S+m]=h.z):p&&(E[y+m]=-h.x,E[N+m]=-h.y,E[S+m]=-h.z),d&&(C?(E[y]=Z.x,E[N]=Z.y,E[S]=Z.z):(E[y]=h.x,E[N]=h.y,E[S]=h.z))),e.bitangent&&(p&&(A[y+m]=g.x,A[N+m]=g.y,A[S+m]=g.z),d&&(C?(A[y]=rt.x,A[N]=rt.y,A[S]=rt.z):(A[y]=g.x,A[N]=g.y,A[S]=g.z))),y+=3}}e.st&&!P(i)&&(o.attributes.st=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:2,values:B})),e.normal&&(o.attributes.normal=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:3,values:u})),e.tangent&&(o.attributes.tangent=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:3,values:E})),e.bitangent&&(o.attributes.bitangent=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:3,values:A})),n&&(o.attributes.extrudeDirection=new tt({componentDatatype:$.FLOAT,componentsPerAttribute:3,values:v}))}if(t.extrude&&P(t.offsetAttribute)){let w=s.length/3,a=new Uint8Array(w);if(t.offsetAttribute===ht.TOP)d&&p||f?a=a.fill(1,0,w/2):d&&(a=a.fill(1));else{let H=t.offsetAttribute===ht.NONE?0:1;a=a.fill(H)}o.attributes.applyOffset=new tt({componentDatatype:$.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}return o}var Ht=[];function qt(t,e,o,n,s,i,r,f,d,p){let w={walls:[]},a;if(r||f){let u=F.createGeometryFromPositions(t,e,o,n,i,d,p),E=u.attributes.position.values,A=u.indices,v,T;if(r&&f){let y=E.concat(E);v=y.length/3,T=lt.createTypedArray(v,A.length*2),T.set(A);let _=A.length,h=v/2;for(a=0;a<_;a+=3){let g=T[a]+h,k=T[a+1]+h,Y=T[a+2]+h;T[a+_]=Y,T[a+1+_]=k,T[a+2+_]=g}if(u.attributes.position.values=y,i&&d.normal){let g=u.attributes.normal.values;u.attributes.normal.values=new Float32Array(y.length),u.attributes.normal.values.set(g)}if(d.st&&P(o)){let g=u.attributes.st.values;u.attributes.st.values=new Float32Array(v*2),u.attributes.st.values=g.concat(g)}u.indices=T}else if(f){for(v=E.length/3,T=lt.createTypedArray(v,A.length),a=0;a<A.length;a+=3)T[a]=A[a+2],T[a+1]=A[a+1],T[a+2]=A[a];u.indices=T}w.topAndBottom=new st({geometry:u})}let H=s.outerRing,x=K.fromPoints(H,t),j=x.projectPointsOntoPlane(H,Ht),C=nt.computeWindingOrder2D(j);C===gt.CLOCKWISE&&(H=H.slice().reverse());let R=F.computeWallGeometry(H,o,t,n,i,p);w.walls.push(new st({geometry:R}));let B=s.holes;for(a=0;a<B.length;a++){let u=B[a];j=x.projectPointsOntoPlane(u,Ht),C=nt.computeWindingOrder2D(j),C===gt.COUNTER_CLOCKWISE&&(u=u.slice().reverse()),R=F.computeWallGeometry(u,o,t,n,i,p),w.walls.push(new st({geometry:R}))}return w}function G(t){if(q.typeOf.object("options",t),q.typeOf.object("options.polygonHierarchy",t.polygonHierarchy),P(t.perPositionHeight)&&t.perPositionHeight&&P(t.height))throw new ut("Cannot use both options.perPositionHeight and options.height");if(P(t.arcType)&&t.arcType!==at.GEODESIC&&t.arcType!==at.RHUMB)throw new ut("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),d=f&&P(t.extrudedHeight),p=L(t.height,0),w=L(t.extrudedHeight,p);if(!d){let a=Math.max(p,w);w=Math.min(p,w),p=a}this._vertexFormat=Q.clone(o),this._ellipsoid=V.clone(n),this._granularity=s,this._stRotation=i,this._height=p,this._extrudedHeight=w,this._closeTop=L(t.closeTop,!0),this._closeBottom=L(t.closeBottom,!0),this._polygonHierarchy=e,this._perPositionHeight=f,this._perPositionHeightExtrude=d,this._shadowVolume=L(t.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=t.offsetAttribute,this._arcType=L(t.arcType,at.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,O):1)+12}G.fromPositions=function(t){t=L(t,L.EMPTY_OBJECT),q.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 q.typeOf.object("value",t),q.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,O):e[o++]=-1,e[o++]=t.packedLength,e};var Qt=V.clone(V.UNIT_SPHERE),Zt=new Q,Kt={polygonHierarchy:{}};G.unpack=function(t,e,o){q.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,Qt);e+=V.packedLength;let i=Q.unpack(t,e,Zt);e+=Q.packedLength;let r=t[e++],f=t[e++],d=t[e++],p=t[e++],w=t[e++]===1,a=t[e++]===1,H=t[e++]===1,x=t[e++]===1,j=t[e++]===1,C=t[e++],R=t[e++],B=t[e]===-1?void 0:F.unpackPolygonHierarchy(t,e,O);P(B)?(e=B.startingIndex,delete B.startingIndex):e++;let u=t[e++];return P(o)||(o=new G(Kt)),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=d,o._stRotation=p,o._perPositionHeightExtrude=w,o._perPositionHeight=a,o._closeTop=H,o._closeBottom=x,o._shadowVolume=j,o._offsetAttribute=C===-1?void 0:C,o._arcType=R,o._textureCoordinates=B,o.packedLength=u,o};var Jt=new O,Xt=new O,$t=new D;function xt(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 d=t.getLatitude(o),p=d;if(i.south=Math.min(i.south,d),i.north=Math.max(i.north,d),n!==at.RHUMB){let H=O.subtract(e.position,t.position,Jt),x=O.dot(e.position,H)/O.dot(H,H);if(x>0&&x<1){let j=O.add(e.position,O.multiplyByScalar(H,-x,H),Xt),C=D.clone(e,$t);C.position=j;let R=C.getLatitude(o);i.south=Math.min(i.south,R),i.north=Math.max(i.north,R),Math.abs(d)>Math.abs(R)&&(p=R)}}let w=e.x*t.y-t.x*e.y,a=Math.sign(w);a!==0&&(a*=O.angleBetween(e.position,t.position)),p>=0&&(s.northAngle+=a),p<=0&&(s.southAngle+=a)}var Ct=new D,te=new D,W={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};G.computeRectangleFromPositions=function(t,e,o,n){if(q.defined("positions",t),P(n)||(n=new _t),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=D.fromCartesian(t[0],te);for(let r=1;r<s;r++){let f=D.fromCartesian(t[r],Ct);xt(f,i,e,o,W,n),i=D.clone(f,i)}return xt(D.fromCartesian(t[0],Ct),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 ee=new D;function oe(t,e,o){return t.height>=l.PI||t.width>=l.PI?D.fromCartesian(e[0],ee).tangentPlane:K.fromPoints(e,o)}var Nt=new ot;function ne(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],Nt);s[r]=new O(f.longitude/l.PI,f.latitude/l.PI_OVER_TWO)}return s.length=n.length,s}return D.fromCartesianArray(n,s)}return K.fromPoints(e,o).projectPointsOntoPlane(n,s)}}function ie(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,Nt);return P(i)||(i=new O),i.x=r.longitude/l.PI,i.y=r.latitude/l.PI_OVER_TWO,i}return D.fromCartesian(s,i)};let n=K.fromPoints(e,o);return(s,i)=>n.projectPointsOntoPlane(s,i)}function re(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 se(t,e,o,n){if(e.height>=l.PI||e.width>=l.PI)return dt.fromRectangle(e,void 0,Et);let s=t,i=K.fromPoints(s,o);return F.computeBoundingRectangle(i.plane.normal,i.projectPointOntoPlane.bind(i),s,n,Et)}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,d=t._closeBottom,p=t._arcType,w=t._textureCoordinates,a=P(w),H=i.positions;if(H.length<3)return;let x=t.rectangle,j=F.polygonsFromHierarchy(i,a,ne(x,H,o),!r,o,re(x,o,p,r)),C=j.hierarchy,R=j.polygons,B=function(m){return m},u=a?F.polygonsFromHierarchy(w,!0,B,!1,o).polygons:void 0;if(C.length===0)return;let E=C[0].outerRing,A=se(E,x,o,s),v=[],T=t._height,y=t._extrudedHeight,_=t._perPositionHeightExtrude||!l.equalsEpsilon(T,y,0,l.EPSILON2),h={perPositionHeight:r,vertexFormat:e,geometry:void 0,rotationAxis:oe(x,E,o).plane.normal,projectTo2d:ie(x,E,o),boundingRectangle:A,ellipsoid:o,stRotation:s,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:p},g;if(_)for(h.extrude=!0,h.top=f,h.bottom=d,h.shadowVolume=t._shadowVolume,h.offsetAttribute=t._offsetAttribute,g=0;g<R.length;g++){let m=qt(o,R[g],a?u[g]:void 0,n,C[g],r,f,d,e,p),I;f&&d?(I=m.topAndBottom,h.geometry=F.scaleToGeodeticHeightExtruded(I.geometry,T,y,o,r)):f?(I=m.topAndBottom,I.geometry.attributes.position.values=nt.scaleToGeodeticHeight(I.geometry.attributes.position.values,T,o,!r),h.geometry=I.geometry):d&&(I=m.topAndBottom,I.geometry.attributes.position.values=nt.scaleToGeodeticHeight(I.geometry.attributes.position.values,y,o,!0),h.geometry=I.geometry),(f||d)&&(h.wall=!1,I.geometry=pt(h),v.push(I));let M=m.walls;h.wall=!0;for(let z=0;z<M.length;z++){let N=M[z];h.geometry=F.scaleToGeodeticHeightExtruded(N.geometry,T,y,o,r),N.geometry=pt(h),v.push(N)}}else for(g=0;g<R.length;g++){let m=new st({geometry:F.createGeometryFromPositions(o,R[g],a?u[g]:void 0,n,r,e,p)});if(m.geometry.attributes.position.values=nt.scaleToGeodeticHeight(m.geometry.attributes.position.values,T,o,!r),h.geometry=m.geometry,m.geometry=pt(h),P(t._offsetAttribute)){let I=m.geometry.attributes.position.values.length,M=t._offsetAttribute===ht.NONE?0:1,z=new Uint8Array(I/3).fill(M);m.geometry.attributes.applyOffset=new tt({componentDatatype:$.UNSIGNED_BYTE,componentsPerAttribute:1,values:z})}v.push(m)}let k=bt.combineInstances(v)[0];k.attributes.position.values=new Float64Array(k.attributes.position.values),k.indices=lt.createTypedArray(k.attributes.position.values.length/3,k.indices);let Y=k.attributes,J=Tt.fromVertices(Y.position.values);return e.position||delete Y.position,new mt({attributes:Y,indices:k.indices,primitiveType:k.primitiveType,boundingSphere:J,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 ae(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 mt._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=ae(this)),this._textureCoordinateRotationPoints}}});var Pt=G;function ce(t,e){return P(e)&&(t=Pt.unpack(t,e)),t._ellipsoid=V.clone(t._ellipsoid),Pt.createGeometry(t)}var Xe=ce;export{Xe as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.120.2
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{a}from"./chunk-
|
|
26
|
+
import{a}from"./chunk-BVGVBIA4.js";import{a as b}from"./chunk-D3CSG3S2.js";import{a as F}from"./chunk-TAU7Y5S5.js";import{a as V}from"./chunk-W5OYQDXN.js";import"./chunk-EARE55VU.js";import"./chunk-34X2ZL32.js";import{a as D}from"./chunk-CDIJULSW.js";import{a as W}from"./chunk-U6VPCTVK.js";import"./chunk-763AHQX3.js";import{a as j,b as k}from"./chunk-S5WJXCZO.js";import"./chunk-6IQGHKR5.js";import"./chunk-P2A4LTBW.js";import"./chunk-NW4BJ3IZ.js";import"./chunk-QC664SDS.js";import{a as M}from"./chunk-7K5QPZEL.js";import{a as G}from"./chunk-5JSDDVN4.js";import{b as B,c as C,d as v}from"./chunk-6V3AGY4C.js";import{d as z}from"./chunk-MNKVHNSN.js";import"./chunk-QLA567VU.js";import{a as w}from"./chunk-23HMYUSJ.js";import{a as S,d as y}from"./chunk-EBGE3XTZ.js";import{a as T}from"./chunk-VEDHIHCJ.js";import"./chunk-PQF7YB7C.js";import"./chunk-TBESXZ5I.js";import{a as P}from"./chunk-YXBVEKWI.js";import{a as U,b as A}from"./chunk-J63AP2GZ.js";import{e as O}from"./chunk-LPL3F3FU.js";var Y=[],R=[];function K(e,t,r,H,l){let p=W.fromPoints(t,e).projectPointsOntoPlane(t,Y);k.computeWindingOrder2D(p)===j.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let n,i,o=t.length,c=0;if(H)for(n=new Float64Array(o*2*3),i=0;i<o;i++){let u=t[i],h=t[(i+1)%o];n[c++]=u.x,n[c++]=u.y,n[c++]=u.z,n[c++]=h.x,n[c++]=h.y,n[c++]=h.z}else{let u=0;if(l===b.GEODESIC)for(i=0;i<o;i++)u+=a.subdivideLineCount(t[i],t[(i+1)%o],r);else if(l===b.RHUMB)for(i=0;i<o;i++)u+=a.subdivideRhumbLineCount(e,t[i],t[(i+1)%o],r);for(n=new Float64Array(u*3),i=0;i<o;i++){let h;l===b.GEODESIC?h=a.subdivideLine(t[i],t[(i+1)%o],r,R):l===b.RHUMB&&(h=a.subdivideRhumbLine(e,t[i],t[(i+1)%o],r,R));let g=h.length;for(let d=0;d<g;++d)n[c++]=h[d]}}o=n.length/3;let f=o*2,m=M.createTypedArray(o,f);for(c=0,i=0;i<o-1;i++)m[c++]=i,m[c++]=i+1;return m[c++]=o-1,m[c++]=0,new F({geometry:new C({attributes:new G({position:new v({componentDatatype:w.DOUBLE,componentsPerAttribute:3,values:n})}),indices:m,primitiveType:B.LINES})})}function q(e,t,r,H,l){let p=W.fromPoints(t,e).projectPointsOntoPlane(t,Y);k.computeWindingOrder2D(p)===j.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let n,i,o=t.length,c=new Array(o),f=0;if(H)for(n=new Float64Array(o*2*3*2),i=0;i<o;++i){c[i]=f/3;let g=t[i],d=t[(i+1)%o];n[f++]=g.x,n[f++]=g.y,n[f++]=g.z,n[f++]=d.x,n[f++]=d.y,n[f++]=d.z}else{let g=0;if(l===b.GEODESIC)for(i=0;i<o;i++)g+=a.subdivideLineCount(t[i],t[(i+1)%o],r);else if(l===b.RHUMB)for(i=0;i<o;i++)g+=a.subdivideRhumbLineCount(e,t[i],t[(i+1)%o],r);for(n=new Float64Array(g*3*2),i=0;i<o;++i){c[i]=f/3;let d;l===b.GEODESIC?d=a.subdivideLine(t[i],t[(i+1)%o],r,R):l===b.RHUMB&&(d=a.subdivideRhumbLine(e,t[i],t[(i+1)%o],r,R));let E=d.length;for(let N=0;N<E;++N)n[f++]=d[N]}}o=n.length/(3*2);let m=c.length,u=(o*2+m)*2,h=M.createTypedArray(o+m,u);for(f=0,i=0;i<o;++i)h[f++]=i,h[f++]=(i+1)%o,h[f++]=i+o,h[f++]=(i+1)%o+o;for(i=0;i<m;i++){let g=c[i];h[f++]=g,h[f++]=g+o}return new F({geometry:new C({attributes:new G({position:new v({componentDatatype:w.DOUBLE,componentsPerAttribute:3,values:n})}),indices:h,primitiveType:B.LINES})})}function L(e){if(A.typeOf.object("options",e),A.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e.perPositionHeight&&O(e.height))throw new U("Cannot use both options.perPositionHeight and options.height");if(O(e.arcType)&&e.arcType!==b.GEODESIC&&e.arcType!==b.RHUMB)throw new U("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let t=e.polygonHierarchy,r=P(e.ellipsoid,y.default),H=P(e.granularity,T.RADIANS_PER_DEGREE),l=P(e.perPositionHeight,!1),_=l&&O(e.extrudedHeight),p=P(e.arcType,b.GEODESIC),s=P(e.height,0),n=P(e.extrudedHeight,s);if(!_){let i=Math.max(s,n);n=Math.min(s,n),s=i}this._ellipsoid=y.clone(r),this._granularity=H,this._height=s,this._extrudedHeight=n,this._arcType=p,this._polygonHierarchy=t,this._perPositionHeight=l,this._perPositionHeightExtrude=_,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=a.computeHierarchyPackedLength(t,S)+y.packedLength+8}L.pack=function(e,t,r){return A.typeOf.object("value",e),A.defined("array",t),r=P(r,0),r=a.packPolygonHierarchy(e._polygonHierarchy,t,r,S),y.pack(e._ellipsoid,t,r),r+=y.packedLength,t[r++]=e._height,t[r++]=e._extrudedHeight,t[r++]=e._granularity,t[r++]=e._perPositionHeightExtrude?1:0,t[r++]=e._perPositionHeight?1:0,t[r++]=e._arcType,t[r++]=P(e._offsetAttribute,-1),t[r]=e.packedLength,t};var J=y.clone(y.UNIT_SPHERE),Q={polygonHierarchy:{}};L.unpack=function(e,t,r){A.defined("array",e),t=P(t,0);let H=a.unpackPolygonHierarchy(e,t,S);t=H.startingIndex,delete H.startingIndex;let l=y.unpack(e,t,J);t+=y.packedLength;let _=e[t++],p=e[t++],s=e[t++],n=e[t++]===1,i=e[t++]===1,o=e[t++],c=e[t++],f=e[t];return O(r)||(r=new L(Q)),r._polygonHierarchy=H,r._ellipsoid=y.clone(l,r._ellipsoid),r._height=_,r._extrudedHeight=p,r._granularity=s,r._perPositionHeight=i,r._perPositionHeightExtrude=n,r._arcType=o,r._offsetAttribute=c===-1?void 0:c,r.packedLength=f,r};L.fromPositions=function(e){e=P(e,P.EMPTY_OBJECT),A.defined("options.positions",e.positions);let t={polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute};return new L(t)};L.createGeometry=function(e){let t=e._ellipsoid,r=e._granularity,H=e._polygonHierarchy,l=e._perPositionHeight,_=e._arcType,p=a.polygonOutlinesFromHierarchy(H,!l,t);if(p.length===0)return;let s,n=[],i=T.chordLength(r,t.maximumRadius),o=e._height,c=e._extrudedHeight,f=e._perPositionHeightExtrude||!T.equalsEpsilon(o,c,0,T.EPSILON2),m,u;if(f)for(u=0;u<p.length;u++){if(s=q(t,p[u],i,l,_),s.geometry=a.scaleToGeodeticHeightExtruded(s.geometry,o,c,t,l),O(e._offsetAttribute)){let d=s.geometry.attributes.position.values.length/3,E=new Uint8Array(d);e._offsetAttribute===D.TOP?E=E.fill(1,0,d/2):(m=e._offsetAttribute===D.NONE?0:1,E=E.fill(m)),s.geometry.attributes.applyOffset=new v({componentDatatype:w.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}n.push(s)}else for(u=0;u<p.length;u++){if(s=K(t,p[u],i,l,_),s.geometry.attributes.position.values=k.scaleToGeodeticHeight(s.geometry.attributes.position.values,o,t,!l),O(e._offsetAttribute)){let d=s.geometry.attributes.position.values.length;m=e._offsetAttribute===D.NONE?0:1;let E=new Uint8Array(d/3).fill(m);s.geometry.attributes.applyOffset=new v({componentDatatype:w.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}n.push(s)}let h=V.combineInstances(n)[0],g=z.fromVertices(h.attributes.position.values);return new C({attributes:h.attributes,indices:h.indices,primitiveType:h.primitiveType,boundingSphere:g,offsetAttribute:e._offsetAttribute})};var x=L;function X(e,t){return O(t)&&(e=x.unpack(e,t)),e._ellipsoid=y.clone(e._ellipsoid),x.createGeometry(e)}var Oe=X;export{Oe as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.120.2
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{a as m}from"./chunk-
|
|
26
|
+
import{a as m}from"./chunk-J63NMQMY.js";import{a as N}from"./chunk-D3CSG3S2.js";import{a as U}from"./chunk-VV7VOBQF.js";import"./chunk-3FCK4U2N.js";import{a as k}from"./chunk-ZHH5JPWV.js";import{a as le}from"./chunk-6IQGHKR5.js";import"./chunk-P2A4LTBW.js";import"./chunk-NW4BJ3IZ.js";import"./chunk-QC664SDS.js";import{a as se}from"./chunk-7K5QPZEL.js";import{a as ce}from"./chunk-5JSDDVN4.js";import{a as ne,b as re,c as ie,d as O}from"./chunk-6V3AGY4C.js";import{d as oe}from"./chunk-MNKVHNSN.js";import"./chunk-QLA567VU.js";import{a as x}from"./chunk-23HMYUSJ.js";import{a as p,d as u}from"./chunk-EBGE3XTZ.js";import{a as J}from"./chunk-VEDHIHCJ.js";import"./chunk-PQF7YB7C.js";import"./chunk-TBESXZ5I.js";import{a as A}from"./chunk-YXBVEKWI.js";import{a as V}from"./chunk-J63AP2GZ.js";import{e as h}from"./chunk-LPL3F3FU.js";var me=[];function Ae(e,o,t,n,c){let s=me;s.length=c;let l,E=t.red,a=t.green,r=t.blue,w=t.alpha,b=n.red,i=n.green,f=n.blue,L=n.alpha;if(m.equals(t,n)){for(l=0;l<c;l++)s[l]=m.clone(t);return s}let M=(b-E)/c,z=(i-a)/c,H=(f-r)/c,B=(L-w)/c;for(l=0;l<c;l++)s[l]=new m(E+l*M,a+l*z,r+l*H,w+l*B);return s}function G(e){e=A(e,A.EMPTY_OBJECT);let o=e.positions,t=e.colors,n=A(e.width,1),c=A(e.colorsPerVertex,!1);if(!h(o)||o.length<2)throw new V("At least two positions are required.");if(typeof n!="number")throw new V("width must be a number");if(h(t)&&(c&&t.length<o.length||!c&&t.length<o.length-1))throw new V("colors has an invalid length.");this._positions=o,this._colors=t,this._width=n,this._colorsPerVertex=c,this._vertexFormat=k.clone(A(e.vertexFormat,k.DEFAULT)),this._arcType=A(e.arcType,N.GEODESIC),this._granularity=A(e.granularity,J.RADIANS_PER_DEGREE),this._ellipsoid=u.clone(A(e.ellipsoid,u.default)),this._workerName="createPolylineGeometry";let s=1+o.length*p.packedLength;s+=h(t)?1+t.length*m.packedLength:1,this.packedLength=s+u.packedLength+k.packedLength+4}G.pack=function(e,o,t){if(!h(e))throw new V("value is required");if(!h(o))throw new V("array is required");t=A(t,0);let n,c=e._positions,s=c.length;for(o[t++]=s,n=0;n<s;++n,t+=p.packedLength)p.pack(c[n],o,t);let l=e._colors;for(s=h(l)?l.length:0,o[t++]=s,n=0;n<s;++n,t+=m.packedLength)m.pack(l[n],o,t);return u.pack(e._ellipsoid,o,t),t+=u.packedLength,k.pack(e._vertexFormat,o,t),t+=k.packedLength,o[t++]=e._width,o[t++]=e._colorsPerVertex?1:0,o[t++]=e._arcType,o[t]=e._granularity,o};var de=u.clone(u.UNIT_SPHERE),ue=new k,S={positions:void 0,colors:void 0,ellipsoid:de,vertexFormat:ue,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};G.unpack=function(e,o,t){if(!h(e))throw new V("array is required");o=A(o,0);let n,c=e[o++],s=new Array(c);for(n=0;n<c;++n,o+=p.packedLength)s[n]=p.unpack(e,o);c=e[o++];let l=c>0?new Array(c):void 0;for(n=0;n<c;++n,o+=m.packedLength)l[n]=m.unpack(e,o);let E=u.unpack(e,o,de);o+=u.packedLength;let a=k.unpack(e,o,ue);o+=k.packedLength;let r=e[o++],w=e[o++]===1,b=e[o++],i=e[o];return h(t)?(t._positions=s,t._colors=l,t._ellipsoid=u.clone(E,t._ellipsoid),t._vertexFormat=k.clone(a,t._vertexFormat),t._width=r,t._colorsPerVertex=w,t._arcType=b,t._granularity=i,t):(S.positions=s,S.colors=l,S.width=r,S.colorsPerVertex=w,S.arcType=b,S.granularity=i,new G(S))};var pe=new p,ae=new p,fe=new p,he=new p;G.createGeometry=function(e){let o=e._width,t=e._vertexFormat,n=e._colors,c=e._colorsPerVertex,s=e._arcType,l=e._granularity,E=e._ellipsoid,a,r,w,b=[],i=le(e._positions,p.equalsEpsilon,!1,b);if(h(n)&&b.length>0){let d=0,P=b[0];n=n.filter(function(q,T){let g=!1;return c?g=T===P||T===0&&P===1:g=T+1===P,g?(d++,P=b[d],!1):!0})}let f=i.length;if(f<2||o<=0)return;if(s===N.GEODESIC||s===N.RHUMB){let d,P;s===N.GEODESIC?(d=J.chordLength(l,E.maximumRadius),P=U.numberOfPoints):(d=l,P=U.numberOfPointsRhumbLine);let q=U.extractHeights(i,E);if(h(n)){let T=1;for(a=0;a<f-1;++a)T+=P(i[a],i[a+1],d);let g=new Array(T),D=0;for(a=0;a<f-1;++a){let Z=i[a],$=i[a+1],I=n[a],ee=P(Z,$,d);if(c&&a<T){let _e=n[a+1],te=Ae(Z,$,I,_e,ee),Pe=te.length;for(r=0;r<Pe;++r)g[D++]=te[r]}else for(r=0;r<ee;++r)g[D++]=m.clone(I)}g[D]=m.clone(n[n.length-1]),n=g,me.length=0}s===N.GEODESIC?i=U.generateCartesianArc({positions:i,minDistance:d,ellipsoid:E,height:q}):i=U.generateCartesianRhumbArc({positions:i,granularity:d,ellipsoid:E,height:q})}f=i.length;let L=f*4-4,M=new Float64Array(L*3),z=new Float64Array(L*3),H=new Float64Array(L*3),B=new Float32Array(L*2),K=t.st?new Float32Array(L*2):void 0,y=h(n)?new Uint8Array(L*4):void 0,W=0,j=0,X=0,Y=0,_;for(r=0;r<f;++r){r===0?(_=pe,p.subtract(i[0],i[1],_),p.add(i[0],_,_)):_=i[r-1],p.clone(_,fe),p.clone(i[r],ae),r===f-1?(_=pe,p.subtract(i[f-1],i[f-2],_),p.add(i[f-1],_,_)):_=i[r+1],p.clone(_,he);let d,P;h(y)&&(r!==0&&!c?d=n[r-1]:d=n[r],r!==f-1&&(P=n[r]));let q=r===0?2:0,T=r===f-1?2:4;for(w=q;w<T;++w){p.pack(ae,M,W),p.pack(fe,z,W),p.pack(he,H,W),W+=3;let g=w-2<0?-1:1;if(B[j++]=2*(w%2)-1,B[j++]=g*o,t.st&&(K[X++]=r/(f-1),K[X++]=Math.max(B[j-2],0)),h(y)){let D=w<2?d:P;y[Y++]=m.floatToByte(D.red),y[Y++]=m.floatToByte(D.green),y[Y++]=m.floatToByte(D.blue),y[Y++]=m.floatToByte(D.alpha)}}}let v=new ce;v.position=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:M}),v.prevPosition=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:z}),v.nextPosition=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:H}),v.expandAndWidth=new O({componentDatatype:x.FLOAT,componentsPerAttribute:2,values:B}),t.st&&(v.st=new O({componentDatatype:x.FLOAT,componentsPerAttribute:2,values:K})),h(y)&&(v.color=new O({componentDatatype:x.UNSIGNED_BYTE,componentsPerAttribute:4,values:y,normalize:!0}));let C=se.createTypedArray(L,f*6-6),F=0,R=0,we=f-1;for(r=0;r<we;++r)C[R++]=F,C[R++]=F+2,C[R++]=F+1,C[R++]=F+1,C[R++]=F+2,C[R++]=F+3,F+=4;return new ie({attributes:v,indices:C,primitiveType:re.TRIANGLES,boundingSphere:oe.fromPoints(i),geometryType:ne.POLYLINES})};var Q=G;function ge(e,o){return h(o)&&(e=Q.unpack(e,o)),e._ellipsoid=u.clone(e._ellipsoid),Q.createGeometry(e)}var We=ge;export{We as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.120.2
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{a as M}from"./chunk-
|
|
26
|
+
import{a as M}from"./chunk-HIKVO3YB.js";import{a as W}from"./chunk-W5OYQDXN.js";import"./chunk-EARE55VU.js";import"./chunk-34X2ZL32.js";import{a as x,b as I,c as j}from"./chunk-5XCWZRKD.js";import"./chunk-VV7VOBQF.js";import"./chunk-3FCK4U2N.js";import{a as g}from"./chunk-ZHH5JPWV.js";import"./chunk-U6VPCTVK.js";import"./chunk-763AHQX3.js";import{a as $,b as V}from"./chunk-S5WJXCZO.js";import{a as Z}from"./chunk-6IQGHKR5.js";import"./chunk-P2A4LTBW.js";import"./chunk-NW4BJ3IZ.js";import"./chunk-QC664SDS.js";import{a as X}from"./chunk-7K5QPZEL.js";import{a as Q}from"./chunk-5JSDDVN4.js";import{b as Y,c as z,d as U}from"./chunk-6V3AGY4C.js";import{d as K}from"./chunk-MNKVHNSN.js";import"./chunk-QLA567VU.js";import{a as B}from"./chunk-23HMYUSJ.js";import{a as T,c as C,d as f}from"./chunk-EBGE3XTZ.js";import{a as J}from"./chunk-VEDHIHCJ.js";import"./chunk-PQF7YB7C.js";import"./chunk-TBESXZ5I.js";import{a as k}from"./chunk-YXBVEKWI.js";import{a as D}from"./chunk-J63AP2GZ.js";import{e as _}from"./chunk-LPL3F3FU.js";function oe(t,e,n,o){let l=new Q;o.position&&(l.position=new U({componentDatatype:B.DOUBLE,componentsPerAttribute:3,values:t}));let i=e.length,u=t.length/3,L=(u-i*2)/(i*2),E=V.triangulate(e),q=(L-1)*i*6+E.length*2,r=X.createTypedArray(u,q),m,s,d,b,A,F,G=i*2,p=0;for(m=0;m<L-1;m++){for(s=0;s<i-1;s++)d=s*2+m*i*2,F=d+G,b=d+1,A=b+G,r[p++]=b,r[p++]=d,r[p++]=A,r[p++]=A,r[p++]=d,r[p++]=F;d=i*2-2+m*i*2,b=d+1,A=b+G,F=d+G,r[p++]=b,r[p++]=d,r[p++]=A,r[p++]=A,r[p++]=d,r[p++]=F}if(o.st||o.tangent||o.bitangent){let c=new Float32Array(u*2),O=1/(L-1),w=1/n.height,S=n.height/2,y,a,h=0;for(m=0;m<L;m++){for(y=m*O,a=w*(e[0].y+S),c[h++]=y,c[h++]=a,s=1;s<i;s++)a=w*(e[s].y+S),c[h++]=y,c[h++]=a,c[h++]=y,c[h++]=a;a=w*(e[0].y+S),c[h++]=y,c[h++]=a}for(s=0;s<i;s++)y=0,a=w*(e[s].y+S),c[h++]=y,c[h++]=a;for(s=0;s<i;s++)y=(L-1)*O,a=w*(e[s].y+S),c[h++]=y,c[h++]=a;l.st=new U({componentDatatype:B.FLOAT,componentsPerAttribute:2,values:new Float32Array(c)})}let N=u-i*2;for(m=0;m<E.length;m+=3){let c=E[m]+N,O=E[m+1]+N,w=E[m+2]+N;r[p++]=c,r[p++]=O,r[p++]=w,r[p++]=w+i,r[p++]=O+i,r[p++]=c+i}let P=new z({attributes:l,indices:r,boundingSphere:K.fromVertices(t),primitiveType:Y.TRIANGLES});if(o.normal&&(P=W.computeNormal(P)),o.tangent||o.bitangent){try{P=W.computeTangentAndBitangent(P)}catch{I("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}o.tangent||(P.attributes.tangent=void 0),o.bitangent||(P.attributes.bitangent=void 0),o.st||(P.attributes.st=void 0)}return P}function R(t){t=k(t,k.EMPTY_OBJECT);let e=t.polylinePositions,n=t.shapePositions;if(!_(e))throw new D("options.polylinePositions is required.");if(!_(n))throw new D("options.shapePositions is required.");this._positions=e,this._shape=n,this._ellipsoid=f.clone(k(t.ellipsoid,f.default)),this._cornerType=k(t.cornerType,x.ROUNDED),this._vertexFormat=g.clone(k(t.vertexFormat,g.DEFAULT)),this._granularity=k(t.granularity,J.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";let o=1+e.length*T.packedLength;o+=1+n.length*C.packedLength,this.packedLength=o+f.packedLength+g.packedLength+2}R.pack=function(t,e,n){if(!_(t))throw new D("value is required");if(!_(e))throw new D("array is required");n=k(n,0);let o,l=t._positions,i=l.length;for(e[n++]=i,o=0;o<i;++o,n+=T.packedLength)T.pack(l[o],e,n);let u=t._shape;for(i=u.length,e[n++]=i,o=0;o<i;++o,n+=C.packedLength)C.pack(u[o],e,n);return f.pack(t._ellipsoid,e,n),n+=f.packedLength,g.pack(t._vertexFormat,e,n),n+=g.packedLength,e[n++]=t._cornerType,e[n]=t._granularity,e};var ee=f.clone(f.UNIT_SPHERE),te=new g,v={polylinePositions:void 0,shapePositions:void 0,ellipsoid:ee,vertexFormat:te,cornerType:void 0,granularity:void 0};R.unpack=function(t,e,n){if(!_(t))throw new D("array is required");e=k(e,0);let o,l=t[e++],i=new Array(l);for(o=0;o<l;++o,e+=T.packedLength)i[o]=T.unpack(t,e);l=t[e++];let u=new Array(l);for(o=0;o<l;++o,e+=C.packedLength)u[o]=C.unpack(t,e);let L=f.unpack(t,e,ee);e+=f.packedLength;let E=g.unpack(t,e,te);e+=g.packedLength;let q=t[e++],r=t[e];return _(n)?(n._positions=i,n._shape=u,n._ellipsoid=f.clone(L,n._ellipsoid),n._vertexFormat=g.clone(E,n._vertexFormat),n._cornerType=q,n._granularity=r,n):(v.polylinePositions=i,v.shapePositions=u,v.cornerType=q,v.granularity=r,new R(v))};var ne=new M;R.createGeometry=function(t){let e=t._positions,n=Z(e,T.equalsEpsilon),o=t._shape;if(o=j.removeDuplicatesFromShape(o),n.length<2||o.length<3)return;V.computeWindingOrder2D(o)===$.CLOCKWISE&&o.reverse();let l=M.fromPoints(o,ne),i=j.computePositions(n,o,l,t,!0);return oe(i,o,l,t._vertexFormat)};var H=R;function ie(t,e){return _(e)&&(t=H.unpack(t,e)),t._ellipsoid=f.clone(t._ellipsoid),H.createGeometry(t)}var Re=ie;export{Re as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.120.2
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{a as w}from"./chunk-
|
|
26
|
+
import{a as w}from"./chunk-HIKVO3YB.js";import{a as N,c as E}from"./chunk-5XCWZRKD.js";import"./chunk-VV7VOBQF.js";import"./chunk-3FCK4U2N.js";import"./chunk-U6VPCTVK.js";import"./chunk-763AHQX3.js";import{a as v,b as G}from"./chunk-S5WJXCZO.js";import{a as q}from"./chunk-6IQGHKR5.js";import"./chunk-P2A4LTBW.js";import"./chunk-NW4BJ3IZ.js";import"./chunk-QC664SDS.js";import{a as k}from"./chunk-7K5QPZEL.js";import{a as O}from"./chunk-5JSDDVN4.js";import{b as A,c as R,d as S}from"./chunk-6V3AGY4C.js";import{d as C}from"./chunk-MNKVHNSN.js";import"./chunk-QLA567VU.js";import{a as b}from"./chunk-23HMYUSJ.js";import{a,c as _,d as s}from"./chunk-EBGE3XTZ.js";import{a as D}from"./chunk-VEDHIHCJ.js";import"./chunk-PQF7YB7C.js";import"./chunk-TBESXZ5I.js";import{a as d}from"./chunk-YXBVEKWI.js";import{a as y}from"./chunk-J63AP2GZ.js";import{e as u}from"./chunk-LPL3F3FU.js";function W(o,i){let t=new O;t.position=new S({componentDatatype:b.DOUBLE,componentsPerAttribute:3,values:o});let e=i.length,r=t.position.values.length/3,f=o.length/3/e,p=k.createTypedArray(r,2*e*(f+1)),m,n,l=0;m=0;let h=m*e;for(n=0;n<e-1;n++)p[l++]=n+h,p[l++]=n+h+1;for(p[l++]=e-1+h,p[l++]=h,m=f-1,h=m*e,n=0;n<e-1;n++)p[l++]=n+h,p[l++]=n+h+1;for(p[l++]=e-1+h,p[l++]=h,m=0;m<f-1;m++){let T=e*m,U=T+e;for(n=0;n<e;n++)p[l++]=n+T,p[l++]=n+U}return new R({attributes:t,indices:k.createTypedArray(r,p),boundingSphere:C.fromVertices(o),primitiveType:A.LINES})}function g(o){o=d(o,d.EMPTY_OBJECT);let i=o.polylinePositions,t=o.shapePositions;if(!u(i))throw new y("options.polylinePositions is required.");if(!u(t))throw new y("options.shapePositions is required.");this._positions=i,this._shape=t,this._ellipsoid=s.clone(d(o.ellipsoid,s.default)),this._cornerType=d(o.cornerType,N.ROUNDED),this._granularity=d(o.granularity,D.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";let e=1+i.length*a.packedLength;e+=1+t.length*_.packedLength,this.packedLength=e+s.packedLength+2}g.pack=function(o,i,t){if(!u(o))throw new y("value is required");if(!u(i))throw new y("array is required");t=d(t,0);let e,r=o._positions,c=r.length;for(i[t++]=c,e=0;e<c;++e,t+=a.packedLength)a.pack(r[e],i,t);let f=o._shape;for(c=f.length,i[t++]=c,e=0;e<c;++e,t+=_.packedLength)_.pack(f[e],i,t);return s.pack(o._ellipsoid,i,t),t+=s.packedLength,i[t++]=o._cornerType,i[t]=o._granularity,i};var B=s.clone(s.UNIT_SPHERE),P={polylinePositions:void 0,shapePositions:void 0,ellipsoid:B,height:void 0,cornerType:void 0,granularity:void 0};g.unpack=function(o,i,t){if(!u(o))throw new y("array is required");i=d(i,0);let e,r=o[i++],c=new Array(r);for(e=0;e<r;++e,i+=a.packedLength)c[e]=a.unpack(o,i);r=o[i++];let f=new Array(r);for(e=0;e<r;++e,i+=_.packedLength)f[e]=_.unpack(o,i);let p=s.unpack(o,i,B);i+=s.packedLength;let m=o[i++],n=o[i];return u(t)?(t._positions=c,t._shape=f,t._ellipsoid=s.clone(p,t._ellipsoid),t._cornerType=m,t._granularity=n,t):(P.polylinePositions=c,P.shapePositions=f,P.cornerType=m,P.granularity=n,new g(P))};var M=new w;g.createGeometry=function(o){let i=o._positions,t=q(i,a.equalsEpsilon),e=o._shape;if(e=E.removeDuplicatesFromShape(e),t.length<2||e.length<3)return;G.computeWindingOrder2D(e)===v.CLOCKWISE&&e.reverse();let r=w.fromPoints(e,M),c=E.computePositions(t,e,r,o,!1);return W(c,e)};var L=g;function j(o,i){return u(i)&&(o=L.unpack(o,i)),o._ellipsoid=s.clone(o._ellipsoid),L.createGeometry(o)}var he=j;export{he as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.120.2
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{a as J}from"./chunk-LO4XCY55.js";import{a as Nt}from"./chunk-4RJDMIO4.js";import{a as zt}from"./chunk-5HTTNN4T.js";import"./chunk-D3TZ2KW7.js";import"./chunk-XUP5J7GQ.js";import{a as ut}from"./chunk-T4QAV6EX.js";import{a as X}from"./chunk-YJTMGLB7.js";import{b as Rt}from"./chunk-GCHOMXEL.js";import"./chunk-4Y673DAX.js";import"./chunk-C4OMKOTM.js";import"./chunk-NVQN2WQZ.js";import{a as yt}from"./chunk-JJYRRIWN.js";import{a as Vt}from"./chunk-LXL44TDT.js";import{b as Mt,c as Pt,d as q}from"./chunk-7JE52M2E.js";import{d as st,f as Lt}from"./chunk-Q3IJMJJ2.js";import"./chunk-OPGPRG5D.js";import{c as S,d as G,e as At}from"./chunk-X7PMFMCX.js";import{a as Y}from"./chunk-FAMH7QPQ.js";import{a as _,b as wt,c as H,d as ft}from"./chunk-ZGGJSLK5.js";import{a as W}from"./chunk-BYGMMPBC.js";import"./chunk-HXIAOT7H.js";import"./chunk-E2BL2RZG.js";import{a as L}from"./chunk-HKVMSEEW.js";import{a as Et,b as lt}from"./chunk-Y6JLAJTJ.js";import{e as $}from"./chunk-SOPLNYSA.js";var Tt=new _,Bt=new _,Ut=new _,Yt=new _,qt=new S,Zt=new G,Kt=new st,$t=new st;function Xt(t,e){let n=new Pt({attributes:new Vt,primitiveType:Mt.TRIANGLES});return n.attributes.position=new q({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(n.attributes.normal=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(n.attributes.tangent=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(n.attributes.bitangent=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.bitangents})),n}function Gt(t,e,n,r){let a=t.length,c=e.normal?new Float32Array(a):void 0,l=e.tangent?new Float32Array(a):void 0,u=e.bitangent?new Float32Array(a):void 0,p=0,d=Yt,o=Ut,i=Bt;if(e.normal||e.tangent||e.bitangent)for(let f=0;f<a;f+=3){let s=_.fromArray(t,f,Tt),h=p+1,g=p+2;i=n.geodeticSurfaceNormal(s,i),(e.tangent||e.bitangent)&&(_.cross(_.UNIT_Z,i,o),ft.multiplyByVector(r,o,o),_.normalize(o,o),e.bitangent&&_.normalize(_.cross(i,o,d),d)),e.normal&&(c[p]=i.x,c[h]=i.y,c[g]=i.z),e.tangent&&(l[p]=o.x,l[h]=o.y,l[g]=o.z),e.bitangent&&(u[p]=d.x,u[h]=d.y,u[g]=d.z),p+=3}return Xt(e,{positions:t,normals:c,tangents:l,bitangents:u})}var Ct=new _,jt=new _;function te(t,e,n){let r=t.length,a=e.normal?new Float32Array(r):void 0,c=e.tangent?new Float32Array(r):void 0,l=e.bitangent?new Float32Array(r):void 0,u=0,p=0,d=0,o=!0,i=Yt,f=Ut,s=Bt;if(e.normal||e.tangent||e.bitangent)for(let h=0;h<r;h+=6){let g=_.fromArray(t,h,Tt),A=_.fromArray(t,(h+6)%r,Ct);if(o){let b=_.fromArray(t,(h+3)%r,jt);_.subtract(A,g,A),_.subtract(b,g,b),s=_.normalize(_.cross(b,A,s),s),o=!1}_.equalsEpsilon(A,g,W.EPSILON10)&&(o=!0),(e.tangent||e.bitangent)&&(i=n.geodeticSurfaceNormal(g,i),e.tangent&&(f=_.normalize(_.cross(i,s,f),f))),e.normal&&(a[u++]=s.x,a[u++]=s.y,a[u++]=s.z,a[u++]=s.x,a[u++]=s.y,a[u++]=s.z),e.tangent&&(c[p++]=f.x,c[p++]=f.y,c[p++]=f.z,c[p++]=f.x,c[p++]=f.y,c[p++]=f.z),e.bitangent&&(l[d++]=i.x,l[d++]=i.y,l[d++]=i.z,l[d++]=i.x,l[d++]=i.y,l[d++]=i.z)}return Xt(e,{positions:t,normals:a,tangents:c,bitangents:l})}function It(t,e){let n=t._vertexFormat,r=t._ellipsoid,a=e.height,c=e.width,l=e.northCap,u=e.southCap,p=0,d=a,o=a,i=0;l&&(p=1,o-=1,i+=1),u&&(d-=1,o-=1,i+=1),i+=c*o;let f=n.position?new Float64Array(i*3):void 0,s=n.st?new Float32Array(i*2):void 0,h=0,g=0,A=Tt,b=Zt,z=Number.MAX_VALUE,F=Number.MAX_VALUE,j=-Number.MAX_VALUE,T=-Number.MAX_VALUE;for(let x=p;x<d;++x)for(let k=0;k<c;++k)J.computePosition(e,r,n.st,x,k,A,b),f[h++]=A.x,f[h++]=A.y,f[h++]=A.z,n.st&&(s[g++]=b.x,s[g++]=b.y,z=Math.min(z,b.x),F=Math.min(F,b.y),j=Math.max(j,b.x),T=Math.max(T,b.y));if(l&&(J.computePosition(e,r,n.st,0,0,A,b),f[h++]=A.x,f[h++]=A.y,f[h++]=A.z,n.st&&(s[g++]=b.x,s[g++]=b.y,z=b.x,F=b.y,j=b.x,T=b.y)),u&&(J.computePosition(e,r,n.st,a-1,0,A,b),f[h++]=A.x,f[h++]=A.y,f[h]=A.z,n.st&&(s[g++]=b.x,s[g]=b.y,z=Math.min(z,b.x),F=Math.min(F,b.y),j=Math.max(j,b.x),T=Math.max(T,b.y))),n.st&&(z<0||F<0||j>1||T>1))for(let x=0;x<s.length;x+=2)s[x]=(s[x]-z)/(j-z),s[x+1]=(s[x+1]-F)/(T-F);let m=Gt(f,n,r,e.tangentRotationMatrix),K=6*(c-1)*(o-1);l&&(K+=3*(c-1)),u&&(K+=3*(c-1));let P=yt.createTypedArray(i,K),D=0,N=0,O;for(O=0;O<o-1;++O){for(let x=0;x<c-1;++x){let k=D,M=k+c,I=M+1,rt=k+1;P[N++]=k,P[N++]=M,P[N++]=rt,P[N++]=rt,P[N++]=M,P[N++]=I,++D}++D}if(l||u){let x=i-1,k=i-1;l&&u&&(x=i-2);let M,I;if(D=0,l)for(O=0;O<c-1;O++)M=D,I=M+1,P[N++]=x,P[N++]=M,P[N++]=I,++D;if(u)for(D=(o-1)*c,O=0;O<c-1;O++)M=D,I=M+1,P[N++]=M,P[N++]=k,P[N++]=I,++D}return m.indices=P,n.st&&(m.attributes.st=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:s})),m}function ht(t,e,n,r,a){return t[e++]=r[n],t[e++]=r[n+1],t[e++]=r[n+2],t[e++]=a[n],t[e++]=a[n+1],t[e]=a[n+2],t}function pt(t,e,n,r){return t[e++]=r[n],t[e++]=r[n+1],t[e++]=r[n],t[e]=r[n+1],t}var Dt=new X;function ee(t,e){let n=t._shadowVolume,r=t._offsetAttribute,a=t._vertexFormat,c=t._extrudedHeight,l=t._surfaceHeight,u=t._ellipsoid,p=e.height,d=e.width,o;if(n){let R=X.clone(a,Dt);R.normal=!0,t._vertexFormat=R}let i=It(t,e);n&&(t._vertexFormat=a);let f=Rt.scaleToGeodeticHeight(i.attributes.position.values,l,u,!1);f=new Float64Array(f);let s=f.length,h=s*2,g=new Float64Array(h);g.set(f);let A=Rt.scaleToGeodeticHeight(i.attributes.position.values,c,u);g.set(A,s),i.attributes.position.values=g;let b=a.normal?new Float32Array(h):void 0,z=a.tangent?new Float32Array(h):void 0,F=a.bitangent?new Float32Array(h):void 0,j=a.st?new Float32Array(h/3*2):void 0,T,m;if(a.normal){for(m=i.attributes.normal.values,b.set(m),o=0;o<s;o++)m[o]=-m[o];b.set(m,s),i.attributes.normal.values=b}if(n){m=i.attributes.normal.values,a.normal||(i.attributes.normal=void 0);let R=new Float32Array(h);for(o=0;o<s;o++)m[o]=-m[o];R.set(m,s),i.attributes.extrudeDirection=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:R})}let K,P=$(r);if(P){let R=s/3*2,at=new Uint8Array(R);r===ut.TOP?at=at.fill(1,0,R/2):(K=r===ut.NONE?0:1,at=at.fill(K)),i.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:at})}if(a.tangent){let R=i.attributes.tangent.values;for(z.set(R),o=0;o<s;o++)R[o]=-R[o];z.set(R,s),i.attributes.tangent.values=z}if(a.bitangent){let R=i.attributes.bitangent.values;F.set(R),F.set(R,s),i.attributes.bitangent.values=F}a.st&&(T=i.attributes.st.values,j.set(T),j.set(T,s/3*2),i.attributes.st.values=j);let D=i.indices,N=D.length,O=s/3,x=yt.createTypedArray(h/3,N*2);for(x.set(D),o=0;o<N;o+=3)x[o+N]=D[o+2]+O,x[o+1+N]=D[o+1]+O,x[o+2+N]=D[o]+O;i.indices=x;let k=e.northCap,M=e.southCap,I=p,rt=2,dt=0,xt=4,St=4;k&&(rt-=1,I-=1,dt+=1,xt-=2,St-=1),M&&(rt-=1,I-=1,dt+=1,xt-=2,St-=1),dt+=rt*d+2*I-xt;let gt=(dt+St)*2,C=new Float64Array(gt*3),E=n?new Float32Array(gt*3):void 0,Z=P?new Uint8Array(gt):void 0,V=a.st?new Float32Array(gt*2):void 0,et=r===ut.TOP;P&&!et&&(K=r===ut.ALL?1:0,Z=Z.fill(K));let v=0,B=0,y=0,U=0,nt=d*I,w;for(o=0;o<nt;o+=d)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,o*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);if(M){let R=k?nt+1:nt;for(w=R*3,o=0;o<2;o++)C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,R*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1)}else for(o=nt-d;o<nt;o++)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,o*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);for(o=nt-1;o>0;o-=d)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,o*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);if(k){let R=nt;for(w=R*3,o=0;o<2;o++)C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,R*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1)}else for(o=d-1;o>=0;o--)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=pt(V,B,o*2,T),B+=4),n&&(y+=3,E[y++]=m[w],E[y++]=m[w+1],E[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);let ot=te(C,a,u);a.st&&(ot.attributes.st=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:V})),n&&(ot.attributes.extrudeDirection=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:E})),P&&(ot.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:Z}));let it=yt.createTypedArray(gt,dt*6),mt,_t,kt,bt;s=C.length/3;let ct=0;for(o=0;o<s-1;o+=2){mt=o,bt=(mt+2)%s;let R=_.fromArray(C,mt*3,Ct),at=_.fromArray(C,bt*3,jt);_.equalsEpsilon(R,at,W.EPSILON10)||(_t=(mt+1)%s,kt=(_t+2)%s,it[ct++]=mt,it[ct++]=_t,it[ct++]=bt,it[ct++]=bt,it[ct++]=_t,it[ct++]=kt)}return ot.indices=it,ot=zt.combineInstances([new Nt({geometry:i}),new Nt({geometry:ot})]),ot[0]}var ne=[new _,new _,new _,new _],Wt=new wt,oe=new wt;function Ht(t,e,n,r,a){if(n===0)return S.clone(t,a);let c=J.computeOptions(t,e,n,0,qt,Wt),l=c.height,u=c.width,p=ne;return J.computePosition(c,r,!1,0,0,p[0]),J.computePosition(c,r,!1,0,u-1,p[1]),J.computePosition(c,r,!1,l-1,0,p[2]),J.computePosition(c,r,!1,l-1,u-1,p[3]),S.fromCartesianArray(p,r,a)}function Q(t){t=L(t,L.EMPTY_OBJECT);let e=t.rectangle;if(lt.typeOf.object("rectangle",e),S.validate(e),e.north<e.south)throw new Et("options.rectangle.north must be greater than or equal to options.rectangle.south");let n=L(t.height,0),r=L(t.extrudedHeight,n);this._rectangle=S.clone(e),this._granularity=L(t.granularity,W.RADIANS_PER_DEGREE),this._ellipsoid=H.clone(L(t.ellipsoid,H.WGS84)),this._surfaceHeight=Math.max(n,r),this._rotation=L(t.rotation,0),this._stRotation=L(t.stRotation,0),this._vertexFormat=X.clone(L(t.vertexFormat,X.DEFAULT)),this._extrudedHeight=Math.min(n,r),this._shadowVolume=L(t.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=t.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}Q.packedLength=S.packedLength+H.packedLength+X.packedLength+7;Q.pack=function(t,e,n){return lt.typeOf.object("value",t),lt.defined("array",e),n=L(n,0),S.pack(t._rectangle,e,n),n+=S.packedLength,H.pack(t._ellipsoid,e,n),n+=H.packedLength,X.pack(t._vertexFormat,e,n),n+=X.packedLength,e[n++]=t._granularity,e[n++]=t._surfaceHeight,e[n++]=t._rotation,e[n++]=t._stRotation,e[n++]=t._extrudedHeight,e[n++]=t._shadowVolume?1:0,e[n]=L(t._offsetAttribute,-1),e};var Jt=new S,Qt=H.clone(H.UNIT_SPHERE),tt={rectangle:Jt,ellipsoid:Qt,vertexFormat:Dt,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};Q.unpack=function(t,e,n){lt.defined("array",t),e=L(e,0);let r=S.unpack(t,e,Jt);e+=S.packedLength;let a=H.unpack(t,e,Qt);e+=H.packedLength;let c=X.unpack(t,e,Dt);e+=X.packedLength;let l=t[e++],u=t[e++],p=t[e++],d=t[e++],o=t[e++],i=t[e++]===1,f=t[e];return $(n)?(n._rectangle=S.clone(r,n._rectangle),n._ellipsoid=H.clone(a,n._ellipsoid),n._vertexFormat=X.clone(c,n._vertexFormat),n._granularity=l,n._surfaceHeight=u,n._rotation=p,n._stRotation=d,n._extrudedHeight=o,n._shadowVolume=i,n._offsetAttribute=f===-1?void 0:f,n):(tt.granularity=l,tt.height=u,tt.rotation=p,tt.stRotation=d,tt.extrudedHeight=o,tt.shadowVolume=i,tt.offsetAttribute=f===-1?void 0:f,new Q(tt))};Q.computeRectangle=function(t,e){t=L(t,L.EMPTY_OBJECT);let n=t.rectangle;if(lt.typeOf.object("rectangle",n),S.validate(n),n.north<n.south)throw new Et("options.rectangle.north must be greater than or equal to options.rectangle.south");let r=L(t.granularity,W.RADIANS_PER_DEGREE),a=L(t.ellipsoid,H.WGS84),c=L(t.rotation,0);return Ht(n,r,c,a,e)};var ie=new ft,Ft=new Lt,ae=new wt;Q.createGeometry=function(t){if(W.equalsEpsilon(t._rectangle.north,t._rectangle.south,W.EPSILON10)||W.equalsEpsilon(t._rectangle.east,t._rectangle.west,W.EPSILON10))return;let e=t._rectangle,n=t._ellipsoid,r=t._rotation,a=t._stRotation,c=t._vertexFormat,l=J.computeOptions(e,t._granularity,r,a,qt,Wt,oe),u=ie;if(a!==0||r!==0){let s=S.center(e,ae),h=n.geodeticSurfaceNormalCartographic(s,Ct);Lt.fromAxisAngle(h,-a,Ft),ft.fromQuaternion(Ft,u)}else ft.clone(ft.IDENTITY,u);let p=t._surfaceHeight,d=t._extrudedHeight,o=!W.equalsEpsilon(p,d,0,W.EPSILON2);l.lonScalar=1/t._rectangle.width,l.latScalar=1/t._rectangle.height,l.tangentRotationMatrix=u;let i,f;if(e=t._rectangle,o){i=ee(t,l);let s=st.fromRectangle3D(e,n,p,$t),h=st.fromRectangle3D(e,n,d,Kt);f=st.union(s,h)}else{if(i=It(t,l),i.attributes.position.values=Rt.scaleToGeodeticHeight(i.attributes.position.values,p,n,!1),$(t._offsetAttribute)){let s=i.attributes.position.values.length,h=t._offsetAttribute===ut.NONE?0:1,g=new Uint8Array(s/3).fill(h);i.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:g})}f=st.fromRectangle3D(e,n,p)}return c.position||delete i.attributes.position,new Pt({attributes:i.attributes,indices:i.indices,primitiveType:i.primitiveType,boundingSphere:f,offsetAttribute:t._offsetAttribute})};Q.createShadowVolume=function(t,e,n){let r=t._granularity,a=t._ellipsoid,c=e(r,a),l=n(r,a);return new Q({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:a,stRotation:t._stRotation,granularity:r,extrudedHeight:l,height:c,vertexFormat:X.POSITION_ONLY,shadowVolume:!0})};var vt=new S,se=[new G,new G,new G],re=new At,ce=new wt;function le(t){if(t._stRotation===0)return[0,0,0,1,1,0];let e=S.clone(t._rectangle,vt),n=t._granularity,r=t._ellipsoid,a=t._rotation-t._stRotation,c=Ht(e,n,a,r,vt),l=se;l[0].x=c.west,l[0].y=c.south,l[1].x=c.west,l[1].y=c.north,l[2].x=c.east,l[2].y=c.south;let u=t.rectangle,p=At.fromRotation(t._stRotation,re),d=S.center(u,ce);for(let h=0;h<3;++h){let g=l[h];g.x-=d.longitude,g.y-=d.latitude,At.multiplyByVector(p,g,g),g.x+=d.longitude,g.y+=d.latitude,g.x=(g.x-u.west)/u.width,g.y=(g.y-u.south)/u.height}let o=l[0],i=l[1],f=l[2],s=new Array(6);return G.pack(o,s),G.pack(i,s,2),G.pack(f,s,4),s}Object.defineProperties(Q.prototype,{rectangle:{get:function(){return $(this._rotatedRectangle)||(this._rotatedRectangle=Ht(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return $(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=le(this)),this._textureCoordinateRotationPoints}}});var Ot=Q;function fe(t,e){return $(e)&&(t=Ot.unpack(t,e)),t._ellipsoid=H.clone(t._ellipsoid),t._rectangle=S.clone(t._rectangle),Ot.createGeometry(t)}var Ye=fe;export{Ye as default};
|
|
26
|
+
import{a as J}from"./chunk-OE6BOPXI.js";import{a as Nt}from"./chunk-TAU7Y5S5.js";import{a as zt}from"./chunk-W5OYQDXN.js";import"./chunk-EARE55VU.js";import"./chunk-34X2ZL32.js";import{a as ut}from"./chunk-CDIJULSW.js";import{a as X}from"./chunk-ZHH5JPWV.js";import{b as Rt}from"./chunk-S5WJXCZO.js";import"./chunk-P2A4LTBW.js";import"./chunk-NW4BJ3IZ.js";import"./chunk-QC664SDS.js";import{a as yt}from"./chunk-7K5QPZEL.js";import{a as Vt}from"./chunk-5JSDDVN4.js";import{b as Mt,c as Pt,d as q}from"./chunk-6V3AGY4C.js";import{d as st}from"./chunk-MNKVHNSN.js";import{f as Lt,h as E,i as At}from"./chunk-QLA567VU.js";import{a as Y}from"./chunk-23HMYUSJ.js";import{a as _,b as wt,c as G,d as H,e as ft}from"./chunk-EBGE3XTZ.js";import{a as W}from"./chunk-VEDHIHCJ.js";import"./chunk-PQF7YB7C.js";import"./chunk-TBESXZ5I.js";import{a as L}from"./chunk-YXBVEKWI.js";import{a as St,b as lt}from"./chunk-J63AP2GZ.js";import{e as $}from"./chunk-LPL3F3FU.js";var Tt=new _,Bt=new _,Ut=new _,Yt=new _,qt=new E,Zt=new G,Kt=new st,$t=new st;function Xt(t,e){let n=new Pt({attributes:new Vt,primitiveType:Mt.TRIANGLES});return n.attributes.position=new q({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(n.attributes.normal=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(n.attributes.tangent=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(n.attributes.bitangent=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.bitangents})),n}function Gt(t,e,n,r){let a=t.length,c=e.normal?new Float32Array(a):void 0,l=e.tangent?new Float32Array(a):void 0,u=e.bitangent?new Float32Array(a):void 0,d=0,p=Yt,o=Ut,i=Bt;if(e.normal||e.tangent||e.bitangent)for(let f=0;f<a;f+=3){let s=_.fromArray(t,f,Tt),h=d+1,g=d+2;i=n.geodeticSurfaceNormal(s,i),(e.tangent||e.bitangent)&&(_.cross(_.UNIT_Z,i,o),ft.multiplyByVector(r,o,o),_.normalize(o,o),e.bitangent&&_.normalize(_.cross(i,o,p),p)),e.normal&&(c[d]=i.x,c[h]=i.y,c[g]=i.z),e.tangent&&(l[d]=o.x,l[h]=o.y,l[g]=o.z),e.bitangent&&(u[d]=p.x,u[h]=p.y,u[g]=p.z),d+=3}return Xt(e,{positions:t,normals:c,tangents:l,bitangents:u})}var Ct=new _,jt=new _;function te(t,e,n){let r=t.length,a=e.normal?new Float32Array(r):void 0,c=e.tangent?new Float32Array(r):void 0,l=e.bitangent?new Float32Array(r):void 0,u=0,d=0,p=0,o=!0,i=Yt,f=Ut,s=Bt;if(e.normal||e.tangent||e.bitangent)for(let h=0;h<r;h+=6){let g=_.fromArray(t,h,Tt),A=_.fromArray(t,(h+6)%r,Ct);if(o){let b=_.fromArray(t,(h+3)%r,jt);_.subtract(A,g,A),_.subtract(b,g,b),s=_.normalize(_.cross(b,A,s),s),o=!1}_.equalsEpsilon(A,g,W.EPSILON10)&&(o=!0),(e.tangent||e.bitangent)&&(i=n.geodeticSurfaceNormal(g,i),e.tangent&&(f=_.normalize(_.cross(i,s,f),f))),e.normal&&(a[u++]=s.x,a[u++]=s.y,a[u++]=s.z,a[u++]=s.x,a[u++]=s.y,a[u++]=s.z),e.tangent&&(c[d++]=f.x,c[d++]=f.y,c[d++]=f.z,c[d++]=f.x,c[d++]=f.y,c[d++]=f.z),e.bitangent&&(l[p++]=i.x,l[p++]=i.y,l[p++]=i.z,l[p++]=i.x,l[p++]=i.y,l[p++]=i.z)}return Xt(e,{positions:t,normals:a,tangents:c,bitangents:l})}function It(t,e){let n=t._vertexFormat,r=t._ellipsoid,a=e.height,c=e.width,l=e.northCap,u=e.southCap,d=0,p=a,o=a,i=0;l&&(d=1,o-=1,i+=1),u&&(p-=1,o-=1,i+=1),i+=c*o;let f=n.position?new Float64Array(i*3):void 0,s=n.st?new Float32Array(i*2):void 0,h=0,g=0,A=Tt,b=Zt,z=Number.MAX_VALUE,F=Number.MAX_VALUE,j=-Number.MAX_VALUE,T=-Number.MAX_VALUE;for(let x=d;x<p;++x)for(let k=0;k<c;++k)J.computePosition(e,r,n.st,x,k,A,b),f[h++]=A.x,f[h++]=A.y,f[h++]=A.z,n.st&&(s[g++]=b.x,s[g++]=b.y,z=Math.min(z,b.x),F=Math.min(F,b.y),j=Math.max(j,b.x),T=Math.max(T,b.y));if(l&&(J.computePosition(e,r,n.st,0,0,A,b),f[h++]=A.x,f[h++]=A.y,f[h++]=A.z,n.st&&(s[g++]=b.x,s[g++]=b.y,z=b.x,F=b.y,j=b.x,T=b.y)),u&&(J.computePosition(e,r,n.st,a-1,0,A,b),f[h++]=A.x,f[h++]=A.y,f[h]=A.z,n.st&&(s[g++]=b.x,s[g]=b.y,z=Math.min(z,b.x),F=Math.min(F,b.y),j=Math.max(j,b.x),T=Math.max(T,b.y))),n.st&&(z<0||F<0||j>1||T>1))for(let x=0;x<s.length;x+=2)s[x]=(s[x]-z)/(j-z),s[x+1]=(s[x+1]-F)/(T-F);let m=Gt(f,n,r,e.tangentRotationMatrix),K=6*(c-1)*(o-1);l&&(K+=3*(c-1)),u&&(K+=3*(c-1));let P=yt.createTypedArray(i,K),D=0,N=0,O;for(O=0;O<o-1;++O){for(let x=0;x<c-1;++x){let k=D,M=k+c,I=M+1,rt=k+1;P[N++]=k,P[N++]=M,P[N++]=rt,P[N++]=rt,P[N++]=M,P[N++]=I,++D}++D}if(l||u){let x=i-1,k=i-1;l&&u&&(x=i-2);let M,I;if(D=0,l)for(O=0;O<c-1;O++)M=D,I=M+1,P[N++]=x,P[N++]=M,P[N++]=I,++D;if(u)for(D=(o-1)*c,O=0;O<c-1;O++)M=D,I=M+1,P[N++]=M,P[N++]=k,P[N++]=I,++D}return m.indices=P,n.st&&(m.attributes.st=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:s})),m}function ht(t,e,n,r,a){return t[e++]=r[n],t[e++]=r[n+1],t[e++]=r[n+2],t[e++]=a[n],t[e++]=a[n+1],t[e]=a[n+2],t}function dt(t,e,n,r){return t[e++]=r[n],t[e++]=r[n+1],t[e++]=r[n],t[e]=r[n+1],t}var Dt=new X;function ee(t,e){let n=t._shadowVolume,r=t._offsetAttribute,a=t._vertexFormat,c=t._extrudedHeight,l=t._surfaceHeight,u=t._ellipsoid,d=e.height,p=e.width,o;if(n){let R=X.clone(a,Dt);R.normal=!0,t._vertexFormat=R}let i=It(t,e);n&&(t._vertexFormat=a);let f=Rt.scaleToGeodeticHeight(i.attributes.position.values,l,u,!1);f=new Float64Array(f);let s=f.length,h=s*2,g=new Float64Array(h);g.set(f);let A=Rt.scaleToGeodeticHeight(i.attributes.position.values,c,u);g.set(A,s),i.attributes.position.values=g;let b=a.normal?new Float32Array(h):void 0,z=a.tangent?new Float32Array(h):void 0,F=a.bitangent?new Float32Array(h):void 0,j=a.st?new Float32Array(h/3*2):void 0,T,m;if(a.normal){for(m=i.attributes.normal.values,b.set(m),o=0;o<s;o++)m[o]=-m[o];b.set(m,s),i.attributes.normal.values=b}if(n){m=i.attributes.normal.values,a.normal||(i.attributes.normal=void 0);let R=new Float32Array(h);for(o=0;o<s;o++)m[o]=-m[o];R.set(m,s),i.attributes.extrudeDirection=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:R})}let K,P=$(r);if(P){let R=s/3*2,at=new Uint8Array(R);r===ut.TOP?at=at.fill(1,0,R/2):(K=r===ut.NONE?0:1,at=at.fill(K)),i.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:at})}if(a.tangent){let R=i.attributes.tangent.values;for(z.set(R),o=0;o<s;o++)R[o]=-R[o];z.set(R,s),i.attributes.tangent.values=z}if(a.bitangent){let R=i.attributes.bitangent.values;F.set(R),F.set(R,s),i.attributes.bitangent.values=F}a.st&&(T=i.attributes.st.values,j.set(T),j.set(T,s/3*2),i.attributes.st.values=j);let D=i.indices,N=D.length,O=s/3,x=yt.createTypedArray(h/3,N*2);for(x.set(D),o=0;o<N;o+=3)x[o+N]=D[o+2]+O,x[o+1+N]=D[o+1]+O,x[o+2+N]=D[o]+O;i.indices=x;let k=e.northCap,M=e.southCap,I=d,rt=2,pt=0,xt=4,Et=4;k&&(rt-=1,I-=1,pt+=1,xt-=2,Et-=1),M&&(rt-=1,I-=1,pt+=1,xt-=2,Et-=1),pt+=rt*p+2*I-xt;let gt=(pt+Et)*2,C=new Float64Array(gt*3),S=n?new Float32Array(gt*3):void 0,Z=P?new Uint8Array(gt):void 0,V=a.st?new Float32Array(gt*2):void 0,et=r===ut.TOP;P&&!et&&(K=r===ut.ALL?1:0,Z=Z.fill(K));let v=0,B=0,y=0,U=0,nt=p*I,w;for(o=0;o<nt;o+=p)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=dt(V,B,o*2,T),B+=4),n&&(y+=3,S[y++]=m[w],S[y++]=m[w+1],S[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);if(M){let R=k?nt+1:nt;for(w=R*3,o=0;o<2;o++)C=ht(C,v,w,f,A),v+=6,a.st&&(V=dt(V,B,R*2,T),B+=4),n&&(y+=3,S[y++]=m[w],S[y++]=m[w+1],S[y++]=m[w+2]),et&&(Z[U++]=1,U+=1)}else for(o=nt-p;o<nt;o++)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=dt(V,B,o*2,T),B+=4),n&&(y+=3,S[y++]=m[w],S[y++]=m[w+1],S[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);for(o=nt-1;o>0;o-=p)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=dt(V,B,o*2,T),B+=4),n&&(y+=3,S[y++]=m[w],S[y++]=m[w+1],S[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);if(k){let R=nt;for(w=R*3,o=0;o<2;o++)C=ht(C,v,w,f,A),v+=6,a.st&&(V=dt(V,B,R*2,T),B+=4),n&&(y+=3,S[y++]=m[w],S[y++]=m[w+1],S[y++]=m[w+2]),et&&(Z[U++]=1,U+=1)}else for(o=p-1;o>=0;o--)w=o*3,C=ht(C,v,w,f,A),v+=6,a.st&&(V=dt(V,B,o*2,T),B+=4),n&&(y+=3,S[y++]=m[w],S[y++]=m[w+1],S[y++]=m[w+2]),et&&(Z[U++]=1,U+=1);let ot=te(C,a,u);a.st&&(ot.attributes.st=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:V})),n&&(ot.attributes.extrudeDirection=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:S})),P&&(ot.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:Z}));let it=yt.createTypedArray(gt,pt*6),mt,_t,kt,bt;s=C.length/3;let ct=0;for(o=0;o<s-1;o+=2){mt=o,bt=(mt+2)%s;let R=_.fromArray(C,mt*3,Ct),at=_.fromArray(C,bt*3,jt);_.equalsEpsilon(R,at,W.EPSILON10)||(_t=(mt+1)%s,kt=(_t+2)%s,it[ct++]=mt,it[ct++]=_t,it[ct++]=bt,it[ct++]=bt,it[ct++]=_t,it[ct++]=kt)}return ot.indices=it,ot=zt.combineInstances([new Nt({geometry:i}),new Nt({geometry:ot})]),ot[0]}var ne=[new _,new _,new _,new _],Wt=new wt,oe=new wt;function Ht(t,e,n,r,a){if(n===0)return E.clone(t,a);let c=J.computeOptions(t,e,n,0,qt,Wt),l=c.height,u=c.width,d=ne;return J.computePosition(c,r,!1,0,0,d[0]),J.computePosition(c,r,!1,0,u-1,d[1]),J.computePosition(c,r,!1,l-1,0,d[2]),J.computePosition(c,r,!1,l-1,u-1,d[3]),E.fromCartesianArray(d,r,a)}function Q(t){t=L(t,L.EMPTY_OBJECT);let e=t.rectangle;if(lt.typeOf.object("rectangle",e),E.validate(e),e.north<e.south)throw new St("options.rectangle.north must be greater than or equal to options.rectangle.south");let n=L(t.height,0),r=L(t.extrudedHeight,n);this._rectangle=E.clone(e),this._granularity=L(t.granularity,W.RADIANS_PER_DEGREE),this._ellipsoid=H.clone(L(t.ellipsoid,H.default)),this._surfaceHeight=Math.max(n,r),this._rotation=L(t.rotation,0),this._stRotation=L(t.stRotation,0),this._vertexFormat=X.clone(L(t.vertexFormat,X.DEFAULT)),this._extrudedHeight=Math.min(n,r),this._shadowVolume=L(t.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=t.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}Q.packedLength=E.packedLength+H.packedLength+X.packedLength+7;Q.pack=function(t,e,n){return lt.typeOf.object("value",t),lt.defined("array",e),n=L(n,0),E.pack(t._rectangle,e,n),n+=E.packedLength,H.pack(t._ellipsoid,e,n),n+=H.packedLength,X.pack(t._vertexFormat,e,n),n+=X.packedLength,e[n++]=t._granularity,e[n++]=t._surfaceHeight,e[n++]=t._rotation,e[n++]=t._stRotation,e[n++]=t._extrudedHeight,e[n++]=t._shadowVolume?1:0,e[n]=L(t._offsetAttribute,-1),e};var Jt=new E,Qt=H.clone(H.UNIT_SPHERE),tt={rectangle:Jt,ellipsoid:Qt,vertexFormat:Dt,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};Q.unpack=function(t,e,n){lt.defined("array",t),e=L(e,0);let r=E.unpack(t,e,Jt);e+=E.packedLength;let a=H.unpack(t,e,Qt);e+=H.packedLength;let c=X.unpack(t,e,Dt);e+=X.packedLength;let l=t[e++],u=t[e++],d=t[e++],p=t[e++],o=t[e++],i=t[e++]===1,f=t[e];return $(n)?(n._rectangle=E.clone(r,n._rectangle),n._ellipsoid=H.clone(a,n._ellipsoid),n._vertexFormat=X.clone(c,n._vertexFormat),n._granularity=l,n._surfaceHeight=u,n._rotation=d,n._stRotation=p,n._extrudedHeight=o,n._shadowVolume=i,n._offsetAttribute=f===-1?void 0:f,n):(tt.granularity=l,tt.height=u,tt.rotation=d,tt.stRotation=p,tt.extrudedHeight=o,tt.shadowVolume=i,tt.offsetAttribute=f===-1?void 0:f,new Q(tt))};Q.computeRectangle=function(t,e){t=L(t,L.EMPTY_OBJECT);let n=t.rectangle;if(lt.typeOf.object("rectangle",n),E.validate(n),n.north<n.south)throw new St("options.rectangle.north must be greater than or equal to options.rectangle.south");let r=L(t.granularity,W.RADIANS_PER_DEGREE),a=L(t.ellipsoid,H.default),c=L(t.rotation,0);return Ht(n,r,c,a,e)};var ie=new ft,Ft=new Lt,ae=new wt;Q.createGeometry=function(t){if(W.equalsEpsilon(t._rectangle.north,t._rectangle.south,W.EPSILON10)||W.equalsEpsilon(t._rectangle.east,t._rectangle.west,W.EPSILON10))return;let e=t._rectangle,n=t._ellipsoid,r=t._rotation,a=t._stRotation,c=t._vertexFormat,l=J.computeOptions(e,t._granularity,r,a,qt,Wt,oe),u=ie;if(a!==0||r!==0){let s=E.center(e,ae),h=n.geodeticSurfaceNormalCartographic(s,Ct);Lt.fromAxisAngle(h,-a,Ft),ft.fromQuaternion(Ft,u)}else ft.clone(ft.IDENTITY,u);let d=t._surfaceHeight,p=t._extrudedHeight,o=!W.equalsEpsilon(d,p,0,W.EPSILON2);l.lonScalar=1/t._rectangle.width,l.latScalar=1/t._rectangle.height,l.tangentRotationMatrix=u;let i,f;if(e=t._rectangle,o){i=ee(t,l);let s=st.fromRectangle3D(e,n,d,$t),h=st.fromRectangle3D(e,n,p,Kt);f=st.union(s,h)}else{if(i=It(t,l),i.attributes.position.values=Rt.scaleToGeodeticHeight(i.attributes.position.values,d,n,!1),$(t._offsetAttribute)){let s=i.attributes.position.values.length,h=t._offsetAttribute===ut.NONE?0:1,g=new Uint8Array(s/3).fill(h);i.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:g})}f=st.fromRectangle3D(e,n,d)}return c.position||delete i.attributes.position,new Pt({attributes:i.attributes,indices:i.indices,primitiveType:i.primitiveType,boundingSphere:f,offsetAttribute:t._offsetAttribute})};Q.createShadowVolume=function(t,e,n){let r=t._granularity,a=t._ellipsoid,c=e(r,a),l=n(r,a);return new Q({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:a,stRotation:t._stRotation,granularity:r,extrudedHeight:l,height:c,vertexFormat:X.POSITION_ONLY,shadowVolume:!0})};var vt=new E,se=[new G,new G,new G],re=new At,ce=new wt;function le(t){if(t._stRotation===0)return[0,0,0,1,1,0];let e=E.clone(t._rectangle,vt),n=t._granularity,r=t._ellipsoid,a=t._rotation-t._stRotation,c=Ht(e,n,a,r,vt),l=se;l[0].x=c.west,l[0].y=c.south,l[1].x=c.west,l[1].y=c.north,l[2].x=c.east,l[2].y=c.south;let u=t.rectangle,d=At.fromRotation(t._stRotation,re),p=E.center(u,ce);for(let h=0;h<3;++h){let g=l[h];g.x-=p.longitude,g.y-=p.latitude,At.multiplyByVector(d,g,g),g.x+=p.longitude,g.y+=p.latitude,g.x=(g.x-u.west)/u.width,g.y=(g.y-u.south)/u.height}let o=l[0],i=l[1],f=l[2],s=new Array(6);return G.pack(o,s),G.pack(i,s,2),G.pack(f,s,4),s}Object.defineProperties(Q.prototype,{rectangle:{get:function(){return $(this._rotatedRectangle)||(this._rotatedRectangle=Ht(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return $(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=le(this)),this._textureCoordinateRotationPoints}}});var Ot=Q;function fe(t,e){return $(e)&&(t=Ot.unpack(t,e)),t._ellipsoid=H.clone(t._ellipsoid),t._rectangle=E.clone(t._rectangle),Ot.createGeometry(t)}var Ye=fe;export{Ye as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.120.2
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{a as
|
|
26
|
+
import{a as C}from"./chunk-OE6BOPXI.js";import{a as v}from"./chunk-CDIJULSW.js";import{b as z}from"./chunk-S5WJXCZO.js";import"./chunk-P2A4LTBW.js";import{a as O}from"./chunk-7K5QPZEL.js";import{a as Y}from"./chunk-5JSDDVN4.js";import{b as B,c as q,d as y}from"./chunk-6V3AGY4C.js";import{d as R}from"./chunk-MNKVHNSN.js";import{h as b}from"./chunk-QLA567VU.js";import{a as T}from"./chunk-23HMYUSJ.js";import{a as U,b as M,d as w}from"./chunk-EBGE3XTZ.js";import{a as P}from"./chunk-VEDHIHCJ.js";import"./chunk-PQF7YB7C.js";import"./chunk-TBESXZ5I.js";import{a as E}from"./chunk-YXBVEKWI.js";import{a as N}from"./chunk-J63AP2GZ.js";import{e as S}from"./chunk-LPL3F3FU.js";var j=new R,K=new R,Q=new U,W=new b;function F(t,e){let i=t._ellipsoid,m=e.height,s=e.width,h=e.northCap,a=e.southCap,_=m,A=2,o=0,g=4;h&&(A-=1,_-=1,o+=1,g-=2),a&&(A-=1,_-=1,o+=1,g-=2),o+=A*s+2*_-g;let n=new Float64Array(o*3),l=0,f=0,p,r=Q;if(h)C.computePosition(e,i,!1,f,0,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;else for(p=0;p<s;p++)C.computePosition(e,i,!1,f,p,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;for(p=s-1,f=1;f<m;f++)C.computePosition(e,i,!1,f,p,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;if(f=m-1,!a)for(p=s-2;p>=0;p--)C.computePosition(e,i,!1,f,p,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;for(p=0,f=m-2;f>0;f--)C.computePosition(e,i,!1,f,p,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;let u=n.length/3*2,c=O.createTypedArray(n.length/3,u),H=0;for(let D=0;D<n.length/3-1;D++)c[H++]=D,c[H++]=D+1;c[H++]=n.length/3-1,c[H++]=0;let d=new q({attributes:new Y,primitiveType:B.LINES});return d.attributes.position=new y({componentDatatype:T.DOUBLE,componentsPerAttribute:3,values:n}),d.indices=c,d}function X(t,e){let i=t._surfaceHeight,m=t._extrudedHeight,s=t._ellipsoid,h=F(t,e),a=e.height,_=e.width,A=z.scaleToGeodeticHeight(h.attributes.position.values,i,s,!1),o=A.length,g=new Float64Array(o*2);g.set(A);let n=z.scaleToGeodeticHeight(h.attributes.position.values,m,s);g.set(n,o),h.attributes.position.values=g;let l=e.northCap,f=e.southCap,p=4;l&&(p-=1),f&&(p-=1);let r=(g.length/3+p)*2,u=O.createTypedArray(g.length/3,r);o=g.length/6;let c=0;for(let d=0;d<o-1;d++)u[c++]=d,u[c++]=d+1,u[c++]=d+o,u[c++]=d+o+1;u[c++]=o-1,u[c++]=0,u[c++]=o+o-1,u[c++]=o,u[c++]=0,u[c++]=o;let H;if(l)H=a-1;else{let d=_-1;u[c++]=d,u[c++]=d+o,H=_+a-2}if(u[c++]=H,u[c++]=H+o,!f){let d=_+H-1;u[c++]=d,u[c]=d+o}return h.indices=u,h}function L(t){t=E(t,E.EMPTY_OBJECT);let e=t.rectangle,i=E(t.granularity,P.RADIANS_PER_DEGREE),m=E(t.ellipsoid,w.default),s=E(t.rotation,0);if(!S(e))throw new N("rectangle is required.");if(b.validate(e),e.north<e.south)throw new N("options.rectangle.north must be greater than options.rectangle.south");let h=E(t.height,0),a=E(t.extrudedHeight,h);this._rectangle=b.clone(e),this._granularity=i,this._ellipsoid=m,this._surfaceHeight=Math.max(h,a),this._rotation=s,this._extrudedHeight=Math.min(h,a),this._offsetAttribute=t.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}L.packedLength=b.packedLength+w.packedLength+5;L.pack=function(t,e,i){if(!S(t))throw new N("value is required");if(!S(e))throw new N("array is required");return i=E(i,0),b.pack(t._rectangle,e,i),i+=b.packedLength,w.pack(t._ellipsoid,e,i),i+=w.packedLength,e[i++]=t._granularity,e[i++]=t._surfaceHeight,e[i++]=t._rotation,e[i++]=t._extrudedHeight,e[i]=E(t._offsetAttribute,-1),e};var V=new b,J=w.clone(w.UNIT_SPHERE),k={rectangle:V,ellipsoid:J,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};L.unpack=function(t,e,i){if(!S(t))throw new N("array is required");e=E(e,0);let m=b.unpack(t,e,V);e+=b.packedLength;let s=w.unpack(t,e,J);e+=w.packedLength;let h=t[e++],a=t[e++],_=t[e++],A=t[e++],o=t[e];return S(i)?(i._rectangle=b.clone(m,i._rectangle),i._ellipsoid=w.clone(s,i._ellipsoid),i._surfaceHeight=a,i._rotation=_,i._extrudedHeight=A,i._offsetAttribute=o===-1?void 0:o,i):(k.granularity=h,k.height=a,k.rotation=_,k.extrudedHeight=A,k.offsetAttribute=o===-1?void 0:o,new L(k))};var Z=new M;L.createGeometry=function(t){let e=t._rectangle,i=t._ellipsoid,m=C.computeOptions(e,t._granularity,t._rotation,0,W,Z),s,h;if(P.equalsEpsilon(e.north,e.south,P.EPSILON10)||P.equalsEpsilon(e.east,e.west,P.EPSILON10))return;let a=t._surfaceHeight,_=t._extrudedHeight,A=!P.equalsEpsilon(a,_,0,P.EPSILON2),o;if(A){if(s=X(t,m),S(t._offsetAttribute)){let l=s.attributes.position.values.length/3,f=new Uint8Array(l);t._offsetAttribute===v.TOP?f=f.fill(1,0,l/2):(o=t._offsetAttribute===v.NONE?0:1,f=f.fill(o)),s.attributes.applyOffset=new y({componentDatatype:T.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}let g=R.fromRectangle3D(e,i,a,K),n=R.fromRectangle3D(e,i,_,j);h=R.union(g,n)}else{if(s=F(t,m),s.attributes.position.values=z.scaleToGeodeticHeight(s.attributes.position.values,a,i,!1),S(t._offsetAttribute)){let g=s.attributes.position.values.length;o=t._offsetAttribute===v.NONE?0:1;let n=new Uint8Array(g/3).fill(o);s.attributes.applyOffset=new y({componentDatatype:T.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}h=R.fromRectangle3D(e,i,a)}return new q({attributes:s.attributes,indices:s.indices,primitiveType:B.LINES,boundingSphere:h,offsetAttribute:t._offsetAttribute})};var x=L;function $(t,e){return S(e)&&(t=x.unpack(t,e)),t._ellipsoid=w.clone(t._ellipsoid),t._rectangle=b.clone(t._rectangle),x.createGeometry(t)}var Et=$;export{Et as default};
|