@anov/gis 1.7.7 → 1.8.5
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/.claude/settings.local.json +37 -0
- package/CHANGELOG.md +95 -0
- package/README.md +297 -85
- package/dist/index.css +1 -1
- package/dist/index.js +18012 -58
- package/dist/resources/Assets/approximateTerrainHeights.json +1 -1
- package/dist/resources/ThirdParty/Workers/package.json +1 -0
- package/dist/resources/ThirdParty/Workers/zip-web-worker.js +1 -0
- package/dist/resources/ThirdParty/draco_decoder.wasm +0 -0
- package/dist/resources/ThirdParty/google-earth-dbroot-parser.js +1 -1
- package/dist/resources/ThirdParty/wasm_splats_bg.wasm +0 -0
- package/dist/resources/ThirdParty/zip-module.wasm +0 -0
- package/dist/resources/Widgets/Animation/Animation.css +127 -1
- package/dist/resources/Widgets/Animation/lighter.css +70 -1
- package/dist/resources/Widgets/BaseLayerPicker/BaseLayerPicker.css +108 -1
- package/dist/resources/Widgets/BaseLayerPicker/lighter.css +22 -1
- package/dist/resources/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.css +102 -1
- package/dist/resources/Widgets/CesiumInspector/CesiumInspector.css +113 -1
- package/dist/resources/Widgets/CesiumWidget/CesiumWidget.css +119 -1
- package/dist/resources/Widgets/CesiumWidget/lighter.css +14 -1
- package/dist/resources/Widgets/FullscreenButton/FullscreenButton.css +8 -1
- package/dist/resources/Widgets/Geocoder/Geocoder.css +70 -1
- package/dist/resources/Widgets/Geocoder/lighter.css +17 -1
- package/dist/resources/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +27 -0
- package/dist/resources/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/azureAerial.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/azureRoads.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/googleContour.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/googleRoadmap.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/googleSatellite.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/googleSatelliteLabels.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png +0 -0
- package/dist/resources/Widgets/InfoBox/InfoBox.css +92 -1
- package/dist/resources/Widgets/InfoBox/InfoBoxDescription.css +178 -1
- package/dist/resources/Widgets/NavigationHelpButton/NavigationHelpButton.css +93 -1
- package/dist/resources/Widgets/NavigationHelpButton/lighter.css +38 -1
- package/dist/resources/Widgets/PerformanceWatchdog/PerformanceWatchdog.css +15 -1
- package/dist/resources/Widgets/ProjectionPicker/ProjectionPicker.css +38 -1
- package/dist/resources/Widgets/SceneModePicker/SceneModePicker.css +56 -1
- package/dist/resources/Widgets/SelectionIndicator/SelectionIndicator.css +20 -1
- package/dist/resources/Widgets/Timeline/Timeline.css +103 -1
- package/dist/resources/Widgets/Timeline/lighter.css +23 -1
- package/dist/resources/Widgets/VRButton/VRButton.css +8 -1
- package/dist/resources/Widgets/Viewer/Viewer.css +107 -1
- package/dist/resources/Widgets/VoxelInspector/VoxelInspector.css +16 -0
- package/dist/resources/Widgets/lighter.css +237 -1
- package/dist/resources/Widgets/lighterShared.css +46 -1
- package/dist/resources/Widgets/shared.css +103 -1
- package/dist/resources/Widgets/widgets.css +1342 -1
- package/dist/resources/Workers/chunk-2AIOP76V.js +25 -0
- package/dist/resources/Workers/chunk-37ETYCYM.js +25 -0
- package/dist/resources/Workers/chunk-3E7FIXV7.js +25 -0
- package/dist/resources/Workers/chunk-3N6OW3OY.js +25 -0
- package/dist/resources/Workers/{ArcType-de5d8777.js → chunk-3VUCSHGU.js} +2 -2
- package/dist/resources/Workers/chunk-4KY4VMEH.js +25 -0
- package/dist/resources/Workers/chunk-4WQ4VT5S.js +25 -0
- package/dist/resources/Workers/chunk-5AAMOBJK.js +25 -0
- package/dist/resources/Workers/chunk-5DGDPBQU.js +25 -0
- package/dist/resources/Workers/chunk-5VFNV3LW.js +25 -0
- package/dist/resources/Workers/chunk-5Z36UAB7.js +25 -0
- package/dist/resources/Workers/chunk-6AEO73KW.js +25 -0
- package/dist/resources/Workers/chunk-6DLS2UKD.js +25 -0
- package/dist/resources/Workers/{GeometryAttributes-734a3446.js → chunk-6EINM7EY.js} +2 -2
- package/dist/resources/Workers/chunk-6W2XFGWI.js +25 -0
- package/dist/resources/Workers/chunk-7GCQCPLT.js +25 -0
- package/dist/resources/Workers/chunk-7TN3TOVQ.js +25 -0
- package/dist/resources/Workers/chunk-A4I25VN7.js +25 -0
- package/dist/resources/Workers/{GeometryOffsetAttribute-59b14f45.js → chunk-AJH5KBOO.js} +2 -2
- package/dist/resources/Workers/chunk-AKELQO2L.js +25 -0
- package/dist/resources/Workers/chunk-ALIHIWSS.js +25 -0
- package/dist/resources/Workers/chunk-ATKJRN2G.js +25 -0
- package/dist/resources/Workers/chunk-BDWA46XV.js +25 -0
- package/dist/resources/Workers/chunk-BKIYVF74.js +25 -0
- package/dist/resources/Workers/chunk-BPABSUDY.js +25 -0
- package/dist/resources/Workers/chunk-D3TVNJ6W.js +25 -0
- package/dist/resources/Workers/chunk-DM7KUSL2.js +25 -0
- package/dist/resources/Workers/chunk-E7EKLP3B.js +25 -0
- package/dist/resources/Workers/{GeometryInstance-4bfcfe78.js → chunk-G2QPRBZU.js} +2 -2
- package/dist/resources/Workers/chunk-G3GDHHWO.js +25 -0
- package/dist/resources/Workers/chunk-G72JFEXW.js +25 -0
- package/dist/resources/Workers/chunk-IAE6APK2.js +25 -0
- package/dist/resources/Workers/chunk-IEITL4VO.js +25 -0
- package/dist/resources/Workers/chunk-LHBFSFJE.js +25 -0
- package/dist/resources/Workers/chunk-LN2UT4R3.js +25 -0
- package/dist/resources/Workers/chunk-LNJEJFV5.js +66 -0
- package/dist/resources/Workers/{defaultValue-97284df2.js → chunk-ML6MR2RA.js} +2 -2
- package/dist/resources/Workers/chunk-MOHWP7VV.js +25 -0
- package/dist/resources/Workers/chunk-NZBME2JK.js +25 -0
- package/dist/resources/Workers/chunk-P5EFSOUF.js +25 -0
- package/dist/resources/Workers/chunk-P7N43FDO.js +25 -0
- package/dist/resources/Workers/{combine-d11b1f00.js → chunk-PEDE2P3Q.js} +2 -2
- package/dist/resources/Workers/chunk-PSIOCLX7.js +25 -0
- package/dist/resources/Workers/chunk-PYMQNHFO.js +25 -0
- package/dist/resources/Workers/chunk-QJTXFT4R.js +25 -0
- package/dist/resources/Workers/chunk-QNPYEODC.js +25 -0
- package/dist/resources/Workers/chunk-QS7V5G6Y.js +25 -0
- package/dist/resources/Workers/chunk-RDX4QSUS.js +25 -0
- package/dist/resources/Workers/chunk-RESOCDYZ.js +25 -0
- package/dist/resources/Workers/chunk-SRA5MBUT.js +25 -0
- package/dist/resources/Workers/chunk-TCOMWBL2.js +25 -0
- package/dist/resources/Workers/chunk-UA7PAMQQ.js +25 -0
- package/dist/resources/Workers/chunk-W5OEMTMB.js +25 -0
- package/dist/resources/Workers/chunk-WGIRJIIK.js +25 -0
- package/dist/resources/Workers/{CylinderGeometryLibrary-24ad1484.js → chunk-XRJOFXJF.js} +2 -2
- package/dist/resources/Workers/chunk-YP4SXJYZ.js +25 -0
- package/dist/resources/Workers/chunk-Z7Q4J7AE.js +25 -0
- package/dist/resources/Workers/combineGeometry.js +2 -2
- package/dist/resources/Workers/createBoxGeometry.js +2 -2
- package/dist/resources/Workers/createBoxOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createCircleGeometry.js +2 -2
- package/dist/resources/Workers/createCircleOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createCoplanarPolygonGeometry.js +2 -2
- package/dist/resources/Workers/createCoplanarPolygonOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createCorridorGeometry.js +2 -2
- package/dist/resources/Workers/createCorridorOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createCylinderGeometry.js +2 -2
- package/dist/resources/Workers/createCylinderOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createEllipseGeometry.js +2 -2
- package/dist/resources/Workers/createEllipseOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createEllipsoidGeometry.js +2 -2
- package/dist/resources/Workers/createEllipsoidOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createFrustumGeometry.js +2 -2
- package/dist/resources/Workers/createFrustumOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createGeometry.js +2 -2
- package/dist/resources/Workers/createGroundPolylineGeometry.js +2 -2
- package/dist/resources/Workers/createPlaneGeometry.js +2 -2
- package/dist/resources/Workers/createPlaneOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createPolygonGeometry.js +2 -2
- package/dist/resources/Workers/createPolygonOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createPolylineGeometry.js +2 -2
- package/dist/resources/Workers/createPolylineVolumeGeometry.js +2 -2
- package/dist/resources/Workers/createPolylineVolumeOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createRectangleGeometry.js +2 -2
- package/dist/resources/Workers/createRectangleOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createSimplePolylineGeometry.js +2 -2
- package/dist/resources/Workers/createSphereGeometry.js +2 -2
- package/dist/resources/Workers/createSphereOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createTaskProcessorWorker.js +2 -2
- package/dist/resources/Workers/createVectorTileClampedPolylines.js +2 -2
- package/dist/resources/Workers/createVectorTileGeometries.js +2 -2
- package/dist/resources/Workers/createVectorTilePoints.js +2 -2
- package/dist/resources/Workers/createVectorTilePolygons.js +2 -2
- package/dist/resources/Workers/createVectorTilePolylines.js +2 -2
- package/dist/resources/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -0
- package/dist/resources/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -2
- package/dist/resources/Workers/createVerticesFromHeightmap.js +2 -4
- package/dist/resources/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -2
- package/dist/resources/Workers/createWallGeometry.js +2 -2
- package/dist/resources/Workers/createWallOutlineGeometry.js +2 -2
- package/dist/resources/Workers/decodeDraco.js +2 -2
- package/dist/resources/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2
- package/dist/resources/Workers/decodeI3S.js +25 -0
- package/dist/resources/Workers/gaussianSplatSorter.js +25 -0
- package/dist/resources/Workers/{_commonjsHelpers-3aae1032-65601a27.js → gaussianSplatTextureGenerator.js} +2 -2
- package/dist/resources/Workers/incrementallyBuildTerrainPicker.js +25 -0
- package/dist/resources/Workers/transcodeKTX2.js +2 -2
- package/dist/resources/Workers/transferTypedArrayTest.js +25 -1
- package/dist/resources/Workers/upsampleQuantizedTerrainMesh.js +2 -2
- package/dist/resources/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -0
- package/dist/resources/static/js/viewerCesiumNavigationMixin.js +1 -1
- package/package.json +88 -84
- package/scripts/release.js +323 -0
- package/dist/resources/ThirdParty/Workers/basis_transcoder.js +0 -1
- package/dist/resources/ThirdParty/Workers/draco_decoder_nodejs.js +0 -1
- package/dist/resources/ThirdParty/Workers/pako_deflate.min.js +0 -1
- package/dist/resources/ThirdParty/Workers/pako_inflate.min.js +0 -1
- package/dist/resources/ThirdParty/Workers/z-worker-pako.js +0 -1
- package/dist/resources/Widgets/Images/ImageryProviders/esriNationalGeographic.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/esriWorldImagery.png +0 -0
- package/dist/resources/Widgets/Images/ImageryProviders/esriWorldStreetMap.png +0 -0
- package/dist/resources/Workers/AttributeCompression-5744d52e.js +0 -25
- package/dist/resources/Workers/AxisAlignedBoundingBox-b1c095aa.js +0 -25
- package/dist/resources/Workers/BoundingRectangle-2b0ebbdd.js +0 -25
- package/dist/resources/Workers/BoxGeometry-acd0c697.js +0 -25
- package/dist/resources/Workers/Color-c7fd1307.js +0 -25
- package/dist/resources/Workers/ComponentDatatype-e7fbe225.js +0 -25
- package/dist/resources/Workers/CoplanarPolygonGeometryLibrary-edaba606.js +0 -25
- package/dist/resources/Workers/CorridorGeometryLibrary-ab3e6481.js +0 -25
- package/dist/resources/Workers/CylinderGeometry-679e50b4.js +0 -25
- package/dist/resources/Workers/EllipseGeometry-e6f948bb.js +0 -25
- package/dist/resources/Workers/EllipseGeometryLibrary-0adcaeed.js +0 -25
- package/dist/resources/Workers/EllipseOutlineGeometry-418492dc.js +0 -25
- package/dist/resources/Workers/EllipsoidGeodesic-ed8a0e40.js +0 -25
- package/dist/resources/Workers/EllipsoidGeometry-539fb9e2.js +0 -25
- package/dist/resources/Workers/EllipsoidOutlineGeometry-6c13760b.js +0 -25
- package/dist/resources/Workers/EllipsoidRhumbLine-60f14314.js +0 -25
- package/dist/resources/Workers/EllipsoidTangentPlane-7ae496b2.js +0 -25
- package/dist/resources/Workers/EncodedCartesian3-a9a8a281.js +0 -25
- package/dist/resources/Workers/FrustumGeometry-be9b9578.js +0 -25
- package/dist/resources/Workers/GeometryAttribute-fd1d7e90.js +0 -25
- package/dist/resources/Workers/GeometryPipeline-a847e31f.js +0 -25
- package/dist/resources/Workers/IndexDatatype-65271ba3.js +0 -25
- package/dist/resources/Workers/IntersectionTests-33ace2d6.js +0 -25
- package/dist/resources/Workers/Matrix2-73789715.js +0 -25
- package/dist/resources/Workers/OrientedBoundingBox-ee3011f6.js +0 -25
- package/dist/resources/Workers/Plane-e916220d.js +0 -25
- package/dist/resources/Workers/PolygonGeometryLibrary-0f0c78d4.js +0 -25
- package/dist/resources/Workers/PolygonPipeline-00dc0c6e.js +0 -25
- package/dist/resources/Workers/PolylinePipeline-ebd42f23.js +0 -25
- package/dist/resources/Workers/PolylineVolumeGeometryLibrary-a4b92b4e.js +0 -25
- package/dist/resources/Workers/PrimitivePipeline-42d69f96.js +0 -25
- package/dist/resources/Workers/RectangleGeometryLibrary-cff60d30.js +0 -25
- package/dist/resources/Workers/RuntimeError-4f8ec8a2.js +0 -25
- package/dist/resources/Workers/TerrainEncoding-080f16eb.js +0 -25
- package/dist/resources/Workers/Transforms-d3d3b2a9.js +0 -66
- package/dist/resources/Workers/VertexFormat-9886cb81.js +0 -25
- package/dist/resources/Workers/WallGeometryLibrary-27f90b78.js +0 -25
- package/dist/resources/Workers/WebGLConstants-6da700a2.js +0 -25
- package/dist/resources/Workers/WebMercatorProjection-04ef6bc3.js +0 -25
- package/dist/resources/Workers/arrayRemoveDuplicates-6f91355d.js +0 -25
- package/dist/resources/Workers/cesiumWorkerBootstrapper.js +0 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.143.0
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -22,4 +22,4 @@
|
|
|
22
22
|
* Portions licensed separately.
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
|
-
define(["./defaultValue-97284df2","./Matrix2-73789715","./ArcType-de5d8777","./BoundingRectangle-2b0ebbdd","./Transforms-d3d3b2a9","./RuntimeError-4f8ec8a2","./ComponentDatatype-e7fbe225","./EllipsoidGeodesic-ed8a0e40","./EllipsoidTangentPlane-7ae496b2","./GeometryAttribute-fd1d7e90","./GeometryInstance-4bfcfe78","./GeometryOffsetAttribute-59b14f45","./GeometryPipeline-a847e31f","./IndexDatatype-65271ba3","./PolygonGeometryLibrary-0f0c78d4","./PolygonPipeline-00dc0c6e","./VertexFormat-9886cb81","./_commonjsHelpers-3aae1032-65601a27","./combine-d11b1f00","./WebGLConstants-6da700a2","./AxisAlignedBoundingBox-b1c095aa","./IntersectionTests-33ace2d6","./Plane-e916220d","./AttributeCompression-5744d52e","./EncodedCartesian3-a9a8a281","./arrayRemoveDuplicates-6f91355d","./EllipsoidRhumbLine-60f14314","./GeometryAttributes-734a3446"],(function(e,t,o,r,i,n,a,s,l,u,c,d,p,y,m,g,h,f,b,_,P,C,x,w,T,I,A,v){"use strict";const E=new t.Cartographic,G=new t.Cartographic;function O(e,t,o,r){const i=r.cartesianToCartographic(e,E).height,n=r.cartesianToCartographic(t,G);n.height=i,r.cartographicToCartesian(n,t);const a=r.cartesianToCartographic(o,G);a.height=i-100,r.cartographicToCartesian(a,o)}const L=new r.BoundingRectangle,V=new t.Cartesian3,H=new t.Cartesian3,D=new t.Cartesian3,N=new t.Cartesian3,F=new t.Cartesian3,R=new t.Cartesian3;let M=new t.Cartesian3,S=new t.Cartesian3,B=new t.Cartesian3;const k=new t.Cartesian2,z=new t.Cartesian2,W=new t.Cartesian3,Y=new i.Quaternion,U=new t.Matrix3,j=new t.Matrix3;function Q(o){const r=o.vertexFormat,n=o.geometry,s=o.shadowVolume,l=n.attributes.position.values,c=e.defined(n.attributes.st)?n.attributes.st.values:void 0;let p=l.length;const y=o.wall,m=o.top||y,g=o.bottom||y;if(r.st||r.normal||r.tangent||r.bitangent||s){const d=o.boundingRectangle,h=o.tangentPlane,f=o.ellipsoid,b=o.stRotation,_=o.perPositionHeight,P=k;P.x=d.x,P.y=d.y;const C=r.st?new Float32Array(p/3*2):void 0;let x;r.normal&&(x=_&&m&&!y?n.attributes.normal.values:new Float32Array(p));const w=r.tangent?new Float32Array(p):void 0,T=r.bitangent?new Float32Array(p):void 0,I=s?new Float32Array(p):void 0;let A=0,v=0,E=H,G=D,L=N,Q=!0,q=U,K=j;if(0!==b){let e=i.Quaternion.fromAxisAngle(h._plane.normal,b,Y);q=t.Matrix3.fromQuaternion(e,q),e=i.Quaternion.fromAxisAngle(h._plane.normal,-b,Y),K=t.Matrix3.fromQuaternion(e,K)}else q=t.Matrix3.clone(t.Matrix3.IDENTITY,q),K=t.Matrix3.clone(t.Matrix3.IDENTITY,K);let Z=0,J=0;m&&g&&(Z=p/2,J=p/3,p/=2);for(let i=0;i<p;i+=3){const n=t.Cartesian3.fromArray(l,i,W);if(r.st&&!e.defined(c)){let e=t.Matrix3.multiplyByVector(q,n,V);e=f.scaleToGeodeticSurface(e,e);const o=h.projectPointOntoPlane(e,z);t.Cartesian2.subtract(o,P,o);const r=a.CesiumMath.clamp(o.x/d.width,0,1),i=a.CesiumMath.clamp(o.y/d.height,0,1);g&&(C[A+J]=r,C[A+1+J]=i),m&&(C[A]=r,C[A+1]=i),A+=2}if(r.normal||r.tangent||r.bitangent||s){const e=v+1,u=v+2;if(y){if(i+3<p){const e=t.Cartesian3.fromArray(l,i+3,F);if(Q){const o=t.Cartesian3.fromArray(l,i+p,R);_&&O(n,e,o,f),t.Cartesian3.subtract(e,n,e),t.Cartesian3.subtract(o,n,o),E=t.Cartesian3.normalize(t.Cartesian3.cross(o,e,E),E),Q=!1}t.Cartesian3.equalsEpsilon(e,n,a.CesiumMath.EPSILON10)&&(Q=!0)}(r.tangent||r.bitangent)&&(L=f.geodeticSurfaceNormal(n,L),r.tangent&&(G=t.Cartesian3.normalize(t.Cartesian3.cross(L,E,G),G)))}else E=f.geodeticSurfaceNormal(n,E),(r.tangent||r.bitangent)&&(_&&(M=t.Cartesian3.fromArray(x,v,M),S=t.Cartesian3.cross(t.Cartesian3.UNIT_Z,M,S),S=t.Cartesian3.normalize(t.Matrix3.multiplyByVector(K,S,S),S),r.bitangent&&(B=t.Cartesian3.normalize(t.Cartesian3.cross(M,S,B),B))),G=t.Cartesian3.cross(t.Cartesian3.UNIT_Z,E,G),G=t.Cartesian3.normalize(t.Matrix3.multiplyByVector(K,G,G),G),r.bitangent&&(L=t.Cartesian3.normalize(t.Cartesian3.cross(E,G,L),L)));r.normal&&(o.wall?(x[v+Z]=E.x,x[e+Z]=E.y,x[u+Z]=E.z):g&&(x[v+Z]=-E.x,x[e+Z]=-E.y,x[u+Z]=-E.z),(m&&!_||y)&&(x[v]=E.x,x[e]=E.y,x[u]=E.z)),s&&(y&&(E=f.geodeticSurfaceNormal(n,E)),I[v+Z]=-E.x,I[e+Z]=-E.y,I[u+Z]=-E.z),r.tangent&&(o.wall?(w[v+Z]=G.x,w[e+Z]=G.y,w[u+Z]=G.z):g&&(w[v+Z]=-G.x,w[e+Z]=-G.y,w[u+Z]=-G.z),m&&(_?(w[v]=S.x,w[e]=S.y,w[u]=S.z):(w[v]=G.x,w[e]=G.y,w[u]=G.z))),r.bitangent&&(g&&(T[v+Z]=L.x,T[e+Z]=L.y,T[u+Z]=L.z),m&&(_?(T[v]=B.x,T[e]=B.y,T[u]=B.z):(T[v]=L.x,T[e]=L.y,T[u]=L.z))),v+=3}}r.st&&!e.defined(c)&&(n.attributes.st=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:C})),r.normal&&(n.attributes.normal=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:x})),r.tangent&&(n.attributes.tangent=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:w})),r.bitangent&&(n.attributes.bitangent=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:T})),s&&(n.attributes.extrudeDirection=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:I}))}if(o.extrude&&e.defined(o.offsetAttribute)){const e=l.length/3;let t=new Uint8Array(e);if(o.offsetAttribute===d.GeometryOffsetAttribute.TOP)m&&g||y?t=t.fill(1,0,e/2):m&&(t=t.fill(1));else{const e=o.offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1;t=t.fill(e)}n.attributes.applyOffset=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}return n}const q=new t.Cartographic,K=new t.Cartographic,Z={westOverIDL:0,eastOverIDL:0};let J=new s.EllipsoidGeodesic;function X(r,i,n,l,u){if(u=e.defaultValue(u,new t.Rectangle),!e.defined(r)||r.length<3)return u.west=0,u.north=0,u.south=0,u.east=0,u;if(n===o.ArcType.RHUMB)return t.Rectangle.fromCartesianArray(r,i,u);J.ellipsoid.equals(i)||(J=new s.EllipsoidGeodesic(void 0,void 0,i)),u.west=Number.POSITIVE_INFINITY,u.east=Number.NEGATIVE_INFINITY,u.south=Number.POSITIVE_INFINITY,u.north=Number.NEGATIVE_INFINITY,Z.westOverIDL=Number.POSITIVE_INFINITY,Z.eastOverIDL=Number.NEGATIVE_INFINITY;const c=1/a.CesiumMath.chordLength(l,i.maximumRadius),d=r.length;let p,y=i.cartesianToCartographic(r[0],K),m=q;for(let e=1;e<d;e++)p=m,m=y,y=i.cartesianToCartographic(r[e],p),J.setEndPoints(m,y),ee(J,c,u,Z);return p=m,m=y,y=i.cartesianToCartographic(r[0],p),J.setEndPoints(m,y),ee(J,c,u,Z),u.east-u.west>Z.eastOverIDL-Z.westOverIDL&&(u.west=Z.westOverIDL,u.east=Z.eastOverIDL,u.east>a.CesiumMath.PI&&(u.east=u.east-a.CesiumMath.TWO_PI),u.west>a.CesiumMath.PI&&(u.west=u.west-a.CesiumMath.TWO_PI)),u}const $=new t.Cartographic;function ee(e,t,o,r){const i=e.surfaceDistance,n=Math.ceil(i*t),s=n>0?i/(n-1):Number.POSITIVE_INFINITY;let l=0;for(let t=0;t<n;t++){const t=e.interpolateUsingSurfaceDistance(l,$);l+=s;const i=t.longitude,n=t.latitude;o.west=Math.min(o.west,i),o.east=Math.max(o.east,i),o.south=Math.min(o.south,n),o.north=Math.max(o.north,n);const u=i>=0?i:i+a.CesiumMath.TWO_PI;r.westOverIDL=Math.min(r.westOverIDL,u),r.eastOverIDL=Math.max(r.eastOverIDL,u)}}const te=[];function oe(t,o,r,i,n,a,s,u,d,p){const h={walls:[]};let f;if(s||u){const n=m.PolygonGeometryLibrary.createGeometryFromPositions(t,o,r,i,a,d,p),l=n.attributes.position.values,g=n.indices;let b,_;if(s&&u){const t=l.concat(l);b=t.length/3,_=y.IndexDatatype.createTypedArray(b,2*g.length),_.set(g);const o=g.length,i=b/2;for(f=0;f<o;f+=3){const e=_[f]+i,t=_[f+1]+i,r=_[f+2]+i;_[f+o]=r,_[f+1+o]=t,_[f+2+o]=e}if(n.attributes.position.values=t,a&&d.normal){const e=n.attributes.normal.values;n.attributes.normal.values=new Float32Array(t.length),n.attributes.normal.values.set(e)}if(d.st&&e.defined(r)){const e=n.attributes.st.values;n.attributes.st.values=new Float32Array(2*b),n.attributes.st.values=e.concat(e)}n.indices=_}else if(u){for(b=l.length/3,_=y.IndexDatatype.createTypedArray(b,g.length),f=0;f<g.length;f+=3)_[f]=g[f+2],_[f+1]=g[f+1],_[f+2]=g[f];n.indices=_}h.topAndBottom=new c.GeometryInstance({geometry:n})}let b=n.outerRing,_=l.EllipsoidTangentPlane.fromPoints(b,t),P=_.projectPointsOntoPlane(b,te),C=g.PolygonPipeline.computeWindingOrder2D(P);C===g.WindingOrder.CLOCKWISE&&(b=b.slice().reverse());let x=m.PolygonGeometryLibrary.computeWallGeometry(b,r,t,i,a,p);h.walls.push(new c.GeometryInstance({geometry:x}));const w=n.holes;for(f=0;f<w.length;f++){let e=w[f];_=l.EllipsoidTangentPlane.fromPoints(e,t),P=_.projectPointsOntoPlane(e,te),C=g.PolygonPipeline.computeWindingOrder2D(P),C===g.WindingOrder.COUNTER_CLOCKWISE&&(e=e.slice().reverse()),x=m.PolygonGeometryLibrary.computeWallGeometry(e,r,t,i,a,p),h.walls.push(new c.GeometryInstance({geometry:x}))}return h}function re(r){const i=r.polygonHierarchy,n=e.defaultValue(r.vertexFormat,h.VertexFormat.DEFAULT),s=e.defaultValue(r.ellipsoid,t.Ellipsoid.WGS84),l=e.defaultValue(r.granularity,a.CesiumMath.RADIANS_PER_DEGREE),u=e.defaultValue(r.stRotation,0),c=r.textureCoordinates,d=e.defaultValue(r.perPositionHeight,!1),p=d&&e.defined(r.extrudedHeight);let y=e.defaultValue(r.height,0),g=e.defaultValue(r.extrudedHeight,y);if(!p){const e=Math.max(y,g);g=Math.min(y,g),y=e}this._vertexFormat=h.VertexFormat.clone(n),this._ellipsoid=t.Ellipsoid.clone(s),this._granularity=l,this._stRotation=u,this._height=y,this._extrudedHeight=g,this._closeTop=e.defaultValue(r.closeTop,!0),this._closeBottom=e.defaultValue(r.closeBottom,!0),this._polygonHierarchy=i,this._perPositionHeight=d,this._perPositionHeightExtrude=p,this._shadowVolume=e.defaultValue(r.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=r.offsetAttribute,this._arcType=e.defaultValue(r.arcType,o.ArcType.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=c,this.packedLength=m.PolygonGeometryLibrary.computeHierarchyPackedLength(i,t.Cartesian3)+t.Ellipsoid.packedLength+h.VertexFormat.packedLength+(c?m.PolygonGeometryLibrary.computeHierarchyPackedLength(c,t.Cartesian2):1)+12}re.fromPositions=function(t){return new re({polygonHierarchy:{positions:(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).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})},re.pack=function(o,r,i){return i=e.defaultValue(i,0),i=m.PolygonGeometryLibrary.packPolygonHierarchy(o._polygonHierarchy,r,i,t.Cartesian3),t.Ellipsoid.pack(o._ellipsoid,r,i),i+=t.Ellipsoid.packedLength,h.VertexFormat.pack(o._vertexFormat,r,i),i+=h.VertexFormat.packedLength,r[i++]=o._height,r[i++]=o._extrudedHeight,r[i++]=o._granularity,r[i++]=o._stRotation,r[i++]=o._perPositionHeightExtrude?1:0,r[i++]=o._perPositionHeight?1:0,r[i++]=o._closeTop?1:0,r[i++]=o._closeBottom?1:0,r[i++]=o._shadowVolume?1:0,r[i++]=e.defaultValue(o._offsetAttribute,-1),r[i++]=o._arcType,e.defined(o._textureCoordinates)?i=m.PolygonGeometryLibrary.packPolygonHierarchy(o._textureCoordinates,r,i,t.Cartesian2):r[i++]=-1,r[i++]=o.packedLength,r};const ie=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),ne=new h.VertexFormat,ae={polygonHierarchy:{}};return re.unpack=function(o,r,i){r=e.defaultValue(r,0);const n=m.PolygonGeometryLibrary.unpackPolygonHierarchy(o,r,t.Cartesian3);r=n.startingIndex,delete n.startingIndex;const a=t.Ellipsoid.unpack(o,r,ie);r+=t.Ellipsoid.packedLength;const s=h.VertexFormat.unpack(o,r,ne);r+=h.VertexFormat.packedLength;const l=o[r++],u=o[r++],c=o[r++],d=o[r++],p=1===o[r++],y=1===o[r++],g=1===o[r++],f=1===o[r++],b=1===o[r++],_=o[r++],P=o[r++],C=-1===o[r]?void 0:m.PolygonGeometryLibrary.unpackPolygonHierarchy(o,r,t.Cartesian2);e.defined(C)?(r=C.startingIndex,delete C.startingIndex):r++;const x=o[r++];return e.defined(i)||(i=new re(ae)),i._polygonHierarchy=n,i._ellipsoid=t.Ellipsoid.clone(a,i._ellipsoid),i._vertexFormat=h.VertexFormat.clone(s,i._vertexFormat),i._height=l,i._extrudedHeight=u,i._granularity=c,i._stRotation=d,i._perPositionHeightExtrude=p,i._perPositionHeight=y,i._closeTop=g,i._closeBottom=f,i._shadowVolume=b,i._offsetAttribute=-1===_?void 0:_,i._arcType=P,i._textureCoordinates=C,i.packedLength=x,i},re.computeRectangle=function(r,i){const n=e.defaultValue(r.granularity,a.CesiumMath.RADIANS_PER_DEGREE),s=e.defaultValue(r.arcType,o.ArcType.GEODESIC),l=r.polygonHierarchy,u=e.defaultValue(r.ellipsoid,t.Ellipsoid.WGS84);return X(l.positions,u,s,n,i)},re.createGeometry=function(t){const o=t._vertexFormat,r=t._ellipsoid,n=t._granularity,s=t._stRotation,h=t._polygonHierarchy,f=t._perPositionHeight,b=t._closeTop,_=t._closeBottom,P=t._arcType,C=t._textureCoordinates,x=e.defined(C);let w=h.positions;if(w.length<3)return;const T=l.EllipsoidTangentPlane.fromPoints(w,r),I=m.PolygonGeometryLibrary.polygonsFromHierarchy(h,x,T.projectPointsOntoPlane.bind(T),!f,r),A=I.hierarchy,v=I.polygons,E=x?m.PolygonGeometryLibrary.polygonsFromHierarchy(C,!0,(function(e){return e}),!1).polygons:void 0;if(0===A.length)return;w=A[0].outerRing;const G=m.PolygonGeometryLibrary.computeBoundingRectangle(T.plane.normal,T.projectPointOntoPlane.bind(T),w,s,L),O=[],V=t._height,H=t._extrudedHeight,D={perPositionHeight:f,vertexFormat:o,geometry:void 0,tangentPlane:T,boundingRectangle:G,ellipsoid:r,stRotation:s,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:P};let N;if(t._perPositionHeightExtrude||!a.CesiumMath.equalsEpsilon(V,H,0,a.CesiumMath.EPSILON2))for(D.extrude=!0,D.top=b,D.bottom=_,D.shadowVolume=t._shadowVolume,D.offsetAttribute=t._offsetAttribute,N=0;N<v.length;N++){const e=oe(r,v[N],x?E[N]:void 0,n,A[N],f,b,_,o,P);let t;b&&_?(t=e.topAndBottom,D.geometry=m.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(t.geometry,V,H,r,f)):b?(t=e.topAndBottom,t.geometry.attributes.position.values=g.PolygonPipeline.scaleToGeodeticHeight(t.geometry.attributes.position.values,V,r,!f),D.geometry=t.geometry):_&&(t=e.topAndBottom,t.geometry.attributes.position.values=g.PolygonPipeline.scaleToGeodeticHeight(t.geometry.attributes.position.values,H,r,!0),D.geometry=t.geometry),(b||_)&&(D.wall=!1,t.geometry=Q(D),O.push(t));const i=e.walls;D.wall=!0;for(let e=0;e<i.length;e++){const t=i[e];D.geometry=m.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(t.geometry,V,H,r,f),t.geometry=Q(D),O.push(t)}}else for(N=0;N<v.length;N++){const i=new c.GeometryInstance({geometry:m.PolygonGeometryLibrary.createGeometryFromPositions(r,v[N],x?E[N]:void 0,n,f,o,P)});if(i.geometry.attributes.position.values=g.PolygonPipeline.scaleToGeodeticHeight(i.geometry.attributes.position.values,V,r,!f),D.geometry=i.geometry,i.geometry=Q(D),e.defined(t._offsetAttribute)){const e=i.geometry.attributes.position.values.length,o=t._offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1,r=new Uint8Array(e/3).fill(o);i.geometry.attributes.applyOffset=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})}O.push(i)}const F=p.GeometryPipeline.combineInstances(O)[0];F.attributes.position.values=new Float64Array(F.attributes.position.values),F.indices=y.IndexDatatype.createTypedArray(F.attributes.position.values.length/3,F.indices);const R=F.attributes,M=i.BoundingSphere.fromVertices(R.position.values);return o.position||delete R.position,new u.Geometry({attributes:R,indices:F.indices,primitiveType:F.primitiveType,boundingSphere:M,offsetAttribute:t._offsetAttribute})},re.createShadowVolume=function(e,t,o){const r=e._granularity,i=e._ellipsoid,n=t(r,i),a=o(r,i);return new re({polygonHierarchy:e._polygonHierarchy,ellipsoid:i,stRotation:e._stRotation,granularity:r,perPositionHeight:!1,extrudedHeight:n,height:a,vertexFormat:h.VertexFormat.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})},Object.defineProperties(re.prototype,{rectangle:{get:function(){if(!e.defined(this._rectangle)){const e=this._polygonHierarchy.positions;this._rectangle=X(e,this._ellipsoid,this._arcType,this._granularity)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return e.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(e){const t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];const o=e._ellipsoid,r=e._polygonHierarchy.positions,i=e.rectangle;return u.Geometry._textureCoordinateRotationPoints(r,t,o,i)}(this)),this._textureCoordinateRotationPoints}}}),function(o,r){return e.defined(r)&&(o=re.unpack(o,r)),o._ellipsoid=t.Ellipsoid.clone(o._ellipsoid),re.createGeometry(o)}}));
|
|
25
|
+
import{a as mt}from"./chunk-UA7PAMQQ.js";import{a as L}from"./chunk-IEITL4VO.js";import{a as st}from"./chunk-AJH5KBOO.js";import{a as rt}from"./chunk-XRJOFXJF.js";import{a as bt}from"./chunk-QNPYEODC.js";import"./chunk-G72JFEXW.js";import"./chunk-6W2XFGWI.js";import{a as lt}from"./chunk-ML6MR2RA.js";import{a as q}from"./chunk-AKELQO2L.js";import{a as Z}from"./chunk-BDWA46XV.js";import"./chunk-5VFNV3LW.js";import{a as dt,b as ot}from"./chunk-TCOMWBL2.js";import"./chunk-G2QPRBZU.js";import"./chunk-37ETYCYM.js";import{a as wt,b as yt}from"./chunk-SRA5MBUT.js";import"./chunk-5AAMOBJK.js";import{a as ct}from"./chunk-4WQ4VT5S.js";import"./chunk-6EINM7EY.js";import{c as ut,d as $}from"./chunk-A4I25VN7.js";import{c as Tt}from"./chunk-D3TVNJ6W.js";import"./chunk-3VUCSHGU.js";import{h as at,j as _t}from"./chunk-LNJEJFV5.js";import"./chunk-BPABSUDY.js";import{a as X}from"./chunk-ATKJRN2G.js";import"./chunk-RDX4QSUS.js";import"./chunk-G3GDHHWO.js";import{a as et,b as O,c as S}from"./chunk-2AIOP76V.js";import{a as c,b as D,c as Pt}from"./chunk-IAE6APK2.js";import{a as l}from"./chunk-3E7FIXV7.js";import{a as ft,b as Y}from"./chunk-NZBME2JK.js";import{f as P}from"./chunk-6DLS2UKD.js";function b(t,e){this.position=t,P(this.position)||(this.position=new O),this.tangentPlane=e,P(this.tangentPlane)||(this.tangentPlane=b.NORTH_POLE_TANGENT_PLANE)}Object.defineProperties(b.prototype,{ellipsoid:{get:function(){return this.tangentPlane.ellipsoid}},x:{get:function(){return this.position.x}},y:{get:function(){return this.position.y}},conformalLatitude:{get:function(){let t=O.magnitude(this.position),e=2*this.ellipsoid.maximumRadius;return this.tangentPlane.plane.normal.z*(l.PI_OVER_TWO-2*Math.atan2(t,e))}},longitude:{get:function(){let t=l.PI_OVER_TWO+Math.atan2(this.y,this.x);return t>Math.PI&&(t-=l.TWO_PI),t}}});var nt=new et,Rt=new c;b.prototype.getLatitude=function(t){P(t)||(t=S.default),nt.latitude=this.conformalLatitude,nt.longitude=this.longitude,nt.height=0;let e=this.ellipsoid.cartographicToCartesian(nt,Rt);return t.cartesianToCartographic(e,nt),nt.latitude};var It=new wt,Lt=new c,Ft=new c;b.fromCartesian=function(t,e){Y.defined("cartesian",t);let o=l.signNotZero(t.z),i=b.NORTH_POLE_TANGENT_PLANE,n=b.SOUTH_POLE;o<0&&(i=b.SOUTH_POLE_TANGENT_PLANE,n=b.NORTH_POLE);let r=It;r.origin=i.ellipsoid.scaleToGeocentricSurface(t,r.origin),r.direction=c.subtract(r.origin,n,Lt),c.normalize(r.direction,r.direction);let a=yt.rayPlane(r,i.plane,Ft),s=c.subtract(a,n,a),u=c.dot(i.xAxis,s),h=o*c.dot(i.yAxis,s);return P(e)?(e.position=new O(u,h),e.tangentPlane=i,e):new b(new O(u,h),i)},b.fromCartesianArray=function(t,e){Y.defined("cartesians",t);let o=t.length;P(e)?e.length=o:e=new Array(o);for(let i=0;i<o;i++)e[i]=b.fromCartesian(t[i],e[i]);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 S(.5,.5,.5)),b.NORTH_POLE=Object.freeze(new c(0,0,.5)),b.SOUTH_POLE=Object.freeze(new c(0,0,-.5)),b.NORTH_POLE_TANGENT_PLANE=Object.freeze(new Z(b.NORTH_POLE,b.HALF_UNIT_SPHERE)),b.SOUTH_POLE_TANGENT_PLANE=Object.freeze(new Z(b.SOUTH_POLE,b.HALF_UNIT_SPHERE));var z=b,vt=new et,Ot=new et;function St(t,e,o,i){let n=i.cartesianToCartographic(t,vt).height,r=i.cartesianToCartographic(e,Ot);r.height=n,i.cartographicToCartesian(r,e);let a=i.cartesianToCartographic(o,Ot);a.height=n-100,i.cartographicToCartesian(a,o)}var Et=new mt,Vt=new c,Bt=new c,Mt=new c,jt=new c,kt=new c,zt=new c,ht=new c,Q=new c,it=new c,Dt=new O,Ut=new O,Wt=new c,At=new at,Gt=new D,Yt=new D;function gt(t){let e=t.vertexFormat,o=t.geometry,i=t.shadowVolume,n=o.attributes.position.values,r=P(o.attributes.st)?o.attributes.st.values:void 0,a=n.length,s=t.wall,u=t.top||s,h=t.bottom||s;if(e.st||e.normal||e.tangent||e.bitangent||i){let p=t.boundingRectangle,g=t.rotationAxis,m=t.projectTo2d,d=t.ellipsoid,f=t.stRotation,y=t.perPositionHeight,_=Dt;_.x=p.x,_.y=p.y;let b,T=e.st?new Float32Array(a/3*2):void 0;e.normal&&(b=y&&u&&!s?o.attributes.normal.values:new Float32Array(a));let w=e.tangent?new Float32Array(a):void 0,I=e.bitangent?new Float32Array(a):void 0,A=i?new Float32Array(a):void 0,E=0,v=0,x=Bt,N=Mt,H=jt,L=!0,R=Gt,k=Yt;if(0!==f){let t=at.fromAxisAngle(g,f,At);R=D.fromQuaternion(t,R),t=at.fromAxisAngle(g,-f,At),k=D.fromQuaternion(t,k)}else R=D.clone(D.IDENTITY,R),k=D.clone(D.IDENTITY,k);let S=0,j=0;u&&h&&(S=a/2,j=a/3,a/=2);for(let o=0;o<a;o+=3){let g=c.fromArray(n,o,Wt);if(e.st&&!P(r)){let t=D.multiplyByVector(R,g,Vt);t=d.scaleToGeodeticSurface(t,t);let e=m([t],Ut)[0];O.subtract(e,_,e);let o=l.clamp(e.x/p.width,0,1),i=l.clamp(e.y/p.height,0,1);h&&(T[E+j]=o,T[E+1+j]=i),u&&(T[E]=o,T[E+1]=i),E+=2}if(e.normal||e.tangent||e.bitangent||i){let r=v+1,p=v+2;if(s){if(o+3<a){let t=c.fromArray(n,o+3,kt);if(L){let e=c.fromArray(n,o+a,zt);y&&St(g,t,e,d),c.subtract(t,g,t),c.subtract(e,g,e),x=c.normalize(c.cross(e,t,x),x),L=!1}c.equalsEpsilon(t,g,l.EPSILON10)&&(L=!0)}(e.tangent||e.bitangent)&&(H=d.geodeticSurfaceNormal(g,H),e.tangent&&(N=c.normalize(c.cross(H,x,N),N)))}else x=d.geodeticSurfaceNormal(g,x),(e.tangent||e.bitangent)&&(y&&(ht=c.fromArray(b,v,ht),Q=c.cross(c.UNIT_Z,ht,Q),Q=c.normalize(D.multiplyByVector(k,Q,Q),Q),e.bitangent&&(it=c.normalize(c.cross(ht,Q,it),it))),N=c.cross(c.UNIT_Z,x,N),N=c.normalize(D.multiplyByVector(k,N,N),N),e.bitangent&&(H=c.normalize(c.cross(x,N,H),H)));e.normal&&(t.wall?(b[v+S]=x.x,b[r+S]=x.y,b[p+S]=x.z):h&&(b[v+S]=-x.x,b[r+S]=-x.y,b[p+S]=-x.z),(u&&!y||s)&&(b[v]=x.x,b[r]=x.y,b[p]=x.z)),i&&(s&&(x=d.geodeticSurfaceNormal(g,x)),A[v+S]=-x.x,A[r+S]=-x.y,A[p+S]=-x.z),e.tangent&&(t.wall?(w[v+S]=N.x,w[r+S]=N.y,w[p+S]=N.z):h&&(w[v+S]=-N.x,w[r+S]=-N.y,w[p+S]=-N.z),u&&(y?(w[v]=Q.x,w[r]=Q.y,w[p]=Q.z):(w[v]=N.x,w[r]=N.y,w[p]=N.z))),e.bitangent&&(h&&(I[v+S]=H.x,I[r+S]=H.y,I[p+S]=H.z),u&&(y?(I[v]=it.x,I[r]=it.y,I[p]=it.z):(I[v]=H.x,I[r]=H.y,I[p]=H.z))),v+=3}}e.st&&!P(r)&&(o.attributes.st=new $({componentDatatype:X.FLOAT,componentsPerAttribute:2,values:T})),e.normal&&(o.attributes.normal=new $({componentDatatype:X.FLOAT,componentsPerAttribute:3,values:b})),e.tangent&&(o.attributes.tangent=new $({componentDatatype:X.FLOAT,componentsPerAttribute:3,values:w})),e.bitangent&&(o.attributes.bitangent=new $({componentDatatype:X.FLOAT,componentsPerAttribute:3,values:I})),i&&(o.attributes.extrudeDirection=new $({componentDatatype:X.FLOAT,componentsPerAttribute:3,values:A}))}if(t.extrude&&P(t.offsetAttribute)){let e=n.length/3,i=new Uint8Array(e);if(t.offsetAttribute===lt.TOP)u&&h||s?i=i.fill(1,0,e/2):u&&(i=i.fill(1));else{let e=t.offsetAttribute===lt.NONE?0:1;i=i.fill(e)}o.attributes.applyOffset=new $({componentDatatype:X.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}return o}var Ht=[];function qt(t,e,o,i,n,r,a,s,l,c){let u,h={walls:[]};if(a||s){let n,p,g=L.createGeometryFromPositions(t,e,o,i,r,l,c),m=g.attributes.position.values,d=g.indices;if(a&&s){let t=m.concat(m);n=t.length/3,p=ct.createTypedArray(n,2*d.length),p.set(d);let e=d.length,i=n/2;for(u=0;u<e;u+=3){let t=p[u]+i,o=p[u+1]+i,n=p[u+2]+i;p[u+e]=n,p[u+1+e]=o,p[u+2+e]=t}if(g.attributes.position.values=t,r&&l.normal){let e=g.attributes.normal.values;g.attributes.normal.values=new Float32Array(t.length),g.attributes.normal.values.set(e)}if(l.st&&P(o)){let t=g.attributes.st.values;g.attributes.st.values=new Float32Array(2*n),g.attributes.st.values=t.concat(t)}g.indices=p}else if(s){for(n=m.length/3,p=ct.createTypedArray(n,d.length),u=0;u<d.length;u+=3)p[u]=d[u+2],p[u+1]=d[u+1],p[u+2]=d[u];g.indices=p}h.topAndBottom=new rt({geometry:g})}let p=n.outerRing,g=Z.fromPoints(p,t),m=g.projectPointsOntoPlane(p,Ht),d=ot.computeWindingOrder2D(m);d===dt.CLOCKWISE&&(p=p.slice().reverse());let f=L.computeWallGeometry(p,o,t,i,r,c);h.walls.push(new rt({geometry:f}));let y=n.holes;for(u=0;u<y.length;u++){let e=y[u];m=g.projectPointsOntoPlane(e,Ht),d=ot.computeWindingOrder2D(m),d===dt.COUNTER_CLOCKWISE&&(e=e.slice().reverse()),f=L.computeWallGeometry(e,o,t,i,r,c),h.walls.push(new rt({geometry:f}))}return h}function W(t){if(Y.typeOf.object("options",t),Y.typeOf.object("options.polygonHierarchy",t.polygonHierarchy),P(t.perPositionHeight)&&t.perPositionHeight&&P(t.height))throw new ft("Cannot use both options.perPositionHeight and options.height");if(P(t.arcType)&&t.arcType!==st.GEODESIC&&t.arcType!==st.RHUMB)throw new ft("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let e=t.polygonHierarchy,o=t.vertexFormat??q.DEFAULT,i=t.ellipsoid??S.default,n=t.granularity??l.RADIANS_PER_DEGREE,r=t.stRotation??0,a=t.textureCoordinates,s=t.perPositionHeight??!1,u=s&&P(t.extrudedHeight),h=t.height??0,p=t.extrudedHeight??h;if(!u){let t=Math.max(h,p);p=Math.min(h,p),h=t}this._vertexFormat=q.clone(o),this._ellipsoid=S.clone(i),this._granularity=n,this._stRotation=r,this._height=h,this._extrudedHeight=p,this._closeTop=t.closeTop??!0,this._closeBottom=t.closeBottom??!0,this._polygonHierarchy=e,this._perPositionHeight=s,this._perPositionHeightExtrude=u,this._shadowVolume=t.shadowVolume??!1,this._workerName="createPolygonGeometry",this._offsetAttribute=t.offsetAttribute,this._arcType=t.arcType??st.GEODESIC,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=a,this.packedLength=L.computeHierarchyPackedLength(e,c)+S.packedLength+q.packedLength+(a?L.computeHierarchyPackedLength(a,O):1)+12}W.fromPositions=function(t){return t=t??Pt.EMPTY_OBJECT,Y.defined("options.positions",t.positions),new W({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})},W.pack=function(t,e,o){return Y.typeOf.object("value",t),Y.defined("array",e),o=o??0,o=L.packPolygonHierarchy(t._polygonHierarchy,e,o,c),S.pack(t._ellipsoid,e,o),o+=S.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++]=t._offsetAttribute??-1,e[o++]=t._arcType,P(t._textureCoordinates)?o=L.packPolygonHierarchy(t._textureCoordinates,e,o,O):e[o++]=-1,e[o++]=t.packedLength,e};var Qt=S.clone(S.UNIT_SPHERE),Zt=new q,Kt={polygonHierarchy:{}};W.unpack=function(t,e,o){Y.defined("array",t),e=e??0;let i=L.unpackPolygonHierarchy(t,e,c);e=i.startingIndex,delete i.startingIndex;let n=S.unpack(t,e,Qt);e+=S.packedLength;let r=q.unpack(t,e,Zt);e+=q.packedLength;let a=t[e++],s=t[e++],l=t[e++],u=t[e++],h=1===t[e++],p=1===t[e++],g=1===t[e++],m=1===t[e++],d=1===t[e++],f=t[e++],y=t[e++],_=-1===t[e]?void 0:L.unpackPolygonHierarchy(t,e,O);P(_)?(e=_.startingIndex,delete _.startingIndex):e++;let b=t[e++];return P(o)||(o=new W(Kt)),o._polygonHierarchy=i,o._ellipsoid=S.clone(n,o._ellipsoid),o._vertexFormat=q.clone(r,o._vertexFormat),o._height=a,o._extrudedHeight=s,o._granularity=l,o._stRotation=u,o._perPositionHeightExtrude=h,o._perPositionHeight=p,o._closeTop=g,o._closeBottom=m,o._shadowVolume=d,o._offsetAttribute=-1===f?void 0:f,o._arcType=y,o._textureCoordinates=_,o.packedLength=b,o};var Jt=new O,Xt=new O,$t=new z;function xt(t,e,o,i,n,r){let a=t.longitude,s=a>=0?a:a+l.TWO_PI;n.westOverIdl=Math.min(n.westOverIdl,s),n.eastOverIdl=Math.max(n.eastOverIdl,s),r.west=Math.min(r.west,a),r.east=Math.max(r.east,a);let c=t.getLatitude(o),u=c;if(r.south=Math.min(r.south,c),r.north=Math.max(r.north,c),i!==st.RHUMB){let i=O.subtract(e.position,t.position,Jt),n=O.dot(e.position,i)/O.dot(i,i);if(n>0&&n<1){let t=O.add(e.position,O.multiplyByScalar(i,-n,i),Xt),a=z.clone(e,$t);a.position=t;let s=a.getLatitude(o);r.south=Math.min(r.south,s),r.north=Math.max(r.north,s),Math.abs(c)>Math.abs(s)&&(u=s)}}let h=e.x*t.y-t.x*e.y,p=Math.sign(h);0!==p&&(p*=O.angleBetween(e.position,t.position)),u>=0&&(n.northAngle+=p),u<=0&&(n.southAngle+=p)}var Ct=new z,te=new z,U={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};W.computeRectangleFromPositions=function(t,e,o,i){if(Y.defined("positions",t),P(i)||(i=new _t),t.length<3)return i;i.west=Number.POSITIVE_INFINITY,i.east=Number.NEGATIVE_INFINITY,i.south=Number.POSITIVE_INFINITY,i.north=Number.NEGATIVE_INFINITY,U.northAngle=0,U.southAngle=0,U.westOverIdl=Number.POSITIVE_INFINITY,U.eastOverIdl=Number.NEGATIVE_INFINITY;let n=t.length,r=z.fromCartesian(t[0],te);for(let a=1;a<n;a++){let n=z.fromCartesian(t[a],Ct);xt(n,r,e,o,U,i),r=z.clone(n,r)}return xt(z.fromCartesian(t[0],Ct),r,e,o,U,i),i.east-i.west>U.eastOverIdl-U.westOverIdl&&(i.west=U.westOverIdl,i.east=U.eastOverIdl,i.east>l.PI&&(i.east=i.east-l.TWO_PI),i.west>l.PI&&(i.west=i.west-l.TWO_PI)),l.equalsEpsilon(Math.abs(U.northAngle),l.TWO_PI,l.EPSILON10)&&(i.north=l.PI_OVER_TWO,i.east=l.PI,i.west=-l.PI),l.equalsEpsilon(Math.abs(U.southAngle),l.TWO_PI,l.EPSILON10)&&(i.south=-l.PI_OVER_TWO,i.east=l.PI,i.west=-l.PI),i};var ee=new z;function oe(t,e,o){return t.height>=l.PI||t.width>=l.PI?z.fromCartesian(e[0],ee).tangentPlane:Z.fromPoints(e,o)}var Nt=new et;function ne(t,e,o){return(i,n)=>{if(t.height>=l.PI||t.width>=l.PI){if(t.south<0&&t.north>0){P(n)||(n=[]);for(let t=0;t<i.length;++t){let e=o.cartesianToCartographic(i[t],Nt);n[t]=new O(e.longitude/l.PI,e.latitude/l.PI_OVER_TWO)}return n.length=i.length,n}return z.fromCartesianArray(i,n)}return Z.fromPoints(e,o).projectPointsOntoPlane(i,n)}}function ie(t,e,o){if(t.height>=l.PI||t.width>=l.PI)return(e,i)=>{if(t.south<0&&t.north>0){let t=o.cartesianToCartographic(e,Nt);return P(i)||(i=new O),i.x=t.longitude/l.PI,i.y=t.latitude/l.PI_OVER_TWO,i}return z.fromCartesian(e,i)};let i=Z.fromPoints(e,o);return(t,e)=>i.projectPointsOntoPlane(t,e)}function re(t,e,o,i){return(n,r)=>!i&&(t.height>=l.PI_OVER_TWO||t.width>=2*l.PI_OVER_THREE)?L.splitPolygonsOnEquator(n,e,o,r):n}function se(t,e,o,i){if(e.height>=l.PI||e.width>=l.PI)return mt.fromRectangle(e,void 0,Et);let n=t,r=Z.fromPoints(n,o);return L.computeBoundingRectangle(r.plane.normal,r.projectPointOntoPlane.bind(r),n,i,Et)}function ae(t){let e=-t._stRotation;if(0===e)return[0,0,0,1,1,0];let o=t._ellipsoid,i=t._polygonHierarchy.positions,n=t.rectangle;return ut._textureCoordinateRotationPoints(i,e,o,n)}W.createGeometry=function(t){let e=t._vertexFormat,o=t._ellipsoid,i=t._granularity,n=t._stRotation,r=t._polygonHierarchy,a=t._perPositionHeight,s=t._closeTop,c=t._closeBottom,u=t._arcType,h=t._textureCoordinates,p=P(h),g=r.positions;if(g.length<3)return;let m=t.rectangle,d=L.polygonsFromHierarchy(r,p,ne(m,g,o),!a,o,re(m,o,u,a)),f=d.hierarchy,y=d.polygons,_=p?L.polygonsFromHierarchy(h,!0,(function(t){return t}),!1,o).polygons:void 0;if(0===f.length)return;let O,b=f[0].outerRing,T=se(b,m,o,n),w=[],I=t._height,A=t._extrudedHeight,E=t._perPositionHeightExtrude||!l.equalsEpsilon(I,A,0,l.EPSILON2),v={perPositionHeight:a,vertexFormat:e,geometry:void 0,rotationAxis:oe(m,b,o).plane.normal,projectTo2d:ie(m,b,o),boundingRectangle:T,ellipsoid:o,stRotation:n,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:u};if(E)for(v.extrude=!0,v.top=s,v.bottom=c,v.shadowVolume=t._shadowVolume,v.offsetAttribute=t._offsetAttribute,O=0;O<y.length;O++){let t,n=qt(o,y[O],p?_[O]:void 0,i,f[O],a,s,c,e,u);s&&c?(t=n.topAndBottom,v.geometry=L.scaleToGeodeticHeightExtruded(t.geometry,I,A,o,a)):s?(t=n.topAndBottom,t.geometry.attributes.position.values=ot.scaleToGeodeticHeight(t.geometry.attributes.position.values,I,o,!a),v.geometry=t.geometry):c&&(t=n.topAndBottom,t.geometry.attributes.position.values=ot.scaleToGeodeticHeight(t.geometry.attributes.position.values,A,o,!0),v.geometry=t.geometry),(s||c)&&(v.wall=!1,t.geometry=gt(v),w.push(t));let r=n.walls;v.wall=!0;for(let t=0;t<r.length;t++){let e=r[t];v.geometry=L.scaleToGeodeticHeightExtruded(e.geometry,I,A,o,a),e.geometry=gt(v),w.push(e)}}else for(O=0;O<y.length;O++){let n=new rt({geometry:L.createGeometryFromPositions(o,y[O],p?_[O]:void 0,i,a,e,u)});if(n.geometry.attributes.position.values=ot.scaleToGeodeticHeight(n.geometry.attributes.position.values,I,o,!a),v.geometry=n.geometry,n.geometry=gt(v),P(t._offsetAttribute)){let e=n.geometry.attributes.position.values.length,o=t._offsetAttribute===lt.NONE?0:1,i=new Uint8Array(e/3).fill(o);n.geometry.attributes.applyOffset=new $({componentDatatype:X.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}w.push(n)}let x=bt.combineInstances(w)[0];x.attributes.position.values=new Float64Array(x.attributes.position.values),x.indices=ct.createTypedArray(x.attributes.position.values.length/3,x.indices);let N=x.attributes,H=Tt.fromVertices(N.position.values);return e.position||delete N.position,new ut({attributes:N,indices:x.indices,primitiveType:x.primitiveType,boundingSphere:H,offsetAttribute:t._offsetAttribute})},W.createShadowVolume=function(t,e,o){let i=t._granularity,n=t._ellipsoid,r=e(i,n),a=o(i,n);return new W({polygonHierarchy:t._polygonHierarchy,ellipsoid:n,stRotation:t._stRotation,granularity:i,perPositionHeight:!1,extrudedHeight:r,height:a,vertexFormat:q.POSITION_ONLY,shadowVolume:!0,arcType:t._arcType})},Object.defineProperties(W.prototype,{rectangle:{get:function(){if(!P(this._rectangle)){let t=this._polygonHierarchy.positions;this._rectangle=W.computeRectangleFromPositions(t,this._ellipsoid,this._arcType)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return P(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=ae(this)),this._textureCoordinateRotationPoints}}});var pt=W;function ce(t,e){return P(e)&&(t=pt.unpack(t,e)),t._ellipsoid=S.clone(t._ellipsoid),pt.createGeometry(t)}var Xe=ce;export{Xe as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.143.0
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -22,4 +22,4 @@
|
|
|
22
22
|
* Portions licensed separately.
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
import{a}from"./chunk-IEITL4VO.js";import{a as P}from"./chunk-AJH5KBOO.js";import{a as F}from"./chunk-XRJOFXJF.js";import{a as V}from"./chunk-QNPYEODC.js";import"./chunk-G72JFEXW.js";import"./chunk-6W2XFGWI.js";import{a as C}from"./chunk-ML6MR2RA.js";import{a as M}from"./chunk-BDWA46XV.js";import"./chunk-5VFNV3LW.js";import{a as W,b as D}from"./chunk-TCOMWBL2.js";import"./chunk-G2QPRBZU.js";import"./chunk-37ETYCYM.js";import"./chunk-SRA5MBUT.js";import"./chunk-5AAMOBJK.js";import{a as G}from"./chunk-4WQ4VT5S.js";import{a as B}from"./chunk-6EINM7EY.js";import{b as U,c as S,d as w}from"./chunk-A4I25VN7.js";import{c as x}from"./chunk-D3TVNJ6W.js";import"./chunk-3VUCSHGU.js";import"./chunk-LNJEJFV5.js";import"./chunk-BPABSUDY.js";import{a as T}from"./chunk-ATKJRN2G.js";import"./chunk-RDX4QSUS.js";import"./chunk-G3GDHHWO.js";import{c as y}from"./chunk-2AIOP76V.js";import{a as v,c as j}from"./chunk-IAE6APK2.js";import{a as L}from"./chunk-3E7FIXV7.js";import{a as N,b as O}from"./chunk-NZBME2JK.js";import{f as E}from"./chunk-6DLS2UKD.js";var Y=[],k=[];function K(e,t,i,r,o){let n=M.fromPoints(t,e).projectPointsOntoPlane(t,Y);D.computeWindingOrder2D(n)===W.CLOCKWISE&&(n.reverse(),t=t.slice().reverse());let s,p,u=t.length,h=0;if(r)for(s=new Float64Array(2*u*3),p=0;p<u;p++){let e=t[p],i=t[(p+1)%u];s[h++]=e.x,s[h++]=e.y,s[h++]=e.z,s[h++]=i.x,s[h++]=i.y,s[h++]=i.z}else{let r=0;if(o===P.GEODESIC)for(p=0;p<u;p++)r+=a.subdivideLineCount(t[p],t[(p+1)%u],i);else if(o===P.RHUMB)for(p=0;p<u;p++)r+=a.subdivideRhumbLineCount(e,t[p],t[(p+1)%u],i);for(s=new Float64Array(3*r),p=0;p<u;p++){let r;o===P.GEODESIC?r=a.subdivideLine(t[p],t[(p+1)%u],i,k):o===P.RHUMB&&(r=a.subdivideRhumbLine(e,t[p],t[(p+1)%u],i,k));let n=r.length;for(let e=0;e<n;++e)s[h++]=r[e]}}u=s.length/3;let l=2*u,c=G.createTypedArray(u,l);for(h=0,p=0;p<u-1;p++)c[h++]=p,c[h++]=p+1;return c[h++]=u-1,c[h++]=0,new F({geometry:new S({attributes:new B({position:new w({componentDatatype:T.DOUBLE,componentsPerAttribute:3,values:s})}),indices:c,primitiveType:U.LINES})})}function q(e,t,i,r,o){let n=M.fromPoints(t,e).projectPointsOntoPlane(t,Y);D.computeWindingOrder2D(n)===W.CLOCKWISE&&(n.reverse(),t=t.slice().reverse());let s,p,u=t.length,h=new Array(u),l=0;if(r)for(s=new Float64Array(2*u*3*2),p=0;p<u;++p){h[p]=l/3;let e=t[p],i=t[(p+1)%u];s[l++]=e.x,s[l++]=e.y,s[l++]=e.z,s[l++]=i.x,s[l++]=i.y,s[l++]=i.z}else{let r=0;if(o===P.GEODESIC)for(p=0;p<u;p++)r+=a.subdivideLineCount(t[p],t[(p+1)%u],i);else if(o===P.RHUMB)for(p=0;p<u;p++)r+=a.subdivideRhumbLineCount(e,t[p],t[(p+1)%u],i);for(s=new Float64Array(3*r*2),p=0;p<u;++p){let r;h[p]=l/3,o===P.GEODESIC?r=a.subdivideLine(t[p],t[(p+1)%u],i,k):o===P.RHUMB&&(r=a.subdivideRhumbLine(e,t[p],t[(p+1)%u],i,k));let n=r.length;for(let e=0;e<n;++e)s[l++]=r[e]}}u=s.length/6;let c=h.length,y=2*(2*u+c),f=G.createTypedArray(u+c,y);for(l=0,p=0;p<u;++p)f[l++]=p,f[l++]=(p+1)%u,f[l++]=p+u,f[l++]=(p+1)%u+u;for(p=0;p<c;p++){let e=h[p];f[l++]=e,f[l++]=e+u}return new F({geometry:new S({attributes:new B({position:new w({componentDatatype:T.DOUBLE,componentsPerAttribute:3,values:s})}),indices:f,primitiveType:U.LINES})})}function A(e){if(O.typeOf.object("options",e),O.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e.perPositionHeight&&E(e.height))throw new N("Cannot use both options.perPositionHeight and options.height");if(E(e.arcType)&&e.arcType!==P.GEODESIC&&e.arcType!==P.RHUMB)throw new N("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let t=e.polygonHierarchy,i=e.ellipsoid??y.default,r=e.granularity??L.RADIANS_PER_DEGREE,o=e.perPositionHeight??!1,n=o&&E(e.extrudedHeight),s=e.arcType??P.GEODESIC,p=e.height??0,u=e.extrudedHeight??p;if(!n){let e=Math.max(p,u);u=Math.min(p,u),p=e}this._ellipsoid=y.clone(i),this._granularity=r,this._height=p,this._extrudedHeight=u,this._arcType=s,this._polygonHierarchy=t,this._perPositionHeight=o,this._perPositionHeightExtrude=n,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=a.computeHierarchyPackedLength(t,v)+y.packedLength+8}A.pack=function(e,t,i){return O.typeOf.object("value",e),O.defined("array",t),i=i??0,i=a.packPolygonHierarchy(e._polygonHierarchy,t,i,v),y.pack(e._ellipsoid,t,i),i+=y.packedLength,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._granularity,t[i++]=e._perPositionHeightExtrude?1:0,t[i++]=e._perPositionHeight?1:0,t[i++]=e._arcType,t[i++]=e._offsetAttribute??-1,t[i]=e.packedLength,t};var J=y.clone(y.UNIT_SPHERE),Q={polygonHierarchy:{}};A.unpack=function(e,t,i){O.defined("array",e),t=t??0;let r=a.unpackPolygonHierarchy(e,t,v);t=r.startingIndex,delete r.startingIndex;let o=y.unpack(e,t,J);t+=y.packedLength;let n=e[t++],s=e[t++],p=e[t++],u=1===e[t++],h=1===e[t++],l=e[t++],c=e[t++],f=e[t];return E(i)||(i=new A(Q)),i._polygonHierarchy=r,i._ellipsoid=y.clone(o,i._ellipsoid),i._height=n,i._extrudedHeight=s,i._granularity=p,i._perPositionHeight=h,i._perPositionHeightExtrude=u,i._arcType=l,i._offsetAttribute=-1===c?void 0:c,i.packedLength=f,i},A.fromPositions=function(e){return e=e??j.EMPTY_OBJECT,O.defined("options.positions",e.positions),new A({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})},A.createGeometry=function(e){let t=e._ellipsoid,i=e._granularity,r=e._polygonHierarchy,o=e._perPositionHeight,n=e._arcType,s=a.polygonOutlinesFromHierarchy(r,!o,t);if(0===s.length)return;let p,u,h,l=[],c=L.chordLength(i,t.maximumRadius),y=e._height,f=e._extrudedHeight;if(e._perPositionHeightExtrude||!L.equalsEpsilon(y,f,0,L.EPSILON2))for(h=0;h<s.length;h++){if(p=q(t,s[h],c,o,n),p.geometry=a.scaleToGeodeticHeightExtruded(p.geometry,y,f,t,o),E(e._offsetAttribute)){let t=p.geometry.attributes.position.values.length/3,i=new Uint8Array(t);e._offsetAttribute===C.TOP?i=i.fill(1,0,t/2):(u=e._offsetAttribute===C.NONE?0:1,i=i.fill(u)),p.geometry.attributes.applyOffset=new w({componentDatatype:T.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}l.push(p)}else for(h=0;h<s.length;h++){if(p=K(t,s[h],c,o,n),p.geometry.attributes.position.values=D.scaleToGeodeticHeight(p.geometry.attributes.position.values,y,t,!o),E(e._offsetAttribute)){let t=p.geometry.attributes.position.values.length;u=e._offsetAttribute===C.NONE?0:1;let i=new Uint8Array(t/3).fill(u);p.geometry.attributes.applyOffset=new w({componentDatatype:T.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}l.push(p)}let m=V.combineInstances(l)[0],d=x.fromVertices(m.attributes.position.values);return new S({attributes:m.attributes,indices:m.indices,primitiveType:m.primitiveType,boundingSphere:d,offsetAttribute:e._offsetAttribute})};var z=A;function X(e,t){return E(t)&&(e=z.unpack(e,t)),e._ellipsoid=y.clone(e._ellipsoid),z.createGeometry(e)}var Oe=X;export{Oe as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.143.0
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -22,4 +22,4 @@
|
|
|
22
22
|
* Portions licensed separately.
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
import{a as m}from"./chunk-QJTXFT4R.js";import{a as R}from"./chunk-AJH5KBOO.js";import{a as N}from"./chunk-6AEO73KW.js";import"./chunk-WGIRJIIK.js";import{a as g}from"./chunk-AKELQO2L.js";import{a as le}from"./chunk-G2QPRBZU.js";import"./chunk-37ETYCYM.js";import"./chunk-SRA5MBUT.js";import"./chunk-5AAMOBJK.js";import{a as se}from"./chunk-4WQ4VT5S.js";import{a as ce}from"./chunk-6EINM7EY.js";import{a as ne,b as re,c as ie,d as x}from"./chunk-A4I25VN7.js";import{c as oe}from"./chunk-D3TVNJ6W.js";import"./chunk-3VUCSHGU.js";import"./chunk-LNJEJFV5.js";import"./chunk-BPABSUDY.js";import{a as V}from"./chunk-ATKJRN2G.js";import"./chunk-RDX4QSUS.js";import"./chunk-G3GDHHWO.js";import{c as u}from"./chunk-2AIOP76V.js";import{a as p,c as te}from"./chunk-IAE6APK2.js";import{a as j}from"./chunk-3E7FIXV7.js";import{a as F}from"./chunk-NZBME2JK.js";import{f as h}from"./chunk-6DLS2UKD.js";var me=[];function Ae(e,t,r,o,n){let a=me;a.length=n;let i,s=r.red,l=r.green,p=r.blue,c=r.alpha,h=o.red,u=o.green,d=o.blue,f=o.alpha;if(m.equals(r,o)){for(i=0;i<n;i++)a[i]=m.clone(r);return a}let g=(h-s)/n,k=(u-l)/n,w=(d-p)/n,y=(f-c)/n;for(i=0;i<n;i++)a[i]=new m(s+i*g,l+i*k,p+i*w,c+i*y);return a}function q(e){let t=(e=e??te.EMPTY_OBJECT).positions,r=e.colors,o=e.width??1,n=e.colorsPerVertex??!1;if(!h(t)||t.length<2)throw new F("At least two positions are required.");if("number"!=typeof o)throw new F("width must be a number");if(h(r)&&(n&&r.length<t.length||!n&&r.length<t.length-1))throw new F("colors has an invalid length.");this._positions=t,this._colors=r,this._width=o,this._colorsPerVertex=n,this._vertexFormat=g.clone(e.vertexFormat??g.DEFAULT),this._arcType=e.arcType??R.GEODESIC,this._granularity=e.granularity??j.RADIANS_PER_DEGREE,this._ellipsoid=u.clone(e.ellipsoid??u.default),this._workerName="createPolylineGeometry";let a=1+t.length*p.packedLength;a+=h(r)?1+r.length*m.packedLength:1,this.packedLength=a+u.packedLength+g.packedLength+4}q.pack=function(e,t,r){if(!h(e))throw new F("value is required");if(!h(t))throw new F("array is required");r=r??0;let o,n=e._positions,a=n.length;for(t[r++]=a,o=0;o<a;++o,r+=p.packedLength)p.pack(n[o],t,r);let i=e._colors;for(a=h(i)?i.length:0,t[r++]=a,o=0;o<a;++o,r+=m.packedLength)m.pack(i[o],t,r);return u.pack(e._ellipsoid,t,r),r+=u.packedLength,g.pack(e._vertexFormat,t,r),r+=g.packedLength,t[r++]=e._width,t[r++]=e._colorsPerVertex?1:0,t[r++]=e._arcType,t[r]=e._granularity,t};var de=u.clone(u.UNIT_SPHERE),ue=new g,O={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,t,r){if(!h(e))throw new F("array is required");t=t??0;let o,n=e[t++],a=new Array(n);for(o=0;o<n;++o,t+=p.packedLength)a[o]=p.unpack(e,t);n=e[t++];let i=n>0?new Array(n):void 0;for(o=0;o<n;++o,t+=m.packedLength)i[o]=m.unpack(e,t);let s=u.unpack(e,t,de);t+=u.packedLength;let l=g.unpack(e,t,ue);t+=g.packedLength;let c=e[t++],d=1===e[t++],f=e[t++],k=e[t];return h(r)?(r._positions=a,r._colors=i,r._ellipsoid=u.clone(s,r._ellipsoid),r._vertexFormat=g.clone(l,r._vertexFormat),r._width=c,r._colorsPerVertex=d,r._arcType=f,r._granularity=k,r):(O.positions=a,O.colors=i,O.width=c,O.colorsPerVertex=d,O.arcType=f,O.granularity=k,new q(O))};var pe=new p,ae=new p,fe=new p,he=new p;q.createGeometry=function(e){let t,r,o,n=e._width,a=e._vertexFormat,i=e._colors,s=e._colorsPerVertex,l=e._arcType,c=e._granularity,u=e._ellipsoid,d=[],f=le(e._positions,p.equalsEpsilon,!1,d);if(h(i)&&d.length>0){let e=0,t=d[0];i=i.filter((function(r,o){let n=!1;return n=s?o===t||0===o&&1===t:o+1===t,!n||(e++,t=d[e],!1)}))}let g=f.length;if(g<2||n<=0)return;if(l===R.GEODESIC||l===R.RHUMB){let e,o;l===R.GEODESIC?(e=j.chordLength(c,u.maximumRadius),o=N.numberOfPoints):(e=c,o=N.numberOfPointsRhumbLine);let n=N.extractHeights(f,u);if(h(i)){let n=1;for(t=0;t<g-1;++t)n+=o(f[t],f[t+1],e);let a=new Array(n),l=0;for(t=0;t<g-1;++t){let p=f[t],c=f[t+1],h=i[t],u=o(p,c,e);if(s&&t<n){let e=Ae(p,c,h,i[t+1],u),o=e.length;for(r=0;r<o;++r)a[l++]=e[r]}else for(r=0;r<u;++r)a[l++]=m.clone(h)}a[l]=m.clone(i[i.length-1]),i=a,me.length=0}f=l===R.GEODESIC?N.generateCartesianArc({positions:f,minDistance:e,ellipsoid:u,height:n}):N.generateCartesianRhumbArc({positions:f,granularity:e,ellipsoid:u,height:n})}g=f.length;let k,w=4*g-4,y=new Float64Array(3*w),_=new Float64Array(3*w),A=new Float64Array(3*w),E=new Float32Array(2*w),v=a.st?new Float32Array(2*w):void 0,T=h(i)?new Uint8Array(4*w):void 0,L=0,O=0,P=0,F=0;for(r=0;r<g;++r){let e,t;0===r?(k=pe,p.subtract(f[0],f[1],k),p.add(f[0],k,k)):k=f[r-1],p.clone(k,fe),p.clone(f[r],ae),r===g-1?(k=pe,p.subtract(f[g-1],f[g-2],k),p.add(f[g-1],k,k)):k=f[r+1],p.clone(k,he),h(T)&&(e=0===r||s?i[r]:i[r-1],r!==g-1&&(t=i[r]));let l=r===g-1?2:4;for(o=0===r?2:0;o<l;++o){p.pack(ae,y,L),p.pack(fe,_,L),p.pack(he,A,L),L+=3;let i=o-2<0?-1:1;if(E[O++]=o%2*2-1,E[O++]=i*n,a.st&&(v[P++]=r/(g-1),v[P++]=Math.max(E[O-2],0)),h(T)){let r=o<2?e:t;T[F++]=m.floatToByte(r.red),T[F++]=m.floatToByte(r.green),T[F++]=m.floatToByte(r.blue),T[F++]=m.floatToByte(r.alpha)}}}let D=new ce;D.position=new x({componentDatatype:V.DOUBLE,componentsPerAttribute:3,values:y}),D.prevPosition=new x({componentDatatype:V.DOUBLE,componentsPerAttribute:3,values:_}),D.nextPosition=new x({componentDatatype:V.DOUBLE,componentsPerAttribute:3,values:A}),D.expandAndWidth=new x({componentDatatype:V.FLOAT,componentsPerAttribute:2,values:E}),a.st&&(D.st=new x({componentDatatype:V.FLOAT,componentsPerAttribute:2,values:v})),h(T)&&(D.color=new x({componentDatatype:V.UNSIGNED_BYTE,componentsPerAttribute:4,values:T,normalize:!0}));let b=se.createTypedArray(w,6*g-6),B=0,I=0,S=g-1;for(r=0;r<S;++r)b[I++]=B,b[I++]=B+2,b[I++]=B+1,b[I++]=B+1,b[I++]=B+2,b[I++]=B+3,B+=4;return new ie({attributes:D,indices:b,primitiveType:re.TRIANGLES,boundingSphere:oe.fromPoints(f),geometryType:ne.POLYLINES})};var J=q;function ge(e,t){return h(t)&&(e=J.unpack(e,t)),e._ellipsoid=u.clone(e._ellipsoid),J.createGeometry(e)}var We=ge;export{We as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.143.0
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -22,4 +22,4 @@
|
|
|
22
22
|
* Portions licensed separately.
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
import{a as W}from"./chunk-UA7PAMQQ.js";import{a as U}from"./chunk-QNPYEODC.js";import"./chunk-G72JFEXW.js";import"./chunk-6W2XFGWI.js";import{a as x,b as I,c as j}from"./chunk-LHBFSFJE.js";import"./chunk-6AEO73KW.js";import"./chunk-WGIRJIIK.js";import{a as g}from"./chunk-AKELQO2L.js";import"./chunk-BDWA46XV.js";import"./chunk-5VFNV3LW.js";import{a as $,b as M}from"./chunk-TCOMWBL2.js";import{a as Z}from"./chunk-G2QPRBZU.js";import"./chunk-37ETYCYM.js";import"./chunk-SRA5MBUT.js";import"./chunk-5AAMOBJK.js";import{a as X}from"./chunk-4WQ4VT5S.js";import{a as Q}from"./chunk-6EINM7EY.js";import{b as V,c as Y,d as B}from"./chunk-A4I25VN7.js";import{c as K}from"./chunk-D3TVNJ6W.js";import"./chunk-3VUCSHGU.js";import"./chunk-LNJEJFV5.js";import"./chunk-BPABSUDY.js";import{a as N}from"./chunk-ATKJRN2G.js";import"./chunk-RDX4QSUS.js";import"./chunk-G3GDHHWO.js";import{b as D,c as f}from"./chunk-2AIOP76V.js";import{a as E,c as J}from"./chunk-IAE6APK2.js";import{a as H}from"./chunk-3E7FIXV7.js";import{a as A}from"./chunk-NZBME2JK.js";import{f as _}from"./chunk-6DLS2UKD.js";function oe(e,t,n,o){let r=new Q;o.position&&(r.position=new B({componentDatatype:N.DOUBLE,componentsPerAttribute:3,values:e}));let i,a,s,p,c,l,u=t.length,h=e.length/3,m=(h-2*u)/(2*u),f=M.triangulate(t),g=(m-1)*u*6+2*f.length,k=X.createTypedArray(h,g),d=2*u,y=0;for(i=0;i<m-1;i++){for(a=0;a<u-1;a++)s=2*a+i*u*2,l=s+d,p=s+1,c=p+d,k[y++]=p,k[y++]=s,k[y++]=c,k[y++]=c,k[y++]=s,k[y++]=l;s=2*u-2+i*u*2,p=s+1,c=p+d,l=s+d,k[y++]=p,k[y++]=s,k[y++]=c,k[y++]=c,k[y++]=s,k[y++]=l}if(o.st||o.tangent||o.bitangent){let e,o,s=new Float32Array(2*h),p=1/(m-1),c=1/n.height,l=n.height/2,f=0;for(i=0;i<m;i++){for(e=i*p,o=c*(t[0].y+l),s[f++]=e,s[f++]=o,a=1;a<u;a++)o=c*(t[a].y+l),s[f++]=e,s[f++]=o,s[f++]=e,s[f++]=o;o=c*(t[0].y+l),s[f++]=e,s[f++]=o}for(a=0;a<u;a++)e=0,o=c*(t[a].y+l),s[f++]=e,s[f++]=o;for(a=0;a<u;a++)e=(m-1)*p,o=c*(t[a].y+l),s[f++]=e,s[f++]=o;r.st=new B({componentDatatype:N.FLOAT,componentsPerAttribute:2,values:new Float32Array(s)})}let _=h-2*u;for(i=0;i<f.length;i+=3){let e=f[i]+_,t=f[i+1]+_,n=f[i+2]+_;k[y++]=e,k[y++]=t,k[y++]=n,k[y++]=n+u,k[y++]=t+u,k[y++]=e+u}let j=new Y({attributes:r,indices:k,boundingSphere:K.fromVertices(e),primitiveType:V.TRIANGLES});if(o.normal&&(j=U.computeNormal(j)),o.tangent||o.bitangent){try{j=U.computeTangentAndBitangent(j)}catch{I("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}o.tangent||(j.attributes.tangent=void 0),o.bitangent||(j.attributes.bitangent=void 0),o.st||(j.attributes.st=void 0)}return j}function v(e){let t=(e=e??J.EMPTY_OBJECT).polylinePositions,n=e.shapePositions;if(!_(t))throw new A("options.polylinePositions is required.");if(!_(n))throw new A("options.shapePositions is required.");this._positions=t,this._shape=n,this._ellipsoid=f.clone(e.ellipsoid??f.default),this._cornerType=e.cornerType??x.ROUNDED,this._vertexFormat=g.clone(e.vertexFormat??g.DEFAULT),this._granularity=e.granularity??H.RADIANS_PER_DEGREE,this._workerName="createPolylineVolumeGeometry";let o=1+t.length*E.packedLength;o+=1+n.length*D.packedLength,this.packedLength=o+f.packedLength+g.packedLength+2}v.pack=function(e,t,n){if(!_(e))throw new A("value is required");if(!_(t))throw new A("array is required");n=n??0;let o,r=e._positions,i=r.length;for(t[n++]=i,o=0;o<i;++o,n+=E.packedLength)E.pack(r[o],t,n);let a=e._shape;for(i=a.length,t[n++]=i,o=0;o<i;++o,n+=D.packedLength)D.pack(a[o],t,n);return f.pack(e._ellipsoid,t,n),n+=f.packedLength,g.pack(e._vertexFormat,t,n),n+=g.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};var ee=f.clone(f.UNIT_SPHERE),te=new g,S={polylinePositions:void 0,shapePositions:void 0,ellipsoid:ee,vertexFormat:te,cornerType:void 0,granularity:void 0};v.unpack=function(e,t,n){if(!_(e))throw new A("array is required");t=t??0;let o,r=e[t++],i=new Array(r);for(o=0;o<r;++o,t+=E.packedLength)i[o]=E.unpack(e,t);r=e[t++];let a=new Array(r);for(o=0;o<r;++o,t+=D.packedLength)a[o]=D.unpack(e,t);let s=f.unpack(e,t,ee);t+=f.packedLength;let p=g.unpack(e,t,te);t+=g.packedLength;let c=e[t++],l=e[t];return _(n)?(n._positions=i,n._shape=a,n._ellipsoid=f.clone(s,n._ellipsoid),n._vertexFormat=g.clone(p,n._vertexFormat),n._cornerType=c,n._granularity=l,n):(S.polylinePositions=i,S.shapePositions=a,S.cornerType=c,S.granularity=l,new v(S))};var ne=new W;v.createGeometry=function(e){let t=e._positions,n=Z(t,E.equalsEpsilon),o=e._shape;if(o=j.removeDuplicatesFromShape(o),n.length<2||o.length<3)return;M.computeWindingOrder2D(o)===$.CLOCKWISE&&o.reverse();let r=W.fromPoints(o,ne);return oe(j.computePositions(n,o,r,e,!0),o,r,e._vertexFormat)};var z=v;function ie(e,t){return _(t)&&(e=z.unpack(e,t)),e._ellipsoid=f.clone(e._ellipsoid),z.createGeometry(e)}var Re=ie;export{Re as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.143.0
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -22,4 +22,4 @@
|
|
|
22
22
|
* Portions licensed separately.
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
import{a as k}from"./chunk-UA7PAMQQ.js";import{a as N,c as w}from"./chunk-LHBFSFJE.js";import"./chunk-6AEO73KW.js";import"./chunk-WGIRJIIK.js";import"./chunk-BDWA46XV.js";import"./chunk-5VFNV3LW.js";import{a as v,b as G}from"./chunk-TCOMWBL2.js";import{a as q}from"./chunk-G2QPRBZU.js";import"./chunk-37ETYCYM.js";import"./chunk-SRA5MBUT.js";import"./chunk-5AAMOBJK.js";import{a as g}from"./chunk-4WQ4VT5S.js";import{a as O}from"./chunk-6EINM7EY.js";import{b as A,c as R,d as S}from"./chunk-A4I25VN7.js";import{c as C}from"./chunk-D3TVNJ6W.js";import"./chunk-3VUCSHGU.js";import"./chunk-LNJEJFV5.js";import"./chunk-BPABSUDY.js";import{a as b}from"./chunk-ATKJRN2G.js";import"./chunk-RDX4QSUS.js";import"./chunk-G3GDHHWO.js";import{b as y,c as s}from"./chunk-2AIOP76V.js";import{a as d,c as D}from"./chunk-IAE6APK2.js";import{a as T}from"./chunk-3E7FIXV7.js";import{a}from"./chunk-NZBME2JK.js";import{f as u}from"./chunk-6DLS2UKD.js";function W(e,o){let r=new O;r.position=new S({componentDatatype:b.DOUBLE,componentsPerAttribute:3,values:e});let i,t,n=o.length,s=r.position.values.length/3,a=e.length/3/n,p=g.createTypedArray(s,2*n*(a+1)),c=0;i=0;let u=i*n;for(t=0;t<n-1;t++)p[c++]=t+u,p[c++]=t+u+1;for(p[c++]=n-1+u,p[c++]=u,i=a-1,u=i*n,t=0;t<n-1;t++)p[c++]=t+u,p[c++]=t+u+1;for(p[c++]=n-1+u,p[c++]=u,i=0;i<a-1;i++){let e=n*i,o=e+n;for(t=0;t<n;t++)p[c++]=t+e,p[c++]=t+o}return new R({attributes:r,indices:g.createTypedArray(s,p),boundingSphere:C.fromVertices(e),primitiveType:A.LINES})}function P(e){let o=(e=e??D.EMPTY_OBJECT).polylinePositions,r=e.shapePositions;if(!u(o))throw new a("options.polylinePositions is required.");if(!u(r))throw new a("options.shapePositions is required.");this._positions=o,this._shape=r,this._ellipsoid=s.clone(e.ellipsoid??s.default),this._cornerType=e.cornerType??N.ROUNDED,this._granularity=e.granularity??T.RADIANS_PER_DEGREE,this._workerName="createPolylineVolumeOutlineGeometry";let i=1+o.length*d.packedLength;i+=1+r.length*y.packedLength,this.packedLength=i+s.packedLength+2}P.pack=function(e,o,r){if(!u(e))throw new a("value is required");if(!u(o))throw new a("array is required");r=r??0;let i,t=e._positions,n=t.length;for(o[r++]=n,i=0;i<n;++i,r+=d.packedLength)d.pack(t[i],o,r);let p=e._shape;for(n=p.length,o[r++]=n,i=0;i<n;++i,r+=y.packedLength)y.pack(p[i],o,r);return s.pack(e._ellipsoid,o,r),r+=s.packedLength,o[r++]=e._cornerType,o[r]=e._granularity,o};var B=s.clone(s.UNIT_SPHERE),_={polylinePositions:void 0,shapePositions:void 0,ellipsoid:B,height:void 0,cornerType:void 0,granularity:void 0};P.unpack=function(e,o,r){if(!u(e))throw new a("array is required");o=o??0;let i,t=e[o++],n=new Array(t);for(i=0;i<t;++i,o+=d.packedLength)n[i]=d.unpack(e,o);t=e[o++];let p=new Array(t);for(i=0;i<t;++i,o+=y.packedLength)p[i]=y.unpack(e,o);let c=s.unpack(e,o,B);o+=s.packedLength;let h=e[o++],l=e[o];return u(r)?(r._positions=n,r._shape=p,r._ellipsoid=s.clone(c,r._ellipsoid),r._cornerType=h,r._granularity=l,r):(_.polylinePositions=n,_.shapePositions=p,_.cornerType=h,_.granularity=l,new P(_))};var F=new k;P.createGeometry=function(e){let o=e._positions,r=q(o,d.equalsEpsilon),i=e._shape;if(i=w.removeDuplicatesFromShape(i),r.length<2||i.length<3)return;G.computeWindingOrder2D(i)===v.CLOCKWISE&&i.reverse();let t=k.fromPoints(i,F);return W(w.computePositions(r,i,t,e,!1),i)};var E=P;function M(e,o){return u(o)&&(e=E.unpack(e,o)),e._ellipsoid=s.clone(e._ellipsoid),E.createGeometry(e)}var he=M;export{he as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.143.0
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -22,4 +22,4 @@
|
|
|
22
22
|
* Portions licensed separately.
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
|
-
define(["./defaultValue-97284df2","./Matrix2-73789715","./Transforms-d3d3b2a9","./RuntimeError-4f8ec8a2","./ComponentDatatype-e7fbe225","./GeometryAttribute-fd1d7e90","./GeometryAttributes-734a3446","./GeometryInstance-4bfcfe78","./GeometryOffsetAttribute-59b14f45","./GeometryPipeline-a847e31f","./IndexDatatype-65271ba3","./PolygonPipeline-00dc0c6e","./RectangleGeometryLibrary-cff60d30","./VertexFormat-9886cb81","./_commonjsHelpers-3aae1032-65601a27","./combine-d11b1f00","./WebGLConstants-6da700a2","./AttributeCompression-5744d52e","./EncodedCartesian3-a9a8a281","./IntersectionTests-33ace2d6","./Plane-e916220d","./EllipsoidRhumbLine-60f14314"],(function(t,e,n,a,o,r,i,s,l,u,c,m,d,p,g,y,f,h,b,_,A,x){"use strict";const w=new e.Cartesian3,C=new e.Cartesian3,v=new e.Cartesian3,R=new e.Cartesian3,E=new e.Rectangle,G=new e.Cartesian2,F=new n.BoundingSphere,P=new n.BoundingSphere;function V(t,e){const n=new r.Geometry({attributes:new i.GeometryAttributes,primitiveType:r.PrimitiveType.TRIANGLES});return n.attributes.position=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(n.attributes.normal=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(n.attributes.tangent=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(n.attributes.bitangent=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.bitangents})),n}const L=new e.Cartesian3,D=new e.Cartesian3;function M(t,n){const a=t._vertexFormat,i=t._ellipsoid,s=n.height,l=n.width,u=n.northCap,m=n.southCap;let p=0,g=s,y=s,f=0;u&&(p=1,y-=1,f+=1),m&&(g-=1,y-=1,f+=1),f+=l*y;const h=a.position?new Float64Array(3*f):void 0,b=a.st?new Float32Array(2*f):void 0;let _=0,A=0;const x=w,E=G;let F=Number.MAX_VALUE,P=Number.MAX_VALUE,L=-Number.MAX_VALUE,D=-Number.MAX_VALUE;for(let t=p;t<g;++t)for(let e=0;e<l;++e)d.RectangleGeometryLibrary.computePosition(n,i,a.st,t,e,x,E),h[_++]=x.x,h[_++]=x.y,h[_++]=x.z,a.st&&(b[A++]=E.x,b[A++]=E.y,F=Math.min(F,E.x),P=Math.min(P,E.y),L=Math.max(L,E.x),D=Math.max(D,E.y));if(u&&(d.RectangleGeometryLibrary.computePosition(n,i,a.st,0,0,x,E),h[_++]=x.x,h[_++]=x.y,h[_++]=x.z,a.st&&(b[A++]=E.x,b[A++]=E.y,F=E.x,P=E.y,L=E.x,D=E.y)),m&&(d.RectangleGeometryLibrary.computePosition(n,i,a.st,s-1,0,x,E),h[_++]=x.x,h[_++]=x.y,h[_]=x.z,a.st&&(b[A++]=E.x,b[A]=E.y,F=Math.min(F,E.x),P=Math.min(P,E.y),L=Math.max(L,E.x),D=Math.max(D,E.y))),a.st&&(F<0||P<0||L>1||D>1))for(let t=0;t<b.length;t+=2)b[t]=(b[t]-F)/(L-F),b[t+1]=(b[t+1]-P)/(D-P);const M=function(t,n,a,o){const r=t.length,i=n.normal?new Float32Array(r):void 0,s=n.tangent?new Float32Array(r):void 0,l=n.bitangent?new Float32Array(r):void 0;let u=0;const c=R,m=v;let d=C;if(n.normal||n.tangent||n.bitangent)for(let p=0;p<r;p+=3){const r=e.Cartesian3.fromArray(t,p,w),g=u+1,y=u+2;d=a.geodeticSurfaceNormal(r,d),(n.tangent||n.bitangent)&&(e.Cartesian3.cross(e.Cartesian3.UNIT_Z,d,m),e.Matrix3.multiplyByVector(o,m,m),e.Cartesian3.normalize(m,m),n.bitangent&&e.Cartesian3.normalize(e.Cartesian3.cross(d,m,c),c)),n.normal&&(i[u]=d.x,i[g]=d.y,i[y]=d.z),n.tangent&&(s[u]=m.x,s[g]=m.y,s[y]=m.z),n.bitangent&&(l[u]=c.x,l[g]=c.y,l[y]=c.z),u+=3}return V(n,{positions:t,normals:i,tangents:s,bitangents:l})}(h,a,i,n.tangentRotationMatrix);let T=6*(l-1)*(y-1);u&&(T+=3*(l-1)),m&&(T+=3*(l-1));const O=c.IndexDatatype.createTypedArray(f,T);let N,S=0,I=0;for(N=0;N<y-1;++N){for(let t=0;t<l-1;++t){const t=S,e=t+l,n=e+1,a=t+1;O[I++]=t,O[I++]=e,O[I++]=a,O[I++]=a,O[I++]=e,O[I++]=n,++S}++S}if(u||m){let t=f-1;const e=f-1;let n,a;if(u&&m&&(t=f-2),S=0,u)for(N=0;N<l-1;N++)n=S,a=n+1,O[I++]=t,O[I++]=n,O[I++]=a,++S;if(m)for(S=(y-1)*l,N=0;N<l-1;N++)n=S,a=n+1,O[I++]=n,O[I++]=e,O[I++]=a,++S}return M.indices=O,a.st&&(M.attributes.st=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:b})),M}function T(t,e,n,a,o){return t[e++]=a[n],t[e++]=a[n+1],t[e++]=a[n+2],t[e++]=o[n],t[e++]=o[n+1],t[e]=o[n+2],t}function O(t,e,n,a){return t[e++]=a[n],t[e++]=a[n+1],t[e++]=a[n],t[e]=a[n+1],t}const N=new p.VertexFormat;function S(n,a){const i=n._shadowVolume,d=n._offsetAttribute,g=n._vertexFormat,y=n._extrudedHeight,f=n._surfaceHeight,h=n._ellipsoid,b=a.height,_=a.width;let A;if(i){const t=p.VertexFormat.clone(g,N);t.normal=!0,n._vertexFormat=t}const x=M(n,a);i&&(n._vertexFormat=g);let E=m.PolygonPipeline.scaleToGeodeticHeight(x.attributes.position.values,f,h,!1);E=new Float64Array(E);let G=E.length;const F=2*G,P=new Float64Array(F);P.set(E);const S=m.PolygonPipeline.scaleToGeodeticHeight(x.attributes.position.values,y,h);P.set(S,G),x.attributes.position.values=P;const I=g.normal?new Float32Array(F):void 0,k=g.tangent?new Float32Array(F):void 0,H=g.bitangent?new Float32Array(F):void 0,z=g.st?new Float32Array(F/3*2):void 0;let B,U,Y;if(g.normal){for(U=x.attributes.normal.values,I.set(U),A=0;A<G;A++)U[A]=-U[A];I.set(U,G),x.attributes.normal.values=I}if(i){U=x.attributes.normal.values,g.normal||(x.attributes.normal=void 0);const t=new Float32Array(F);for(A=0;A<G;A++)U[A]=-U[A];t.set(U,G),x.attributes.extrudeDirection=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}const q=t.defined(d);if(q){const t=G/3*2;let e=new Uint8Array(t);d===l.GeometryOffsetAttribute.TOP?e=e.fill(1,0,t/2):(Y=d===l.GeometryOffsetAttribute.NONE?0:1,e=e.fill(Y)),x.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}if(g.tangent){const t=x.attributes.tangent.values;for(k.set(t),A=0;A<G;A++)t[A]=-t[A];k.set(t,G),x.attributes.tangent.values=k}if(g.bitangent){const t=x.attributes.bitangent.values;H.set(t),H.set(t,G),x.attributes.bitangent.values=H}g.st&&(B=x.attributes.st.values,z.set(B),z.set(B,G/3*2),x.attributes.st.values=z);const X=x.indices,Q=X.length,W=G/3,j=c.IndexDatatype.createTypedArray(F/3,2*Q);for(j.set(X),A=0;A<Q;A+=3)j[A+Q]=X[A+2]+W,j[A+1+Q]=X[A+1]+W,j[A+2+Q]=X[A]+W;x.indices=j;const J=a.northCap,Z=a.southCap;let K=b,$=2,tt=0,et=4,nt=4;J&&($-=1,K-=1,tt+=1,et-=2,nt-=1),Z&&($-=1,K-=1,tt+=1,et-=2,nt-=1),tt+=$*_+2*K-et;const at=2*(tt+nt);let ot=new Float64Array(3*at);const rt=i?new Float32Array(3*at):void 0;let it=q?new Uint8Array(at):void 0,st=g.st?new Float32Array(2*at):void 0;const lt=d===l.GeometryOffsetAttribute.TOP;q&&!lt&&(Y=d===l.GeometryOffsetAttribute.ALL?1:0,it=it.fill(Y));let ut=0,ct=0,mt=0,dt=0;const pt=_*K;let gt;for(A=0;A<pt;A+=_)gt=3*A,ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*A,B),ct+=4),i&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[dt++]=1,dt+=1);if(Z){const t=J?pt+1:pt;for(gt=3*t,A=0;A<2;A++)ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*t,B),ct+=4),i&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[dt++]=1,dt+=1)}else for(A=pt-_;A<pt;A++)gt=3*A,ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*A,B),ct+=4),i&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[dt++]=1,dt+=1);for(A=pt-1;A>0;A-=_)gt=3*A,ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*A,B),ct+=4),i&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[dt++]=1,dt+=1);if(J){const t=pt;for(gt=3*t,A=0;A<2;A++)ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*t,B),ct+=4),i&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[dt++]=1,dt+=1)}else for(A=_-1;A>=0;A--)gt=3*A,ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*A,B),ct+=4),i&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[dt++]=1,dt+=1);let yt=function(t,n,a){const r=t.length,i=n.normal?new Float32Array(r):void 0,s=n.tangent?new Float32Array(r):void 0,l=n.bitangent?new Float32Array(r):void 0;let u=0,c=0,m=0,d=!0,p=R,g=v,y=C;if(n.normal||n.tangent||n.bitangent)for(let f=0;f<r;f+=6){const h=e.Cartesian3.fromArray(t,f,w),b=e.Cartesian3.fromArray(t,(f+6)%r,L);if(d){const n=e.Cartesian3.fromArray(t,(f+3)%r,D);e.Cartesian3.subtract(b,h,b),e.Cartesian3.subtract(n,h,n),y=e.Cartesian3.normalize(e.Cartesian3.cross(n,b,y),y),d=!1}e.Cartesian3.equalsEpsilon(b,h,o.CesiumMath.EPSILON10)&&(d=!0),(n.tangent||n.bitangent)&&(p=a.geodeticSurfaceNormal(h,p),n.tangent&&(g=e.Cartesian3.normalize(e.Cartesian3.cross(p,y,g),g))),n.normal&&(i[u++]=y.x,i[u++]=y.y,i[u++]=y.z,i[u++]=y.x,i[u++]=y.y,i[u++]=y.z),n.tangent&&(s[c++]=g.x,s[c++]=g.y,s[c++]=g.z,s[c++]=g.x,s[c++]=g.y,s[c++]=g.z),n.bitangent&&(l[m++]=p.x,l[m++]=p.y,l[m++]=p.z,l[m++]=p.x,l[m++]=p.y,l[m++]=p.z)}return V(n,{positions:t,normals:i,tangents:s,bitangents:l})}(ot,g,h);g.st&&(yt.attributes.st=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:st})),i&&(yt.attributes.extrudeDirection=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:rt})),q&&(yt.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:it}));const ft=c.IndexDatatype.createTypedArray(at,6*tt);let ht,bt,_t,At;G=ot.length/3;let xt=0;for(A=0;A<G-1;A+=2){ht=A,At=(ht+2)%G;const t=e.Cartesian3.fromArray(ot,3*ht,L),n=e.Cartesian3.fromArray(ot,3*At,D);e.Cartesian3.equalsEpsilon(t,n,o.CesiumMath.EPSILON10)||(bt=(ht+1)%G,_t=(bt+2)%G,ft[xt++]=ht,ft[xt++]=bt,ft[xt++]=At,ft[xt++]=At,ft[xt++]=bt,ft[xt++]=_t)}return yt.indices=ft,yt=u.GeometryPipeline.combineInstances([new s.GeometryInstance({geometry:x}),new s.GeometryInstance({geometry:yt})]),yt[0]}const I=[new e.Cartesian3,new e.Cartesian3,new e.Cartesian3,new e.Cartesian3],k=new e.Cartographic,H=new e.Cartographic;function z(t,n,a,o,r){if(0===a)return e.Rectangle.clone(t,r);const i=d.RectangleGeometryLibrary.computeOptions(t,n,a,0,E,k),s=i.height,l=i.width,u=I;return d.RectangleGeometryLibrary.computePosition(i,o,!1,0,0,u[0]),d.RectangleGeometryLibrary.computePosition(i,o,!1,0,l-1,u[1]),d.RectangleGeometryLibrary.computePosition(i,o,!1,s-1,0,u[2]),d.RectangleGeometryLibrary.computePosition(i,o,!1,s-1,l-1,u[3]),e.Rectangle.fromCartesianArray(u,o,r)}function B(n){const a=(n=t.defaultValue(n,t.defaultValue.EMPTY_OBJECT)).rectangle,r=t.defaultValue(n.height,0),i=t.defaultValue(n.extrudedHeight,r);this._rectangle=e.Rectangle.clone(a),this._granularity=t.defaultValue(n.granularity,o.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=e.Ellipsoid.clone(t.defaultValue(n.ellipsoid,e.Ellipsoid.WGS84)),this._surfaceHeight=Math.max(r,i),this._rotation=t.defaultValue(n.rotation,0),this._stRotation=t.defaultValue(n.stRotation,0),this._vertexFormat=p.VertexFormat.clone(t.defaultValue(n.vertexFormat,p.VertexFormat.DEFAULT)),this._extrudedHeight=Math.min(r,i),this._shadowVolume=t.defaultValue(n.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=n.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}B.packedLength=e.Rectangle.packedLength+e.Ellipsoid.packedLength+p.VertexFormat.packedLength+7,B.pack=function(n,a,o){return o=t.defaultValue(o,0),e.Rectangle.pack(n._rectangle,a,o),o+=e.Rectangle.packedLength,e.Ellipsoid.pack(n._ellipsoid,a,o),o+=e.Ellipsoid.packedLength,p.VertexFormat.pack(n._vertexFormat,a,o),o+=p.VertexFormat.packedLength,a[o++]=n._granularity,a[o++]=n._surfaceHeight,a[o++]=n._rotation,a[o++]=n._stRotation,a[o++]=n._extrudedHeight,a[o++]=n._shadowVolume?1:0,a[o]=t.defaultValue(n._offsetAttribute,-1),a};const U=new e.Rectangle,Y=e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),q={rectangle:U,ellipsoid:Y,vertexFormat:N,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};B.unpack=function(n,a,o){a=t.defaultValue(a,0);const r=e.Rectangle.unpack(n,a,U);a+=e.Rectangle.packedLength;const i=e.Ellipsoid.unpack(n,a,Y);a+=e.Ellipsoid.packedLength;const s=p.VertexFormat.unpack(n,a,N);a+=p.VertexFormat.packedLength;const l=n[a++],u=n[a++],c=n[a++],m=n[a++],d=n[a++],g=1===n[a++],y=n[a];return t.defined(o)?(o._rectangle=e.Rectangle.clone(r,o._rectangle),o._ellipsoid=e.Ellipsoid.clone(i,o._ellipsoid),o._vertexFormat=p.VertexFormat.clone(s,o._vertexFormat),o._granularity=l,o._surfaceHeight=u,o._rotation=c,o._stRotation=m,o._extrudedHeight=d,o._shadowVolume=g,o._offsetAttribute=-1===y?void 0:y,o):(q.granularity=l,q.height=u,q.rotation=c,q.stRotation=m,q.extrudedHeight=d,q.shadowVolume=g,q.offsetAttribute=-1===y?void 0:y,new B(q))},B.computeRectangle=function(n,a){const r=(n=t.defaultValue(n,t.defaultValue.EMPTY_OBJECT)).rectangle,i=t.defaultValue(n.granularity,o.CesiumMath.RADIANS_PER_DEGREE),s=t.defaultValue(n.ellipsoid,e.Ellipsoid.WGS84);return z(r,i,t.defaultValue(n.rotation,0),s,a)};const X=new e.Matrix3,Q=new n.Quaternion,W=new e.Cartographic;B.createGeometry=function(a){if(o.CesiumMath.equalsEpsilon(a._rectangle.north,a._rectangle.south,o.CesiumMath.EPSILON10)||o.CesiumMath.equalsEpsilon(a._rectangle.east,a._rectangle.west,o.CesiumMath.EPSILON10))return;let i=a._rectangle;const s=a._ellipsoid,u=a._rotation,c=a._stRotation,p=a._vertexFormat,g=d.RectangleGeometryLibrary.computeOptions(i,a._granularity,u,c,E,k,H),y=X;if(0!==c||0!==u){const t=e.Rectangle.center(i,W),a=s.geodeticSurfaceNormalCartographic(t,L);n.Quaternion.fromAxisAngle(a,-c,Q),e.Matrix3.fromQuaternion(Q,y)}else e.Matrix3.clone(e.Matrix3.IDENTITY,y);const f=a._surfaceHeight,h=a._extrudedHeight,b=!o.CesiumMath.equalsEpsilon(f,h,0,o.CesiumMath.EPSILON2);let _,A;if(g.lonScalar=1/a._rectangle.width,g.latScalar=1/a._rectangle.height,g.tangentRotationMatrix=y,i=a._rectangle,b){_=S(a,g);const t=n.BoundingSphere.fromRectangle3D(i,s,f,P),e=n.BoundingSphere.fromRectangle3D(i,s,h,F);A=n.BoundingSphere.union(t,e)}else{if(_=M(a,g),_.attributes.position.values=m.PolygonPipeline.scaleToGeodeticHeight(_.attributes.position.values,f,s,!1),t.defined(a._offsetAttribute)){const t=_.attributes.position.values.length,e=a._offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1,n=new Uint8Array(t/3).fill(e);_.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}A=n.BoundingSphere.fromRectangle3D(i,s,f)}return p.position||delete _.attributes.position,new r.Geometry({attributes:_.attributes,indices:_.indices,primitiveType:_.primitiveType,boundingSphere:A,offsetAttribute:a._offsetAttribute})},B.createShadowVolume=function(t,e,n){const a=t._granularity,o=t._ellipsoid,r=e(a,o),i=n(a,o);return new B({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:o,stRotation:t._stRotation,granularity:a,extrudedHeight:i,height:r,vertexFormat:p.VertexFormat.POSITION_ONLY,shadowVolume:!0})};const j=new e.Rectangle,J=[new e.Cartesian2,new e.Cartesian2,new e.Cartesian2],Z=new e.Matrix2,K=new e.Cartographic;return Object.defineProperties(B.prototype,{rectangle:{get:function(){return t.defined(this._rotatedRectangle)||(this._rotatedRectangle=z(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return t.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){if(0===t._stRotation)return[0,0,0,1,1,0];const n=e.Rectangle.clone(t._rectangle,j),a=t._granularity,o=t._ellipsoid,r=z(n,a,t._rotation-t._stRotation,o,j),i=J;i[0].x=r.west,i[0].y=r.south,i[1].x=r.west,i[1].y=r.north,i[2].x=r.east,i[2].y=r.south;const s=t.rectangle,l=e.Matrix2.fromRotation(t._stRotation,Z),u=e.Rectangle.center(s,K);for(let t=0;t<3;++t){const n=i[t];n.x-=u.longitude,n.y-=u.latitude,e.Matrix2.multiplyByVector(l,n,n),n.x+=u.longitude,n.y+=u.latitude,n.x=(n.x-s.west)/s.width,n.y=(n.y-s.south)/s.height}const c=i[0],m=i[1],d=i[2],p=new Array(6);return e.Cartesian2.pack(c,p),e.Cartesian2.pack(m,p,2),e.Cartesian2.pack(d,p,4),p}(this)),this._textureCoordinateRotationPoints}}}),function(n,a){return t.defined(a)&&(n=B.unpack(n,a)),n._ellipsoid=e.Ellipsoid.clone(n._ellipsoid),n._rectangle=e.Rectangle.clone(n._rectangle),B.createGeometry(n)}}));
|
|
25
|
+
import{a as W}from"./chunk-4KY4VMEH.js";import{a as Nt}from"./chunk-XRJOFXJF.js";import{a as zt}from"./chunk-QNPYEODC.js";import"./chunk-G72JFEXW.js";import"./chunk-6W2XFGWI.js";import{a as ft}from"./chunk-ML6MR2RA.js";import{a as q}from"./chunk-AKELQO2L.js";import{b as yt}from"./chunk-TCOMWBL2.js";import"./chunk-37ETYCYM.js";import"./chunk-SRA5MBUT.js";import"./chunk-5AAMOBJK.js";import{a as At}from"./chunk-4WQ4VT5S.js";import{a as Vt}from"./chunk-6EINM7EY.js";import{b as Mt,c as Pt,d as Y}from"./chunk-A4I25VN7.js";import{c as at}from"./chunk-D3TVNJ6W.js";import"./chunk-3VUCSHGU.js";import{h as Lt,j as E,k as bt}from"./chunk-LNJEJFV5.js";import"./chunk-BPABSUDY.js";import{a as U}from"./chunk-ATKJRN2G.js";import"./chunk-RDX4QSUS.js";import"./chunk-G3GDHHWO.js";import{a as mt,b as $,c as D}from"./chunk-2AIOP76V.js";import{a as w,b as lt,c as St}from"./chunk-IAE6APK2.js";import{a as I}from"./chunk-3E7FIXV7.js";import{a as Et,b as ct}from"./chunk-NZBME2JK.js";import{f as K}from"./chunk-6DLS2UKD.js";var Tt=new w,Bt=new w,Ut=new w,Yt=new w,qt=new E,Zt=new $,Kt=new at,$t=new at;function Xt(t,e){let n=new Pt({attributes:new Vt,primitiveType:Mt.TRIANGLES});return n.attributes.position=new Y({componentDatatype:U.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(n.attributes.normal=new Y({componentDatatype:U.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(n.attributes.tangent=new Y({componentDatatype:U.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(n.attributes.bitangent=new Y({componentDatatype:U.FLOAT,componentsPerAttribute:3,values:e.bitangents})),n}function Gt(t,e,n,o){let a=t.length,r=e.normal?new Float32Array(a):void 0,i=e.tangent?new Float32Array(a):void 0,s=e.bitangent?new Float32Array(a):void 0,l=0,u=Yt,c=Ut,m=Bt;if(e.normal||e.tangent||e.bitangent)for(let p=0;p<a;p+=3){let a=w.fromArray(t,p,Tt),h=l+1,f=l+2;m=n.geodeticSurfaceNormal(a,m),(e.tangent||e.bitangent)&&(w.cross(w.UNIT_Z,m,c),lt.multiplyByVector(o,c,c),w.normalize(c,c),e.bitangent&&w.normalize(w.cross(m,c,u),u)),e.normal&&(r[l]=m.x,r[h]=m.y,r[f]=m.z),e.tangent&&(i[l]=c.x,i[h]=c.y,i[f]=c.z),e.bitangent&&(s[l]=u.x,s[h]=u.y,s[f]=u.z),l+=3}return Xt(e,{positions:t,normals:r,tangents:i,bitangents:s})}var Ct=new w,jt=new w;function te(t,e,n){let o=t.length,a=e.normal?new Float32Array(o):void 0,r=e.tangent?new Float32Array(o):void 0,i=e.bitangent?new Float32Array(o):void 0,s=0,l=0,u=0,c=!0,m=Yt,p=Ut,h=Bt;if(e.normal||e.tangent||e.bitangent)for(let f=0;f<o;f+=6){let g=w.fromArray(t,f,Tt),d=w.fromArray(t,(f+6)%o,Ct);if(c){let e=w.fromArray(t,(f+3)%o,jt);w.subtract(d,g,d),w.subtract(e,g,e),h=w.normalize(w.cross(e,d,h),h),c=!1}w.equalsEpsilon(d,g,I.EPSILON10)&&(c=!0),(e.tangent||e.bitangent)&&(m=n.geodeticSurfaceNormal(g,m),e.tangent&&(p=w.normalize(w.cross(m,h,p),p))),e.normal&&(a[s++]=h.x,a[s++]=h.y,a[s++]=h.z,a[s++]=h.x,a[s++]=h.y,a[s++]=h.z),e.tangent&&(r[l++]=p.x,r[l++]=p.y,r[l++]=p.z,r[l++]=p.x,r[l++]=p.y,r[l++]=p.z),e.bitangent&&(i[u++]=m.x,i[u++]=m.y,i[u++]=m.z,i[u++]=m.x,i[u++]=m.y,i[u++]=m.z)}return Xt(e,{positions:t,normals:a,tangents:r,bitangents:i})}function It(t,e){let n=t._vertexFormat,o=t._ellipsoid,a=e.height,r=e.width,i=e.northCap,s=e.southCap,l=0,u=a,c=a,m=0;i&&(l=1,c-=1,m+=1),s&&(u-=1,c-=1,m+=1),m+=r*c;let p=n.position?new Float64Array(3*m):void 0,h=n.st?new Float32Array(2*m):void 0,f=0,g=0,d=Tt,w=Zt,y=Number.MAX_VALUE,_=Number.MAX_VALUE,b=-Number.MAX_VALUE,A=-Number.MAX_VALUE;for(let t=l;t<u;++t)for(let a=0;a<r;++a)W.computePosition(e,o,n.st,t,a,d,w),p[f++]=d.x,p[f++]=d.y,p[f++]=d.z,n.st&&(h[g++]=w.x,h[g++]=w.y,y=Math.min(y,w.x),_=Math.min(_,w.y),b=Math.max(b,w.x),A=Math.max(A,w.y));if(i&&(W.computePosition(e,o,n.st,0,0,d,w),p[f++]=d.x,p[f++]=d.y,p[f++]=d.z,n.st&&(h[g++]=w.x,h[g++]=w.y,y=w.x,_=w.y,b=w.x,A=w.y)),s&&(W.computePosition(e,o,n.st,a-1,0,d,w),p[f++]=d.x,p[f++]=d.y,p[f]=d.z,n.st&&(h[g++]=w.x,h[g]=w.y,y=Math.min(y,w.x),_=Math.min(_,w.y),b=Math.max(b,w.x),A=Math.max(A,w.y))),n.st&&(y<0||_<0||b>1||A>1))for(let t=0;t<h.length;t+=2)h[t]=(h[t]-y)/(b-y),h[t+1]=(h[t+1]-_)/(A-_);let v=Gt(p,n,o,e.tangentRotationMatrix),E=6*(r-1)*(c-1);i&&(E+=3*(r-1)),s&&(E+=3*(r-1));let x,k=At.createTypedArray(m,E),D=0,F=0;for(x=0;x<c-1;++x){for(let t=0;t<r-1;++t){let t=D,e=t+r,n=e+1,o=t+1;k[F++]=t,k[F++]=e,k[F++]=o,k[F++]=o,k[F++]=e,k[F++]=n,++D}++D}if(i||s){let t,e,n=m-1,o=m-1;if(i&&s&&(n=m-2),D=0,i)for(x=0;x<r-1;x++)t=D,e=t+1,k[F++]=n,k[F++]=t,k[F++]=e,++D;if(s)for(D=(c-1)*r,x=0;x<r-1;x++)t=D,e=t+1,k[F++]=t,k[F++]=o,k[F++]=e,++D}return v.indices=k,n.st&&(v.attributes.st=new Y({componentDatatype:U.FLOAT,componentsPerAttribute:2,values:h})),v}function ut(t,e,n,o,a){return t[e++]=o[n],t[e++]=o[n+1],t[e++]=o[n+2],t[e++]=a[n],t[e++]=a[n+1],t[e]=a[n+2],t}function ht(t,e,n,o){return t[e++]=o[n],t[e++]=o[n+1],t[e++]=o[n],t[e]=o[n+1],t}var Dt=new q;function ee(t,e){let n,o=t._shadowVolume,a=t._offsetAttribute,r=t._vertexFormat,i=t._extrudedHeight,s=t._surfaceHeight,l=t._ellipsoid,u=e.height,c=e.width;if(o){let e=q.clone(r,Dt);e.normal=!0,t._vertexFormat=e}let m=It(t,e);o&&(t._vertexFormat=r);let p=yt.scaleToGeodeticHeight(m.attributes.position.values,s,l,!1);p=new Float64Array(p);let h=p.length,f=2*h,g=new Float64Array(f);g.set(p);let d=yt.scaleToGeodeticHeight(m.attributes.position.values,i,l);g.set(d,h),m.attributes.position.values=g;let y,_,b=r.normal?new Float32Array(f):void 0,A=r.tangent?new Float32Array(f):void 0,v=r.bitangent?new Float32Array(f):void 0,E=r.st?new Float32Array(f/3*2):void 0;if(r.normal){for(_=m.attributes.normal.values,b.set(_),n=0;n<h;n++)_[n]=-_[n];b.set(_,h),m.attributes.normal.values=b}if(o){_=m.attributes.normal.values,r.normal||(m.attributes.normal=void 0);let t=new Float32Array(f);for(n=0;n<h;n++)_[n]=-_[n];t.set(_,h),m.attributes.extrudeDirection=new Y({componentDatatype:U.FLOAT,componentsPerAttribute:3,values:t})}let x,k=K(a);if(k){let t=h/3*2,e=new Uint8Array(t);a===ft.TOP?e=e.fill(1,0,t/2):(x=a===ft.NONE?0:1,e=e.fill(x)),m.attributes.applyOffset=new Y({componentDatatype:U.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}if(r.tangent){let t=m.attributes.tangent.values;for(A.set(t),n=0;n<h;n++)t[n]=-t[n];A.set(t,h),m.attributes.tangent.values=A}if(r.bitangent){let t=m.attributes.bitangent.values;v.set(t),v.set(t,h),m.attributes.bitangent.values=v}r.st&&(y=m.attributes.st.values,E.set(y),E.set(y,h/3*2),m.attributes.st.values=E);let D=m.indices,F=D.length,P=h/3,R=At.createTypedArray(f/3,2*F);for(R.set(D),n=0;n<F;n+=3)R[n+F]=D[n+2]+P,R[n+1+F]=D[n+1]+P,R[n+2+F]=D[n]+P;m.indices=R;let T=e.northCap,L=e.southCap,N=u,O=2,j=0,S=4,G=4;T&&(O-=1,N-=1,j+=1,S-=2,G-=1),L&&(O-=1,N-=1,j+=1,S-=2,G-=1),j+=O*c+2*N-S;let M=2*(j+G),H=new Float64Array(3*M),J=o?new Float32Array(3*M):void 0,V=k?new Uint8Array(M):void 0,C=r.st?new Float32Array(2*M):void 0,W=a===ft.TOP;k&&!W&&(x=a===ft.ALL?1:0,V=V.fill(x));let z,B=0,X=0,$=0,Q=0,Z=c*N;for(n=0;n<Z;n+=c)z=3*n,H=ut(H,B,z,p,d),B+=6,r.st&&(C=ht(C,X,2*n,y),X+=4),o&&($+=3,J[$++]=_[z],J[$++]=_[z+1],J[$++]=_[z+2]),W&&(V[Q++]=1,Q+=1);if(L){let t=T?Z+1:Z;for(z=3*t,n=0;n<2;n++)H=ut(H,B,z,p,d),B+=6,r.st&&(C=ht(C,X,2*t,y),X+=4),o&&($+=3,J[$++]=_[z],J[$++]=_[z+1],J[$++]=_[z+2]),W&&(V[Q++]=1,Q+=1)}else for(n=Z-c;n<Z;n++)z=3*n,H=ut(H,B,z,p,d),B+=6,r.st&&(C=ht(C,X,2*n,y),X+=4),o&&($+=3,J[$++]=_[z],J[$++]=_[z+1],J[$++]=_[z+2]),W&&(V[Q++]=1,Q+=1);for(n=Z-1;n>0;n-=c)z=3*n,H=ut(H,B,z,p,d),B+=6,r.st&&(C=ht(C,X,2*n,y),X+=4),o&&($+=3,J[$++]=_[z],J[$++]=_[z+1],J[$++]=_[z+2]),W&&(V[Q++]=1,Q+=1);if(T){let t=Z;for(z=3*t,n=0;n<2;n++)H=ut(H,B,z,p,d),B+=6,r.st&&(C=ht(C,X,2*t,y),X+=4),o&&($+=3,J[$++]=_[z],J[$++]=_[z+1],J[$++]=_[z+2]),W&&(V[Q++]=1,Q+=1)}else for(n=c-1;n>=0;n--)z=3*n,H=ut(H,B,z,p,d),B+=6,r.st&&(C=ht(C,X,2*n,y),X+=4),o&&($+=3,J[$++]=_[z],J[$++]=_[z+1],J[$++]=_[z+2]),W&&(V[Q++]=1,Q+=1);let tt=te(H,r,l);r.st&&(tt.attributes.st=new Y({componentDatatype:U.FLOAT,componentsPerAttribute:2,values:C})),o&&(tt.attributes.extrudeDirection=new Y({componentDatatype:U.FLOAT,componentsPerAttribute:3,values:J})),k&&(tt.attributes.applyOffset=new Y({componentDatatype:U.UNSIGNED_BYTE,componentsPerAttribute:1,values:V}));let et,nt,ot,at,rt=At.createTypedArray(M,6*j);h=H.length/3;let it=0;for(n=0;n<h-1;n+=2){et=n,at=(et+2)%h;let t=w.fromArray(H,3*et,Ct),e=w.fromArray(H,3*at,jt);w.equalsEpsilon(t,e,I.EPSILON10)||(nt=(et+1)%h,ot=(nt+2)%h,rt[it++]=et,rt[it++]=nt,rt[it++]=at,rt[it++]=at,rt[it++]=nt,rt[it++]=ot)}return tt.indices=rt,tt=zt.combineInstances([new Nt({geometry:m}),new Nt({geometry:tt})]),tt[0]}var ne=[new w,new w,new w,new w],Wt=new mt,oe=new mt;function Ht(t,e,n,o,a){if(0===n)return E.clone(t,a);let r=W.computeOptions(t,e,n,0,qt,Wt),i=r.height,s=r.width,l=ne;return W.computePosition(r,o,!1,0,0,l[0]),W.computePosition(r,o,!1,0,s-1,l[1]),W.computePosition(r,o,!1,i-1,0,l[2]),W.computePosition(r,o,!1,i-1,s-1,l[3]),E.fromCartesianArray(l,o,a)}function J(t){let e=(t=t??St.EMPTY_OBJECT).rectangle;if(ct.typeOf.object("rectangle",e),E._validate(e),e.north<e.south)throw new Et("options.rectangle.north must be greater than or equal to options.rectangle.south");let n=t.height??0,o=t.extrudedHeight??n;this._rectangle=E.clone(e),this._granularity=t.granularity??I.RADIANS_PER_DEGREE,this._ellipsoid=D.clone(t.ellipsoid??D.default),this._surfaceHeight=Math.max(n,o),this._rotation=t.rotation??0,this._stRotation=t.stRotation??0,this._vertexFormat=q.clone(t.vertexFormat??q.DEFAULT),this._extrudedHeight=Math.min(n,o),this._shadowVolume=t.shadowVolume??!1,this._workerName="createRectangleGeometry",this._offsetAttribute=t.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}J.packedLength=E.packedLength+D.packedLength+q.packedLength+7,J.pack=function(t,e,n){return ct.typeOf.object("value",t),ct.defined("array",e),n=n??0,E.pack(t._rectangle,e,n),n+=E.packedLength,D.pack(t._ellipsoid,e,n),n+=D.packedLength,q.pack(t._vertexFormat,e,n),n+=q.packedLength,e[n++]=t._granularity,e[n++]=t._surfaceHeight,e[n++]=t._rotation,e[n++]=t._stRotation,e[n++]=t._extrudedHeight,e[n++]=t._shadowVolume?1:0,e[n]=t._offsetAttribute??-1,e};var Jt=new E,Qt=D.clone(D.UNIT_SPHERE),G={rectangle:Jt,ellipsoid:Qt,vertexFormat:Dt,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};J.unpack=function(t,e,n){ct.defined("array",t),e=e??0;let o=E.unpack(t,e,Jt);e+=E.packedLength;let a=D.unpack(t,e,Qt);e+=D.packedLength;let r=q.unpack(t,e,Dt);e+=q.packedLength;let i=t[e++],s=t[e++],l=t[e++],u=t[e++],c=t[e++],m=1===t[e++],p=t[e];return K(n)?(n._rectangle=E.clone(o,n._rectangle),n._ellipsoid=D.clone(a,n._ellipsoid),n._vertexFormat=q.clone(r,n._vertexFormat),n._granularity=i,n._surfaceHeight=s,n._rotation=l,n._stRotation=u,n._extrudedHeight=c,n._shadowVolume=m,n._offsetAttribute=-1===p?void 0:p,n):(G.granularity=i,G.height=s,G.rotation=l,G.stRotation=u,G.extrudedHeight=c,G.shadowVolume=m,G.offsetAttribute=-1===p?void 0:p,new J(G))},J.computeRectangle=function(t,e){let n=(t=t??St.EMPTY_OBJECT).rectangle;if(ct.typeOf.object("rectangle",n),E._validate(n),n.north<n.south)throw new Et("options.rectangle.north must be greater than or equal to options.rectangle.south");let o=t.granularity??I.RADIANS_PER_DEGREE,a=t.ellipsoid??D.default;return Ht(n,o,t.rotation??0,a,e)};var ie=new lt,Ft=new Lt,ae=new mt;J.createGeometry=function(t){if(I.equalsEpsilon(t._rectangle.north,t._rectangle.south,I.EPSILON10)||I.equalsEpsilon(t._rectangle.east,t._rectangle.west,I.EPSILON10))return;let e=t._rectangle,n=t._ellipsoid,o=t._rotation,a=t._stRotation,r=t._vertexFormat,i=W.computeOptions(e,t._granularity,o,a,qt,Wt,oe),s=ie;if(0!==a||0!==o){let t=E.center(e,ae),o=n.geodeticSurfaceNormalCartographic(t,Ct);Lt.fromAxisAngle(o,-a,Ft),lt.fromQuaternion(Ft,s)}else lt.clone(lt.IDENTITY,s);let l,u,c=t._surfaceHeight,m=t._extrudedHeight,p=!I.equalsEpsilon(c,m,0,I.EPSILON2);if(i.lonScalar=1/t._rectangle.width,i.latScalar=1/t._rectangle.height,i.tangentRotationMatrix=s,e=t._rectangle,p){l=ee(t,i);let o=at.fromRectangle3D(e,n,c,$t),a=at.fromRectangle3D(e,n,m,Kt);u=at.union(o,a)}else{if(l=It(t,i),l.attributes.position.values=yt.scaleToGeodeticHeight(l.attributes.position.values,c,n,!1),K(t._offsetAttribute)){let e=l.attributes.position.values.length,n=t._offsetAttribute===ft.NONE?0:1,o=new Uint8Array(e/3).fill(n);l.attributes.applyOffset=new Y({componentDatatype:U.UNSIGNED_BYTE,componentsPerAttribute:1,values:o})}u=at.fromRectangle3D(e,n,c)}return r.position||delete l.attributes.position,new Pt({attributes:l.attributes,indices:l.indices,primitiveType:l.primitiveType,boundingSphere:u,offsetAttribute:t._offsetAttribute})},J.createShadowVolume=function(t,e,n){let o=t._granularity,a=t._ellipsoid,r=e(o,a),i=n(o,a);return new J({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:a,stRotation:t._stRotation,granularity:o,extrudedHeight:i,height:r,vertexFormat:q.POSITION_ONLY,shadowVolume:!0})};var vt=new E,se=[new $,new $,new $],re=new bt,ce=new mt;function le(t){if(0===t._stRotation)return[0,0,0,1,1,0];let e=E.clone(t._rectangle,vt),n=t._granularity,o=t._ellipsoid,a=Ht(e,n,t._rotation-t._stRotation,o,vt),r=se;r[0].x=a.west,r[0].y=a.south,r[1].x=a.west,r[1].y=a.north,r[2].x=a.east,r[2].y=a.south;let i=t.rectangle,s=bt.fromRotation(t._stRotation,re),l=E.center(i,ce);for(let t=0;t<3;++t){let e=r[t];e.x-=l.longitude,e.y-=l.latitude,bt.multiplyByVector(s,e,e),e.x+=l.longitude,e.y+=l.latitude,e.x=(e.x-i.west)/i.width,e.y=(e.y-i.south)/i.height}let u=r[0],c=r[1],m=r[2],p=new Array(6);return $.pack(u,p),$.pack(c,p,2),$.pack(m,p,4),p}Object.defineProperties(J.prototype,{rectangle:{get:function(){return K(this._rotatedRectangle)||(this._rotatedRectangle=Ht(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return K(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=le(this)),this._textureCoordinateRotationPoints}}});var Ot=J;function fe(t,e){return K(e)&&(t=Ot.unpack(t,e)),t._ellipsoid=D.clone(t._ellipsoid),t._rectangle=E.clone(t._rectangle),Ot.createGeometry(t)}var Ye=fe;export{Ye as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.143.0
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -22,4 +22,4 @@
|
|
|
22
22
|
* Portions licensed separately.
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
import{a as R}from"./chunk-4KY4VMEH.js";import{a as y}from"./chunk-ML6MR2RA.js";import{b as z}from"./chunk-TCOMWBL2.js";import"./chunk-37ETYCYM.js";import{a as q}from"./chunk-4WQ4VT5S.js";import{a as F}from"./chunk-6EINM7EY.js";import{b as v,c as B,d as T}from"./chunk-A4I25VN7.js";import{c as P}from"./chunk-D3TVNJ6W.js";import"./chunk-3VUCSHGU.js";import{j as b}from"./chunk-LNJEJFV5.js";import"./chunk-BPABSUDY.js";import{a as D}from"./chunk-ATKJRN2G.js";import"./chunk-RDX4QSUS.js";import"./chunk-G3GDHHWO.js";import{a as U,c as w}from"./chunk-2AIOP76V.js";import{a as x,c as M}from"./chunk-IAE6APK2.js";import{a as S}from"./chunk-3E7FIXV7.js";import{a as C}from"./chunk-NZBME2JK.js";import{f as H}from"./chunk-6DLS2UKD.js";var j=new P,K=new P,Q=new x,W=new b;function Y(t,e){let i=t._ellipsoid,r=e.height,o=e.width,n=e.northCap,a=e.southCap,s=r,l=2,u=0,c=4;n&&(l-=1,s-=1,u+=1,c-=2),a&&(l-=1,s-=1,u+=1,c-=2),u+=l*o+2*s-c;let h,p=new Float64Array(3*u),f=0,g=0,d=Q;if(n)R.computePosition(e,i,!1,g,0,d),p[f++]=d.x,p[f++]=d.y,p[f++]=d.z;else for(h=0;h<o;h++)R.computePosition(e,i,!1,g,h,d),p[f++]=d.x,p[f++]=d.y,p[f++]=d.z;for(h=o-1,g=1;g<r;g++)R.computePosition(e,i,!1,g,h,d),p[f++]=d.x,p[f++]=d.y,p[f++]=d.z;if(g=r-1,!a)for(h=o-2;h>=0;h--)R.computePosition(e,i,!1,g,h,d),p[f++]=d.x,p[f++]=d.y,p[f++]=d.z;for(h=0,g=r-2;g>0;g--)R.computePosition(e,i,!1,g,h,d),p[f++]=d.x,p[f++]=d.y,p[f++]=d.z;let m=p.length/3*2,_=q.createTypedArray(p.length/3,m),b=0;for(let t=0;t<p.length/3-1;t++)_[b++]=t,_[b++]=t+1;_[b++]=p.length/3-1,_[b++]=0;let w=new B({attributes:new F,primitiveType:v.LINES});return w.attributes.position=new T({componentDatatype:D.DOUBLE,componentsPerAttribute:3,values:p}),w.indices=_,w}function X(t,e){let i=t._surfaceHeight,r=t._extrudedHeight,o=t._ellipsoid,n=Y(t,e),a=e.height,s=e.width,l=z.scaleToGeodeticHeight(n.attributes.position.values,i,o,!1),u=l.length,c=new Float64Array(2*u);c.set(l);let h=z.scaleToGeodeticHeight(n.attributes.position.values,r,o);c.set(h,u),n.attributes.position.values=c;let p=e.northCap,f=e.southCap,g=4;p&&(g-=1),f&&(g-=1);let d=2*(c.length/3+g),m=q.createTypedArray(c.length/3,d);u=c.length/6;let _,b=0;for(let t=0;t<u-1;t++)m[b++]=t,m[b++]=t+1,m[b++]=t+u,m[b++]=t+u+1;if(m[b++]=u-1,m[b++]=0,m[b++]=u+u-1,m[b++]=u,m[b++]=0,m[b++]=u,p)_=a-1;else{let t=s-1;m[b++]=t,m[b++]=t+u,_=s+a-2}if(m[b++]=_,m[b++]=_+u,!f){let t=s+_-1;m[b++]=t,m[b]=t+u}return n.indices=m,n}function k(t){let e=(t=t??M.EMPTY_OBJECT).rectangle,i=t.granularity??S.RADIANS_PER_DEGREE,r=t.ellipsoid??w.default,o=t.rotation??0;if(!H(e))throw new C("rectangle is required.");if(b._validate(e),e.north<e.south)throw new C("options.rectangle.north must be greater than options.rectangle.south");let n=t.height??0,a=t.extrudedHeight??n;this._rectangle=b.clone(e),this._granularity=i,this._ellipsoid=r,this._surfaceHeight=Math.max(n,a),this._rotation=o,this._extrudedHeight=Math.min(n,a),this._offsetAttribute=t.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}k.packedLength=b.packedLength+w.packedLength+5,k.pack=function(t,e,i){if(!H(t))throw new C("value is required");if(!H(e))throw new C("array is required");return i=i??0,b.pack(t._rectangle,e,i),i+=b.packedLength,w.pack(t._ellipsoid,e,i),i+=w.packedLength,e[i++]=t._granularity,e[i++]=t._surfaceHeight,e[i++]=t._rotation,e[i++]=t._extrudedHeight,e[i]=t._offsetAttribute??-1,e};var J=new b,V=w.clone(w.UNIT_SPHERE),N={rectangle:J,ellipsoid:V,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};k.unpack=function(t,e,i){if(!H(t))throw new C("array is required");e=e??0;let r=b.unpack(t,e,J);e+=b.packedLength;let o=w.unpack(t,e,V);e+=w.packedLength;let n=t[e++],a=t[e++],s=t[e++],l=t[e++],u=t[e];return H(i)?(i._rectangle=b.clone(r,i._rectangle),i._ellipsoid=w.clone(o,i._ellipsoid),i._surfaceHeight=a,i._rotation=s,i._extrudedHeight=l,i._offsetAttribute=-1===u?void 0:u,i):(N.granularity=n,N.height=a,N.rotation=s,N.extrudedHeight=l,N.offsetAttribute=-1===u?void 0:u,new k(N))};var Z=new U;k.createGeometry=function(t){let e,i,r=t._rectangle,o=t._ellipsoid,n=R.computeOptions(r,t._granularity,t._rotation,0,W,Z);if(S.equalsEpsilon(r.north,r.south,S.EPSILON10)||S.equalsEpsilon(r.east,r.west,S.EPSILON10))return;let a,s=t._surfaceHeight,l=t._extrudedHeight;if(!S.equalsEpsilon(s,l,0,S.EPSILON2)){if(e=X(t,n),H(t._offsetAttribute)){let i=e.attributes.position.values.length/3,r=new Uint8Array(i);t._offsetAttribute===y.TOP?r=r.fill(1,0,i/2):(a=t._offsetAttribute===y.NONE?0:1,r=r.fill(a)),e.attributes.applyOffset=new T({componentDatatype:D.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})}let u=P.fromRectangle3D(r,o,s,K),c=P.fromRectangle3D(r,o,l,j);i=P.union(u,c)}else{if(e=Y(t,n),e.attributes.position.values=z.scaleToGeodeticHeight(e.attributes.position.values,s,o,!1),H(t._offsetAttribute)){let i=e.attributes.position.values.length;a=t._offsetAttribute===y.NONE?0:1;let r=new Uint8Array(i/3).fill(a);e.attributes.applyOffset=new T({componentDatatype:D.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})}i=P.fromRectangle3D(r,o,s)}return new B({attributes:e.attributes,indices:e.indices,primitiveType:v.LINES,boundingSphere:i,offsetAttribute:t._offsetAttribute})};var O=k;function $(t,e){return H(e)&&(t=O.unpack(t,e)),t._ellipsoid=w.clone(t._ellipsoid),t._rectangle=b.clone(t._rectangle),O.createGeometry(t)}var Et=$;export{Et as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.143.0
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -22,4 +22,4 @@
|
|
|
22
22
|
* Portions licensed separately.
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
import{a as r}from"./chunk-QJTXFT4R.js";import{a as L}from"./chunk-AJH5KBOO.js";import{a as P}from"./chunk-6AEO73KW.js";import"./chunk-WGIRJIIK.js";import"./chunk-37ETYCYM.js";import"./chunk-SRA5MBUT.js";import"./chunk-5AAMOBJK.js";import{a as X}from"./chunk-4WQ4VT5S.js";import{a as W}from"./chunk-6EINM7EY.js";import{b as K,c as Q,d as H}from"./chunk-A4I25VN7.js";import{c as j}from"./chunk-D3TVNJ6W.js";import"./chunk-3VUCSHGU.js";import"./chunk-LNJEJFV5.js";import"./chunk-BPABSUDY.js";import{a as v}from"./chunk-ATKJRN2G.js";import"./chunk-RDX4QSUS.js";import"./chunk-G3GDHHWO.js";import{c as w}from"./chunk-2AIOP76V.js";import{a as A,c as J}from"./chunk-IAE6APK2.js";import{a as G}from"./chunk-3E7FIXV7.js";import{a as D}from"./chunk-NZBME2JK.js";import{f as u}from"./chunk-6DLS2UKD.js";function Z(e,t,o,a,n,i,l){let s,u=P.numberOfPoints(e,t,n),c=o.red,p=o.green,h=o.blue,f=o.alpha,m=a.red,y=a.green,g=a.blue,d=a.alpha;if(r.equals(o,a)){for(s=0;s<u;s++)i[l++]=r.floatToByte(c),i[l++]=r.floatToByte(p),i[l++]=r.floatToByte(h),i[l++]=r.floatToByte(f);return l}let k=(m-c)/u,T=(y-p)/u,A=(g-h)/u,w=(d-f)/u,B=l;for(s=0;s<u;s++)i[B++]=r.floatToByte(c+s*k),i[B++]=r.floatToByte(p+s*T),i[B++]=r.floatToByte(h+s*A),i[B++]=r.floatToByte(f+s*w);return B}function O(e){let t=(e=e??J.EMPTY_OBJECT).positions,o=e.colors,a=e.colorsPerVertex??!1;if(!u(t)||t.length<2)throw new D("At least two positions are required.");if(u(o)&&(a&&o.length<t.length||!a&&o.length<t.length-1))throw new D("colors has an invalid length.");this._positions=t,this._colors=o,this._colorsPerVertex=a,this._arcType=e.arcType??L.GEODESIC,this._granularity=e.granularity??G.RADIANS_PER_DEGREE,this._ellipsoid=e.ellipsoid??w.default,this._workerName="createSimplePolylineGeometry";let n=1+t.length*A.packedLength;n+=u(o)?1+o.length*r.packedLength:1,this.packedLength=n+w.packedLength+3}O.pack=function(e,t,o){if(!u(e))throw new D("value is required");if(!u(t))throw new D("array is required");o=o??0;let a,n=e._positions,i=n.length;for(t[o++]=i,a=0;a<i;++a,o+=A.packedLength)A.pack(n[a],t,o);let l=e._colors;for(i=u(l)?l.length:0,t[o++]=i,a=0;a<i;++a,o+=r.packedLength)r.pack(l[a],t,o);return w.pack(e._ellipsoid,t,o),o+=w.packedLength,t[o++]=e._colorsPerVertex?1:0,t[o++]=e._arcType,t[o]=e._granularity,t},O.unpack=function(e,t,o){if(!u(e))throw new D("array is required");t=t??0;let a,n=e[t++],i=new Array(n);for(a=0;a<n;++a,t+=A.packedLength)i[a]=A.unpack(e,t);n=e[t++];let l=n>0?new Array(n):void 0;for(a=0;a<n;++a,t+=r.packedLength)l[a]=r.unpack(e,t);let s=w.unpack(e,t);t+=w.packedLength;let c=1===e[t++],p=e[t++],h=e[t];return u(o)?(o._positions=i,o._colors=l,o._ellipsoid=s,o._colorsPerVertex=c,o._arcType=p,o._granularity=h,o):new O({positions:i,colors:l,ellipsoid:s,colorsPerVertex:c,arcType:p,granularity:h})};var U=new Array(2),q=new Array(2),$={positions:U,height:q,ellipsoid:void 0,minDistance:void 0,granularity:void 0};O.createGeometry=function(e){let t,o,a,n,i,l=e._positions,s=e._colors,c=e._colorsPerVertex,p=e._arcType,h=e._granularity,f=e._ellipsoid,m=G.chordLength(h,f.maximumRadius),y=u(s)&&!c,g=l.length,d=0;if(p===L.GEODESIC||p===L.RHUMB){let e,a,c;p===L.GEODESIC?(e=G.chordLength(h,f.maximumRadius),a=P.numberOfPoints,c=P.generateArc):(e=h,a=P.numberOfPointsRhumbLine,c=P.generateRhumbArc);let k=P.extractHeights(l,f),T=$;if(p===L.GEODESIC?T.minDistance=m:T.granularity=h,T.ellipsoid=f,y){let p=0;for(t=0;t<g-1;t++)p+=a(l[t],l[t+1],e)+1;o=new Float64Array(3*p),n=new Uint8Array(4*p),T.positions=U,T.height=q;let h=0;for(t=0;t<g-1;++t){U[0]=l[t],U[1]=l[t+1],q[0]=k[t],q[1]=k[t+1];let e=c(T);if(u(s)){let o=e.length/3;i=s[t];for(let e=0;e<o;++e)n[h++]=r.floatToByte(i.red),n[h++]=r.floatToByte(i.green),n[h++]=r.floatToByte(i.blue),n[h++]=r.floatToByte(i.alpha)}o.set(e,d),d+=e.length}}else if(T.positions=l,T.height=k,o=new Float64Array(c(T)),u(s)){for(n=new Uint8Array(o.length/3*4),t=0;t<g-1;++t){d=Z(l[t],l[t+1],s[t],s[t+1],m,n,d)}let e=s[g-1];n[d++]=r.floatToByte(e.red),n[d++]=r.floatToByte(e.green),n[d++]=r.floatToByte(e.blue),n[d++]=r.floatToByte(e.alpha)}}else{a=y?2*g-2:g,o=new Float64Array(3*a),n=u(s)?new Uint8Array(4*a):void 0;let e=0,c=0;for(t=0;t<g;++t){let a=l[t];if(y&&t>0&&(A.pack(a,o,e),e+=3,i=s[t-1],n[c++]=r.floatToByte(i.red),n[c++]=r.floatToByte(i.green),n[c++]=r.floatToByte(i.blue),n[c++]=r.floatToByte(i.alpha)),y&&t===g-1)break;A.pack(a,o,e),e+=3,u(s)&&(i=s[t],n[c++]=r.floatToByte(i.red),n[c++]=r.floatToByte(i.green),n[c++]=r.floatToByte(i.blue),n[c++]=r.floatToByte(i.alpha))}}let k=new W;k.position=new H({componentDatatype:v.DOUBLE,componentsPerAttribute:3,values:o}),u(s)&&(k.color=new H({componentDatatype:v.UNSIGNED_BYTE,componentsPerAttribute:4,values:n,normalize:!0})),a=o.length/3;let T=2*(a-1),w=X.createTypedArray(a,T),B=0;for(t=0;t<a-1;++t)w[B++]=t,w[B++]=t+1;return new Q({attributes:k,indices:w,primitiveType:K.LINES,boundingSphere:j.fromPoints(l)})};var Y=O;function x(e,r){return u(r)&&(e=Y.unpack(e,r)),e._ellipsoid=w.clone(e._ellipsoid),Y.createGeometry(e)}var _e=x;export{_e as default};
|