@cesium/engine 26.2.0 → 26.3.1-wasm.0

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.
Files changed (393) hide show
  1. package/Build/ThirdParty/Workers/zip-web-worker.js +707 -600
  2. package/Build/Workers/chunk-2P3WKV6V.js +290 -0
  3. package/Build/Workers/{chunk-M6QKXVAU.js → chunk-2U5272QU.js} +17 -17
  4. package/Build/Workers/{chunk-NEFDMMLY.js → chunk-4KCOC6OZ.js} +8 -10
  5. package/Build/Workers/{chunk-SJYSIOEM.js → chunk-5FULJNWY.js} +11 -13
  6. package/Build/Workers/{chunk-NCL22ZUX.js → chunk-65ZF23AQ.js} +1 -1
  7. package/Build/Workers/{chunk-KP5QD7WU.js → chunk-6D5534B7.js} +10 -12
  8. package/Build/Workers/{chunk-FX3VEAIU.js → chunk-6GFMBHBD.js} +19 -19
  9. package/Build/Workers/{chunk-A62YI6S6.js → chunk-6VRGQF3D.js} +4 -4
  10. package/Build/Workers/{chunk-DSGLDRTI.js → chunk-6XUIECFB.js} +4 -6
  11. package/Build/Workers/{chunk-HDL4HOXZ.js → chunk-7KWUH6RK.js} +14 -14
  12. package/Build/Workers/{chunk-UAZUP4I5.js → chunk-7ZBJRQQT.js} +7 -7
  13. package/Build/Workers/{chunk-CRCGE4J4.js → chunk-AEHANE5A.js} +991 -5612
  14. package/Build/Workers/chunk-AUU74SIZ.js +2420 -0
  15. package/Build/Workers/{chunk-ARZICEEP.js → chunk-B6V5NMIE.js} +13 -11
  16. package/Build/Workers/{chunk-76FDC45O.js → chunk-BRQ52ASU.js} +15 -17
  17. package/Build/Workers/{chunk-SA2A2AN5.js → chunk-FVLSQBPH.js} +7 -14
  18. package/Build/Workers/{chunk-CUTRKXUQ.js → chunk-IFKM2GZR.js} +12 -12
  19. package/Build/Workers/{chunk-NSKZ6SBK.js → chunk-KF6OEWVT.js} +17 -17
  20. package/Build/Workers/{chunk-O3DKEX7Q.js → chunk-KOAXSU77.js} +5 -7
  21. package/Build/Workers/{chunk-2Z4ZLVOD.js → chunk-KRVYCMGN.js} +6 -6
  22. package/Build/Workers/{chunk-SXSP3JHS.js → chunk-LTZRLNQP.js} +1 -1
  23. package/Build/Workers/{chunk-6FZDPMTO.js → chunk-M7WEAGWT.js} +8 -8
  24. package/Build/Workers/{chunk-NXGQBQWE.js → chunk-MJTLGN63.js} +14 -14
  25. package/Build/Workers/{chunk-XCBZVTIV.js → chunk-MUNZ77KV.js} +1 -1
  26. package/Build/Workers/{chunk-NLLCQBX3.js → chunk-NC5BUJEF.js} +2 -2
  27. package/Build/Workers/chunk-NYKURYFR.js +2131 -0
  28. package/Build/Workers/{chunk-5LSOO2KD.js → chunk-NZAQG57U.js} +7 -7
  29. package/Build/Workers/{chunk-DZUFEE4L.js → chunk-O5GUOP2G.js} +5 -7
  30. package/Build/Workers/{chunk-D6AY775A.js → chunk-OQUOLQTN.js} +8 -10
  31. package/Build/Workers/{chunk-CDJDJ5LK.js → chunk-OUG5JB2K.js} +16 -14
  32. package/Build/Workers/{chunk-ACTVJHSP.js → chunk-P4SDLSGF.js} +13 -6
  33. package/Build/Workers/{chunk-MAAHFYPC.js → chunk-P6PC2OIM.js} +7 -7
  34. package/Build/Workers/{chunk-6YR6JBMY.js → chunk-PPRK3XQU.js} +31 -35
  35. package/Build/Workers/{chunk-IMBVP57H.js → chunk-QGTYLWOT.js} +2 -2
  36. package/Build/Workers/{chunk-FCP2QY4G.js → chunk-QHTLIQUH.js} +5 -7
  37. package/Build/Workers/{chunk-EZGQPOIG.js → chunk-ROHWZQZ5.js} +5 -5
  38. package/Build/Workers/{chunk-B3QHNA4A.js → chunk-SNUWISJO.js} +6 -8
  39. package/Build/Workers/{chunk-XDWCTQCZ.js → chunk-T67YY3KP.js} +4 -2
  40. package/Build/Workers/{chunk-IJZJMIUY.js → chunk-TF5473GK.js} +13 -13
  41. package/Build/Workers/{chunk-OZGPS7FB.js → chunk-THHFTMAL.js} +4 -6
  42. package/Build/Workers/{chunk-PRWUMCXF.js → chunk-UFCZ62WM.js} +15 -13
  43. package/Build/Workers/{chunk-27FWRTJI.js → chunk-UV2YC2Q5.js} +11 -11
  44. package/Build/Workers/{chunk-N7CCOFLX.js → chunk-V4ICCWYA.js} +1 -1
  45. package/Build/Workers/{chunk-GHXVQVUM.js → chunk-VC6XXI2Z.js} +9 -9
  46. package/Build/Workers/{chunk-I74ZH5LK.js → chunk-VXJ6P4UI.js} +10 -10
  47. package/Build/Workers/{chunk-KGXSYGBG.js → chunk-W2BKP7G7.js} +15 -17
  48. package/Build/Workers/{chunk-LDRQSYBN.js → chunk-WMVGNBSH.js} +2 -2
  49. package/Build/Workers/{chunk-SMTGMFBL.js → chunk-XFZMQZSZ.js} +4 -4
  50. package/Build/Workers/{chunk-7MM3N2VE.js → chunk-XJ532R6R.js} +20 -20
  51. package/Build/Workers/{chunk-NJVBJG63.js → chunk-YJNU4SM4.js} +5 -5
  52. package/Build/Workers/{chunk-DIGUUD6G.js → chunk-YJRDTEHQ.js} +8 -8
  53. package/Build/Workers/chunk-YUICDZKO.js +2660 -0
  54. package/Build/Workers/{chunk-O3XFXGPZ.js → chunk-Z3DEVGJV.js} +7 -7
  55. package/Build/Workers/{chunk-3PSS3T43.js → chunk-ZECGI7UZ.js} +4 -4
  56. package/Build/Workers/{chunk-QFSSCLLZ.js → chunk-ZFLPVPUJ.js} +6 -8
  57. package/Build/Workers/{chunk-2RGJPWQX.js → chunk-ZIM5H2DB.js} +11 -11
  58. package/Build/Workers/{chunk-GVA7XQI2.js → chunk-ZSQMGGSB.js} +14 -16
  59. package/Build/Workers/{chunk-FU4BGABC.js → chunk-ZWYRGMBK.js} +16 -18
  60. package/Build/Workers/{chunk-JKXV6PG5.js → chunk-ZY733NZA.js} +1 -1
  61. package/Build/Workers/combineGeometry.js +24 -24
  62. package/Build/Workers/createBoxGeometry.js +18 -18
  63. package/Build/Workers/createBoxOutlineGeometry.js +20 -19
  64. package/Build/Workers/createCircleGeometry.js +28 -27
  65. package/Build/Workers/createCircleOutlineGeometry.js +21 -20
  66. package/Build/Workers/createCoplanarPolygonGeometry.js +34 -34
  67. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +33 -32
  68. package/Build/Workers/createCorridorGeometry.js +31 -31
  69. package/Build/Workers/createCorridorOutlineGeometry.js +30 -30
  70. package/Build/Workers/createCylinderGeometry.js +20 -20
  71. package/Build/Workers/createCylinderOutlineGeometry.js +22 -21
  72. package/Build/Workers/createEllipseGeometry.js +26 -26
  73. package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
  74. package/Build/Workers/createEllipsoidGeometry.js +19 -19
  75. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
  76. package/Build/Workers/createFrustumGeometry.js +18 -18
  77. package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
  78. package/Build/Workers/createGeometry.js +27 -26
  79. package/Build/Workers/createGroundPolylineGeometry.js +27 -26
  80. package/Build/Workers/createPlaneGeometry.js +18 -17
  81. package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
  82. package/Build/Workers/createPolygonGeometry.js +35 -35
  83. package/Build/Workers/createPolygonOutlineGeometry.js +34 -34
  84. package/Build/Workers/createPolylineGeometry.js +28 -29
  85. package/Build/Workers/createPolylineVolumeGeometry.js +34 -35
  86. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +30 -31
  87. package/Build/Workers/createRectangleGeometry.js +30 -30
  88. package/Build/Workers/createRectangleOutlineGeometry.js +23 -24
  89. package/Build/Workers/createSimplePolylineGeometry.js +26 -27
  90. package/Build/Workers/createSphereGeometry.js +19 -19
  91. package/Build/Workers/createSphereOutlineGeometry.js +18 -18
  92. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  93. package/Build/Workers/createVectorTileClampedPolylines.js +17 -16
  94. package/Build/Workers/createVectorTileGeometries.js +24 -24
  95. package/Build/Workers/createVectorTilePoints.js +13 -13
  96. package/Build/Workers/createVectorTilePolygons.js +22 -22
  97. package/Build/Workers/createVectorTilePolylines.js +17 -16
  98. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +36 -26
  99. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +24 -24
  100. package/Build/Workers/createVerticesFromHeightmap.js +24 -25
  101. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
  102. package/Build/Workers/createWallGeometry.js +27 -28
  103. package/Build/Workers/createWallOutlineGeometry.js +26 -27
  104. package/Build/Workers/decodeDraco.js +16 -12
  105. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +336 -337
  106. package/Build/Workers/decodeI3S.js +17 -12
  107. package/Build/Workers/{chunk-GXWQZBAI.js → decodeMeshopt.js} +23 -29
  108. package/Build/Workers/decodeSpz.js +1960 -0
  109. package/Build/Workers/gaussianSplatSorter.js +13 -6
  110. package/Build/Workers/gaussianSplatTextureGenerator.js +13 -6
  111. package/Build/Workers/incrementallyBuildTerrainPicker.js +9 -10
  112. package/Build/Workers/transcodeKTX2.js +26 -12
  113. package/Build/Workers/transferTypedArrayTest.js +1 -1
  114. package/Build/Workers/upsampleQuantizedTerrainMesh.js +24 -24
  115. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
  116. package/Source/Core/Cesium3DTilesTerrainData.js +11 -1
  117. package/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js +33 -23
  118. package/Source/Core/Ion.js +1 -1
  119. package/Source/Core/IonResource.js +5 -0
  120. package/Source/Core/IonSnapGeometryType.js +59 -0
  121. package/Source/Core/IonSnapHeat.js +33 -0
  122. package/Source/Core/IonSnapMode.js +45 -0
  123. package/Source/Core/IonSnapParentGeometryType.js +52 -0
  124. package/Source/Core/IonSnapService.js +369 -0
  125. package/Source/Core/KTX2Transcoder.js +99 -5
  126. package/Source/Core/Resource.js +2 -0
  127. package/Source/Core/SnapService.js +63 -0
  128. package/Source/Core/TaskProcessor.js +249 -129
  129. package/Source/Core/TrustedServers.js +34 -1
  130. package/Source/Core/VectorPipeline.js +139 -45
  131. package/Source/Core/VectorProvider.js +311 -71
  132. package/Source/Core/WebAssemblyWorkerInitializer.js +125 -0
  133. package/Source/Core/fetchWebAssemblyBinary.js +52 -0
  134. package/Source/Renderer/AutomaticUniforms.js +44 -2
  135. package/Source/Renderer/ShaderBuilder.js +1 -1
  136. package/Source/Renderer/UniformState.js +47 -1
  137. package/Source/Scene/ArcGisMapService.js +1 -1
  138. package/Source/Scene/BufferPointCollection.js +4 -7
  139. package/Source/Scene/BufferPolygonCollection.js +56 -27
  140. package/Source/Scene/BufferPolylineCollection.js +61 -8
  141. package/Source/Scene/BufferPolylineMaterial.js +6 -5
  142. package/Source/Scene/BufferPrimitiveCollection.js +199 -29
  143. package/Source/Scene/Cesium3DTile.js +12 -0
  144. package/Source/Scene/Cesium3DTileset.js +61 -8
  145. package/Source/Scene/Cesium3DTilesetBaseTraversal.js +15 -3
  146. package/Source/Scene/Cesium3DTilesetCache.js +15 -0
  147. package/Source/Scene/ClippingPolygon.js +154 -100
  148. package/Source/Scene/ClippingPolygonCollection.js +352 -694
  149. package/Source/Scene/CreditDisplay.js +62 -0
  150. package/Source/Scene/GaussianSplatPrimitive.js +153 -66
  151. package/Source/Scene/GeoJsonPrimitive.js +114 -24
  152. package/Source/Scene/GlobeSurfaceShaderSet.js +33 -54
  153. package/Source/Scene/GlobeSurfaceTile.js +14 -1
  154. package/Source/Scene/GlobeSurfaceTileProvider.js +232 -25
  155. package/Source/Scene/GltfBufferViewLoader.js +25 -13
  156. package/Source/Scene/GltfLoader.js +56 -6
  157. package/Source/Scene/GltfSpzLoader.js +5 -4
  158. package/Source/Scene/HeightReference.js +1 -1
  159. package/Source/Scene/MVTDataProvider.js +9 -0
  160. package/Source/Scene/Model/Model.js +242 -16
  161. package/Source/Scene/Model/Model3DTileContent.js +5 -0
  162. package/Source/Scene/Model/ModelClippingPolygonsPipelineStage.js +54 -19
  163. package/Source/Scene/Model/ModelRenderResources.js +2 -3
  164. package/Source/Scene/Model/ModelSceneGraph.js +10 -1
  165. package/Source/Scene/Model/ModelVectorLookupPipelineStage.js +205 -0
  166. package/Source/Scene/Model/PickingPipelineStage.js +4 -0
  167. package/Source/Scene/PostProcessStage.js +22 -3
  168. package/Source/Scene/Scene.js +56 -1
  169. package/Source/Scene/Snapping.js +57 -0
  170. package/Source/Scene/SpzDecoder.js +106 -0
  171. package/Source/Scene/UrlTemplate3DTilesDataProvider.js +12 -1
  172. package/Source/Scene/VectorGltf3DTileContent.js +10 -2
  173. package/Source/Scene/WebMapServiceImageryProvider.js +5 -1
  174. package/Source/Scene/WebMapTileServiceImageryProvider.js +6 -1
  175. package/Source/Scene/renderBufferPolylineCollection.js +5 -1
  176. package/Source/Shaders/BufferPolylineMaterialVS.glsl +14 -2
  177. package/Source/Shaders/BufferPolylineMaterialVS.js +14 -2
  178. package/Source/Shaders/Builtin/CzmBuiltins.js +2 -4
  179. package/Source/Shaders/Builtin/Functions/eyeToCartographicDelta.glsl +74 -0
  180. package/Source/Shaders/Builtin/Functions/eyeToCartographicDelta.js +76 -0
  181. package/Source/Shaders/GlobeFS.glsl +10 -9
  182. package/Source/Shaders/GlobeFS.js +11 -9
  183. package/Source/Shaders/GlobeVS.glsl +0 -32
  184. package/Source/Shaders/GlobeVS.js +0 -32
  185. package/Source/Shaders/Model/ModelClippingPolygonsStageFS.glsl +15 -3
  186. package/Source/Shaders/Model/ModelClippingPolygonsStageFS.js +15 -3
  187. package/Source/Shaders/Model/ModelClippingPolygonsStageVS.glsl +20 -24
  188. package/Source/Shaders/Model/ModelClippingPolygonsStageVS.js +20 -24
  189. package/Source/Shaders/Model/ModelFS.glsl +4 -0
  190. package/Source/Shaders/Model/ModelFS.js +4 -0
  191. package/Source/Shaders/Model/ModelVS.glsl +7 -2
  192. package/Source/Shaders/Model/ModelVS.js +7 -2
  193. package/Source/Shaders/Model/ModelVectorLookupStageFS.glsl +6 -0
  194. package/Source/Shaders/Model/ModelVectorLookupStageFS.js +8 -0
  195. package/Source/Shaders/Model/ModelVectorLookupStageVS.glsl +15 -0
  196. package/Source/Shaders/Model/ModelVectorLookupStageVS.js +17 -0
  197. package/Source/Shaders/Model/VerticalExaggerationStageVS.glsl +9 -10
  198. package/Source/Shaders/Model/VerticalExaggerationStageVS.js +9 -11
  199. package/Source/Shaders/VectorCommon.glsl +177 -50
  200. package/Source/Shaders/VectorCommon.js +251 -19
  201. package/Source/ThirdParty/Workers/zip-web-worker.js +1 -1
  202. package/Source/ThirdParty/zip-module.wasm +0 -0
  203. package/Source/Workers/createTaskProcessorWorker.js +2 -0
  204. package/Source/Workers/createVerticesFromCesium3DTilesTerrain.js +13 -1
  205. package/Source/Workers/decodeDraco.js +7 -3
  206. package/Source/Workers/decodeI3S.js +7 -3
  207. package/Source/Workers/decodeMeshopt.js +21 -0
  208. package/Source/Workers/decodeSpz.js +20 -0
  209. package/Source/Workers/gaussianSplatSorter.js +7 -3
  210. package/Source/Workers/gaussianSplatTextureGenerator.js +7 -3
  211. package/Source/Workers/transcodeKTX2.js +22 -5
  212. package/index.d.ts +649 -55
  213. package/index.js +23 -13
  214. package/package.json +6 -6
  215. package/Build/Workers/chunk-2EFYUSUY.js +0 -1483
  216. package/Build/Workers/chunk-2H5264K7.js +0 -1284
  217. package/Build/Workers/chunk-2H73KDBM.js +0 -511
  218. package/Build/Workers/chunk-2ZKH2QZB.js +0 -387
  219. package/Build/Workers/chunk-36NI5E6W.js +0 -3820
  220. package/Build/Workers/chunk-37SW7SYS.js +0 -778
  221. package/Build/Workers/chunk-3GHVJ3SO.js +0 -455
  222. package/Build/Workers/chunk-3LB4UVPU.js +0 -387
  223. package/Build/Workers/chunk-3PONLKEL.js +0 -778
  224. package/Build/Workers/chunk-3QR662HH.js +0 -3820
  225. package/Build/Workers/chunk-3SX2WYSO.js +0 -973
  226. package/Build/Workers/chunk-3UDN6LYX.js +0 -476
  227. package/Build/Workers/chunk-47MCBSXI.js +0 -9237
  228. package/Build/Workers/chunk-4E626OCE.js +0 -1067
  229. package/Build/Workers/chunk-4NW2MJKH.js +0 -455
  230. package/Build/Workers/chunk-52YK5BSN.js +0 -198
  231. package/Build/Workers/chunk-5RNAQZK6.js +0 -9234
  232. package/Build/Workers/chunk-5YPQBFRD.js +0 -519
  233. package/Build/Workers/chunk-6FHT43QR.js +0 -140
  234. package/Build/Workers/chunk-6HK6IXK2.js +0 -138
  235. package/Build/Workers/chunk-6R5X2GUA.js +0 -1284
  236. package/Build/Workers/chunk-7A2OGDHT.js +0 -305
  237. package/Build/Workers/chunk-7CGEQUM2.js +0 -305
  238. package/Build/Workers/chunk-7D2HZKH7.js +0 -455
  239. package/Build/Workers/chunk-7I325HV6.js +0 -1344
  240. package/Build/Workers/chunk-7KVKHY7O.js +0 -147
  241. package/Build/Workers/chunk-7TKLTCZW.js +0 -219
  242. package/Build/Workers/chunk-7UUKBDH6.js +0 -1054
  243. package/Build/Workers/chunk-7W6DUHAB.js +0 -693
  244. package/Build/Workers/chunk-7XM5JK5F.js +0 -162
  245. package/Build/Workers/chunk-7YG3ND3P.js +0 -454
  246. package/Build/Workers/chunk-A3O6EDBK.js +0 -73
  247. package/Build/Workers/chunk-A6X24AZI.js +0 -1992
  248. package/Build/Workers/chunk-A7TTWVTF.js +0 -2719
  249. package/Build/Workers/chunk-ADX3CBKD.js +0 -9234
  250. package/Build/Workers/chunk-AF7DTMJ7.js +0 -398
  251. package/Build/Workers/chunk-AHWAZRBV.js +0 -82
  252. package/Build/Workers/chunk-AJSFRY4U.js +0 -1344
  253. package/Build/Workers/chunk-B4CQSLZJ.js +0 -305
  254. package/Build/Workers/chunk-BKPQFCXH.js +0 -511
  255. package/Build/Workers/chunk-BSPCI2LO.js +0 -959
  256. package/Build/Workers/chunk-BUJWSX5S.js +0 -301
  257. package/Build/Workers/chunk-C7JQVRLM.js +0 -497
  258. package/Build/Workers/chunk-C7QDUNI3.js +0 -138
  259. package/Build/Workers/chunk-CEEZE3YZ.js +0 -476
  260. package/Build/Workers/chunk-CIV5DJOQ.js +0 -778
  261. package/Build/Workers/chunk-CLCTQVVL.js +0 -241
  262. package/Build/Workers/chunk-CQNFIAZU.js +0 -56
  263. package/Build/Workers/chunk-DBD5WWG2.js +0 -959
  264. package/Build/Workers/chunk-DZBQUULR.js +0 -138
  265. package/Build/Workers/chunk-E2NKV5YT.js +0 -3820
  266. package/Build/Workers/chunk-E7NZJOK7.js +0 -3792
  267. package/Build/Workers/chunk-EB3Y5P3A.js +0 -368
  268. package/Build/Workers/chunk-EHTS2YPT.js +0 -2719
  269. package/Build/Workers/chunk-ELE6SC2C.js +0 -837
  270. package/Build/Workers/chunk-ENNFMWDW.js +0 -789
  271. package/Build/Workers/chunk-EOWDZN5S.js +0 -288
  272. package/Build/Workers/chunk-ERKUET22.js +0 -3201
  273. package/Build/Workers/chunk-F2IMBMZY.js +0 -241
  274. package/Build/Workers/chunk-F4CSNRZO.js +0 -219
  275. package/Build/Workers/chunk-FBP4DUQJ.js +0 -693
  276. package/Build/Workers/chunk-FDK4K5IA.js +0 -280
  277. package/Build/Workers/chunk-FGQFQHN5.js +0 -1054
  278. package/Build/Workers/chunk-FJWZMGOQ.js +0 -1992
  279. package/Build/Workers/chunk-FQ42MT7M.js +0 -58
  280. package/Build/Workers/chunk-GGNWQWSB.js +0 -301
  281. package/Build/Workers/chunk-GNKXEN4C.js +0 -682
  282. package/Build/Workers/chunk-GSWMAFTE.js +0 -9230
  283. package/Build/Workers/chunk-GXDHRC4J.js +0 -1344
  284. package/Build/Workers/chunk-GYSYP6PC.js +0 -1067
  285. package/Build/Workers/chunk-H2WCFXLP.js +0 -241
  286. package/Build/Workers/chunk-HHV3MCGV.js +0 -162
  287. package/Build/Workers/chunk-HLW2ZRVK.js +0 -368
  288. package/Build/Workers/chunk-HS6AD4P2.js +0 -398
  289. package/Build/Workers/chunk-HT6FASOT.js +0 -973
  290. package/Build/Workers/chunk-IDVHUDZT.js +0 -352
  291. package/Build/Workers/chunk-IGAZBTFZ.js +0 -3201
  292. package/Build/Workers/chunk-ILME5BXA.js +0 -301
  293. package/Build/Workers/chunk-IOO7Z2AV.js +0 -57
  294. package/Build/Workers/chunk-IUIFLOYO.js +0 -44
  295. package/Build/Workers/chunk-J73T2VOY.js +0 -171
  296. package/Build/Workers/chunk-JALGQYDY.js +0 -288
  297. package/Build/Workers/chunk-JW6OZT4R.js +0 -288
  298. package/Build/Workers/chunk-JXYLJCTC.js +0 -124
  299. package/Build/Workers/chunk-K27QOAW6.js +0 -97
  300. package/Build/Workers/chunk-KMV25A63.js +0 -789
  301. package/Build/Workers/chunk-KZWFWJML.js +0 -2719
  302. package/Build/Workers/chunk-LCXRRALY.js +0 -387
  303. package/Build/Workers/chunk-LD64RPYV.js +0 -368
  304. package/Build/Workers/chunk-LGNDTZVX.js +0 -97
  305. package/Build/Workers/chunk-LNSQVXFH.js +0 -1800
  306. package/Build/Workers/chunk-M4JZ6TSZ.js +0 -959
  307. package/Build/Workers/chunk-MCJDRDJQ.js +0 -102
  308. package/Build/Workers/chunk-MEENMEAH.js +0 -198
  309. package/Build/Workers/chunk-NAWU5RF4.js +0 -162
  310. package/Build/Workers/chunk-NIWITKQK.js +0 -693
  311. package/Build/Workers/chunk-OA6MYL2C.js +0 -837
  312. package/Build/Workers/chunk-OBEU25PI.js +0 -1067
  313. package/Build/Workers/chunk-OHP4ELS7.js +0 -198
  314. package/Build/Workers/chunk-PCL3Y7H5.js +0 -82
  315. package/Build/Workers/chunk-PD4GK4EM.js +0 -57
  316. package/Build/Workers/chunk-PEDU33QG.js +0 -2342
  317. package/Build/Workers/chunk-PVTSNNVI.js +0 -288
  318. package/Build/Workers/chunk-QHPZH22L.js +0 -241
  319. package/Build/Workers/chunk-QIZDWZK6.js +0 -301
  320. package/Build/Workers/chunk-QV6DG2YX.js +0 -1483
  321. package/Build/Workers/chunk-QVLAFFJY.js +0 -56
  322. package/Build/Workers/chunk-R4FPNAZ2.js +0 -352
  323. package/Build/Workers/chunk-R4K7EHOU.js +0 -171
  324. package/Build/Workers/chunk-R7JGHDD6.js +0 -789
  325. package/Build/Workers/chunk-RASQEYD4.js +0 -1483
  326. package/Build/Workers/chunk-RG4F5R57.js +0 -454
  327. package/Build/Workers/chunk-RW6ITX7Q.js +0 -3820
  328. package/Build/Workers/chunk-RYSQVJR6.js +0 -398
  329. package/Build/Workers/chunk-S6RJU5NM.js +0 -1054
  330. package/Build/Workers/chunk-SDFHDNS4.js +0 -147
  331. package/Build/Workers/chunk-SF6K72D7.js +0 -124
  332. package/Build/Workers/chunk-SGRGNDOD.js +0 -682
  333. package/Build/Workers/chunk-SM2CDCYF.js +0 -198
  334. package/Build/Workers/chunk-SS5ABQGY.js +0 -102
  335. package/Build/Workers/chunk-T5QBPLE3.js +0 -414
  336. package/Build/Workers/chunk-TN35HP5B.js +0 -1067
  337. package/Build/Workers/chunk-TNWKJNUZ.js +0 -454
  338. package/Build/Workers/chunk-TOAF47AQ.js +0 -102
  339. package/Build/Workers/chunk-TQ4QCOXT.js +0 -2719
  340. package/Build/Workers/chunk-TSDSILQB.js +0 -124
  341. package/Build/Workers/chunk-TVZD72WJ.js +0 -778
  342. package/Build/Workers/chunk-U5LV3F3Z.js +0 -1054
  343. package/Build/Workers/chunk-UEY73NRN.js +0 -38
  344. package/Build/Workers/chunk-UF46SZEZ.js +0 -789
  345. package/Build/Workers/chunk-UNRTMCET.js +0 -398
  346. package/Build/Workers/chunk-UTB7U3O6.js +0 -1992
  347. package/Build/Workers/chunk-UVO6COT2.js +0 -352
  348. package/Build/Workers/chunk-V46YGZE6.js +0 -352
  349. package/Build/Workers/chunk-VAL7DYNR.js +0 -278
  350. package/Build/Workers/chunk-VDGOCROW.js +0 -57
  351. package/Build/Workers/chunk-VFWSSBPT.js +0 -511
  352. package/Build/Workers/chunk-VVYMXI3I.js +0 -1284
  353. package/Build/Workers/chunk-VXWHPYQM.js +0 -837
  354. package/Build/Workers/chunk-VXYUBRSB.js +0 -219
  355. package/Build/Workers/chunk-VZLDLEWI.js +0 -387
  356. package/Build/Workers/chunk-W5OCKMPJ.js +0 -101
  357. package/Build/Workers/chunk-WBSY7HDY.js +0 -837
  358. package/Build/Workers/chunk-WN3F4CVG.js +0 -3201
  359. package/Build/Workers/chunk-WPRUWXGV.js +0 -693
  360. package/Build/Workers/chunk-WTO2ERBP.js +0 -414
  361. package/Build/Workers/chunk-WVHMDVG4.js +0 -959
  362. package/Build/Workers/chunk-XGA23TAX.js +0 -73
  363. package/Build/Workers/chunk-XLQZNQ4Z.js +0 -163
  364. package/Build/Workers/chunk-XLXSDIP5.js +0 -973
  365. package/Build/Workers/chunk-XQ3SKCMM.js +0 -140
  366. package/Build/Workers/chunk-XQH66YJC.js +0 -147
  367. package/Build/Workers/chunk-XTA7BXJG.js +0 -682
  368. package/Build/Workers/chunk-XTIDAFRS.js +0 -476
  369. package/Build/Workers/chunk-XUEDWBUD.js +0 -682
  370. package/Build/Workers/chunk-XYFLRH3H.js +0 -124
  371. package/Build/Workers/chunk-Y7JRTRTO.js +0 -305
  372. package/Build/Workers/chunk-Y7QSMDCJ.js +0 -352
  373. package/Build/Workers/chunk-YCB5TYTR.js +0 -1483
  374. package/Build/Workers/chunk-YEYOSTJX.js +0 -219
  375. package/Build/Workers/chunk-YGFVAGYF.js +0 -630
  376. package/Build/Workers/chunk-YIIACKQO.js +0 -368
  377. package/Build/Workers/chunk-YJGSP6PE.js +0 -511
  378. package/Build/Workers/chunk-YKU2Q3A2.js +0 -1287
  379. package/Build/Workers/chunk-Z4LR5EHE.js +0 -454
  380. package/Build/Workers/chunk-Z66EVE2A.js +0 -44
  381. package/Build/Workers/chunk-ZHIHHHTB.js +0 -414
  382. package/Build/Workers/chunk-ZMBHFYOX.js +0 -1344
  383. package/Build/Workers/chunk-ZNWHFSLE.js +0 -171
  384. package/Build/Workers/chunk-ZQLZG4IN.js +0 -2342
  385. package/Build/Workers/chunk-ZRTSMUZ2.js +0 -414
  386. package/Build/Workers/chunk-ZSGUV73H.js +0 -2342
  387. package/Build/Workers/chunk-ZZUVT5BM.js +0 -476
  388. package/Source/Shaders/Builtin/Functions/clipPolygons.glsl +0 -37
  389. package/Source/Shaders/Builtin/Functions/clipPolygons.js +0 -39
  390. package/Source/Shaders/Builtin/Functions/unpackClippingExtents.glsl +0 -14
  391. package/Source/Shaders/Builtin/Functions/unpackClippingExtents.js +0 -15
  392. package/Source/Shaders/PolygonSignedDistanceFS.glsl +0 -131
  393. package/Source/Shaders/PolygonSignedDistanceFS.js +0 -132
@@ -1,352 +0,0 @@
1
- /**
2
- * @license
3
- * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.143.0
5
- *
6
- * Copyright 2011-2022 Cesium Contributors
7
- *
8
- * Licensed under the Apache License, Version 2.0 (the "License");
9
- * you may not use this file except in compliance with the License.
10
- * You may obtain a copy of the License at
11
- *
12
- * http://www.apache.org/licenses/LICENSE-2.0
13
- *
14
- * Unless required by applicable law or agreed to in writing, software
15
- * distributed under the License is distributed on an "AS IS" BASIS,
16
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- * See the License for the specific language governing permissions and
18
- * limitations under the License.
19
- *
20
- * Columbus View (Pat. Pend.)
21
- *
22
- * Portions licensed separately.
23
- * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
- */
25
-
26
- import {
27
- IndexDatatype_default
28
- } from "./chunk-XQ3SKCMM.js";
29
- import {
30
- Math_default
31
- } from "./chunk-C7JQVRLM.js";
32
- import {
33
- DeveloperError_default
34
- } from "./chunk-6YR6JBMY.js";
35
- import {
36
- defined_default
37
- } from "./chunk-AHWAZRBV.js";
38
-
39
- // packages/engine/Source/Core/TerrainProvider.js
40
- function TerrainProvider() {
41
- DeveloperError_default.throwInstantiationError();
42
- }
43
- Object.defineProperties(TerrainProvider.prototype, {
44
- /**
45
- * Gets an event that is raised when the terrain provider encounters an asynchronous error. By subscribing
46
- * to the event, you will be notified of the error and can potentially recover from it. Event listeners
47
- * are passed an instance of {@link TileProviderError}.
48
- * @memberof TerrainProvider.prototype
49
- * @type {Event<TerrainProvider.ErrorEvent>}
50
- * @readonly
51
- */
52
- errorEvent: {
53
- get: DeveloperError_default.throwInstantiationError
54
- },
55
- /**
56
- * Gets the credit to display when this terrain provider is active. Typically this is used to credit
57
- * the source of the terrain.
58
- * @memberof TerrainProvider.prototype
59
- * @type {Credit}
60
- * @readonly
61
- */
62
- credit: {
63
- get: DeveloperError_default.throwInstantiationError
64
- },
65
- /**
66
- * Gets the tiling scheme used by the provider.
67
- * @memberof TerrainProvider.prototype
68
- * @type {TilingScheme}
69
- * @readonly
70
- */
71
- tilingScheme: {
72
- get: DeveloperError_default.throwInstantiationError
73
- },
74
- /**
75
- * Gets a value indicating whether or not the provider includes a water mask. The water mask
76
- * indicates which areas of the globe are water rather than land, so they can be rendered
77
- * as a reflective surface with animated waves.
78
- * @memberof TerrainProvider.prototype
79
- * @type {boolean}
80
- * @readonly
81
- */
82
- hasWaterMask: {
83
- get: DeveloperError_default.throwInstantiationError
84
- },
85
- /**
86
- * Gets a value indicating whether or not the requested tiles include vertex normals.
87
- * @memberof TerrainProvider.prototype
88
- * @type {boolean}
89
- * @readonly
90
- */
91
- hasVertexNormals: {
92
- get: DeveloperError_default.throwInstantiationError
93
- },
94
- /**
95
- * Gets an object that can be used to determine availability of terrain from this provider, such as
96
- * at points and in rectangles. This property may be undefined if availability
97
- * information is not available.
98
- * @memberof TerrainProvider.prototype
99
- * @type {TileAvailability|undefined}
100
- * @readonly
101
- */
102
- availability: {
103
- get: DeveloperError_default.throwInstantiationError
104
- }
105
- });
106
- var regularGridIndicesCache = [];
107
- TerrainProvider.getRegularGridIndices = function(width, height) {
108
- if (width * height >= Math_default.FOUR_GIGABYTES) {
109
- throw new DeveloperError_default(
110
- "The total number of vertices (width * height) must be less than 4,294,967,296."
111
- );
112
- }
113
- let byWidth = regularGridIndicesCache[width];
114
- if (!defined_default(byWidth)) {
115
- regularGridIndicesCache[width] = byWidth = [];
116
- }
117
- let indices = byWidth[height];
118
- if (!defined_default(indices)) {
119
- if (width * height < Math_default.SIXTY_FOUR_KILOBYTES) {
120
- indices = byWidth[height] = new Uint16Array(
121
- (width - 1) * (height - 1) * 6
122
- );
123
- } else {
124
- indices = byWidth[height] = new Uint32Array(
125
- (width - 1) * (height - 1) * 6
126
- );
127
- }
128
- addRegularGridIndices(width, height, indices, 0);
129
- }
130
- return indices;
131
- };
132
- var regularGridAndEdgeIndicesCache = [];
133
- TerrainProvider.getRegularGridIndicesAndEdgeIndices = function(width, height) {
134
- if (width * height >= Math_default.FOUR_GIGABYTES) {
135
- throw new DeveloperError_default(
136
- "The total number of vertices (width * height) must be less than 4,294,967,296."
137
- );
138
- }
139
- let byWidth = regularGridAndEdgeIndicesCache[width];
140
- if (!defined_default(byWidth)) {
141
- regularGridAndEdgeIndicesCache[width] = byWidth = [];
142
- }
143
- let indicesAndEdges = byWidth[height];
144
- if (!defined_default(indicesAndEdges)) {
145
- const indices = TerrainProvider.getRegularGridIndices(width, height);
146
- const edgeIndices = getEdgeIndices(width, height);
147
- const westIndicesSouthToNorth = edgeIndices.westIndicesSouthToNorth;
148
- const southIndicesEastToWest = edgeIndices.southIndicesEastToWest;
149
- const eastIndicesNorthToSouth = edgeIndices.eastIndicesNorthToSouth;
150
- const northIndicesWestToEast = edgeIndices.northIndicesWestToEast;
151
- indicesAndEdges = byWidth[height] = {
152
- indices,
153
- westIndicesSouthToNorth,
154
- southIndicesEastToWest,
155
- eastIndicesNorthToSouth,
156
- northIndicesWestToEast
157
- };
158
- }
159
- return indicesAndEdges;
160
- };
161
- var regularGridAndSkirtAndEdgeIndicesCache = [];
162
- TerrainProvider.getRegularGridAndSkirtIndicesAndEdgeIndices = function(width, height) {
163
- if (width * height >= Math_default.FOUR_GIGABYTES) {
164
- throw new DeveloperError_default(
165
- "The total number of vertices (width * height) must be less than 4,294,967,296."
166
- );
167
- }
168
- let byWidth = regularGridAndSkirtAndEdgeIndicesCache[width];
169
- if (!defined_default(byWidth)) {
170
- regularGridAndSkirtAndEdgeIndicesCache[width] = byWidth = [];
171
- }
172
- let indicesAndEdges = byWidth[height];
173
- if (!defined_default(indicesAndEdges)) {
174
- const gridVertexCount = width * height;
175
- const gridIndexCount = (width - 1) * (height - 1) * 6;
176
- const edgeVertexCount = width * 2 + height * 2;
177
- const edgeIndexCount = Math.max(0, edgeVertexCount - 4) * 6;
178
- const vertexCount = gridVertexCount + edgeVertexCount;
179
- const indexCount = gridIndexCount + edgeIndexCount;
180
- const edgeIndices = getEdgeIndices(width, height);
181
- const westIndicesSouthToNorth = edgeIndices.westIndicesSouthToNorth;
182
- const southIndicesEastToWest = edgeIndices.southIndicesEastToWest;
183
- const eastIndicesNorthToSouth = edgeIndices.eastIndicesNorthToSouth;
184
- const northIndicesWestToEast = edgeIndices.northIndicesWestToEast;
185
- const indices = IndexDatatype_default.createTypedArray(vertexCount, indexCount);
186
- addRegularGridIndices(width, height, indices, 0);
187
- TerrainProvider.addSkirtIndices(
188
- westIndicesSouthToNorth,
189
- southIndicesEastToWest,
190
- eastIndicesNorthToSouth,
191
- northIndicesWestToEast,
192
- gridVertexCount,
193
- indices,
194
- gridIndexCount
195
- );
196
- indicesAndEdges = byWidth[height] = {
197
- indices,
198
- westIndicesSouthToNorth,
199
- southIndicesEastToWest,
200
- eastIndicesNorthToSouth,
201
- northIndicesWestToEast,
202
- indexCountWithoutSkirts: gridIndexCount
203
- };
204
- }
205
- return indicesAndEdges;
206
- };
207
- TerrainProvider.getSkirtVertexCount = function(westIndicesSouthToNorth, southIndicesEastToWest, eastIndicesNorthToSouth, northIndicesWestToEast) {
208
- return westIndicesSouthToNorth.length + southIndicesEastToWest.length + eastIndicesNorthToSouth.length + northIndicesWestToEast.length;
209
- };
210
- TerrainProvider.getSkirtIndexCount = function(skirtVertexCount) {
211
- return (skirtVertexCount - 4) * 2 * 3;
212
- };
213
- TerrainProvider.getSkirtIndexCountWithFilledCorners = function(skirtVertexCount) {
214
- return ((skirtVertexCount - 4) * 2 + 4) * 3;
215
- };
216
- TerrainProvider.addSkirtIndices = function(westIndicesSouthToNorth, southIndicesEastToWest, eastIndicesNorthToSouth, northIndicesWestToEast, vertexCount, indices, offset) {
217
- let vertexIndex = vertexCount;
218
- offset = addSkirtIndices(
219
- westIndicesSouthToNorth,
220
- vertexIndex,
221
- indices,
222
- offset
223
- );
224
- vertexIndex += westIndicesSouthToNorth.length;
225
- offset = addSkirtIndices(
226
- southIndicesEastToWest,
227
- vertexIndex,
228
- indices,
229
- offset
230
- );
231
- vertexIndex += southIndicesEastToWest.length;
232
- offset = addSkirtIndices(
233
- eastIndicesNorthToSouth,
234
- vertexIndex,
235
- indices,
236
- offset
237
- );
238
- vertexIndex += eastIndicesNorthToSouth.length;
239
- addSkirtIndices(northIndicesWestToEast, vertexIndex, indices, offset);
240
- };
241
- TerrainProvider.addSkirtIndicesWithFilledCorners = function(westIndicesSouthToNorth, southIndicesEastToWest, eastIndicesNorthToSouth, northIndicesWestToEast, vertexCount, indices, offset) {
242
- TerrainProvider.addSkirtIndices(
243
- westIndicesSouthToNorth,
244
- southIndicesEastToWest,
245
- eastIndicesNorthToSouth,
246
- northIndicesWestToEast,
247
- vertexCount,
248
- indices,
249
- offset
250
- );
251
- const skirtVertexCount = TerrainProvider.getSkirtVertexCount(
252
- westIndicesSouthToNorth,
253
- southIndicesEastToWest,
254
- eastIndicesNorthToSouth,
255
- northIndicesWestToEast
256
- );
257
- const skirtIndexCountWithoutCaps = TerrainProvider.getSkirtIndexCount(skirtVertexCount);
258
- const cornerStartIdx = offset + skirtIndexCountWithoutCaps;
259
- const cornerSWIndex = westIndicesSouthToNorth[0];
260
- const cornerNWIndex = northIndicesWestToEast[0];
261
- const cornerNEIndex = eastIndicesNorthToSouth[0];
262
- const cornerSEIndex = southIndicesEastToWest[0];
263
- const westSouthIndex = vertexCount;
264
- const westNorthIndex = westSouthIndex + westIndicesSouthToNorth.length - 1;
265
- const southEastIndex = westNorthIndex + 1;
266
- const southWestIndex = southEastIndex + southIndicesEastToWest.length - 1;
267
- const eastNorthIndex = southWestIndex + 1;
268
- const eastSouthIndex = eastNorthIndex + eastIndicesNorthToSouth.length - 1;
269
- const northWestIndex = eastSouthIndex + 1;
270
- const northEastIndex = northWestIndex + northIndicesWestToEast.length - 1;
271
- indices[cornerStartIdx + 0] = cornerSWIndex;
272
- indices[cornerStartIdx + 1] = westSouthIndex;
273
- indices[cornerStartIdx + 2] = southWestIndex;
274
- indices[cornerStartIdx + 3] = cornerSEIndex;
275
- indices[cornerStartIdx + 4] = southEastIndex;
276
- indices[cornerStartIdx + 5] = eastSouthIndex;
277
- indices[cornerStartIdx + 6] = cornerNEIndex;
278
- indices[cornerStartIdx + 7] = eastNorthIndex;
279
- indices[cornerStartIdx + 8] = northEastIndex;
280
- indices[cornerStartIdx + 9] = cornerNWIndex;
281
- indices[cornerStartIdx + 10] = northWestIndex;
282
- indices[cornerStartIdx + 11] = westNorthIndex;
283
- };
284
- function getEdgeIndices(width, height) {
285
- const westIndicesSouthToNorth = new Array(height);
286
- const southIndicesEastToWest = new Array(width);
287
- const eastIndicesNorthToSouth = new Array(height);
288
- const northIndicesWestToEast = new Array(width);
289
- let i;
290
- for (i = 0; i < width; ++i) {
291
- northIndicesWestToEast[i] = i;
292
- southIndicesEastToWest[i] = width * height - 1 - i;
293
- }
294
- for (i = 0; i < height; ++i) {
295
- eastIndicesNorthToSouth[i] = (i + 1) * width - 1;
296
- westIndicesSouthToNorth[i] = (height - i - 1) * width;
297
- }
298
- return {
299
- westIndicesSouthToNorth,
300
- southIndicesEastToWest,
301
- eastIndicesNorthToSouth,
302
- northIndicesWestToEast
303
- };
304
- }
305
- function addRegularGridIndices(width, height, indices, offset) {
306
- let index = 0;
307
- for (let j = 0; j < height - 1; ++j) {
308
- for (let i = 0; i < width - 1; ++i) {
309
- const upperLeft = index;
310
- const lowerLeft = upperLeft + width;
311
- const lowerRight = lowerLeft + 1;
312
- const upperRight = upperLeft + 1;
313
- indices[offset++] = upperLeft;
314
- indices[offset++] = lowerLeft;
315
- indices[offset++] = upperRight;
316
- indices[offset++] = upperRight;
317
- indices[offset++] = lowerLeft;
318
- indices[offset++] = lowerRight;
319
- ++index;
320
- }
321
- ++index;
322
- }
323
- }
324
- function addSkirtIndices(edgeIndices, vertexIndex, indices, offset) {
325
- let previousIndex = edgeIndices[0];
326
- const length = edgeIndices.length;
327
- for (let i = 1; i < length; ++i) {
328
- const index = edgeIndices[i];
329
- indices[offset++] = previousIndex;
330
- indices[offset++] = index;
331
- indices[offset++] = vertexIndex;
332
- indices[offset++] = vertexIndex;
333
- indices[offset++] = index;
334
- indices[offset++] = vertexIndex + 1;
335
- previousIndex = index;
336
- ++vertexIndex;
337
- }
338
- return offset;
339
- }
340
- TerrainProvider.heightmapTerrainQuality = 0.25;
341
- TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap = function(ellipsoid, tileImageWidth, numberOfTilesAtLevelZero) {
342
- return ellipsoid.maximumRadius * 2 * Math.PI * TerrainProvider.heightmapTerrainQuality / (tileImageWidth * numberOfTilesAtLevelZero);
343
- };
344
- TerrainProvider.prototype.requestTileGeometry = DeveloperError_default.throwInstantiationError;
345
- TerrainProvider.prototype.getLevelMaximumGeometricError = DeveloperError_default.throwInstantiationError;
346
- TerrainProvider.prototype.getTileDataAvailable = DeveloperError_default.throwInstantiationError;
347
- TerrainProvider.prototype.loadTileDataAvailability = DeveloperError_default.throwInstantiationError;
348
- var TerrainProvider_default = TerrainProvider;
349
-
350
- export {
351
- TerrainProvider_default
352
- };
@@ -1,352 +0,0 @@
1
- /**
2
- * @license
3
- * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.143.0
5
- *
6
- * Copyright 2011-2022 Cesium Contributors
7
- *
8
- * Licensed under the Apache License, Version 2.0 (the "License");
9
- * you may not use this file except in compliance with the License.
10
- * You may obtain a copy of the License at
11
- *
12
- * http://www.apache.org/licenses/LICENSE-2.0
13
- *
14
- * Unless required by applicable law or agreed to in writing, software
15
- * distributed under the License is distributed on an "AS IS" BASIS,
16
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- * See the License for the specific language governing permissions and
18
- * limitations under the License.
19
- *
20
- * Columbus View (Pat. Pend.)
21
- *
22
- * Portions licensed separately.
23
- * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
- */
25
-
26
- import {
27
- Cartographic_default,
28
- Ellipsoid_default
29
- } from "./chunk-FJWZMGOQ.js";
30
- import {
31
- Cartesian3_default
32
- } from "./chunk-PEDU33QG.js";
33
- import {
34
- Math_default
35
- } from "./chunk-C7JQVRLM.js";
36
- import {
37
- Check_default
38
- } from "./chunk-6YR6JBMY.js";
39
- import {
40
- defined_default
41
- } from "./chunk-AHWAZRBV.js";
42
-
43
- // packages/engine/Source/Core/EllipsoidGeodesic.js
44
- function setConstants(ellipsoidGeodesic) {
45
- const uSquared = ellipsoidGeodesic._uSquared;
46
- const a = ellipsoidGeodesic._ellipsoid.maximumRadius;
47
- const b = ellipsoidGeodesic._ellipsoid.minimumRadius;
48
- const f = (a - b) / a;
49
- const cosineHeading = Math.cos(ellipsoidGeodesic._startHeading);
50
- const sineHeading = Math.sin(ellipsoidGeodesic._startHeading);
51
- const tanU = (1 - f) * Math.tan(ellipsoidGeodesic._start.latitude);
52
- const cosineU = 1 / Math.sqrt(1 + tanU * tanU);
53
- const sineU = cosineU * tanU;
54
- const sigma = Math.atan2(tanU, cosineHeading);
55
- const sineAlpha = cosineU * sineHeading;
56
- const sineSquaredAlpha = sineAlpha * sineAlpha;
57
- const cosineSquaredAlpha = 1 - sineSquaredAlpha;
58
- const cosineAlpha = Math.sqrt(cosineSquaredAlpha);
59
- const u2Over4 = uSquared / 4;
60
- const u4Over16 = u2Over4 * u2Over4;
61
- const u6Over64 = u4Over16 * u2Over4;
62
- const u8Over256 = u4Over16 * u4Over16;
63
- const a0 = 1 + u2Over4 - 3 * u4Over16 / 4 + 5 * u6Over64 / 4 - 175 * u8Over256 / 64;
64
- const a1 = 1 - u2Over4 + 15 * u4Over16 / 8 - 35 * u6Over64 / 8;
65
- const a2 = 1 - 3 * u2Over4 + 35 * u4Over16 / 4;
66
- const a3 = 1 - 5 * u2Over4;
67
- const distanceRatio = a0 * sigma - a1 * Math.sin(2 * sigma) * u2Over4 / 2 - a2 * Math.sin(4 * sigma) * u4Over16 / 16 - a3 * Math.sin(6 * sigma) * u6Over64 / 48 - Math.sin(8 * sigma) * 5 * u8Over256 / 512;
68
- const constants = ellipsoidGeodesic._constants;
69
- constants.a = a;
70
- constants.b = b;
71
- constants.f = f;
72
- constants.cosineHeading = cosineHeading;
73
- constants.sineHeading = sineHeading;
74
- constants.tanU = tanU;
75
- constants.cosineU = cosineU;
76
- constants.sineU = sineU;
77
- constants.sigma = sigma;
78
- constants.sineAlpha = sineAlpha;
79
- constants.sineSquaredAlpha = sineSquaredAlpha;
80
- constants.cosineSquaredAlpha = cosineSquaredAlpha;
81
- constants.cosineAlpha = cosineAlpha;
82
- constants.u2Over4 = u2Over4;
83
- constants.u4Over16 = u4Over16;
84
- constants.u6Over64 = u6Over64;
85
- constants.u8Over256 = u8Over256;
86
- constants.a0 = a0;
87
- constants.a1 = a1;
88
- constants.a2 = a2;
89
- constants.a3 = a3;
90
- constants.distanceRatio = distanceRatio;
91
- }
92
- function computeC(f, cosineSquaredAlpha) {
93
- return f * cosineSquaredAlpha * (4 + f * (4 - 3 * cosineSquaredAlpha)) / 16;
94
- }
95
- function computeDeltaLambda(f, sineAlpha, cosineSquaredAlpha, sigma, sineSigma, cosineSigma, cosineTwiceSigmaMidpoint) {
96
- const C = computeC(f, cosineSquaredAlpha);
97
- return (1 - C) * f * sineAlpha * (sigma + C * sineSigma * (cosineTwiceSigmaMidpoint + C * cosineSigma * (2 * cosineTwiceSigmaMidpoint * cosineTwiceSigmaMidpoint - 1)));
98
- }
99
- function vincentyInverseFormula(ellipsoidGeodesic, major, minor, firstLongitude, firstLatitude, secondLongitude, secondLatitude) {
100
- const eff = (major - minor) / major;
101
- const l = secondLongitude - firstLongitude;
102
- const u1 = Math.atan((1 - eff) * Math.tan(firstLatitude));
103
- const u2 = Math.atan((1 - eff) * Math.tan(secondLatitude));
104
- const cosineU1 = Math.cos(u1);
105
- const sineU1 = Math.sin(u1);
106
- const cosineU2 = Math.cos(u2);
107
- const sineU2 = Math.sin(u2);
108
- const cc = cosineU1 * cosineU2;
109
- const cs = cosineU1 * sineU2;
110
- const ss = sineU1 * sineU2;
111
- const sc = sineU1 * cosineU2;
112
- let lambda = l;
113
- let lambdaDot;
114
- let cosineLambda;
115
- let sineLambda;
116
- let sigma;
117
- let cosineSigma;
118
- let sineSigma;
119
- let cosineSquaredAlpha;
120
- let cosineTwiceSigmaMidpoint;
121
- do {
122
- cosineLambda = Math.cos(lambda);
123
- sineLambda = Math.sin(lambda);
124
- const temp = cs - sc * cosineLambda;
125
- sineSigma = Math.sqrt(
126
- cosineU2 * cosineU2 * sineLambda * sineLambda + temp * temp
127
- );
128
- cosineSigma = ss + cc * cosineLambda;
129
- sigma = Math.atan2(sineSigma, cosineSigma);
130
- let sineAlpha;
131
- if (sineSigma === 0) {
132
- sineAlpha = 0;
133
- cosineSquaredAlpha = 1;
134
- } else {
135
- sineAlpha = cc * sineLambda / sineSigma;
136
- cosineSquaredAlpha = 1 - sineAlpha * sineAlpha;
137
- }
138
- lambdaDot = lambda;
139
- cosineTwiceSigmaMidpoint = cosineSigma - 2 * ss / cosineSquaredAlpha;
140
- if (!isFinite(cosineTwiceSigmaMidpoint)) {
141
- cosineTwiceSigmaMidpoint = 0;
142
- }
143
- lambda = l + computeDeltaLambda(
144
- eff,
145
- sineAlpha,
146
- cosineSquaredAlpha,
147
- sigma,
148
- sineSigma,
149
- cosineSigma,
150
- cosineTwiceSigmaMidpoint
151
- );
152
- } while (Math.abs(lambda - lambdaDot) > Math_default.EPSILON12);
153
- const uSquared = cosineSquaredAlpha * (major * major - minor * minor) / (minor * minor);
154
- const A = 1 + uSquared * (4096 + uSquared * (uSquared * (320 - 175 * uSquared) - 768)) / 16384;
155
- const B = uSquared * (256 + uSquared * (uSquared * (74 - 47 * uSquared) - 128)) / 1024;
156
- const cosineSquaredTwiceSigmaMidpoint = cosineTwiceSigmaMidpoint * cosineTwiceSigmaMidpoint;
157
- const deltaSigma = B * sineSigma * (cosineTwiceSigmaMidpoint + B * (cosineSigma * (2 * cosineSquaredTwiceSigmaMidpoint - 1) - B * cosineTwiceSigmaMidpoint * (4 * sineSigma * sineSigma - 3) * (4 * cosineSquaredTwiceSigmaMidpoint - 3) / 6) / 4);
158
- const distance = minor * A * (sigma - deltaSigma);
159
- const startHeading = Math.atan2(
160
- cosineU2 * sineLambda,
161
- cs - sc * cosineLambda
162
- );
163
- const endHeading = Math.atan2(cosineU1 * sineLambda, cs * cosineLambda - sc);
164
- ellipsoidGeodesic._distance = distance;
165
- ellipsoidGeodesic._startHeading = startHeading;
166
- ellipsoidGeodesic._endHeading = endHeading;
167
- ellipsoidGeodesic._uSquared = uSquared;
168
- }
169
- var scratchCart1 = new Cartesian3_default();
170
- var scratchCart2 = new Cartesian3_default();
171
- function computeProperties(ellipsoidGeodesic, start, end, ellipsoid) {
172
- const firstCartesian = Cartesian3_default.normalize(
173
- ellipsoid.cartographicToCartesian(start, scratchCart2),
174
- scratchCart1
175
- );
176
- const lastCartesian = Cartesian3_default.normalize(
177
- ellipsoid.cartographicToCartesian(end, scratchCart2),
178
- scratchCart2
179
- );
180
- Check_default.typeOf.number.greaterThanOrEquals(
181
- "value",
182
- Math.abs(
183
- Math.abs(Cartesian3_default.angleBetween(firstCartesian, lastCartesian)) - Math.PI
184
- ),
185
- 0.0125
186
- );
187
- vincentyInverseFormula(
188
- ellipsoidGeodesic,
189
- ellipsoid.maximumRadius,
190
- ellipsoid.minimumRadius,
191
- start.longitude,
192
- start.latitude,
193
- end.longitude,
194
- end.latitude
195
- );
196
- ellipsoidGeodesic._start = Cartographic_default.clone(
197
- start,
198
- ellipsoidGeodesic._start
199
- );
200
- ellipsoidGeodesic._end = Cartographic_default.clone(end, ellipsoidGeodesic._end);
201
- ellipsoidGeodesic._start.height = 0;
202
- ellipsoidGeodesic._end.height = 0;
203
- setConstants(ellipsoidGeodesic);
204
- }
205
- function EllipsoidGeodesic(start, end, ellipsoid) {
206
- const e = ellipsoid ?? Ellipsoid_default.default;
207
- this._ellipsoid = e;
208
- this._start = new Cartographic_default();
209
- this._end = new Cartographic_default();
210
- this._constants = {};
211
- this._startHeading = void 0;
212
- this._endHeading = void 0;
213
- this._distance = void 0;
214
- this._uSquared = void 0;
215
- if (defined_default(start) && defined_default(end)) {
216
- computeProperties(this, start, end, e);
217
- }
218
- }
219
- Object.defineProperties(EllipsoidGeodesic.prototype, {
220
- /**
221
- * Gets the ellipsoid.
222
- * @memberof EllipsoidGeodesic.prototype
223
- * @type {Ellipsoid}
224
- * @readonly
225
- */
226
- ellipsoid: {
227
- get: function() {
228
- return this._ellipsoid;
229
- }
230
- },
231
- /**
232
- * Gets the surface distance between the start and end point
233
- * @memberof EllipsoidGeodesic.prototype
234
- * @type {number}
235
- * @readonly
236
- */
237
- surfaceDistance: {
238
- get: function() {
239
- Check_default.defined("distance", this._distance);
240
- return this._distance;
241
- }
242
- },
243
- /**
244
- * Gets the initial planetodetic point on the path.
245
- * @memberof EllipsoidGeodesic.prototype
246
- * @type {Cartographic}
247
- * @readonly
248
- */
249
- start: {
250
- get: function() {
251
- return this._start;
252
- }
253
- },
254
- /**
255
- * Gets the final planetodetic point on the path.
256
- * @memberof EllipsoidGeodesic.prototype
257
- * @type {Cartographic}
258
- * @readonly
259
- */
260
- end: {
261
- get: function() {
262
- return this._end;
263
- }
264
- },
265
- /**
266
- * Gets the heading at the initial point.
267
- * @memberof EllipsoidGeodesic.prototype
268
- * @type {number}
269
- * @readonly
270
- */
271
- startHeading: {
272
- get: function() {
273
- Check_default.defined("distance", this._distance);
274
- return this._startHeading;
275
- }
276
- },
277
- /**
278
- * Gets the heading at the final point.
279
- * @memberof EllipsoidGeodesic.prototype
280
- * @type {number}
281
- * @readonly
282
- */
283
- endHeading: {
284
- get: function() {
285
- Check_default.defined("distance", this._distance);
286
- return this._endHeading;
287
- }
288
- }
289
- });
290
- EllipsoidGeodesic.prototype.setEndPoints = function(start, end) {
291
- Check_default.defined("start", start);
292
- Check_default.defined("end", end);
293
- computeProperties(this, start, end, this._ellipsoid);
294
- };
295
- EllipsoidGeodesic.prototype.interpolateUsingFraction = function(fraction, result) {
296
- return this.interpolateUsingSurfaceDistance(
297
- this._distance * fraction,
298
- result
299
- );
300
- };
301
- EllipsoidGeodesic.prototype.interpolateUsingSurfaceDistance = function(distance, result) {
302
- Check_default.defined("distance", this._distance);
303
- const constants = this._constants;
304
- const s = constants.distanceRatio + distance / constants.b;
305
- const cosine2S = Math.cos(2 * s);
306
- const cosine4S = Math.cos(4 * s);
307
- const cosine6S = Math.cos(6 * s);
308
- const sine2S = Math.sin(2 * s);
309
- const sine4S = Math.sin(4 * s);
310
- const sine6S = Math.sin(6 * s);
311
- const sine8S = Math.sin(8 * s);
312
- const s2 = s * s;
313
- const s3 = s * s2;
314
- const u8Over256 = constants.u8Over256;
315
- const u2Over4 = constants.u2Over4;
316
- const u6Over64 = constants.u6Over64;
317
- const u4Over16 = constants.u4Over16;
318
- let sigma = 2 * s3 * u8Over256 * cosine2S / 3 + s * (1 - u2Over4 + 7 * u4Over16 / 4 - 15 * u6Over64 / 4 + 579 * u8Over256 / 64 - (u4Over16 - 15 * u6Over64 / 4 + 187 * u8Over256 / 16) * cosine2S - (5 * u6Over64 / 4 - 115 * u8Over256 / 16) * cosine4S - 29 * u8Over256 * cosine6S / 16) + (u2Over4 / 2 - u4Over16 + 71 * u6Over64 / 32 - 85 * u8Over256 / 16) * sine2S + (5 * u4Over16 / 16 - 5 * u6Over64 / 4 + 383 * u8Over256 / 96) * sine4S - s2 * ((u6Over64 - 11 * u8Over256 / 2) * sine2S + 5 * u8Over256 * sine4S / 2) + (29 * u6Over64 / 96 - 29 * u8Over256 / 16) * sine6S + 539 * u8Over256 * sine8S / 1536;
319
- const theta = Math.asin(Math.sin(sigma) * constants.cosineAlpha);
320
- const latitude = Math.atan(constants.a / constants.b * Math.tan(theta));
321
- sigma = sigma - constants.sigma;
322
- const cosineTwiceSigmaMidpoint = Math.cos(2 * constants.sigma + sigma);
323
- const sineSigma = Math.sin(sigma);
324
- const cosineSigma = Math.cos(sigma);
325
- const cc = constants.cosineU * cosineSigma;
326
- const ss = constants.sineU * sineSigma;
327
- const lambda = Math.atan2(
328
- sineSigma * constants.sineHeading,
329
- cc - ss * constants.cosineHeading
330
- );
331
- const l = lambda - computeDeltaLambda(
332
- constants.f,
333
- constants.sineAlpha,
334
- constants.cosineSquaredAlpha,
335
- sigma,
336
- sineSigma,
337
- cosineSigma,
338
- cosineTwiceSigmaMidpoint
339
- );
340
- if (defined_default(result)) {
341
- result.longitude = this._start.longitude + l;
342
- result.latitude = latitude;
343
- result.height = 0;
344
- return result;
345
- }
346
- return new Cartographic_default(this._start.longitude + l, latitude, 0);
347
- };
348
- var EllipsoidGeodesic_default = EllipsoidGeodesic;
349
-
350
- export {
351
- EllipsoidGeodesic_default
352
- };