@cesium/engine 26.2.0 → 26.3.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 (366) hide show
  1. package/Build/ThirdParty/Workers/zip-web-worker.js +656 -518
  2. package/Build/Workers/{chunk-FU4BGABC.js → chunk-2DKJSPYF.js} +14 -14
  3. package/Build/Workers/{chunk-NCL22ZUX.js → chunk-2PWVICP6.js} +1 -1
  4. package/Build/Workers/{chunk-ILME5BXA.js → chunk-2YY724ZX.js} +8 -8
  5. package/Build/Workers/{chunk-IJZJMIUY.js → chunk-4DMAXPKB.js} +11 -11
  6. package/Build/Workers/{chunk-IMBVP57H.js → chunk-4LRFYRBX.js} +2 -2
  7. package/Build/Workers/{chunk-76FDC45O.js → chunk-5JCZHJUU.js} +13 -13
  8. package/Build/Workers/{chunk-5LSOO2KD.js → chunk-5KG7KDDW.js} +7 -7
  9. package/Build/Workers/{chunk-UAZUP4I5.js → chunk-6BSNYZZG.js} +5 -5
  10. package/Build/Workers/{chunk-D6AY775A.js → chunk-6R6SGKYN.js} +6 -6
  11. package/Build/Workers/{chunk-3PSS3T43.js → chunk-6V2KDEHL.js} +4 -4
  12. package/Build/Workers/{chunk-GHXVQVUM.js → chunk-75BC2IHI.js} +7 -7
  13. package/Build/Workers/{chunk-SMTGMFBL.js → chunk-7SESBH2I.js} +4 -4
  14. package/Build/Workers/{chunk-NEFDMMLY.js → chunk-7WXBTNRV.js} +8 -8
  15. package/Build/Workers/{chunk-NXGQBQWE.js → chunk-A7SMPV6B.js} +12 -12
  16. package/Build/Workers/{chunk-O3XFXGPZ.js → chunk-ATSXKJ3L.js} +7 -7
  17. package/Build/Workers/{chunk-AHWAZRBV.js → chunk-B4AVL7VI.js} +1 -1
  18. package/Build/Workers/{chunk-OZGPS7FB.js → chunk-B7Q2WF6Q.js} +4 -4
  19. package/Build/Workers/{chunk-2RGJPWQX.js → chunk-BNDSDQ7D.js} +9 -9
  20. package/Build/Workers/{chunk-2Z4ZLVOD.js → chunk-CKK6CUXK.js} +6 -6
  21. package/Build/Workers/{chunk-FCP2QY4G.js → chunk-COKOYTRS.js} +5 -5
  22. package/Build/Workers/{chunk-6FZDPMTO.js → chunk-CQ4TZXAT.js} +6 -6
  23. package/Build/Workers/{chunk-HDL4HOXZ.js → chunk-DKSANM4A.js} +12 -12
  24. package/Build/Workers/{chunk-XCBZVTIV.js → chunk-DZK34ZVD.js} +1 -1
  25. package/Build/Workers/{chunk-N7CCOFLX.js → chunk-E7G32DWL.js} +1 -1
  26. package/Build/Workers/{chunk-XDWCTQCZ.js → chunk-EDETO6NY.js} +2 -2
  27. package/Build/Workers/{chunk-NSKZ6SBK.js → chunk-F34TJJLA.js} +14 -14
  28. package/Build/Workers/{chunk-GXWQZBAI.js → chunk-GLHDTTTO.js} +2 -2
  29. package/Build/Workers/{chunk-SJYSIOEM.js → chunk-GS7RY2DH.js} +11 -11
  30. package/Build/Workers/{chunk-5YPQBFRD.js → chunk-HDD3RFLT.js} +3 -3
  31. package/Build/Workers/{chunk-36NI5E6W.js → chunk-HDPNFEPP.js} +18 -18
  32. package/Build/Workers/{chunk-DSGLDRTI.js → chunk-JBJ6BRIM.js} +4 -4
  33. package/Build/Workers/{chunk-DZUFEE4L.js → chunk-JKTWW7IO.js} +5 -5
  34. package/Build/Workers/{chunk-O3DKEX7Q.js → chunk-JL4NWWQY.js} +5 -5
  35. package/Build/Workers/{chunk-I74ZH5LK.js → chunk-JMUUAW4X.js} +10 -10
  36. package/Build/Workers/{chunk-SXSP3JHS.js → chunk-KBGAHN5R.js} +1 -1
  37. package/Build/Workers/{chunk-GVA7XQI2.js → chunk-KEWK6VZL.js} +12 -12
  38. package/Build/Workers/{chunk-EOWDZN5S.js → chunk-L73K5UPP.js} +10 -10
  39. package/Build/Workers/{chunk-J73T2VOY.js → chunk-LL2SGJYH.js} +6 -6
  40. package/Build/Workers/{chunk-QFSSCLLZ.js → chunk-LYJUL4XQ.js} +6 -6
  41. package/Build/Workers/{chunk-MAAHFYPC.js → chunk-M6W46OAP.js} +7 -7
  42. package/Build/Workers/{chunk-FX3VEAIU.js → chunk-MDDKCLMF.js} +16 -16
  43. package/Build/Workers/{chunk-M6QKXVAU.js → chunk-MUW4DJV7.js} +17 -17
  44. package/Build/Workers/{chunk-EZGQPOIG.js → chunk-N5YK44FS.js} +5 -5
  45. package/Build/Workers/{chunk-27FWRTJI.js → chunk-NZQUP52G.js} +9 -9
  46. package/Build/Workers/{chunk-A62YI6S6.js → chunk-PKZA44LH.js} +4 -4
  47. package/Build/Workers/{chunk-7MM3N2VE.js → chunk-Q2JS5LCB.js} +17 -17
  48. package/Build/Workers/{chunk-KGXSYGBG.js → chunk-QTAEVUED.js} +13 -13
  49. package/Build/Workers/{chunk-KP5QD7WU.js → chunk-SEJIXZZ4.js} +10 -10
  50. package/Build/Workers/{chunk-PRWUMCXF.js → chunk-SL2HCFYW.js} +10 -10
  51. package/Build/Workers/{chunk-NJVBJG63.js → chunk-SLHK3KAR.js} +5 -5
  52. package/Build/Workers/{chunk-JKXV6PG5.js → chunk-UZY5XRL2.js} +1 -1
  53. package/Build/Workers/{chunk-LDRQSYBN.js → chunk-VRECSMG3.js} +2 -2
  54. package/Build/Workers/{chunk-NLLCQBX3.js → chunk-X27HKF5E.js} +2 -2
  55. package/Build/Workers/{chunk-B3QHNA4A.js → chunk-XBY3354M.js} +6 -6
  56. package/Build/Workers/{chunk-CRCGE4J4.js → chunk-XRZCS3HE.js} +8 -8
  57. package/Build/Workers/{chunk-XLQZNQ4Z.js → chunk-XSIUYAT6.js} +2 -2
  58. package/Build/Workers/{chunk-SA2A2AN5.js → chunk-Z2DW5NM2.js} +4 -4
  59. package/Build/Workers/combineGeometry.js +24 -24
  60. package/Build/Workers/createBoxGeometry.js +18 -18
  61. package/Build/Workers/createBoxOutlineGeometry.js +16 -16
  62. package/Build/Workers/createCircleGeometry.js +26 -26
  63. package/Build/Workers/createCircleOutlineGeometry.js +19 -19
  64. package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
  65. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
  66. package/Build/Workers/createCorridorGeometry.js +29 -29
  67. package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
  68. package/Build/Workers/createCylinderGeometry.js +20 -20
  69. package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
  70. package/Build/Workers/createEllipseGeometry.js +26 -26
  71. package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
  72. package/Build/Workers/createEllipsoidGeometry.js +19 -19
  73. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
  74. package/Build/Workers/createFrustumGeometry.js +18 -18
  75. package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
  76. package/Build/Workers/createGeometry.js +24 -24
  77. package/Build/Workers/createGroundPolylineGeometry.js +22 -22
  78. package/Build/Workers/createPlaneGeometry.js +16 -16
  79. package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
  80. package/Build/Workers/createPolygonGeometry.js +32 -32
  81. package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
  82. package/Build/Workers/createPolylineGeometry.js +25 -25
  83. package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
  84. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
  85. package/Build/Workers/createRectangleGeometry.js +27 -27
  86. package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
  87. package/Build/Workers/createSimplePolylineGeometry.js +23 -23
  88. package/Build/Workers/createSphereGeometry.js +19 -19
  89. package/Build/Workers/createSphereOutlineGeometry.js +18 -18
  90. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  91. package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
  92. package/Build/Workers/createVectorTileGeometries.js +24 -24
  93. package/Build/Workers/createVectorTilePoints.js +13 -13
  94. package/Build/Workers/createVectorTilePolygons.js +22 -22
  95. package/Build/Workers/createVectorTilePolylines.js +14 -14
  96. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -25
  97. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
  98. package/Build/Workers/createVerticesFromHeightmap.js +22 -22
  99. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
  100. package/Build/Workers/createWallGeometry.js +24 -24
  101. package/Build/Workers/createWallOutlineGeometry.js +23 -23
  102. package/Build/Workers/decodeDraco.js +10 -10
  103. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  104. package/Build/Workers/decodeI3S.js +10 -10
  105. package/Build/Workers/gaussianSplatSorter.js +4 -4
  106. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  107. package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
  108. package/Build/Workers/transcodeKTX2.js +6 -6
  109. package/Build/Workers/transferTypedArrayTest.js +1 -1
  110. package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
  111. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
  112. package/Source/Core/Ion.js +1 -1
  113. package/Source/Core/IonResource.js +5 -0
  114. package/Source/Core/IonSnapGeometryType.js +59 -0
  115. package/Source/Core/IonSnapHeat.js +33 -0
  116. package/Source/Core/IonSnapMode.js +45 -0
  117. package/Source/Core/IonSnapParentGeometryType.js +52 -0
  118. package/Source/Core/IonSnapService.js +369 -0
  119. package/Source/Core/SnapService.js +63 -0
  120. package/Source/Core/VectorPipeline.js +139 -45
  121. package/Source/Core/VectorProvider.js +311 -71
  122. package/Source/Renderer/AutomaticUniforms.js +44 -2
  123. package/Source/Renderer/ShaderBuilder.js +1 -1
  124. package/Source/Renderer/UniformState.js +47 -1
  125. package/Source/Scene/ArcGisMapService.js +1 -1
  126. package/Source/Scene/BufferPointCollection.js +4 -7
  127. package/Source/Scene/BufferPolygonCollection.js +56 -27
  128. package/Source/Scene/BufferPolylineCollection.js +61 -8
  129. package/Source/Scene/BufferPolylineMaterial.js +6 -5
  130. package/Source/Scene/BufferPrimitiveCollection.js +199 -29
  131. package/Source/Scene/Cesium3DTile.js +12 -0
  132. package/Source/Scene/Cesium3DTileset.js +61 -8
  133. package/Source/Scene/Cesium3DTilesetBaseTraversal.js +15 -3
  134. package/Source/Scene/Cesium3DTilesetCache.js +15 -0
  135. package/Source/Scene/ClippingPolygon.js +154 -100
  136. package/Source/Scene/ClippingPolygonCollection.js +352 -694
  137. package/Source/Scene/CreditDisplay.js +62 -0
  138. package/Source/Scene/GeoJsonPrimitive.js +114 -24
  139. package/Source/Scene/GlobeSurfaceShaderSet.js +33 -54
  140. package/Source/Scene/GlobeSurfaceTile.js +14 -1
  141. package/Source/Scene/GlobeSurfaceTileProvider.js +232 -25
  142. package/Source/Scene/GltfLoader.js +56 -6
  143. package/Source/Scene/HeightReference.js +1 -1
  144. package/Source/Scene/MVTDataProvider.js +9 -0
  145. package/Source/Scene/Model/Model.js +242 -16
  146. package/Source/Scene/Model/Model3DTileContent.js +5 -0
  147. package/Source/Scene/Model/ModelClippingPolygonsPipelineStage.js +54 -19
  148. package/Source/Scene/Model/ModelRenderResources.js +2 -3
  149. package/Source/Scene/Model/ModelSceneGraph.js +10 -1
  150. package/Source/Scene/Model/ModelVectorLookupPipelineStage.js +205 -0
  151. package/Source/Scene/Model/PickingPipelineStage.js +4 -0
  152. package/Source/Scene/PostProcessStage.js +22 -3
  153. package/Source/Scene/Scene.js +56 -1
  154. package/Source/Scene/Snapping.js +57 -0
  155. package/Source/Scene/UrlTemplate3DTilesDataProvider.js +12 -1
  156. package/Source/Scene/VectorGltf3DTileContent.js +10 -2
  157. package/Source/Scene/WebMapServiceImageryProvider.js +5 -1
  158. package/Source/Scene/WebMapTileServiceImageryProvider.js +6 -1
  159. package/Source/Scene/renderBufferPolylineCollection.js +5 -1
  160. package/Source/Shaders/BufferPolylineMaterialVS.glsl +14 -2
  161. package/Source/Shaders/BufferPolylineMaterialVS.js +14 -2
  162. package/Source/Shaders/Builtin/CzmBuiltins.js +2 -4
  163. package/Source/Shaders/Builtin/Functions/eyeToCartographicDelta.glsl +74 -0
  164. package/Source/Shaders/Builtin/Functions/eyeToCartographicDelta.js +76 -0
  165. package/Source/Shaders/GlobeFS.glsl +10 -9
  166. package/Source/Shaders/GlobeFS.js +11 -9
  167. package/Source/Shaders/GlobeVS.glsl +0 -32
  168. package/Source/Shaders/GlobeVS.js +0 -32
  169. package/Source/Shaders/Model/ModelClippingPolygonsStageFS.glsl +15 -3
  170. package/Source/Shaders/Model/ModelClippingPolygonsStageFS.js +15 -3
  171. package/Source/Shaders/Model/ModelClippingPolygonsStageVS.glsl +20 -24
  172. package/Source/Shaders/Model/ModelClippingPolygonsStageVS.js +20 -24
  173. package/Source/Shaders/Model/ModelFS.glsl +4 -0
  174. package/Source/Shaders/Model/ModelFS.js +4 -0
  175. package/Source/Shaders/Model/ModelVS.glsl +7 -2
  176. package/Source/Shaders/Model/ModelVS.js +7 -2
  177. package/Source/Shaders/Model/ModelVectorLookupStageFS.glsl +6 -0
  178. package/Source/Shaders/Model/ModelVectorLookupStageFS.js +8 -0
  179. package/Source/Shaders/Model/ModelVectorLookupStageVS.glsl +15 -0
  180. package/Source/Shaders/Model/ModelVectorLookupStageVS.js +17 -0
  181. package/Source/Shaders/Model/VerticalExaggerationStageVS.glsl +9 -10
  182. package/Source/Shaders/Model/VerticalExaggerationStageVS.js +9 -11
  183. package/Source/Shaders/VectorCommon.glsl +177 -50
  184. package/Source/Shaders/VectorCommon.js +251 -19
  185. package/Source/ThirdParty/Workers/zip-web-worker.js +1 -1
  186. package/index.d.ts +556 -55
  187. package/index.js +20 -13
  188. package/package.json +6 -6
  189. package/Build/Workers/chunk-2EFYUSUY.js +0 -1483
  190. package/Build/Workers/chunk-2H5264K7.js +0 -1284
  191. package/Build/Workers/chunk-2H73KDBM.js +0 -511
  192. package/Build/Workers/chunk-2ZKH2QZB.js +0 -387
  193. package/Build/Workers/chunk-37SW7SYS.js +0 -778
  194. package/Build/Workers/chunk-3GHVJ3SO.js +0 -455
  195. package/Build/Workers/chunk-3LB4UVPU.js +0 -387
  196. package/Build/Workers/chunk-3PONLKEL.js +0 -778
  197. package/Build/Workers/chunk-3QR662HH.js +0 -3820
  198. package/Build/Workers/chunk-3SX2WYSO.js +0 -973
  199. package/Build/Workers/chunk-3UDN6LYX.js +0 -476
  200. package/Build/Workers/chunk-47MCBSXI.js +0 -9237
  201. package/Build/Workers/chunk-4E626OCE.js +0 -1067
  202. package/Build/Workers/chunk-4NW2MJKH.js +0 -455
  203. package/Build/Workers/chunk-52YK5BSN.js +0 -198
  204. package/Build/Workers/chunk-5RNAQZK6.js +0 -9234
  205. package/Build/Workers/chunk-6FHT43QR.js +0 -140
  206. package/Build/Workers/chunk-6HK6IXK2.js +0 -138
  207. package/Build/Workers/chunk-6R5X2GUA.js +0 -1284
  208. package/Build/Workers/chunk-6YR6JBMY.js +0 -163
  209. package/Build/Workers/chunk-7A2OGDHT.js +0 -305
  210. package/Build/Workers/chunk-7CGEQUM2.js +0 -305
  211. package/Build/Workers/chunk-7D2HZKH7.js +0 -455
  212. package/Build/Workers/chunk-7I325HV6.js +0 -1344
  213. package/Build/Workers/chunk-7KVKHY7O.js +0 -147
  214. package/Build/Workers/chunk-7TKLTCZW.js +0 -219
  215. package/Build/Workers/chunk-7UUKBDH6.js +0 -1054
  216. package/Build/Workers/chunk-7W6DUHAB.js +0 -693
  217. package/Build/Workers/chunk-7XM5JK5F.js +0 -162
  218. package/Build/Workers/chunk-7YG3ND3P.js +0 -454
  219. package/Build/Workers/chunk-A3O6EDBK.js +0 -73
  220. package/Build/Workers/chunk-A6X24AZI.js +0 -1992
  221. package/Build/Workers/chunk-A7TTWVTF.js +0 -2719
  222. package/Build/Workers/chunk-ACTVJHSP.js +0 -519
  223. package/Build/Workers/chunk-ADX3CBKD.js +0 -9234
  224. package/Build/Workers/chunk-AF7DTMJ7.js +0 -398
  225. package/Build/Workers/chunk-AJSFRY4U.js +0 -1344
  226. package/Build/Workers/chunk-ARZICEEP.js +0 -301
  227. package/Build/Workers/chunk-B4CQSLZJ.js +0 -305
  228. package/Build/Workers/chunk-BKPQFCXH.js +0 -511
  229. package/Build/Workers/chunk-BSPCI2LO.js +0 -959
  230. package/Build/Workers/chunk-BUJWSX5S.js +0 -301
  231. package/Build/Workers/chunk-C7JQVRLM.js +0 -497
  232. package/Build/Workers/chunk-C7QDUNI3.js +0 -138
  233. package/Build/Workers/chunk-CDJDJ5LK.js +0 -44
  234. package/Build/Workers/chunk-CEEZE3YZ.js +0 -476
  235. package/Build/Workers/chunk-CIV5DJOQ.js +0 -778
  236. package/Build/Workers/chunk-CLCTQVVL.js +0 -241
  237. package/Build/Workers/chunk-CQNFIAZU.js +0 -56
  238. package/Build/Workers/chunk-CUTRKXUQ.js +0 -288
  239. package/Build/Workers/chunk-DBD5WWG2.js +0 -959
  240. package/Build/Workers/chunk-DIGUUD6G.js +0 -171
  241. package/Build/Workers/chunk-DZBQUULR.js +0 -138
  242. package/Build/Workers/chunk-E2NKV5YT.js +0 -3820
  243. package/Build/Workers/chunk-E7NZJOK7.js +0 -3792
  244. package/Build/Workers/chunk-EB3Y5P3A.js +0 -368
  245. package/Build/Workers/chunk-EHTS2YPT.js +0 -2719
  246. package/Build/Workers/chunk-ELE6SC2C.js +0 -837
  247. package/Build/Workers/chunk-ENNFMWDW.js +0 -789
  248. package/Build/Workers/chunk-ERKUET22.js +0 -3201
  249. package/Build/Workers/chunk-F2IMBMZY.js +0 -241
  250. package/Build/Workers/chunk-F4CSNRZO.js +0 -219
  251. package/Build/Workers/chunk-FBP4DUQJ.js +0 -693
  252. package/Build/Workers/chunk-FDK4K5IA.js +0 -280
  253. package/Build/Workers/chunk-FGQFQHN5.js +0 -1054
  254. package/Build/Workers/chunk-FJWZMGOQ.js +0 -1992
  255. package/Build/Workers/chunk-FQ42MT7M.js +0 -58
  256. package/Build/Workers/chunk-GGNWQWSB.js +0 -301
  257. package/Build/Workers/chunk-GNKXEN4C.js +0 -682
  258. package/Build/Workers/chunk-GSWMAFTE.js +0 -9230
  259. package/Build/Workers/chunk-GXDHRC4J.js +0 -1344
  260. package/Build/Workers/chunk-GYSYP6PC.js +0 -1067
  261. package/Build/Workers/chunk-H2WCFXLP.js +0 -241
  262. package/Build/Workers/chunk-HHV3MCGV.js +0 -162
  263. package/Build/Workers/chunk-HLW2ZRVK.js +0 -368
  264. package/Build/Workers/chunk-HS6AD4P2.js +0 -398
  265. package/Build/Workers/chunk-HT6FASOT.js +0 -973
  266. package/Build/Workers/chunk-IDVHUDZT.js +0 -352
  267. package/Build/Workers/chunk-IGAZBTFZ.js +0 -3201
  268. package/Build/Workers/chunk-IOO7Z2AV.js +0 -57
  269. package/Build/Workers/chunk-IUIFLOYO.js +0 -44
  270. package/Build/Workers/chunk-JALGQYDY.js +0 -288
  271. package/Build/Workers/chunk-JW6OZT4R.js +0 -288
  272. package/Build/Workers/chunk-JXYLJCTC.js +0 -124
  273. package/Build/Workers/chunk-K27QOAW6.js +0 -97
  274. package/Build/Workers/chunk-KMV25A63.js +0 -789
  275. package/Build/Workers/chunk-KZWFWJML.js +0 -2719
  276. package/Build/Workers/chunk-LCXRRALY.js +0 -387
  277. package/Build/Workers/chunk-LD64RPYV.js +0 -368
  278. package/Build/Workers/chunk-LGNDTZVX.js +0 -97
  279. package/Build/Workers/chunk-LNSQVXFH.js +0 -1800
  280. package/Build/Workers/chunk-M4JZ6TSZ.js +0 -959
  281. package/Build/Workers/chunk-MCJDRDJQ.js +0 -102
  282. package/Build/Workers/chunk-MEENMEAH.js +0 -198
  283. package/Build/Workers/chunk-NAWU5RF4.js +0 -162
  284. package/Build/Workers/chunk-NIWITKQK.js +0 -693
  285. package/Build/Workers/chunk-OA6MYL2C.js +0 -837
  286. package/Build/Workers/chunk-OBEU25PI.js +0 -1067
  287. package/Build/Workers/chunk-OHP4ELS7.js +0 -198
  288. package/Build/Workers/chunk-PCL3Y7H5.js +0 -82
  289. package/Build/Workers/chunk-PD4GK4EM.js +0 -57
  290. package/Build/Workers/chunk-PEDU33QG.js +0 -2342
  291. package/Build/Workers/chunk-PVTSNNVI.js +0 -288
  292. package/Build/Workers/chunk-QHPZH22L.js +0 -241
  293. package/Build/Workers/chunk-QIZDWZK6.js +0 -301
  294. package/Build/Workers/chunk-QV6DG2YX.js +0 -1483
  295. package/Build/Workers/chunk-QVLAFFJY.js +0 -56
  296. package/Build/Workers/chunk-R4FPNAZ2.js +0 -352
  297. package/Build/Workers/chunk-R4K7EHOU.js +0 -171
  298. package/Build/Workers/chunk-R7JGHDD6.js +0 -789
  299. package/Build/Workers/chunk-RASQEYD4.js +0 -1483
  300. package/Build/Workers/chunk-RG4F5R57.js +0 -454
  301. package/Build/Workers/chunk-RW6ITX7Q.js +0 -3820
  302. package/Build/Workers/chunk-RYSQVJR6.js +0 -398
  303. package/Build/Workers/chunk-S6RJU5NM.js +0 -1054
  304. package/Build/Workers/chunk-SDFHDNS4.js +0 -147
  305. package/Build/Workers/chunk-SF6K72D7.js +0 -124
  306. package/Build/Workers/chunk-SGRGNDOD.js +0 -682
  307. package/Build/Workers/chunk-SM2CDCYF.js +0 -198
  308. package/Build/Workers/chunk-SS5ABQGY.js +0 -102
  309. package/Build/Workers/chunk-T5QBPLE3.js +0 -414
  310. package/Build/Workers/chunk-TN35HP5B.js +0 -1067
  311. package/Build/Workers/chunk-TNWKJNUZ.js +0 -454
  312. package/Build/Workers/chunk-TOAF47AQ.js +0 -102
  313. package/Build/Workers/chunk-TQ4QCOXT.js +0 -2719
  314. package/Build/Workers/chunk-TSDSILQB.js +0 -124
  315. package/Build/Workers/chunk-TVZD72WJ.js +0 -778
  316. package/Build/Workers/chunk-U5LV3F3Z.js +0 -1054
  317. package/Build/Workers/chunk-UEY73NRN.js +0 -38
  318. package/Build/Workers/chunk-UF46SZEZ.js +0 -789
  319. package/Build/Workers/chunk-UNRTMCET.js +0 -398
  320. package/Build/Workers/chunk-UTB7U3O6.js +0 -1992
  321. package/Build/Workers/chunk-UVO6COT2.js +0 -352
  322. package/Build/Workers/chunk-V46YGZE6.js +0 -352
  323. package/Build/Workers/chunk-VAL7DYNR.js +0 -278
  324. package/Build/Workers/chunk-VDGOCROW.js +0 -57
  325. package/Build/Workers/chunk-VFWSSBPT.js +0 -511
  326. package/Build/Workers/chunk-VVYMXI3I.js +0 -1284
  327. package/Build/Workers/chunk-VXWHPYQM.js +0 -837
  328. package/Build/Workers/chunk-VXYUBRSB.js +0 -219
  329. package/Build/Workers/chunk-VZLDLEWI.js +0 -387
  330. package/Build/Workers/chunk-W5OCKMPJ.js +0 -101
  331. package/Build/Workers/chunk-WBSY7HDY.js +0 -837
  332. package/Build/Workers/chunk-WN3F4CVG.js +0 -3201
  333. package/Build/Workers/chunk-WPRUWXGV.js +0 -693
  334. package/Build/Workers/chunk-WTO2ERBP.js +0 -414
  335. package/Build/Workers/chunk-WVHMDVG4.js +0 -959
  336. package/Build/Workers/chunk-XGA23TAX.js +0 -73
  337. package/Build/Workers/chunk-XLXSDIP5.js +0 -973
  338. package/Build/Workers/chunk-XQ3SKCMM.js +0 -140
  339. package/Build/Workers/chunk-XQH66YJC.js +0 -147
  340. package/Build/Workers/chunk-XTA7BXJG.js +0 -682
  341. package/Build/Workers/chunk-XTIDAFRS.js +0 -476
  342. package/Build/Workers/chunk-XUEDWBUD.js +0 -682
  343. package/Build/Workers/chunk-XYFLRH3H.js +0 -124
  344. package/Build/Workers/chunk-Y7JRTRTO.js +0 -305
  345. package/Build/Workers/chunk-Y7QSMDCJ.js +0 -352
  346. package/Build/Workers/chunk-YCB5TYTR.js +0 -1483
  347. package/Build/Workers/chunk-YEYOSTJX.js +0 -219
  348. package/Build/Workers/chunk-YGFVAGYF.js +0 -630
  349. package/Build/Workers/chunk-YIIACKQO.js +0 -368
  350. package/Build/Workers/chunk-YJGSP6PE.js +0 -511
  351. package/Build/Workers/chunk-YKU2Q3A2.js +0 -1287
  352. package/Build/Workers/chunk-Z4LR5EHE.js +0 -454
  353. package/Build/Workers/chunk-Z66EVE2A.js +0 -44
  354. package/Build/Workers/chunk-ZHIHHHTB.js +0 -414
  355. package/Build/Workers/chunk-ZMBHFYOX.js +0 -1344
  356. package/Build/Workers/chunk-ZNWHFSLE.js +0 -171
  357. package/Build/Workers/chunk-ZQLZG4IN.js +0 -2342
  358. package/Build/Workers/chunk-ZRTSMUZ2.js +0 -414
  359. package/Build/Workers/chunk-ZSGUV73H.js +0 -2342
  360. package/Build/Workers/chunk-ZZUVT5BM.js +0 -476
  361. package/Source/Shaders/Builtin/Functions/clipPolygons.glsl +0 -37
  362. package/Source/Shaders/Builtin/Functions/clipPolygons.js +0 -39
  363. package/Source/Shaders/Builtin/Functions/unpackClippingExtents.glsl +0 -14
  364. package/Source/Shaders/Builtin/Functions/unpackClippingExtents.js +0 -15
  365. package/Source/Shaders/PolygonSignedDistanceFS.glsl +0 -131
  366. package/Source/Shaders/PolygonSignedDistanceFS.js +0 -132
@@ -1,9 +1,8 @@
1
1
  import Check from "../Core/Check.js";
2
2
  import Cartesian3 from "../Core/Cartesian3.js";
3
- import Cartographic from "../Core/Cartographic.js";
4
3
  import defined from "../Core/defined.js";
4
+ import deprecationWarning from "../Core/deprecationWarning.js";
5
5
  import Ellipsoid from "../Core/Ellipsoid.js";
6
- import CesiumMath from "../Core/Math.js";
7
6
  import PolygonGeometry from "../Core/PolygonGeometry.js";
8
7
  import Rectangle from "../Core/Rectangle.js";
9
8
 
@@ -14,6 +13,7 @@ import Rectangle from "../Core/Rectangle.js";
14
13
  *
15
14
  * @param {object} options Object with the following properties:
16
15
  * @param {Cartesian3[]} options.positions A list of three or more Cartesian coordinates defining the outer ring of the clipping polygon.
16
+ * @param {Cartesian3[][]} [options.holes] An array of interior rings (holes), each a list of three or more Cartesian coordinates. Regions inside a hole are excluded from the polygon.
17
17
  * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default]
18
18
  *
19
19
  * @example
@@ -33,6 +33,34 @@ import Rectangle from "../Core/Rectangle.js";
33
33
  * const polygon = new Cesium.ClippingPolygon({
34
34
  * positions: positions
35
35
  * });
36
+ *
37
+ * @example
38
+ * // A clipping polygon with two holes. Regions inside the holes are not clipped.
39
+ * const outerRing = Cesium.Cartesian3.fromDegreesArray([
40
+ * -100.0, 40.0,
41
+ * -90.0, 40.0,
42
+ * -90.0, 50.0,
43
+ * -100.0, 50.0,
44
+ * ]);
45
+ *
46
+ * const firstHole = Cesium.Cartesian3.fromDegreesArray([
47
+ * -98.0, 42.0,
48
+ * -96.0, 42.0,
49
+ * -96.0, 44.0,
50
+ * -98.0, 44.0,
51
+ * ]);
52
+ *
53
+ * const secondHole = Cesium.Cartesian3.fromDegreesArray([
54
+ * -94.0, 46.0,
55
+ * -92.0, 46.0,
56
+ * -92.0, 48.0,
57
+ * -94.0, 48.0,
58
+ * ]);
59
+ *
60
+ * const polygonWithHoles = new Cesium.ClippingPolygon({
61
+ * positions: outerRing,
62
+ * holes: [firstHole, secondHole],
63
+ * });
36
64
  */
37
65
  function ClippingPolygon(options) {
38
66
  //>>includeStart('debug', pragmas.debug);
@@ -43,35 +71,38 @@ function ClippingPolygon(options) {
43
71
  options.positions.length,
44
72
  3,
45
73
  );
74
+ if (defined(options.holes)) {
75
+ for (let i = 0; i < options.holes.length; i++) {
76
+ Check.typeOf.number.greaterThanOrEquals(
77
+ `options.holes[${i}].length`,
78
+ options.holes[i].length,
79
+ 3,
80
+ );
81
+ }
82
+ }
46
83
  //>>includeEnd('debug');
47
84
 
48
85
  this._ellipsoid = options.ellipsoid ?? Ellipsoid.default;
49
86
  this._positions = copyArrayCartesian3(options.positions);
87
+ this._holes = defined(options.holes)
88
+ ? options.holes.map(copyArrayCartesian3)
89
+ : [];
50
90
 
51
91
  /**
52
- * A copy of the input positions.
53
- *
54
- * This is used to detect modifications of the positions in
55
- * <code>coputeRectangle</code>: The rectangle only has
56
- * to be re-computed when these positions have changed.
92
+ * The cartographic rectangle enclosing the outer ring
57
93
  *
58
- * @type {Cartesian3[]|undefined}
94
+ * @type {Rectangle}
59
95
  * @private
60
96
  */
61
- this._cachedPositions = undefined;
97
+ this._rectangle = PolygonGeometry.computeRectangleFromPositions(
98
+ this._positions,
99
+ this._ellipsoid,
100
+ );
62
101
 
63
- /**
64
- * A cached version of the rectangle that is computed in
65
- * <code>computeRectangle</code>.
66
- *
67
- * This is only re-computed when the positions have changed, as
68
- * determined by comparing the <code>_positions</code> to the
69
- * <code>_cachedPositions</code>
70
- *
71
- * @type {Rectangle|undefined}
72
- * @private
73
- */
74
- this._cachedRectangle = undefined;
102
+ // Freeze the geometry so it cannot change after construction. To change a
103
+ // polygon, remove it from the collection and add a new one.
104
+ deepFreeze(this._positions);
105
+ deepFreezeHoles(this._holes);
75
106
  }
76
107
 
77
108
  /**
@@ -98,6 +129,35 @@ function copyArrayCartesian3(input) {
98
129
  return output;
99
130
  }
100
131
 
132
+ /**
133
+ * Freezes an array of positions and each Cartesian3 it contains, so that the
134
+ * polygon's geometry cannot be mutated in place. Returns the same array.
135
+ *
136
+ * @param {Cartesian3[]} positions The array to freeze
137
+ * @returns {Cartesian3[]} The frozen array
138
+ * @ignore
139
+ */
140
+ function deepFreeze(positions) {
141
+ for (let i = 0; i < positions.length; i++) {
142
+ Object.freeze(positions[i]);
143
+ }
144
+ return Object.freeze(positions);
145
+ }
146
+
147
+ /**
148
+ * Freezes an array of rings (holes) and their contents. Returns the same array.
149
+ *
150
+ * @param {Cartesian3[][]} holes The rings to freeze
151
+ * @returns {Cartesian3[][]} The frozen array
152
+ * @ignore
153
+ */
154
+ function deepFreezeHoles(holes) {
155
+ for (let i = 0; i < holes.length; i++) {
156
+ deepFreeze(holes[i]);
157
+ }
158
+ return Object.freeze(holes);
159
+ }
160
+
101
161
  /**
102
162
  * Returns whether the given arrays are component-wise equal.
103
163
  *
@@ -134,9 +194,29 @@ function equalsArrayCartesian3(a, b) {
134
194
  return true;
135
195
  }
136
196
 
197
+ /**
198
+ * Returns whether two arrays of rings are component-wise equal.
199
+ *
200
+ * @param {Cartesian3[][]} a The first array of rings
201
+ * @param {Cartesian3[][]} b The second array of rings
202
+ * @returns {boolean} Whether the ring arrays are equal
203
+ * @ignore
204
+ */
205
+ function equalsHoles(a, b) {
206
+ if (a.length !== b.length) {
207
+ return false;
208
+ }
209
+ for (let i = 0; i < a.length; i++) {
210
+ if (!equalsArrayCartesian3(a[i], b[i])) {
211
+ return false;
212
+ }
213
+ }
214
+ return true;
215
+ }
216
+
137
217
  Object.defineProperties(ClippingPolygon.prototype, {
138
218
  /**
139
- * Returns the total number of positions in the polygon, include any holes.
219
+ * Returns the total number of positions in the polygon, including any holes.
140
220
  *
141
221
  * @memberof ClippingPolygon.prototype
142
222
  * @type {number}
@@ -144,11 +224,17 @@ Object.defineProperties(ClippingPolygon.prototype, {
144
224
  */
145
225
  length: {
146
226
  get: function () {
147
- return this._positions.length;
227
+ let count = this._positions.length;
228
+ const holes = this._holes;
229
+ for (let i = 0; i < holes.length; i++) {
230
+ count += holes[i].length;
231
+ }
232
+ return count;
148
233
  },
149
234
  },
150
235
  /**
151
- * Returns the outer ring of positions.
236
+ * Returns the outer ring of positions. A ClippingPolygon's geometry is
237
+ * immutable; the returned array and its coordinates are frozen.
152
238
  *
153
239
  * @memberof ClippingPolygon.prototype
154
240
  * @type {Cartesian3[]}
@@ -159,6 +245,18 @@ Object.defineProperties(ClippingPolygon.prototype, {
159
245
  return this._positions;
160
246
  },
161
247
  },
248
+ /**
249
+ * Returns the interior rings (holes) of the polygon, each a list of positions.
250
+ *
251
+ * @memberof ClippingPolygon.prototype
252
+ * @type {Cartesian3[][]}
253
+ * @readonly
254
+ */
255
+ holes: {
256
+ get: function () {
257
+ return this._holes;
258
+ },
259
+ },
162
260
  /**
163
261
  * Returns the ellipsoid used to project the polygon onto surfaces when clipping.
164
262
  *
@@ -171,6 +269,20 @@ Object.defineProperties(ClippingPolygon.prototype, {
171
269
  return this._ellipsoid;
172
270
  },
173
271
  },
272
+ /**
273
+ * Returns the cartographic rectangle enclosing the polygon, computed once on
274
+ * construction. Since a ClippingPolygon's geometry is immutable, this rectangle
275
+ * never changes.
276
+ *
277
+ * @memberof ClippingPolygon.prototype
278
+ * @type {Rectangle}
279
+ * @readonly
280
+ */
281
+ rectangle: {
282
+ get: function () {
283
+ return this._rectangle;
284
+ },
285
+ },
174
286
  });
175
287
 
176
288
  /**
@@ -187,13 +299,20 @@ ClippingPolygon.clone = function (polygon, result) {
187
299
  if (!defined(result)) {
188
300
  return new ClippingPolygon({
189
301
  positions: polygon.positions,
302
+ holes: polygon.holes,
190
303
  ellipsoid: polygon.ellipsoid,
191
304
  });
192
305
  }
193
306
 
194
307
  result._ellipsoid = polygon.ellipsoid;
195
- result._positions.length = 0;
196
- result._positions.push(...polygon.positions);
308
+ result._positions = copyArrayCartesian3(polygon.positions);
309
+ result._holes = polygon.holes.map(copyArrayCartesian3);
310
+ result._rectangle = PolygonGeometry.computeRectangleFromPositions(
311
+ result._positions,
312
+ result._ellipsoid,
313
+ );
314
+ deepFreeze(result._positions);
315
+ deepFreezeHoles(result._holes);
197
316
  return result;
198
317
  };
199
318
 
@@ -212,7 +331,9 @@ ClippingPolygon.equals = function (left, right) {
212
331
  //>>includeEnd('debug');
213
332
 
214
333
  return (
215
- left.ellipsoid.equals(right.ellipsoid) && left.positions === right.positions
334
+ left.ellipsoid.equals(right.ellipsoid) &&
335
+ left.positions === right.positions &&
336
+ equalsHoles(left.holes, right.holes)
216
337
  );
217
338
  };
218
339
 
@@ -221,82 +342,15 @@ ClippingPolygon.equals = function (left, right) {
221
342
  *
222
343
  * @param {Rectangle} [result] An object in which to store the result.
223
344
  * @returns {Rectangle} The result rectangle
224
- */
225
- ClippingPolygon.prototype.computeRectangle = function (result) {
226
- if (equalsArrayCartesian3(this._positions, this._cachedPositions)) {
227
- return Rectangle.clone(this._cachedRectangle, result);
228
- }
229
- const rectangle = PolygonGeometry.computeRectangleFromPositions(
230
- this.positions,
231
- this.ellipsoid,
232
- undefined,
233
- result,
234
- );
235
- this._cachedPositions = copyArrayCartesian3(this._positions);
236
- this._cachedRectangle = Rectangle.clone(rectangle);
237
- return rectangle;
238
- };
239
-
240
- const scratchRectangle = new Rectangle();
241
- const spherePointScratch = new Cartesian3();
242
- /**
243
- * Computes a rectangle with the spherical extents that encloses the polygon defined by the list of positions, including cases over the international date line and the poles.
244
- *
245
- * @private
246
345
  *
247
- * @param {Rectangle} [result] An object in which to store the result.
248
- * @returns {Rectangle} The result rectangle with spherical extents.
346
+ * @deprecated This function is deprecated and will be removed in CesiumJS 1.147. Use {@link ClippingPolygon#rectangle} instead.
249
347
  */
250
- ClippingPolygon.prototype.computeSphericalExtents = function (result) {
251
- if (!defined(result)) {
252
- result = new Rectangle();
253
- }
254
-
255
- const rectangle = this.computeRectangle(scratchRectangle);
256
-
257
- let spherePoint = Cartographic.toCartesian(
258
- Rectangle.southwest(rectangle),
259
- this.ellipsoid,
260
- spherePointScratch,
261
- );
262
-
263
- // Project into plane with vertical for latitude
264
- let magXY = Math.sqrt(
265
- spherePoint.x * spherePoint.x + spherePoint.y * spherePoint.y,
266
- );
267
-
268
- // Use fastApproximateAtan2 for alignment with shader
269
- let sphereLatitude = CesiumMath.fastApproximateAtan2(magXY, spherePoint.z);
270
- let sphereLongitude = CesiumMath.fastApproximateAtan2(
271
- spherePoint.x,
272
- spherePoint.y,
273
- );
274
-
275
- result.south = sphereLatitude;
276
- result.west = sphereLongitude;
277
-
278
- spherePoint = Cartographic.toCartesian(
279
- Rectangle.northeast(rectangle),
280
- this.ellipsoid,
281
- spherePointScratch,
282
- );
283
-
284
- // Project into plane with vertical for latitude
285
- magXY = Math.sqrt(
286
- spherePoint.x * spherePoint.x + spherePoint.y * spherePoint.y,
287
- );
288
-
289
- // Use fastApproximateAtan2 for alignment with shader
290
- sphereLatitude = CesiumMath.fastApproximateAtan2(magXY, spherePoint.z);
291
- sphereLongitude = CesiumMath.fastApproximateAtan2(
292
- spherePoint.x,
293
- spherePoint.y,
348
+ ClippingPolygon.prototype.computeRectangle = function (result) {
349
+ deprecationWarning(
350
+ "ClippingPolygon.computeRectangle",
351
+ "ClippingPolygon.computeRectangle is deprecated as of CesiumJS 1.145 and will be removed in 1.147. Use the ClippingPolygon.rectangle property instead.",
294
352
  );
295
-
296
- result.north = sphereLatitude;
297
- result.east = sphereLongitude;
298
-
299
- return result;
353
+ return Rectangle.clone(this._rectangle, result);
300
354
  };
301
355
 
302
356
  export default ClippingPolygon;