@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
@@ -191,133 +191,131 @@ const featureTypes = {
191
191
  Tour: processTour,
192
192
  };
193
193
 
194
- function DeferredLoading(dataSource) {
195
- this._dataSource = dataSource;
196
- this._deferred = defer();
197
- this._stack = [];
198
- this._promises = [];
199
- this._timeoutSet = false;
200
- this._used = false;
201
-
202
- this._started = 0;
203
- this._timeThreshold = 1000; // Initial load is 1 second
204
- }
194
+ class DeferredLoading {
195
+ constructor(dataSource) {
196
+ this._dataSource = dataSource;
197
+ this._deferred = defer();
198
+ this._stack = [];
199
+ this._promises = [];
200
+ this._timeoutSet = false;
201
+ this._used = false;
205
202
 
206
- Object.defineProperties(DeferredLoading.prototype, {
207
- dataSource: {
208
- get: function () {
209
- return this._dataSource;
210
- },
211
- },
212
- });
213
-
214
- DeferredLoading.prototype.addNodes = function (nodes, processingData) {
215
- this._stack.push({
216
- nodes: nodes,
217
- index: 0,
218
- processingData: processingData,
219
- });
220
- this._used = true;
221
- };
222
-
223
- DeferredLoading.prototype.addPromise = function (promise) {
224
- this._promises.push(promise);
225
- };
203
+ this._started = 0;
204
+ this._timeThreshold = 1000; // Initial load is 1 second
205
+ }
226
206
 
227
- DeferredLoading.prototype.wait = function () {
228
- // Case where we had a non-document/folder as the root
229
- const deferred = this._deferred;
230
- if (!this._used) {
231
- deferred.resolve();
207
+ get dataSource() {
208
+ return this._dataSource;
232
209
  }
233
210
 
234
- return Promise.all([deferred.promise, Promise.all(this._promises)]);
235
- };
211
+ addNodes(nodes, processingData) {
212
+ this._stack.push({
213
+ nodes: nodes,
214
+ index: 0,
215
+ processingData: processingData,
216
+ });
217
+ this._used = true;
218
+ }
236
219
 
237
- DeferredLoading.prototype.process = function () {
238
- const isFirstCall = this._stack.length === 1;
239
- if (isFirstCall) {
240
- this._started = KmlDataSource._getTimestamp();
220
+ addPromise(promise) {
221
+ this._promises.push(promise);
241
222
  }
242
223
 
243
- return this._process(isFirstCall);
244
- };
224
+ wait() {
225
+ // Case where we had a non-document/folder as the root
226
+ const deferred = this._deferred;
227
+ if (!this._used) {
228
+ deferred.resolve();
229
+ }
245
230
 
246
- DeferredLoading.prototype._giveUpTime = function () {
247
- if (this._timeoutSet) {
248
- // Timeout was already set so just return
249
- return;
231
+ return Promise.all([deferred.promise, Promise.all(this._promises)]);
250
232
  }
251
233
 
252
- this._timeoutSet = true;
253
- this._timeThreshold = 50; // After the first load lower threshold to 0.5 seconds
254
- const that = this;
255
- setTimeout(function () {
256
- that._timeoutSet = false;
257
- that._started = KmlDataSource._getTimestamp();
258
- that._process(true);
259
- }, 0);
260
- };
234
+ process() {
235
+ const isFirstCall = this._stack.length === 1;
236
+ if (isFirstCall) {
237
+ this._started = KmlDataSource._getTimestamp();
238
+ }
261
239
 
262
- DeferredLoading.prototype._nextNode = function () {
263
- const stack = this._stack;
264
- const top = stack[stack.length - 1];
265
- const index = top.index;
266
- const nodes = top.nodes;
267
- if (index === nodes.length) {
268
- return;
240
+ return this._process(isFirstCall);
269
241
  }
270
- ++top.index;
271
242
 
272
- return nodes[index];
273
- };
243
+ _giveUpTime() {
244
+ if (this._timeoutSet) {
245
+ // Timeout was already set so just return
246
+ return;
247
+ }
274
248
 
275
- DeferredLoading.prototype._pop = function () {
276
- const stack = this._stack;
277
- stack.pop();
249
+ this._timeoutSet = true;
250
+ this._timeThreshold = 50; // After the first load lower threshold to 0.5 seconds
251
+ const that = this;
252
+ setTimeout(function () {
253
+ that._timeoutSet = false;
254
+ that._started = KmlDataSource._getTimestamp();
255
+ that._process(true);
256
+ }, 0);
257
+ }
258
+
259
+ _nextNode() {
260
+ const stack = this._stack;
261
+ const top = stack[stack.length - 1];
262
+ const index = top.index;
263
+ const nodes = top.nodes;
264
+ if (index === nodes.length) {
265
+ return;
266
+ }
267
+ ++top.index;
278
268
 
279
- // Return false if we are done
280
- if (stack.length === 0) {
281
- this._deferred.resolve();
282
- return false;
269
+ return nodes[index];
283
270
  }
284
271
 
285
- return true;
286
- };
272
+ _pop() {
273
+ const stack = this._stack;
274
+ stack.pop();
287
275
 
288
- DeferredLoading.prototype._process = function (isFirstCall) {
289
- const dataSource = this.dataSource;
290
- const processingData = this._stack[this._stack.length - 1].processingData;
276
+ // Return false if we are done
277
+ if (stack.length === 0) {
278
+ this._deferred.resolve();
279
+ return false;
280
+ }
291
281
 
292
- let child = this._nextNode();
293
- while (defined(child)) {
294
- const featureProcessor = featureTypes[child.localName];
295
- if (
296
- defined(featureProcessor) &&
297
- (namespaces.kml.indexOf(child.namespaceURI) !== -1 ||
298
- namespaces.gx.indexOf(child.namespaceURI) !== -1)
299
- ) {
300
- featureProcessor(dataSource, child, processingData, this);
282
+ return true;
283
+ }
301
284
 
302
- // Give up time and continue loading later
285
+ _process(isFirstCall) {
286
+ const dataSource = this.dataSource;
287
+ const processingData = this._stack[this._stack.length - 1].processingData;
288
+
289
+ let child = this._nextNode();
290
+ while (defined(child)) {
291
+ const featureProcessor = featureTypes[child.localName];
303
292
  if (
304
- this._timeoutSet ||
305
- KmlDataSource._getTimestamp() > this._started + this._timeThreshold
293
+ defined(featureProcessor) &&
294
+ (namespaces.kml.indexOf(child.namespaceURI) !== -1 ||
295
+ namespaces.gx.indexOf(child.namespaceURI) !== -1)
306
296
  ) {
307
- this._giveUpTime();
308
- return;
297
+ featureProcessor(dataSource, child, processingData, this);
298
+
299
+ // Give up time and continue loading later
300
+ if (
301
+ this._timeoutSet ||
302
+ KmlDataSource._getTimestamp() > this._started + this._timeThreshold
303
+ ) {
304
+ this._giveUpTime();
305
+ return;
306
+ }
309
307
  }
310
- }
311
308
 
312
- child = this._nextNode();
313
- }
309
+ child = this._nextNode();
310
+ }
314
311
 
315
- // If we are a recursive call from a subfolder, just return so the parent folder can continue processing
316
- // If we aren't then make another call to processNodes because there is stuff still left in the queue
317
- if (this._pop() && isFirstCall) {
318
- this._process(true);
312
+ // If we are a recursive call from a subfolder, just return so the parent folder can continue processing
313
+ // If we aren't then make another call to processNodes because there is stuff still left in the queue
314
+ if (this._pop() && isFirstCall) {
315
+ this._process(true);
316
+ }
319
317
  }
320
- };
318
+ }
321
319
 
322
320
  function isZipFile(blob) {
323
321
  const magicBlob = blob.slice(0, Math.min(4, blob.size));
@@ -1497,9 +1495,8 @@ function processPositionGraphics(
1497
1495
  billboard.image = undefined;
1498
1496
  }
1499
1497
 
1500
- let scale = 1.0;
1501
1498
  if (defined(billboard.scale)) {
1502
- scale = billboard.scale.getValue();
1499
+ const scale = billboard.scale.getValue();
1503
1500
  if (scale !== 0) {
1504
1501
  label.pixelOffset = new Cartesian2(scale * 16 + 1, 0);
1505
1502
  } else {
@@ -3510,11 +3507,6 @@ function load(dataSource, entityCollection, data, options) {
3510
3507
  * under the <code>kml</code> property.
3511
3508
  * </p>
3512
3509
  *
3513
- * @alias KmlDataSource
3514
- * @constructor
3515
- *
3516
- * @param {KmlDataSource.ConstructorOptions} [options] Object describing initialization options
3517
- *
3518
3510
  * @see {@link http://www.opengeospatial.org/standards/kml/|Open Geospatial Consortium KML Standard}
3519
3511
  * @see {@link https://developers.google.com/kml/|Google KML Documentation}
3520
3512
  *
@@ -3529,339 +3521,455 @@ function load(dataSource, entityCollection, data, options) {
3529
3521
  * })
3530
3522
  * );
3531
3523
  */
3532
- function KmlDataSource(options) {
3533
- options = options ?? Frozen.EMPTY_OBJECT;
3534
- const camera = options.camera;
3535
- const canvas = options.canvas;
3536
-
3537
- this._changed = new Event();
3538
- this._error = new Event();
3539
- this._loading = new Event();
3540
- this._refresh = new Event();
3541
- this._unsupportedNode = new Event();
3542
-
3543
- this._clock = undefined;
3544
- this._entityCollection = new EntityCollection(this);
3545
- this._name = undefined;
3546
- this._isLoading = false;
3547
- this._pinBuilder = new PinBuilder();
3548
- this._networkLinks = new AssociativeArray();
3549
- this._entityCluster = new EntityCluster();
3550
-
3524
+ class KmlDataSource {
3551
3525
  /**
3552
- * The current size of this Canvas will be used to populate the Link parameters
3553
- * for client height and width.
3554
- *
3555
- * @type {HTMLCanvasElement | undefined}
3526
+ * @param {KmlDataSource.ConstructorOptions} [options] Object describing initialization options
3556
3527
  */
3557
- this.canvas = canvas;
3558
-
3559
- /**
3560
- * The position and orientation of this {@link Camera} will be used to
3561
- * populate various camera parameters when making network requests.
3562
- * Camera movement will determine when to trigger NetworkLink refresh if
3563
- * <code>viewRefreshMode</code> is <code>onStop</code>.
3564
- *
3565
- * @type {Camera | undefined}
3566
- */
3567
- this.camera = camera;
3568
-
3569
- this._lastCameraView = {
3570
- position: defined(camera) ? Cartesian3.clone(camera.positionWC) : undefined,
3571
- direction: defined(camera)
3572
- ? Cartesian3.clone(camera.directionWC)
3573
- : undefined,
3574
- up: defined(camera) ? Cartesian3.clone(camera.upWC) : undefined,
3575
- bbox: defined(camera)
3576
- ? camera.computeViewRectangle()
3577
- : Rectangle.clone(Rectangle.MAX_VALUE),
3578
- };
3528
+ constructor(options) {
3529
+ options = options ?? Frozen.EMPTY_OBJECT;
3530
+ const camera = options.camera;
3531
+ const canvas = options.canvas;
3532
+
3533
+ this._changed = new Event();
3534
+ this._error = new Event();
3535
+ this._loading = new Event();
3536
+ this._refresh = new Event();
3537
+ this._unsupportedNode = new Event();
3538
+
3539
+ this._clock = undefined;
3540
+ this._entityCollection = new EntityCollection(this);
3541
+ this._name = undefined;
3542
+ this._isLoading = false;
3543
+ this._pinBuilder = new PinBuilder();
3544
+ this._networkLinks = new AssociativeArray();
3545
+ this._entityCluster = new EntityCluster();
3546
+
3547
+ /**
3548
+ * The current size of this Canvas will be used to populate the Link parameters
3549
+ * for client height and width.
3550
+ *
3551
+ * @type {HTMLCanvasElement | undefined}
3552
+ */
3553
+ this.canvas = canvas;
3554
+
3555
+ /**
3556
+ * The position and orientation of this {@link Camera} will be used to
3557
+ * populate various camera parameters when making network requests.
3558
+ * Camera movement will determine when to trigger NetworkLink refresh if
3559
+ * <code>viewRefreshMode</code> is <code>onStop</code>.
3560
+ *
3561
+ * @type {Camera | undefined}
3562
+ */
3563
+ this.camera = camera;
3564
+
3565
+ this._lastCameraView = {
3566
+ position: defined(camera)
3567
+ ? Cartesian3.clone(camera.positionWC)
3568
+ : undefined,
3569
+ direction: defined(camera)
3570
+ ? Cartesian3.clone(camera.directionWC)
3571
+ : undefined,
3572
+ up: defined(camera) ? Cartesian3.clone(camera.upWC) : undefined,
3573
+ bbox: defined(camera)
3574
+ ? camera.computeViewRectangle()
3575
+ : Rectangle.clone(Rectangle.MAX_VALUE),
3576
+ };
3579
3577
 
3580
- this._ellipsoid = options.ellipsoid ?? Ellipsoid.default;
3578
+ this._ellipsoid = options.ellipsoid ?? Ellipsoid.default;
3581
3579
 
3582
- // User specified credit
3583
- let credit = options.credit;
3584
- if (typeof credit === "string") {
3585
- credit = new Credit(credit);
3586
- }
3587
- this._credit = credit;
3580
+ // User specified credit
3581
+ let credit = options.credit;
3582
+ if (typeof credit === "string") {
3583
+ credit = new Credit(credit);
3584
+ }
3585
+ this._credit = credit;
3588
3586
 
3589
- // Create a list of Credit's from the resource that the user can't remove
3590
- this._resourceCredits = [];
3587
+ // Create a list of Credit's from the resource that the user can't remove
3588
+ this._resourceCredits = [];
3591
3589
 
3592
- this._kmlTours = [];
3590
+ this._kmlTours = [];
3593
3591
 
3594
- this._screenOverlays = [];
3595
- }
3592
+ this._screenOverlays = [];
3593
+ }
3596
3594
 
3597
- /**
3598
- * Creates a Promise to a new instance loaded with the provided KML data.
3599
- *
3600
- * @param {Resource|string|Document|Blob} data A url, parsed KML document, or Blob containing binary KMZ data or a parsed KML document.
3601
- * @param {KmlDataSource.ConstructorOptions} [options] An object specifying configuration options
3602
- *
3603
- * @returns {Promise<KmlDataSource>} A promise that will resolve to a new KmlDataSource instance once the KML is loaded.
3604
- */
3605
- KmlDataSource.load = function (data, options) {
3606
- options = options ?? Frozen.EMPTY_OBJECT;
3607
- const dataSource = new KmlDataSource(options);
3608
- return dataSource.load(data, options);
3609
- };
3595
+ /**
3596
+ * Creates a Promise to a new instance loaded with the provided KML data.
3597
+ *
3598
+ * @param {Resource|string|Document|Blob} data A url, parsed KML document, or Blob containing binary KMZ data or a parsed KML document.
3599
+ * @param {KmlDataSource.ConstructorOptions} [options] An object specifying configuration options
3600
+ *
3601
+ * @returns {Promise<KmlDataSource>} A promise that will resolve to a new KmlDataSource instance once the KML is loaded.
3602
+ */
3603
+ static load(data, options) {
3604
+ options = options ?? Frozen.EMPTY_OBJECT;
3605
+ const dataSource = new KmlDataSource(options);
3606
+ return dataSource.load(data, options);
3607
+ }
3610
3608
 
3611
- Object.defineProperties(KmlDataSource.prototype, {
3612
3609
  /**
3613
3610
  * Gets or sets a human-readable name for this instance.
3614
3611
  * This will be automatically be set to the KML document name on load.
3615
- * @memberof KmlDataSource.prototype
3616
3612
  * @type {string}
3617
3613
  */
3618
- name: {
3619
- get: function () {
3620
- return this._name;
3621
- },
3622
- set: function (value) {
3623
- if (this._name !== value) {
3624
- this._name = value;
3625
- this._changed.raiseEvent(this);
3626
- }
3627
- },
3628
- },
3614
+ get name() {
3615
+ return this._name;
3616
+ }
3617
+
3618
+ set name(value) {
3619
+ if (this._name !== value) {
3620
+ this._name = value;
3621
+ this._changed.raiseEvent(this);
3622
+ }
3623
+ }
3624
+
3629
3625
  /**
3630
3626
  * Gets the clock settings defined by the loaded KML. This represents the total
3631
3627
  * availability interval for all time-dynamic data. If the KML does not contain
3632
3628
  * time-dynamic data, this value is undefined.
3633
- * @memberof KmlDataSource.prototype
3634
3629
  * @type {DataSourceClock}
3635
3630
  */
3636
- clock: {
3637
- get: function () {
3638
- return this._clock;
3639
- },
3640
- },
3631
+ get clock() {
3632
+ return this._clock;
3633
+ }
3634
+
3641
3635
  /**
3642
3636
  * Gets the collection of {@link Entity} instances.
3643
- * @memberof KmlDataSource.prototype
3644
3637
  * @type {EntityCollection}
3645
3638
  */
3646
- entities: {
3647
- get: function () {
3648
- return this._entityCollection;
3649
- },
3650
- },
3639
+ get entities() {
3640
+ return this._entityCollection;
3641
+ }
3642
+
3651
3643
  /**
3652
3644
  * Gets a value indicating if the data source is currently loading data.
3653
- * @memberof KmlDataSource.prototype
3654
3645
  * @type {boolean}
3655
3646
  */
3656
- isLoading: {
3657
- get: function () {
3658
- return this._isLoading;
3659
- },
3660
- },
3647
+ get isLoading() {
3648
+ return this._isLoading;
3649
+ }
3650
+
3661
3651
  /**
3662
3652
  * Gets an event that will be raised when the underlying data changes.
3663
- * @memberof KmlDataSource.prototype
3664
3653
  * @type {Event}
3665
3654
  */
3666
- changedEvent: {
3667
- get: function () {
3668
- return this._changed;
3669
- },
3670
- },
3655
+ get changedEvent() {
3656
+ return this._changed;
3657
+ }
3658
+
3671
3659
  /**
3672
3660
  * Gets an event that will be raised if an error is encountered during processing.
3673
- * @memberof KmlDataSource.prototype
3674
3661
  * @type {Event}
3675
3662
  */
3676
- errorEvent: {
3677
- get: function () {
3678
- return this._error;
3679
- },
3680
- },
3663
+ get errorEvent() {
3664
+ return this._error;
3665
+ }
3666
+
3681
3667
  /**
3682
3668
  * Gets an event that will be raised when the data source either starts or stops loading.
3683
- * @memberof KmlDataSource.prototype
3684
3669
  * @type {Event}
3685
3670
  */
3686
- loadingEvent: {
3687
- get: function () {
3688
- return this._loading;
3689
- },
3690
- },
3671
+ get loadingEvent() {
3672
+ return this._loading;
3673
+ }
3674
+
3691
3675
  /**
3692
3676
  * Gets an event that will be raised when the data source refreshes a network link.
3693
- * @memberof KmlDataSource.prototype
3694
3677
  * @type {Event}
3695
3678
  */
3696
- refreshEvent: {
3697
- get: function () {
3698
- return this._refresh;
3699
- },
3700
- },
3679
+ get refreshEvent() {
3680
+ return this._refresh;
3681
+ }
3682
+
3701
3683
  /**
3702
3684
  * Gets an event that will be raised when the data source finds an unsupported node type.
3703
- * @memberof KmlDataSource.prototype
3704
3685
  * @type {Event}
3705
3686
  */
3706
- unsupportedNodeEvent: {
3707
- get: function () {
3708
- return this._unsupportedNode;
3709
- },
3710
- },
3687
+ get unsupportedNodeEvent() {
3688
+ return this._unsupportedNode;
3689
+ }
3690
+
3711
3691
  /**
3712
3692
  * Gets whether or not this data source should be displayed.
3713
- * @memberof KmlDataSource.prototype
3714
3693
  * @type {boolean}
3715
3694
  */
3716
- show: {
3717
- get: function () {
3718
- return this._entityCollection.show;
3719
- },
3720
- set: function (value) {
3721
- this._entityCollection.show = value;
3722
- },
3723
- },
3695
+ get show() {
3696
+ return this._entityCollection.show;
3697
+ }
3698
+
3699
+ set show(value) {
3700
+ this._entityCollection.show = value;
3701
+ }
3724
3702
 
3725
3703
  /**
3726
3704
  * Gets or sets the clustering options for this data source. This object can be shared between multiple data sources.
3727
3705
  *
3728
- * @memberof KmlDataSource.prototype
3729
3706
  * @type {EntityCluster}
3730
3707
  */
3731
- clustering: {
3732
- get: function () {
3733
- return this._entityCluster;
3734
- },
3735
- set: function (value) {
3736
- //>>includeStart('debug', pragmas.debug);
3737
- if (!defined(value)) {
3738
- throw new DeveloperError("value must be defined.");
3739
- }
3740
- //>>includeEnd('debug');
3741
- this._entityCluster = value;
3742
- },
3743
- },
3708
+ get clustering() {
3709
+ return this._entityCluster;
3710
+ }
3711
+
3712
+ set clustering(value) {
3713
+ //>>includeStart('debug', pragmas.debug);
3714
+ if (!defined(value)) {
3715
+ throw new DeveloperError("value must be defined.");
3716
+ }
3717
+ //>>includeEnd('debug');
3718
+ this._entityCluster = value;
3719
+ }
3720
+
3744
3721
  /**
3745
3722
  * Gets the credit that will be displayed for the data source
3746
- * @memberof KmlDataSource.prototype
3747
3723
  * @type {Credit}
3748
3724
  */
3749
- credit: {
3750
- get: function () {
3751
- return this._credit;
3752
- },
3753
- },
3725
+ get credit() {
3726
+ return this._credit;
3727
+ }
3728
+
3754
3729
  /**
3755
3730
  * Gets the KML Tours that are used to guide the camera to specified destinations on given time intervals.
3756
- * @memberof KmlDataSource.prototype
3757
3731
  * @type {KmlTour[]}
3758
3732
  */
3759
- kmlTours: {
3760
- get: function () {
3761
- return this._kmlTours;
3762
- },
3763
- },
3764
- });
3765
-
3766
- /**
3767
- * Asynchronously loads the provided KML data, replacing any existing data.
3768
- *
3769
- * @param {Resource|string|Document|Blob} data A url, parsed KML document, or Blob containing binary KMZ data or a parsed KML document.
3770
- * @param {KmlDataSource.LoadOptions} [options] An object specifying configuration options
3771
- *
3772
- * @returns {Promise<KmlDataSource>} A promise that will resolve to this instances once the KML is loaded.
3773
- */
3774
- KmlDataSource.prototype.load = function (data, options) {
3775
- //>>includeStart('debug', pragmas.debug);
3776
- if (!defined(data)) {
3777
- throw new DeveloperError("data is required.");
3733
+ get kmlTours() {
3734
+ return this._kmlTours;
3778
3735
  }
3779
- //>>includeEnd('debug');
3780
3736
 
3781
- options = options ?? Frozen.EMPTY_OBJECT;
3782
- DataSource.setLoading(this, true);
3783
-
3784
- const oldName = this._name;
3785
- this._name = undefined;
3786
- this._clampToGround = options.clampToGround ?? false;
3787
-
3788
- const that = this;
3789
- return load(this, this._entityCollection, data, options)
3790
- .then(function () {
3791
- let clock;
3792
-
3793
- const availability = that._entityCollection.computeAvailability();
3794
-
3795
- let start = availability.start;
3796
- let stop = availability.stop;
3797
- const isMinStart = JulianDate.equals(start, Iso8601.MINIMUM_VALUE);
3798
- const isMaxStop = JulianDate.equals(stop, Iso8601.MAXIMUM_VALUE);
3799
- if (!isMinStart || !isMaxStop) {
3800
- let date;
3801
-
3802
- //If start is min time just start at midnight this morning, local time
3803
- if (isMinStart) {
3804
- date = new Date();
3805
- date.setHours(0, 0, 0, 0);
3806
- start = JulianDate.fromDate(date);
3737
+ /**
3738
+ * Asynchronously loads the provided KML data, replacing any existing data.
3739
+ *
3740
+ * @param {Resource|string|Document|Blob} data A url, parsed KML document, or Blob containing binary KMZ data or a parsed KML document.
3741
+ * @param {KmlDataSource.LoadOptions} [options] An object specifying configuration options
3742
+ *
3743
+ * @returns {Promise<KmlDataSource>} A promise that will resolve to this instances once the KML is loaded.
3744
+ */
3745
+ load(data, options) {
3746
+ //>>includeStart('debug', pragmas.debug);
3747
+ if (!defined(data)) {
3748
+ throw new DeveloperError("data is required.");
3749
+ }
3750
+ //>>includeEnd('debug');
3751
+
3752
+ options = options ?? Frozen.EMPTY_OBJECT;
3753
+ DataSource.setLoading(this, true);
3754
+
3755
+ const oldName = this._name;
3756
+ this._name = undefined;
3757
+ this._clampToGround = options.clampToGround ?? false;
3758
+
3759
+ const that = this;
3760
+ return load(this, this._entityCollection, data, options)
3761
+ .then(function () {
3762
+ let clock;
3763
+
3764
+ const availability = that._entityCollection.computeAvailability();
3765
+
3766
+ let start = availability.start;
3767
+ let stop = availability.stop;
3768
+ const isMinStart = JulianDate.equals(start, Iso8601.MINIMUM_VALUE);
3769
+ const isMaxStop = JulianDate.equals(stop, Iso8601.MAXIMUM_VALUE);
3770
+ if (!isMinStart || !isMaxStop) {
3771
+ let date;
3772
+
3773
+ //If start is min time just start at midnight this morning, local time
3774
+ if (isMinStart) {
3775
+ date = new Date();
3776
+ date.setHours(0, 0, 0, 0);
3777
+ start = JulianDate.fromDate(date);
3778
+ }
3779
+
3780
+ //If stop is max value just stop at midnight tonight, local time
3781
+ if (isMaxStop) {
3782
+ date = new Date();
3783
+ date.setHours(24, 0, 0, 0);
3784
+ stop = JulianDate.fromDate(date);
3785
+ }
3786
+
3787
+ clock = new DataSourceClock();
3788
+ clock.startTime = start;
3789
+ clock.stopTime = stop;
3790
+ clock.currentTime = JulianDate.clone(start);
3791
+ clock.clockRange = ClockRange.LOOP_STOP;
3792
+ clock.clockStep = ClockStep.SYSTEM_CLOCK_MULTIPLIER;
3793
+ clock.multiplier = Math.round(
3794
+ Math.min(
3795
+ Math.max(JulianDate.secondsDifference(stop, start) / 60, 1),
3796
+ 3.15569e7,
3797
+ ),
3798
+ );
3807
3799
  }
3808
3800
 
3809
- //If stop is max value just stop at midnight tonight, local time
3810
- if (isMaxStop) {
3811
- date = new Date();
3812
- date.setHours(24, 0, 0, 0);
3813
- stop = JulianDate.fromDate(date);
3801
+ let changed = false;
3802
+ if (clock !== that._clock) {
3803
+ that._clock = clock;
3804
+ changed = true;
3814
3805
  }
3815
3806
 
3816
- clock = new DataSourceClock();
3817
- clock.startTime = start;
3818
- clock.stopTime = stop;
3819
- clock.currentTime = JulianDate.clone(start);
3820
- clock.clockRange = ClockRange.LOOP_STOP;
3821
- clock.clockStep = ClockStep.SYSTEM_CLOCK_MULTIPLIER;
3822
- clock.multiplier = Math.round(
3823
- Math.min(
3824
- Math.max(JulianDate.secondsDifference(stop, start) / 60, 1),
3825
- 3.15569e7,
3826
- ),
3827
- );
3828
- }
3807
+ if (oldName !== that._name) {
3808
+ changed = true;
3809
+ }
3829
3810
 
3830
- let changed = false;
3831
- if (clock !== that._clock) {
3832
- that._clock = clock;
3833
- changed = true;
3834
- }
3811
+ if (changed) {
3812
+ that._changed.raiseEvent(that);
3813
+ }
3814
+
3815
+ DataSource.setLoading(that, false);
3816
+
3817
+ return that;
3818
+ })
3819
+ .catch(function (error) {
3820
+ DataSource.setLoading(that, false);
3821
+ that._error.raiseEvent(that, error);
3822
+ console.log(error);
3823
+ return Promise.reject(error);
3824
+ });
3825
+ }
3826
+
3827
+ /**
3828
+ * Cleans up any non-entity elements created by the data source. Currently this only affects ScreenOverlay elements.
3829
+ */
3830
+ destroy() {
3831
+ while (this._screenOverlays.length > 0) {
3832
+ const elem = this._screenOverlays.pop();
3833
+ elem.remove();
3834
+ }
3835
+ }
3835
3836
 
3836
- if (oldName !== that._name) {
3837
- changed = true;
3837
+ /**
3838
+ * Updates any NetworkLink that require updating.
3839
+ *
3840
+ * @param {JulianDate} time The simulation time.
3841
+ * @returns {boolean} True if this data source is ready to be displayed at the provided time, false otherwise.
3842
+ */
3843
+ update(time) {
3844
+ const networkLinks = this._networkLinks;
3845
+ if (networkLinks.length === 0) {
3846
+ return true;
3847
+ }
3848
+
3849
+ const now = JulianDate.now();
3850
+ const that = this;
3851
+
3852
+ entitiesToIgnore.removeAll();
3853
+
3854
+ function recurseIgnoreEntities(entity) {
3855
+ const children = entity._children;
3856
+ const count = children.length;
3857
+ for (let i = 0; i < count; ++i) {
3858
+ const child = children[i];
3859
+ entitiesToIgnore.set(child.id, child);
3860
+ recurseIgnoreEntities(child);
3838
3861
  }
3862
+ }
3863
+
3864
+ let cameraViewUpdate = false;
3865
+ const lastCameraView = this._lastCameraView;
3866
+ const camera = this.camera;
3867
+ if (
3868
+ defined(camera) &&
3869
+ !(
3870
+ camera.positionWC.equalsEpsilon(
3871
+ lastCameraView.position,
3872
+ CesiumMath.EPSILON7,
3873
+ ) &&
3874
+ camera.directionWC.equalsEpsilon(
3875
+ lastCameraView.direction,
3876
+ CesiumMath.EPSILON7,
3877
+ ) &&
3878
+ camera.upWC.equalsEpsilon(lastCameraView.up, CesiumMath.EPSILON7)
3879
+ )
3880
+ ) {
3881
+ // Camera has changed so update the last view
3882
+ lastCameraView.position = Cartesian3.clone(camera.positionWC);
3883
+ lastCameraView.direction = Cartesian3.clone(camera.directionWC);
3884
+ lastCameraView.up = Cartesian3.clone(camera.upWC);
3885
+ lastCameraView.bbox = camera.computeViewRectangle();
3886
+ cameraViewUpdate = true;
3887
+ }
3839
3888
 
3840
- if (changed) {
3841
- that._changed.raiseEvent(that);
3889
+ const newNetworkLinks = new AssociativeArray();
3890
+ let changed = false;
3891
+ networkLinks.values.forEach(function (networkLink) {
3892
+ const entity = networkLink.entity;
3893
+ if (entitiesToIgnore.contains(entity.id)) {
3894
+ return;
3842
3895
  }
3843
3896
 
3844
- DataSource.setLoading(that, false);
3897
+ if (!networkLink.updating) {
3898
+ let doUpdate = false;
3899
+ if (networkLink.refreshMode === RefreshMode.INTERVAL) {
3900
+ if (
3901
+ JulianDate.secondsDifference(now, networkLink.lastUpdated) >
3902
+ networkLink.time
3903
+ ) {
3904
+ doUpdate = true;
3905
+ }
3906
+ } else if (networkLink.refreshMode === RefreshMode.EXPIRE) {
3907
+ if (JulianDate.greaterThan(now, networkLink.time)) {
3908
+ doUpdate = true;
3909
+ }
3910
+ } else if (networkLink.refreshMode === RefreshMode.STOP) {
3911
+ if (cameraViewUpdate) {
3912
+ networkLink.needsUpdate = true;
3913
+ networkLink.cameraUpdateTime = now;
3914
+ }
3845
3915
 
3846
- return that;
3847
- })
3848
- .catch(function (error) {
3849
- DataSource.setLoading(that, false);
3850
- that._error.raiseEvent(that, error);
3851
- console.log(error);
3852
- return Promise.reject(error);
3916
+ if (
3917
+ networkLink.needsUpdate &&
3918
+ JulianDate.secondsDifference(now, networkLink.cameraUpdateTime) >=
3919
+ networkLink.time
3920
+ ) {
3921
+ doUpdate = true;
3922
+ }
3923
+ }
3924
+
3925
+ if (doUpdate) {
3926
+ recurseIgnoreEntities(entity);
3927
+ networkLink.updating = true;
3928
+ const newEntityCollection = new EntityCollection();
3929
+ const href = networkLink.href.clone();
3930
+
3931
+ href.setQueryParameters(networkLink.cookie);
3932
+ const ellipsoid = that._ellipsoid ?? Ellipsoid.default;
3933
+ processNetworkLinkQueryString(
3934
+ href,
3935
+ that.camera,
3936
+ that.canvas,
3937
+ networkLink.viewBoundScale,
3938
+ lastCameraView.bbox,
3939
+ ellipsoid,
3940
+ );
3941
+
3942
+ load(that, newEntityCollection, href, {
3943
+ context: entity.id,
3944
+ })
3945
+ .then(
3946
+ getNetworkLinkUpdateCallback(
3947
+ that,
3948
+ networkLink,
3949
+ newEntityCollection,
3950
+ newNetworkLinks,
3951
+ href,
3952
+ ),
3953
+ )
3954
+ .catch(function (error) {
3955
+ const msg = `NetworkLink ${networkLink.href} refresh failed: ${error}`;
3956
+ console.log(msg);
3957
+ that._error.raiseEvent(that, msg);
3958
+ });
3959
+ changed = true;
3960
+ }
3961
+ }
3962
+ newNetworkLinks.set(networkLink.id, networkLink);
3853
3963
  });
3854
- };
3855
3964
 
3856
- /**
3857
- * Cleans up any non-entity elements created by the data source. Currently this only affects ScreenOverlay elements.
3858
- */
3859
- KmlDataSource.prototype.destroy = function () {
3860
- while (this._screenOverlays.length > 0) {
3861
- const elem = this._screenOverlays.pop();
3862
- elem.remove();
3965
+ if (changed) {
3966
+ this._networkLinks = newNetworkLinks;
3967
+ this._changed.raiseEvent(this);
3968
+ }
3969
+
3970
+ return true;
3863
3971
  }
3864
- };
3972
+ }
3865
3973
 
3866
3974
  function mergeAvailabilityWithParent(child) {
3867
3975
  const parent = child.parent;
@@ -4035,211 +4143,75 @@ function getNetworkLinkUpdateCallback(
4035
4143
  const entitiesToIgnore = new AssociativeArray();
4036
4144
 
4037
4145
  /**
4038
- * Updates any NetworkLink that require updating.
4039
- *
4040
- * @param {JulianDate} time The simulation time.
4041
- * @returns {boolean} True if this data source is ready to be displayed at the provided time, false otherwise.
4146
+ * @typedef KmlFeatureData.Author
4147
+ * @type {object}
4148
+ * @property {string} name Gets the name.
4149
+ * @property {string} uri Gets the URI.
4150
+ * @property {number} age Gets the email.
4042
4151
  */
4043
- KmlDataSource.prototype.update = function (time) {
4044
- const networkLinks = this._networkLinks;
4045
- if (networkLinks.length === 0) {
4046
- return true;
4047
- }
4048
-
4049
- const now = JulianDate.now();
4050
- const that = this;
4051
-
4052
- entitiesToIgnore.removeAll();
4053
-
4054
- function recurseIgnoreEntities(entity) {
4055
- const children = entity._children;
4056
- const count = children.length;
4057
- for (let i = 0; i < count; ++i) {
4058
- const child = children[i];
4059
- entitiesToIgnore.set(child.id, child);
4060
- recurseIgnoreEntities(child);
4061
- }
4062
- }
4063
-
4064
- let cameraViewUpdate = false;
4065
- const lastCameraView = this._lastCameraView;
4066
- const camera = this.camera;
4067
- if (
4068
- defined(camera) &&
4069
- !(
4070
- camera.positionWC.equalsEpsilon(
4071
- lastCameraView.position,
4072
- CesiumMath.EPSILON7,
4073
- ) &&
4074
- camera.directionWC.equalsEpsilon(
4075
- lastCameraView.direction,
4076
- CesiumMath.EPSILON7,
4077
- ) &&
4078
- camera.upWC.equalsEpsilon(lastCameraView.up, CesiumMath.EPSILON7)
4079
- )
4080
- ) {
4081
- // Camera has changed so update the last view
4082
- lastCameraView.position = Cartesian3.clone(camera.positionWC);
4083
- lastCameraView.direction = Cartesian3.clone(camera.directionWC);
4084
- lastCameraView.up = Cartesian3.clone(camera.upWC);
4085
- lastCameraView.bbox = camera.computeViewRectangle();
4086
- cameraViewUpdate = true;
4087
- }
4088
-
4089
- const newNetworkLinks = new AssociativeArray();
4090
- let changed = false;
4091
- networkLinks.values.forEach(function (networkLink) {
4092
- const entity = networkLink.entity;
4093
- if (entitiesToIgnore.contains(entity.id)) {
4094
- return;
4095
- }
4096
-
4097
- if (!networkLink.updating) {
4098
- let doUpdate = false;
4099
- if (networkLink.refreshMode === RefreshMode.INTERVAL) {
4100
- if (
4101
- JulianDate.secondsDifference(now, networkLink.lastUpdated) >
4102
- networkLink.time
4103
- ) {
4104
- doUpdate = true;
4105
- }
4106
- } else if (networkLink.refreshMode === RefreshMode.EXPIRE) {
4107
- if (JulianDate.greaterThan(now, networkLink.time)) {
4108
- doUpdate = true;
4109
- }
4110
- } else if (networkLink.refreshMode === RefreshMode.STOP) {
4111
- if (cameraViewUpdate) {
4112
- networkLink.needsUpdate = true;
4113
- networkLink.cameraUpdateTime = now;
4114
- }
4115
-
4116
- if (
4117
- networkLink.needsUpdate &&
4118
- JulianDate.secondsDifference(now, networkLink.cameraUpdateTime) >=
4119
- networkLink.time
4120
- ) {
4121
- doUpdate = true;
4122
- }
4123
- }
4124
-
4125
- if (doUpdate) {
4126
- recurseIgnoreEntities(entity);
4127
- networkLink.updating = true;
4128
- const newEntityCollection = new EntityCollection();
4129
- const href = networkLink.href.clone();
4130
-
4131
- href.setQueryParameters(networkLink.cookie);
4132
- const ellipsoid = that._ellipsoid ?? Ellipsoid.default;
4133
- processNetworkLinkQueryString(
4134
- href,
4135
- that.camera,
4136
- that.canvas,
4137
- networkLink.viewBoundScale,
4138
- lastCameraView.bbox,
4139
- ellipsoid,
4140
- );
4141
-
4142
- load(that, newEntityCollection, href, {
4143
- context: entity.id,
4144
- })
4145
- .then(
4146
- getNetworkLinkUpdateCallback(
4147
- that,
4148
- networkLink,
4149
- newEntityCollection,
4150
- newNetworkLinks,
4151
- href,
4152
- ),
4153
- )
4154
- .catch(function (error) {
4155
- const msg = `NetworkLink ${networkLink.href} refresh failed: ${error}`;
4156
- console.log(msg);
4157
- that._error.raiseEvent(that, msg);
4158
- });
4159
- changed = true;
4160
- }
4161
- }
4162
- newNetworkLinks.set(networkLink.id, networkLink);
4163
- });
4164
-
4165
- if (changed) {
4166
- this._networkLinks = newNetworkLinks;
4167
- this._changed.raiseEvent(this);
4168
- }
4169
-
4170
- return true;
4171
- };
4172
4152
 
4173
4153
  /**
4174
4154
  * Contains KML Feature data loaded into the <code>Entity.kml</code> property by {@link KmlDataSource}.
4175
- * @alias KmlFeatureData
4176
- * @constructor
4177
4155
  */
4178
- function KmlFeatureData() {
4179
- /**
4180
- * @typedef KmlFeatureData.Author
4181
- * @type {object}
4182
- * @property {string} name Gets the name.
4183
- * @property {string} uri Gets the URI.
4184
- * @property {number} age Gets the email.
4185
- */
4186
-
4187
- /**
4188
- * Gets the atom syndication format author field.
4189
- * @type {KmlFeatureData.Author}
4190
- */
4191
- this.author = {
4192
- name: undefined,
4193
- uri: undefined,
4194
- email: undefined,
4195
- };
4196
-
4197
- /**
4198
- * @typedef KmlFeatureData.Link
4199
- * @type {object}
4200
- * @property {string} href Gets the href.
4201
- * @property {string} hreflang Gets the language of the linked resource.
4202
- * @property {string} rel Gets the link relation.
4203
- * @property {string} type Gets the link type.
4204
- * @property {string} title Gets the link title.
4205
- * @property {string} length Gets the link length.
4206
- */
4156
+ class KmlFeatureData {
4157
+ constructor() {
4158
+ /**
4159
+ * Gets the atom syndication format author field.
4160
+ * @type {KmlFeatureData.Author}
4161
+ */
4162
+ this.author = {
4163
+ name: undefined,
4164
+ uri: undefined,
4165
+ email: undefined,
4166
+ };
4207
4167
 
4208
- /**
4209
- * Gets the link.
4210
- * @type {KmlFeatureData.Link}
4211
- */
4212
- this.link = {
4213
- href: undefined,
4214
- hreflang: undefined,
4215
- rel: undefined,
4216
- type: undefined,
4217
- title: undefined,
4218
- length: undefined,
4219
- };
4168
+ /**
4169
+ * @typedef KmlFeatureData.Link
4170
+ * @type {object}
4171
+ * @property {string} href Gets the href.
4172
+ * @property {string} hreflang Gets the language of the linked resource.
4173
+ * @property {string} rel Gets the link relation.
4174
+ * @property {string} type Gets the link type.
4175
+ * @property {string} title Gets the link title.
4176
+ * @property {string} length Gets the link length.
4177
+ */
4178
+
4179
+ /**
4180
+ * Gets the link.
4181
+ * @type {KmlFeatureData.Link}
4182
+ */
4183
+ this.link = {
4184
+ href: undefined,
4185
+ hreflang: undefined,
4186
+ rel: undefined,
4187
+ type: undefined,
4188
+ title: undefined,
4189
+ length: undefined,
4190
+ };
4220
4191
 
4221
- /**
4222
- * Gets the unstructured address field.
4223
- * @type {string}
4224
- */
4225
- this.address = undefined;
4226
- /**
4227
- * Gets the phone number.
4228
- * @type {string}
4229
- */
4230
- this.phoneNumber = undefined;
4231
- /**
4232
- * Gets the snippet.
4233
- * @type {string}
4234
- */
4235
- this.snippet = undefined;
4236
- /**
4237
- * Gets the extended data, parsed into a JSON object.
4238
- * Currently only the <code>Data</code> property is supported.
4239
- * <code>SchemaData</code> and custom data are ignored.
4240
- * @type {string}
4241
- */
4242
- this.extendedData = undefined;
4192
+ /**
4193
+ * Gets the unstructured address field.
4194
+ * @type {string}
4195
+ */
4196
+ this.address = undefined;
4197
+ /**
4198
+ * Gets the phone number.
4199
+ * @type {string}
4200
+ */
4201
+ this.phoneNumber = undefined;
4202
+ /**
4203
+ * Gets the snippet.
4204
+ * @type {string}
4205
+ */
4206
+ this.snippet = undefined;
4207
+ /**
4208
+ * Gets the extended data, parsed into a JSON object.
4209
+ * Currently only the <code>Data</code> property is supported.
4210
+ * <code>SchemaData</code> and custom data are ignored.
4211
+ * @type {string}
4212
+ */
4213
+ this.extendedData = undefined;
4214
+ }
4243
4215
  }
4244
4216
 
4245
4217
  // For testing