@cesium/engine 26.1.0 → 26.2.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 (384) hide show
  1. package/Build/ThirdParty/Workers/zip-web-worker.js +586 -480
  2. package/Build/Workers/chunk-27FWRTJI.js +454 -0
  3. package/Build/Workers/chunk-2H5264K7.js +1284 -0
  4. package/Build/Workers/chunk-2H73KDBM.js +511 -0
  5. package/Build/Workers/chunk-2RGJPWQX.js +1284 -0
  6. package/Build/Workers/chunk-2Z4ZLVOD.js +352 -0
  7. package/Build/Workers/chunk-2ZKH2QZB.js +387 -0
  8. package/Build/Workers/chunk-36NI5E6W.js +3820 -0
  9. package/Build/Workers/chunk-37SW7SYS.js +778 -0
  10. package/Build/Workers/chunk-3GHVJ3SO.js +455 -0
  11. package/Build/Workers/chunk-3LB4UVPU.js +387 -0
  12. package/Build/Workers/chunk-3PONLKEL.js +778 -0
  13. package/Build/Workers/chunk-3PSS3T43.js +102 -0
  14. package/Build/Workers/chunk-3QR662HH.js +3820 -0
  15. package/Build/Workers/chunk-3SX2WYSO.js +973 -0
  16. package/Build/Workers/chunk-3UDN6LYX.js +476 -0
  17. package/Build/Workers/chunk-47MCBSXI.js +9237 -0
  18. package/Build/Workers/chunk-4E626OCE.js +1067 -0
  19. package/Build/Workers/chunk-4NW2MJKH.js +455 -0
  20. package/Build/Workers/chunk-52YK5BSN.js +198 -0
  21. package/Build/Workers/chunk-5RNAQZK6.js +9234 -0
  22. package/Build/Workers/chunk-5YPQBFRD.js +519 -0
  23. package/Build/Workers/chunk-6FHT43QR.js +140 -0
  24. package/Build/Workers/chunk-6FZDPMTO.js +455 -0
  25. package/Build/Workers/chunk-6R5X2GUA.js +1284 -0
  26. package/Build/Workers/chunk-7A2OGDHT.js +305 -0
  27. package/Build/Workers/chunk-7CGEQUM2.js +305 -0
  28. package/Build/Workers/chunk-7I325HV6.js +1344 -0
  29. package/Build/Workers/chunk-7MM3N2VE.js +1067 -0
  30. package/Build/Workers/chunk-7TKLTCZW.js +219 -0
  31. package/Build/Workers/chunk-7UUKBDH6.js +1054 -0
  32. package/Build/Workers/chunk-7W6DUHAB.js +693 -0
  33. package/Build/Workers/chunk-7XM5JK5F.js +162 -0
  34. package/Build/Workers/chunk-7YG3ND3P.js +454 -0
  35. package/Build/Workers/chunk-A62YI6S6.js +305 -0
  36. package/Build/Workers/chunk-A7TTWVTF.js +2719 -0
  37. package/Build/Workers/chunk-ACTVJHSP.js +519 -0
  38. package/Build/Workers/chunk-ADX3CBKD.js +9234 -0
  39. package/Build/Workers/chunk-AF7DTMJ7.js +398 -0
  40. package/Build/Workers/chunk-AJSFRY4U.js +1344 -0
  41. package/Build/Workers/chunk-ARZICEEP.js +301 -0
  42. package/Build/Workers/chunk-B3QHNA4A.js +147 -0
  43. package/Build/Workers/chunk-BKPQFCXH.js +511 -0
  44. package/Build/Workers/chunk-BSPCI2LO.js +959 -0
  45. package/Build/Workers/chunk-BUJWSX5S.js +301 -0
  46. package/Build/Workers/chunk-C7QDUNI3.js +138 -0
  47. package/Build/Workers/chunk-CIV5DJOQ.js +778 -0
  48. package/Build/Workers/chunk-CQNFIAZU.js +56 -0
  49. package/Build/Workers/chunk-CRCGE4J4.js +9237 -0
  50. package/Build/Workers/chunk-CUTRKXUQ.js +288 -0
  51. package/Build/Workers/chunk-D6AY775A.js +3201 -0
  52. package/Build/Workers/chunk-DSGLDRTI.js +278 -0
  53. package/Build/Workers/chunk-DZBQUULR.js +138 -0
  54. package/Build/Workers/chunk-DZUFEE4L.js +140 -0
  55. package/Build/Workers/chunk-E2NKV5YT.js +3820 -0
  56. package/Build/Workers/chunk-EB3Y5P3A.js +368 -0
  57. package/Build/Workers/chunk-ELE6SC2C.js +837 -0
  58. package/Build/Workers/chunk-EOWDZN5S.js +288 -0
  59. package/Build/Workers/chunk-ERKUET22.js +3201 -0
  60. package/Build/Workers/chunk-EZGQPOIG.js +162 -0
  61. package/Build/Workers/chunk-F2IMBMZY.js +241 -0
  62. package/Build/Workers/chunk-F4CSNRZO.js +219 -0
  63. package/Build/Workers/chunk-FBP4DUQJ.js +693 -0
  64. package/Build/Workers/chunk-FJWZMGOQ.js +1992 -0
  65. package/Build/Workers/chunk-FQ42MT7M.js +58 -0
  66. package/Build/Workers/chunk-FU4BGABC.js +398 -0
  67. package/Build/Workers/chunk-FX3VEAIU.js +2719 -0
  68. package/Build/Workers/chunk-GGNWQWSB.js +301 -0
  69. package/Build/Workers/chunk-GHXVQVUM.js +1344 -0
  70. package/Build/Workers/chunk-GNKXEN4C.js +682 -0
  71. package/Build/Workers/chunk-GVA7XQI2.js +368 -0
  72. package/Build/Workers/chunk-GXDHRC4J.js +1344 -0
  73. package/Build/Workers/chunk-GYSYP6PC.js +1067 -0
  74. package/Build/Workers/chunk-H2WCFXLP.js +241 -0
  75. package/Build/Workers/chunk-HDL4HOXZ.js +778 -0
  76. package/Build/Workers/chunk-HLW2ZRVK.js +368 -0
  77. package/Build/Workers/chunk-HT6FASOT.js +973 -0
  78. package/Build/Workers/chunk-I74ZH5LK.js +959 -0
  79. package/Build/Workers/chunk-IDVHUDZT.js +352 -0
  80. package/Build/Workers/chunk-IJZJMIUY.js +789 -0
  81. package/Build/Workers/chunk-IMBVP57H.js +44 -0
  82. package/Build/Workers/chunk-IOO7Z2AV.js +57 -0
  83. package/Build/Workers/chunk-IUIFLOYO.js +44 -0
  84. package/Build/Workers/chunk-J73T2VOY.js +171 -0
  85. package/Build/Workers/chunk-JALGQYDY.js +288 -0
  86. package/Build/Workers/chunk-JXYLJCTC.js +124 -0
  87. package/Build/Workers/chunk-K27QOAW6.js +97 -0
  88. package/Build/Workers/chunk-KMV25A63.js +789 -0
  89. package/Build/Workers/chunk-KP5QD7WU.js +693 -0
  90. package/Build/Workers/chunk-KZWFWJML.js +2719 -0
  91. package/Build/Workers/chunk-LCXRRALY.js +387 -0
  92. package/Build/Workers/chunk-LDRQSYBN.js +1800 -0
  93. package/Build/Workers/chunk-M4JZ6TSZ.js +959 -0
  94. package/Build/Workers/chunk-M6QKXVAU.js +1054 -0
  95. package/Build/Workers/chunk-MAAHFYPC.js +198 -0
  96. package/Build/Workers/chunk-MCJDRDJQ.js +102 -0
  97. package/Build/Workers/chunk-MEENMEAH.js +198 -0
  98. package/Build/Workers/chunk-NAWU5RF4.js +162 -0
  99. package/Build/Workers/chunk-NCL22ZUX.js +56 -0
  100. package/Build/Workers/chunk-NEFDMMLY.js +241 -0
  101. package/Build/Workers/chunk-NJVBJG63.js +124 -0
  102. package/Build/Workers/chunk-NLLCQBX3.js +73 -0
  103. package/Build/Workers/chunk-NSKZ6SBK.js +1483 -0
  104. package/Build/Workers/chunk-NXGQBQWE.js +837 -0
  105. package/Build/Workers/chunk-O3DKEX7Q.js +352 -0
  106. package/Build/Workers/chunk-O3XFXGPZ.js +476 -0
  107. package/Build/Workers/chunk-OA6MYL2C.js +837 -0
  108. package/Build/Workers/chunk-OHP4ELS7.js +198 -0
  109. package/Build/Workers/chunk-OZGPS7FB.js +138 -0
  110. package/Build/Workers/chunk-PCL3Y7H5.js +82 -0
  111. package/Build/Workers/chunk-PD4GK4EM.js +57 -0
  112. package/Build/Workers/chunk-PEDU33QG.js +2342 -0
  113. package/Build/Workers/chunk-PRWUMCXF.js +682 -0
  114. package/Build/Workers/chunk-PVTSNNVI.js +288 -0
  115. package/Build/Workers/chunk-QFSSCLLZ.js +973 -0
  116. package/Build/Workers/chunk-QHPZH22L.js +241 -0
  117. package/Build/Workers/chunk-QIZDWZK6.js +301 -0
  118. package/Build/Workers/chunk-QV6DG2YX.js +1483 -0
  119. package/Build/Workers/chunk-R4K7EHOU.js +171 -0
  120. package/Build/Workers/chunk-R7JGHDD6.js +789 -0
  121. package/Build/Workers/chunk-RASQEYD4.js +1483 -0
  122. package/Build/Workers/chunk-RW6ITX7Q.js +3820 -0
  123. package/Build/Workers/chunk-RYSQVJR6.js +398 -0
  124. package/Build/Workers/chunk-S6RJU5NM.js +1054 -0
  125. package/Build/Workers/chunk-SA2A2AN5.js +2342 -0
  126. package/Build/Workers/chunk-SDFHDNS4.js +147 -0
  127. package/Build/Workers/chunk-SJYSIOEM.js +414 -0
  128. package/Build/Workers/chunk-SMTGMFBL.js +97 -0
  129. package/Build/Workers/chunk-SXSP3JHS.js +38 -0
  130. package/Build/Workers/chunk-TN35HP5B.js +1067 -0
  131. package/Build/Workers/chunk-TNWKJNUZ.js +454 -0
  132. package/Build/Workers/chunk-TOAF47AQ.js +102 -0
  133. package/Build/Workers/chunk-TQ4QCOXT.js +2719 -0
  134. package/Build/Workers/chunk-TSDSILQB.js +124 -0
  135. package/Build/Workers/chunk-U5LV3F3Z.js +1054 -0
  136. package/Build/Workers/chunk-UAZUP4I5.js +1992 -0
  137. package/Build/Workers/chunk-UF46SZEZ.js +789 -0
  138. package/Build/Workers/chunk-UNRTMCET.js +398 -0
  139. package/Build/Workers/chunk-UTB7U3O6.js +1992 -0
  140. package/Build/Workers/chunk-V46YGZE6.js +352 -0
  141. package/Build/Workers/chunk-VDGOCROW.js +57 -0
  142. package/Build/Workers/chunk-VFWSSBPT.js +511 -0
  143. package/Build/Workers/chunk-VVYMXI3I.js +1284 -0
  144. package/Build/Workers/chunk-VXWHPYQM.js +837 -0
  145. package/Build/Workers/chunk-VXYUBRSB.js +219 -0
  146. package/Build/Workers/chunk-VZLDLEWI.js +387 -0
  147. package/Build/Workers/chunk-W5OCKMPJ.js +101 -0
  148. package/Build/Workers/chunk-WN3F4CVG.js +3201 -0
  149. package/Build/Workers/chunk-WPRUWXGV.js +693 -0
  150. package/Build/Workers/chunk-WTO2ERBP.js +414 -0
  151. package/Build/Workers/chunk-WVHMDVG4.js +959 -0
  152. package/Build/Workers/chunk-XCBZVTIV.js +280 -0
  153. package/Build/Workers/chunk-XGA23TAX.js +73 -0
  154. package/Build/Workers/chunk-XLQZNQ4Z.js +163 -0
  155. package/Build/Workers/chunk-XQH66YJC.js +147 -0
  156. package/Build/Workers/chunk-XTA7BXJG.js +682 -0
  157. package/Build/Workers/chunk-XTIDAFRS.js +476 -0
  158. package/Build/Workers/chunk-XUEDWBUD.js +682 -0
  159. package/Build/Workers/chunk-XYFLRH3H.js +124 -0
  160. package/Build/Workers/chunk-Y7JRTRTO.js +305 -0
  161. package/Build/Workers/chunk-Y7QSMDCJ.js +352 -0
  162. package/Build/Workers/chunk-YCB5TYTR.js +1483 -0
  163. package/Build/Workers/chunk-YEYOSTJX.js +219 -0
  164. package/Build/Workers/chunk-YGFVAGYF.js +630 -0
  165. package/Build/Workers/chunk-YIIACKQO.js +368 -0
  166. package/Build/Workers/chunk-YJGSP6PE.js +511 -0
  167. package/Build/Workers/chunk-Z4LR5EHE.js +454 -0
  168. package/Build/Workers/chunk-Z66EVE2A.js +44 -0
  169. package/Build/Workers/chunk-ZHIHHHTB.js +414 -0
  170. package/Build/Workers/chunk-ZNWHFSLE.js +171 -0
  171. package/Build/Workers/chunk-ZQLZG4IN.js +2342 -0
  172. package/Build/Workers/chunk-ZRTSMUZ2.js +414 -0
  173. package/Build/Workers/chunk-ZZUVT5BM.js +476 -0
  174. package/Build/Workers/combineGeometry.js +16 -16
  175. package/Build/Workers/createBoxGeometry.js +10 -10
  176. package/Build/Workers/createBoxOutlineGeometry.js +8 -8
  177. package/Build/Workers/createCircleGeometry.js +18 -18
  178. package/Build/Workers/createCircleOutlineGeometry.js +11 -11
  179. package/Build/Workers/createCoplanarPolygonGeometry.js +27 -27
  180. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +23 -23
  181. package/Build/Workers/createCorridorGeometry.js +23 -25
  182. package/Build/Workers/createCorridorOutlineGeometry.js +21 -23
  183. package/Build/Workers/createCylinderGeometry.js +12 -12
  184. package/Build/Workers/createCylinderOutlineGeometry.js +10 -10
  185. package/Build/Workers/createEllipseGeometry.js +18 -18
  186. package/Build/Workers/createEllipseOutlineGeometry.js +11 -11
  187. package/Build/Workers/createEllipsoidGeometry.js +11 -11
  188. package/Build/Workers/createEllipsoidOutlineGeometry.js +10 -10
  189. package/Build/Workers/createFrustumGeometry.js +11 -11
  190. package/Build/Workers/createFrustumOutlineGeometry.js +11 -11
  191. package/Build/Workers/createGeometry.js +16 -16
  192. package/Build/Workers/createGroundPolylineGeometry.js +16 -16
  193. package/Build/Workers/createPlaneGeometry.js +9 -9
  194. package/Build/Workers/createPlaneOutlineGeometry.js +8 -8
  195. package/Build/Workers/createPolygonGeometry.js +25 -25
  196. package/Build/Workers/createPolygonOutlineGeometry.js +22 -22
  197. package/Build/Workers/createPolylineGeometry.js +18 -18
  198. package/Build/Workers/createPolylineVolumeGeometry.js +24 -24
  199. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +20 -20
  200. package/Build/Workers/createRectangleGeometry.js +19 -19
  201. package/Build/Workers/createRectangleOutlineGeometry.js +13 -13
  202. package/Build/Workers/createSimplePolylineGeometry.js +16 -16
  203. package/Build/Workers/createSphereGeometry.js +11 -11
  204. package/Build/Workers/createSphereOutlineGeometry.js +10 -10
  205. package/Build/Workers/createVectorTileClampedPolylines.js +7 -7
  206. package/Build/Workers/createVectorTileGeometries.js +15 -15
  207. package/Build/Workers/createVectorTilePoints.js +6 -6
  208. package/Build/Workers/createVectorTilePolygons.js +14 -14
  209. package/Build/Workers/createVectorTilePolylines.js +7 -7
  210. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +17 -17
  211. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +14 -14
  212. package/Build/Workers/createVerticesFromHeightmap.js +14 -14
  213. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +12 -12
  214. package/Build/Workers/createWallGeometry.js +17 -17
  215. package/Build/Workers/createWallOutlineGeometry.js +17 -17
  216. package/Build/Workers/decodeDraco.js +2 -2
  217. package/Build/Workers/decodeI3S.js +5 -5
  218. package/Build/Workers/incrementallyBuildTerrainPicker.js +4 -4
  219. package/Build/Workers/upsampleQuantizedTerrainMesh.js +14 -14
  220. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +17 -17
  221. package/Source/Core/ArcGISTiledElevationTerrainProvider.js +1 -5
  222. package/Source/Core/BoundingSphere.js +0 -3
  223. package/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js +3 -4
  224. package/Source/Core/CoplanarPolygonGeometry.js +2 -2
  225. package/Source/Core/CorridorGeometry.js +2 -4
  226. package/Source/Core/CorridorOutlineGeometry.js +1 -3
  227. package/Source/Core/EarthOrientationParameters.js +2 -2
  228. package/Source/Core/EllipseGeometryLibrary.js +2 -2
  229. package/Source/Core/EllipsoidGeodesic.js +3 -3
  230. package/Source/Core/EllipsoidRhumbLine.js +1 -1
  231. package/Source/Core/GroundPolylineGeometry.js +2 -2
  232. package/Source/Core/Heap.js +1 -1
  233. package/Source/Core/HermitePolynomialApproximation.js +215 -179
  234. package/Source/Core/InterpolationAlgorithm.js +1 -0
  235. package/Source/Core/Ion.js +1 -1
  236. package/Source/Core/JulianDate.js +1 -1
  237. package/Source/Core/LagrangePolynomialApproximation.js +55 -52
  238. package/Source/Core/LinearApproximation.js +69 -66
  239. package/Source/Core/Math.js +59 -0
  240. package/Source/Core/Matrix2.js +2 -2
  241. package/Source/Core/Matrix3.js +2 -2
  242. package/Source/Core/OrthographicFrustum.js +1 -1
  243. package/Source/Core/PerspectiveFrustum.js +1 -1
  244. package/Source/Core/PolygonGeometry.js +2 -2
  245. package/Source/Core/PolygonGeometryLibrary.js +1 -1
  246. package/Source/Core/PolygonOutlineGeometry.js +1 -1
  247. package/Source/Core/PolylineGeometry.js +1 -1
  248. package/Source/Core/PolylineVolumeGeometryLibrary.js +1 -1
  249. package/Source/Core/Rectangle.js +7 -1
  250. package/Source/Core/RectangleOutlineGeometry.js +1 -1
  251. package/Source/Core/SimplePolylineGeometry.js +1 -1
  252. package/Source/Core/TerrainEncoding.js +2 -2
  253. package/Source/Core/TerrainPicker.js +179 -168
  254. package/Source/Core/TimeIntervalCollection.js +1 -3
  255. package/Source/Core/Tipsify.js +1 -1
  256. package/Source/Core/Transforms.js +5 -1
  257. package/Source/Core/VectorPipeline.js +1117 -0
  258. package/Source/Core/VectorProvider.js +429 -0
  259. package/Source/Core/WallOutlineGeometry.js +1 -1
  260. package/Source/Core/getTimestamp.js +4 -2
  261. package/Source/DataSources/CompositeEntityCollection.js +0 -1
  262. package/Source/DataSources/CzmlDataSource.js +2 -0
  263. package/Source/DataSources/DataSourceDisplay.js +1 -1
  264. package/Source/DataSources/GeoJsonDataSource.js +0 -1
  265. package/Source/DataSources/GeometryVisualizer.js +1 -1
  266. package/Source/DataSources/KmlDataSource.js +1 -2
  267. package/Source/DataSources/PolylineVisualizer.js +1 -1
  268. package/Source/DataSources/StaticOutlineGeometryBatch.js +1 -1
  269. package/Source/Renderer/AutomaticUniforms.js +23 -0
  270. package/Source/Renderer/Context.js +9 -3
  271. package/Source/Renderer/DrawCommand.js +22 -0
  272. package/Source/Renderer/Framebuffer.js +4 -0
  273. package/Source/Renderer/Pass.js +11 -10
  274. package/Source/Renderer/Texture.js +11 -0
  275. package/Source/Renderer/UniformState.js +7 -0
  276. package/Source/Renderer/VertexArray.js +0 -1
  277. package/Source/Scene/ArcGisMapServerImageryProvider.js +0 -5
  278. package/Source/Scene/ArcGisMapService.js +1 -1
  279. package/Source/Scene/Billboard.js +2 -1
  280. package/Source/Scene/BillboardCollection.js +7 -3
  281. package/Source/Scene/BufferPrimitiveCollection.js +27 -5
  282. package/Source/Scene/Camera.js +71 -5
  283. package/Source/Scene/Cesium3DTileset.js +1 -1
  284. package/Source/Scene/ClippingPlaneCollection.js +2 -2
  285. package/Source/Scene/Controllers/Controller.js +63 -0
  286. package/Source/Scene/Controllers/ControllerHost.js +78 -0
  287. package/Source/Scene/Controllers/HybridScreenSpacePanCameraController.js +106 -0
  288. package/Source/Scene/Controllers/MouseButton.js +32 -0
  289. package/Source/Scene/Controllers/ScreenSpaceElevatorCameraController.js +295 -0
  290. package/Source/Scene/Controllers/ScreenSpaceInputBindings.js +154 -0
  291. package/Source/Scene/Controllers/ScreenSpaceMapCameraController.js +310 -0
  292. package/Source/Scene/Controllers/ScreenSpaceTiltOrbitCameraController.js +642 -0
  293. package/Source/Scene/Controllers/ScreenSpaceZoomCameraController.js +431 -0
  294. package/Source/Scene/Controllers/defaultPickWorldPosition.js +84 -0
  295. package/Source/Scene/DerivedCommand.js +94 -0
  296. package/Source/Scene/EdgeFramebuffer.js +1 -5
  297. package/Source/Scene/FrameState.js +17 -0
  298. package/Source/Scene/Globe.js +20 -0
  299. package/Source/Scene/GlobeDepth.js +27 -1
  300. package/Source/Scene/GlobeSurfaceShaderSet.js +12 -2
  301. package/Source/Scene/GlobeSurfaceTile.js +48 -10
  302. package/Source/Scene/GlobeSurfaceTileProvider.js +121 -3
  303. package/Source/Scene/GltfLoader.js +32 -3
  304. package/Source/Scene/GltfSpzLoader.js +1 -1
  305. package/Source/Scene/GltfVertexBufferLoader.js +6 -3
  306. package/Source/Scene/I3SDataProvider.js +1 -1
  307. package/Source/Scene/I3SLayer.js +1 -1
  308. package/Source/Scene/I3SNode.js +2 -2
  309. package/Source/Scene/ImageryLayerCollection.js +188 -4
  310. package/Source/Scene/IonImageryProvider.js +1 -5
  311. package/Source/Scene/Label.js +4 -4
  312. package/Source/Scene/LabelCollection.js +1 -1
  313. package/Source/Scene/MVTDataProvider.js +2 -0
  314. package/Source/Scene/Model/B3dmLoader.js +1 -2
  315. package/Source/Scene/Model/EdgeVisibilityPipelineStage.js +10 -8
  316. package/Source/Scene/Model/I3dmLoader.js +1 -1
  317. package/Source/Scene/Model/InstancingPipelineStage.js +4 -7
  318. package/Source/Scene/Model/MaterialPipelineStage.js +124 -1
  319. package/Source/Scene/Model/Model.js +8 -10
  320. package/Source/Scene/Model/ModelClippingPlanesPipelineStage.js +28 -1
  321. package/Source/Scene/Model/ModelDrawCommand.js +160 -16
  322. package/Source/Scene/Model/ModelDrawCommands.js +4 -0
  323. package/Source/Scene/Model/ModelSceneGraph.js +21 -0
  324. package/Source/Scene/Model/PickingPipelineStage.js +29 -0
  325. package/Source/Scene/Model/PrimitiveRenderResources.js +24 -0
  326. package/Source/Scene/ModelComponents.js +71 -0
  327. package/Source/Scene/Picking.js +16 -5
  328. package/Source/Scene/PlanarFillIdFramebuffer.js +172 -0
  329. package/Source/Scene/PntsParser.js +0 -1
  330. package/Source/Scene/PolylineCollection.js +1 -1
  331. package/Source/Scene/PostProcessStage.js +4 -2
  332. package/Source/Scene/ResourceCache.js +7 -4
  333. package/Source/Scene/ResourceCacheKey.js +16 -13
  334. package/Source/Scene/Scene.js +202 -5
  335. package/Source/Scene/ScreenSpaceCameraController.js +1 -2
  336. package/Source/Scene/ShadowMap.js +9 -3
  337. package/Source/Scene/ShadowMapShader.js +50 -2
  338. package/Source/Scene/SnapFramebuffer.js +121 -0
  339. package/Source/Scene/Snapping.js +184 -0
  340. package/Source/Scene/TerrainFillMesh.js +3 -2
  341. package/Source/Scene/UrlTemplate3DTilesDataProvider.js +1 -1
  342. package/Source/Scene/Vector3DTileContent.js +2 -3
  343. package/Source/Scene/VectorGltf3DTileContent.js +23 -3
  344. package/Source/Scene/View.js +10 -8
  345. package/Source/Scene/VoxelTraversal.js +1 -1
  346. package/Source/Scene/createElevationBandMaterial.js +1 -1
  347. package/Source/Scene/renderBufferPointCollection.js +1 -2
  348. package/Source/Scene/renderBufferPolygonCollection.js +1 -2
  349. package/Source/Scene/renderBufferPolylineCollection.js +1 -2
  350. package/Source/Shaders/Builtin/Constants/passCesium3DTile.glsl +1 -1
  351. package/Source/Shaders/Builtin/Constants/passCesium3DTile.js +1 -1
  352. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.glsl +1 -1
  353. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.js +1 -1
  354. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.glsl +1 -1
  355. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.js +1 -1
  356. package/Source/Shaders/Builtin/Constants/passCesium3DTilePlanarFillId.glsl +9 -0
  357. package/Source/Shaders/Builtin/Constants/passCesium3DTilePlanarFillId.js +11 -0
  358. package/Source/Shaders/Builtin/Constants/passClassification.glsl +1 -1
  359. package/Source/Shaders/Builtin/Constants/passClassification.js +1 -1
  360. package/Source/Shaders/Builtin/Constants/passGaussianSplats.glsl +1 -1
  361. package/Source/Shaders/Builtin/Constants/passGaussianSplats.js +1 -1
  362. package/Source/Shaders/Builtin/Constants/passOpaque.glsl +1 -1
  363. package/Source/Shaders/Builtin/Constants/passOpaque.js +1 -1
  364. package/Source/Shaders/Builtin/Constants/passTranslucent.glsl +1 -1
  365. package/Source/Shaders/Builtin/Constants/passTranslucent.js +1 -1
  366. package/Source/Shaders/Builtin/Constants/passVoxels.glsl +1 -1
  367. package/Source/Shaders/Builtin/Constants/passVoxels.js +1 -1
  368. package/Source/Shaders/Builtin/CzmBuiltins.js +2 -0
  369. package/Source/Shaders/GlobeFS.glsl +10 -5
  370. package/Source/Shaders/GlobeFS.js +9 -5
  371. package/Source/Shaders/Materials/PolylineGlowMaterial.glsl +1 -1
  372. package/Source/Shaders/Materials/PolylineGlowMaterial.js +1 -1
  373. package/Source/Shaders/Model/MaterialStageFS.glsl +8 -2
  374. package/Source/Shaders/Model/MaterialStageFS.js +8 -2
  375. package/Source/Shaders/Model/ModelFS.glsl +105 -0
  376. package/Source/Shaders/Model/ModelFS.js +105 -0
  377. package/Source/Shaders/VectorCommon.glsl +178 -0
  378. package/Source/Shaders/VectorCommon.js +75 -0
  379. package/Source/ThirdParty/Workers/zip-web-worker.js +1 -1
  380. package/Source/ThirdParty/zip-module.wasm +0 -0
  381. package/Source/Widget/CesiumWidget.js +30 -0
  382. package/index.d.ts +770 -10
  383. package/index.js +177 -160
  384. package/package.json +1 -1
@@ -0,0 +1,519 @@
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
+ Check_default,
28
+ DeveloperError_default
29
+ } from "./chunk-6YR6JBMY.js";
30
+ import {
31
+ __commonJS,
32
+ __toESM,
33
+ defined_default
34
+ } from "./chunk-AHWAZRBV.js";
35
+
36
+ // node_modules/mersenne-twister/src/mersenne-twister.js
37
+ var require_mersenne_twister = __commonJS({
38
+ "node_modules/mersenne-twister/src/mersenne-twister.js"(exports, module) {
39
+ var MersenneTwister2 = function(seed) {
40
+ if (seed == void 0) {
41
+ seed = (/* @__PURE__ */ new Date()).getTime();
42
+ }
43
+ this.N = 624;
44
+ this.M = 397;
45
+ this.MATRIX_A = 2567483615;
46
+ this.UPPER_MASK = 2147483648;
47
+ this.LOWER_MASK = 2147483647;
48
+ this.mt = new Array(this.N);
49
+ this.mti = this.N + 1;
50
+ if (seed.constructor == Array) {
51
+ this.init_by_array(seed, seed.length);
52
+ } else {
53
+ this.init_seed(seed);
54
+ }
55
+ };
56
+ MersenneTwister2.prototype.init_seed = function(s) {
57
+ this.mt[0] = s >>> 0;
58
+ for (this.mti = 1; this.mti < this.N; this.mti++) {
59
+ var s = this.mt[this.mti - 1] ^ this.mt[this.mti - 1] >>> 30;
60
+ this.mt[this.mti] = (((s & 4294901760) >>> 16) * 1812433253 << 16) + (s & 65535) * 1812433253 + this.mti;
61
+ this.mt[this.mti] >>>= 0;
62
+ }
63
+ };
64
+ MersenneTwister2.prototype.init_by_array = function(init_key, key_length) {
65
+ var i, j, k;
66
+ this.init_seed(19650218);
67
+ i = 1;
68
+ j = 0;
69
+ k = this.N > key_length ? this.N : key_length;
70
+ for (; k; k--) {
71
+ var s = this.mt[i - 1] ^ this.mt[i - 1] >>> 30;
72
+ this.mt[i] = (this.mt[i] ^ (((s & 4294901760) >>> 16) * 1664525 << 16) + (s & 65535) * 1664525) + init_key[j] + j;
73
+ this.mt[i] >>>= 0;
74
+ i++;
75
+ j++;
76
+ if (i >= this.N) {
77
+ this.mt[0] = this.mt[this.N - 1];
78
+ i = 1;
79
+ }
80
+ if (j >= key_length) j = 0;
81
+ }
82
+ for (k = this.N - 1; k; k--) {
83
+ var s = this.mt[i - 1] ^ this.mt[i - 1] >>> 30;
84
+ this.mt[i] = (this.mt[i] ^ (((s & 4294901760) >>> 16) * 1566083941 << 16) + (s & 65535) * 1566083941) - i;
85
+ this.mt[i] >>>= 0;
86
+ i++;
87
+ if (i >= this.N) {
88
+ this.mt[0] = this.mt[this.N - 1];
89
+ i = 1;
90
+ }
91
+ }
92
+ this.mt[0] = 2147483648;
93
+ };
94
+ MersenneTwister2.prototype.random_int = function() {
95
+ var y;
96
+ var mag01 = new Array(0, this.MATRIX_A);
97
+ if (this.mti >= this.N) {
98
+ var kk;
99
+ if (this.mti == this.N + 1)
100
+ this.init_seed(5489);
101
+ for (kk = 0; kk < this.N - this.M; kk++) {
102
+ y = this.mt[kk] & this.UPPER_MASK | this.mt[kk + 1] & this.LOWER_MASK;
103
+ this.mt[kk] = this.mt[kk + this.M] ^ y >>> 1 ^ mag01[y & 1];
104
+ }
105
+ for (; kk < this.N - 1; kk++) {
106
+ y = this.mt[kk] & this.UPPER_MASK | this.mt[kk + 1] & this.LOWER_MASK;
107
+ this.mt[kk] = this.mt[kk + (this.M - this.N)] ^ y >>> 1 ^ mag01[y & 1];
108
+ }
109
+ y = this.mt[this.N - 1] & this.UPPER_MASK | this.mt[0] & this.LOWER_MASK;
110
+ this.mt[this.N - 1] = this.mt[this.M - 1] ^ y >>> 1 ^ mag01[y & 1];
111
+ this.mti = 0;
112
+ }
113
+ y = this.mt[this.mti++];
114
+ y ^= y >>> 11;
115
+ y ^= y << 7 & 2636928640;
116
+ y ^= y << 15 & 4022730752;
117
+ y ^= y >>> 18;
118
+ return y >>> 0;
119
+ };
120
+ MersenneTwister2.prototype.random_int31 = function() {
121
+ return this.random_int() >>> 1;
122
+ };
123
+ MersenneTwister2.prototype.random_incl = function() {
124
+ return this.random_int() * (1 / 4294967295);
125
+ };
126
+ MersenneTwister2.prototype.random = function() {
127
+ return this.random_int() * (1 / 4294967296);
128
+ };
129
+ MersenneTwister2.prototype.random_excl = function() {
130
+ return (this.random_int() + 0.5) * (1 / 4294967296);
131
+ };
132
+ MersenneTwister2.prototype.random_long = function() {
133
+ var a = this.random_int() >>> 5, b = this.random_int() >>> 6;
134
+ return (a * 67108864 + b) * (1 / 9007199254740992);
135
+ };
136
+ module.exports = MersenneTwister2;
137
+ }
138
+ });
139
+
140
+ // packages/engine/Source/Core/Math.js
141
+ var import_mersenne_twister = __toESM(require_mersenne_twister(), 1);
142
+ var CesiumMath = {};
143
+ CesiumMath.EPSILON1 = 0.1;
144
+ CesiumMath.EPSILON2 = 0.01;
145
+ CesiumMath.EPSILON3 = 1e-3;
146
+ CesiumMath.EPSILON4 = 1e-4;
147
+ CesiumMath.EPSILON5 = 1e-5;
148
+ CesiumMath.EPSILON6 = 1e-6;
149
+ CesiumMath.EPSILON7 = 1e-7;
150
+ CesiumMath.EPSILON8 = 1e-8;
151
+ CesiumMath.EPSILON9 = 1e-9;
152
+ CesiumMath.EPSILON10 = 1e-10;
153
+ CesiumMath.EPSILON11 = 1e-11;
154
+ CesiumMath.EPSILON12 = 1e-12;
155
+ CesiumMath.EPSILON13 = 1e-13;
156
+ CesiumMath.EPSILON14 = 1e-14;
157
+ CesiumMath.EPSILON15 = 1e-15;
158
+ CesiumMath.EPSILON16 = 1e-16;
159
+ CesiumMath.EPSILON17 = 1e-17;
160
+ CesiumMath.EPSILON18 = 1e-18;
161
+ CesiumMath.EPSILON19 = 1e-19;
162
+ CesiumMath.EPSILON20 = 1e-20;
163
+ CesiumMath.EPSILON21 = 1e-21;
164
+ CesiumMath.GRAVITATIONALPARAMETER = 3986004418e5;
165
+ CesiumMath.SOLAR_RADIUS = 6955e5;
166
+ CesiumMath.LUNAR_RADIUS = 1737400;
167
+ CesiumMath.SIXTY_FOUR_KILOBYTES = 64 * 1024;
168
+ CesiumMath.FOUR_GIGABYTES = 4 * 1024 * 1024 * 1024;
169
+ CesiumMath.sign = Math.sign ?? function sign(value) {
170
+ value = +value;
171
+ if (value === 0 || value !== value) {
172
+ return value;
173
+ }
174
+ return value > 0 ? 1 : -1;
175
+ };
176
+ CesiumMath.signNotZero = function(value) {
177
+ return value < 0 ? -1 : 1;
178
+ };
179
+ CesiumMath.toSNorm = function(value, rangeMaximum) {
180
+ rangeMaximum = rangeMaximum ?? 255;
181
+ return Math.round(
182
+ (CesiumMath.clamp(value, -1, 1) * 0.5 + 0.5) * rangeMaximum
183
+ );
184
+ };
185
+ CesiumMath.fromSNorm = function(value, rangeMaximum) {
186
+ rangeMaximum = rangeMaximum ?? 255;
187
+ return CesiumMath.clamp(value, 0, rangeMaximum) / rangeMaximum * 2 - 1;
188
+ };
189
+ CesiumMath.normalize = function(value, rangeMinimum, rangeMaximum) {
190
+ rangeMaximum = Math.max(rangeMaximum - rangeMinimum, 0);
191
+ return rangeMaximum === 0 ? 0 : CesiumMath.clamp((value - rangeMinimum) / rangeMaximum, 0, 1);
192
+ };
193
+ CesiumMath.sinh = Math.sinh ?? function sinh(value) {
194
+ return (Math.exp(value) - Math.exp(-value)) / 2;
195
+ };
196
+ CesiumMath.cosh = Math.cosh ?? function cosh(value) {
197
+ return (Math.exp(value) + Math.exp(-value)) / 2;
198
+ };
199
+ CesiumMath.lerp = function(p, q, time) {
200
+ return (1 - time) * p + time * q;
201
+ };
202
+ CesiumMath.smoothDamp = function(p, q, velocity, deltaTime = 0, maximumSpeed = Number.POSITIVE_INFINITY, smoothTime = 1e-4, result = {}) {
203
+ Check_default.typeOf.number("p", p);
204
+ Check_default.typeOf.number("q", q);
205
+ Check_default.typeOf.number("velocity", velocity);
206
+ Check_default.typeOf.number.greaterThanOrEquals("deltaTime", deltaTime, 0);
207
+ Check_default.typeOf.number.greaterThanOrEquals("maximumSpeed", maximumSpeed, 0);
208
+ Check_default.typeOf.number.greaterThanOrEquals("smoothTime", smoothTime, 1e-4);
209
+ Check_default.typeOf.object("result", result);
210
+ smoothTime = Math.max(1e-4, smoothTime);
211
+ const omega = 2 / smoothTime;
212
+ const x = omega * deltaTime;
213
+ const exp = 1 / (1 + x + 0.48 * x * x + 0.235 * x * x * x);
214
+ const maxChange = maximumSpeed * smoothTime;
215
+ let change = p - q;
216
+ change = CesiumMath.clamp(change, -maxChange, maxChange);
217
+ const target = p - change;
218
+ const temp = (velocity + omega * change) * deltaTime;
219
+ velocity = (velocity - omega * temp) * exp;
220
+ result.value = target + (change + temp) * exp;
221
+ result.velocity = velocity;
222
+ return result;
223
+ };
224
+ CesiumMath.PI = Math.PI;
225
+ CesiumMath.ONE_OVER_PI = 1 / Math.PI;
226
+ CesiumMath.PI_OVER_TWO = Math.PI / 2;
227
+ CesiumMath.PI_OVER_THREE = Math.PI / 3;
228
+ CesiumMath.PI_OVER_FOUR = Math.PI / 4;
229
+ CesiumMath.PI_OVER_SIX = Math.PI / 6;
230
+ CesiumMath.THREE_PI_OVER_TWO = 3 * Math.PI / 2;
231
+ CesiumMath.TWO_PI = 2 * Math.PI;
232
+ CesiumMath.ONE_OVER_TWO_PI = 1 / (2 * Math.PI);
233
+ CesiumMath.RADIANS_PER_DEGREE = Math.PI / 180;
234
+ CesiumMath.DEGREES_PER_RADIAN = 180 / Math.PI;
235
+ CesiumMath.RADIANS_PER_ARCSECOND = CesiumMath.RADIANS_PER_DEGREE / 3600;
236
+ CesiumMath.toRadians = function(degrees) {
237
+ if (!defined_default(degrees)) {
238
+ throw new DeveloperError_default("degrees is required.");
239
+ }
240
+ return degrees * CesiumMath.RADIANS_PER_DEGREE;
241
+ };
242
+ CesiumMath.toDegrees = function(radians) {
243
+ if (!defined_default(radians)) {
244
+ throw new DeveloperError_default("radians is required.");
245
+ }
246
+ return radians * CesiumMath.DEGREES_PER_RADIAN;
247
+ };
248
+ CesiumMath.convertLongitudeRange = function(angle) {
249
+ if (!defined_default(angle)) {
250
+ throw new DeveloperError_default("angle is required.");
251
+ }
252
+ const twoPi = CesiumMath.TWO_PI;
253
+ const simplified = angle - Math.floor(angle / twoPi) * twoPi;
254
+ if (simplified < -Math.PI) {
255
+ return simplified + twoPi;
256
+ }
257
+ if (simplified >= Math.PI) {
258
+ return simplified - twoPi;
259
+ }
260
+ return simplified;
261
+ };
262
+ CesiumMath.clampToLatitudeRange = function(angle) {
263
+ if (!defined_default(angle)) {
264
+ throw new DeveloperError_default("angle is required.");
265
+ }
266
+ return CesiumMath.clamp(
267
+ angle,
268
+ -1 * CesiumMath.PI_OVER_TWO,
269
+ CesiumMath.PI_OVER_TWO
270
+ );
271
+ };
272
+ CesiumMath.negativePiToPi = function(angle) {
273
+ if (!defined_default(angle)) {
274
+ throw new DeveloperError_default("angle is required.");
275
+ }
276
+ if (angle >= -CesiumMath.PI && angle <= CesiumMath.PI) {
277
+ return angle;
278
+ }
279
+ return CesiumMath.zeroToTwoPi(angle + CesiumMath.PI) - CesiumMath.PI;
280
+ };
281
+ CesiumMath.zeroToTwoPi = function(angle) {
282
+ if (!defined_default(angle)) {
283
+ throw new DeveloperError_default("angle is required.");
284
+ }
285
+ if (angle >= 0 && angle <= CesiumMath.TWO_PI) {
286
+ return angle;
287
+ }
288
+ const mod = CesiumMath.mod(angle, CesiumMath.TWO_PI);
289
+ if (Math.abs(mod) < CesiumMath.EPSILON14 && Math.abs(angle) > CesiumMath.EPSILON14) {
290
+ return CesiumMath.TWO_PI;
291
+ }
292
+ return mod;
293
+ };
294
+ CesiumMath.mod = function(m, n) {
295
+ if (!defined_default(m)) {
296
+ throw new DeveloperError_default("m is required.");
297
+ }
298
+ if (!defined_default(n)) {
299
+ throw new DeveloperError_default("n is required.");
300
+ }
301
+ if (n === 0) {
302
+ throw new DeveloperError_default("divisor cannot be 0.");
303
+ }
304
+ if (CesiumMath.sign(m) === CesiumMath.sign(n) && Math.abs(m) < Math.abs(n)) {
305
+ return m;
306
+ }
307
+ return (m % n + n) % n;
308
+ };
309
+ CesiumMath.equalsEpsilon = function(left, right, relativeEpsilon, absoluteEpsilon) {
310
+ if (!defined_default(left)) {
311
+ throw new DeveloperError_default("left is required.");
312
+ }
313
+ if (!defined_default(right)) {
314
+ throw new DeveloperError_default("right is required.");
315
+ }
316
+ relativeEpsilon = relativeEpsilon ?? 0;
317
+ absoluteEpsilon = absoluteEpsilon ?? relativeEpsilon;
318
+ const absDiff = Math.abs(left - right);
319
+ return absDiff <= absoluteEpsilon || absDiff <= relativeEpsilon * Math.max(Math.abs(left), Math.abs(right));
320
+ };
321
+ CesiumMath.lessThan = function(left, right, absoluteEpsilon) {
322
+ if (!defined_default(left)) {
323
+ throw new DeveloperError_default("first is required.");
324
+ }
325
+ if (!defined_default(right)) {
326
+ throw new DeveloperError_default("second is required.");
327
+ }
328
+ if (!defined_default(absoluteEpsilon)) {
329
+ throw new DeveloperError_default("absoluteEpsilon is required.");
330
+ }
331
+ return left - right < -absoluteEpsilon;
332
+ };
333
+ CesiumMath.lessThanOrEquals = function(left, right, absoluteEpsilon) {
334
+ if (!defined_default(left)) {
335
+ throw new DeveloperError_default("first is required.");
336
+ }
337
+ if (!defined_default(right)) {
338
+ throw new DeveloperError_default("second is required.");
339
+ }
340
+ if (!defined_default(absoluteEpsilon)) {
341
+ throw new DeveloperError_default("absoluteEpsilon is required.");
342
+ }
343
+ return left - right < absoluteEpsilon;
344
+ };
345
+ CesiumMath.greaterThan = function(left, right, absoluteEpsilon) {
346
+ if (!defined_default(left)) {
347
+ throw new DeveloperError_default("first is required.");
348
+ }
349
+ if (!defined_default(right)) {
350
+ throw new DeveloperError_default("second is required.");
351
+ }
352
+ if (!defined_default(absoluteEpsilon)) {
353
+ throw new DeveloperError_default("absoluteEpsilon is required.");
354
+ }
355
+ return left - right > absoluteEpsilon;
356
+ };
357
+ CesiumMath.greaterThanOrEquals = function(left, right, absoluteEpsilon) {
358
+ if (!defined_default(left)) {
359
+ throw new DeveloperError_default("first is required.");
360
+ }
361
+ if (!defined_default(right)) {
362
+ throw new DeveloperError_default("second is required.");
363
+ }
364
+ if (!defined_default(absoluteEpsilon)) {
365
+ throw new DeveloperError_default("absoluteEpsilon is required.");
366
+ }
367
+ return left - right > -absoluteEpsilon;
368
+ };
369
+ var factorials = [1];
370
+ CesiumMath.factorial = function(n) {
371
+ if (typeof n !== "number" || n < 0) {
372
+ throw new DeveloperError_default(
373
+ "A number greater than or equal to 0 is required."
374
+ );
375
+ }
376
+ const length = factorials.length;
377
+ if (n >= length) {
378
+ let sum = factorials[length - 1];
379
+ for (let i = length; i <= n; i++) {
380
+ const next = sum * i;
381
+ factorials.push(next);
382
+ sum = next;
383
+ }
384
+ }
385
+ return factorials[n];
386
+ };
387
+ CesiumMath.incrementWrap = function(n, maximumValue, minimumValue) {
388
+ minimumValue = minimumValue ?? 0;
389
+ if (!defined_default(n)) {
390
+ throw new DeveloperError_default("n is required.");
391
+ }
392
+ if (maximumValue <= minimumValue) {
393
+ throw new DeveloperError_default("maximumValue must be greater than minimumValue.");
394
+ }
395
+ ++n;
396
+ if (n > maximumValue) {
397
+ n = minimumValue;
398
+ }
399
+ return n;
400
+ };
401
+ CesiumMath.isPowerOfTwo = function(n) {
402
+ if (typeof n !== "number" || n < 0 || n > 4294967295) {
403
+ throw new DeveloperError_default("A number between 0 and (2^32)-1 is required.");
404
+ }
405
+ return n !== 0 && (n & n - 1) === 0;
406
+ };
407
+ CesiumMath.nextPowerOfTwo = function(n) {
408
+ if (typeof n !== "number" || n < 0 || n > 2147483648) {
409
+ throw new DeveloperError_default("A number between 0 and 2^31 is required.");
410
+ }
411
+ --n;
412
+ n |= n >> 1;
413
+ n |= n >> 2;
414
+ n |= n >> 4;
415
+ n |= n >> 8;
416
+ n |= n >> 16;
417
+ ++n;
418
+ return n;
419
+ };
420
+ CesiumMath.previousPowerOfTwo = function(n) {
421
+ if (typeof n !== "number" || n < 0 || n > 4294967295) {
422
+ throw new DeveloperError_default("A number between 0 and (2^32)-1 is required.");
423
+ }
424
+ n |= n >> 1;
425
+ n |= n >> 2;
426
+ n |= n >> 4;
427
+ n |= n >> 8;
428
+ n |= n >> 16;
429
+ n |= n >> 32;
430
+ n = (n >>> 0) - (n >>> 1);
431
+ return n;
432
+ };
433
+ CesiumMath.clamp = function(value, min, max) {
434
+ Check_default.typeOf.number("value", value);
435
+ Check_default.typeOf.number("min", min);
436
+ Check_default.typeOf.number("max", max);
437
+ return value < min ? min : value > max ? max : value;
438
+ };
439
+ var randomNumberGenerator = new import_mersenne_twister.default();
440
+ CesiumMath.setRandomNumberSeed = function(seed) {
441
+ if (!defined_default(seed)) {
442
+ throw new DeveloperError_default("seed is required.");
443
+ }
444
+ randomNumberGenerator = new import_mersenne_twister.default(seed);
445
+ };
446
+ CesiumMath.nextRandomNumber = function() {
447
+ return randomNumberGenerator.random();
448
+ };
449
+ CesiumMath.randomBetween = function(min, max) {
450
+ return CesiumMath.nextRandomNumber() * (max - min) + min;
451
+ };
452
+ CesiumMath.acosClamped = function(value) {
453
+ if (!defined_default(value)) {
454
+ throw new DeveloperError_default("value is required.");
455
+ }
456
+ return Math.acos(CesiumMath.clamp(value, -1, 1));
457
+ };
458
+ CesiumMath.asinClamped = function(value) {
459
+ if (!defined_default(value)) {
460
+ throw new DeveloperError_default("value is required.");
461
+ }
462
+ return Math.asin(CesiumMath.clamp(value, -1, 1));
463
+ };
464
+ CesiumMath.chordLength = function(angle, radius) {
465
+ if (!defined_default(angle)) {
466
+ throw new DeveloperError_default("angle is required.");
467
+ }
468
+ if (!defined_default(radius)) {
469
+ throw new DeveloperError_default("radius is required.");
470
+ }
471
+ return 2 * radius * Math.sin(angle * 0.5);
472
+ };
473
+ CesiumMath.logBase = function(number, base) {
474
+ if (!defined_default(number)) {
475
+ throw new DeveloperError_default("number is required.");
476
+ }
477
+ if (!defined_default(base)) {
478
+ throw new DeveloperError_default("base is required.");
479
+ }
480
+ return Math.log(number) / Math.log(base);
481
+ };
482
+ CesiumMath.cbrt = Math.cbrt ?? function cbrt(number) {
483
+ const result = Math.pow(Math.abs(number), 1 / 3);
484
+ return number < 0 ? -result : result;
485
+ };
486
+ CesiumMath.log2 = Math.log2 ?? function log2(number) {
487
+ return Math.log(number) * Math.LOG2E;
488
+ };
489
+ CesiumMath.fog = function(distanceToCamera, density) {
490
+ const scalar = distanceToCamera * density;
491
+ return 1 - Math.exp(-(scalar * scalar));
492
+ };
493
+ CesiumMath.fastApproximateAtan = function(x) {
494
+ Check_default.typeOf.number("x", x);
495
+ return x * (-0.1784 * Math.abs(x) - 0.0663 * x * x + 1.0301);
496
+ };
497
+ CesiumMath.fastApproximateAtan2 = function(x, y) {
498
+ Check_default.typeOf.number("x", x);
499
+ Check_default.typeOf.number("y", y);
500
+ let opposite;
501
+ let t = Math.abs(x);
502
+ opposite = Math.abs(y);
503
+ const adjacent = Math.max(t, opposite);
504
+ opposite = Math.min(t, opposite);
505
+ const oppositeOverAdjacent = opposite / adjacent;
506
+ if (isNaN(oppositeOverAdjacent)) {
507
+ throw new DeveloperError_default("either x or y must be nonzero");
508
+ }
509
+ t = CesiumMath.fastApproximateAtan(oppositeOverAdjacent);
510
+ t = Math.abs(y) > Math.abs(x) ? CesiumMath.PI_OVER_TWO - t : t;
511
+ t = x < 0 ? CesiumMath.PI - t : t;
512
+ t = y < 0 ? -t : t;
513
+ return t;
514
+ };
515
+ var Math_default = CesiumMath;
516
+
517
+ export {
518
+ Math_default
519
+ };
@@ -0,0 +1,140 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 1.144.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
+ WebGLConstants_default
28
+ } from "./chunk-YGFVAGYF.js";
29
+ import {
30
+ Math_default
31
+ } from "./chunk-ACTVJHSP.js";
32
+ import {
33
+ DeveloperError_default
34
+ } from "./chunk-XLQZNQ4Z.js";
35
+ import {
36
+ defined_default
37
+ } from "./chunk-PCL3Y7H5.js";
38
+
39
+ // packages/engine/Source/Core/IndexDatatype.js
40
+ var IndexDatatype = {
41
+ /**
42
+ * 8-bit unsigned byte corresponding to <code>UNSIGNED_BYTE</code> and the type
43
+ * of an element in <code>Uint8Array</code>.
44
+ *
45
+ * @type {number}
46
+ * @constant
47
+ */
48
+ UNSIGNED_BYTE: WebGLConstants_default.UNSIGNED_BYTE,
49
+ /**
50
+ * 16-bit unsigned short corresponding to <code>UNSIGNED_SHORT</code> and the type
51
+ * of an element in <code>Uint16Array</code>.
52
+ *
53
+ * @type {number}
54
+ * @constant
55
+ */
56
+ UNSIGNED_SHORT: WebGLConstants_default.UNSIGNED_SHORT,
57
+ /**
58
+ * 32-bit unsigned int corresponding to <code>UNSIGNED_INT</code> and the type
59
+ * of an element in <code>Uint32Array</code>.
60
+ *
61
+ * @type {number}
62
+ * @constant
63
+ */
64
+ UNSIGNED_INT: WebGLConstants_default.UNSIGNED_INT
65
+ };
66
+ IndexDatatype.getSizeInBytes = function(indexDatatype) {
67
+ switch (indexDatatype) {
68
+ case IndexDatatype.UNSIGNED_BYTE:
69
+ return Uint8Array.BYTES_PER_ELEMENT;
70
+ case IndexDatatype.UNSIGNED_SHORT:
71
+ return Uint16Array.BYTES_PER_ELEMENT;
72
+ case IndexDatatype.UNSIGNED_INT:
73
+ return Uint32Array.BYTES_PER_ELEMENT;
74
+ }
75
+ throw new DeveloperError_default(
76
+ "indexDatatype is required and must be a valid IndexDatatype constant."
77
+ );
78
+ };
79
+ IndexDatatype.fromSizeInBytes = function(sizeInBytes) {
80
+ switch (sizeInBytes) {
81
+ case 2:
82
+ return IndexDatatype.UNSIGNED_SHORT;
83
+ case 4:
84
+ return IndexDatatype.UNSIGNED_INT;
85
+ case 1:
86
+ return IndexDatatype.UNSIGNED_BYTE;
87
+ //>>includeStart('debug', pragmas.debug);
88
+ default:
89
+ throw new DeveloperError_default(
90
+ "Size in bytes cannot be mapped to an IndexDatatype"
91
+ );
92
+ }
93
+ };
94
+ IndexDatatype.validate = function(indexDatatype) {
95
+ return defined_default(indexDatatype) && (indexDatatype === IndexDatatype.UNSIGNED_BYTE || indexDatatype === IndexDatatype.UNSIGNED_SHORT || indexDatatype === IndexDatatype.UNSIGNED_INT);
96
+ };
97
+ IndexDatatype.createTypedArray = function(numberOfVertices, indicesLengthOrArray) {
98
+ if (!defined_default(numberOfVertices)) {
99
+ throw new DeveloperError_default("numberOfVertices is required.");
100
+ }
101
+ if (numberOfVertices >= Math_default.SIXTY_FOUR_KILOBYTES) {
102
+ return new Uint32Array(indicesLengthOrArray);
103
+ }
104
+ return new Uint16Array(indicesLengthOrArray);
105
+ };
106
+ IndexDatatype.createTypedArrayFromArrayBuffer = function(numberOfVertices, sourceArray, byteOffset, length) {
107
+ if (!defined_default(numberOfVertices)) {
108
+ throw new DeveloperError_default("numberOfVertices is required.");
109
+ }
110
+ if (!defined_default(sourceArray)) {
111
+ throw new DeveloperError_default("sourceArray is required.");
112
+ }
113
+ if (!defined_default(byteOffset)) {
114
+ throw new DeveloperError_default("byteOffset is required.");
115
+ }
116
+ if (numberOfVertices >= Math_default.SIXTY_FOUR_KILOBYTES) {
117
+ return new Uint32Array(sourceArray, byteOffset, length);
118
+ }
119
+ return new Uint16Array(sourceArray, byteOffset, length);
120
+ };
121
+ IndexDatatype.fromTypedArray = function(array) {
122
+ if (array instanceof Uint8Array) {
123
+ return IndexDatatype.UNSIGNED_BYTE;
124
+ }
125
+ if (array instanceof Uint16Array) {
126
+ return IndexDatatype.UNSIGNED_SHORT;
127
+ }
128
+ if (array instanceof Uint32Array) {
129
+ return IndexDatatype.UNSIGNED_INT;
130
+ }
131
+ throw new DeveloperError_default(
132
+ "array must be a Uint8Array, Uint16Array, or Uint32Array."
133
+ );
134
+ };
135
+ Object.freeze(IndexDatatype);
136
+ var IndexDatatype_default = IndexDatatype;
137
+
138
+ export {
139
+ IndexDatatype_default
140
+ };