gis-cesium-helper 2.1.5 → 3.6.18
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/Cesium.js +10642 -11041
- package/dist/Cesium/ThirdParty/Workers/draco_decoder_nodejs.js +1 -1
- package/dist/Cesium/ThirdParty/Workers/pako_deflate.min.js +1 -1
- package/dist/Cesium/ThirdParty/Workers/pako_inflate.min.js +1 -1
- package/dist/Cesium/ThirdParty/draco_decoder.wasm +0 -0
- package/dist/Cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png +0 -0
- package/dist/Cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png +0 -0
- package/dist/Cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png +0 -0
- package/dist/Cesium/Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png +0 -0
- package/dist/Cesium/Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png +0 -0
- package/dist/Cesium/Workers/chunk-2BUTAXOJ.js +26 -0
- package/dist/Cesium/Workers/chunk-4DWHRTTP.js +26 -0
- package/dist/Cesium/Workers/chunk-4RJDMIO4.js +26 -0
- package/dist/Cesium/Workers/chunk-4Y673DAX.js +26 -0
- package/dist/Cesium/Workers/chunk-5APIVAIA.js +26 -0
- package/dist/Cesium/Workers/chunk-5HTTNN4T.js +26 -0
- package/dist/Cesium/Workers/chunk-6JIR5UA6.js +26 -0
- package/dist/Cesium/Workers/chunk-7GPSWUNQ.js +26 -0
- package/dist/Cesium/Workers/chunk-7JE52M2E.js +26 -0
- package/dist/Cesium/Workers/chunk-A2GTHHER.js +26 -0
- package/dist/Cesium/Workers/chunk-BLQIHQVM.js +26 -0
- package/dist/Cesium/Workers/chunk-BYGMMPBC.js +26 -0
- package/dist/Cesium/Workers/chunk-C4OMKOTM.js +26 -0
- package/dist/Cesium/Workers/chunk-D3TZ2KW7.js +26 -0
- package/dist/Cesium/Workers/chunk-E2BL2RZG.js +27 -0
- package/dist/Cesium/Workers/chunk-ECIWWYM6.js +26 -0
- package/dist/Cesium/Workers/chunk-EH5BIXGS.js +26 -0
- package/dist/Cesium/Workers/chunk-EJ4M7ZWT.js +26 -0
- package/dist/Cesium/Workers/chunk-F2VBKMFQ.js +26 -0
- package/dist/Cesium/Workers/chunk-FAMH7QPQ.js +26 -0
- package/dist/Cesium/Workers/chunk-FRIKFALT.js +26 -0
- package/dist/Cesium/Workers/chunk-GCHOMXEL.js +26 -0
- package/dist/Cesium/Workers/chunk-H4IFK52P.js +26 -0
- package/dist/Cesium/Workers/chunk-HBEVV6IK.js +26 -0
- package/dist/Cesium/Workers/chunk-HKVMSEEW.js +26 -0
- package/dist/Cesium/Workers/chunk-HQCE7D5L.js +26 -0
- package/dist/Cesium/Workers/chunk-HXIAOT7H.js +26 -0
- package/dist/Cesium/Workers/chunk-I2A6O4RG.js +26 -0
- package/dist/Cesium/Workers/chunk-IYA25EHI.js +26 -0
- package/dist/Cesium/Workers/chunk-JJYRRIWN.js +26 -0
- package/dist/Cesium/Workers/chunk-KLK65KFE.js +26 -0
- package/dist/Cesium/Workers/chunk-LJJKLY2N.js +26 -0
- package/dist/Cesium/Workers/chunk-LO4XCY55.js +26 -0
- package/dist/Cesium/Workers/chunk-LXL44TDT.js +26 -0
- package/dist/Cesium/Workers/chunk-NVQN2WQZ.js +26 -0
- package/dist/Cesium/Workers/chunk-OPGPRG5D.js +26 -0
- package/dist/Cesium/Workers/chunk-PEHZZEN4.js +26 -0
- package/dist/Cesium/Workers/chunk-PTGCDCSG.js +26 -0
- package/dist/Cesium/Workers/chunk-PXJWIUYV.js +26 -0
- package/dist/Cesium/Workers/chunk-Q3IJMJJ2.js +62 -0
- package/dist/Cesium/Workers/chunk-SOPLNYSA.js +26 -0
- package/dist/Cesium/Workers/chunk-STB6TCFY.js +26 -0
- package/dist/Cesium/Workers/{package.js → chunk-T4QAV6EX.js} +2 -2
- package/dist/Cesium/Workers/chunk-TQL3YWK4.js +28 -0
- package/dist/Cesium/Workers/chunk-UYEV4TJN.js +26 -0
- package/dist/Cesium/Workers/chunk-W2RVA34K.js +26 -0
- package/dist/Cesium/Workers/chunk-X7PMFMCX.js +30 -0
- package/dist/Cesium/Workers/chunk-XUP5J7GQ.js +26 -0
- package/dist/Cesium/Workers/chunk-Y6JLAJTJ.js +27 -0
- package/dist/Cesium/Workers/chunk-YGFN6UZV.js +26 -0
- package/dist/Cesium/Workers/chunk-YJTMGLB7.js +26 -0
- package/dist/Cesium/Workers/chunk-ZBFGV7QI.js +26 -0
- package/dist/Cesium/Workers/chunk-ZD25UQM7.js +26 -0
- package/dist/Cesium/Workers/chunk-ZGGJSLK5.js +28 -0
- package/dist/Cesium/Workers/combineGeometry.js +26 -1
- package/dist/Cesium/Workers/createBoxGeometry.js +26 -1
- package/dist/Cesium/Workers/createBoxOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createCircleGeometry.js +26 -1
- package/dist/Cesium/Workers/createCircleOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createCoplanarPolygonGeometry.js +26 -1
- package/dist/Cesium/Workers/createCoplanarPolygonOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createCorridorGeometry.js +26 -1
- package/dist/Cesium/Workers/createCorridorOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createCylinderGeometry.js +26 -1
- package/dist/Cesium/Workers/createCylinderOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createEllipseGeometry.js +26 -1
- package/dist/Cesium/Workers/createEllipseOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createEllipsoidGeometry.js +26 -1
- package/dist/Cesium/Workers/createEllipsoidOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createFrustumGeometry.js +26 -1
- package/dist/Cesium/Workers/createFrustumOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createGeometry.js +26 -1
- package/dist/Cesium/Workers/createGroundPolylineGeometry.js +26 -1
- package/dist/Cesium/Workers/createPlaneGeometry.js +26 -1
- package/dist/Cesium/Workers/createPlaneOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createPolygonGeometry.js +26 -1
- package/dist/Cesium/Workers/createPolygonOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createPolylineGeometry.js +26 -1
- package/dist/Cesium/Workers/createPolylineVolumeGeometry.js +26 -1
- package/dist/Cesium/Workers/createPolylineVolumeOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createRectangleGeometry.js +26 -1
- package/dist/Cesium/Workers/createRectangleOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createSimplePolylineGeometry.js +26 -1
- package/dist/Cesium/Workers/createSphereGeometry.js +26 -1
- package/dist/Cesium/Workers/createSphereOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createTaskProcessorWorker.js +26 -1
- package/dist/Cesium/Workers/createVectorTileClampedPolylines.js +26 -1
- package/dist/Cesium/Workers/createVectorTileGeometries.js +26 -1
- package/dist/Cesium/Workers/createVectorTilePoints.js +26 -1
- package/dist/Cesium/Workers/createVectorTilePolygons.js +26 -1
- package/dist/Cesium/Workers/createVectorTilePolylines.js +26 -1
- package/dist/Cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +26 -1
- package/dist/Cesium/Workers/createVerticesFromHeightmap.js +26 -3
- package/dist/Cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +26 -1
- package/dist/Cesium/Workers/createWallGeometry.js +26 -1
- package/dist/Cesium/Workers/createWallOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/decodeDraco.js +26 -1
- package/dist/Cesium/Workers/decodeGoogleEarthEnterprisePacket.js +26 -1
- package/dist/Cesium/Workers/decodeI3S.js +26 -1
- package/dist/Cesium/Workers/transcodeKTX2.js +56 -1
- package/dist/Cesium/Workers/transferTypedArrayTest.js +2 -2
- package/dist/Cesium/Workers/upsampleQuantizedTerrainMesh.js +26 -1
- package/dist/Cesium/index.cjs +10505 -10904
- package/dist/Cesium/index.js +10736 -11135
- package/dist/gis-cesium-helper.es.js +1 -1
- package/dist/gis-cesium-helper.umd.js +1 -1
- package/dist/gis3d/gis3d.css +2 -13
- package/dist/gis3d/gis3d.js +7 -1
- package/package.json +4 -4
- package/dist/Cesium/Cesium.d.ts +0 -45206
- package/dist/Cesium/README.md +0 -13
- package/dist/Cesium/Scene/ModelExperimental/CustomShaderGuide/README.md +0 -4
- package/dist/Cesium/ThirdParty/Workers/basis_transcoder.js +0 -31
- package/dist/Cesium/ThirdParty/Workers/package.js +0 -1
- package/dist/Cesium/Widgets/Images/ImageryProviders/esriNationalGeographic.png +0 -0
- package/dist/Cesium/Widgets/Images/ImageryProviders/esriWorldImagery.png +0 -0
- package/dist/Cesium/Widgets/Images/ImageryProviders/esriWorldStreetMap.png +0 -0
- package/dist/Cesium/Workers/ArcType-26a3f38d.js +0 -1
- package/dist/Cesium/Workers/ArcType-e1641d8d.js +0 -1
- package/dist/Cesium/Workers/AttributeCompression-48e336db.js +0 -1
- package/dist/Cesium/Workers/AttributeCompression-7a823eb1.js +0 -1
- package/dist/Cesium/Workers/AxisAlignedBoundingBox-2c8f82be.js +0 -1
- package/dist/Cesium/Workers/AxisAlignedBoundingBox-ef345290.js +0 -1
- package/dist/Cesium/Workers/BoundingRectangle-b8248608.js +0 -1
- package/dist/Cesium/Workers/BoundingRectangle-ffeef844.js +0 -1
- package/dist/Cesium/Workers/BoxGeometry-85afccf5.js +0 -1
- package/dist/Cesium/Workers/BoxGeometry-c0d41d4f.js +0 -1
- package/dist/Cesium/Workers/Color-50ebab71.js +0 -1
- package/dist/Cesium/Workers/Color-75e74066.js +0 -1
- package/dist/Cesium/Workers/ComponentDatatype-a9820060.js +0 -1
- package/dist/Cesium/Workers/ComponentDatatype-ab629b88.js +0 -1
- package/dist/Cesium/Workers/CoplanarPolygonGeometryLibrary-0d63b099.js +0 -1
- package/dist/Cesium/Workers/CoplanarPolygonGeometryLibrary-44d91286.js +0 -1
- package/dist/Cesium/Workers/CorridorGeometryLibrary-0169e68d.js +0 -1
- package/dist/Cesium/Workers/CorridorGeometryLibrary-0fed6511.js +0 -1
- package/dist/Cesium/Workers/CylinderGeometry-068eebd3.js +0 -1
- package/dist/Cesium/Workers/CylinderGeometry-4802140c.js +0 -1
- package/dist/Cesium/Workers/CylinderGeometryLibrary-f49f33a8.js +0 -1
- package/dist/Cesium/Workers/CylinderGeometryLibrary-fe5ec654.js +0 -1
- package/dist/Cesium/Workers/EllipseGeometry-e8ae6742.js +0 -1
- package/dist/Cesium/Workers/EllipseGeometry-eeb1db07.js +0 -1
- package/dist/Cesium/Workers/EllipseGeometryLibrary-6ce53de3.js +0 -1
- package/dist/Cesium/Workers/EllipseGeometryLibrary-eedf4d0b.js +0 -1
- package/dist/Cesium/Workers/EllipseOutlineGeometry-52d25fd2.js +0 -1
- package/dist/Cesium/Workers/EllipseOutlineGeometry-7c871752.js +0 -1
- package/dist/Cesium/Workers/EllipsoidGeodesic-2723ab86.js +0 -1
- package/dist/Cesium/Workers/EllipsoidGeodesic-7d405754.js +0 -1
- package/dist/Cesium/Workers/EllipsoidGeometry-7cbedd8f.js +0 -1
- package/dist/Cesium/Workers/EllipsoidGeometry-954ef938.js +0 -1
- package/dist/Cesium/Workers/EllipsoidOutlineGeometry-79998e39.js +0 -1
- package/dist/Cesium/Workers/EllipsoidOutlineGeometry-876d584e.js +0 -1
- package/dist/Cesium/Workers/EllipsoidRhumbLine-77eff028.js +0 -1
- package/dist/Cesium/Workers/EllipsoidRhumbLine-7b6199fa.js +0 -1
- package/dist/Cesium/Workers/EllipsoidTangentPlane-330be9cc.js +0 -1
- package/dist/Cesium/Workers/EllipsoidTangentPlane-4cf30b6c.js +0 -1
- package/dist/Cesium/Workers/EncodedCartesian3-5e2017ab.js +0 -1
- package/dist/Cesium/Workers/EncodedCartesian3-ee8e4156.js +0 -1
- package/dist/Cesium/Workers/FrustumGeometry-1e1111d8.js +0 -1
- package/dist/Cesium/Workers/FrustumGeometry-cffd2aa8.js +0 -1
- package/dist/Cesium/Workers/GeometryAttribute-71155085.js +0 -1
- package/dist/Cesium/Workers/GeometryAttribute-b10c5c29.js +0 -1
- package/dist/Cesium/Workers/GeometryAttributes-1b4134a9.js +0 -1
- package/dist/Cesium/Workers/GeometryAttributes-1e4ddcd2.js +0 -1
- package/dist/Cesium/Workers/GeometryInstance-0318e0cd.js +0 -1
- package/dist/Cesium/Workers/GeometryInstance-86b030a6.js +0 -1
- package/dist/Cesium/Workers/GeometryOffsetAttribute-2579b8d2.js +0 -1
- package/dist/Cesium/Workers/GeometryOffsetAttribute-4d39b441.js +0 -1
- package/dist/Cesium/Workers/GeometryPipeline-5926bf6a.js +0 -1
- package/dist/Cesium/Workers/GeometryPipeline-b15e7fd0.js +0 -1
- package/dist/Cesium/Workers/IndexDatatype-1cbc8622.js +0 -1
- package/dist/Cesium/Workers/IndexDatatype-d3db4e7d.js +0 -1
- package/dist/Cesium/Workers/IntersectionTests-832aa5c7.js +0 -1
- package/dist/Cesium/Workers/IntersectionTests-f15438d8.js +0 -1
- package/dist/Cesium/Workers/Math-2ce22ee9.js +0 -1
- package/dist/Cesium/Workers/Matrix2-1509208a.js +0 -1
- package/dist/Cesium/Workers/Matrix2-413c4048.js +0 -1
- package/dist/Cesium/Workers/Matrix3-81054f0f.js +0 -1
- package/dist/Cesium/Workers/OrientedBoundingBox-c3eda7c2.js +0 -1
- package/dist/Cesium/Workers/OrientedBoundingBox-fa9056b2.js +0 -1
- package/dist/Cesium/Workers/Plane-6add0ae1.js +0 -1
- package/dist/Cesium/Workers/Plane-e3daa19b.js +0 -1
- package/dist/Cesium/Workers/PolygonGeometryLibrary-cb0bc5e9.js +0 -1
- package/dist/Cesium/Workers/PolygonGeometryLibrary-d5f3e119.js +0 -1
- package/dist/Cesium/Workers/PolygonPipeline-32699305.js +0 -1
- package/dist/Cesium/Workers/PolygonPipeline-e8d27f39.js +0 -1
- package/dist/Cesium/Workers/PolylinePipeline-3006b0cf.js +0 -1
- package/dist/Cesium/Workers/PolylinePipeline-39d7619d.js +0 -1
- package/dist/Cesium/Workers/PolylineVolumeGeometryLibrary-437b726e.js +0 -1
- package/dist/Cesium/Workers/PolylineVolumeGeometryLibrary-bd0bbdaf.js +0 -1
- package/dist/Cesium/Workers/PrimitivePipeline-90884677.js +0 -1
- package/dist/Cesium/Workers/PrimitivePipeline-e1f3eb3d.js +0 -1
- package/dist/Cesium/Workers/RectangleGeometryLibrary-11b080fb.js +0 -1
- package/dist/Cesium/Workers/RectangleGeometryLibrary-a44974f6.js +0 -1
- package/dist/Cesium/Workers/RuntimeError-9b4ce3fb.js +0 -1
- package/dist/Cesium/Workers/RuntimeError-ac440aa5.js +0 -1
- package/dist/Cesium/Workers/TerrainEncoding-341cc7d2.js +0 -1
- package/dist/Cesium/Workers/TerrainEncoding-7b6ac0c5.js +0 -1
- package/dist/Cesium/Workers/Transforms-bf323bcf.js +0 -39
- package/dist/Cesium/Workers/Transforms-c65aae74.js +0 -14
- package/dist/Cesium/Workers/VertexFormat-e68722dd.js +0 -1
- package/dist/Cesium/Workers/VertexFormat-fbdec922.js +0 -1
- package/dist/Cesium/Workers/WallGeometryLibrary-0cfe87c2.js +0 -1
- package/dist/Cesium/Workers/WallGeometryLibrary-dc44247b.js +0 -1
- package/dist/Cesium/Workers/WebGLConstants-7f557f93.js +0 -1
- package/dist/Cesium/Workers/WebGLConstants-f63312fc.js +0 -1
- package/dist/Cesium/Workers/WebMercatorProjection-2d827489.js +0 -1
- package/dist/Cesium/Workers/WebMercatorProjection-943e2226.js +0 -1
- package/dist/Cesium/Workers/_commonjsHelpers-3aae1032-15991586.js +0 -1
- package/dist/Cesium/Workers/arrayRemoveDuplicates-9b636830.js +0 -1
- package/dist/Cesium/Workers/arrayRemoveDuplicates-fe254feb.js +0 -1
- package/dist/Cesium/Workers/cesiumWorkerBootstrapper.js +0 -31
- package/dist/Cesium/Workers/combine-0259f56f.js +0 -1
- package/dist/Cesium/Workers/combine-0c102d93.js +0 -1
- package/dist/Cesium/Workers/defaultValue-69ee94f4.js +0 -1
- package/dist/Cesium/Workers/defaultValue-f6d5e6da.js +0 -1
|
@@ -1 +1,26 @@
|
|
|
1
|
-
define(["./Transforms-c65aae74","./Matrix2-413c4048","./Matrix3-81054f0f","./defaultValue-f6d5e6da","./Math-2ce22ee9","./ArcType-26a3f38d","./arrayRemoveDuplicates-9b636830","./ComponentDatatype-ab629b88","./EllipsoidGeodesic-2723ab86","./EllipsoidRhumbLine-77eff028","./EncodedCartesian3-5e2017ab","./GeometryAttribute-b10c5c29","./IntersectionTests-832aa5c7","./Plane-6add0ae1","./WebMercatorProjection-943e2226","./combine-0c102d93","./RuntimeError-9b4ce3fb","./WebGLConstants-7f557f93"],(function(e,t,a,n,i,r,s,o,l,c,u,C,p,h,d,g,f,m){"use strict";function w(i){i=n.defaultValue(i,n.defaultValue.EMPTY_OBJECT),this._ellipsoid=n.defaultValue(i.ellipsoid,a.Ellipsoid.WGS84),this._rectangle=n.defaultValue(i.rectangle,t.Rectangle.MAX_VALUE),this._projection=new e.GeographicProjection(this._ellipsoid),this._numberOfLevelZeroTilesX=n.defaultValue(i.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=n.defaultValue(i.numberOfLevelZeroTilesY,1)}Object.defineProperties(w.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),w.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e},w.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e},w.prototype.rectangleToNativeRectangle=function(e,a){const r=i.CesiumMath.toDegrees(e.west),s=i.CesiumMath.toDegrees(e.south),o=i.CesiumMath.toDegrees(e.east),l=i.CesiumMath.toDegrees(e.north);return n.defined(a)?(a.west=r,a.south=s,a.east=o,a.north=l,a):new t.Rectangle(r,s,o,l)},w.prototype.tileXYToNativeRectangle=function(e,t,a,n){const r=this.tileXYToRectangle(e,t,a,n);return r.west=i.CesiumMath.toDegrees(r.west),r.south=i.CesiumMath.toDegrees(r.south),r.east=i.CesiumMath.toDegrees(r.east),r.north=i.CesiumMath.toDegrees(r.north),r},w.prototype.tileXYToRectangle=function(e,a,i,r){const s=this._rectangle,o=this.getNumberOfXTilesAtLevel(i),l=this.getNumberOfYTilesAtLevel(i),c=s.width/o,u=e*c+s.west,C=(e+1)*c+s.west,p=s.height/l,h=s.north-a*p,d=s.north-(a+1)*p;return n.defined(r)||(r=new t.Rectangle(u,d,C,h)),r.west=u,r.south=d,r.east=C,r.north=h,r},w.prototype.positionToTileXY=function(e,a,r){const s=this._rectangle;if(!t.Rectangle.contains(s,e))return;const o=this.getNumberOfXTilesAtLevel(a),l=this.getNumberOfYTilesAtLevel(a),c=s.width/o,u=s.height/l;let C=e.longitude;s.east<s.west&&(C+=i.CesiumMath.TWO_PI);let p=(C-s.west)/c|0;p>=o&&(p=o-1);let h=(s.north-e.latitude)/u|0;return h>=l&&(h=l-1),n.defined(r)?(r.x=p,r.y=h,r):new t.Cartesian2(p,h)};const y=new a.Cartesian3,M=new a.Cartesian3,T=new a.Cartographic,E=new a.Cartesian3,_=new a.Cartesian3,O=new e.BoundingSphere,P=new w,A=[new a.Cartographic,new a.Cartographic,new a.Cartographic,new a.Cartographic],b=new t.Cartesian2,k={};function L(e){a.Cartographic.fromRadians(e.east,e.north,0,A[0]),a.Cartographic.fromRadians(e.west,e.north,0,A[1]),a.Cartographic.fromRadians(e.east,e.south,0,A[2]),a.Cartographic.fromRadians(e.west,e.south,0,A[3]);let t=0,n=0,i=0,r=0;const s=k._terrainHeightsMaxLevel;let o;for(o=0;o<=s;++o){let e=!1;for(let t=0;t<4;++t){const a=A[t];if(P.positionToTileXY(a,o,b),0===t)i=b.x,r=b.y;else if(i!==b.x||r!==b.y){e=!0;break}}if(e)break;t=i,n=r}if(0!==o)return{x:t,y:n,level:o>s?s:o-1}}k.initialize=function(){let t=k._initPromise;return n.defined(t)||(t=e.Resource.fetchJson(e.buildModuleUrl("Assets/approximateTerrainHeights.json")).then((function(e){k._terrainHeights=e})),k._initPromise=t),t},k.getMinimumMaximumHeights=function(e,i){i=n.defaultValue(i,a.Ellipsoid.WGS84);const r=L(e);let s=k._defaultMinTerrainHeight,o=k._defaultMaxTerrainHeight;if(n.defined(r)){const l=`${r.level}-${r.x}-${r.y}`,c=k._terrainHeights[l];n.defined(c)&&(s=c[0],o=c[1]),i.cartographicToCartesian(t.Rectangle.northeast(e,T),y),i.cartographicToCartesian(t.Rectangle.southwest(e,T),M),a.Cartesian3.midpoint(M,y,E);const u=i.scaleToGeodeticSurface(E,_);if(n.defined(u)){const e=a.Cartesian3.distance(E,u);s=Math.min(s,-e)}else s=k._defaultMinTerrainHeight}return s=Math.max(k._defaultMinTerrainHeight,s),{minimumTerrainHeight:s,maximumTerrainHeight:o}},k.getBoundingSphere=function(t,i){i=n.defaultValue(i,a.Ellipsoid.WGS84);const r=L(t);let s=k._defaultMaxTerrainHeight;if(n.defined(r)){const e=`${r.level}-${r.x}-${r.y}`,t=k._terrainHeights[e];n.defined(t)&&(s=t[1])}const o=e.BoundingSphere.fromRectangle3D(t,i,0);return e.BoundingSphere.fromRectangle3D(t,i,s,O),e.BoundingSphere.union(o,O,o)},k._terrainHeightsMaxLevel=6,k._defaultMaxTerrainHeight=9e3,k._defaultMinTerrainHeight=-1e5,k._terrainHeights=void 0,k._initPromise=void 0,Object.defineProperties(k,{initialized:{get:function(){return n.defined(k._terrainHeights)}}});var S=k;const x=[e.GeographicProjection,d.WebMercatorProjection],I=x.length,N=Math.cos(i.CesiumMath.toRadians(30)),R=Math.cos(i.CesiumMath.toRadians(150));function D(e){const t=(e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT)).positions;this.width=n.defaultValue(e.width,1),this._positions=t,this.granularity=n.defaultValue(e.granularity,9999),this.loop=n.defaultValue(e.loop,!1),this.arcType=n.defaultValue(e.arcType,r.ArcType.GEODESIC),this._ellipsoid=a.Ellipsoid.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(D.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+a.Ellipsoid.packedLength+1+1}}}),D.setProjectionAndEllipsoid=function(e,t){let a=0;for(let e=0;e<I;e++)if(t instanceof x[e]){a=e;break}e._projectionIndex=a,e._ellipsoid=t.ellipsoid};const v=new a.Cartesian3,z=new a.Cartesian3,H=new a.Cartesian3;function j(e,t,n,i,r){const s=X(i,e,0,v),o=X(i,e,n,z),l=X(i,t,0,H),c=W(o,s,z),u=W(l,s,H);return a.Cartesian3.cross(u,c,r),a.Cartesian3.normalize(r,r)}const B=new a.Cartographic,V=new a.Cartesian3,G=new a.Cartesian3,Y=new a.Cartesian3;function F(e,t,n,i,s,o,u,C,p,h,d){if(0===s)return;let g;o===r.ArcType.GEODESIC?g=new l.EllipsoidGeodesic(e,t,u):o===r.ArcType.RHUMB&&(g=new c.EllipsoidRhumbLine(e,t,u));const f=g.surfaceDistance;if(f<s)return;const m=j(e,t,i,u,Y),w=Math.ceil(f/s),y=f/w;let M=y;const T=w-1;let E=C.length;for(let e=0;e<T;e++){const e=g.interpolateUsingSurfaceDistance(M,B),t=X(u,e,n,V),r=X(u,e,i,G);a.Cartesian3.pack(m,C,E),a.Cartesian3.pack(t,p,E),a.Cartesian3.pack(r,h,E),d.push(e.latitude),d.push(e.longitude),E+=3,M+=y}}const q=new a.Cartographic;function X(e,t,n,i){return a.Cartographic.clone(t,q),q.height=n,a.Cartographic.toCartesian(q,e,i)}function W(e,t,n){return a.Cartesian3.subtract(e,t,n),a.Cartesian3.normalize(n,n),n}function U(e,t,n,i){return i=W(e,t,i),i=a.Cartesian3.cross(i,n,i),i=a.Cartesian3.normalize(i,i),i=a.Cartesian3.cross(n,i,i)}D.pack=function(e,t,i){let r=n.defaultValue(i,0);const s=e._positions,o=s.length;t[r++]=o;for(let e=0;e<o;++e){const n=s[e];a.Cartesian3.pack(n,t,r),r+=3}return t[r++]=e.granularity,t[r++]=e.loop?1:0,t[r++]=e.arcType,a.Ellipsoid.pack(e._ellipsoid,t,r),r+=a.Ellipsoid.packedLength,t[r++]=e._projectionIndex,t[r++]=e._scene3DOnly?1:0,t},D.unpack=function(e,t,i){let r=n.defaultValue(t,0);const s=e[r++],o=new Array(s);for(let t=0;t<s;t++)o[t]=a.Cartesian3.unpack(e,r),r+=3;const l=e[r++],c=1===e[r++],u=e[r++],C=a.Ellipsoid.unpack(e,r);r+=a.Ellipsoid.packedLength;const p=e[r++],h=1===e[r++];return n.defined(i)||(i=new D({positions:o})),i._positions=o,i.granularity=l,i.loop=c,i.arcType=u,i._ellipsoid=C,i._projectionIndex=p,i._scene3DOnly=h,i};const Z=new a.Cartesian3,$=new a.Cartesian3,J=new a.Cartesian3,Q=new a.Cartesian3;function K(e,t,n,r,s){const o=W(n,t,Q),l=U(e,t,o,Z),c=U(r,t,o,$);if(i.CesiumMath.equalsEpsilon(a.Cartesian3.dot(l,c),-1,i.CesiumMath.EPSILON5))return s=a.Cartesian3.cross(o,l,s),s=a.Cartesian3.normalize(s,s);s=a.Cartesian3.add(c,l,s),s=a.Cartesian3.normalize(s,s);const u=a.Cartesian3.cross(o,s,J);return a.Cartesian3.dot(c,u)<0&&(s=a.Cartesian3.negate(s,s)),s}const ee=h.Plane.fromPointNormal(a.Cartesian3.ZERO,a.Cartesian3.UNIT_Y),te=new a.Cartesian3,ae=new a.Cartesian3,ne=new a.Cartesian3,ie=new a.Cartesian3,re=new a.Cartesian3,se=new a.Cartesian3,oe=new a.Cartographic,le=new a.Cartographic,ce=new a.Cartographic;D.createGeometry=function(l){const h=!l._scene3DOnly;let d=l.loop;const g=l._ellipsoid,f=l.granularity,m=l.arcType,w=new x[l._projectionIndex](g),y=1e3;let M,T;const E=l._positions,_=E.length;let O,P,A,b;2===_&&(d=!1);const k=new c.EllipsoidRhumbLine(void 0,void 0,g);let L,I,R;const D=[E[0]];for(T=0;T<_-1;T++)O=E[T],P=E[T+1],L=p.IntersectionTests.lineSegmentPlane(O,P,ee,se),!n.defined(L)||a.Cartesian3.equalsEpsilon(L,O,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(L,P,i.CesiumMath.EPSILON7)||(l.arcType===r.ArcType.GEODESIC?D.push(a.Cartesian3.clone(L)):l.arcType===r.ArcType.RHUMB&&(R=g.cartesianToCartographic(L,oe).longitude,A=g.cartesianToCartographic(O,oe),b=g.cartesianToCartographic(P,le),k.setEndPoints(A,b),I=k.findIntersectionWithLongitude(R,ce),L=g.cartographicToCartesian(I,se),!n.defined(L)||a.Cartesian3.equalsEpsilon(L,O,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(L,P,i.CesiumMath.EPSILON7)||D.push(a.Cartesian3.clone(L)))),D.push(P);d&&(O=E[_-1],P=E[0],L=p.IntersectionTests.lineSegmentPlane(O,P,ee,se),!n.defined(L)||a.Cartesian3.equalsEpsilon(L,O,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(L,P,i.CesiumMath.EPSILON7)||(l.arcType===r.ArcType.GEODESIC?D.push(a.Cartesian3.clone(L)):l.arcType===r.ArcType.RHUMB&&(R=g.cartesianToCartographic(L,oe).longitude,A=g.cartesianToCartographic(O,oe),b=g.cartesianToCartographic(P,le),k.setEndPoints(A,b),I=k.findIntersectionWithLongitude(R,ce),L=g.cartographicToCartesian(I,se),!n.defined(L)||a.Cartesian3.equalsEpsilon(L,O,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(L,P,i.CesiumMath.EPSILON7)||D.push(a.Cartesian3.clone(L)))));let v=D.length,z=new Array(v);for(T=0;T<v;T++){const e=a.Cartographic.fromCartesian(D[T],g);e.height=0,z[T]=e}if(z=s.arrayRemoveDuplicates(z,a.Cartographic.equalsEpsilon),v=z.length,v<2)return;const H=[],B=[],V=[],G=[];let Y=te,q=ae,U=ne,Z=ie,$=re;const J=z[0],Q=z[1];for(Y=X(g,z[v-1],0,Y),Z=X(g,Q,0,Z),q=X(g,J,0,q),U=X(g,J,y,U),$=d?K(Y,q,U,Z,$):j(J,Q,y,g,$),a.Cartesian3.pack($,B,0),a.Cartesian3.pack(q,V,0),a.Cartesian3.pack(U,G,0),H.push(J.latitude),H.push(J.longitude),F(J,Q,0,y,f,m,g,B,V,G,H),T=1;T<v-1;++T){Y=a.Cartesian3.clone(q,Y),q=a.Cartesian3.clone(Z,q);const e=z[T];X(g,e,y,U),X(g,z[T+1],0,Z),K(Y,q,U,Z,$),M=B.length,a.Cartesian3.pack($,B,M),a.Cartesian3.pack(q,V,M),a.Cartesian3.pack(U,G,M),H.push(e.latitude),H.push(e.longitude),F(z[T],z[T+1],0,y,f,m,g,B,V,G,H)}const ue=z[v-1],Ce=z[v-2];if(q=X(g,ue,0,q),U=X(g,ue,y,U),d){const e=z[0];Y=X(g,Ce,0,Y),Z=X(g,e,0,Z),$=K(Y,q,U,Z,$)}else $=j(Ce,ue,y,g,$);if(M=B.length,a.Cartesian3.pack($,B,M),a.Cartesian3.pack(q,V,M),a.Cartesian3.pack(U,G,M),H.push(ue.latitude),H.push(ue.longitude),d){for(F(ue,J,0,y,f,m,g,B,V,G,H),M=B.length,T=0;T<3;++T)B[M+T]=B[T],V[M+T]=V[T],G[M+T]=G[T];H.push(J.latitude),H.push(J.longitude)}return function(n,r,s,l,c,p,h){let d,g;const f=r._ellipsoid,m=s.length/3-1,w=8*m,y=4*w,M=36*m,T=w>65535?new Uint32Array(M):new Uint16Array(M),E=new Float64Array(3*w),_=new Float32Array(y),O=new Float32Array(y),P=new Float32Array(y),A=new Float32Array(y),b=new Float32Array(y);let k,L,x,I;h&&(k=new Float32Array(y),L=new Float32Array(y),x=new Float32Array(y),I=new Float32Array(2*w));const R=p.length/2;let D=0;const v=Oe;v.height=0;const z=Pe;z.height=0;let H=Ae,j=be;if(h)for(g=0,d=1;d<R;d++)v.latitude=p[g],v.longitude=p[g+1],z.latitude=p[g+2],z.longitude=p[g+3],H=r.project(v,H),j=r.project(z,j),D+=a.Cartesian3.distance(H,j),g+=2;const B=l.length/3;j=a.Cartesian3.unpack(l,0,j);let V,G=0;for(g=3,d=1;d<B;d++)H=a.Cartesian3.clone(j,H),j=a.Cartesian3.unpack(l,g,j),G+=a.Cartesian3.distance(H,j),g+=3;g=3;let Y=0,F=0,q=0,X=0,U=!1,Z=a.Cartesian3.unpack(s,0,Le),$=a.Cartesian3.unpack(l,0,be),J=a.Cartesian3.unpack(c,0,xe);if(n){he(J,a.Cartesian3.unpack(s,s.length-6,ke),Z,$)&&(J=a.Cartesian3.negate(J,J))}let Q=0,K=0,ee=0;for(d=0;d<m;d++){const e=a.Cartesian3.clone(Z,ke),n=a.Cartesian3.clone($,Ae);let o,C,d,m,w=a.Cartesian3.clone(J,Se);if(U&&(w=a.Cartesian3.negate(w,w)),Z=a.Cartesian3.unpack(s,g,Le),$=a.Cartesian3.unpack(l,g,be),J=a.Cartesian3.unpack(c,g,xe),U=he(J,e,Z,$),v.latitude=p[Y],v.longitude=p[Y+1],z.latitude=p[Y+2],z.longitude=p[Y+3],h){const e=_e(v,z);o=r.project(v,He),C=r.project(z,je);const t=W(C,o,$e);t.y=Math.abs(t.y),d=Be,m=Ve,0===e||a.Cartesian3.dot(t,a.Cartesian3.UNIT_Y)>N?(d=me(r,v,w,o,Be),m=me(r,z,J,C,Ve)):1===e?(m=me(r,z,J,C,Ve),d.x=0,d.y=i.CesiumMath.sign(v.longitude-Math.abs(z.longitude)),d.z=0):(d=me(r,v,w,o,Be),m.x=0,m.y=i.CesiumMath.sign(v.longitude-z.longitude),m.z=0)}const y=a.Cartesian3.distance(n,$),M=u.EncodedCartesian3.fromCartesian(e,Ue),T=a.Cartesian3.subtract(Z,e,Ge),R=a.Cartesian3.normalize(T,qe);let H=a.Cartesian3.subtract(n,e,Ye);H=a.Cartesian3.normalize(H,H);let j=a.Cartesian3.cross(R,H,qe);j=a.Cartesian3.normalize(j,j);let B=a.Cartesian3.cross(H,w,Xe);B=a.Cartesian3.normalize(B,B);let te=a.Cartesian3.subtract($,Z,Fe);te=a.Cartesian3.normalize(te,te);let ae=a.Cartesian3.cross(J,te,We);ae=a.Cartesian3.normalize(ae,ae);const ne=y/G,ie=Q/G;let re,se,oe,le=0,ce=0,ue=0;if(h){le=a.Cartesian3.distance(o,C),re=u.EncodedCartesian3.fromCartesian(o,Ze),se=a.Cartesian3.subtract(C,o,$e),oe=a.Cartesian3.normalize(se,Je);const e=oe.x;oe.x=oe.y,oe.y=-e,ce=le/D,ue=K/D}for(V=0;V<8;V++){const e=X+4*V,t=F+2*V,n=e+3,i=V<4?1:-1,r=2===V||3===V||6===V||7===V?1:-1;a.Cartesian3.pack(M.high,_,e),_[n]=T.x,a.Cartesian3.pack(M.low,O,e),O[n]=T.y,a.Cartesian3.pack(B,P,e),P[n]=T.z,a.Cartesian3.pack(ae,A,e),A[n]=ne*i,a.Cartesian3.pack(j,b,e);let s=ie*r;0===s&&r<0&&(s=9),b[n]=s,h&&(k[e]=re.high.x,k[e+1]=re.high.y,k[e+2]=re.low.x,k[e+3]=re.low.y,x[e]=-d.y,x[e+1]=d.x,x[e+2]=m.y,x[e+3]=-m.x,L[e]=se.x,L[e+1]=se.y,L[e+2]=oe.x,L[e+3]=oe.y,I[t]=ce*i,s=ue*r,0===s&&r<0&&(s=9),I[t+1]=s)}const Ce=ve,pe=ze,de=Re,ge=De,fe=t.Rectangle.fromCartographicArray(Ie,Ne),we=S.getMinimumMaximumHeights(fe,f),ye=we.minimumTerrainHeight,Te=we.maximumTerrainHeight;ee+=ye,ee+=Te,Me(e,n,ye,Te,Ce,de),Me(Z,$,ye,Te,pe,ge);let Oe=a.Cartesian3.multiplyByScalar(j,i.CesiumMath.EPSILON5,Qe);a.Cartesian3.add(Ce,Oe,Ce),a.Cartesian3.add(pe,Oe,pe),a.Cartesian3.add(de,Oe,de),a.Cartesian3.add(ge,Oe,ge),Ee(Ce,pe),Ee(de,ge),a.Cartesian3.pack(Ce,E,q),a.Cartesian3.pack(pe,E,q+3),a.Cartesian3.pack(ge,E,q+6),a.Cartesian3.pack(de,E,q+9),Oe=a.Cartesian3.multiplyByScalar(j,-2*i.CesiumMath.EPSILON5,Qe),a.Cartesian3.add(Ce,Oe,Ce),a.Cartesian3.add(pe,Oe,pe),a.Cartesian3.add(de,Oe,de),a.Cartesian3.add(ge,Oe,ge),Ee(Ce,pe),Ee(de,ge),a.Cartesian3.pack(Ce,E,q+12),a.Cartesian3.pack(pe,E,q+15),a.Cartesian3.pack(ge,E,q+18),a.Cartesian3.pack(de,E,q+21),Y+=2,g+=3,F+=16,q+=24,X+=32,Q+=y,K+=le}g=0;let te=0;for(d=0;d<m;d++){for(V=0;V<tt;V++)T[g+V]=et[V]+te;te+=8,g+=tt}const ae=Ke;e.BoundingSphere.fromVertices(s,a.Cartesian3.ZERO,3,ae[0]),e.BoundingSphere.fromVertices(l,a.Cartesian3.ZERO,3,ae[1]);const ne=e.BoundingSphere.fromBoundingSpheres(ae);ne.radius+=ee/(2*m);const ie={position:new C.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,normalize:!1,values:E}),startHiAndForwardOffsetX:at(_),startLoAndForwardOffsetY:at(O),startNormalAndForwardOffsetZ:at(P),endNormalAndTextureCoordinateNormalizationX:at(A),rightNormalAndTextureCoordinateNormalizationY:at(b)};h&&(ie.startHiLo2D=at(k),ie.offsetAndRight2D=at(L),ie.startEndNormals2D=at(x),ie.texcoordNormalization2D=new C.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,normalize:!1,values:I}));return new C.Geometry({attributes:ie,indices:T,boundingSphere:ne})}(d,w,V,G,B,H,h)};const ue=new a.Cartesian3,Ce=new a.Matrix3,pe=new e.Quaternion;function he(t,n,r,s){const o=W(r,n,ue),l=a.Cartesian3.dot(o,t);if(l>N||l<R){const n=W(s,r,Q),o=l<R?i.CesiumMath.PI_OVER_TWO:-i.CesiumMath.PI_OVER_TWO,c=e.Quaternion.fromAxisAngle(n,o,pe),u=a.Matrix3.fromQuaternion(c,Ce);return a.Matrix3.multiplyByVector(u,t,t),!0}return!1}const de=new a.Cartographic,ge=new a.Cartesian3,fe=new a.Cartesian3;function me(e,t,n,r,s){const o=a.Cartographic.toCartesian(t,e._ellipsoid,ge);let l=a.Cartesian3.add(o,n,fe),c=!1;const u=e._ellipsoid;let C=u.cartesianToCartographic(l,de);Math.abs(t.longitude-C.longitude)>i.CesiumMath.PI_OVER_TWO&&(c=!0,l=a.Cartesian3.subtract(o,n,fe),C=u.cartesianToCartographic(l,de)),C.height=0;const p=e.project(C,s);return(s=a.Cartesian3.subtract(p,r,s)).z=0,s=a.Cartesian3.normalize(s,s),c&&a.Cartesian3.negate(s,s),s}const we=new a.Cartesian3,ye=new a.Cartesian3;function Me(e,t,n,i,r,s){const o=a.Cartesian3.subtract(t,e,we);a.Cartesian3.normalize(o,o);const l=n-0;let c=a.Cartesian3.multiplyByScalar(o,l,ye);a.Cartesian3.add(e,c,r);const u=i-1e3;c=a.Cartesian3.multiplyByScalar(o,u,ye),a.Cartesian3.add(t,c,s)}const Te=new a.Cartesian3;function Ee(e,t){const n=h.Plane.getPointDistance(ee,e),r=h.Plane.getPointDistance(ee,t);let s=Te;i.CesiumMath.equalsEpsilon(n,0,i.CesiumMath.EPSILON2)?(s=W(t,e,s),a.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),a.Cartesian3.add(e,s,e)):i.CesiumMath.equalsEpsilon(r,0,i.CesiumMath.EPSILON2)&&(s=W(e,t,s),a.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),a.Cartesian3.add(t,s,t))}function _e(e,t){const a=Math.abs(e.longitude),n=Math.abs(t.longitude);if(i.CesiumMath.equalsEpsilon(a,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){const n=i.CesiumMath.sign(t.longitude);return e.longitude=n*(a-i.CesiumMath.EPSILON11),1}if(i.CesiumMath.equalsEpsilon(n,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){const a=i.CesiumMath.sign(e.longitude);return t.longitude=a*(n-i.CesiumMath.EPSILON11),2}return 0}const Oe=new a.Cartographic,Pe=new a.Cartographic,Ae=new a.Cartesian3,be=new a.Cartesian3,ke=new a.Cartesian3,Le=new a.Cartesian3,Se=new a.Cartesian3,xe=new a.Cartesian3,Ie=[Oe,Pe],Ne=new t.Rectangle,Re=new a.Cartesian3,De=new a.Cartesian3,ve=new a.Cartesian3,ze=new a.Cartesian3,He=new a.Cartesian3,je=new a.Cartesian3,Be=new a.Cartesian3,Ve=new a.Cartesian3,Ge=new a.Cartesian3,Ye=new a.Cartesian3,Fe=new a.Cartesian3,qe=new a.Cartesian3,Xe=new a.Cartesian3,We=new a.Cartesian3,Ue=new u.EncodedCartesian3,Ze=new u.EncodedCartesian3,$e=new a.Cartesian3,Je=new a.Cartesian3,Qe=new a.Cartesian3,Ke=[new e.BoundingSphere,new e.BoundingSphere],et=[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],tt=et.length;function at(e){return new C.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}return D._projectNormal=me,function(e,t){return S.initialize().then((function(){return n.defined(t)&&(e=D.unpack(e,t)),D.createGeometry(e)}))}}));
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.112
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
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};
|
|
@@ -1 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.112
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import{a as m}from"./chunk-YJTMGLB7.js";import{a as b}from"./chunk-LXL44TDT.js";import{b as v,c as x,d as p}from"./chunk-7JE52M2E.js";import{d as A}from"./chunk-Q3IJMJJ2.js";import"./chunk-OPGPRG5D.js";import"./chunk-X7PMFMCX.js";import{a as c}from"./chunk-FAMH7QPQ.js";import{a as y}from"./chunk-ZGGJSLK5.js";import"./chunk-BYGMMPBC.js";import"./chunk-HXIAOT7H.js";import"./chunk-E2BL2RZG.js";import{a as i}from"./chunk-HKVMSEEW.js";import{b as u}from"./chunk-Y6JLAJTJ.js";import{e as f}from"./chunk-SOPLNYSA.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 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.112
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import{a as l}from"./chunk-LXL44TDT.js";import{b as d,c as y,d as s}from"./chunk-7JE52M2E.js";import{d as c}from"./chunk-Q3IJMJJ2.js";import"./chunk-OPGPRG5D.js";import"./chunk-X7PMFMCX.js";import{a as f}from"./chunk-FAMH7QPQ.js";import{a}from"./chunk-ZGGJSLK5.js";import"./chunk-BYGMMPBC.js";import"./chunk-HXIAOT7H.js";import"./chunk-E2BL2RZG.js";import"./chunk-HKVMSEEW.js";import{b as m}from"./chunk-Y6JLAJTJ.js";import{e as i}from"./chunk-SOPLNYSA.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 +1,26 @@
|
|
|
1
|
-
define(["./defaultValue-f6d5e6da","./Matrix3-81054f0f","./ArcType-26a3f38d","./BoundingRectangle-b8248608","./Transforms-c65aae74","./Matrix2-413c4048","./ComponentDatatype-ab629b88","./EllipsoidGeodesic-2723ab86","./EllipsoidTangentPlane-4cf30b6c","./GeometryAttribute-b10c5c29","./GeometryInstance-0318e0cd","./GeometryOffsetAttribute-2579b8d2","./GeometryPipeline-5926bf6a","./IndexDatatype-d3db4e7d","./Math-2ce22ee9","./PolygonGeometryLibrary-d5f3e119","./PolygonPipeline-e8d27f39","./VertexFormat-fbdec922","./combine-0c102d93","./RuntimeError-9b4ce3fb","./WebGLConstants-7f557f93","./AxisAlignedBoundingBox-2c8f82be","./IntersectionTests-832aa5c7","./Plane-6add0ae1","./AttributeCompression-48e336db","./EncodedCartesian3-5e2017ab","./arrayRemoveDuplicates-9b636830","./EllipsoidRhumbLine-77eff028","./GeometryAttributes-1e4ddcd2"],(function(t,e,o,i,r,n,a,s,l,u,c,p,y,d,m,g,h,f,b,_,P,x,C,w,T,I,A,v,E){"use strict";const G=new e.Cartographic,O=new e.Cartographic;function L(t,e,o,i){const r=i.cartesianToCartographic(t,G).height,n=i.cartesianToCartographic(e,O);n.height=r,i.cartographicToCartesian(n,e);const a=i.cartesianToCartographic(o,O);a.height=r-100,i.cartographicToCartesian(a,o)}const V=new i.BoundingRectangle,H=new e.Cartesian3,D=new e.Cartesian3,N=new e.Cartesian3,F=new e.Cartesian3,R=new e.Cartesian3,M=new e.Cartesian3;let S=new e.Cartesian3,B=new e.Cartesian3,k=new e.Cartesian3;const z=new n.Cartesian2,W=new n.Cartesian2,Y=new e.Cartesian3,U=new r.Quaternion,j=new e.Matrix3,Q=new e.Matrix3;function q(o){const i=o.vertexFormat,s=o.geometry,l=o.shadowVolume,c=s.attributes.position.values,y=t.defined(s.attributes.st)?s.attributes.st.values:void 0;let d=c.length;const g=o.wall,h=o.top||g,f=o.bottom||g;if(i.st||i.normal||i.tangent||i.bitangent||l){const p=o.boundingRectangle,b=o.tangentPlane,_=o.ellipsoid,P=o.stRotation,x=o.perPositionHeight,C=z;C.x=p.x,C.y=p.y;const w=i.st?new Float32Array(d/3*2):void 0;let T;i.normal&&(T=x&&h&&!g?s.attributes.normal.values:new Float32Array(d));const I=i.tangent?new Float32Array(d):void 0,A=i.bitangent?new Float32Array(d):void 0,v=l?new Float32Array(d):void 0;let E=0,G=0,O=D,V=N,q=F,K=!0,Z=j,J=Q;if(0!==P){let t=r.Quaternion.fromAxisAngle(b._plane.normal,P,U);Z=e.Matrix3.fromQuaternion(t,Z),t=r.Quaternion.fromAxisAngle(b._plane.normal,-P,U),J=e.Matrix3.fromQuaternion(t,J)}else Z=e.Matrix3.clone(e.Matrix3.IDENTITY,Z),J=e.Matrix3.clone(e.Matrix3.IDENTITY,J);let X=0,$=0;h&&f&&(X=d/2,$=d/3,d/=2);for(let r=0;r<d;r+=3){const a=e.Cartesian3.fromArray(c,r,Y);if(i.st&&!t.defined(y)){let t=e.Matrix3.multiplyByVector(Z,a,H);t=_.scaleToGeodeticSurface(t,t);const o=b.projectPointOntoPlane(t,W);n.Cartesian2.subtract(o,C,o);const i=m.CesiumMath.clamp(o.x/p.width,0,1),r=m.CesiumMath.clamp(o.y/p.height,0,1);f&&(w[E+$]=i,w[E+1+$]=r),h&&(w[E]=i,w[E+1]=r),E+=2}if(i.normal||i.tangent||i.bitangent||l){const t=G+1,n=G+2;if(g){if(r+3<d){const t=e.Cartesian3.fromArray(c,r+3,R);if(K){const o=e.Cartesian3.fromArray(c,r+d,M);x&&L(a,t,o,_),e.Cartesian3.subtract(t,a,t),e.Cartesian3.subtract(o,a,o),O=e.Cartesian3.normalize(e.Cartesian3.cross(o,t,O),O),K=!1}e.Cartesian3.equalsEpsilon(t,a,m.CesiumMath.EPSILON10)&&(K=!0)}(i.tangent||i.bitangent)&&(q=_.geodeticSurfaceNormal(a,q),i.tangent&&(V=e.Cartesian3.normalize(e.Cartesian3.cross(q,O,V),V)))}else O=_.geodeticSurfaceNormal(a,O),(i.tangent||i.bitangent)&&(x&&(S=e.Cartesian3.fromArray(T,G,S),B=e.Cartesian3.cross(e.Cartesian3.UNIT_Z,S,B),B=e.Cartesian3.normalize(e.Matrix3.multiplyByVector(J,B,B),B),i.bitangent&&(k=e.Cartesian3.normalize(e.Cartesian3.cross(S,B,k),k))),V=e.Cartesian3.cross(e.Cartesian3.UNIT_Z,O,V),V=e.Cartesian3.normalize(e.Matrix3.multiplyByVector(J,V,V),V),i.bitangent&&(q=e.Cartesian3.normalize(e.Cartesian3.cross(O,V,q),q)));i.normal&&(o.wall?(T[G+X]=O.x,T[t+X]=O.y,T[n+X]=O.z):f&&(T[G+X]=-O.x,T[t+X]=-O.y,T[n+X]=-O.z),(h&&!x||g)&&(T[G]=O.x,T[t]=O.y,T[n]=O.z)),l&&(g&&(O=_.geodeticSurfaceNormal(a,O)),v[G+X]=-O.x,v[t+X]=-O.y,v[n+X]=-O.z),i.tangent&&(o.wall?(I[G+X]=V.x,I[t+X]=V.y,I[n+X]=V.z):f&&(I[G+X]=-V.x,I[t+X]=-V.y,I[n+X]=-V.z),h&&(x?(I[G]=B.x,I[t]=B.y,I[n]=B.z):(I[G]=V.x,I[t]=V.y,I[n]=V.z))),i.bitangent&&(f&&(A[G+X]=q.x,A[t+X]=q.y,A[n+X]=q.z),h&&(x?(A[G]=k.x,A[t]=k.y,A[n]=k.z):(A[G]=q.x,A[t]=q.y,A[n]=q.z))),G+=3}}i.st&&!t.defined(y)&&(s.attributes.st=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:w})),i.normal&&(s.attributes.normal=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:T})),i.tangent&&(s.attributes.tangent=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:I})),i.bitangent&&(s.attributes.bitangent=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),l&&(s.attributes.extrudeDirection=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:v}))}if(o.extrude&&t.defined(o.offsetAttribute)){const t=c.length/3;let e=new Uint8Array(t);if(o.offsetAttribute===p.GeometryOffsetAttribute.TOP)h&&f||g?e=e.fill(1,0,t/2):h&&(e=e.fill(1));else{const t=o.offsetAttribute===p.GeometryOffsetAttribute.NONE?0:1;e=e.fill(t)}s.attributes.applyOffset=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}return s}const K=new e.Cartographic,Z=new e.Cartographic,J={westOverIDL:0,eastOverIDL:0};let X=new s.EllipsoidGeodesic;function $(e,i,r,a,l){if(l=t.defaultValue(l,new n.Rectangle),!t.defined(e)||e.length<3)return l.west=0,l.north=0,l.south=0,l.east=0,l;if(r===o.ArcType.RHUMB)return n.Rectangle.fromCartesianArray(e,i,l);X.ellipsoid.equals(i)||(X=new s.EllipsoidGeodesic(void 0,void 0,i)),l.west=Number.POSITIVE_INFINITY,l.east=Number.NEGATIVE_INFINITY,l.south=Number.POSITIVE_INFINITY,l.north=Number.NEGATIVE_INFINITY,J.westOverIDL=Number.POSITIVE_INFINITY,J.eastOverIDL=Number.NEGATIVE_INFINITY;const u=1/m.CesiumMath.chordLength(a,i.maximumRadius),c=e.length;let p,y=i.cartesianToCartographic(e[0],Z),d=K;for(let t=1;t<c;t++)p=d,d=y,y=i.cartesianToCartographic(e[t],p),X.setEndPoints(d,y),et(X,u,l,J);return p=d,d=y,y=i.cartesianToCartographic(e[0],p),X.setEndPoints(d,y),et(X,u,l,J),l.east-l.west>J.eastOverIDL-J.westOverIDL&&(l.west=J.westOverIDL,l.east=J.eastOverIDL,l.east>m.CesiumMath.PI&&(l.east=l.east-m.CesiumMath.TWO_PI),l.west>m.CesiumMath.PI&&(l.west=l.west-m.CesiumMath.TWO_PI)),l}const tt=new e.Cartographic;function et(t,e,o,i){const r=t.surfaceDistance,n=Math.ceil(r*e),a=n>0?r/(n-1):Number.POSITIVE_INFINITY;let s=0;for(let e=0;e<n;e++){const e=t.interpolateUsingSurfaceDistance(s,tt);s+=a;const r=e.longitude,n=e.latitude;o.west=Math.min(o.west,r),o.east=Math.max(o.east,r),o.south=Math.min(o.south,n),o.north=Math.max(o.north,n);const l=r>=0?r:r+m.CesiumMath.TWO_PI;i.westOverIDL=Math.min(i.westOverIDL,l),i.eastOverIDL=Math.max(i.eastOverIDL,l)}}const ot=[];function it(e,o,i,r,n,a,s,u,p,y){const m={walls:[]};let f;if(s||u){const n=g.PolygonGeometryLibrary.createGeometryFromPositions(e,o,i,r,a,p,y),l=n.attributes.position.values,h=n.indices;let b,_;if(s&&u){const e=l.concat(l);b=e.length/3,_=d.IndexDatatype.createTypedArray(b,2*h.length),_.set(h);const o=h.length,r=b/2;for(f=0;f<o;f+=3){const t=_[f]+r,e=_[f+1]+r,i=_[f+2]+r;_[f+o]=i,_[f+1+o]=e,_[f+2+o]=t}if(n.attributes.position.values=e,a&&p.normal){const t=n.attributes.normal.values;n.attributes.normal.values=new Float32Array(e.length),n.attributes.normal.values.set(t)}if(p.st&&t.defined(i)){const t=n.attributes.st.values;n.attributes.st.values=new Float32Array(2*b),n.attributes.st.values=t.concat(t)}n.indices=_}else if(u){for(b=l.length/3,_=d.IndexDatatype.createTypedArray(b,h.length),f=0;f<h.length;f+=3)_[f]=h[f+2],_[f+1]=h[f+1],_[f+2]=h[f];n.indices=_}m.topAndBottom=new c.GeometryInstance({geometry:n})}let b=n.outerRing,_=l.EllipsoidTangentPlane.fromPoints(b,e),P=_.projectPointsOntoPlane(b,ot),x=h.PolygonPipeline.computeWindingOrder2D(P);x===h.WindingOrder.CLOCKWISE&&(b=b.slice().reverse());let C=g.PolygonGeometryLibrary.computeWallGeometry(b,i,e,r,a,y);m.walls.push(new c.GeometryInstance({geometry:C}));const w=n.holes;for(f=0;f<w.length;f++){let t=w[f];_=l.EllipsoidTangentPlane.fromPoints(t,e),P=_.projectPointsOntoPlane(t,ot),x=h.PolygonPipeline.computeWindingOrder2D(P),x===h.WindingOrder.COUNTER_CLOCKWISE&&(t=t.slice().reverse()),C=g.PolygonGeometryLibrary.computeWallGeometry(t,i,e,r,a,y),m.walls.push(new c.GeometryInstance({geometry:C}))}return m}function rt(i){const r=i.polygonHierarchy,a=t.defaultValue(i.vertexFormat,f.VertexFormat.DEFAULT),s=t.defaultValue(i.ellipsoid,e.Ellipsoid.WGS84),l=t.defaultValue(i.granularity,m.CesiumMath.RADIANS_PER_DEGREE),u=t.defaultValue(i.stRotation,0),c=i.textureCoordinates,p=t.defaultValue(i.perPositionHeight,!1),y=p&&t.defined(i.extrudedHeight);let d=t.defaultValue(i.height,0),h=t.defaultValue(i.extrudedHeight,d);if(!y){const t=Math.max(d,h);h=Math.min(d,h),d=t}this._vertexFormat=f.VertexFormat.clone(a),this._ellipsoid=e.Ellipsoid.clone(s),this._granularity=l,this._stRotation=u,this._height=d,this._extrudedHeight=h,this._closeTop=t.defaultValue(i.closeTop,!0),this._closeBottom=t.defaultValue(i.closeBottom,!0),this._polygonHierarchy=r,this._perPositionHeight=p,this._perPositionHeightExtrude=y,this._shadowVolume=t.defaultValue(i.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=i.offsetAttribute,this._arcType=t.defaultValue(i.arcType,o.ArcType.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=c,this.packedLength=g.PolygonGeometryLibrary.computeHierarchyPackedLength(r,e.Cartesian3)+e.Ellipsoid.packedLength+f.VertexFormat.packedLength+(c?g.PolygonGeometryLibrary.computeHierarchyPackedLength(c,n.Cartesian2):1)+12}rt.fromPositions=function(e){return new rt({polygonHierarchy:{positions:(e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT)).positions},height:e.height,extrudedHeight:e.extrudedHeight,vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,closeTop:e.closeTop,closeBottom:e.closeBottom,offsetAttribute:e.offsetAttribute,arcType:e.arcType,textureCoordinates:e.textureCoordinates})},rt.pack=function(o,i,r){return r=t.defaultValue(r,0),r=g.PolygonGeometryLibrary.packPolygonHierarchy(o._polygonHierarchy,i,r,e.Cartesian3),e.Ellipsoid.pack(o._ellipsoid,i,r),r+=e.Ellipsoid.packedLength,f.VertexFormat.pack(o._vertexFormat,i,r),r+=f.VertexFormat.packedLength,i[r++]=o._height,i[r++]=o._extrudedHeight,i[r++]=o._granularity,i[r++]=o._stRotation,i[r++]=o._perPositionHeightExtrude?1:0,i[r++]=o._perPositionHeight?1:0,i[r++]=o._closeTop?1:0,i[r++]=o._closeBottom?1:0,i[r++]=o._shadowVolume?1:0,i[r++]=t.defaultValue(o._offsetAttribute,-1),i[r++]=o._arcType,t.defined(o._textureCoordinates)?r=g.PolygonGeometryLibrary.packPolygonHierarchy(o._textureCoordinates,i,r,n.Cartesian2):i[r++]=-1,i[r++]=o.packedLength,i};const nt=e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),at=new f.VertexFormat,st={polygonHierarchy:{}};return rt.unpack=function(o,i,r){i=t.defaultValue(i,0);const a=g.PolygonGeometryLibrary.unpackPolygonHierarchy(o,i,e.Cartesian3);i=a.startingIndex,delete a.startingIndex;const s=e.Ellipsoid.unpack(o,i,nt);i+=e.Ellipsoid.packedLength;const l=f.VertexFormat.unpack(o,i,at);i+=f.VertexFormat.packedLength;const u=o[i++],c=o[i++],p=o[i++],y=o[i++],d=1===o[i++],m=1===o[i++],h=1===o[i++],b=1===o[i++],_=1===o[i++],P=o[i++],x=o[i++],C=-1===o[i]?void 0:g.PolygonGeometryLibrary.unpackPolygonHierarchy(o,i,n.Cartesian2);t.defined(C)?(i=C.startingIndex,delete C.startingIndex):i++;const w=o[i++];return t.defined(r)||(r=new rt(st)),r._polygonHierarchy=a,r._ellipsoid=e.Ellipsoid.clone(s,r._ellipsoid),r._vertexFormat=f.VertexFormat.clone(l,r._vertexFormat),r._height=u,r._extrudedHeight=c,r._granularity=p,r._stRotation=y,r._perPositionHeightExtrude=d,r._perPositionHeight=m,r._closeTop=h,r._closeBottom=b,r._shadowVolume=_,r._offsetAttribute=-1===P?void 0:P,r._arcType=x,r._textureCoordinates=C,r.packedLength=w,r},rt.computeRectangle=function(i,r){const n=t.defaultValue(i.granularity,m.CesiumMath.RADIANS_PER_DEGREE),a=t.defaultValue(i.arcType,o.ArcType.GEODESIC),s=i.polygonHierarchy,l=t.defaultValue(i.ellipsoid,e.Ellipsoid.WGS84);return $(s.positions,l,a,n,r)},rt.createGeometry=function(e){const o=e._vertexFormat,i=e._ellipsoid,n=e._granularity,s=e._stRotation,f=e._polygonHierarchy,b=e._perPositionHeight,_=e._closeTop,P=e._closeBottom,x=e._arcType,C=e._textureCoordinates,w=t.defined(C);let T=f.positions;if(T.length<3)return;const I=l.EllipsoidTangentPlane.fromPoints(T,i),A=g.PolygonGeometryLibrary.polygonsFromHierarchy(f,w,I.projectPointsOntoPlane.bind(I),!b,i),v=A.hierarchy,E=A.polygons,G=w?g.PolygonGeometryLibrary.polygonsFromHierarchy(C,!0,(function(t){return t}),!1).polygons:void 0;if(0===v.length)return;T=v[0].outerRing;const O=g.PolygonGeometryLibrary.computeBoundingRectangle(I.plane.normal,I.projectPointOntoPlane.bind(I),T,s,V),L=[],H=e._height,D=e._extrudedHeight,N={perPositionHeight:b,vertexFormat:o,geometry:void 0,tangentPlane:I,boundingRectangle:O,ellipsoid:i,stRotation:s,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:x};let F;if(e._perPositionHeightExtrude||!m.CesiumMath.equalsEpsilon(H,D,0,m.CesiumMath.EPSILON2))for(N.extrude=!0,N.top=_,N.bottom=P,N.shadowVolume=e._shadowVolume,N.offsetAttribute=e._offsetAttribute,F=0;F<E.length;F++){const t=it(i,E[F],w?G[F]:void 0,n,v[F],b,_,P,o,x);let e;_&&P?(e=t.topAndBottom,N.geometry=g.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(e.geometry,H,D,i,b)):_?(e=t.topAndBottom,e.geometry.attributes.position.values=h.PolygonPipeline.scaleToGeodeticHeight(e.geometry.attributes.position.values,H,i,!b),N.geometry=e.geometry):P&&(e=t.topAndBottom,e.geometry.attributes.position.values=h.PolygonPipeline.scaleToGeodeticHeight(e.geometry.attributes.position.values,D,i,!0),N.geometry=e.geometry),(_||P)&&(N.wall=!1,e.geometry=q(N),L.push(e));const r=t.walls;N.wall=!0;for(let t=0;t<r.length;t++){const e=r[t];N.geometry=g.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(e.geometry,H,D,i,b),e.geometry=q(N),L.push(e)}}else for(F=0;F<E.length;F++){const r=new c.GeometryInstance({geometry:g.PolygonGeometryLibrary.createGeometryFromPositions(i,E[F],w?G[F]:void 0,n,b,o,x)});if(r.geometry.attributes.position.values=h.PolygonPipeline.scaleToGeodeticHeight(r.geometry.attributes.position.values,H,i,!b),N.geometry=r.geometry,r.geometry=q(N),t.defined(e._offsetAttribute)){const t=r.geometry.attributes.position.values.length,o=e._offsetAttribute===p.GeometryOffsetAttribute.NONE?0:1,i=new Uint8Array(t/3).fill(o);r.geometry.attributes.applyOffset=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}L.push(r)}const R=y.GeometryPipeline.combineInstances(L)[0];R.attributes.position.values=new Float64Array(R.attributes.position.values),R.indices=d.IndexDatatype.createTypedArray(R.attributes.position.values.length/3,R.indices);const M=R.attributes,S=r.BoundingSphere.fromVertices(M.position.values);return o.position||delete M.position,new u.Geometry({attributes:M,indices:R.indices,primitiveType:R.primitiveType,boundingSphere:S,offsetAttribute:e._offsetAttribute})},rt.createShadowVolume=function(t,e,o){const i=t._granularity,r=t._ellipsoid,n=e(i,r),a=o(i,r);return new rt({polygonHierarchy:t._polygonHierarchy,ellipsoid:r,stRotation:t._stRotation,granularity:i,perPositionHeight:!1,extrudedHeight:n,height:a,vertexFormat:f.VertexFormat.POSITION_ONLY,shadowVolume:!0,arcType:t._arcType})},Object.defineProperties(rt.prototype,{rectangle:{get:function(){if(!t.defined(this._rectangle)){const t=this._polygonHierarchy.positions;this._rectangle=$(t,this._ellipsoid,this._arcType,this._granularity)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return t.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){const e=-t._stRotation;if(0===e)return[0,0,0,1,1,0];const o=t._ellipsoid,i=t._polygonHierarchy.positions,r=t.rectangle;return u.Geometry._textureCoordinateRotationPoints(i,e,o,r)}(this)),this._textureCoordinateRotationPoints}}}),function(o,i){return t.defined(i)&&(o=rt.unpack(o,i)),o._ellipsoid=e.Ellipsoid.clone(o._ellipsoid),rt.createGeometry(o)}}));
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.112
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
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};
|
|
@@ -1 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.112
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import{a}from"./chunk-EJ4M7ZWT.js";import{a as b}from"./chunk-STB6TCFY.js";import{a as W}from"./chunk-4RJDMIO4.js";import{a as V}from"./chunk-5HTTNN4T.js";import"./chunk-D3TZ2KW7.js";import"./chunk-XUP5J7GQ.js";import{a as D}from"./chunk-T4QAV6EX.js";import{a as F}from"./chunk-EH5BIXGS.js";import"./chunk-KLK65KFE.js";import{a as j,b as k}from"./chunk-GCHOMXEL.js";import"./chunk-4DWHRTTP.js";import"./chunk-4Y673DAX.js";import"./chunk-C4OMKOTM.js";import"./chunk-NVQN2WQZ.js";import{a as M}from"./chunk-JJYRRIWN.js";import{a as B}from"./chunk-LXL44TDT.js";import{b as U,c as C,d as S}from"./chunk-7JE52M2E.js";import{d as z}from"./chunk-Q3IJMJJ2.js";import"./chunk-OPGPRG5D.js";import"./chunk-X7PMFMCX.js";import{a as w}from"./chunk-FAMH7QPQ.js";import{a as v,c as y}from"./chunk-ZGGJSLK5.js";import{a as T}from"./chunk-BYGMMPBC.js";import"./chunk-HXIAOT7H.js";import"./chunk-E2BL2RZG.js";import{a as P}from"./chunk-HKVMSEEW.js";import{a as G,b as A}from"./chunk-Y6JLAJTJ.js";import{e as O}from"./chunk-SOPLNYSA.js";var Y=[],R=[];function K(e,t,r,H,l){let p=F.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 W({geometry:new C({attributes:new B({position:new S({componentDatatype:w.DOUBLE,componentsPerAttribute:3,values:n})}),indices:m,primitiveType:U.LINES})})}function q(e,t,r,H,l){let p=F.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 W({geometry:new C({attributes:new B({position:new S({componentDatatype:w.DOUBLE,componentsPerAttribute:3,values:n})}),indices:h,primitiveType:U.LINES})})}function L(e){if(A.typeOf.object("options",e),A.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e.perPositionHeight&&O(e.height))throw new G("Cannot use both options.perPositionHeight and options.height");if(O(e.arcType)&&e.arcType!==b.GEODESIC&&e.arcType!==b.RHUMB)throw new G("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let t=e.polygonHierarchy,r=P(e.ellipsoid,y.WGS84),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,v)+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,v),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,v);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 S({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 S({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 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.112
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import{a as m}from"./chunk-7GPSWUNQ.js";import{a as N}from"./chunk-STB6TCFY.js";import{a as U}from"./chunk-YGFN6UZV.js";import"./chunk-ZD25UQM7.js";import{a as k}from"./chunk-YJTMGLB7.js";import{a as le}from"./chunk-4DWHRTTP.js";import"./chunk-4Y673DAX.js";import"./chunk-C4OMKOTM.js";import"./chunk-NVQN2WQZ.js";import{a as se}from"./chunk-JJYRRIWN.js";import{a as ce}from"./chunk-LXL44TDT.js";import{a as ne,b as re,c as ie,d as O}from"./chunk-7JE52M2E.js";import{d as oe}from"./chunk-Q3IJMJJ2.js";import"./chunk-OPGPRG5D.js";import"./chunk-X7PMFMCX.js";import{a as x}from"./chunk-FAMH7QPQ.js";import{a as p,c as u}from"./chunk-ZGGJSLK5.js";import{a as J}from"./chunk-BYGMMPBC.js";import"./chunk-HXIAOT7H.js";import"./chunk-E2BL2RZG.js";import{a as A}from"./chunk-HKVMSEEW.js";import{a as V}from"./chunk-Y6JLAJTJ.js";import{e as h}from"./chunk-SOPLNYSA.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,W=(i-a)/c,z=(f-r)/c,B=(L-w)/c;for(l=0;l<c;l++)s[l]=new m(E+l*M,a+l*W,r+l*z,w+l*B);return s}function q(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.WGS84)),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}q.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};q.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 q(S))};var pe=new p,ae=new p,fe=new p,he=new p;q.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(G,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 G=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:G}):i=U.generateCartesianRhumbArc({positions:i,granularity:d,ellipsoid:E,height:G})}f=i.length;let L=f*4-4,M=new Float64Array(L*3),W=new Float64Array(L*3),z=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,H=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 G=r===0?2:0,T=r===f-1?2:4;for(w=G;w<T;++w){p.pack(ae,M,H),p.pack(fe,W,H),p.pack(he,z,H),H+=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:W}),v.nextPosition=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:z}),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=q;function ge(e,o){return h(o)&&(e=Q.unpack(e,o)),e._ellipsoid=u.clone(e._ellipsoid),Q.createGeometry(e)}var He=ge;export{He as default};
|
|
@@ -1 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.112
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import{a as M}from"./chunk-2BUTAXOJ.js";import{a as W}from"./chunk-5HTTNN4T.js";import"./chunk-D3TZ2KW7.js";import"./chunk-XUP5J7GQ.js";import{a as x,b as j}from"./chunk-HQCE7D5L.js";import{a as I}from"./chunk-FRIKFALT.js";import"./chunk-YGFN6UZV.js";import"./chunk-ZD25UQM7.js";import{a as g}from"./chunk-YJTMGLB7.js";import"./chunk-EH5BIXGS.js";import"./chunk-KLK65KFE.js";import{a as $,b as V}from"./chunk-GCHOMXEL.js";import{a as Z}from"./chunk-4DWHRTTP.js";import"./chunk-4Y673DAX.js";import"./chunk-C4OMKOTM.js";import"./chunk-NVQN2WQZ.js";import{a as X}from"./chunk-JJYRRIWN.js";import{a as Q}from"./chunk-LXL44TDT.js";import{b as Y,c as z,d as U}from"./chunk-7JE52M2E.js";import{d as K}from"./chunk-Q3IJMJJ2.js";import"./chunk-OPGPRG5D.js";import{d as C}from"./chunk-X7PMFMCX.js";import{a as B}from"./chunk-FAMH7QPQ.js";import{a as T,c as f}from"./chunk-ZGGJSLK5.js";import{a as J}from"./chunk-BYGMMPBC.js";import"./chunk-HXIAOT7H.js";import"./chunk-E2BL2RZG.js";import{a as k}from"./chunk-HKVMSEEW.js";import{a as D}from"./chunk-Y6JLAJTJ.js";import{e as _}from"./chunk-SOPLNYSA.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),G=(L-1)*i*6+E.length*2,r=X.createTypedArray(u,G),m,s,d,b,A,q,F=i*2,p=0;for(m=0;m<L-1;m++){for(s=0;s<i-1;s++)d=s*2+m*i*2,q=d+F,b=d+1,A=b+F,r[p++]=b,r[p++]=d,r[p++]=A,r[p++]=A,r[p++]=d,r[p++]=q;d=i*2-2+m*i*2,b=d+1,A=b+F,q=d+F,r[p++]=b,r[p++]=d,r[p++]=A,r[p++]=A,r[p++]=d,r[p++]=q}if(o.st||o.tangent||o.bitangent){let c=new Float32Array(u*2),S=1/(L-1),w=1/n.height,O=n.height/2,y,a,h=0;for(m=0;m<L;m++){for(y=m*S,a=w*(e[0].y+O),c[h++]=y,c[h++]=a,s=1;s<i;s++)a=w*(e[s].y+O),c[h++]=y,c[h++]=a,c[h++]=y,c[h++]=a;a=w*(e[0].y+O),c[h++]=y,c[h++]=a}for(s=0;s<i;s++)y=0,a=w*(e[s].y+O),c[h++]=y,c[h++]=a;for(s=0;s<i;s++)y=(L-1)*S,a=w*(e[s].y+O),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,S=E[m+1]+N,w=E[m+2]+N;r[p++]=c,r[p++]=S,r[p++]=w,r[p++]=w+i,r[p++]=S+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.WGS84)),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 G=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=G,n._granularity=r,n):(v.polylinePositions=i,v.shapePositions=u,v.cornerType=G,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 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.112
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import{a as w}from"./chunk-2BUTAXOJ.js";import{a as N,b as E}from"./chunk-HQCE7D5L.js";import"./chunk-FRIKFALT.js";import"./chunk-YGFN6UZV.js";import"./chunk-ZD25UQM7.js";import"./chunk-EH5BIXGS.js";import"./chunk-KLK65KFE.js";import{a as G,b as v}from"./chunk-GCHOMXEL.js";import{a as q}from"./chunk-4DWHRTTP.js";import"./chunk-4Y673DAX.js";import"./chunk-C4OMKOTM.js";import"./chunk-NVQN2WQZ.js";import{a as k}from"./chunk-JJYRRIWN.js";import{a as O}from"./chunk-LXL44TDT.js";import{b as A,c as S,d as R}from"./chunk-7JE52M2E.js";import{d as C}from"./chunk-Q3IJMJJ2.js";import"./chunk-OPGPRG5D.js";import{d as _}from"./chunk-X7PMFMCX.js";import{a as b}from"./chunk-FAMH7QPQ.js";import{a,c as s}from"./chunk-ZGGJSLK5.js";import{a as D}from"./chunk-BYGMMPBC.js";import"./chunk-HXIAOT7H.js";import"./chunk-E2BL2RZG.js";import{a as d}from"./chunk-HKVMSEEW.js";import{a as y}from"./chunk-Y6JLAJTJ.js";import{e as u}from"./chunk-SOPLNYSA.js";function U(o,i){let t=new O;t.position=new R({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,W=T+e;for(n=0;n<e;n++)p[l++]=n+T,p[l++]=n+W}return new S({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.WGS84)),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;v.computeWindingOrder2D(e)===G.CLOCKWISE&&e.reverse();let r=w.fromPoints(e,M),c=E.computePositions(t,e,r,o,!1);return U(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};
|