@cesium/engine 26.0.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 (471) hide show
  1. package/Build/ThirdParty/Workers/zip-web-worker.js +586 -480
  2. package/Build/Workers/{chunk-7J2HKPRH.js → chunk-27FWRTJI.js} +9 -9
  3. package/Build/Workers/{chunk-EF2QYXGA.js → chunk-2EFYUSUY.js} +14 -14
  4. package/Build/Workers/chunk-2H5264K7.js +1284 -0
  5. package/Build/Workers/{chunk-DOBXCNC3.js → chunk-2H73KDBM.js} +13 -13
  6. package/Build/Workers/chunk-2RGJPWQX.js +1284 -0
  7. package/Build/Workers/chunk-2Z4ZLVOD.js +352 -0
  8. package/Build/Workers/{chunk-F6QDY6HU.js → chunk-2ZKH2QZB.js} +13 -13
  9. package/Build/Workers/chunk-36NI5E6W.js +3820 -0
  10. package/Build/Workers/{chunk-ZK3CF7ZD.js → chunk-37SW7SYS.js} +12 -12
  11. package/Build/Workers/chunk-3GHVJ3SO.js +455 -0
  12. package/Build/Workers/chunk-3LB4UVPU.js +387 -0
  13. package/Build/Workers/chunk-3PONLKEL.js +778 -0
  14. package/Build/Workers/{chunk-Y57HREW5.js → chunk-3PSS3T43.js} +4 -4
  15. package/Build/Workers/chunk-3QR662HH.js +3820 -0
  16. package/Build/Workers/{chunk-QN67VG36.js → chunk-3SX2WYSO.js} +6 -6
  17. package/Build/Workers/{chunk-G7PXZRVF.js → chunk-3UDN6LYX.js} +7 -7
  18. package/Build/Workers/chunk-47MCBSXI.js +9237 -0
  19. package/Build/Workers/{chunk-KKOSKAZB.js → chunk-4E626OCE.js} +17 -17
  20. package/Build/Workers/chunk-4NW2MJKH.js +455 -0
  21. package/Build/Workers/{chunk-DBOEKL43.js → chunk-52YK5BSN.js} +7 -7
  22. package/Build/Workers/{chunk-KFSTQKNM.js → chunk-5LSOO2KD.js} +7 -7
  23. package/Build/Workers/chunk-5RNAQZK6.js +9234 -0
  24. package/Build/Workers/chunk-5YPQBFRD.js +519 -0
  25. package/Build/Workers/{chunk-S4MCOY6I.js → chunk-6FHT43QR.js} +5 -5
  26. package/Build/Workers/chunk-6FZDPMTO.js +455 -0
  27. package/Build/Workers/{chunk-VQYETPWC.js → chunk-6HK6IXK2.js} +4 -4
  28. package/Build/Workers/chunk-6R5X2GUA.js +1284 -0
  29. package/Build/Workers/{chunk-AYKR4VBR.js → chunk-6YR6JBMY.js} +2 -2
  30. package/Build/Workers/chunk-76FDC45O.js +511 -0
  31. package/Build/Workers/chunk-7A2OGDHT.js +305 -0
  32. package/Build/Workers/chunk-7CGEQUM2.js +305 -0
  33. package/Build/Workers/{chunk-54I6Y66F.js → chunk-7D2HZKH7.js} +6 -6
  34. package/Build/Workers/{chunk-3VFEWOBI.js → chunk-7I325HV6.js} +7 -7
  35. package/Build/Workers/{chunk-4MGMYHOO.js → chunk-7KVKHY7O.js} +6 -6
  36. package/Build/Workers/chunk-7MM3N2VE.js +1067 -0
  37. package/Build/Workers/chunk-7TKLTCZW.js +219 -0
  38. package/Build/Workers/chunk-7UUKBDH6.js +1054 -0
  39. package/Build/Workers/chunk-7W6DUHAB.js +693 -0
  40. package/Build/Workers/{chunk-DDWSZVMY.js → chunk-7XM5JK5F.js} +5 -5
  41. package/Build/Workers/chunk-7YG3ND3P.js +454 -0
  42. package/Build/Workers/{chunk-IRBKFCEJ.js → chunk-A3O6EDBK.js} +2 -2
  43. package/Build/Workers/chunk-A62YI6S6.js +305 -0
  44. package/Build/Workers/{chunk-V7VQKN6N.js → chunk-A6X24AZI.js} +5 -5
  45. package/Build/Workers/chunk-A7TTWVTF.js +2719 -0
  46. package/Build/Workers/chunk-ACTVJHSP.js +519 -0
  47. package/Build/Workers/chunk-ADX3CBKD.js +9234 -0
  48. package/Build/Workers/{chunk-52JDLOEM.js → chunk-AF7DTMJ7.js} +14 -14
  49. package/Build/Workers/{chunk-ZP7JMQV4.js → chunk-AHWAZRBV.js} +6 -2
  50. package/Build/Workers/chunk-AJSFRY4U.js +1344 -0
  51. package/Build/Workers/{chunk-EBSIOBXY.js → chunk-ARZICEEP.js} +8 -8
  52. package/Build/Workers/chunk-B3QHNA4A.js +147 -0
  53. package/Build/Workers/{chunk-YLY7NKAB.js → chunk-B4CQSLZJ.js} +4 -4
  54. package/Build/Workers/chunk-BKPQFCXH.js +511 -0
  55. package/Build/Workers/{chunk-O3EA5HS7.js → chunk-BSPCI2LO.js} +10 -10
  56. package/Build/Workers/chunk-BUJWSX5S.js +301 -0
  57. package/Build/Workers/{chunk-J6BWOHUF.js → chunk-C7JQVRLM.js} +3 -3
  58. package/Build/Workers/chunk-C7QDUNI3.js +138 -0
  59. package/Build/Workers/{chunk-KSSWJIZW.js → chunk-CDJDJ5LK.js} +2 -2
  60. package/Build/Workers/chunk-CEEZE3YZ.js +476 -0
  61. package/Build/Workers/chunk-CIV5DJOQ.js +778 -0
  62. package/Build/Workers/{chunk-INUEEEQA.js → chunk-CLCTQVVL.js} +8 -8
  63. package/Build/Workers/{chunk-C6J67V5A.js → chunk-CQNFIAZU.js} +1 -1
  64. package/Build/Workers/chunk-CRCGE4J4.js +9237 -0
  65. package/Build/Workers/{chunk-SMQZZOW6.js → chunk-CUTRKXUQ.js} +10 -10
  66. package/Build/Workers/{chunk-Q3PY526V.js → chunk-D6AY775A.js} +6 -6
  67. package/Build/Workers/chunk-DBD5WWG2.js +959 -0
  68. package/Build/Workers/{chunk-E7VQ76KE.js → chunk-DIGUUD6G.js} +6 -6
  69. package/Build/Workers/{chunk-P3CK7MCY.js → chunk-DSGLDRTI.js} +4 -4
  70. package/Build/Workers/chunk-DZBQUULR.js +138 -0
  71. package/Build/Workers/chunk-DZUFEE4L.js +140 -0
  72. package/Build/Workers/chunk-E2NKV5YT.js +3820 -0
  73. package/Build/Workers/{chunk-424RNO3D.js → chunk-E7NZJOK7.js} +196 -22
  74. package/Build/Workers/{chunk-UOOIQ3KX.js → chunk-EB3Y5P3A.js} +12 -12
  75. package/Build/Workers/{chunk-ACXQXN46.js → chunk-EHTS2YPT.js} +16 -16
  76. package/Build/Workers/{chunk-EPYXRCDB.js → chunk-ELE6SC2C.js} +12 -12
  77. package/Build/Workers/{chunk-VWV2IJRB.js → chunk-ENNFMWDW.js} +11 -11
  78. package/Build/Workers/chunk-EOWDZN5S.js +288 -0
  79. package/Build/Workers/chunk-ERKUET22.js +3201 -0
  80. package/Build/Workers/chunk-EZGQPOIG.js +162 -0
  81. package/Build/Workers/chunk-F2IMBMZY.js +241 -0
  82. package/Build/Workers/chunk-F4CSNRZO.js +219 -0
  83. package/Build/Workers/chunk-FBP4DUQJ.js +693 -0
  84. package/Build/Workers/{chunk-FRQZECAO.js → chunk-FCP2QY4G.js} +5 -5
  85. package/Build/Workers/{chunk-ZZ46LWL6.js → chunk-FDK4K5IA.js} +1 -1
  86. package/Build/Workers/{chunk-C6KNZ7T4.js → chunk-FGQFQHN5.js} +17 -17
  87. package/Build/Workers/chunk-FJWZMGOQ.js +1992 -0
  88. package/Build/Workers/{chunk-Y5BF6AFU.js → chunk-FQ42MT7M.js} +2 -2
  89. package/Build/Workers/chunk-FU4BGABC.js +398 -0
  90. package/Build/Workers/chunk-FX3VEAIU.js +2719 -0
  91. package/Build/Workers/chunk-GGNWQWSB.js +301 -0
  92. package/Build/Workers/chunk-GHXVQVUM.js +1344 -0
  93. package/Build/Workers/{chunk-CZEYZU4N.js → chunk-GNKXEN4C.js} +10 -10
  94. package/Build/Workers/{chunk-MYP774IS.js → chunk-GSWMAFTE.js} +8 -8
  95. package/Build/Workers/chunk-GVA7XQI2.js +368 -0
  96. package/Build/Workers/chunk-GXDHRC4J.js +1344 -0
  97. package/Build/Workers/chunk-GXWQZBAI.js +58 -0
  98. package/Build/Workers/chunk-GYSYP6PC.js +1067 -0
  99. package/Build/Workers/chunk-H2WCFXLP.js +241 -0
  100. package/Build/Workers/chunk-HDL4HOXZ.js +778 -0
  101. package/Build/Workers/chunk-HHV3MCGV.js +162 -0
  102. package/Build/Workers/chunk-HLW2ZRVK.js +368 -0
  103. package/Build/Workers/chunk-HS6AD4P2.js +398 -0
  104. package/Build/Workers/chunk-HT6FASOT.js +973 -0
  105. package/Build/Workers/chunk-I74ZH5LK.js +959 -0
  106. package/Build/Workers/{chunk-7WM2PX4V.js → chunk-IDVHUDZT.js} +5 -5
  107. package/Build/Workers/chunk-IGAZBTFZ.js +3201 -0
  108. package/Build/Workers/chunk-IJZJMIUY.js +789 -0
  109. package/Build/Workers/chunk-ILME5BXA.js +301 -0
  110. package/Build/Workers/chunk-IMBVP57H.js +44 -0
  111. package/Build/Workers/chunk-IOO7Z2AV.js +57 -0
  112. package/Build/Workers/chunk-IUIFLOYO.js +44 -0
  113. package/Build/Workers/chunk-J73T2VOY.js +171 -0
  114. package/Build/Workers/chunk-JALGQYDY.js +288 -0
  115. package/Build/Workers/chunk-JKXV6PG5.js +56 -0
  116. package/Build/Workers/chunk-JW6OZT4R.js +288 -0
  117. package/Build/Workers/{chunk-CXOYE2WM.js → chunk-JXYLJCTC.js} +5 -5
  118. package/Build/Workers/{chunk-CFQP6LYM.js → chunk-K27QOAW6.js} +4 -4
  119. package/Build/Workers/chunk-KGXSYGBG.js +387 -0
  120. package/Build/Workers/chunk-KMV25A63.js +789 -0
  121. package/Build/Workers/chunk-KP5QD7WU.js +693 -0
  122. package/Build/Workers/chunk-KZWFWJML.js +2719 -0
  123. package/Build/Workers/chunk-LCXRRALY.js +387 -0
  124. package/Build/Workers/chunk-LD64RPYV.js +368 -0
  125. package/Build/Workers/{chunk-U3ZA64U7.js → chunk-LDRQSYBN.js} +2 -2
  126. package/Build/Workers/chunk-LGNDTZVX.js +97 -0
  127. package/Build/Workers/chunk-LNSQVXFH.js +1800 -0
  128. package/Build/Workers/chunk-M4JZ6TSZ.js +959 -0
  129. package/Build/Workers/chunk-M6QKXVAU.js +1054 -0
  130. package/Build/Workers/chunk-MAAHFYPC.js +198 -0
  131. package/Build/Workers/chunk-MCJDRDJQ.js +102 -0
  132. package/Build/Workers/chunk-MEENMEAH.js +198 -0
  133. package/Build/Workers/{chunk-TKKIREQ6.js → chunk-N7CCOFLX.js} +1 -1
  134. package/Build/Workers/chunk-NAWU5RF4.js +162 -0
  135. package/Build/Workers/{chunk-M3B5JKSM.js → chunk-NCL22ZUX.js} +1 -1
  136. package/Build/Workers/chunk-NEFDMMLY.js +241 -0
  137. package/Build/Workers/{chunk-UA25D5MX.js → chunk-NIWITKQK.js} +10 -10
  138. package/Build/Workers/chunk-NJVBJG63.js +124 -0
  139. package/Build/Workers/chunk-NLLCQBX3.js +73 -0
  140. package/Build/Workers/chunk-NSKZ6SBK.js +1483 -0
  141. package/Build/Workers/chunk-NXGQBQWE.js +837 -0
  142. package/Build/Workers/chunk-O3DKEX7Q.js +352 -0
  143. package/Build/Workers/chunk-O3XFXGPZ.js +476 -0
  144. package/Build/Workers/chunk-OA6MYL2C.js +837 -0
  145. package/Build/Workers/chunk-OBEU25PI.js +1067 -0
  146. package/Build/Workers/chunk-OHP4ELS7.js +198 -0
  147. package/Build/Workers/chunk-OZGPS7FB.js +138 -0
  148. package/Build/Workers/chunk-PCL3Y7H5.js +82 -0
  149. package/Build/Workers/chunk-PD4GK4EM.js +57 -0
  150. package/Build/Workers/chunk-PEDU33QG.js +2342 -0
  151. package/Build/Workers/chunk-PRWUMCXF.js +682 -0
  152. package/Build/Workers/chunk-PVTSNNVI.js +288 -0
  153. package/Build/Workers/chunk-QFSSCLLZ.js +973 -0
  154. package/Build/Workers/chunk-QHPZH22L.js +241 -0
  155. package/Build/Workers/chunk-QIZDWZK6.js +301 -0
  156. package/Build/Workers/chunk-QV6DG2YX.js +1483 -0
  157. package/Build/Workers/chunk-QVLAFFJY.js +56 -0
  158. package/Build/Workers/{chunk-6YEE6JDR.js → chunk-R4FPNAZ2.js} +6 -6
  159. package/Build/Workers/chunk-R4K7EHOU.js +171 -0
  160. package/Build/Workers/chunk-R7JGHDD6.js +789 -0
  161. package/Build/Workers/chunk-RASQEYD4.js +1483 -0
  162. package/Build/Workers/chunk-RG4F5R57.js +454 -0
  163. package/Build/Workers/chunk-RW6ITX7Q.js +3820 -0
  164. package/Build/Workers/chunk-RYSQVJR6.js +398 -0
  165. package/Build/Workers/chunk-S6RJU5NM.js +1054 -0
  166. package/Build/Workers/chunk-SA2A2AN5.js +2342 -0
  167. package/Build/Workers/chunk-SDFHDNS4.js +147 -0
  168. package/Build/Workers/chunk-SF6K72D7.js +124 -0
  169. package/Build/Workers/chunk-SGRGNDOD.js +682 -0
  170. package/Build/Workers/{chunk-QRWGUWI6.js → chunk-SJYSIOEM.js} +11 -11
  171. package/Build/Workers/chunk-SM2CDCYF.js +198 -0
  172. package/Build/Workers/chunk-SMTGMFBL.js +97 -0
  173. package/Build/Workers/chunk-SS5ABQGY.js +102 -0
  174. package/Build/Workers/{chunk-IYOUHCZB.js → chunk-SXSP3JHS.js} +1 -1
  175. package/Build/Workers/chunk-T5QBPLE3.js +414 -0
  176. package/Build/Workers/chunk-TN35HP5B.js +1067 -0
  177. package/Build/Workers/chunk-TNWKJNUZ.js +454 -0
  178. package/Build/Workers/chunk-TOAF47AQ.js +102 -0
  179. package/Build/Workers/chunk-TQ4QCOXT.js +2719 -0
  180. package/Build/Workers/chunk-TSDSILQB.js +124 -0
  181. package/Build/Workers/chunk-TVZD72WJ.js +778 -0
  182. package/Build/Workers/chunk-U5LV3F3Z.js +1054 -0
  183. package/Build/Workers/chunk-UAZUP4I5.js +1992 -0
  184. package/Build/Workers/chunk-UEY73NRN.js +38 -0
  185. package/Build/Workers/chunk-UF46SZEZ.js +789 -0
  186. package/Build/Workers/chunk-UNRTMCET.js +398 -0
  187. package/Build/Workers/chunk-UTB7U3O6.js +1992 -0
  188. package/Build/Workers/chunk-UVO6COT2.js +352 -0
  189. package/Build/Workers/chunk-V46YGZE6.js +352 -0
  190. package/Build/Workers/chunk-VAL7DYNR.js +278 -0
  191. package/Build/Workers/chunk-VDGOCROW.js +57 -0
  192. package/Build/Workers/chunk-VFWSSBPT.js +511 -0
  193. package/Build/Workers/chunk-VVYMXI3I.js +1284 -0
  194. package/Build/Workers/chunk-VXWHPYQM.js +837 -0
  195. package/Build/Workers/chunk-VXYUBRSB.js +219 -0
  196. package/Build/Workers/chunk-VZLDLEWI.js +387 -0
  197. package/Build/Workers/{chunk-4S7IE3LB.js → chunk-W5OCKMPJ.js} +2 -2
  198. package/Build/Workers/chunk-WBSY7HDY.js +837 -0
  199. package/Build/Workers/chunk-WN3F4CVG.js +3201 -0
  200. package/Build/Workers/chunk-WPRUWXGV.js +693 -0
  201. package/Build/Workers/chunk-WTO2ERBP.js +414 -0
  202. package/Build/Workers/chunk-WVHMDVG4.js +959 -0
  203. package/Build/Workers/chunk-XCBZVTIV.js +280 -0
  204. package/Build/Workers/chunk-XDWCTQCZ.js +101 -0
  205. package/Build/Workers/chunk-XGA23TAX.js +73 -0
  206. package/Build/Workers/chunk-XLQZNQ4Z.js +163 -0
  207. package/Build/Workers/chunk-XLXSDIP5.js +973 -0
  208. package/Build/Workers/chunk-XQ3SKCMM.js +140 -0
  209. package/Build/Workers/chunk-XQH66YJC.js +147 -0
  210. package/Build/Workers/chunk-XTA7BXJG.js +682 -0
  211. package/Build/Workers/chunk-XTIDAFRS.js +476 -0
  212. package/Build/Workers/chunk-XUEDWBUD.js +682 -0
  213. package/Build/Workers/chunk-XYFLRH3H.js +124 -0
  214. package/Build/Workers/chunk-Y7JRTRTO.js +305 -0
  215. package/Build/Workers/chunk-Y7QSMDCJ.js +352 -0
  216. package/Build/Workers/chunk-YCB5TYTR.js +1483 -0
  217. package/Build/Workers/chunk-YEYOSTJX.js +219 -0
  218. package/Build/Workers/chunk-YGFVAGYF.js +630 -0
  219. package/Build/Workers/chunk-YIIACKQO.js +368 -0
  220. package/Build/Workers/chunk-YJGSP6PE.js +511 -0
  221. package/Build/Workers/{chunk-XZMBNNDX.js → chunk-YKU2Q3A2.js} +9 -9
  222. package/Build/Workers/chunk-Z4LR5EHE.js +454 -0
  223. package/Build/Workers/chunk-Z66EVE2A.js +44 -0
  224. package/Build/Workers/chunk-ZHIHHHTB.js +414 -0
  225. package/Build/Workers/chunk-ZMBHFYOX.js +1344 -0
  226. package/Build/Workers/chunk-ZNWHFSLE.js +171 -0
  227. package/Build/Workers/chunk-ZQLZG4IN.js +2342 -0
  228. package/Build/Workers/chunk-ZRTSMUZ2.js +414 -0
  229. package/Build/Workers/{chunk-MPZHGZU6.js → chunk-ZSGUV73H.js} +4 -4
  230. package/Build/Workers/chunk-ZZUVT5BM.js +476 -0
  231. package/Build/Workers/combineGeometry.js +24 -24
  232. package/Build/Workers/createBoxGeometry.js +18 -18
  233. package/Build/Workers/createBoxOutlineGeometry.js +16 -16
  234. package/Build/Workers/createCircleGeometry.js +26 -26
  235. package/Build/Workers/createCircleOutlineGeometry.js +19 -19
  236. package/Build/Workers/createCoplanarPolygonGeometry.js +35 -35
  237. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
  238. package/Build/Workers/createCorridorGeometry.js +31 -33
  239. package/Build/Workers/createCorridorOutlineGeometry.js +29 -31
  240. package/Build/Workers/createCylinderGeometry.js +20 -20
  241. package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
  242. package/Build/Workers/createEllipseGeometry.js +26 -26
  243. package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
  244. package/Build/Workers/createEllipsoidGeometry.js +19 -19
  245. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
  246. package/Build/Workers/createFrustumGeometry.js +18 -18
  247. package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
  248. package/Build/Workers/createGeometry.js +24 -24
  249. package/Build/Workers/createGroundPolylineGeometry.js +24 -24
  250. package/Build/Workers/createPlaneGeometry.js +16 -16
  251. package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
  252. package/Build/Workers/createPolygonGeometry.js +34 -34
  253. package/Build/Workers/createPolygonOutlineGeometry.js +31 -31
  254. package/Build/Workers/createPolylineGeometry.js +26 -26
  255. package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
  256. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
  257. package/Build/Workers/createRectangleGeometry.js +27 -27
  258. package/Build/Workers/createRectangleOutlineGeometry.js +21 -21
  259. package/Build/Workers/createSimplePolylineGeometry.js +24 -24
  260. package/Build/Workers/createSphereGeometry.js +19 -19
  261. package/Build/Workers/createSphereOutlineGeometry.js +18 -18
  262. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  263. package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
  264. package/Build/Workers/createVectorTileGeometries.js +24 -24
  265. package/Build/Workers/createVectorTilePoints.js +13 -13
  266. package/Build/Workers/createVectorTilePolygons.js +22 -22
  267. package/Build/Workers/createVectorTilePolylines.js +14 -14
  268. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -25
  269. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
  270. package/Build/Workers/createVerticesFromHeightmap.js +22 -22
  271. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
  272. package/Build/Workers/createWallGeometry.js +24 -24
  273. package/Build/Workers/createWallOutlineGeometry.js +24 -24
  274. package/Build/Workers/decodeDraco.js +10 -10
  275. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +987 -2320
  276. package/Build/Workers/decodeI3S.js +10 -10
  277. package/Build/Workers/gaussianSplatSorter.js +4 -4
  278. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  279. package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
  280. package/Build/Workers/transcodeKTX2.js +6 -6
  281. package/Build/Workers/transferTypedArrayTest.js +1 -1
  282. package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
  283. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
  284. package/Source/Core/ArcGISTiledElevationTerrainProvider.js +1 -5
  285. package/Source/Core/BoundingRectangle.js +6 -8
  286. package/Source/Core/BoundingSphere.js +0 -3
  287. package/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js +3 -4
  288. package/Source/Core/Color.js +1 -0
  289. package/Source/Core/CoplanarPolygonGeometry.js +2 -2
  290. package/Source/Core/CorridorGeometry.js +2 -4
  291. package/Source/Core/CorridorOutlineGeometry.js +1 -3
  292. package/Source/Core/EarthOrientationParameters.js +2 -2
  293. package/Source/Core/EllipseGeometryLibrary.js +2 -2
  294. package/Source/Core/EllipsoidGeodesic.js +3 -3
  295. package/Source/Core/EllipsoidRhumbLine.js +1 -1
  296. package/Source/Core/GroundPolylineGeometry.js +2 -2
  297. package/Source/Core/Heap.js +1 -1
  298. package/Source/Core/HermitePolynomialApproximation.js +215 -179
  299. package/Source/Core/InterpolationAlgorithm.js +58 -50
  300. package/Source/Core/Ion.js +1 -1
  301. package/Source/Core/JulianDate.js +1 -1
  302. package/Source/Core/LagrangePolynomialApproximation.js +55 -52
  303. package/Source/Core/LinearApproximation.js +69 -66
  304. package/Source/Core/Math.js +59 -0
  305. package/Source/Core/Matrix2.js +2 -2
  306. package/Source/Core/Matrix3.js +2 -2
  307. package/Source/Core/OrthographicFrustum.js +1 -1
  308. package/Source/Core/PerspectiveFrustum.js +1 -1
  309. package/Source/Core/PolygonGeometry.js +2 -2
  310. package/Source/Core/PolygonGeometryLibrary.js +1 -1
  311. package/Source/Core/PolygonOutlineGeometry.js +1 -1
  312. package/Source/Core/PolylineGeometry.js +1 -1
  313. package/Source/Core/PolylineVolumeGeometryLibrary.js +1 -1
  314. package/Source/Core/Rectangle.js +7 -1
  315. package/Source/Core/RectangleOutlineGeometry.js +1 -1
  316. package/Source/Core/SimplePolylineGeometry.js +1 -1
  317. package/Source/Core/TerrainEncoding.js +2 -2
  318. package/Source/Core/TerrainMesh.js +3 -3
  319. package/Source/Core/TerrainPicker.js +180 -168
  320. package/Source/Core/TimeIntervalCollection.js +1 -3
  321. package/Source/Core/Tipsify.js +1 -1
  322. package/Source/Core/Transforms.js +5 -1
  323. package/Source/Core/VectorPipeline.js +1117 -0
  324. package/Source/Core/VectorProvider.js +429 -0
  325. package/Source/Core/WallOutlineGeometry.js +1 -1
  326. package/Source/Core/getTimestamp.js +4 -2
  327. package/Source/Core/writeTextToCanvas.js +1 -0
  328. package/Source/DataSources/CompositeEntityCollection.js +0 -1
  329. package/Source/DataSources/CzmlDataSource.js +14 -0
  330. package/Source/DataSources/DataSourceDisplay.js +1 -1
  331. package/Source/DataSources/GeoJsonDataSource.js +0 -1
  332. package/Source/DataSources/GeometryVisualizer.js +1 -1
  333. package/Source/DataSources/KmlDataSource.js +529 -557
  334. package/Source/DataSources/PathGraphics.js +8 -1
  335. package/Source/DataSources/PathMode.js +27 -0
  336. package/Source/DataSources/PathVisualizer.js +298 -1
  337. package/Source/DataSources/PolylineVisualizer.js +1 -1
  338. package/Source/DataSources/StaticOutlineGeometryBatch.js +1 -1
  339. package/Source/Renderer/AutomaticUniforms.js +23 -0
  340. package/Source/Renderer/Context.js +9 -3
  341. package/Source/Renderer/DrawCommand.js +22 -0
  342. package/Source/Renderer/Framebuffer.js +4 -0
  343. package/Source/Renderer/Pass.js +11 -10
  344. package/Source/Renderer/Texture.js +12 -1
  345. package/Source/Renderer/UniformState.js +7 -0
  346. package/Source/Renderer/VertexArray.js +1 -1
  347. package/Source/Scene/ArcGisMapServerImageryProvider.js +0 -5
  348. package/Source/Scene/ArcGisMapService.js +1 -1
  349. package/Source/Scene/Billboard.js +2 -1
  350. package/Source/Scene/BillboardCollection.js +7 -3
  351. package/Source/Scene/BillboardTexture.js +5 -3
  352. package/Source/Scene/BufferPrimitiveCollection.js +27 -5
  353. package/Source/Scene/Camera.js +71 -5
  354. package/Source/Scene/Cesium3DTileOptimizations.js +4 -6
  355. package/Source/Scene/Cesium3DTileset.js +1 -1
  356. package/Source/Scene/ClippingPlaneCollection.js +4 -4
  357. package/Source/Scene/ClippingPolygon.js +2 -0
  358. package/Source/Scene/ClippingPolygonCollection.js +2 -2
  359. package/Source/Scene/Controllers/Controller.js +63 -0
  360. package/Source/Scene/Controllers/ControllerHost.js +78 -0
  361. package/Source/Scene/Controllers/HybridScreenSpacePanCameraController.js +106 -0
  362. package/Source/Scene/Controllers/MouseButton.js +32 -0
  363. package/Source/Scene/Controllers/ScreenSpaceElevatorCameraController.js +295 -0
  364. package/Source/Scene/Controllers/ScreenSpaceInputBindings.js +154 -0
  365. package/Source/Scene/Controllers/ScreenSpaceMapCameraController.js +310 -0
  366. package/Source/Scene/Controllers/ScreenSpaceTiltOrbitCameraController.js +642 -0
  367. package/Source/Scene/Controllers/ScreenSpaceZoomCameraController.js +431 -0
  368. package/Source/Scene/Controllers/defaultPickWorldPosition.js +84 -0
  369. package/Source/Scene/DerivedCommand.js +98 -0
  370. package/Source/Scene/EdgeFramebuffer.js +1 -5
  371. package/Source/Scene/Expression.js +6 -8
  372. package/Source/Scene/FrameState.js +17 -0
  373. package/Source/Scene/Globe.js +20 -0
  374. package/Source/Scene/GlobeDepth.js +27 -1
  375. package/Source/Scene/GlobeSurfaceShaderSet.js +511 -409
  376. package/Source/Scene/GlobeSurfaceTile.js +575 -398
  377. package/Source/Scene/GlobeSurfaceTileProvider.js +1382 -1151
  378. package/Source/Scene/GltfBufferViewLoader.js +3 -3
  379. package/Source/Scene/GltfLoader.js +33 -3
  380. package/Source/Scene/GltfLoaderUtil.js +20 -4
  381. package/Source/Scene/GltfPipeline/forEachTextureInMaterial.js +10 -0
  382. package/Source/Scene/GltfPipeline/removeUnusedElements.js +21 -11
  383. package/Source/Scene/GltfSpzLoader.js +1 -1
  384. package/Source/Scene/GltfVertexBufferLoader.js +6 -3
  385. package/Source/Scene/I3SDataProvider.js +1 -1
  386. package/Source/Scene/I3SLayer.js +1 -1
  387. package/Source/Scene/I3SNode.js +2 -2
  388. package/Source/Scene/ImageryLayer.js +2 -2
  389. package/Source/Scene/ImageryLayerCollection.js +190 -6
  390. package/Source/Scene/IonImageryProvider.js +1 -5
  391. package/Source/Scene/Label.js +4 -4
  392. package/Source/Scene/LabelCollection.js +1 -1
  393. package/Source/Scene/MVTDataProvider.js +2 -0
  394. package/Source/Scene/Material.js +1 -0
  395. package/Source/Scene/Model/B3dmLoader.js +1 -2
  396. package/Source/Scene/Model/EdgeVisibilityPipelineStage.js +10 -8
  397. package/Source/Scene/Model/Extensions/Gpm/GltfGpmLoader.js +4 -0
  398. package/Source/Scene/Model/I3dmLoader.js +1 -1
  399. package/Source/Scene/Model/InstancingPipelineStage.js +4 -7
  400. package/Source/Scene/Model/MaterialPipelineStage.js +124 -1
  401. package/Source/Scene/Model/Model.js +11 -10
  402. package/Source/Scene/Model/ModelClippingPlanesPipelineStage.js +28 -1
  403. package/Source/Scene/Model/ModelDrawCommand.js +160 -16
  404. package/Source/Scene/Model/ModelDrawCommands.js +4 -0
  405. package/Source/Scene/Model/ModelSceneGraph.js +21 -0
  406. package/Source/Scene/Model/ModelUtility.js +1 -0
  407. package/Source/Scene/Model/PickingPipelineStage.js +29 -0
  408. package/Source/Scene/Model/PrimitiveRenderResources.js +24 -0
  409. package/Source/Scene/ModelComponents.js +71 -0
  410. package/Source/Scene/Picking.js +19 -3
  411. package/Source/Scene/PlanarFillIdFramebuffer.js +172 -0
  412. package/Source/Scene/PntsParser.js +1 -1
  413. package/Source/Scene/PolylineCollection.js +1 -1
  414. package/Source/Scene/PostProcessStage.js +4 -2
  415. package/Source/Scene/QuadtreePrimitive.js +3 -2
  416. package/Source/Scene/ResourceCache.js +7 -4
  417. package/Source/Scene/ResourceCacheKey.js +21 -18
  418. package/Source/Scene/Scene.js +203 -5
  419. package/Source/Scene/ScreenSpaceCameraController.js +1 -2
  420. package/Source/Scene/ShadowMap.js +9 -3
  421. package/Source/Scene/ShadowMapShader.js +50 -2
  422. package/Source/Scene/SnapFramebuffer.js +121 -0
  423. package/Source/Scene/Snapping.js +184 -0
  424. package/Source/Scene/TerrainFillMesh.js +3 -2
  425. package/Source/Scene/UrlTemplate3DTilesDataProvider.js +1 -1
  426. package/Source/Scene/Vector3DTileContent.js +2 -3
  427. package/Source/Scene/VectorGltf3DTileContent.js +23 -3
  428. package/Source/Scene/View.js +10 -8
  429. package/Source/Scene/VoxelTraversal.js +1 -1
  430. package/Source/Scene/createElevationBandMaterial.js +1 -1
  431. package/Source/Scene/findMeshoptExtension.js +23 -0
  432. package/Source/Scene/renderBufferPointCollection.js +14 -10
  433. package/Source/Scene/renderBufferPolygonCollection.js +10 -15
  434. package/Source/Scene/renderBufferPolylineCollection.js +121 -194
  435. package/Source/Shaders/Builtin/Constants/passCesium3DTile.glsl +1 -1
  436. package/Source/Shaders/Builtin/Constants/passCesium3DTile.js +1 -1
  437. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.glsl +1 -1
  438. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.js +1 -1
  439. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.glsl +1 -1
  440. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.js +1 -1
  441. package/Source/Shaders/Builtin/Constants/passCesium3DTilePlanarFillId.glsl +9 -0
  442. package/Source/Shaders/Builtin/Constants/passCesium3DTilePlanarFillId.js +11 -0
  443. package/Source/Shaders/Builtin/Constants/passClassification.glsl +1 -1
  444. package/Source/Shaders/Builtin/Constants/passClassification.js +1 -1
  445. package/Source/Shaders/Builtin/Constants/passGaussianSplats.glsl +1 -1
  446. package/Source/Shaders/Builtin/Constants/passGaussianSplats.js +1 -1
  447. package/Source/Shaders/Builtin/Constants/passOpaque.glsl +1 -1
  448. package/Source/Shaders/Builtin/Constants/passOpaque.js +1 -1
  449. package/Source/Shaders/Builtin/Constants/passTranslucent.glsl +1 -1
  450. package/Source/Shaders/Builtin/Constants/passTranslucent.js +1 -1
  451. package/Source/Shaders/Builtin/Constants/passVoxels.glsl +1 -1
  452. package/Source/Shaders/Builtin/Constants/passVoxels.js +1 -1
  453. package/Source/Shaders/Builtin/CzmBuiltins.js +2 -0
  454. package/Source/Shaders/GlobeFS.glsl +10 -5
  455. package/Source/Shaders/GlobeFS.js +9 -5
  456. package/Source/Shaders/Materials/PolylineGlowMaterial.glsl +1 -1
  457. package/Source/Shaders/Materials/PolylineGlowMaterial.js +1 -1
  458. package/Source/Shaders/Model/MaterialStageFS.glsl +8 -2
  459. package/Source/Shaders/Model/MaterialStageFS.js +8 -2
  460. package/Source/Shaders/Model/ModelFS.glsl +105 -0
  461. package/Source/Shaders/Model/ModelFS.js +105 -0
  462. package/Source/Shaders/VectorCommon.glsl +178 -0
  463. package/Source/Shaders/VectorCommon.js +75 -0
  464. package/Source/ThirdParty/Workers/zip-web-worker.js +1 -1
  465. package/Source/ThirdParty/zip-module.wasm +0 -0
  466. package/Source/Widget/CesiumWidget.js +30 -0
  467. package/Source/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2
  468. package/Source/Workers/incrementallyBuildTerrainPicker.js +2 -0
  469. package/index.d.ts +825 -260
  470. package/index.js +29 -10
  471. package/package.json +4 -4
@@ -0,0 +1,642 @@
1
+ import Cartesian2 from "../../Core/Cartesian2.js";
2
+ import Cartesian3 from "../../Core/Cartesian3.js";
3
+ import Check from "../../Core/Check.js";
4
+ import defined from "../../Core/defined.js";
5
+ import Ellipsoid from "../../Core/Ellipsoid.js";
6
+ import Frozen from "../../Core/Frozen.js";
7
+ import getTimestamp from "../../Core/getTimestamp.js";
8
+ import KeyboardEventModifier from "../../Core/KeyboardEventModifier.js";
9
+ import CesiumMath from "../../Core/Math.js";
10
+ import Matrix3 from "../../Core/Matrix3.js";
11
+ import Matrix4 from "../../Core/Matrix4.js";
12
+ import ScreenSpaceEventHandler from "../../Core/ScreenSpaceEventHandler.js";
13
+ import Quaternion from "../../Core/Quaternion.js";
14
+ import TimeConstants from "../../Core/TimeConstants.js";
15
+ import Transforms from "../../Core/Transforms.js";
16
+ import defaultPickWorldPosition from "./defaultPickWorldPosition.js";
17
+ import ScreenSpaceInputBindings from "./ScreenSpaceInputBindings.js";
18
+ import MouseButton from "./MouseButton.js";
19
+
20
+ /**
21
+ * @typedef {object} ControllerOptions
22
+ * @memberof ScreenSpaceTiltOrbitCameraController
23
+ * @property {ScreenSpaceInputBindings.InputBinding[]} [dragInputs] The drag input bindings that control tilting and orbiting.
24
+ */
25
+
26
+ /**
27
+ * A camera controller that allows tilting and orbiting the camera around a target position in screen space by clicking and dragging the mouse or touching and dragging on a touch screen.
28
+ * @class
29
+ * @implements Controller
30
+ * @example
31
+ * viewer.scene.screenSpaceCameraController.enableInputs = false;
32
+ * viewer.scene.screenSpaceCameraController.enableCollisionDetection = false;
33
+ *
34
+ * const tiltOrbitController = new Cesium.ScreenSpaceTiltOrbitCameraController();
35
+ * viewer.addController(tiltOrbitController);
36
+ *
37
+ * @example
38
+ * // Tilt around the position under the cursor or tap when dragging starts instead of the position at the center of the screen.
39
+ * viewer.scene.screenSpaceCameraController.enableInputs = false;
40
+ * viewer.scene.screenSpaceCameraController.enableCollisionDetection = false;
41
+ *
42
+ * const tiltOrbitController = new Cesium.ScreenSpaceTiltOrbitCameraController();
43
+ * tiltOrbitController.useDragPosition = true;
44
+ * viewer.addController(tiltOrbitController);
45
+ *
46
+ * @example
47
+ * // Configure the controller to use the left mouse button for tilting and orbiting instead of the default right mouse button.
48
+ * const tiltOrbitController = new Cesium.ScreenSpaceTiltOrbitCameraController({
49
+ * dragInputs: [{ button: Cesium.MouseButton.LEFT }]
50
+ * });
51
+ * viewer.addController(tiltOrbitController);
52
+ */
53
+ class ScreenSpaceTiltOrbitCameraController {
54
+ /**
55
+ * @private
56
+ * @returns {ScreenSpaceInputBindings.InputBinding[]} The default drag input bindings.
57
+ */
58
+ static _getDefaultDragInputs() {
59
+ return [
60
+ Object.freeze({
61
+ button: MouseButton.LEFT,
62
+ modifier: KeyboardEventModifier.CTRL,
63
+ }),
64
+ Object.freeze({
65
+ button: MouseButton.RIGHT,
66
+ }),
67
+ ];
68
+ }
69
+
70
+ /**
71
+ * Creates a new instance of <code>ScreenSpaceTiltOrbitCameraController</code>.
72
+ * @param {ScreenSpaceTiltOrbitCameraController.ControllerOptions} [options] The options for configuring the controller.
73
+ */
74
+ constructor(options = Frozen.EMPTY_OBJECT) {
75
+ this._enabled = true;
76
+ this._handler = undefined;
77
+ this._lastUpdateTime = undefined;
78
+
79
+ /**
80
+ * Enabled dragging to tilt the camera.
81
+ * @type {boolean}
82
+ * @default true
83
+ */
84
+ this.tiltEnabled = true;
85
+
86
+ /**
87
+ * Enabled dragging to orbit the camera.
88
+ * @type {boolean}
89
+ * @default true
90
+ */
91
+ this.orbitEnabled = true;
92
+
93
+ /**
94
+ * If false, the camera will orbit and tilt around the position at the center of the screen. If true, the camera will orbit and tilt around the position under the cursor or tap when dragging starts.
95
+ * @type {boolean}
96
+ * @default false
97
+ */
98
+ this.useDragPosition = false;
99
+
100
+ /**
101
+ * The drag input bindings that control tilting. Each binding is a combination of the mouse button
102
+ * and an optional keyboard modifier.
103
+ * @type {ScreenSpaceInputBindings.InputBinding[]}
104
+ * @see ScreenSpaceEventHandler
105
+ */
106
+ this.dragInputs =
107
+ options.dragInputs ??
108
+ ScreenSpaceTiltOrbitCameraController._getDefaultDragInputs();
109
+
110
+ this._dragInputState = undefined;
111
+ this._dragDelta = new Cartesian2();
112
+ this._screenSpaceDragPosition = new Cartesian2();
113
+ this._screenSpaceOrigin = new Cartesian2();
114
+
115
+ /**
116
+ * A callback function used to pick the world position around which to tilt or orbit. The function is called with {@link Scene}, the {@link Cartesian2} screen space position, and a {@link Cartesian3} instance to store the result. The function should return the {@link Cartesian3} world position from which to tilt or orbit, or <code>undefined</code> if no position could be picked.
117
+ * @type {Function(Scene, Cartesian2, Cartesian3): Cartesian3|undefined}
118
+ * @default defaultPickWorldPosition
119
+ * @example
120
+ * const tiltOrbitCameraController = new Cesium.ScreenSpaceTiltOrbitCameraController();
121
+ * tiltOrbitCameraController.pickWorldPosition = function (scene, windowPosition, result) {
122
+ * // Pick the world position from the depth buffer
123
+ * return scene.pickPosition(windowPosition, result);
124
+ * };
125
+ * viewer.addController(tiltOrbitCameraController);
126
+ */
127
+ this.pickWorldPosition = defaultPickWorldPosition;
128
+
129
+ this._hasTarget = false;
130
+ this._target = new Cartesian3();
131
+ this._axis = new Cartesian3();
132
+
133
+ /**
134
+ * The amount at which the camera tilts per dragged pixel. A value of 1.0 means that dragging the mouse across the entire canvas will tilt the camera by 90 degrees.
135
+ * @type {number}
136
+ * @default 2.0
137
+ */
138
+ this.tiltMagnitude = 2.0;
139
+
140
+ /**
141
+ * Enables or disables damping for tilt and orbit animations. Damping smooths out the camera movement and makes it feel more natural or weighty, but it can also introduce a slight delay in the camera response. If damping is disabled, the camera will respond immediately to user input.
142
+ * @type {boolean}
143
+ * @default true
144
+ */
145
+ this.dampingEnabled = true;
146
+
147
+ /**
148
+ * Specifies the length of time in seconds in which a single tilt animation is targeted to complete.
149
+ * @type {number}
150
+ * @default 0.0045
151
+ */
152
+ this.tiltAnimationDuration = 0.0045;
153
+
154
+ /**
155
+ * The maximum tilt velocity in radians per second. A value of Number.POSITIVE_INFINITY means that the maximum tilt velocity is unbounded.
156
+ * @type {number}
157
+ * @default CesiumMath.PI
158
+ */
159
+ this.maximumTiltVelocity = CesiumMath.PI;
160
+
161
+ /**
162
+ * @private
163
+ * @type {number}
164
+ * @default CesiumMath.EPSILON20
165
+ */
166
+ this.minimumTiltVelocity = CesiumMath.EPSILON20;
167
+
168
+ /**
169
+ * The amount at which the camera orbits per dragged pixel. A value of 1.0 means that dragging the mouse across the entire canvas will orbit the camera by 180 degrees.
170
+ * @type {number}
171
+ * @default 2.0
172
+ */
173
+ this.orbitMagnitude = 2.0;
174
+
175
+ /**
176
+ * Specifies the length of time in seconds in which a single orbit animation completes.
177
+ * @type {number}
178
+ * @default 0.0045
179
+ */
180
+ this.orbitAnimationDuration = 0.0045;
181
+
182
+ /**
183
+ * The maximum orbit velocity in radians per second. A value of Number.POSITIVE_INFINITY means that the maximum orbit velocity is unbounded.
184
+ * @type {number}
185
+ * @default CesiumMath.TWO_PI
186
+ */
187
+ this.maximumOrbitVelocity = CesiumMath.TWO_PI;
188
+
189
+ /**
190
+ * @private
191
+ * @type {number}
192
+ * @default CesiumMath.EPSILON20
193
+ */
194
+ this.minimumOrbitVelocity = CesiumMath.EPSILON20;
195
+
196
+ this._tiltAxis = new Cartesian3();
197
+ this._tiltQuaternion = new Quaternion();
198
+ this._tiltOffset = new Cartesian3();
199
+ this._tiltOrigin = new Cartesian3();
200
+ this._tiltDampenedResults = {
201
+ velocity: 0.0,
202
+ value: 0.0,
203
+ };
204
+
205
+ this._orbitTargetEnu = new Matrix4();
206
+ this._orbitTargetEast = new Cartesian3();
207
+ this._orbitQuaternion = new Quaternion();
208
+ this._orbitOffset = new Cartesian3();
209
+ this._orbitLookOffset = new Cartesian3();
210
+ this._orbitOrigin = new Cartesian3();
211
+ this._orbitDampenedResults = {
212
+ velocity: 0.0,
213
+ value: 0.0,
214
+ };
215
+
216
+ /**
217
+ * A parameter in the range <code>[0, 1)</code> used to limit the range
218
+ * of inputs to a percentage of the window width/height per animation frame.
219
+ * This helps keep the camera under control in low-frame-rate situations.
220
+ * @type {number}
221
+ * @default 0.1
222
+ */
223
+ this.maximumMovementRatio = 0.1;
224
+ }
225
+
226
+ /**
227
+ * @inheritdoc
228
+ */
229
+ get enabled() {
230
+ return this._enabled;
231
+ }
232
+ set enabled(value) {
233
+ this._enabled = value;
234
+
235
+ if (value) {
236
+ this._lastUpdateTime = getTimestamp();
237
+ this._dragDelta.x = 0.0;
238
+ this._dragDelta.y = 0.0;
239
+ } else if (defined(this._dragInputState)) {
240
+ this._dragInputState.isDragging = false;
241
+ }
242
+ }
243
+
244
+ /**
245
+ * @private
246
+ * @type {boolean}
247
+ */
248
+ get isDragging() {
249
+ return defined(this._dragInputState) && this._dragInputState.isDragging;
250
+ }
251
+
252
+ /**
253
+ * @inheritdoc
254
+ * @param {HTMLElement} element The DOM element containing the Cesium scene.
255
+ */
256
+ connectedCallback(element) {
257
+ const handler = new ScreenSpaceEventHandler(element);
258
+ this._handler = handler;
259
+
260
+ this._dragInputState = ScreenSpaceInputBindings.registerDragInputBindings(
261
+ handler,
262
+ this.dragInputs,
263
+ {
264
+ start: this._handleStartDrag.bind(this),
265
+ change: this._handleDrag.bind(this),
266
+ },
267
+ );
268
+ }
269
+
270
+ /**
271
+ * @inheritdoc
272
+ * @param {HTMLElement} element The DOM element containing the Cesium scene.
273
+ */
274
+ disconnectedCallback(element) {
275
+ const handler = this._handler;
276
+ if (defined(handler) && !handler.isDestroyed()) {
277
+ handler.destroy();
278
+ }
279
+ }
280
+
281
+ /**
282
+ * @inheritdoc
283
+ */
284
+ firstUpdate() {
285
+ this._lastUpdateTime = getTimestamp();
286
+ this._dragDelta.x = 0.0;
287
+ this._dragDelta.y = 0.0;
288
+ }
289
+
290
+ /**
291
+ * @private
292
+ */
293
+ _handleStartDrag(event) {
294
+ if (!this.enabled) {
295
+ return;
296
+ }
297
+
298
+ this._hasTarget = false;
299
+ this._screenSpaceDragPosition.x = event.position.x;
300
+ this._screenSpaceDragPosition.y = event.position.y;
301
+ this._dragDelta.x = 0.0;
302
+ this._dragDelta.y = 0.0;
303
+ }
304
+
305
+ /**
306
+ * @private
307
+ */
308
+ _handleDrag(event) {
309
+ this._dragDelta.x += event.endPosition.x - event.startPosition.x;
310
+ this._dragDelta.y += event.endPosition.y - event.startPosition.y;
311
+ }
312
+
313
+ /**
314
+ * The current tilt angle of the camera in radians. A value of 0.0 means that the camera is looking straight down at the ellipsoid, and a value of PI/2 means that the camera is looking at the horizon.
315
+ * @type {number}
316
+ * @private
317
+ */
318
+ get tiltAngle() {
319
+ return this._tiltDampenedResults.value;
320
+ }
321
+
322
+ /**
323
+ * The current tilt velocity of the camera in radians per second.
324
+ * @type {number}
325
+ * @private
326
+ */
327
+ get tiltVelocity() {
328
+ return this._tiltDampenedResults.velocity;
329
+ }
330
+
331
+ /**
332
+ * The current tilt velocity of the camera in radians per second.
333
+ * @type {number}
334
+ * @private
335
+ */
336
+ set tiltVelocity(value) {
337
+ this._tiltDampenedResults.velocity = value;
338
+ }
339
+
340
+ /**
341
+ * The current orbit angle of the camera in radians around the target. A value of 0.0 means that the camera is looking at the target from the east, and a value of PI/2 means that the camera is looking at the target from the north.
342
+ * @type {number}
343
+ * @private
344
+ */
345
+ get orbitAngle() {
346
+ return this._orbitDampenedResults.value;
347
+ }
348
+
349
+ /**
350
+ * The current orbit velocity of the camera in radians per second.
351
+ * @type {number}
352
+ * @private
353
+ */
354
+ get orbitVelocity() {
355
+ return this._orbitDampenedResults.velocity;
356
+ }
357
+
358
+ /**
359
+ * The current orbit velocity of the camera in radians per second.
360
+ * @type {number}
361
+ * @private
362
+ */
363
+ set orbitVelocity(value) {
364
+ this._orbitDampenedResults.velocity = value;
365
+ }
366
+
367
+ /**
368
+ * Attempts to orbit the camera around the specified origin by the specified amount in radians. Positive values orbit the camera clockwise, negative values orbit the camera counterclockwise. If the drag origin is not on the ellipsoid, no orbit is applied.
369
+ * @param {Camera} camera The camera to orbit.
370
+ * @param {Cartesian3} target The origin position to orbit around in world coordinates.
371
+ * @param {Cartesian3} axis The axis to orbit around, typically the negative of the surface normal at the target position.
372
+ * @param {number} amount The amount to orbit the camera in radians. Positive values orbit the camera clockwise, negative values orbit the camera counterclockwise.
373
+ * @param {number} dt The time delta in seconds since the last update.
374
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid to pick for the orbit origin. If undefined, the default ellipsoid is used.
375
+ */
376
+ orbit(camera, target, axis, amount, dt, ellipsoid = Ellipsoid.default) {
377
+ //>>includeStart('debug', pragmas.debug);
378
+ Check.typeOf.object("camera", camera);
379
+ Check.typeOf.object("target", target);
380
+ Check.typeOf.object("axis", axis);
381
+ Check.typeOf.number("amount", amount);
382
+ Check.typeOf.number.greaterThan("dt", dt, 0);
383
+ Check.typeOf.object("ellipsoid", ellipsoid);
384
+ //>>includeEnd('debug');
385
+
386
+ const enu = Transforms.eastNorthUpToFixedFrame(
387
+ target,
388
+ ellipsoid,
389
+ this._orbitTargetEnu,
390
+ );
391
+ const east = Matrix4.multiplyByPointAsVector(
392
+ enu,
393
+ Cartesian3.UNIT_X,
394
+ this._orbitTargetEast,
395
+ );
396
+ const currentOrbitAngle = Cartesian3.angleBetween(camera.directionWC, east);
397
+
398
+ if (Math.abs(this.orbitVelocity) < this.minimumOrbitVelocity) {
399
+ this.orbitVelocity = 0.0;
400
+ }
401
+
402
+ // Apply inertia
403
+ if (!this.isDragging && this.dampingEnabled) {
404
+ amount += this.orbitVelocity * dt;
405
+ }
406
+
407
+ if (amount === 0.0) {
408
+ return;
409
+ }
410
+
411
+ const targetOrbitAngle = currentOrbitAngle + amount;
412
+
413
+ // Apply critical damping
414
+ const maxSpeed = this.dampingEnabled
415
+ ? this.maximumOrbitVelocity * this.orbitMagnitude
416
+ : undefined;
417
+ const smoothTime = this.dampingEnabled
418
+ ? this.orbitAnimationDuration
419
+ : undefined;
420
+ this._orbitDampenedResults = CesiumMath.smoothDamp(
421
+ currentOrbitAngle,
422
+ targetOrbitAngle,
423
+ this.orbitVelocity,
424
+ dt,
425
+ maxSpeed,
426
+ smoothTime,
427
+ this._orbitDampenedResults,
428
+ );
429
+
430
+ const rho = this.orbitAngle - currentOrbitAngle;
431
+ const rotation = Matrix3.fromQuaternion(
432
+ Quaternion.fromAxisAngle(axis, -rho, this._orbitQuaternion),
433
+ );
434
+
435
+ const targetOffset = Cartesian3.subtract(
436
+ camera.positionWC,
437
+ target,
438
+ this._orbitOffset,
439
+ );
440
+ const t = Cartesian3.dot(targetOffset, camera.directionWC);
441
+ const offset = Cartesian3.multiplyByScalar(
442
+ camera.directionWC,
443
+ t,
444
+ this._orbitLookOffset,
445
+ );
446
+ const lookOffset = Cartesian3.subtract(
447
+ targetOffset,
448
+ offset,
449
+ this._orbitLookOffset,
450
+ );
451
+
452
+ const rotatedTargetOffset = Matrix3.multiplyByVector(
453
+ rotation,
454
+ targetOffset,
455
+ this._orbitOffset,
456
+ );
457
+
458
+ const rotatedLookOffset = Matrix3.multiplyByVector(
459
+ rotation,
460
+ lookOffset,
461
+ this._orbitLookOffset,
462
+ );
463
+
464
+ Cartesian3.add(target, rotatedTargetOffset, camera.position);
465
+
466
+ const lookTarget = Cartesian3.add(
467
+ target,
468
+ rotatedLookOffset,
469
+ this._orbitOrigin,
470
+ );
471
+ camera.lookAtWorldPosition(lookTarget, ellipsoid);
472
+ }
473
+
474
+ /**
475
+ * Attempts to tilt the camera by the specified amount in radians. Positive values tilt the camera down, negative values tilt the camera up. If the drag origin is not on the ellipsoid, no tilt is applied.
476
+ * @param {Camera} camera The camera to tilt.
477
+ * @param {Cartesian3} target The origin position to tilt around in world coordinates.
478
+ * @param {Cartesian3} axis The axis to tilt around, typically the negative of the surface normal at the target position.
479
+ * @param {number} amount The amount to tilt the camera in radians. Positive values tilt the camera down, negative values tilt the camera up.
480
+ * @param {number} dt The time delta in seconds since the last update. Value must be greater than 0.
481
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid to pick for the tilt origin. If undefined, the default ellipsoid is used.
482
+ */
483
+ tilt(camera, target, axis, amount, dt, ellipsoid = Ellipsoid.default) {
484
+ //>>includeStart('debug', pragmas.debug);
485
+ Check.typeOf.object("camera", camera);
486
+ Check.typeOf.object("target", target);
487
+ Check.typeOf.object("axis", axis);
488
+ Check.typeOf.number("amount", amount);
489
+ Check.typeOf.number.greaterThan("dt", dt, 0);
490
+ Check.typeOf.object("ellipsoid", ellipsoid);
491
+ //>>includeEnd('debug');
492
+
493
+ if (Math.abs(this.tiltVelocity) < this.minimumTiltVelocity) {
494
+ this.tiltVelocity = 0.0;
495
+ }
496
+
497
+ // Apply inertia
498
+ if (!this.isDragging && this.dampingEnabled) {
499
+ amount += this.tiltVelocity * dt;
500
+ }
501
+
502
+ if (amount === 0.0) {
503
+ return;
504
+ }
505
+
506
+ const currentTiltAngle = Cartesian3.angleBetween(camera.direction, axis);
507
+
508
+ // Avoid large deltas when the sign is close to flipping, which can happen when the camera is looking straight down at the ellipsoid.
509
+ if (
510
+ (currentTiltAngle < CesiumMath.PI_OVER_TWO && amount > 0.0) ||
511
+ (currentTiltAngle > CesiumMath.PI_OVER_TWO && amount < 0.0)
512
+ ) {
513
+ amount *= Math.abs(Math.sin(currentTiltAngle));
514
+ }
515
+
516
+ const targetTiltAngle = currentTiltAngle + amount;
517
+
518
+ const maxSpeed = this.dampingEnabled
519
+ ? this.maximumTiltVelocity * this.tiltMagnitude
520
+ : undefined;
521
+ const smoothTime = this.dampingEnabled
522
+ ? this.tiltAnimationDuration
523
+ : undefined;
524
+ CesiumMath.smoothDamp(
525
+ currentTiltAngle,
526
+ targetTiltAngle,
527
+ this.tiltVelocity,
528
+ dt,
529
+ maxSpeed,
530
+ smoothTime,
531
+ this._tiltDampenedResults,
532
+ );
533
+
534
+ const theta = this.tiltAngle - currentTiltAngle;
535
+ const rotation = Matrix3.fromQuaternion(
536
+ Quaternion.fromAxisAngle(camera.rightWC, -theta, this._tiltQuaternion),
537
+ );
538
+
539
+ const offset = Cartesian3.subtract(
540
+ camera.position,
541
+ target,
542
+ this._tiltOffset,
543
+ );
544
+ const t = Cartesian3.dot(offset, camera.directionWC);
545
+ const lookOffset = Cartesian3.multiplyByScalar(
546
+ camera.directionWC,
547
+ t,
548
+ this._tiltOffset,
549
+ );
550
+
551
+ const lookTarget = Cartesian3.subtract(
552
+ camera.position,
553
+ lookOffset,
554
+ this._tiltOrigin,
555
+ );
556
+
557
+ const rotatedOffset = Matrix3.multiplyByVector(
558
+ rotation,
559
+ lookOffset,
560
+ this._tiltOffset,
561
+ );
562
+
563
+ Cartesian3.add(lookTarget, rotatedOffset, camera.position);
564
+ camera.lookAtWorldPosition(lookTarget, ellipsoid);
565
+ }
566
+
567
+ /**
568
+ * @inheritdoc
569
+ * @param {Scene} scene
570
+ */
571
+ update(scene) {
572
+ const dt =
573
+ (getTimestamp() - this._lastUpdateTime) *
574
+ TimeConstants.SECONDS_PER_MILLISECOND;
575
+
576
+ const { canvas } = scene;
577
+ const { clientWidth, clientHeight } = canvas;
578
+ if (dt === 0 || clientWidth === 0 || clientHeight === 0) {
579
+ // Reset for next frame
580
+ this._lastUpdateTime = getTimestamp();
581
+ this._dragDelta.x = 0;
582
+ this._dragDelta.y = 0;
583
+ return;
584
+ }
585
+
586
+ // Target position to orbit and tilt around. Pick the world position when dragging begins, and use that position for the duration of the drag.
587
+ let target = this._target;
588
+ if (this.isDragging && !this._hasTarget) {
589
+ let windowPosition = this._screenSpaceDragPosition;
590
+ if (!this.useDragPosition) {
591
+ windowPosition = this._screenSpaceOrigin;
592
+ windowPosition.x = clientWidth / 2.0;
593
+ windowPosition.y = clientHeight / 2.0;
594
+ }
595
+
596
+ const dragPositionTarget = this.pickWorldPosition(
597
+ scene,
598
+ windowPosition,
599
+ this._target,
600
+ );
601
+ const picked = defined(dragPositionTarget);
602
+ this._hasTarget = picked;
603
+ target = dragPositionTarget;
604
+ }
605
+
606
+ if (this._hasTarget) {
607
+ const { camera, ellipsoid } = scene;
608
+ const normal = ellipsoid.geodeticSurfaceNormal(target, this._axis);
609
+ const axis = Cartesian3.negate(normal, this._axis);
610
+
611
+ if (this.orbitEnabled) {
612
+ let dx = this._dragDelta.x / clientWidth;
613
+ dx = CesiumMath.clamp(
614
+ dx,
615
+ -this.maximumMovementRatio,
616
+ this.maximumMovementRatio,
617
+ );
618
+ dx *= this.orbitMagnitude * CesiumMath.TWO_PI;
619
+
620
+ this.orbit(camera, target, axis, dx, dt, ellipsoid);
621
+ }
622
+
623
+ if (this.tiltEnabled) {
624
+ let dy = this._dragDelta.y / clientHeight;
625
+ dy = CesiumMath.clamp(
626
+ dy,
627
+ -this.maximumMovementRatio,
628
+ this.maximumMovementRatio,
629
+ );
630
+ dy *= this.tiltMagnitude * CesiumMath.PI;
631
+ this.tilt(camera, target, axis, dy, dt, ellipsoid);
632
+ }
633
+ }
634
+
635
+ // Reset for next frame
636
+ this._lastUpdateTime = getTimestamp();
637
+ this._dragDelta.x = 0;
638
+ this._dragDelta.y = 0;
639
+ }
640
+ }
641
+
642
+ export default ScreenSpaceTiltOrbitCameraController;