@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,431 @@
1
+ import Cartesian2 from "../../Core/Cartesian2.js";
2
+ import Cartesian3 from "../../Core/Cartesian3.js";
3
+ import defined from "../../Core/defined.js";
4
+ import Frozen from "../../Core/Frozen.js";
5
+ import getTimestamp from "../../Core/getTimestamp.js";
6
+ import CesiumMath from "../../Core/Math.js";
7
+ import ScreenSpaceEventHandler from "../../Core/ScreenSpaceEventHandler.js";
8
+ import ScreenSpaceEventType from "../../Core/ScreenSpaceEventType.js";
9
+ import defaultPickWorldPosition from "./defaultPickWorldPosition.js";
10
+ import ScreenSpaceInputBindings from "./ScreenSpaceInputBindings.js";
11
+ import TimeConstants from "../../Core/TimeConstants.js";
12
+ import MouseButton from "./MouseButton.js";
13
+
14
+ /**
15
+ * @typedef {object} ControllerOptions
16
+ * @memberof ScreenSpaceZoomCameraController
17
+ * @property {ScreenSpaceInputBindings.InputBinding[]} [dragInputs] The drag input bindings that control zooming.
18
+ * @property {ScreenSpaceEventType[]} [scrollInputs] The scroll input bindings that control zooming.
19
+ */
20
+
21
+ /**
22
+ * A camera controller that allows zooming the camera in and out based on the pointer location in screen space.
23
+ * @class
24
+ * @implements Controller
25
+ * @example
26
+ * viewer.scene.screenSpaceCameraController.enableInputs = false;
27
+ * viewer.scene.screenSpaceCameraController.enableCollisionDetection = false;
28
+ *
29
+ * const zoomCameraController = new Cesium.ScreenSpaceZoomCameraController();
30
+ * viewer.addController(zoomCameraController);
31
+ */
32
+ class ScreenSpaceZoomCameraController {
33
+ /**
34
+ * @private
35
+ * @returns {ScreenSpaceInputBindings.InputBinding[]} The default drag input bindings.
36
+ */
37
+ static _getDefaultDragInputs() {
38
+ return [
39
+ Object.freeze({
40
+ button: MouseButton.MIDDLE,
41
+ }),
42
+ ];
43
+ }
44
+
45
+ /**
46
+ * @private
47
+ * @returns {ScreenSpaceEventType[]} The default scroll input bindings.
48
+ */
49
+ static _getDefaultScrollInputs() {
50
+ return [ScreenSpaceEventType.WHEEL];
51
+ }
52
+
53
+ /**
54
+ * Creates a new instance of <code>ScreenSpaceZoomCameraController</code>.
55
+ * @param {ScreenSpaceZoomCameraController.ControllerOptions} [options] The options for configuring the controller.
56
+ */
57
+ constructor(options = Frozen.EMPTY_OBJECT) {
58
+ this._enabled = true;
59
+ this._handler = undefined;
60
+ this._lastUpdateTime = undefined;
61
+
62
+ /**
63
+ * If false, the camera will zoom to the position at the center of the screen. If true, the camera will zoom to the position under the cursor or tap when dragging starts or when scrolling with the scroll wheel.
64
+ * @type {boolean}
65
+ * @default false
66
+ */
67
+ this.usePointerPosition = false;
68
+
69
+ /**
70
+ * The drag input bindings that control zooming. Each binding is a combination of the mouse button
71
+ * and an optional keyboard modifier.
72
+ * @type {ScreenSpaceInputBindings.InputBinding[]}
73
+ * @see ScreenSpaceEventHandler
74
+ */
75
+ this.dragInputs =
76
+ options.dragInputs ??
77
+ ScreenSpaceZoomCameraController._getDefaultDragInputs();
78
+
79
+ /**
80
+ * The scroll input bindings that control zooming.
81
+ * @type {ScreenSpaceEventType[]}
82
+ * @see ScreenSpaceEventHandler
83
+ * @default [ScreenSpaceEventType.WHEEL]
84
+ */
85
+ this.scrollInputs =
86
+ options.scrollInputs ??
87
+ ScreenSpaceZoomCameraController._getDefaultScrollInputs();
88
+
89
+ this._dragInputState = undefined;
90
+ this._dragDelta = new Cartesian2();
91
+ this._scrollDelta = 0.0;
92
+ this._zoomInputVelocity = 0.0;
93
+ this._screenSpaceScrollPosition = new Cartesian2();
94
+ this._screenSpaceDragPosition = new Cartesian2();
95
+ this._screenSpaceOrigin = new Cartesian2();
96
+
97
+ /**
98
+ * The rate at which the camera zooms in and out based on the mouse wheel delta.
99
+ * @type {number}
100
+ * @default 0.2
101
+ */
102
+ this.zoomSensitivity = 0.2;
103
+
104
+ /**
105
+ * A callback function used to pick the world position from which to zoom. 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 zoom, or <code>undefined</code> if no position could be picked.
106
+ * @type {Function(Scene, Cartesian2, Cartesian3): Cartesian3|undefined}
107
+ * @default defaultPickWorldPosition
108
+ * @example
109
+ * const zoomCameraController = new Cesium.ScreenSpaceZoomCameraController();
110
+ * zoomCameraController.pickWorldPosition = function (scene, windowPosition, result) {
111
+ * // Pick the world position from the depth buffer
112
+ * return scene.pickPosition(windowPosition, result);
113
+ * };
114
+ * viewer.addController(zoomCameraController);
115
+ */
116
+ this.pickWorldPosition = defaultPickWorldPosition;
117
+
118
+ /**
119
+ * The ratio of the camera's distance to the zoom target that defines how much the camera zooms in and out per second.
120
+ * @type {number}
121
+ * @default 0.4
122
+ */
123
+ this.zoomDistanceRatio = 0.4;
124
+
125
+ /**
126
+ * Enable or disable inertia when zooming. When enabled, the camera will continue to move after the user input stops, gradually slowing down based on {@link ScreenSpaceZoomCameraController#inertialDecay}.
127
+ * @type {boolean}
128
+ * @default true
129
+ */
130
+ this.inertiaEnabled = false;
131
+
132
+ /**
133
+ * The rate at which the camera's zoom velocity decays over time.
134
+ * @type {number}
135
+ * @default 6.0
136
+ */
137
+ this.inertialDecay = 6.0;
138
+
139
+ /**
140
+ * @private
141
+ * @type number
142
+ * @default 0.0
143
+ */
144
+ this.minimumZoomDistance = 0.0;
145
+
146
+ /**
147
+ * Maximum distance from the zoom target that the camera can move away.
148
+ * @type {number}
149
+ * @default 100000.0
150
+ */
151
+ this.maximumZoomDistance = 100000.0;
152
+
153
+ /**
154
+ * @private
155
+ * @type {number}
156
+ * @default CesiumMath.EPSILON20
157
+ */
158
+ this.minimumZoomVelocity = CesiumMath.EPSILON20;
159
+
160
+ /**
161
+ * The maximum zoom velocity in meters per second. This limits the speed at which the camera can zoom in and out.
162
+ * @type {number}
163
+ * @default 1.0
164
+ */
165
+ this.maximumZoomVelocity = 1.0;
166
+
167
+ /**
168
+ * Enables or disables damping for zooming. 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.
169
+ * @type {boolean}
170
+ * @default true
171
+ */
172
+ this.dampingEnabled = true;
173
+
174
+ /**
175
+ * Specifies the length of time in seconds in which a single zoom animation is targeted to complete.
176
+ * @type {number}
177
+ * @default 0.45
178
+ */
179
+ this.zoomAnimationDuration = 0.45;
180
+
181
+ this._target = new Cartesian3();
182
+ this._zoomDirection = new Cartesian3();
183
+ this._zoomDampenedResults = {
184
+ velocity: 0.0,
185
+ value: 0.0,
186
+ };
187
+ }
188
+
189
+ /**
190
+ * @inheritdoc
191
+ */
192
+ get enabled() {
193
+ return this._enabled;
194
+ }
195
+ set enabled(value) {
196
+ this._enabled = value;
197
+
198
+ if (value) {
199
+ this._lastUpdateTime = getTimestamp();
200
+ this._scrollDelta = 0.0;
201
+ this._dragDelta.x = 0.0;
202
+ this._dragDelta.y = 0.0;
203
+ } else if (defined(this._dragInputState)) {
204
+ this._dragInputState.isDragging = false;
205
+ }
206
+ }
207
+
208
+ /**
209
+ * @private
210
+ * @type {boolean}
211
+ */
212
+ get isDragging() {
213
+ return defined(this._dragInputState) && this._dragInputState.isDragging;
214
+ }
215
+
216
+ /**
217
+ * @inheritdoc
218
+ * @param {HTMLElement} element The DOM element containing the Cesium scene.
219
+ */
220
+ connectedCallback(element) {
221
+ const handler = new ScreenSpaceEventHandler(element);
222
+ this._handler = handler;
223
+
224
+ for (const input of this.scrollInputs) {
225
+ handler.setInputAction(this._handleZoom.bind(this), input);
226
+ }
227
+
228
+ handler.setInputAction(
229
+ this._handleZoomPosition.bind(this),
230
+ ScreenSpaceEventType.MOUSE_MOVE,
231
+ );
232
+
233
+ this._dragInputState = ScreenSpaceInputBindings.registerDragInputBindings(
234
+ handler,
235
+ this.dragInputs,
236
+ {
237
+ start: this._handleStartDrag.bind(this),
238
+ change: this._handleDrag.bind(this),
239
+ },
240
+ );
241
+ }
242
+
243
+ /**
244
+ * @inheritdoc
245
+ * @param {HTMLElement} element The DOM element containing the Cesium scene.
246
+ */
247
+ disconnectedCallback(element) {
248
+ const handler = this._handler;
249
+ if (defined(handler) && !handler.isDestroyed()) {
250
+ handler.destroy();
251
+ }
252
+ }
253
+
254
+ /**
255
+ * @inheritdoc
256
+ */
257
+ firstUpdate() {
258
+ this._lastUpdateTime = getTimestamp();
259
+ this._scrollDelta = 0.0;
260
+ this._dragDelta.x = 0.0;
261
+ this._dragDelta.y = 0.0;
262
+ }
263
+
264
+ /**
265
+ * The current zoom distance of the camera in meters. This is the distance from the camera to the zoom target.
266
+ * @type {number}
267
+ * @private
268
+ */
269
+ get zoomDistance() {
270
+ return this._zoomDampenedResults.value;
271
+ }
272
+
273
+ /**
274
+ * The current zoom velocity of the camera in radians per second.
275
+ * @type {number}
276
+ * @private
277
+ */
278
+ get zoomVelocity() {
279
+ return this._zoomDampenedResults.velocity;
280
+ }
281
+
282
+ /**
283
+ * The current zoom velocity of the camera in radians per second.
284
+ * @type {number}
285
+ * @private
286
+ */
287
+ set zoomVelocity(value) {
288
+ this._zoomDampenedResults.velocity = value;
289
+ }
290
+
291
+ /**
292
+ * @inheritdoc
293
+ * @param {Scene} scene
294
+ */
295
+ update(scene) {
296
+ const now = getTimestamp();
297
+ const dt =
298
+ (now - this._lastUpdateTime) * TimeConstants.SECONDS_PER_MILLISECOND;
299
+
300
+ const { canvas } = scene;
301
+ const { clientWidth, clientHeight } = canvas;
302
+ if (dt === 0 || clientWidth === 0 || clientHeight === 0) {
303
+ this._lastUpdateTime = getTimestamp();
304
+ this._scrollDelta = 0.0;
305
+ this._dragDelta.x = 0;
306
+ this._dragDelta.y = 0;
307
+ return;
308
+ }
309
+
310
+ let dz = this._scrollDelta + this._dragDelta.y;
311
+ if (dz === 0.0 && this.inertiaEnabled) {
312
+ const damping = Math.exp(-this.inertialDecay * dt);
313
+ this._zoomInputVelocity *= damping;
314
+ dz = this._zoomInputVelocity * dt;
315
+ }
316
+
317
+ if (
318
+ Math.abs(this.zoomVelocity) < this.minimumZoomVelocity &&
319
+ dz <= CesiumMath.EPSILON3 &&
320
+ dz >= -CesiumMath.EPSILON3 &&
321
+ this.zoomVelocity <= CesiumMath.EPSILON3
322
+ ) {
323
+ this._lastUpdateTime = getTimestamp();
324
+ this._scrollDelta = 0.0;
325
+ this._dragDelta.x = 0;
326
+ this._dragDelta.y = 0;
327
+ this.zoomVelocity = 0.0;
328
+ return;
329
+ }
330
+
331
+ this._zoomInputVelocity = CesiumMath.clamp(
332
+ dz / dt,
333
+ -this.maximumZoomVelocity,
334
+ this.maximumZoomVelocity,
335
+ );
336
+
337
+ const { camera, ellipsoid } = scene;
338
+
339
+ let direction = camera.direction;
340
+ let distance =
341
+ Cartesian3.magnitude(camera.positionWC) - ellipsoid.maximumRadius;
342
+
343
+ let windowPosition = this.isDragging
344
+ ? this._screenSpaceDragPosition
345
+ : this._screenSpaceScrollPosition;
346
+ if (!this.useDragPosition) {
347
+ windowPosition = this._screenSpaceOrigin;
348
+ windowPosition.x = clientWidth / 2.0;
349
+ windowPosition.y = clientHeight / 2.0;
350
+ }
351
+ const target = this.pickWorldPosition(scene, windowPosition, this._target);
352
+ if (defined(target)) {
353
+ direction = Cartesian3.subtract(
354
+ target,
355
+ camera.positionWC,
356
+ this._zoomDirection,
357
+ );
358
+ direction = Cartesian3.normalize(direction, this._zoomDirection);
359
+ distance = Cartesian3.distance(target, camera.positionWC);
360
+ }
361
+
362
+ distance = CesiumMath.clamp(
363
+ distance,
364
+ distance > 0.0 ? this.minimumZoomDistance : -this.maximumZoomDistance,
365
+ distance > 0.0 ? this.maximumZoomDistance : -this.minimumZoomDistance,
366
+ );
367
+
368
+ const zoom = dz * distance * this.zoomDistanceRatio;
369
+
370
+ const smoothTime = this.dampingEnabled
371
+ ? this.zoomAnimationDuration
372
+ : undefined;
373
+ this._zoomDampenedResults = CesiumMath.smoothDamp(
374
+ 0.0,
375
+ zoom,
376
+ this.zoomVelocity,
377
+ dt,
378
+ undefined,
379
+ smoothTime,
380
+ this._zoomDampenedResults,
381
+ );
382
+
383
+ camera.move(direction, this.zoomDistance);
384
+
385
+ // Reset for next frame
386
+ this._lastUpdateTime = getTimestamp();
387
+ this._scrollDelta = 0.0;
388
+ this._dragDelta.x = 0;
389
+ this._dragDelta.y = 0;
390
+ }
391
+
392
+ /**
393
+ * @private
394
+ * @param {number} amount
395
+ */
396
+ _handleZoom(amount) {
397
+ this._scrollDelta += amount * this.zoomSensitivity;
398
+ }
399
+
400
+ /**
401
+ * @private
402
+ */
403
+ _handleZoomPosition(event) {
404
+ this._screenSpaceScrollPosition.x = event.endPosition.x;
405
+ this._screenSpaceScrollPosition.y = event.endPosition.y;
406
+ }
407
+
408
+ /**
409
+ * @private
410
+ */
411
+ _handleStartDrag(event) {
412
+ if (!this.enabled) {
413
+ return;
414
+ }
415
+
416
+ this._screenSpaceDragPosition.x = event.position.x;
417
+ this._screenSpaceDragPosition.y = event.position.y;
418
+ this._dragDelta.x = 0.0;
419
+ this._dragDelta.y = 0.0;
420
+ }
421
+
422
+ /**
423
+ * @private
424
+ */
425
+ _handleDrag(event) {
426
+ this._dragDelta.x += event.endPosition.x - event.startPosition.x;
427
+ this._dragDelta.y += event.endPosition.y - event.startPosition.y;
428
+ }
429
+ }
430
+
431
+ export default ScreenSpaceZoomCameraController;
@@ -0,0 +1,84 @@
1
+ import Cartesian3 from "../../Core/Cartesian3.js";
2
+ import Cartesian2 from "../../Core/Cartesian2.js";
3
+ import Check from "../../Core/Check.js";
4
+ import defined from "../../Core/defined.js";
5
+ import IntersectionTests from "../../Core/IntersectionTests.js";
6
+ import Plane from "../../Core/Plane.js";
7
+ import Ray from "../../Core/Ray.js";
8
+
9
+ const scratchSurfaceCartesian = new Cartesian3();
10
+ const scratchPlane = new Plane(Cartesian3.UNIT_X, 0.0);
11
+ const scratchRay = new Ray();
12
+ const defaultTargetPixelSize = new Cartesian2(1.0, 1.0, 1.0);
13
+
14
+ /**
15
+ * Picks a cartesian worldspace position based on the specified window coordinates and the camera's current position and orientation.
16
+ * <ol>
17
+ * <li>If the camera is above the scene's defined ellipsoid, the position is picked on the ellipsoid.</li>
18
+ * <li> If the camera is below the ellipsoid, a temporary plane is created relative to the camera's position and orientation, and the position is picked on that plane.</li>
19
+ * </ol>
20
+ * @param {Scene} scene The scene to pick the world position from.
21
+ * @param {Cartesian2} windowPosition The x and y coordinates of a pixel.
22
+ * @param {Cartesian3} result The object onto which to store the result.
23
+ * @param {Cartesian2} targetPixelSize The pixel size at the target position, used to preserve relative camera distance from the target position when navigating.
24
+ * @returns {Cartesian3|undefined} The picked cartesian worldspace position, or <code>undefined</code> if no position could be picked.
25
+ * @see {@link ScreenSpaceMapCameraController#pickWorldPosition}
26
+ * @see {@link ScreenSpaceElevatorCameraController#pickWorldPosition}
27
+ * @see {@link ScreenSpaceTiltOrbitCameraController#pickWorldPosition}
28
+ * @see {@link ScreenSpaceZoomCameraController#pickWorldPosition}
29
+ */
30
+ export default function (
31
+ scene,
32
+ windowPosition,
33
+ result,
34
+ targetPixelSize = defaultTargetPixelSize,
35
+ ) {
36
+ //>>includeStart('debug', pragmas.debug);
37
+ Check.typeOf.object("scene", scene);
38
+ Check.typeOf.object("windowPosition", windowPosition);
39
+ Check.typeOf.object("result", result);
40
+ //>>includeEnd('debug');
41
+
42
+ const { camera, ellipsoid } = scene;
43
+ const surface = ellipsoid.scaleToGeodeticSurface(
44
+ camera.positionWC,
45
+ scratchSurfaceCartesian,
46
+ );
47
+
48
+ // Camera is at the origin
49
+ if (!defined(surface)) {
50
+ return undefined;
51
+ }
52
+
53
+ const cameraMagnitude = Cartesian3.magnitude(camera.positionWC);
54
+ const surfaceMagnitude = Cartesian3.magnitude(surface);
55
+ const belowEllipsoid = cameraMagnitude <= surfaceMagnitude;
56
+
57
+ const normal = ellipsoid.geodeticSurfaceNormal(
58
+ camera.positionWC,
59
+ scratchSurfaceCartesian,
60
+ );
61
+ const dot = Cartesian3.dot(normal, camera.directionWC);
62
+ const lookingUp = dot > 0.0;
63
+
64
+ if (belowEllipsoid || lookingUp) {
65
+ // Camera is inside the ellipsoid. When underground, create a temporary plane beneath the ellipsoid surface to avoid picking a position on the inside and opposite side of the ellipsoid.
66
+
67
+ const plane = Plane.fromPointNormal(
68
+ camera.positionWC,
69
+ normal,
70
+ scratchPlane,
71
+ );
72
+
73
+ const { clientHeight } = scene.canvas;
74
+ const focusDistance =
75
+ (targetPixelSize.y * clientHeight) /
76
+ (2.0 * Math.tan(camera.frustum.fovy * 0.5));
77
+
78
+ plane.distance -= dot * focusDistance;
79
+ const ray = camera.getPickRay(windowPosition, scratchRay);
80
+ return IntersectionTests.rayPlane(ray, plane, result);
81
+ }
82
+
83
+ return camera.pickEllipsoid(windowPosition, ellipsoid, result);
84
+ }
@@ -346,6 +346,100 @@ DerivedCommand.createPickDerivedCommand = function (
346
346
  return result;
347
347
  };
348
348
 
349
+ // Repacks an RGBA8-normalized pick color into the uint32 pick ID so it can be
350
+ // carried losslessly in the R channel of the RGBA32F snap framebuffer.
351
+ // Injected only into snap-derived shaders; referenced by DrawCommand.snapId
352
+ // expressions built in PickingPipelineStage.
353
+ const snapHelperSource = `uint rgba8UnormToUint32(vec4 c)
354
+ {
355
+ uvec4 b = uvec4(c * 255.0 + 0.5);
356
+ return (b.r) | (b.g << 8u) | (b.b << 16u) | (b.a << 24u);
357
+ }
358
+ `;
359
+
360
+ function getSnapShaderProgram(context, shaderProgram, snapId) {
361
+ const cachedShader = context.shaderCache.getDerivedShaderProgram(
362
+ shaderProgram,
363
+ "snap",
364
+ );
365
+ if (defined(cachedShader)) {
366
+ return cachedShader;
367
+ }
368
+
369
+ const attributeLocations = shaderProgram._attributeLocations;
370
+ const { sources, defines } = shaderProgram.fragmentShaderSource;
371
+
372
+ const hasFragData = sources.some((source) => source.includes("out_FragData"));
373
+ const outputColorVariable = hasFragData ? "out_FragData_0" : "out_FragColor";
374
+ const newMain = `${snapHelperSource}
375
+ void main ()
376
+ {
377
+ czm_non_snap_main();
378
+ if (${outputColorVariable}.a == 0.0) {
379
+ discard;
380
+ }
381
+ ${outputColorVariable} = ${snapId};
382
+ } `;
383
+
384
+ const length = sources.length;
385
+ const newSources = new Array(length + 1);
386
+ for (let i = 0; i < length; ++i) {
387
+ newSources[i] = ShaderSource.replaceMain(sources[i], "czm_non_snap_main");
388
+ }
389
+ newSources[length] = newMain;
390
+ const fragmentShaderSource = new ShaderSource({
391
+ sources: newSources,
392
+ defines: defines,
393
+ });
394
+ return context.shaderCache.createDerivedShaderProgram(shaderProgram, "snap", {
395
+ vertexShaderSource: shaderProgram.vertexShaderSource,
396
+ fragmentShaderSource: fragmentShaderSource,
397
+ attributeLocations: attributeLocations,
398
+ });
399
+ }
400
+
401
+ /**
402
+ * Derives the command used during a snapping pass (see Scene#snap). Identical
403
+ * in structure to the pick derived command, but the fragment shader writes the
404
+ * float snap payload (DrawCommand.snapId) into the RGBA32F snap framebuffer
405
+ * instead of the RGBA8 pick color.
406
+ *
407
+ * @private
408
+ */
409
+ DerivedCommand.createSnapDerivedCommand = function (
410
+ scene,
411
+ command,
412
+ context,
413
+ result,
414
+ ) {
415
+ if (!defined(result)) {
416
+ result = {};
417
+ }
418
+
419
+ const shader = result.snapCommand?.shaderProgram;
420
+ const renderState = result.snapCommand?.renderState;
421
+
422
+ result.snapCommand = DrawCommand.shallowClone(command, result.snapCommand);
423
+
424
+ if (!defined(shader) || result.shaderProgramId !== command.shaderProgram.id) {
425
+ result.snapCommand.shaderProgram = getSnapShaderProgram(
426
+ context,
427
+ command.shaderProgram,
428
+ command.snapId,
429
+ );
430
+ result.snapCommand.renderState = getPickRenderState(
431
+ scene,
432
+ command.renderState,
433
+ );
434
+ result.shaderProgramId = command.shaderProgram.id;
435
+ } else {
436
+ result.snapCommand.shaderProgram = shader;
437
+ result.snapCommand.renderState = renderState;
438
+ }
439
+
440
+ return result;
441
+ };
442
+
349
443
  /**
350
444
  * Replaces the value of the specified 'define' directive identifier
351
445
  * with the given value.
@@ -403,6 +497,7 @@ function getComponentCount(classProperty) {
403
497
  * @param {string} offset The offset
404
498
  * @param {string} scale The scale
405
499
  * @returns {string} The statement
500
+ * @ignore
406
501
  */
407
502
  function unapplyValueTransform(input, offset, scale) {
408
503
  return `((${input} - float(${offset})) / float(${scale}))`;
@@ -415,6 +510,7 @@ function unapplyValueTransform(input, offset, scale) {
415
510
  * @param {string} input The input value
416
511
  * @param {string} componentType The component type
417
512
  * @returns {string} The statement
513
+ * @ignore
418
514
  */
419
515
  function unnormalize(input, componentType) {
420
516
  const max = MetadataComponentType.getMaximum(componentType);
@@ -429,6 +525,7 @@ function unnormalize(input, componentType) {
429
525
  * @param {object} metadataProperty The metadata property, either
430
526
  * a `PropertyTextureProperty` or a `PropertyAttributeProperty`
431
527
  * @returns {string} The string
528
+ * @ignore
432
529
  */
433
530
  function getSourceValueStringScalar(classProperty, metadataProperty) {
434
531
  let result = `float(value)`;
@@ -457,6 +554,7 @@ function getSourceValueStringScalar(classProperty, metadataProperty) {
457
554
  * a `PropertyTextureProperty` or a `PropertyAttributeProperty`
458
555
  * @param {string} componentName The name, in ["x", "y", "z", "w"]
459
556
  * @returns {string} The string
557
+ * @ignore
460
558
  */
461
559
  function getSourceValueStringComponent(
462
560
  classProperty,
@@ -9,16 +9,12 @@ import ClearCommand from "../Renderer/ClearCommand.js";
9
9
  /**
10
10
  * Creates and manages framebuffers for edge visibility rendering.
11
11
  *
12
- * @param {Object} options Object with the following properties:
13
- *
14
12
  * @alias EdgeFramebuffer
15
13
  * @constructor
16
14
  *
17
15
  * @private
18
16
  */
19
- function EdgeFramebuffer(options) {
20
- options = options || {};
21
-
17
+ function EdgeFramebuffer() {
22
18
  // Create framebuffer manager with multiple render targets (MRT)
23
19
  // Color attachment 0: edge color output (visualization / debug)
24
20
  // Color attachment 1: R: edge type, G: featureId (metadata / ids)
@@ -1341,14 +1341,12 @@ Node.prototype._evaluateNegative = function (feature) {
1341
1341
  Node.prototype._evaluatePositive = function (feature) {
1342
1342
  const left = this._left.evaluate(feature);
1343
1343
 
1344
- if (
1345
- !(
1346
- left instanceof Cartesian2 ||
1347
- left instanceof Cartesian3 ||
1348
- left instanceof Cartesian4 ||
1349
- typeof left === "number"
1350
- )
1351
- ) {
1344
+ if (!(
1345
+ left instanceof Cartesian2 ||
1346
+ left instanceof Cartesian3 ||
1347
+ left instanceof Cartesian4 ||
1348
+ typeof left === "number"
1349
+ )) {
1352
1350
  throw new RuntimeError(
1353
1351
  `Operator "+" requires a vector or number argument. Argument is ${left}.`,
1354
1352
  );