@hztxi/cesium-engine 25.0.7 → 26.2.2

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 (471) hide show
  1. package/Build/Workers/chunk-2FNKHQL3.js +754 -0
  2. package/Build/Workers/chunk-2NCNUVAT.js +56 -0
  3. package/Build/Workers/chunk-2ZYRUVVU.js +301 -0
  4. package/Build/Workers/chunk-36IU7N4V.js +1284 -0
  5. package/Build/Workers/chunk-3BDLET5S.js +198 -0
  6. package/Build/Workers/chunk-3JZXI44G.js +3822 -0
  7. package/Build/Workers/chunk-3N2UNLWJ.js +101 -0
  8. package/Build/Workers/chunk-3NCG2YYR.js +58 -0
  9. package/Build/Workers/chunk-3PRHI4KX.js +241 -0
  10. package/Build/Workers/chunk-3R6E2SH4.js +672 -0
  11. package/Build/Workers/chunk-3ZKKXEXL.js +415 -0
  12. package/Build/Workers/chunk-47KVKPTO.js +415 -0
  13. package/Build/Workers/chunk-4FFIJ7ZV.js +56 -0
  14. package/Build/Workers/chunk-4N227IPR.js +973 -0
  15. package/Build/Workers/chunk-4P6OAPBM.js +97 -0
  16. package/Build/Workers/chunk-4XR3K4GD.js +280 -0
  17. package/Build/Workers/chunk-4Z2JINRS.js +519 -0
  18. package/Build/Workers/chunk-4ZOLEPZK.js +519 -0
  19. package/Build/Workers/chunk-5EF3WWQG.js +352 -0
  20. package/Build/Workers/chunk-5I76476T.js +288 -0
  21. package/Build/Workers/chunk-5PBZKBAP.js +511 -0
  22. package/Build/Workers/chunk-5RVAAW26.js +82 -0
  23. package/Build/Workers/chunk-5VWK76PO.js +511 -0
  24. package/Build/Workers/chunk-6SEICASZ.js +241 -0
  25. package/Build/Workers/chunk-77DBX23X.js +455 -0
  26. package/Build/Workers/chunk-7C2D3DTI.js +959 -0
  27. package/Build/Workers/chunk-7GQOWCSN.js +959 -0
  28. package/Build/Workers/chunk-7J2ONMKC.js +198 -0
  29. package/Build/Workers/chunk-7MHUHXZZ.js +219 -0
  30. package/Build/Workers/chunk-7MQPHOAS.js +455 -0
  31. package/Build/Workers/chunk-7NJ5O7TP.js +387 -0
  32. package/Build/Workers/chunk-7T4MW2W4.js +368 -0
  33. package/Build/Workers/chunk-7UXZUGUZ.js +82 -0
  34. package/Build/Workers/chunk-7Y642MCO.js +352 -0
  35. package/Build/Workers/chunk-7ZFKBLUE.js +1054 -0
  36. package/Build/Workers/chunk-A2UHPWPL.js +38 -0
  37. package/Build/Workers/chunk-A7LGY5XS.js +140 -0
  38. package/Build/Workers/chunk-AN2NVYL6.js +1483 -0
  39. package/Build/Workers/chunk-AS2QC7H2.js +219 -0
  40. package/Build/Workers/chunk-AVOLMIGJ.js +57 -0
  41. package/Build/Workers/chunk-B7PT2VL5.js +630 -0
  42. package/Build/Workers/chunk-BHRHMUDM.js +147 -0
  43. package/Build/Workers/chunk-BUWAHRK5.js +672 -0
  44. package/Build/Workers/chunk-C5ET5HON.js +198 -0
  45. package/Build/Workers/chunk-C6XQGBPV.js +476 -0
  46. package/Build/Workers/chunk-C7B672RR.js +73 -0
  47. package/Build/Workers/chunk-CAEC5DA2.js +57 -0
  48. package/Build/Workers/chunk-CBCOHH5O.js +837 -0
  49. package/Build/Workers/chunk-CEMXKBQO.js +1800 -0
  50. package/Build/Workers/chunk-CKW3STKA.js +1067 -0
  51. package/Build/Workers/chunk-CV5RICKT.js +1992 -0
  52. package/Build/Workers/chunk-DBWSISJT.js +56 -0
  53. package/Build/Workers/chunk-DCMOBPLG.js +352 -0
  54. package/Build/Workers/chunk-DSBSPPPJ.js +1344 -0
  55. package/Build/Workers/chunk-DSGLDRTI.js +278 -0
  56. package/Build/Workers/chunk-DXD7OPSP.js +1992 -0
  57. package/Build/Workers/chunk-DXECZBSA.js +368 -0
  58. package/Build/Workers/chunk-DZIRO6ZK.js +682 -0
  59. package/Build/Workers/chunk-E4CRPGX5.js +140 -0
  60. package/Build/Workers/chunk-E4IVMEBH.js +52 -0
  61. package/Build/Workers/chunk-E6IPM6HP.js +56 -0
  62. package/Build/Workers/chunk-EB2HAHRY.js +1054 -0
  63. package/Build/Workers/chunk-ECDCQXCO.js +1992 -0
  64. package/Build/Workers/chunk-ECN3VUMA.js +73 -0
  65. package/Build/Workers/chunk-ECSKVHUB.js +476 -0
  66. package/Build/Workers/chunk-EIENGLA5.js +278 -0
  67. package/Build/Workers/chunk-EK5CWDW2.js +476 -0
  68. package/Build/Workers/chunk-EL4B5CSQ.js +162 -0
  69. package/Build/Workers/chunk-EUCUBIEZ.js +97 -0
  70. package/Build/Workers/chunk-FAYBQGKO.js +219 -0
  71. package/Build/Workers/chunk-FGCXPEZM.js +3201 -0
  72. package/Build/Workers/chunk-FHCRXPA6.js +44 -0
  73. package/Build/Workers/chunk-FM6EQUFX.js +1800 -0
  74. package/Build/Workers/chunk-FPFGGQ4X.js +301 -0
  75. package/Build/Workers/chunk-FQ42MT7M.js +58 -0
  76. package/Build/Workers/chunk-FQDYQG4P.js +1284 -0
  77. package/Build/Workers/chunk-FQTV6W3I.js +973 -0
  78. package/Build/Workers/chunk-FTCBY5HH.js +138 -0
  79. package/Build/Workers/chunk-GI5RWJAY.js +101 -0
  80. package/Build/Workers/chunk-GNLMSDRO.js +945 -0
  81. package/Build/Workers/chunk-GTA727KQ.js +140 -0
  82. package/Build/Workers/chunk-GVUJ6O3R.js +73 -0
  83. package/Build/Workers/chunk-GXTM7AG3.js +1483 -0
  84. package/Build/Workers/chunk-HAXQB2FS.js +2719 -0
  85. package/Build/Workers/chunk-HCGU7OCG.js +97 -0
  86. package/Build/Workers/chunk-HRIPVWSC.js +58 -0
  87. package/Build/Workers/chunk-IC3BR6SC.js +102 -0
  88. package/Build/Workers/chunk-IEPPOHF3.js +44 -0
  89. package/Build/Workers/chunk-IU3YAYPT.js +1344 -0
  90. package/Build/Workers/chunk-J3AXZ4WC.js +124 -0
  91. package/Build/Workers/chunk-J7MZR7B2.js +1483 -0
  92. package/Build/Workers/chunk-KBNW776Q.js +305 -0
  93. package/Build/Workers/chunk-KBSWXVSY.js +837 -0
  94. package/Build/Workers/chunk-KEYTLNVK.js +1067 -0
  95. package/Build/Workers/chunk-KN3RQWUA.js +3201 -0
  96. package/Build/Workers/chunk-KSIEJYNL.js +3822 -0
  97. package/Build/Workers/chunk-KT3GG7AW.js +754 -0
  98. package/Build/Workers/chunk-KYCEM22I.js +1800 -0
  99. package/Build/Workers/chunk-L2TFZKN6.js +455 -0
  100. package/Build/Workers/chunk-LHKE2VUR.js +945 -0
  101. package/Build/Workers/chunk-LJTQW46H.js +57 -0
  102. package/Build/Workers/chunk-LMQGYJME.js +672 -0
  103. package/Build/Workers/chunk-LOBYJQA4.js +76 -0
  104. package/Build/Workers/chunk-LOF32O7F.js +163 -0
  105. package/Build/Workers/chunk-LOTIJA7D.js +124 -0
  106. package/Build/Workers/chunk-M7Z3MPAX.js +973 -0
  107. package/Build/Workers/chunk-MHNLTQHO.js +3201 -0
  108. package/Build/Workers/chunk-MICPAD7R.js +398 -0
  109. package/Build/Workers/chunk-ML7OMD72.js +2342 -0
  110. package/Build/Workers/chunk-MPJ73WMH.js +138 -0
  111. package/Build/Workers/chunk-MUTHG7T7.js +171 -0
  112. package/Build/Workers/chunk-NBTGXEMT.js +945 -0
  113. package/Build/Workers/chunk-NQZC37F7.js +38 -0
  114. package/Build/Workers/chunk-O3X3D2Z3.js +352 -0
  115. package/Build/Workers/chunk-OBUIHPKF.js +352 -0
  116. package/Build/Workers/chunk-PAEWNYIV.js +138 -0
  117. package/Build/Workers/chunk-PANJ7YH6.js +102 -0
  118. package/Build/Workers/chunk-PCL3Y7H5.js +82 -0
  119. package/Build/Workers/chunk-PHUELDXQ.js +76 -0
  120. package/Build/Workers/chunk-PIIUGRQD.js +387 -0
  121. package/Build/Workers/chunk-POKD22OT.js +2719 -0
  122. package/Build/Workers/chunk-PQMA7MFS.js +9237 -0
  123. package/Build/Workers/chunk-PQZW2QZG.js +163 -0
  124. package/Build/Workers/chunk-PURIPUSY.js +682 -0
  125. package/Build/Workers/chunk-QQZPPXY4.js +3822 -0
  126. package/Build/Workers/chunk-QXLQLGL2.js +1067 -0
  127. package/Build/Workers/chunk-R2JQAAU7.js +630 -0
  128. package/Build/Workers/chunk-RC4YC3VU.js +278 -0
  129. package/Build/Workers/chunk-RGNNWVR6.js +171 -0
  130. package/Build/Workers/chunk-RUOETBWP.js +288 -0
  131. package/Build/Workers/chunk-RV4EPLBO.js +2342 -0
  132. package/Build/Workers/chunk-SBBIEHYT.js +44 -0
  133. package/Build/Workers/chunk-SBEQLEO5.js +352 -0
  134. package/Build/Workers/chunk-SGC2GT3Y.js +1284 -0
  135. package/Build/Workers/chunk-SKLK4CBL.js +162 -0
  136. package/Build/Workers/chunk-SWVZTU6X.js +305 -0
  137. package/Build/Workers/chunk-T3EUPM5A.js +454 -0
  138. package/Build/Workers/chunk-TA6IU2XL.js +171 -0
  139. package/Build/Workers/chunk-TLSGD5TR.js +280 -0
  140. package/Build/Workers/chunk-TNDQT5AB.js +682 -0
  141. package/Build/Workers/chunk-TOXDLWKZ.js +368 -0
  142. package/Build/Workers/chunk-TZBM6TAB.js +124 -0
  143. package/Build/Workers/chunk-U2OY6MX6.js +398 -0
  144. package/Build/Workers/chunk-UCY4B5EV.js +288 -0
  145. package/Build/Workers/chunk-V52FEPCV.js +754 -0
  146. package/Build/Workers/chunk-VBEXZBG5.js +147 -0
  147. package/Build/Workers/chunk-VC76B6GM.js +959 -0
  148. package/Build/Workers/chunk-VCUOYHWC.js +519 -0
  149. package/Build/Workers/chunk-VDBQVKTF.js +387 -0
  150. package/Build/Workers/chunk-VJIL5H6K.js +2719 -0
  151. package/Build/Workers/chunk-VJLDRHKN.js +511 -0
  152. package/Build/Workers/chunk-VMF7KOGY.js +162 -0
  153. package/Build/Workers/chunk-W3X2ZAEJ.js +52 -0
  154. package/Build/Workers/chunk-W5OCKMPJ.js +101 -0
  155. package/Build/Workers/chunk-X4VZ33YL.js +454 -0
  156. package/Build/Workers/chunk-XDM5A6C4.js +102 -0
  157. package/Build/Workers/chunk-XHT5SVP4.js +52 -0
  158. package/Build/Workers/chunk-XITBARMZ.js +2342 -0
  159. package/Build/Workers/chunk-XLQZNQ4Z.js +163 -0
  160. package/Build/Workers/chunk-XZ6HDXKM.js +76 -0
  161. package/Build/Workers/chunk-Y6AQK4FY.js +1344 -0
  162. package/Build/Workers/chunk-Y7NDFEQ3.js +398 -0
  163. package/Build/Workers/chunk-YBBQDYX2.js +301 -0
  164. package/Build/Workers/chunk-YHPYPVAB.js +837 -0
  165. package/Build/Workers/chunk-YJBPRW4A.js +415 -0
  166. package/Build/Workers/chunk-YNKK6BXY.js +454 -0
  167. package/Build/Workers/chunk-YRAJ74HR.js +305 -0
  168. package/Build/Workers/chunk-YULTZK5O.js +147 -0
  169. package/Build/Workers/chunk-YUNQYP3Z.js +9237 -0
  170. package/Build/Workers/chunk-YX2FOQMF.js +9237 -0
  171. package/Build/Workers/chunk-Z7BONRW2.js +241 -0
  172. package/Build/Workers/chunk-ZK2R3DEJ.js +1054 -0
  173. package/Build/Workers/combineGeometry.js +24 -24
  174. package/Build/Workers/createBoxGeometry.js +18 -18
  175. package/Build/Workers/createBoxOutlineGeometry.js +18 -18
  176. package/Build/Workers/createCircleGeometry.js +26 -26
  177. package/Build/Workers/createCircleOutlineGeometry.js +19 -19
  178. package/Build/Workers/createCoplanarPolygonGeometry.js +39 -39
  179. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +33 -33
  180. package/Build/Workers/createCorridorGeometry.js +36 -37
  181. package/Build/Workers/createCorridorOutlineGeometry.js +34 -35
  182. package/Build/Workers/createCylinderGeometry.js +20 -20
  183. package/Build/Workers/createCylinderOutlineGeometry.js +20 -20
  184. package/Build/Workers/createEllipseGeometry.js +26 -26
  185. package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
  186. package/Build/Workers/createEllipsoidGeometry.js +19 -19
  187. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
  188. package/Build/Workers/createFrustumGeometry.js +18 -18
  189. package/Build/Workers/createFrustumOutlineGeometry.js +20 -20
  190. package/Build/Workers/createGeometry.js +25 -24
  191. package/Build/Workers/createGroundPolylineGeometry.js +26 -26
  192. package/Build/Workers/createMvtTile.js +111 -19
  193. package/Build/Workers/createPlaneGeometry.js +18 -18
  194. package/Build/Workers/createPlaneOutlineGeometry.js +17 -17
  195. package/Build/Workers/createPolygonGeometry.js +36 -36
  196. package/Build/Workers/createPolygonOutlineGeometry.js +33 -33
  197. package/Build/Workers/createPolylineGeometry.js +28 -28
  198. package/Build/Workers/createPolylineVolumeGeometry.js +38 -36
  199. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +32 -31
  200. package/Build/Workers/createRectangleGeometry.js +29 -29
  201. package/Build/Workers/createRectangleOutlineGeometry.js +23 -23
  202. package/Build/Workers/createSimplePolylineGeometry.js +26 -26
  203. package/Build/Workers/createSphereGeometry.js +19 -19
  204. package/Build/Workers/createSphereOutlineGeometry.js +18 -18
  205. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  206. package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
  207. package/Build/Workers/createVectorTileGeometries.js +24 -24
  208. package/Build/Workers/createVectorTilePoints.js +13 -13
  209. package/Build/Workers/createVectorTilePolygons.js +22 -22
  210. package/Build/Workers/createVectorTilePolylines.js +14 -14
  211. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +26 -26
  212. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +23 -23
  213. package/Build/Workers/createVerticesFromHeightmap.js +23 -23
  214. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +21 -21
  215. package/Build/Workers/createWallGeometry.js +26 -26
  216. package/Build/Workers/createWallOutlineGeometry.js +26 -26
  217. package/Build/Workers/decodeDraco.js +10 -10
  218. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +993 -2334
  219. package/Build/Workers/decodeI3S.js +10 -10
  220. package/Build/Workers/gaussianSplatSorter.js +4 -4
  221. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  222. package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
  223. package/Build/Workers/transcodeKTX2.js +6 -6
  224. package/Build/Workers/transferTypedArrayTest.js +1 -1
  225. package/Build/Workers/upsampleQuantizedTerrainMesh.js +23 -23
  226. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +26 -26
  227. package/Source/Core/ArcGISTiledElevationTerrainProvider.js +1 -5
  228. package/Source/Core/BoundingRectangle.js +6 -8
  229. package/Source/Core/BoundingSphere.js +0 -3
  230. package/Source/Core/Cartesian2.js +1 -1
  231. package/Source/Core/Cartesian3.js +1 -1
  232. package/Source/Core/Cartesian4.js +1 -1
  233. package/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js +3 -4
  234. package/Source/Core/Color.js +1 -0
  235. package/Source/Core/ComponentDatatype.js +35 -0
  236. package/Source/Core/CoplanarPolygonGeometry.js +2 -2
  237. package/Source/Core/CorridorGeometry.js +2 -4
  238. package/Source/Core/CorridorOutlineGeometry.js +1 -3
  239. package/Source/Core/EarthOrientationParameters.js +2 -2
  240. package/Source/Core/EllipseGeometryLibrary.js +2 -2
  241. package/Source/Core/EllipsoidGeodesic.js +3 -3
  242. package/Source/Core/EllipsoidRhumbLine.js +1 -1
  243. package/Source/Core/Heap.js +1 -1
  244. package/Source/Core/HermitePolynomialApproximation.js +215 -179
  245. package/Source/Core/InterpolationAlgorithm.js +58 -50
  246. package/Source/Core/Ion.js +1 -1
  247. package/Source/Core/JulianDate.js +1 -1
  248. package/Source/Core/LagrangePolynomialApproximation.js +55 -52
  249. package/Source/Core/LinearApproximation.js +69 -66
  250. package/Source/Core/MapProjection.js +1 -0
  251. package/Source/Core/Math.js +59 -0
  252. package/Source/Core/Matrix2.js +3 -3
  253. package/Source/Core/Matrix3.js +3 -3
  254. package/Source/Core/Matrix4.js +1 -1
  255. package/Source/Core/OrthographicFrustum.js +1 -1
  256. package/Source/Core/PerspectiveFrustum.js +1 -1
  257. package/Source/Core/PolygonGeometry.js +2 -2
  258. package/Source/Core/PolygonGeometryLibrary.js +1 -1
  259. package/Source/Core/PolygonOutlineGeometry.js +1 -1
  260. package/Source/Core/PolylineGeometry.js +1 -1
  261. package/Source/Core/PolylineVolumeGeometryLibrary.js +1 -1
  262. package/Source/Core/Rectangle.js +7 -1
  263. package/Source/Core/RectangleOutlineGeometry.js +1 -1
  264. package/Source/Core/Resource.js +1 -1
  265. package/Source/Core/ScreenSpaceEventHandler.js +51 -41
  266. package/Source/Core/SimplePolylineGeometry.js +1 -1
  267. package/Source/Core/TerrainEncoding.js +2 -2
  268. package/Source/Core/TerrainMesh.js +3 -3
  269. package/Source/Core/TerrainPicker.js +180 -168
  270. package/Source/Core/TimeIntervalCollection.js +1 -3
  271. package/Source/Core/Tipsify.js +1 -1
  272. package/Source/Core/Transforms.js +5 -1
  273. package/Source/Core/VectorPipeline.js +1117 -0
  274. package/Source/Core/VectorProvider.js +429 -0
  275. package/Source/Core/WallOutlineGeometry.js +1 -1
  276. package/Source/Core/createColorRamp.js +37 -0
  277. package/Source/Core/getTimestamp.js +4 -2
  278. package/Source/Core/globalTypes.js +25 -0
  279. package/Source/Core/writeTextToCanvas.js +1 -0
  280. package/Source/DataSources/CompositeEntityCollection.js +0 -1
  281. package/Source/DataSources/CzmlDataSource.js +14 -0
  282. package/Source/DataSources/DataSourceDisplay.js +1 -1
  283. package/Source/DataSources/GeoJsonDataSource.js +0 -1
  284. package/Source/DataSources/GeometryVisualizer.js +1 -1
  285. package/Source/DataSources/KmlDataSource.js +529 -557
  286. package/Source/DataSources/PathGraphics.js +8 -1
  287. package/Source/DataSources/PathMode.js +27 -0
  288. package/Source/DataSources/PathVisualizer.js +298 -1
  289. package/Source/DataSources/PolylineVisualizer.js +1 -1
  290. package/Source/DataSources/StaticOutlineGeometryBatch.js +1 -1
  291. package/Source/Renderer/AutomaticUniforms.js +23 -0
  292. package/Source/Renderer/Context.js +9 -3
  293. package/Source/Renderer/DrawCommand.js +22 -0
  294. package/Source/Renderer/Framebuffer.js +4 -0
  295. package/Source/Renderer/Pass.js +11 -9
  296. package/Source/Renderer/Texture.js +12 -1
  297. package/Source/Renderer/UniformState.js +7 -0
  298. package/Source/Renderer/VertexArray.js +1 -1
  299. package/Source/Renderer/createUniform.js +346 -239
  300. package/Source/Renderer/createUniformArray.js +494 -381
  301. package/Source/Scene/ArcGisMapServerImageryProvider.js +0 -5
  302. package/Source/Scene/ArcGisMapService.js +1 -1
  303. package/Source/Scene/Billboard.js +2 -1
  304. package/Source/Scene/BillboardCollection.js +15 -5
  305. package/Source/Scene/BillboardTexture.js +5 -3
  306. package/Source/Scene/BufferPointCollection.js +11 -1
  307. package/Source/Scene/BufferPolygonCollection.js +26 -0
  308. package/Source/Scene/BufferPolylineCollection.js +2 -0
  309. package/Source/Scene/BufferPrimitiveCollection.js +105 -32
  310. package/Source/Scene/Camera.js +85 -9
  311. package/Source/Scene/CameraEventAggregator.js +30 -18
  312. package/Source/Scene/CameraFlightPath.js +7 -4
  313. package/Source/Scene/Cesium3DTile.js +102 -4
  314. package/Source/Scene/Cesium3DTileContent.js +195 -254
  315. package/Source/Scene/Cesium3DTileContentFactory.js +10 -2
  316. package/Source/Scene/Cesium3DTileOptimizations.js +4 -6
  317. package/Source/Scene/Cesium3DTileStyle.js +40 -0
  318. package/Source/Scene/Cesium3DTileset.js +213 -8
  319. package/Source/Scene/Cesium3DTilesetTraversal.js +14 -0
  320. package/Source/Scene/ClippingPlaneCollection.js +4 -4
  321. package/Source/Scene/ClippingPolygon.js +2 -0
  322. package/Source/Scene/ClippingPolygonCollection.js +2 -2
  323. package/Source/Scene/Composite3DTileContent.js +254 -292
  324. package/Source/Scene/Controllers/Controller.js +63 -0
  325. package/Source/Scene/Controllers/ControllerHost.js +78 -0
  326. package/Source/Scene/Controllers/HybridScreenSpacePanCameraController.js +106 -0
  327. package/Source/Scene/Controllers/MouseButton.js +32 -0
  328. package/Source/Scene/Controllers/ScreenSpaceElevatorCameraController.js +295 -0
  329. package/Source/Scene/Controllers/ScreenSpaceInputBindings.js +154 -0
  330. package/Source/Scene/Controllers/ScreenSpaceMapCameraController.js +310 -0
  331. package/Source/Scene/Controllers/ScreenSpaceTiltOrbitCameraController.js +642 -0
  332. package/Source/Scene/Controllers/ScreenSpaceZoomCameraController.js +431 -0
  333. package/Source/Scene/Controllers/defaultPickWorldPosition.js +84 -0
  334. package/Source/Scene/DerivedCommand.js +98 -0
  335. package/Source/Scene/EdgeDisplayMode.js +50 -0
  336. package/Source/Scene/EdgeFramebuffer.js +1 -5
  337. package/Source/Scene/Empty3DTileContent.js +100 -132
  338. package/Source/Scene/Expression.js +6 -8
  339. package/Source/Scene/FrameState.js +17 -0
  340. package/Source/Scene/GaussianSplat3DTileContent.js +436 -478
  341. package/Source/Scene/GeoJsonPrimitive.js +874 -0
  342. package/Source/Scene/Geometry3DTileContent.js +151 -185
  343. package/Source/Scene/Globe.js +22 -1
  344. package/Source/Scene/GlobeDepth.js +27 -1
  345. package/Source/Scene/GlobeSurfaceShaderSet.js +637 -540
  346. package/Source/Scene/GlobeSurfaceTile.js +575 -398
  347. package/Source/Scene/GlobeSurfaceTileProvider.js +1412 -1184
  348. package/Source/Scene/GltfBufferViewLoader.js +3 -3
  349. package/Source/Scene/GltfLoader.js +146 -3
  350. package/Source/Scene/GltfLoaderUtil.js +20 -4
  351. package/Source/Scene/GltfPipeline/forEachTextureInMaterial.js +10 -0
  352. package/Source/Scene/GltfPipeline/removeUnusedElements.js +21 -11
  353. package/Source/Scene/GltfSpzLoader.js +1 -1
  354. package/Source/Scene/GltfVertexBufferLoader.js +6 -3
  355. package/Source/Scene/I3SDataProvider.js +1 -1
  356. package/Source/Scene/I3SLayer.js +1 -1
  357. package/Source/Scene/I3SNode.js +2 -2
  358. package/Source/Scene/ImageryLayer.js +2 -2
  359. package/Source/Scene/ImageryLayerCollection.js +190 -6
  360. package/Source/Scene/Implicit3DTileContent.js +192 -216
  361. package/Source/Scene/ImplicitTileCoordinates.js +17 -0
  362. package/Source/Scene/IonImageryProvider.js +1 -5
  363. package/Source/Scene/Label.js +4 -4
  364. package/Source/Scene/LabelCollection.js +4 -1
  365. package/Source/Scene/MVTDataProvider.js +555 -0
  366. package/Source/Scene/Material.js +1 -0
  367. package/Source/Scene/Model/B3dmLoader.js +1 -2
  368. package/Source/Scene/Model/EdgeVisibilityPipelineStage.js +82 -312
  369. package/Source/Scene/Model/Extensions/Gpm/GltfGpmLoader.js +4 -0
  370. package/Source/Scene/Model/I3dmLoader.js +1 -1
  371. package/Source/Scene/Model/InstancingPipelineStage.js +4 -7
  372. package/Source/Scene/Model/MaterialPipelineStage.js +124 -1
  373. package/Source/Scene/Model/Model.js +45 -10
  374. package/Source/Scene/Model/Model3DTileContent.js +424 -458
  375. package/Source/Scene/Model/ModelClippingPlanesPipelineStage.js +28 -1
  376. package/Source/Scene/Model/ModelDrawCommand.js +180 -8
  377. package/Source/Scene/Model/ModelDrawCommands.js +4 -0
  378. package/Source/Scene/Model/ModelSceneGraph.js +21 -0
  379. package/Source/Scene/Model/ModelUtility.js +5 -0
  380. package/Source/Scene/Model/PickingPipelineStage.js +29 -0
  381. package/Source/Scene/Model/PrimitiveRenderResources.js +24 -0
  382. package/Source/Scene/Model/createVectorTileBuffersFromModelComponents.js +645 -153
  383. package/Source/Scene/ModelComponents.js +112 -0
  384. package/Source/Scene/Multiple3DTileContent.js +291 -334
  385. package/Source/Scene/MvtLabelCandidates.js +295 -0
  386. package/Source/Scene/MvtLabelManager.js +1069 -0
  387. package/Source/Scene/Picking.js +19 -3
  388. package/Source/Scene/PlanarFillIdFramebuffer.js +172 -0
  389. package/Source/Scene/PntsParser.js +1 -1
  390. package/Source/Scene/PolylineCollection.js +5 -3
  391. package/Source/Scene/PostProcessStage.js +4 -2
  392. package/Source/Scene/QuadtreePrimitive.js +3 -2
  393. package/Source/Scene/ResourceCache.js +7 -4
  394. package/Source/Scene/ResourceCacheKey.js +21 -18
  395. package/Source/Scene/Scene.js +237 -11
  396. package/Source/Scene/SceneTransforms.js +6 -5
  397. package/Source/Scene/ShadowMap.js +9 -3
  398. package/Source/Scene/ShadowMapShader.js +50 -2
  399. package/Source/Scene/SnapFramebuffer.js +121 -0
  400. package/Source/Scene/Snapping.js +184 -0
  401. package/Source/Scene/TerrainFillMesh.js +3 -2
  402. package/Source/Scene/Tileset3DTileContent.js +113 -146
  403. package/Source/Scene/UrlTemplate3DTilesDataProvider.js +543 -0
  404. package/Source/Scene/Vector3DTileContent.js +207 -237
  405. package/Source/Scene/VectorGltf3DTileContent.js +185 -45
  406. package/Source/Scene/View.js +10 -8
  407. package/Source/Scene/VoxelPrimitive.js +159 -175
  408. package/Source/Scene/VoxelProvider.js +64 -91
  409. package/Source/Scene/VoxelTraversal.js +1 -1
  410. package/Source/Scene/buildVectorGltfFromMVT.js +1208 -0
  411. package/Source/Scene/buildVoxelCustomShader.js +199 -0
  412. package/Source/Scene/createElevationBandMaterial.js +1 -1
  413. package/Source/Scene/decodeMVT.js +877 -0
  414. package/Source/Scene/findMeshoptExtension.js +23 -0
  415. package/Source/Scene/renderBufferPointCollection.js +114 -64
  416. package/Source/Scene/renderBufferPolygonCollection.js +245 -53
  417. package/Source/Scene/renderBufferPolylineCollection.js +271 -145
  418. package/Source/Shaders/BillboardCollectionVS.glsl +23 -25
  419. package/Source/Shaders/BillboardCollectionVS.js +23 -25
  420. package/Source/Shaders/BufferPointMaterialFS.glsl +1 -0
  421. package/Source/Shaders/BufferPointMaterialFS.js +1 -0
  422. package/Source/Shaders/BufferPointMaterialVS.glsl +19 -9
  423. package/Source/Shaders/BufferPointMaterialVS.js +20 -10
  424. package/Source/Shaders/BufferPolygonMaterialFS.glsl +13 -0
  425. package/Source/Shaders/BufferPolygonMaterialFS.js +13 -0
  426. package/Source/Shaders/BufferPolygonMaterialVS.glsl +22 -4
  427. package/Source/Shaders/BufferPolygonMaterialVS.js +23 -5
  428. package/Source/Shaders/BufferPolylineMaterialVS.glsl +16 -2
  429. package/Source/Shaders/BufferPolylineMaterialVS.js +17 -3
  430. package/Source/Shaders/Builtin/Constants/passCesium3DTile.glsl +1 -1
  431. package/Source/Shaders/Builtin/Constants/passCesium3DTile.js +1 -1
  432. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.glsl +1 -1
  433. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.js +1 -1
  434. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.glsl +1 -1
  435. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.js +1 -1
  436. package/Source/Shaders/Builtin/Constants/passCesium3DTileEdgesDirect.glsl +9 -0
  437. package/Source/Shaders/Builtin/Constants/passCesium3DTileEdgesDirect.js +11 -0
  438. package/Source/Shaders/Builtin/Constants/passCesium3DTilePlanarFillId.glsl +9 -0
  439. package/Source/Shaders/Builtin/Constants/passCesium3DTilePlanarFillId.js +11 -0
  440. package/Source/Shaders/Builtin/Constants/passClassification.glsl +1 -1
  441. package/Source/Shaders/Builtin/Constants/passClassification.js +1 -1
  442. package/Source/Shaders/Builtin/Constants/passGaussianSplats.glsl +1 -1
  443. package/Source/Shaders/Builtin/Constants/passGaussianSplats.js +1 -1
  444. package/Source/Shaders/Builtin/Constants/passOpaque.glsl +1 -1
  445. package/Source/Shaders/Builtin/Constants/passOpaque.js +1 -1
  446. package/Source/Shaders/Builtin/Constants/passOverlay.glsl +1 -1
  447. package/Source/Shaders/Builtin/Constants/passOverlay.js +1 -1
  448. package/Source/Shaders/Builtin/Constants/passTranslucent.glsl +1 -1
  449. package/Source/Shaders/Builtin/Constants/passTranslucent.js +1 -1
  450. package/Source/Shaders/Builtin/Constants/passVoxels.glsl +1 -1
  451. package/Source/Shaders/Builtin/Constants/passVoxels.js +1 -1
  452. package/Source/Shaders/Builtin/CzmBuiltins.js +4 -0
  453. package/Source/Shaders/GlobeFS.glsl +10 -6
  454. package/Source/Shaders/GlobeFS.js +10 -6
  455. package/Source/Shaders/Materials/PolylineGlowMaterial.glsl +1 -1
  456. package/Source/Shaders/Materials/PolylineGlowMaterial.js +1 -1
  457. package/Source/Shaders/Model/EdgeVisibilityStageVS.glsl +0 -1
  458. package/Source/Shaders/Model/EdgeVisibilityStageVS.js +0 -1
  459. package/Source/Shaders/Model/MaterialStageFS.glsl +8 -2
  460. package/Source/Shaders/Model/MaterialStageFS.js +8 -2
  461. package/Source/Shaders/Model/ModelFS.glsl +105 -0
  462. package/Source/Shaders/Model/ModelFS.js +105 -0
  463. package/Source/Shaders/VectorCommon.glsl +178 -0
  464. package/Source/Shaders/VectorCommon.js +180 -0
  465. package/Source/ThirdParty/zip-module.wasm +0 -0
  466. package/Source/Widget/CesiumWidget.js +30 -0
  467. package/Source/Workers/createMvtTile.js +39 -0
  468. package/Source/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2
  469. package/Source/Workers/incrementallyBuildTerrainPicker.js +2 -0
  470. package/index.js +214 -184
  471. package/package.json +13 -13
@@ -0,0 +1,398 @@
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
+ CylinderGeometryLibrary_default
28
+ } from "./chunk-ECN3VUMA.js";
29
+ import {
30
+ GeometryOffsetAttribute_default
31
+ } from "./chunk-SXSP3JHS.js";
32
+ import {
33
+ VertexFormat_default
34
+ } from "./chunk-FTCBY5HH.js";
35
+ import {
36
+ IndexDatatype_default
37
+ } from "./chunk-E4CRPGX5.js";
38
+ import {
39
+ GeometryAttributes_default
40
+ } from "./chunk-SBBIEHYT.js";
41
+ import {
42
+ BoundingSphere_default
43
+ } from "./chunk-FQDYQG4P.js";
44
+ import {
45
+ GeometryAttribute_default,
46
+ Geometry_default,
47
+ PrimitiveType_default
48
+ } from "./chunk-YBBQDYX2.js";
49
+ import {
50
+ ComponentDatatype_default
51
+ } from "./chunk-DSGLDRTI.js";
52
+ import {
53
+ Cartesian2_default
54
+ } from "./chunk-DXD7OPSP.js";
55
+ import {
56
+ Cartesian3_default,
57
+ Frozen_default
58
+ } from "./chunk-ML7OMD72.js";
59
+ import {
60
+ Math_default
61
+ } from "./chunk-VCUOYHWC.js";
62
+ import {
63
+ DeveloperError_default
64
+ } from "./chunk-XLQZNQ4Z.js";
65
+ import {
66
+ defined_default
67
+ } from "./chunk-PCL3Y7H5.js";
68
+
69
+ // packages/engine/Source/Core/CylinderGeometry.js
70
+ var radiusScratch = new Cartesian2_default();
71
+ var normalScratch = new Cartesian3_default();
72
+ var bitangentScratch = new Cartesian3_default();
73
+ var tangentScratch = new Cartesian3_default();
74
+ var positionScratch = new Cartesian3_default();
75
+ function CylinderGeometry(options) {
76
+ options = options ?? Frozen_default.EMPTY_OBJECT;
77
+ const length = options.length;
78
+ const topRadius = options.topRadius;
79
+ const bottomRadius = options.bottomRadius;
80
+ const vertexFormat = options.vertexFormat ?? VertexFormat_default.DEFAULT;
81
+ const slices = options.slices ?? 128;
82
+ if (!defined_default(length)) {
83
+ throw new DeveloperError_default("options.length must be defined.");
84
+ }
85
+ if (!defined_default(topRadius)) {
86
+ throw new DeveloperError_default("options.topRadius must be defined.");
87
+ }
88
+ if (!defined_default(bottomRadius)) {
89
+ throw new DeveloperError_default("options.bottomRadius must be defined.");
90
+ }
91
+ if (slices < 3) {
92
+ throw new DeveloperError_default(
93
+ "options.slices must be greater than or equal to 3."
94
+ );
95
+ }
96
+ if (defined_default(options.offsetAttribute) && options.offsetAttribute === GeometryOffsetAttribute_default.TOP) {
97
+ throw new DeveloperError_default(
98
+ "GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry."
99
+ );
100
+ }
101
+ this._length = length;
102
+ this._topRadius = topRadius;
103
+ this._bottomRadius = bottomRadius;
104
+ this._vertexFormat = VertexFormat_default.clone(vertexFormat);
105
+ this._slices = slices;
106
+ this._offsetAttribute = options.offsetAttribute;
107
+ this._workerName = "createCylinderGeometry";
108
+ }
109
+ CylinderGeometry.packedLength = VertexFormat_default.packedLength + 5;
110
+ CylinderGeometry.pack = function(value, array, startingIndex) {
111
+ if (!defined_default(value)) {
112
+ throw new DeveloperError_default("value is required");
113
+ }
114
+ if (!defined_default(array)) {
115
+ throw new DeveloperError_default("array is required");
116
+ }
117
+ startingIndex = startingIndex ?? 0;
118
+ VertexFormat_default.pack(value._vertexFormat, array, startingIndex);
119
+ startingIndex += VertexFormat_default.packedLength;
120
+ array[startingIndex++] = value._length;
121
+ array[startingIndex++] = value._topRadius;
122
+ array[startingIndex++] = value._bottomRadius;
123
+ array[startingIndex++] = value._slices;
124
+ array[startingIndex] = value._offsetAttribute ?? -1;
125
+ return array;
126
+ };
127
+ var scratchVertexFormat = new VertexFormat_default();
128
+ var scratchOptions = {
129
+ vertexFormat: scratchVertexFormat,
130
+ length: void 0,
131
+ topRadius: void 0,
132
+ bottomRadius: void 0,
133
+ slices: void 0,
134
+ offsetAttribute: void 0
135
+ };
136
+ CylinderGeometry.unpack = function(array, startingIndex, result) {
137
+ if (!defined_default(array)) {
138
+ throw new DeveloperError_default("array is required");
139
+ }
140
+ startingIndex = startingIndex ?? 0;
141
+ const vertexFormat = VertexFormat_default.unpack(
142
+ array,
143
+ startingIndex,
144
+ scratchVertexFormat
145
+ );
146
+ startingIndex += VertexFormat_default.packedLength;
147
+ const length = array[startingIndex++];
148
+ const topRadius = array[startingIndex++];
149
+ const bottomRadius = array[startingIndex++];
150
+ const slices = array[startingIndex++];
151
+ const offsetAttribute = array[startingIndex];
152
+ if (!defined_default(result)) {
153
+ scratchOptions.length = length;
154
+ scratchOptions.topRadius = topRadius;
155
+ scratchOptions.bottomRadius = bottomRadius;
156
+ scratchOptions.slices = slices;
157
+ scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
158
+ return new CylinderGeometry(scratchOptions);
159
+ }
160
+ result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
161
+ result._length = length;
162
+ result._topRadius = topRadius;
163
+ result._bottomRadius = bottomRadius;
164
+ result._slices = slices;
165
+ result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
166
+ return result;
167
+ };
168
+ CylinderGeometry.createGeometry = function(cylinderGeometry) {
169
+ let length = cylinderGeometry._length;
170
+ const topRadius = cylinderGeometry._topRadius;
171
+ const bottomRadius = cylinderGeometry._bottomRadius;
172
+ const vertexFormat = cylinderGeometry._vertexFormat;
173
+ const slices = cylinderGeometry._slices;
174
+ if (length <= 0 || topRadius < 0 || bottomRadius < 0 || topRadius === 0 && bottomRadius === 0) {
175
+ return;
176
+ }
177
+ const twoSlices = slices + slices;
178
+ const threeSlices = slices + twoSlices;
179
+ const numVertices = twoSlices + twoSlices;
180
+ const positions = CylinderGeometryLibrary_default.computePositions(
181
+ length,
182
+ topRadius,
183
+ bottomRadius,
184
+ slices,
185
+ true
186
+ );
187
+ const st = vertexFormat.st ? new Float32Array(numVertices * 2) : void 0;
188
+ const normals = vertexFormat.normal ? new Float32Array(numVertices * 3) : void 0;
189
+ const tangents = vertexFormat.tangent ? new Float32Array(numVertices * 3) : void 0;
190
+ const bitangents = vertexFormat.bitangent ? new Float32Array(numVertices * 3) : void 0;
191
+ let i;
192
+ const computeNormal = vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent;
193
+ if (computeNormal) {
194
+ const computeTangent = vertexFormat.tangent || vertexFormat.bitangent;
195
+ let normalIndex = 0;
196
+ let tangentIndex = 0;
197
+ let bitangentIndex = 0;
198
+ const theta = Math.atan2(bottomRadius - topRadius, length);
199
+ const normal = normalScratch;
200
+ normal.z = Math.sin(theta);
201
+ const normalScale = Math.cos(theta);
202
+ let tangent = tangentScratch;
203
+ let bitangent = bitangentScratch;
204
+ for (i = 0; i < slices; i++) {
205
+ const angle = i / slices * Math_default.TWO_PI;
206
+ const x = normalScale * Math.cos(angle);
207
+ const y = normalScale * Math.sin(angle);
208
+ if (computeNormal) {
209
+ normal.x = x;
210
+ normal.y = y;
211
+ if (computeTangent) {
212
+ tangent = Cartesian3_default.normalize(
213
+ Cartesian3_default.cross(Cartesian3_default.UNIT_Z, normal, tangent),
214
+ tangent
215
+ );
216
+ }
217
+ if (vertexFormat.normal) {
218
+ normals[normalIndex++] = normal.x;
219
+ normals[normalIndex++] = normal.y;
220
+ normals[normalIndex++] = normal.z;
221
+ normals[normalIndex++] = normal.x;
222
+ normals[normalIndex++] = normal.y;
223
+ normals[normalIndex++] = normal.z;
224
+ }
225
+ if (vertexFormat.tangent) {
226
+ tangents[tangentIndex++] = tangent.x;
227
+ tangents[tangentIndex++] = tangent.y;
228
+ tangents[tangentIndex++] = tangent.z;
229
+ tangents[tangentIndex++] = tangent.x;
230
+ tangents[tangentIndex++] = tangent.y;
231
+ tangents[tangentIndex++] = tangent.z;
232
+ }
233
+ if (vertexFormat.bitangent) {
234
+ bitangent = Cartesian3_default.normalize(
235
+ Cartesian3_default.cross(normal, tangent, bitangent),
236
+ bitangent
237
+ );
238
+ bitangents[bitangentIndex++] = bitangent.x;
239
+ bitangents[bitangentIndex++] = bitangent.y;
240
+ bitangents[bitangentIndex++] = bitangent.z;
241
+ bitangents[bitangentIndex++] = bitangent.x;
242
+ bitangents[bitangentIndex++] = bitangent.y;
243
+ bitangents[bitangentIndex++] = bitangent.z;
244
+ }
245
+ }
246
+ }
247
+ for (i = 0; i < slices; i++) {
248
+ if (vertexFormat.normal) {
249
+ normals[normalIndex++] = 0;
250
+ normals[normalIndex++] = 0;
251
+ normals[normalIndex++] = -1;
252
+ }
253
+ if (vertexFormat.tangent) {
254
+ tangents[tangentIndex++] = 1;
255
+ tangents[tangentIndex++] = 0;
256
+ tangents[tangentIndex++] = 0;
257
+ }
258
+ if (vertexFormat.bitangent) {
259
+ bitangents[bitangentIndex++] = 0;
260
+ bitangents[bitangentIndex++] = -1;
261
+ bitangents[bitangentIndex++] = 0;
262
+ }
263
+ }
264
+ for (i = 0; i < slices; i++) {
265
+ if (vertexFormat.normal) {
266
+ normals[normalIndex++] = 0;
267
+ normals[normalIndex++] = 0;
268
+ normals[normalIndex++] = 1;
269
+ }
270
+ if (vertexFormat.tangent) {
271
+ tangents[tangentIndex++] = 1;
272
+ tangents[tangentIndex++] = 0;
273
+ tangents[tangentIndex++] = 0;
274
+ }
275
+ if (vertexFormat.bitangent) {
276
+ bitangents[bitangentIndex++] = 0;
277
+ bitangents[bitangentIndex++] = 1;
278
+ bitangents[bitangentIndex++] = 0;
279
+ }
280
+ }
281
+ }
282
+ const numIndices = 12 * slices - 12;
283
+ const indices = IndexDatatype_default.createTypedArray(numVertices, numIndices);
284
+ let index = 0;
285
+ let j = 0;
286
+ for (i = 0; i < slices - 1; i++) {
287
+ indices[index++] = j;
288
+ indices[index++] = j + 2;
289
+ indices[index++] = j + 3;
290
+ indices[index++] = j;
291
+ indices[index++] = j + 3;
292
+ indices[index++] = j + 1;
293
+ j += 2;
294
+ }
295
+ indices[index++] = twoSlices - 2;
296
+ indices[index++] = 0;
297
+ indices[index++] = 1;
298
+ indices[index++] = twoSlices - 2;
299
+ indices[index++] = 1;
300
+ indices[index++] = twoSlices - 1;
301
+ for (i = 1; i < slices - 1; i++) {
302
+ indices[index++] = twoSlices + i + 1;
303
+ indices[index++] = twoSlices + i;
304
+ indices[index++] = twoSlices;
305
+ }
306
+ for (i = 1; i < slices - 1; i++) {
307
+ indices[index++] = threeSlices;
308
+ indices[index++] = threeSlices + i;
309
+ indices[index++] = threeSlices + i + 1;
310
+ }
311
+ let textureCoordIndex = 0;
312
+ if (vertexFormat.st) {
313
+ const rad = Math.max(topRadius, bottomRadius);
314
+ for (i = 0; i < numVertices; i++) {
315
+ const position = Cartesian3_default.fromArray(positions, i * 3, positionScratch);
316
+ st[textureCoordIndex++] = (position.x + rad) / (2 * rad);
317
+ st[textureCoordIndex++] = (position.y + rad) / (2 * rad);
318
+ }
319
+ }
320
+ const attributes = new GeometryAttributes_default();
321
+ if (vertexFormat.position) {
322
+ attributes.position = new GeometryAttribute_default({
323
+ componentDatatype: ComponentDatatype_default.DOUBLE,
324
+ componentsPerAttribute: 3,
325
+ values: positions
326
+ });
327
+ }
328
+ if (vertexFormat.normal) {
329
+ attributes.normal = new GeometryAttribute_default({
330
+ componentDatatype: ComponentDatatype_default.FLOAT,
331
+ componentsPerAttribute: 3,
332
+ values: normals
333
+ });
334
+ }
335
+ if (vertexFormat.tangent) {
336
+ attributes.tangent = new GeometryAttribute_default({
337
+ componentDatatype: ComponentDatatype_default.FLOAT,
338
+ componentsPerAttribute: 3,
339
+ values: tangents
340
+ });
341
+ }
342
+ if (vertexFormat.bitangent) {
343
+ attributes.bitangent = new GeometryAttribute_default({
344
+ componentDatatype: ComponentDatatype_default.FLOAT,
345
+ componentsPerAttribute: 3,
346
+ values: bitangents
347
+ });
348
+ }
349
+ if (vertexFormat.st) {
350
+ attributes.st = new GeometryAttribute_default({
351
+ componentDatatype: ComponentDatatype_default.FLOAT,
352
+ componentsPerAttribute: 2,
353
+ values: st
354
+ });
355
+ }
356
+ radiusScratch.x = length * 0.5;
357
+ radiusScratch.y = Math.max(bottomRadius, topRadius);
358
+ const boundingSphere = new BoundingSphere_default(
359
+ Cartesian3_default.ZERO,
360
+ Cartesian2_default.magnitude(radiusScratch)
361
+ );
362
+ if (defined_default(cylinderGeometry._offsetAttribute)) {
363
+ length = positions.length;
364
+ const offsetValue = cylinderGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
365
+ const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
366
+ attributes.applyOffset = new GeometryAttribute_default({
367
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
368
+ componentsPerAttribute: 1,
369
+ values: applyOffset
370
+ });
371
+ }
372
+ return new Geometry_default({
373
+ attributes,
374
+ indices,
375
+ primitiveType: PrimitiveType_default.TRIANGLES,
376
+ boundingSphere,
377
+ offsetAttribute: cylinderGeometry._offsetAttribute
378
+ });
379
+ };
380
+ var unitCylinderGeometry;
381
+ CylinderGeometry.getUnitCylinder = function() {
382
+ if (!defined_default(unitCylinderGeometry)) {
383
+ unitCylinderGeometry = CylinderGeometry.createGeometry(
384
+ new CylinderGeometry({
385
+ topRadius: 1,
386
+ bottomRadius: 1,
387
+ length: 1,
388
+ vertexFormat: VertexFormat_default.POSITION_ONLY
389
+ })
390
+ );
391
+ }
392
+ return unitCylinderGeometry;
393
+ };
394
+ var CylinderGeometry_default = CylinderGeometry;
395
+
396
+ export {
397
+ CylinderGeometry_default
398
+ };
@@ -0,0 +1,288 @@
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
+ AxisAlignedBoundingBox_default
28
+ } from "./chunk-VMF7KOGY.js";
29
+ import {
30
+ IntersectionTests_default,
31
+ Ray_default
32
+ } from "./chunk-IU3YAYPT.js";
33
+ import {
34
+ Plane_default
35
+ } from "./chunk-RGNNWVR6.js";
36
+ import {
37
+ Transforms_default
38
+ } from "./chunk-PQMA7MFS.js";
39
+ import {
40
+ Cartesian4_default,
41
+ Matrix4_default
42
+ } from "./chunk-FGCXPEZM.js";
43
+ import {
44
+ Cartesian2_default,
45
+ Ellipsoid_default
46
+ } from "./chunk-DXD7OPSP.js";
47
+ import {
48
+ Cartesian3_default
49
+ } from "./chunk-ML7OMD72.js";
50
+ import {
51
+ Check_default,
52
+ DeveloperError_default
53
+ } from "./chunk-XLQZNQ4Z.js";
54
+ import {
55
+ defined_default
56
+ } from "./chunk-PCL3Y7H5.js";
57
+
58
+ // packages/engine/Source/Core/EllipsoidTangentPlane.js
59
+ var scratchCart4 = new Cartesian4_default();
60
+ function EllipsoidTangentPlane(origin, ellipsoid) {
61
+ Check_default.defined("origin", origin);
62
+ ellipsoid = ellipsoid ?? Ellipsoid_default.default;
63
+ origin = ellipsoid.scaleToGeodeticSurface(origin);
64
+ if (!defined_default(origin)) {
65
+ throw new DeveloperError_default(
66
+ "origin must not be at the center of the ellipsoid."
67
+ );
68
+ }
69
+ const eastNorthUp = Transforms_default.eastNorthUpToFixedFrame(origin, ellipsoid);
70
+ this._ellipsoid = ellipsoid;
71
+ this._origin = origin;
72
+ this._xAxis = Cartesian3_default.fromCartesian4(
73
+ Matrix4_default.getColumn(eastNorthUp, 0, scratchCart4)
74
+ );
75
+ this._yAxis = Cartesian3_default.fromCartesian4(
76
+ Matrix4_default.getColumn(eastNorthUp, 1, scratchCart4)
77
+ );
78
+ const normal = Cartesian3_default.fromCartesian4(
79
+ Matrix4_default.getColumn(eastNorthUp, 2, scratchCart4)
80
+ );
81
+ this._plane = Plane_default.fromPointNormal(origin, normal);
82
+ }
83
+ Object.defineProperties(EllipsoidTangentPlane.prototype, {
84
+ /**
85
+ * Gets the ellipsoid.
86
+ * @memberof EllipsoidTangentPlane.prototype
87
+ * @type {Ellipsoid}
88
+ */
89
+ ellipsoid: {
90
+ get: function() {
91
+ return this._ellipsoid;
92
+ }
93
+ },
94
+ /**
95
+ * Gets the origin.
96
+ * @memberof EllipsoidTangentPlane.prototype
97
+ * @type {Cartesian3}
98
+ */
99
+ origin: {
100
+ get: function() {
101
+ return this._origin;
102
+ }
103
+ },
104
+ /**
105
+ * Gets the plane which is tangent to the ellipsoid.
106
+ * @memberof EllipsoidTangentPlane.prototype
107
+ * @readonly
108
+ * @type {Plane}
109
+ */
110
+ plane: {
111
+ get: function() {
112
+ return this._plane;
113
+ }
114
+ },
115
+ /**
116
+ * Gets the local X-axis (east) of the tangent plane.
117
+ * @memberof EllipsoidTangentPlane.prototype
118
+ * @readonly
119
+ * @type {Cartesian3}
120
+ */
121
+ xAxis: {
122
+ get: function() {
123
+ return this._xAxis;
124
+ }
125
+ },
126
+ /**
127
+ * Gets the local Y-axis (north) of the tangent plane.
128
+ * @memberof EllipsoidTangentPlane.prototype
129
+ * @readonly
130
+ * @type {Cartesian3}
131
+ */
132
+ yAxis: {
133
+ get: function() {
134
+ return this._yAxis;
135
+ }
136
+ },
137
+ /**
138
+ * Gets the local Z-axis (up) of the tangent plane.
139
+ * @memberof EllipsoidTangentPlane.prototype
140
+ * @readonly
141
+ * @type {Cartesian3}
142
+ */
143
+ zAxis: {
144
+ get: function() {
145
+ return this._plane.normal;
146
+ }
147
+ }
148
+ });
149
+ var tmp = new AxisAlignedBoundingBox_default();
150
+ EllipsoidTangentPlane.fromPoints = function(cartesians, ellipsoid) {
151
+ Check_default.defined("cartesians", cartesians);
152
+ const box = AxisAlignedBoundingBox_default.fromPoints(cartesians, tmp);
153
+ return new EllipsoidTangentPlane(box.center, ellipsoid);
154
+ };
155
+ var scratchProjectPointOntoPlaneRay = new Ray_default();
156
+ var scratchProjectPointOntoPlaneCartesian3 = new Cartesian3_default();
157
+ EllipsoidTangentPlane.prototype.projectPointOntoPlane = function(cartesian, result) {
158
+ Check_default.defined("cartesian", cartesian);
159
+ const ray = scratchProjectPointOntoPlaneRay;
160
+ ray.origin = cartesian;
161
+ Cartesian3_default.normalize(cartesian, ray.direction);
162
+ let intersectionPoint = IntersectionTests_default.rayPlane(
163
+ ray,
164
+ this._plane,
165
+ scratchProjectPointOntoPlaneCartesian3
166
+ );
167
+ if (!defined_default(intersectionPoint)) {
168
+ Cartesian3_default.negate(ray.direction, ray.direction);
169
+ intersectionPoint = IntersectionTests_default.rayPlane(
170
+ ray,
171
+ this._plane,
172
+ scratchProjectPointOntoPlaneCartesian3
173
+ );
174
+ }
175
+ if (defined_default(intersectionPoint)) {
176
+ const v = Cartesian3_default.subtract(
177
+ intersectionPoint,
178
+ this._origin,
179
+ intersectionPoint
180
+ );
181
+ const x = Cartesian3_default.dot(this._xAxis, v);
182
+ const y = Cartesian3_default.dot(this._yAxis, v);
183
+ if (!defined_default(result)) {
184
+ return new Cartesian2_default(x, y);
185
+ }
186
+ result.x = x;
187
+ result.y = y;
188
+ return result;
189
+ }
190
+ return void 0;
191
+ };
192
+ EllipsoidTangentPlane.prototype.projectPointsOntoPlane = function(cartesians, result) {
193
+ Check_default.defined("cartesians", cartesians);
194
+ if (!defined_default(result)) {
195
+ result = [];
196
+ }
197
+ let count = 0;
198
+ const length = cartesians.length;
199
+ for (let i = 0; i < length; i++) {
200
+ const p = this.projectPointOntoPlane(cartesians[i], result[count]);
201
+ if (defined_default(p)) {
202
+ result[count] = p;
203
+ count++;
204
+ }
205
+ }
206
+ result.length = count;
207
+ return result;
208
+ };
209
+ EllipsoidTangentPlane.prototype.projectPointToNearestOnPlane = function(cartesian, result) {
210
+ Check_default.defined("cartesian", cartesian);
211
+ if (!defined_default(result)) {
212
+ result = new Cartesian2_default();
213
+ }
214
+ const ray = scratchProjectPointOntoPlaneRay;
215
+ ray.origin = cartesian;
216
+ Cartesian3_default.clone(this._plane.normal, ray.direction);
217
+ let intersectionPoint = IntersectionTests_default.rayPlane(
218
+ ray,
219
+ this._plane,
220
+ scratchProjectPointOntoPlaneCartesian3
221
+ );
222
+ if (!defined_default(intersectionPoint)) {
223
+ Cartesian3_default.negate(ray.direction, ray.direction);
224
+ intersectionPoint = IntersectionTests_default.rayPlane(
225
+ ray,
226
+ this._plane,
227
+ scratchProjectPointOntoPlaneCartesian3
228
+ );
229
+ }
230
+ const v = Cartesian3_default.subtract(
231
+ intersectionPoint,
232
+ this._origin,
233
+ intersectionPoint
234
+ );
235
+ const x = Cartesian3_default.dot(this._xAxis, v);
236
+ const y = Cartesian3_default.dot(this._yAxis, v);
237
+ result.x = x;
238
+ result.y = y;
239
+ return result;
240
+ };
241
+ EllipsoidTangentPlane.prototype.projectPointsToNearestOnPlane = function(cartesians, result) {
242
+ Check_default.defined("cartesians", cartesians);
243
+ if (!defined_default(result)) {
244
+ result = [];
245
+ }
246
+ const length = cartesians.length;
247
+ result.length = length;
248
+ for (let i = 0; i < length; i++) {
249
+ result[i] = this.projectPointToNearestOnPlane(cartesians[i], result[i]);
250
+ }
251
+ return result;
252
+ };
253
+ var projectPointsOntoEllipsoidScratch = new Cartesian3_default();
254
+ EllipsoidTangentPlane.prototype.projectPointOntoEllipsoid = function(cartesian, result) {
255
+ Check_default.defined("cartesian", cartesian);
256
+ if (!defined_default(result)) {
257
+ result = new Cartesian3_default();
258
+ }
259
+ const ellipsoid = this._ellipsoid;
260
+ const origin = this._origin;
261
+ const xAxis = this._xAxis;
262
+ const yAxis = this._yAxis;
263
+ const tmp2 = projectPointsOntoEllipsoidScratch;
264
+ Cartesian3_default.multiplyByScalar(xAxis, cartesian.x, tmp2);
265
+ result = Cartesian3_default.add(origin, tmp2, result);
266
+ Cartesian3_default.multiplyByScalar(yAxis, cartesian.y, tmp2);
267
+ Cartesian3_default.add(result, tmp2, result);
268
+ ellipsoid.scaleToGeocentricSurface(result, result);
269
+ return result;
270
+ };
271
+ EllipsoidTangentPlane.prototype.projectPointsOntoEllipsoid = function(cartesians, result) {
272
+ Check_default.defined("cartesians", cartesians);
273
+ const length = cartesians.length;
274
+ if (!defined_default(result)) {
275
+ result = new Array(length);
276
+ } else {
277
+ result.length = length;
278
+ }
279
+ for (let i = 0; i < length; ++i) {
280
+ result[i] = this.projectPointOntoEllipsoid(cartesians[i], result[i]);
281
+ }
282
+ return result;
283
+ };
284
+ var EllipsoidTangentPlane_default = EllipsoidTangentPlane;
285
+
286
+ export {
287
+ EllipsoidTangentPlane_default
288
+ };