@arcgis/core 4.28.0-next.20230821 → 4.28.0-next.20230823

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 (668) hide show
  1. package/Basemap.js +1 -1
  2. package/WebScene.js +1 -1
  3. package/arcade/functions/geomasync.js +1 -1
  4. package/arcade/portalUtils.js +1 -1
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/0746319459dbcd3ab6f7.js +1 -0
  7. package/assets/esri/core/workers/chunks/{587437526ea77f764986.js → 0759d4ab9695096d2bbd.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{d0c4367a197b193e95d4.js → 10c014a6d8767ae8a666.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{5ffabd1a90c5b08109aa.js → 196937631ac20795e0ae.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{e05b54a0b834b4e4268e.js → 1c2b69dfcd0db58150e2.js} +1 -1
  11. package/assets/esri/core/workers/chunks/1c2f7c95825fdac790be.js +1 -0
  12. package/assets/esri/core/workers/chunks/1f9c80815f90fd0886d7.js +1 -0
  13. package/assets/esri/core/workers/chunks/217910f88fe2c03e6bdd.js +1 -0
  14. package/assets/esri/core/workers/chunks/238966b2fc6cc3dfcc05.js +1 -0
  15. package/assets/esri/core/workers/chunks/2c9f709d64954b3c1650.js +1 -0
  16. package/assets/esri/core/workers/chunks/35faede04d4539aab6e8.js +1 -0
  17. package/assets/esri/core/workers/chunks/3e3edcbacf8eaf275b97.js +1 -0
  18. package/assets/esri/core/workers/chunks/{b78dc6cbe14e5817b4d9.js → 4968018bc693c053fdd2.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{c35b850fbfcb28133235.js → 49a1ba3e7ea204adeddb.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{12b8fe0374fa9ab4ca09.js → 49cf3ae224f56f45f65b.js} +1 -1
  21. package/assets/esri/core/workers/chunks/5330040eeacc9c03fbdb.js +1 -0
  22. package/assets/esri/core/workers/chunks/54aaa21144431b29b6ed.js +1 -0
  23. package/assets/esri/core/workers/chunks/{6c40f16e6d10321295d8.js → 5b13d28cf5efc312a21c.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{d6c96a20e9640b433719.js → 67c6618339d323460d45.js} +57 -57
  25. package/assets/esri/core/workers/chunks/{dd86f43505b636eb41c0.js → 7714c16f9c8860efd461.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{752d389c7bdcbe7004dc.js → 83e0af5522a672c2c73b.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{873111ddf4813cdd4903.js → 872d0d4bf364be43a92e.js} +1 -1
  28. package/assets/esri/core/workers/chunks/8a784ddd5607f1ddbb5b.js +1 -0
  29. package/assets/esri/core/workers/chunks/{0cad2b991d0d0fd07846.js → 8c9c4162617f31e3f5f2.js} +1 -1
  30. package/assets/esri/core/workers/chunks/8db3ee2931be5cca3f5e.js +1 -0
  31. package/assets/esri/core/workers/chunks/{fd3920159ab9748402a2.js → 92350664e2719a9e860e.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{ff755962fd1c771f5be5.js → a3b461174984a1cb92b3.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{dd4c6d000222798a0317.js → a47aff9c97c5ce52d0dc.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{028534e3d4e13c9ea687.js → a645f08a7678f2ca037c.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{d9fe6cfbc9ad2920ca9c.js → aca45e54ec925002df9a.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{40ff0e7c948615b8bfc0.js → b07d32a60307d04391fc.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{fdc703330bf194a48e0e.js → b086e798f43dacb0175f.js} +1 -1
  38. package/assets/esri/core/workers/chunks/bd0b9647880cbbec95e2.js +1 -0
  39. package/assets/esri/core/workers/chunks/{ab420bacdd63ee8fbd8b.js → bf9b5e2803a5444bd944.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{c58ca2685eb7e559f428.js → c0a2a737a3085690afc5.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{e04e8af4224fff8c3ec3.js → c34615c0b7ad83d1ad24.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{05ab09713d599687afa3.js → d105ee2e394e2c48303c.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{ef03b78659c72de93076.js → d183144fa504064d23d3.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{4f5207abb034375927c7.js → d8495c6dcd4d9bec8dd6.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{1a485d63330f5e7fe4e3.js → dba61fa8cbb57dde54b2.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{8a306e3aa210861b8c17.js → deb0bd575c63d9dbcde5.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{d0a2f9ca338b60f2ba2a.js → e302fe771d92ccf945a3.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{cb0a5bc6deaa98026bb5.js → ed0dea88b2865fc6e06b.js} +1 -1
  49. package/assets/esri/core/workers/chunks/ed733eea5d065131b159.js +1 -0
  50. package/assets/esri/core/workers/chunks/{1c51c52fb2233153d7ae.js → f3ec53ee9567bb7e4d2f.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{4922a0fed7cbc6895882.js → f701a5afa1b730c51a49.js} +1 -1
  52. package/assets/esri/t9n/common.json +1 -1
  53. package/assets/esri/t9n/common_ar.json +1 -1
  54. package/assets/esri/t9n/common_bg.json +1 -1
  55. package/assets/esri/t9n/common_ca.json +1 -1
  56. package/assets/esri/t9n/common_cs.json +1 -1
  57. package/assets/esri/t9n/common_da.json +1 -1
  58. package/assets/esri/t9n/common_de.json +1 -1
  59. package/assets/esri/t9n/common_el.json +1 -1
  60. package/assets/esri/t9n/common_en.json +1 -1
  61. package/assets/esri/t9n/common_es.json +1 -1
  62. package/assets/esri/t9n/common_et.json +1 -1
  63. package/assets/esri/t9n/common_fi.json +1 -1
  64. package/assets/esri/t9n/common_fr.json +1 -1
  65. package/assets/esri/t9n/common_he.json +1 -1
  66. package/assets/esri/t9n/common_hr.json +1 -1
  67. package/assets/esri/t9n/common_hu.json +1 -1
  68. package/assets/esri/t9n/common_id.json +1 -1
  69. package/assets/esri/t9n/common_it.json +1 -1
  70. package/assets/esri/t9n/common_ja.json +1 -1
  71. package/assets/esri/t9n/common_ko.json +1 -1
  72. package/assets/esri/t9n/common_lt.json +1 -1
  73. package/assets/esri/t9n/common_lv.json +1 -1
  74. package/assets/esri/t9n/common_nb.json +1 -1
  75. package/assets/esri/t9n/common_nl.json +1 -1
  76. package/assets/esri/t9n/common_pl.json +1 -1
  77. package/assets/esri/t9n/common_pt-BR.json +1 -1
  78. package/assets/esri/t9n/common_pt-PT.json +1 -1
  79. package/assets/esri/t9n/common_ro.json +1 -1
  80. package/assets/esri/t9n/common_ru.json +1 -1
  81. package/assets/esri/t9n/common_sk.json +1 -1
  82. package/assets/esri/t9n/common_sl.json +1 -1
  83. package/assets/esri/t9n/common_sr.json +1 -1
  84. package/assets/esri/t9n/common_sv.json +1 -1
  85. package/assets/esri/t9n/common_th.json +1 -1
  86. package/assets/esri/t9n/common_tr.json +1 -1
  87. package/assets/esri/t9n/common_uk.json +1 -1
  88. package/assets/esri/t9n/common_vi.json +1 -1
  89. package/assets/esri/t9n/common_zh-CN.json +1 -1
  90. package/assets/esri/t9n/common_zh-TW.json +1 -1
  91. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +10 -17
  92. package/assets/esri/themes/dark/main.css +1 -1
  93. package/assets/esri/themes/light/main.css +1 -1
  94. package/assets/esri/themes/light/view.css +1 -1
  95. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ar.json +1 -0
  96. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_bg.json +1 -0
  97. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_bs.json +1 -0
  98. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ca.json +1 -0
  99. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_cs.json +1 -0
  100. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_da.json +1 -0
  101. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_de.json +1 -0
  102. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_el.json +1 -0
  103. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_es.json +1 -0
  104. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_et.json +1 -0
  105. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_fi.json +1 -0
  106. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_fr.json +1 -0
  107. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_he.json +1 -0
  108. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_hr.json +1 -0
  109. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_hu.json +1 -0
  110. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_id.json +1 -0
  111. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_it.json +1 -0
  112. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ja.json +1 -0
  113. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ko.json +1 -0
  114. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_lt.json +1 -0
  115. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_lv.json +1 -0
  116. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_nb.json +1 -0
  117. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_nl.json +1 -0
  118. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_pl.json +1 -0
  119. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_pt-BR.json +1 -0
  120. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_pt-PT.json +1 -0
  121. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ro.json +1 -0
  122. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ru.json +1 -0
  123. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_sk.json +1 -0
  124. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_sl.json +1 -0
  125. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_sr.json +1 -0
  126. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_sv.json +1 -0
  127. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_th.json +1 -0
  128. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_tr.json +1 -0
  129. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_uk.json +1 -0
  130. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_vi.json +1 -0
  131. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_zh-CN.json +1 -0
  132. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_zh-HK.json +1 -0
  133. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_zh-TW.json +1 -0
  134. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  135. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  136. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  137. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  138. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  139. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  140. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  141. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  142. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  143. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  144. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  145. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  146. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  147. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  148. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  149. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  150. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  151. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  152. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  153. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  154. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  155. package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
  156. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  157. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  158. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  159. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  160. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  161. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  162. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  163. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  164. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  165. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  166. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  167. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  168. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  169. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  170. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  171. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  172. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  173. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ar.json +1 -1
  174. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bg.json +1 -1
  175. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bs.json +1 -1
  176. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ca.json +1 -1
  177. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_cs.json +1 -1
  178. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_da.json +1 -1
  179. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_de.json +1 -1
  180. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_el.json +1 -1
  181. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_es.json +1 -1
  182. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_et.json +1 -1
  183. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fi.json +1 -1
  184. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fr.json +1 -1
  185. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_he.json +1 -1
  186. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hr.json +1 -1
  187. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hu.json +1 -1
  188. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_id.json +1 -1
  189. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_it.json +1 -1
  190. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ja.json +1 -1
  191. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ko.json +1 -1
  192. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lt.json +1 -1
  193. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lv.json +1 -1
  194. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nb.json +1 -1
  195. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nl.json +1 -1
  196. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pl.json +1 -1
  197. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-BR.json +1 -1
  198. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-PT.json +1 -1
  199. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ro.json +1 -1
  200. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ru.json +1 -1
  201. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sk.json +1 -1
  202. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sl.json +1 -1
  203. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sr.json +1 -1
  204. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sv.json +1 -1
  205. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_th.json +1 -1
  206. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_tr.json +1 -1
  207. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_uk.json +1 -1
  208. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_vi.json +1 -1
  209. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-CN.json +1 -1
  210. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-HK.json +1 -1
  211. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-TW.json +1 -1
  212. package/chunks/ChapmanAtmosphere.glsl.js +1 -1
  213. package/chunks/Clouds.glsl.js +1 -1
  214. package/chunks/CloudsComposition.glsl.js +2 -2
  215. package/chunks/ComponentShader.glsl.js +36 -36
  216. package/chunks/Fog.glsl.js +1 -1
  217. package/chunks/LaserlinePath.glsl.js +1 -1
  218. package/chunks/Laserlines.glsl.js +1 -1
  219. package/chunks/LineSeries.js +1 -1
  220. package/chunks/NativeLine.glsl.js +8 -20
  221. package/chunks/PointRenderer.glsl.js +1 -1
  222. package/chunks/Precipitation.glsl.js +2 -2
  223. package/chunks/SSAOBlur.glsl.js +1 -1
  224. package/chunks/ShadowCastAccumulate.glsl.js +1 -1
  225. package/chunks/ShadowCastVisualize.glsl.js +2 -2
  226. package/chunks/ShadowHighlight.glsl.js +1 -1
  227. package/chunks/Stars.glsl.js +1 -1
  228. package/chunks/Terrain.glsl.js +35 -35
  229. package/chunks/TextureOnly.glsl.js +1 -1
  230. package/chunks/Theme.js +1 -1
  231. package/chunks/boundedPlane.js +1 -1
  232. package/chunks/cameraUtilsPlanar.js +1 -1
  233. package/chunks/cameraUtilsSpherical.js +1 -1
  234. package/chunks/chartUtilsAm5.js +1 -1
  235. package/chunks/mat3.js +1 -1
  236. package/chunks/mat3f64.js +1 -1
  237. package/chunks/mat4.js +1 -1
  238. package/chunks/mat4f64.js +1 -1
  239. package/chunks/quat.js +1 -1
  240. package/chunks/quat2.js +1 -1
  241. package/chunks/quatf64.js +1 -1
  242. package/chunks/sphere.js +1 -1
  243. package/chunks/terrainUtilsPlanar.js +1 -1
  244. package/chunks/vec3.js +1 -1
  245. package/chunks/vec3f64.js +1 -1
  246. package/chunks/vec4.js +1 -1
  247. package/chunks/vec4f64.js +1 -1
  248. package/core/VectorStack.js +1 -1
  249. package/core/accessorSupport/decorators/persistable.js +1 -1
  250. package/core/accessorSupport/testSupport.js +1 -1
  251. package/core/colorUtils.js +1 -1
  252. package/core/libs/gl-matrix-2/factories/mat3f64.js +1 -1
  253. package/core/libs/gl-matrix-2/factories/mat4f64.js +1 -1
  254. package/core/libs/gl-matrix-2/factories/quatf64.js +1 -1
  255. package/core/libs/gl-matrix-2/factories/vec3f64.js +1 -1
  256. package/core/libs/gl-matrix-2/factories/vec4f64.js +1 -1
  257. package/core/libs/gl-matrix-2/math/mat3.js +1 -1
  258. package/core/libs/gl-matrix-2/math/mat4.js +1 -1
  259. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  260. package/core/libs/gl-matrix-2/math/vec4.js +1 -1
  261. package/core/mathUtils.js +1 -1
  262. package/core/perspectiveUtils.js +1 -1
  263. package/form/elements/inputs/DatePickerInput.d.ts +4 -0
  264. package/form/elements/inputs/DatePickerInput.js +5 -0
  265. package/form/elements/inputs/DateTimeOffsetPickerInput.d.ts +4 -0
  266. package/form/elements/inputs/DateTimeOffsetPickerInput.js +5 -0
  267. package/form/elements/inputs/TimePickerInput.d.ts +4 -0
  268. package/form/elements/inputs/TimePickerInput.js +5 -0
  269. package/form/elements/support/inputs.js +1 -1
  270. package/geometry/projection/computeTranslationToOriginAndRotation.js +1 -1
  271. package/geometry/projection/projectDirection.js +1 -1
  272. package/geometry/support/MeshTransform.js +1 -1
  273. package/geometry/support/axisAngle.js +1 -1
  274. package/geometry/support/axisAngleDegrees.js +1 -1
  275. package/geometry/support/clipRay.js +1 -1
  276. package/geometry/support/coordinateSystem.js +1 -1
  277. package/geometry/support/frustum.js +1 -1
  278. package/geometry/support/lineSegment.js +1 -1
  279. package/geometry/support/meshUtils/centerAt.js +1 -1
  280. package/geometry/support/meshUtils/exporters/gltf/geometry.js +1 -1
  281. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  282. package/geometry/support/meshUtils/exporters/gltf/node.js +1 -1
  283. package/geometry/support/meshUtils/georeference.js +1 -1
  284. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  285. package/geometry/support/meshUtils/merge.js +1 -1
  286. package/geometry/support/meshUtils/offset.js +1 -1
  287. package/geometry/support/meshUtils/primitives.js +1 -1
  288. package/geometry/support/meshUtils/projection.js +1 -1
  289. package/geometry/support/meshUtils/rotate.js +1 -1
  290. package/geometry/support/meshUtils/scale.js +1 -1
  291. package/geometry/support/meshVertexSpaceUtils.js +1 -1
  292. package/geometry/support/plane.js +1 -1
  293. package/geometry/support/ray.js +1 -1
  294. package/geometry/support/triangle.js +1 -1
  295. package/geometry/support/vector.js +1 -1
  296. package/interfaces.d.ts +405 -7
  297. package/layers/VoxelWasmPerSceneView.js +1 -1
  298. package/layers/mixins/SceneService.js +1 -1
  299. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  300. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  301. package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
  302. package/layers/orientedImagery/transformations/utils.js +1 -1
  303. package/layers/support/ControlPointsGeoreference.js +1 -1
  304. package/layers/support/ImageElement.js +1 -1
  305. package/layers/support/SceneFilter.js +1 -1
  306. package/layers/support/layerUtils.js +1 -1
  307. package/layers/video/VideoCameraSensorModel.js +1 -1
  308. package/layers/voxel/VoxelVolume.js +1 -1
  309. package/layers/voxel/voxelPlaneUtils.js +1 -1
  310. package/package.json +1 -1
  311. package/portal/support/resourceExtension.js +1 -1
  312. package/portal/support/resourceUtils.js +1 -1
  313. package/portal/support/utils.js +5 -0
  314. package/smartMapping/popup/support/utils.js +1 -1
  315. package/smartMapping/raster/renderers/classBreaks.js +1 -1
  316. package/smartMapping/raster/support/adapters/ImageryLayerAdapter.js +1 -1
  317. package/smartMapping/raster/support/adapters/ImageryTileLayerAdapter.js +1 -1
  318. package/smartMapping/raster/support/adapters/RasterLayerAdapter.js +1 -1
  319. package/support/revision.js +1 -1
  320. package/symbols/cim/CIMImageColorSubstitutionHelper.js +1 -1
  321. package/symbols/support/previewSymbol3D.js +1 -1
  322. package/views/2d/ViewState.js +1 -1
  323. package/views/2d/engine/flow/FlowDisplayObject.js +1 -1
  324. package/views/2d/engine/imagery/RasterVFTile.js +1 -1
  325. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  326. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  327. package/views/2d/engine/vectorTiles/VectorTileRendererHelper3D.js +1 -1
  328. package/views/2d/engine/webgl/Overlay.js +1 -1
  329. package/views/2d/engine/webgl/OverlayContainer.js +1 -1
  330. package/views/2d/engine/webgl/TiledDisplayObject.js +1 -1
  331. package/views/2d/engine/webgl/WGLTile.js +1 -1
  332. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  333. package/views/2d/engine/webgl/brushes/WGLBrushVTLSymbol.js +1 -1
  334. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  335. package/views/2d/interactive/editingTools/manipulations/RotateManipulation.js +1 -1
  336. package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
  337. package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
  338. package/views/2d/layers/support/DebugOverlay.js +1 -1
  339. package/views/2d/navigation/actions/Pan.js +1 -1
  340. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  341. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  342. package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
  343. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  344. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  345. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  346. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  347. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementController.js +1 -1
  348. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
  349. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  350. package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
  351. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  352. package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
  353. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  354. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  355. package/views/3d/analysis/images/Factory.js +5 -0
  356. package/views/3d/analysis/support/measurementUtils.js +1 -1
  357. package/views/3d/analysis/support/viewUtils.js +1 -1
  358. package/views/3d/animation/pointToPoint/Animation.js +1 -1
  359. package/views/3d/animation/pointToPoint/Camera.js +1 -1
  360. package/views/3d/camera/constraintUtils/altitude.js +1 -1
  361. package/views/3d/camera/constraintUtils/common.js +1 -1
  362. package/views/3d/camera/constraintUtils/distance.js +1 -1
  363. package/views/3d/camera/constraintUtils/surfaceCollision.js +1 -1
  364. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  365. package/views/3d/camera/intersectionUtils.js +1 -1
  366. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  367. package/views/3d/environment/CloudsGenerator.js +1 -1
  368. package/views/3d/environment/CloudsParameters.js +1 -1
  369. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  370. package/views/3d/environment/Fog.js +1 -1
  371. package/views/3d/environment/LocalAtmosphere.js +1 -1
  372. package/views/3d/environment/MarsAtmosphere.js +1 -1
  373. package/views/3d/environment/SceneViewEnvironment.js +1 -1
  374. package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
  375. package/views/3d/environment/Stars.js +1 -1
  376. package/views/3d/environment/StarsTechnique.js +1 -1
  377. package/views/3d/externalRenderers.js +1 -1
  378. package/views/3d/glTF/internal/Resource.js +1 -1
  379. package/views/3d/interactive/Manipulator3D.js +1 -1
  380. package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
  381. package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
  382. package/views/3d/interactive/editingTools/lineGraphicVisualElementUtils.js +1 -1
  383. package/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation.js +1 -1
  384. package/views/3d/interactive/editingTools/manipulations/MoveXYDiscManipulation.js +1 -1
  385. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  386. package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
  387. package/views/3d/interactive/editingTools/reshapeGraphic/edgeOffsetUtils.js +1 -1
  388. package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
  389. package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
  390. package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
  391. package/views/3d/interactive/editingTools/transformGraphic/undoRecords.js +1 -1
  392. package/views/3d/interactive/manipulatorUtils.js +1 -1
  393. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  394. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  395. package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
  396. package/views/3d/interactive/visualElements/LaserlineVisualElement.js +1 -1
  397. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  398. package/views/3d/interactive/visualElements/MarkerVisualElement.js +1 -1
  399. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  400. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  401. package/views/3d/interactive/visualElements/Object3DVisualElement.js +1 -1
  402. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  403. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  404. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  405. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  406. package/views/3d/interactive/visualElements/SlicePlaneVisualElement.js +1 -1
  407. package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
  408. package/views/3d/interactive/visualElements/VisualElementResources.js +1 -1
  409. package/views/3d/interactive/visualElements/support/Segment.js +1 -1
  410. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  411. package/views/3d/layers/I3SMeshView3D.js +1 -1
  412. package/views/3d/layers/MediaLayerView3D.js +1 -1
  413. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  414. package/views/3d/layers/PointCloudWorker.js +1 -1
  415. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  416. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  417. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  418. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  419. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  420. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  421. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  422. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  423. package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
  424. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  425. package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
  426. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  427. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  428. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  429. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  430. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  431. package/views/3d/layers/graphics/LabelParameters.js +1 -1
  432. package/views/3d/layers/graphics/elevationAlignmentUtils.js +1 -1
  433. package/views/3d/layers/graphics/graphicUtils.js +1 -1
  434. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  435. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  436. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  437. package/views/3d/layers/i3s/I3SElevationProvider.js +1 -1
  438. package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
  439. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  440. package/views/3d/layers/i3s/I3SProjectionUtil.js +1 -1
  441. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  442. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  443. package/views/3d/layers/i3s/LoDUtil.js +1 -1
  444. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  445. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  446. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  447. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  448. package/views/3d/layers/support/I3STreeDebugger.js +1 -1
  449. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  450. package/views/3d/layers/support/edgeUtils.js +1 -1
  451. package/views/3d/layers/support/patternUtils.js +1 -1
  452. package/views/3d/layers/support/uvUtils.js +1 -1
  453. package/views/3d/state/Frustum.js +1 -1
  454. package/views/3d/state/NearFarHeuristic.js +1 -1
  455. package/views/3d/state/ViewStateManager.js +1 -1
  456. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  457. package/views/3d/state/controllers/RotateController.js +1 -1
  458. package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
  459. package/views/3d/state/controllers/global/ZoomController.js +1 -1
  460. package/views/3d/state/controllers/global/ZoomStepController.js +1 -1
  461. package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
  462. package/views/3d/state/controllers/local/ZoomController.js +1 -1
  463. package/views/3d/state/controllers/local/ZoomStepController.js +1 -1
  464. package/views/3d/state/controllers/momentum/PanPlanarMomentumController.js +1 -1
  465. package/views/3d/state/controllers/momentum/PanSphericalMomentumController.js +1 -1
  466. package/views/3d/state/controllers/momentum/RotationMomentumController.js +1 -1
  467. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  468. package/views/3d/state/controllers/momentum/ZoomSphericalMomentumController.js +1 -1
  469. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  470. package/views/3d/state/utils/navigationUtils.js +1 -1
  471. package/views/3d/state/utils/viewUtils.js +1 -1
  472. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  473. package/views/3d/support/LaserLineRenderer.js +1 -1
  474. package/views/3d/support/LaserlinePathData.js +1 -1
  475. package/views/3d/support/RenderCoordsHelper.js +1 -1
  476. package/views/3d/support/StreamTextureCollection.js +1 -1
  477. package/views/3d/support/TextureCollection.js +1 -1
  478. package/views/3d/support/cameraUtils.js +1 -1
  479. package/views/3d/support/cameraUtilsInternal.js +1 -1
  480. package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
  481. package/views/3d/support/geometryUtils/ray.js +1 -1
  482. package/views/3d/support/intersectionUtils.js +1 -1
  483. package/views/3d/support/mathUtils.js +1 -1
  484. package/views/3d/support/orientedBoundingBox.js +1 -1
  485. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  486. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  487. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  488. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  489. package/views/3d/support/sunUtils.js +1 -1
  490. package/views/3d/support/viewpointUtils.js +1 -1
  491. package/views/3d/terrain/Overlay.js +1 -1
  492. package/views/3d/terrain/OverlayContent.js +5 -0
  493. package/views/3d/terrain/OverlayManager.js +1 -1
  494. package/views/3d/terrain/OverlayRenderTarget.js +1 -1
  495. package/views/3d/terrain/OverlayRenderer.js +1 -1
  496. package/views/3d/terrain/PatchGeometry.js +1 -1
  497. package/views/3d/terrain/PatchRenderData.js +1 -1
  498. package/views/3d/terrain/SphericalPatch.js +1 -1
  499. package/views/3d/terrain/TerrainRenderer.js +1 -1
  500. package/views/3d/terrain/TerrainSurface.js +1 -1
  501. package/views/3d/terrain/TextureReference.js +1 -1
  502. package/views/3d/terrain/Tile.js +1 -1
  503. package/views/3d/terrain/TileCompositor.js +1 -1
  504. package/views/3d/terrain/TileOverlayData.js +1 -1
  505. package/views/3d/terrain/TileRenderInfo.js +1 -1
  506. package/views/3d/terrain/interfaces.js +1 -1
  507. package/views/3d/terrain/support/MultiSizeFramebuffer.js +1 -1
  508. package/views/3d/webgl-engine/Stage.js +1 -1
  509. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  510. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  511. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  512. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  513. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  514. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +1 -1
  515. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +1 -1
  516. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +1 -1
  517. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +1 -1
  518. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +1 -1
  519. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +32 -53
  520. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +6 -6
  521. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Terrain.glsl.js +1 -1
  522. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +9 -9
  523. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  524. package/views/3d/webgl-engine/core/util/TwoVectorPosition.js +1 -1
  525. package/views/3d/webgl-engine/effects/highlight/HighlightPassParameters.js +1 -1
  526. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  527. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightTechnique.js +1 -1
  528. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  529. package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
  530. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  531. package/views/3d/webgl-engine/lib/CascadeCamera.js +1 -1
  532. package/views/3d/webgl-engine/lib/ContentObject.js +1 -1
  533. package/views/3d/webgl-engine/lib/GLMaterialRepository.js +1 -1
  534. package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
  535. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  536. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  537. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  538. package/views/3d/webgl-engine/lib/ITexture.js +5 -0
  539. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  540. package/views/3d/webgl-engine/lib/IntersectorTarget.js +1 -1
  541. package/views/3d/webgl-engine/lib/LocalOriginManager.js +1 -1
  542. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  543. package/views/3d/webgl-engine/lib/ObjectAndLayerIdRenderHelper.js +1 -1
  544. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  545. package/views/3d/webgl-engine/lib/Path.js +1 -1
  546. package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
  547. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  548. package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
  549. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  550. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  551. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  552. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  553. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  554. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  555. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  556. package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
  557. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  558. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  559. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderParameters.js +1 -1
  560. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  561. package/views/3d/webgl-engine/lib/edgeRendering/edgeBufferWriters.js +1 -1
  562. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  563. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  564. package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
  565. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  566. package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
  567. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  568. package/views/3d/webgl-engine/lib/octreeUtils.js +1 -1
  569. package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
  570. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  571. package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
  572. package/views/3d/webgl-engine/lighting/SphericalHarmonics.js +1 -1
  573. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  574. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  575. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  576. package/views/3d/webgl-engine/materials/LineDrawParameters.js +1 -1
  577. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  578. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  579. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  580. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  581. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  582. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  583. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  584. package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
  585. package/views/3d/webgl-engine/materials/pbrUtils.js +1 -1
  586. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  587. package/views/3d/webgl-engine/parts/Model.js +1 -1
  588. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  589. package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
  590. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  591. package/views/3d/webgl-engine/shaders/NativeLineTechniqueConfiguration.js +1 -1
  592. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  593. package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
  594. package/views/GroundView.js +1 -1
  595. package/views/SceneView.js +1 -1
  596. package/views/draw/DrawManipulator.js +1 -1
  597. package/views/draw/support/createUtils.js +1 -1
  598. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  599. package/views/interactive/GraphicManipulator.js +1 -1
  600. package/views/interactive/ManipulatorCollection.js +1 -1
  601. package/views/interactive/ToolViewManagerManipulatorState.js +1 -1
  602. package/views/interactive/coordinateHelper.js +1 -1
  603. package/views/interactive/dragEventPipeline.js +1 -1
  604. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  605. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  606. package/views/interactive/sketch/constraints.js +1 -1
  607. package/views/interactive/sketch/normalizedPoint.js +1 -1
  608. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  609. package/views/interactive/snapping/RightAngleSnapper.js +1 -1
  610. package/views/interactive/snapping/candidates/ParallelLineSnappingCandidate.js +1 -1
  611. package/views/interactive/snapping/candidates/RightAngleTriangleSnappingCandidate.js +1 -1
  612. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  613. package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
  614. package/views/interactive/snapping/hints/IntersectionSnappingHint.js +1 -1
  615. package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
  616. package/views/interactive/snapping/hints/ParallelSnappingHint.js +1 -1
  617. package/views/interactive/snapping/hints/PointSnappingHint.js +1 -1
  618. package/views/interactive/snapping/hints/RightAngleSnappingHint.js +1 -1
  619. package/views/interactive/support/viewUtils.js +1 -1
  620. package/views/interactive/tooltip/constraintUtils.js +1 -1
  621. package/views/navigation/PanPlanarMomentumEstimator.js +1 -1
  622. package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
  623. package/views/navigation/gamepadAndKeyboardUtils.js +1 -1
  624. package/views/support/euclideanAreaMeasurementUtils.js +1 -1
  625. package/views/support/euclideanLengthMeasurementUtils.js +1 -1
  626. package/views/support/geometry3dUtils.js +1 -1
  627. package/views/support/layerViewUtils.js +1 -1
  628. package/webdoc/support/saveUtils.js +1 -1
  629. package/webscene/Slide.js +1 -1
  630. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  631. package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
  632. package/widgets/Editor/EditorViewModel.js +1 -1
  633. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  634. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  635. package/widgets/Editor/UpdateWorkflow.js +1 -1
  636. package/widgets/Editor/workflowUtils.js +1 -1
  637. package/widgets/Editor.js +1 -1
  638. package/widgets/ElevationProfile/support/ProfileLines3D.js +1 -1
  639. package/widgets/ElevationProfile/support/constants.js +1 -1
  640. package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
  641. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  642. package/widgets/OrientedImageryViewer.js +1 -1
  643. package/widgets/Sketch.js +1 -1
  644. package/widgets/smartMapping/BinaryColorSizeSlider/BinaryColorSizeSliderViewModel.d.ts +4 -0
  645. package/widgets/smartMapping/BinaryColorSizeSlider.d.ts +4 -0
  646. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  647. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  648. package/widgets/support/templateUtils.js +5 -0
  649. package/assets/esri/core/workers/chunks/19857e5420cdf23c5f2e.js +0 -1
  650. package/assets/esri/core/workers/chunks/26289742b9280f0b5247.js +0 -1
  651. package/assets/esri/core/workers/chunks/46f6b77e586d78aeb75c.js +0 -1
  652. package/assets/esri/core/workers/chunks/4e39252f40bc57be9d12.js +0 -1
  653. package/assets/esri/core/workers/chunks/54513578f735d274a20e.js +0 -1
  654. package/assets/esri/core/workers/chunks/8dab0acdbbd5c282645a.js +0 -1
  655. package/assets/esri/core/workers/chunks/8e4b01a0cb8c8926f2b6.js +0 -1
  656. package/assets/esri/core/workers/chunks/a3a1d4f32e518e97d071.js +0 -1
  657. package/assets/esri/core/workers/chunks/b2d4a56197dcabdbae35.js +0 -1
  658. package/assets/esri/core/workers/chunks/be0565d923afba7ca300.js +0 -1
  659. package/assets/esri/core/workers/chunks/c99fa4189a114370b004.js +0 -1
  660. package/assets/esri/core/workers/chunks/daa79c14150c12d8bc3d.js +0 -1
  661. package/assets/esri/core/workers/chunks/ebd006fcd568a7731115.js +0 -1
  662. package/assets/esri/core/workers/chunks/f67388c4b7103fda6633.js +0 -1
  663. package/views/3d/analysis/Slice/images/Factory.js +0 -5
  664. /package/assets/esri/views/3d/analysis/{Slice/images → images}/heading-rotate.ts.svg +0 -0
  665. /package/assets/esri/views/3d/analysis/{Slice/images → images}/tilt-rotate.ts.svg +0 -0
  666. /package/views/3d/analysis/{Slice/images → images}/generateTextures.js +0 -0
  667. /package/views/3d/analysis/{Slice/images → images}/heading-rotate-svg.js +0 -0
  668. /package/views/3d/analysis/{Slice/images → images}/tilt-rotate-svg.js +0 -0
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{acosClamped as t}from"../../../core/mathUtils.js";import{s as n,d as s,n as r,c as a,l as o,b as c,e as u,f as i,g as h}from"../../../chunks/vec3.js";import{c as f}from"../../../chunks/vec3f64.js";function e(t,n){return t>n?Math.cos(n):Math.cos(t)}function M(t,n,s){return 2*Math.atan(s*Math.tan(.5*t)/n)}function m(t,n,s){return 2*Math.atan(n*Math.tan(.5*t)/s)}function l(t){const n=t[0]*t[0]+t[4]*t[4]+t[8]*t[8],s=t[1]*t[1]+t[5]*t[5]+t[9]*t[9],r=t[2]*t[2]+t[6]*t[6]+t[10]*t[10];return Math.sqrt(Math.max(n,s,r))}function p(t,s){const r=Math.sqrt(s[0]*s[0]+s[4]*s[4]+s[8]*s[8]),a=Math.sqrt(s[1]*s[1]+s[5]*s[5]+s[9]*s[9]),o=Math.sqrt(s[2]*s[2]+s[6]*s[6]+s[10]*s[10]);return n(t,r,a,o),t}function q(t,a,o){o=o||t;const c=s(t,a);n(o,t[0]-c*a[0],t[1]-c*a[1],t[2]-c*a[2]),r(o,o)}function b(t,s,o){Math.abs(t[0])>Math.abs(t[1])?n(s,0,1,0):n(s,1,0,0),a(o,t,s),r(s,s),a(s,o,t),r(o,o)}function j(t,n){return(t%n+n)%n}function g(t,n,s,r,a,o){const c=t+(n-t)*a;return c+(s+(r-s)*a-c)*o}function k(t,n,r,a=f()){const h=o(t),e=o(n),M=s(t,n)/(h*e);if(M<.9999999999999999){const s=Math.acos(M),o=((1-r)*h+r*e)/Math.sin(s),i=o/h*Math.sin((1-r)*s),f=o/e*Math.sin(r*s);return c(A,t,i),c(B,n,f),u(a,A,B)}return i(a,t,n,r)}function v(t,n,a,e=f(),M=f()){const m=o(t),l=o(n),p=s(t,n)/(m*l);if(p<.9999999999999999){const s=Math.acos(p),r=Math.sin(s),o=Math.sin(a*s),i=Math.sin((1-a)*s),h=(1-a)*m+a*l;{const s=h/r,a=s/l*o;c(A,t,s/m*i),c(B,n,a),u(e,A,B)}{const f=1/m*(-Math.cos((1-a)*s)*s*h+i*(-m+l));c(A,t,f);const e=1/l*(Math.cos(a*s)*s*h+o*(-m+l));c(B,n,e),u(M,A,B),c(M,M,1/r)}return M}return i(e,t,n,a),h(M,n,t),r(M,M),M}function x(n,o,c){n=r(A,n),o=r(B,o);const u=t(s(n,o));if(c){const t=a(z,n,o);if(s(t,c)<0)return-u}return u}function d(t){const n=t.length;return s=>{if(s<=t[0][0])return t[0][1];if(s>=t[n-1][0])return t[n-1][1];let r=1;for(;s>t[r][0];)r++;const a=t[r-1][0],o=t[r][0],c=(o-s)/(o-a);return c*t[r-1][1]+(1-c)*t[r][1]}}function U(t,n,o,c){h(w,n,t),h(y,o,t),a(c,w,y),r(c,c),c[3]=-s(t,c)}const w=f(),y=f(),z=f(),A=f(),B=f();export{x as angle,g as bilerp,e as cosCapped,M as fovx2fovy,m as fovy2fovx,q as makeOrthonormal,d as makePiecewiseLinearFunction,l as maxScale,j as moduloPositive,U as planeFromPoints,p as scaleFromMatrix,k as slerp,v as slerpTangent,b as tangentFrame};
5
+ import{acosClamped as t}from"../../../core/mathUtils.js";import{s as n,j as s,n as a,b as r,l as o,i as c,g as u,p as i,f as h}from"../../../chunks/vec3.js";import{c as f}from"../../../chunks/vec3f64.js";function M(t,n){return t>n?Math.cos(n):Math.cos(t)}function e(t,n,s){return 2*Math.atan(s*Math.tan(.5*t)/n)}function m(t,n,s){return 2*Math.atan(n*Math.tan(.5*t)/s)}function p(t){const n=t[0]*t[0]+t[4]*t[4]+t[8]*t[8],s=t[1]*t[1]+t[5]*t[5]+t[9]*t[9],a=t[2]*t[2]+t[6]*t[6]+t[10]*t[10];return Math.sqrt(Math.max(n,s,a))}function j(t,s){const a=Math.sqrt(s[0]*s[0]+s[4]*s[4]+s[8]*s[8]),r=Math.sqrt(s[1]*s[1]+s[5]*s[5]+s[9]*s[9]),o=Math.sqrt(s[2]*s[2]+s[6]*s[6]+s[10]*s[10]);return n(t,a,r,o),t}function l(t,r,o){o=o||t;const c=s(t,r);n(o,t[0]-c*r[0],t[1]-c*r[1],t[2]-c*r[2]),a(o,o)}function q(t,s,o){Math.abs(t[0])>Math.abs(t[1])?n(s,0,1,0):n(s,1,0,0),r(o,t,s),a(s,s),r(s,o,t),a(o,o)}function b(t,n,s,a,r,o){const c=t+(n-t)*r;return c+(s+(a-s)*r-c)*o}function g(t,n,a,r=f()){const h=o(t),M=o(n),e=s(t,n)/(h*M);if(e<.9999999999999999){const s=Math.acos(e),o=((1-a)*h+a*M)/Math.sin(s),i=o/h*Math.sin((1-a)*s),f=o/M*Math.sin(a*s);return c(z,t,i),c(A,n,f),u(r,z,A)}return i(r,t,n,a)}function k(t,n,r,M=f(),e=f()){const m=o(t),p=o(n),j=s(t,n)/(m*p);if(j<.9999999999999999){const s=Math.acos(j),a=Math.sin(s),o=Math.sin(r*s),i=Math.sin((1-r)*s),h=(1-r)*m+r*p;{const s=h/a,r=s/p*o;c(z,t,s/m*i),c(A,n,r),u(M,z,A)}{const f=1/m*(-Math.cos((1-r)*s)*s*h+i*(-m+p));c(z,t,f);const M=1/p*(Math.cos(r*s)*s*h+o*(-m+p));c(A,n,M),u(e,z,A),c(e,e,1/a)}return e}return i(M,t,n,r),h(e,n,t),a(e,e),e}function v(n,o,c){n=a(z,n),o=a(A,o);const u=t(s(n,o));if(c){const t=r(y,n,o);if(s(t,c)<0)return-u}return u}function x(t){const n=t.length;return s=>{if(s<=t[0][0])return t[0][1];if(s>=t[n-1][0])return t[n-1][1];let a=1;for(;s>t[a][0];)a++;const r=t[a-1][0],o=t[a][0],c=(o-s)/(o-r);return c*t[a-1][1]+(1-c)*t[a][1]}}function U(t,n,o,c){h(d,n,t),h(w,o,t),r(c,d,w),a(c,c),c[3]=-s(t,c)}const d=f(),w=f(),y=f(),z=f(),A=f();export{v as angle,b as bilerp,M as cosCapped,e as fovx2fovy,m as fovy2fovx,l as makeOrthonormal,x as makePiecewiseLinearFunction,p as maxScale,U as planeFromPoints,j as scaleFromMatrix,g as slerp,k as slerpTangent,q as tangentFrame};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{a as e,s as t}from"../../../chunks/mat3.js";import{c as n}from"../../../chunks/mat3f64.js";import{c as a,a as r}from"../../../chunks/quat.js";import{a as i,b as s}from"../../../chunks/quatf64.js";import{i as o,y as f,u as c,v as h,z as u,g as l,A as z,s as S,t as m,e as M,B as b,l as q,b as p,q as j,r as k,C as g}from"../../../chunks/vec3.js";import{a as v,c as x}from"../../../chunks/vec3f64.js";import{t as y}from"../../../chunks/vec4.js";import{c as d}from"../../../chunks/vec4f64.js";import{create as B}from"../../../geometry/support/aaBoundingBox.js";import{signedDistance as w,normal as A}from"../../../geometry/support/plane.js";import{ViewingMode as C}from"../../ViewingMode.js";import{computeOBB as G}from"./dito.js";const I=s(),V=x(),D=x(),E=d(),F=n();function H(e=[0,0,0],t=[-1,-1,-1],n=s()){return{center:v(e),halfSize:v(t),quaternion:i(n)}}function J(e){return H(e.center,e.halfSize,e.quaternion)}function K(e,t){o(t.center,e.center),o(t.halfSize,e.halfSize),a(t.quaternion,e.quaternion)}function L(e,t){return t=t||H(),G(e,t),t}function N(e,t){const n=w(t,e.center),a=Z(e,A(t));return n>a?1:n<-a?-1:0}function O(e,t){return V[0]=e.center[0]-t[0],V[1]=e.center[1]-t[1],V[2]=e.center[2]-t[2],r(I,e.quaternion),f(V,V,I),c(V,V),h(D,V,e.halfSize),u(D,V)<t[3]*t[3]}function P(t,n){n||(n=B());const a=e(F,t.quaternion),r=t.halfSize[0]*Math.abs(a[0])+t.halfSize[1]*Math.abs(a[3])+t.halfSize[2]*Math.abs(a[6]),i=t.halfSize[0]*Math.abs(a[1])+t.halfSize[1]*Math.abs(a[4])+t.halfSize[2]*Math.abs(a[7]),s=t.halfSize[0]*Math.abs(a[2])+t.halfSize[1]*Math.abs(a[5])+t.halfSize[2]*Math.abs(a[8]);return n[0]=t.center[0]-r,n[1]=t.center[1]-i,n[2]=t.center[2]-s,n[3]=t.center[0]+r,n[4]=t.center[1]+i,n[5]=t.center[2]+s,n}function Q(e,t){return w(t,e.center)-Z(e,A(t))}function R(e,t){return w(t,e.center)+Z(e,A(t))}function T(e,t){return N(e,t[0])<=0&&N(e,t[1])<=0&&N(e,t[2])<=0&&N(e,t[3])<=0&&N(e,t[4])<=0&&N(e,t[5])<=0}function U(e,t,n,a=0){r(I,e.quaternion),l(V,t,e.center);const i=f(V,V,I),s=f(D,n,I);let o=-1/0,c=1/0;for(let r=0;r<3;r++)if(Math.abs(s[r])>1e-6){const t=(a+e.halfSize[r]-i[r])/s[r],n=(-a-e.halfSize[r]-i[r])/s[r];o=Math.max(o,Math.min(t,n)),c=Math.min(c,Math.max(t,n))}else if(i[r]>e.halfSize[r]+a||i[r]<-e.halfSize[r]-a)return!1;return o<=c}function W(n,a,i,s,o){r(I,n.quaternion),z(V,a,n.center),f(V,V,I);const c=V[0]<-n.halfSize[0]?-1:V[0]>n.halfSize[0]?1:0,h=V[1]<-n.halfSize[1]?-1:V[1]>n.halfSize[1]?1:0,u=V[2]<-n.halfSize[2]?-1:V[2]>n.halfSize[2]?1:0,l=Math.abs(c)+Math.abs(h)+Math.abs(u);if(0===l)return 1/0;const b=1===l?4:6,q=6*(c+3*h+9*u+13);e(F,n.quaternion),t(F,F,n.halfSize);for(let e=0;e<b;e++){const t=Y[q+e];S(V,((1&t)<<1)-1,(2&t)-1,((4&t)>>1)-1),m(V,V,F),M(E,n.center,V),E[3]=1,y(E,E,i);const a=1/Math.max(1e-6,E[3]);X[2*e]=E[0]*a,X[2*e+1]=E[1]*a}const p=2*b-2;let j=X[0]*(X[3]-X[p+1])+X[p]*(X[1]-X[p-1]);for(let e=2;e<p;e+=2)j+=X[e]*(X[e+3]-X[e-1]);return Math.abs(j)*s*o*.125}const X=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.2],Y=(()=>{const e=new Int8Array(162);let t=0;const n=n=>{for(let a=0;a<n.length;a++)e[t+a]=n[a];t+=6};return n([6,2,3,1,5,4]),n([0,2,3,1,5,4]),n([0,2,3,7,5,4]),n([0,1,3,2,6,4]),n([0,1,3,2,0,0]),n([0,1,5,7,3,2]),n([0,1,3,7,6,4]),n([0,1,3,7,6,2]),n([0,1,5,7,6,2]),n([0,1,5,4,6,2]),n([0,1,5,4,0,0]),n([0,1,3,7,5,4]),n([0,2,6,4,0,0]),n([0,0,0,0,0,0]),n([1,3,7,5,0,0]),n([2,3,7,6,4,0]),n([2,3,7,6,0,0]),n([2,3,1,5,7,6]),n([0,1,5,7,6,2]),n([0,1,5,7,6,4]),n([0,1,3,7,6,4]),n([4,5,7,6,2,0]),n([4,5,7,6,0,0]),n([4,5,1,3,7,6]),n([0,2,3,7,5,4]),n([6,2,3,7,5,4]),n([6,2,3,1,5,4]),e})();function Z(e,t){r(I,e.quaternion),f(V,t,I);const n=e.halfSize;return Math.abs(V[0]*n[0])+Math.abs(V[1]*n[1])+Math.abs(V[2]*n[2])}function $(e,t){for(let n=0;n<8;++n){const a=t[n];a[0]=1&n?-e.halfSize[0]:e.halfSize[0],a[1]=2&n?-e.halfSize[1]:e.halfSize[1],a[2]=4&n?-e.halfSize[2]:e.halfSize[2],f(a,a,e.quaternion),M(a,a,e.center)}}function _(e){return b(e.halfSize)}function ee(e,t,n,i,s){if(a(s.quaternion,e.quaternion),i===C.Global){r(re,e.quaternion),f(te,e.center,re),c(ne,te),h(ae,ne,e.halfSize),z(ae,ne,ae);const a=q(ae);M(ae,ne,e.halfSize);const i=q(ae);if(a<n)o(s.center,e.center),S(te,n,n,n),M(s.halfSize,e.halfSize,te);else{const r=i>0?1+t/i:1,o=a>0?1+n/a:1,c=(o+r)/2,h=(o-r)/2;p(s.halfSize,ne,h),j(s.halfSize,s.halfSize,e.halfSize,c),p(s.center,ne,c),j(s.center,s.center,e.halfSize,h),k(te,te),g(s.center,s.center,te),f(s.center,s.center,s.quaternion)}}else{const a=S(te,0,0,1);j(s.center,e.center,a,(n+t)/2),r(re,e.quaternion),f(a,a,re),c(a,a),j(s.halfSize,e.halfSize,a,(n-t)/2)}return s}const te=x(),ne=x(),ae=x(),re=s();export{J as clone,L as compute,ee as computeOffsetObb,$ as corners,H as create,U as intersectLine,N as intersectPlane,O as intersectSphere,T as isVisible,R as maximumDistancePlane,Q as minimumDistancePlane,W as projectedArea,Z as projectedRadius,_ as radius,K as set,P as toAaBoundingBox};
5
+ import{b as e,c as t}from"../../../chunks/mat3.js";import{a as n}from"../../../chunks/mat3f64.js";import{c as a,a as r}from"../../../chunks/quat.js";import{b as i,a as o}from"../../../chunks/quatf64.js";import{c as s,u as f,v as c,w as h,x as u,f as l,r as z,s as S,t as m,g as M,k as b,l as p,i as q,y as j,z as k,A as g}from"../../../chunks/vec3.js";import{g as x,c as v}from"../../../chunks/vec3f64.js";import{t as y}from"../../../chunks/vec4.js";import{c as d}from"../../../chunks/vec4f64.js";import{create as w}from"../../../geometry/support/aaBoundingBox.js";import{signedDistance as A,normal as B}from"../../../geometry/support/plane.js";import{ViewingMode as G}from"../../ViewingMode.js";import{computeOBB as I}from"./dito.js";const V=o(),C=v(),D=v(),E=d(),F=n();function H(e=[0,0,0],t=[-1,-1,-1],n=o()){return{center:x(e),halfSize:x(t),quaternion:i(n)}}function J(e){return H(e.center,e.halfSize,e.quaternion)}function K(e,t){s(t.center,e.center),s(t.halfSize,e.halfSize),a(t.quaternion,e.quaternion)}function L(e,t){return t=t||H(),I(e,t),t}function N(e,t){const n=A(t,e.center),a=Z(e,B(t));return n>a?1:n<-a?-1:0}function O(e,t){return C[0]=e.center[0]-t[0],C[1]=e.center[1]-t[1],C[2]=e.center[2]-t[2],r(V,e.quaternion),f(C,C,V),c(C,C),h(D,C,e.halfSize),u(D,C)<t[3]*t[3]}function P(t,n){n||(n=w());const a=e(F,t.quaternion),r=t.halfSize[0]*Math.abs(a[0])+t.halfSize[1]*Math.abs(a[3])+t.halfSize[2]*Math.abs(a[6]),i=t.halfSize[0]*Math.abs(a[1])+t.halfSize[1]*Math.abs(a[4])+t.halfSize[2]*Math.abs(a[7]),o=t.halfSize[0]*Math.abs(a[2])+t.halfSize[1]*Math.abs(a[5])+t.halfSize[2]*Math.abs(a[8]);return n[0]=t.center[0]-r,n[1]=t.center[1]-i,n[2]=t.center[2]-o,n[3]=t.center[0]+r,n[4]=t.center[1]+i,n[5]=t.center[2]+o,n}function Q(e,t){return A(t,e.center)-Z(e,B(t))}function R(e,t){return A(t,e.center)+Z(e,B(t))}function T(e,t){return N(e,t[0])<=0&&N(e,t[1])<=0&&N(e,t[2])<=0&&N(e,t[3])<=0&&N(e,t[4])<=0&&N(e,t[5])<=0}function U(e,t,n,a=0){r(V,e.quaternion),l(C,t,e.center);const i=f(C,C,V),o=f(D,n,V);let s=-1/0,c=1/0;for(let r=0;r<3;r++)if(Math.abs(o[r])>1e-6){const t=(a+e.halfSize[r]-i[r])/o[r],n=(-a-e.halfSize[r]-i[r])/o[r];s=Math.max(s,Math.min(t,n)),c=Math.min(c,Math.max(t,n))}else if(i[r]>e.halfSize[r]+a||i[r]<-e.halfSize[r]-a)return!1;return s<=c}function W(n,a,i,o,s){r(V,n.quaternion),z(C,a,n.center),f(C,C,V);const c=C[0]<-n.halfSize[0]?-1:C[0]>n.halfSize[0]?1:0,h=C[1]<-n.halfSize[1]?-1:C[1]>n.halfSize[1]?1:0,u=C[2]<-n.halfSize[2]?-1:C[2]>n.halfSize[2]?1:0,l=Math.abs(c)+Math.abs(h)+Math.abs(u);if(0===l)return 1/0;const b=1===l?4:6,p=6*(c+3*h+9*u+13);e(F,n.quaternion),t(F,F,n.halfSize);for(let e=0;e<b;e++){const t=Y[p+e];S(C,((1&t)<<1)-1,(2&t)-1,((4&t)>>1)-1),m(C,C,F),M(E,n.center,C),E[3]=1,y(E,E,i);const a=1/Math.max(1e-6,E[3]);X[2*e]=E[0]*a,X[2*e+1]=E[1]*a}const q=2*b-2;let j=X[0]*(X[3]-X[q+1])+X[q]*(X[1]-X[q-1]);for(let e=2;e<q;e+=2)j+=X[e]*(X[e+3]-X[e-1]);return Math.abs(j)*o*s*.125}const X=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.2],Y=(()=>{const e=new Int8Array(162);let t=0;const n=n=>{for(let a=0;a<n.length;a++)e[t+a]=n[a];t+=6};return n([6,2,3,1,5,4]),n([0,2,3,1,5,4]),n([0,2,3,7,5,4]),n([0,1,3,2,6,4]),n([0,1,3,2,0,0]),n([0,1,5,7,3,2]),n([0,1,3,7,6,4]),n([0,1,3,7,6,2]),n([0,1,5,7,6,2]),n([0,1,5,4,6,2]),n([0,1,5,4,0,0]),n([0,1,3,7,5,4]),n([0,2,6,4,0,0]),n([0,0,0,0,0,0]),n([1,3,7,5,0,0]),n([2,3,7,6,4,0]),n([2,3,7,6,0,0]),n([2,3,1,5,7,6]),n([0,1,5,7,6,2]),n([0,1,5,7,6,4]),n([0,1,3,7,6,4]),n([4,5,7,6,2,0]),n([4,5,7,6,0,0]),n([4,5,1,3,7,6]),n([0,2,3,7,5,4]),n([6,2,3,7,5,4]),n([6,2,3,1,5,4]),e})();function Z(e,t){r(V,e.quaternion),f(C,t,V);const n=e.halfSize;return Math.abs(C[0]*n[0])+Math.abs(C[1]*n[1])+Math.abs(C[2]*n[2])}function $(e,t){for(let n=0;n<8;++n){const a=t[n];a[0]=1&n?-e.halfSize[0]:e.halfSize[0],a[1]=2&n?-e.halfSize[1]:e.halfSize[1],a[2]=4&n?-e.halfSize[2]:e.halfSize[2],f(a,a,e.quaternion),M(a,a,e.center)}}function _(e){return b(e.halfSize)}function ee(e,t,n,i,o){if(a(o.quaternion,e.quaternion),i===G.Global){r(re,e.quaternion),f(te,e.center,re),c(ne,te),h(ae,ne,e.halfSize),z(ae,ne,ae);const a=p(ae);M(ae,ne,e.halfSize);const i=p(ae);if(a<n)s(o.center,e.center),S(te,n,n,n),M(o.halfSize,e.halfSize,te);else{const r=i>0?1+t/i:1,s=a>0?1+n/a:1,c=(s+r)/2,h=(s-r)/2;q(o.halfSize,ne,h),j(o.halfSize,o.halfSize,e.halfSize,c),q(o.center,ne,c),j(o.center,o.center,e.halfSize,h),k(te,te),g(o.center,o.center,te),f(o.center,o.center,o.quaternion)}}else{const a=S(te,0,0,1);j(o.center,e.center,a,(n+t)/2),r(re,e.quaternion),f(a,a,re),c(a,a),j(o.halfSize,e.halfSize,a,(n-t)/2)}return o}const te=v(),ne=v(),ae=v(),re=o();export{J as clone,L as compute,ee as computeOffsetObb,$ as corners,H as create,U as intersectLine,N as intersectPlane,O as intersectSphere,T as isVisible,R as maximumDistancePlane,Q as minimumDistancePlane,W as projectedArea,Z as projectedRadius,_ as radius,K as set,P as toAaBoundingBox};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../chunks/tslib.es6.js";import{destroyMaybe as e}from"../../../../core/maybe.js";import{isAbortError as r}from"../../../../core/promiseUtils.js";import{on as o}from"../../../../core/reactiveUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{h as n,k as a,i as d}from"../../../../chunks/vec3.js";import{c as l}from"../../../../chunks/vec3f64.js";import c from"../../../../geometry/Point.js";import{ViewingMode as p}from"../../../ViewingMode.js";import{distanceToScale as h}from"../cameraUtils.js";import{PropertiesPool as u}from"../PropertiesPool.js";import{PointOfInterest as m}from"./PointOfInterest.js";import{Task as y}from"../../../support/Scheduler.js";const _=Array;let g=class extends m{constructor(t){super(t),this._dirty=!1,this._propertiesPool=new u({location:c,renderLocation:_},this),this._estimatedSurfaceAltitude=0,this._pendingElevationQueryController=null,this.renderLocation=l(),this._tmpPoint=new c}initialize(){if(this.scheduler&&this.addHandles(this.scheduler.registerTask(this.task,this)),this.runTask(),this.map){const t=()=>this._setDirty();this.addHandles(o((()=>this.map?.ground?.layers),"change",t,{onListenerAdd:t,onListenerRemove:t}))}this._updateRenderLocation()}destroy(){this._cancelPendingRequest(),this._propertiesPool=e(this._propertiesPool)}get _camera(){return this.state.contentCamera}get location(){const t=this._propertiesPool.get("location");return this.renderCoordsHelper.fromRenderCoords(this.renderLocation,t,this.state.spatialReference),t}get scale(){const t=this._camera,e=n(t.eye,this.renderLocation),r={renderCoordsHelper:this.renderCoordsHelper,state:{camera:t}};return h(r,e,0)}get updating(){return this._dirty||null!=this._pendingElevationQueryController}updateRenderLocation(){this._setDirty(),this._updateRenderLocation()}_setDirty(){this._dirty||(this._dirty=!0,this.notifyChange("updating"))}_cancelPendingRequest(){const t=this._pendingElevationQueryController;t&&(this._pendingElevationQueryController=null,t.abort(),this.notifyChange("updating"))}get running(){return!this._pendingElevationQueryController&&this._dirty}runTask(){if(this._cancelPendingRequest(),this._dirty=!1,this.notifyChange("updating"),!this.map||!this.map.ground)return this._updateSurfaceAltitude(0),y.YIELD;const t=this.state.spatialReference;this.renderCoordsHelper.fromRenderCoords(this._camera.eye,this._tmpPoint,t);const e=(this._tmpPoint.z??0)>C&&this.renderCoordsHelper.viewingMode===p.Global&&(t.isWGS84||t.isWebMercator);let o=new AbortController;return this.map.ground.queryElevation(this._tmpPoint,{signal:o.signal,cache:this.cache,minDemResolution:e?v:0}).then((t=>this._updateSurfaceAltitude(t.geometry.z??0))).catch((t=>{r(t)||this._updateSurfaceAltitude(0)})).catch((()=>{})).then((()=>{this._pendingElevationQueryController===o&&(this._pendingElevationQueryController=null,this.notifyChange("updating")),o=null})),this._pendingElevationQueryController=o,y.YIELD}_updateSurfaceAltitude(t){this._estimatedSurfaceAltitude!==t&&(this._estimatedSurfaceAltitude=t,this._updateRenderLocation())}_updateRenderLocation(){this.renderCoordsHelper.setAltitude(f,this._estimatedSurfaceAltitude,this._camera.eye),a(this._get("renderLocation"),f)||(this._set("renderLocation",d(this._propertiesPool.get("renderLocation"),f)),this.notifyChange("renderLocation"))}};t([i({constructOnly:!0})],g.prototype,"scheduler",void 0),t([i({constructOnly:!0})],g.prototype,"cache",void 0),t([i({constructOnly:!0})],g.prototype,"task",void 0),t([i({readOnly:!0})],g.prototype,"location",null),t([i({constructOnly:!0})],g.prototype,"map",void 0),t([i({readOnly:!0})],g.prototype,"renderLocation",void 0),t([i({readOnly:!0})],g.prototype,"scale",null),t([i({readOnly:!0})],g.prototype,"updating",null),g=t([s("esri.views.3d.support.CameraOnSurface")],g);const f=l(),C=1e5,v=1e6;export{g as CameraOnSurface};
5
+ import{_ as t}from"../../../../chunks/tslib.es6.js";import{destroyMaybe as e}from"../../../../core/maybe.js";import{isAbortError as r}from"../../../../core/promiseUtils.js";import{on as o}from"../../../../core/reactiveUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{m as n,h as a,c as d}from"../../../../chunks/vec3.js";import{c as l}from"../../../../chunks/vec3f64.js";import c from"../../../../geometry/Point.js";import{ViewingMode as p}from"../../../ViewingMode.js";import{distanceToScale as h}from"../cameraUtils.js";import{PropertiesPool as u}from"../PropertiesPool.js";import{PointOfInterest as m}from"./PointOfInterest.js";import{Task as y}from"../../../support/Scheduler.js";const _=Array;let g=class extends m{constructor(t){super(t),this._dirty=!1,this._propertiesPool=new u({location:c,renderLocation:_},this),this._estimatedSurfaceAltitude=0,this._pendingElevationQueryController=null,this.renderLocation=l(),this._tmpPoint=new c}initialize(){if(this.scheduler&&this.addHandles(this.scheduler.registerTask(this.task,this)),this.runTask(),this.map){const t=()=>this._setDirty();this.addHandles(o((()=>this.map?.ground?.layers),"change",t,{onListenerAdd:t,onListenerRemove:t}))}this._updateRenderLocation()}destroy(){this._cancelPendingRequest(),this._propertiesPool=e(this._propertiesPool)}get _camera(){return this.state.contentCamera}get location(){const t=this._propertiesPool.get("location");return this.renderCoordsHelper.fromRenderCoords(this.renderLocation,t,this.state.spatialReference),t}get scale(){const t=this._camera,e=n(t.eye,this.renderLocation),r={renderCoordsHelper:this.renderCoordsHelper,state:{camera:t}};return h(r,e,0)}get updating(){return this._dirty||null!=this._pendingElevationQueryController}updateRenderLocation(){this._setDirty(),this._updateRenderLocation()}_setDirty(){this._dirty||(this._dirty=!0,this.notifyChange("updating"))}_cancelPendingRequest(){const t=this._pendingElevationQueryController;t&&(this._pendingElevationQueryController=null,t.abort(),this.notifyChange("updating"))}get running(){return!this._pendingElevationQueryController&&this._dirty}runTask(){if(this._cancelPendingRequest(),this._dirty=!1,this.notifyChange("updating"),!this.map||!this.map.ground)return this._updateSurfaceAltitude(0),y.YIELD;const t=this.state.spatialReference;this.renderCoordsHelper.fromRenderCoords(this._camera.eye,this._tmpPoint,t);const e=(this._tmpPoint.z??0)>C&&this.renderCoordsHelper.viewingMode===p.Global&&(t.isWGS84||t.isWebMercator);let o=new AbortController;return this.map.ground.queryElevation(this._tmpPoint,{signal:o.signal,cache:this.cache,minDemResolution:e?v:0}).then((t=>this._updateSurfaceAltitude(t.geometry.z??0))).catch((t=>{r(t)||this._updateSurfaceAltitude(0)})).catch((()=>{})).then((()=>{this._pendingElevationQueryController===o&&(this._pendingElevationQueryController=null,this.notifyChange("updating")),o=null})),this._pendingElevationQueryController=o,y.YIELD}_updateSurfaceAltitude(t){this._estimatedSurfaceAltitude!==t&&(this._estimatedSurfaceAltitude=t,this._updateRenderLocation())}_updateRenderLocation(){this.renderCoordsHelper.setAltitude(f,this._estimatedSurfaceAltitude,this._camera.eye),a(this._get("renderLocation"),f)||(this._set("renderLocation",d(this._propertiesPool.get("renderLocation"),f)),this.notifyChange("renderLocation"))}};t([i({constructOnly:!0})],g.prototype,"scheduler",void 0),t([i({constructOnly:!0})],g.prototype,"cache",void 0),t([i({constructOnly:!0})],g.prototype,"task",void 0),t([i({readOnly:!0})],g.prototype,"location",null),t([i({constructOnly:!0})],g.prototype,"map",void 0),t([i({readOnly:!0})],g.prototype,"renderLocation",void 0),t([i({readOnly:!0})],g.prototype,"scale",null),t([i({readOnly:!0})],g.prototype,"updating",null),g=t([s("esri.views.3d.support.CameraOnSurface")],g);const f=l(),C=1e5,v=1e6;export{g as CameraOnSurface};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../chunks/tslib.es6.js";import{clamp as e}from"../../../../core/mathUtils.js";import{removeMaybe as r,destroyMaybe as s}from"../../../../core/maybe.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import{i as a,h as n,b as c,e as u,k as l,p}from"../../../../chunks/vec3.js";import{c as d}from"../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as h}from"../../../../geometry/ellipsoidUtils.js";import f from"../../../../geometry/Point.js";import{projectBoundingRect as m}from"../../../../geometry/projection/projectBoundingRect.js";import{create as _}from"../../../../geometry/support/aaBoundingRect.js";import{debugFlags as S}from"../debugFlags.js";import{PropertiesPool as y}from"../PropertiesPool.js";import{PointOfInterest as g}from"./PointOfInterest.js";import{Task as A}from"../../../support/Scheduler.js";const j=Array;let L=class extends g{constructor(t){super(t),this._propertiesPool=new y({location:f,renderLocation:j},this),this._currentSurfaceAltitude=0,this._latestSurfaceAltitude=0,this.distance=0,this.renderLocation=d(),this.updating=!1}initialize(){this._frameWorker=this.scheduler.registerTask(this.task,this),this.runTask()}destroy(){this._frameWorker=r(this._frameWorker),this._propertiesPool=s(this._propertiesPool)}get _camera(){return this.state.contentCamera}get location(){const t=this._propertiesPool.get("location");return this.renderCoordsHelper.fromRenderCoords(this.renderLocation,t,this.state.spatialReference),t}updateRenderLocation(){this.updating=!0,this._updateRenderLocation()}get estimatedSurfaceAltitude(){return this._latestSurfaceAltitude}get running(){return this.updating}runTask(){return this._latestSurfaceAltitude=this.estimateSurfaceAltitudeAtCenter(),this._updateRenderLocation(),this.updating=!1,A.YIELD}_updateRenderLocation(){const t=v;let e=this._calculateSurfaceIntersection(this._currentSurfaceAltitude,t);const r=this._currentSurfaceAltitude!==this._latestSurfaceAltitude;!e&&r&&(e=this._calculateSurfaceIntersection(this._latestSurfaceAltitude,t),e&&(this._currentSurfaceAltitude=this._latestSurfaceAltitude));const s=C;e&&this._latestSurfaceAltitudeChangesDistanceSignificantly(t,s)&&(a(t,s),this._currentSurfaceAltitude=this._latestSurfaceAltitude),e?this.distance=n(this._camera.eye,t):(c(t,this._camera.viewForward,this._get("distance")),u(t,t,this._camera.eye)),l(this._get("renderLocation"),t)||this._set("renderLocation",a(this._propertiesPool.get("renderLocation"),t))}_calculateSurfaceIntersection(t,r){const s=this._camera;if(!this.renderCoordsHelper.intersectManifold(s.ray,t,r))return!1;if(this.state.isGlobal){const e=h(this.renderCoordsHelper.spatialReference).radius,i=e+t,o=p(s.eye),a=o<i*i,l=n(s.eye,r);if(a&&l>e/4){const t=i-Math.sqrt(o);return c(r,s.viewForward,t),u(r,r,s.eye),!0}}else{const t=this.surface?.ready?this.surface.extent:null;null!=t&&m(t,this.surface?.spatialReference,R,this.renderCoordsHelper.spatialReference)&&(r[0]=e(r[0],R[0],R[2]),r[1]=e(r[1],R[1],R[3]))}return!0}_latestSurfaceAltitudeChangesDistanceSignificantly(t,e){if(this._latestSurfaceAltitude===this._currentSurfaceAltitude||null==t)return!1;if(this._calculateSurfaceIntersection(this._latestSurfaceAltitude,e)){if(S.TESTS_DISABLE_OPTIMIZATIONS)return!0;const r=this._camera.eye,s=n(r,t),i=n(r,e);if(Math.abs(i-s)/s>k)return!0}return!1}};t([i({constructOnly:!0})],L.prototype,"scheduler",void 0),t([i({constructOnly:!0})],L.prototype,"task",void 0),t([i()],L.prototype,"distance",void 0),t([i({constructOnly:!0})],L.prototype,"estimateSurfaceAltitudeAtCenter",void 0),t([i({readOnly:!0})],L.prototype,"location",null),t([i({readOnly:!0})],L.prototype,"renderLocation",void 0),t([i()],L.prototype,"updating",void 0),L=t([o("esri.views.3d.support.CenterOnSurface")],L);const k=.05,v=d(),C=d(),R=_();export{L as CenterOnSurface};
5
+ import{_ as t}from"../../../../chunks/tslib.es6.js";import{clamp as e}from"../../../../core/mathUtils.js";import{removeMaybe as r,destroyMaybe as s}from"../../../../core/maybe.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import{c as a,m as c,i as n,g as u,h as l,o as d}from"../../../../chunks/vec3.js";import{c as p}from"../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as h}from"../../../../geometry/ellipsoidUtils.js";import f from"../../../../geometry/Point.js";import{projectBoundingRect as m}from"../../../../geometry/projection/projectBoundingRect.js";import{create as _}from"../../../../geometry/support/aaBoundingRect.js";import{debugFlags as S}from"../debugFlags.js";import{PropertiesPool as y}from"../PropertiesPool.js";import{PointOfInterest as g}from"./PointOfInterest.js";import{Task as A}from"../../../support/Scheduler.js";const j=Array;let L=class extends g{constructor(t){super(t),this._propertiesPool=new y({location:f,renderLocation:j},this),this._currentSurfaceAltitude=0,this._latestSurfaceAltitude=0,this.distance=0,this.renderLocation=p(),this.updating=!1}initialize(){this._frameWorker=this.scheduler.registerTask(this.task,this),this.runTask()}destroy(){this._frameWorker=r(this._frameWorker),this._propertiesPool=s(this._propertiesPool)}get _camera(){return this.state.contentCamera}get location(){const t=this._propertiesPool.get("location");return this.renderCoordsHelper.fromRenderCoords(this.renderLocation,t,this.state.spatialReference),t}updateRenderLocation(){this.updating=!0,this._updateRenderLocation()}get estimatedSurfaceAltitude(){return this._latestSurfaceAltitude}get running(){return this.updating}runTask(){return this._latestSurfaceAltitude=this.estimateSurfaceAltitudeAtCenter(),this._updateRenderLocation(),this.updating=!1,A.YIELD}_updateRenderLocation(){const t=v;let e=this._calculateSurfaceIntersection(this._currentSurfaceAltitude,t);const r=this._currentSurfaceAltitude!==this._latestSurfaceAltitude;!e&&r&&(e=this._calculateSurfaceIntersection(this._latestSurfaceAltitude,t),e&&(this._currentSurfaceAltitude=this._latestSurfaceAltitude));const s=C;e&&this._latestSurfaceAltitudeChangesDistanceSignificantly(t,s)&&(a(t,s),this._currentSurfaceAltitude=this._latestSurfaceAltitude),e?this.distance=c(this._camera.eye,t):(n(t,this._camera.viewForward,this._get("distance")),u(t,t,this._camera.eye)),l(this._get("renderLocation"),t)||this._set("renderLocation",a(this._propertiesPool.get("renderLocation"),t))}_calculateSurfaceIntersection(t,r){const s=this._camera;if(!this.renderCoordsHelper.intersectManifold(s.ray,t,r))return!1;if(this.state.isGlobal){const e=h(this.renderCoordsHelper.spatialReference).radius,i=e+t,o=d(s.eye),a=o<i*i,l=c(s.eye,r);if(a&&l>e/4){const t=i-Math.sqrt(o);return n(r,s.viewForward,t),u(r,r,s.eye),!0}}else{const t=this.surface?.ready?this.surface.extent:null;null!=t&&m(t,this.surface?.spatialReference,R,this.renderCoordsHelper.spatialReference)&&(r[0]=e(r[0],R[0],R[2]),r[1]=e(r[1],R[1],R[3]))}return!0}_latestSurfaceAltitudeChangesDistanceSignificantly(t,e){if(this._latestSurfaceAltitude===this._currentSurfaceAltitude||null==t)return!1;if(this._calculateSurfaceIntersection(this._latestSurfaceAltitude,e)){if(S.TESTS_DISABLE_OPTIMIZATIONS)return!0;const r=this._camera.eye,s=c(r,t),i=c(r,e);if(Math.abs(i-s)/s>k)return!0}return!1}};t([i({constructOnly:!0})],L.prototype,"scheduler",void 0),t([i({constructOnly:!0})],L.prototype,"task",void 0),t([i()],L.prototype,"distance",void 0),t([i({constructOnly:!0})],L.prototype,"estimateSurfaceAltitudeAtCenter",void 0),t([i({readOnly:!0})],L.prototype,"location",null),t([i({readOnly:!0})],L.prototype,"renderLocation",void 0),t([i()],L.prototype,"updating",void 0),L=t([o("esri.views.3d.support.CenterOnSurface")],L);const k=.05,v=p(),C=p(),R=_();export{L as CenterOnSurface};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import{clamp as t}from"../../../../core/mathUtils.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{watch as o}from"../../../../core/reactiveUtils.js";import{createRenderScreenPointArray3 as s}from"../../../../core/screenUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{d as a,G as c,i as d,f as p,g as l,n as u}from"../../../../chunks/vec3.js";import{c as h}from"../../../../chunks/vec3f64.js";import m from"../../../../geometry/Point.js";import{wrap as f}from"../../../../geometry/support/ray.js";import{PropertiesPool as y}from"../PropertiesPool.js";import{PointOfInterest as g}from"./PointOfInterest.js";import{PaddingSide as _}from"../../webgl-engine/lib/Camera.js";import{TaskPriority as O,Task as j}from"../../../support/Scheduler.js";const L=Array;let P=class extends g{constructor(e){super(e),this._propertiesPool=new y({location:m,renderLocation:L},this),this._dirty=!0,this.renderLocation=this._propertiesPool.get("renderLocation")}initialize(){this.addHandles([o((()=>this.centerOnSurface.renderLocation),(()=>this.updateRenderLocation())),o((()=>this.state.contentCamera),(()=>this.updateRenderLocation()))]),this.scheduler&&this.addHandles(this.scheduler.registerTask(O.POINT_OF_INTEREST_FREQUENT,this))}destroy(){this._propertiesPool=r(this._propertiesPool)}get updating(){return this._dirty||this.centerOnSurface.updating}get location(){const e=this._propertiesPool.get("location");return this.renderCoordsHelper.fromRenderCoords(this.renderLocation,e,this.state.spatialReference),e}get running(){return this._dirty}runTask(){const e=this._get("renderLocation"),r=this.centerOnSurface.renderLocation,o=this.renderCoordsHelper,s=this.state.contentCamera;this._dirty=!1,o.worldUpAtPosition(r,S);const i=Math.max(0,(Math.acos(a(S,s.viewForward))-.5*Math.PI)*(s.aboveGround?1:-1));if(Number.isNaN(i)){if(!e||!c(e,r)){const e=this._propertiesPool.get("renderLocation");d(e,r),this._set("renderLocation",e)}return j.YIELD}const n=1-t(i/(.5*Math.PI),0,1),l=n*n*n;this._calculateScreenHorizontalEdgeOnSurface(C);const u=this._propertiesPool.get("renderLocation");return p(u,r,C,l),e&&c(e,u)||this._set("renderLocation",u),j.YIELD}_calculateScreenHorizontalEdgeOnSurface(e){const t=this.state.contentCamera,r=t.getRenderCenter(s());if(r[1]=t.aboveGround?t.padding[_.BOTTOM]:t.fullHeight-t.padding[_.TOP],this.estimateSurfaceIntersectionAtRenderPoint(r,e))return e;const o=this.renderCoordsHelper.getAltitude(this.centerOnSurface.renderLocation);if(t.unprojectFromRenderScreen(r,v)){l(v,v,t.eye);const r=u(v,v);if(this.renderCoordsHelper.intersectManifold(f(t.eye,r),o,e))return e}return this.renderCoordsHelper.setAltitude(e,o,t.eye)}updateRenderLocation(){this._dirty=!0}};e([i()],P.prototype,"_dirty",void 0),e([i({constructOnly:!0})],P.prototype,"scheduler",void 0),e([i({constructOnly:!0})],P.prototype,"centerOnSurface",void 0),e([i({constructOnly:!0})],P.prototype,"estimateSurfaceIntersectionAtRenderPoint",void 0),e([i({readOnly:!0})],P.prototype,"updating",null),e([i({readOnly:!0})],P.prototype,"location",null),e([i({readOnly:!0})],P.prototype,"renderLocation",void 0),P=e([n("esri.views.3d.support.pointsOfInterest.Focus")],P);const S=h(),v=h(),C=h();export{P as Focus};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import{clamp as t}from"../../../../core/mathUtils.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{watch as o}from"../../../../core/reactiveUtils.js";import{createRenderScreenPointArray3 as s}from"../../../../core/screenUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{j as a,G as c,c as p,p as d,f as l,n as u}from"../../../../chunks/vec3.js";import{c as h}from"../../../../chunks/vec3f64.js";import m from"../../../../geometry/Point.js";import{wrap as f}from"../../../../geometry/support/ray.js";import{PropertiesPool as y}from"../PropertiesPool.js";import{PointOfInterest as g}from"./PointOfInterest.js";import{PaddingSide as _}from"../../webgl-engine/lib/Camera.js";import{TaskPriority as j,Task as O}from"../../../support/Scheduler.js";const L=Array;let P=class extends g{constructor(e){super(e),this._propertiesPool=new y({location:m,renderLocation:L},this),this._dirty=!0,this.renderLocation=this._propertiesPool.get("renderLocation")}initialize(){this.addHandles([o((()=>this.centerOnSurface.renderLocation),(()=>this.updateRenderLocation())),o((()=>this.state.contentCamera),(()=>this.updateRenderLocation()))]),this.scheduler&&this.addHandles(this.scheduler.registerTask(j.POINT_OF_INTEREST_FREQUENT,this))}destroy(){this._propertiesPool=r(this._propertiesPool)}get updating(){return this._dirty||this.centerOnSurface.updating}get location(){const e=this._propertiesPool.get("location");return this.renderCoordsHelper.fromRenderCoords(this.renderLocation,e,this.state.spatialReference),e}get running(){return this._dirty}runTask(){const e=this._get("renderLocation"),r=this.centerOnSurface.renderLocation,o=this.renderCoordsHelper,s=this.state.contentCamera;this._dirty=!1,o.worldUpAtPosition(r,S);const i=Math.max(0,(Math.acos(a(S,s.viewForward))-.5*Math.PI)*(s.aboveGround?1:-1));if(Number.isNaN(i)){if(!e||!c(e,r)){const e=this._propertiesPool.get("renderLocation");p(e,r),this._set("renderLocation",e)}return O.YIELD}const n=1-t(i/(.5*Math.PI),0,1),l=n*n*n;this._calculateScreenHorizontalEdgeOnSurface(C);const u=this._propertiesPool.get("renderLocation");return d(u,r,C,l),e&&c(e,u)||this._set("renderLocation",u),O.YIELD}_calculateScreenHorizontalEdgeOnSurface(e){const t=this.state.contentCamera,r=t.getRenderCenter(s());if(r[1]=t.aboveGround?t.padding[_.BOTTOM]:t.fullHeight-t.padding[_.TOP],this.estimateSurfaceIntersectionAtRenderPoint(r,e))return e;const o=this.renderCoordsHelper.getAltitude(this.centerOnSurface.renderLocation);if(t.unprojectFromRenderScreen(r,v)){l(v,v,t.eye);const r=u(v,v);if(this.renderCoordsHelper.intersectManifold(f(t.eye,r),o,e))return e}return this.renderCoordsHelper.setAltitude(e,o,t.eye)}updateRenderLocation(){this._dirty=!0}};e([i()],P.prototype,"_dirty",void 0),e([i({constructOnly:!0})],P.prototype,"scheduler",void 0),e([i({constructOnly:!0})],P.prototype,"centerOnSurface",void 0),e([i({constructOnly:!0})],P.prototype,"estimateSurfaceIntersectionAtRenderPoint",void 0),e([i({readOnly:!0})],P.prototype,"updating",null),e([i({readOnly:!0})],P.prototype,"location",null),e([i({readOnly:!0})],P.prototype,"renderLocation",void 0),P=e([n("esri.views.3d.support.pointsOfInterest.Focus")],P);const S=h(),v=h(),C=h();export{P as Focus};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import r from"../../../../core/Handles.js";import{watch as s,sync as n,when as i,on as o,initial as a}from"../../../../core/reactiveUtils.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as u}from"../../../../core/accessorSupport/decorators/subclass.js";import{e as h,k as d,i as p}from"../../../../chunks/vec3.js";import{c as f}from"../../../../chunks/vec3f64.js";import{create as l}from"../../../../geometry/support/ray.js";import{debugFlags as _}from"../debugFlags.js";import{PointGraphics as m}from"../debugUtils.js";import{PropertiesPool as C}from"../PropertiesPool.js";import{fromRenderAtEye as y}from"../geometryUtils/ray.js";import{CameraOnSurface as O}from"./CameraOnSurface.js";import{CenterOnSurface as A}from"./CenterOnSurface.js";import{ContentGeometryUpdates as g}from"./ContentGeometryUpdates.js";import{Focus as w}from"./Focus.js";import{StableSurfaceCenter as I}from"./StableSurfaceCenter.js";import{SurfaceGeometryUpdates as S}from"./SurfaceGeometryUpdates.js";import{newIntersector as v}from"../../webgl-engine/lib/Intersector.js";import{StoreResults as b}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{TERRAIN_ID as R}from"../../webgl-engine/lib/verticalOffsetUtils.js";import{TaskPriority as T}from"../../../support/Scheduler.js";let P=class extends t{constructor(e){super(e),this._handles=new r,this._tmpRay=l(),this._centerRayDirty=!0,this._surfaceAltitudeAtCenter=0,this._surfaceAltitudeAtCenterDirty=!0,this._contentAltitudeAtCenter=0,this._contentAltitudeAtCenterDirty=!0,this._propertiesPool=new C({renderPointOfView:j},this),this.renderPointOfView=f(),this._pois=new Array,this._debugCenters=new Map}initialize(){const{state:e,basemapTerrain:t,renderCoordsHelper:r,map:c}=this.view;this._surfaceIntersector=v(e.viewingMode),e.isGlobal?this._surfaceIntersector.options.backfacesTerrain=!1:this._surfaceIntersector.options.backfacesTerrain=!0,this._surfaceIntersector.options.invisibleTerrain=!1,this._surfaceIntersector.options.store=b.MIN,this._contentIntersector=v(e.viewingMode);const u=()=>this._estimateSurfaceAltitudeAtCenter(),h=this.view.resourceController.scheduler,d=this.view.basemapTerrain?.elevationQueryCache,p={state:e,scheduler:h,surface:t,renderCoordsHelper:r};this._set("centerOnSurfaceInfrequent",new A({...p,task:T.POINT_OF_INTEREST_INFREQUENT,estimateSurfaceAltitudeAtCenter:u})),this._set("centerOnSurfaceFrequent",new A({...p,task:T.POINT_OF_INTEREST_FREQUENT,estimateSurfaceAltitudeAtCenter:u})),this._set("centerOnContent",new A({...p,task:T.POINT_OF_INTEREST_FREQUENT,estimateSurfaceAltitudeAtCenter:()=>this._estimateContentAltitudeAtCenter()})),this._set("cameraOnSurface",new O({...p,cache:d,task:T.POINT_OF_INTEREST_INFREQUENT,map:c})),this._set("surfaceGeometryUpdates",new S({...p,centerOnSurfaces:[this.centerOnSurfaceFrequent,this.centerOnContent,this.centerOnSurfaceInfrequent]})),this._set("contentGeometryUpdates",new g({contentLayerViews:this.view.allLayerViews,renderCoordsHelper:r})),this._set("surfaceOrigin",new I({cache:d,view:this.view})),this._set("focus",new w({state:e,scheduler:h,surface:t,renderCoordsHelper:r,centerOnSurface:this.centerOnSurfaceFrequent,estimateSurfaceIntersectionAtRenderPoint:(e,t)=>this._estimateSurfaceIntersectionAtRenderPoint(e,this.view.state.contentCamera,t)})),this._pois.push(this.centerOnContent,this.centerOnSurfaceFrequent,this.centerOnSurfaceInfrequent,this.cameraOnSurface,this.focus);const f=this.view.graphics;this._debugCenters.set(this.centerOnContent,new m(f,"red","CenterOnContent")),this._debugCenters.set(this.centerOnSurfaceFrequent,new m(f,"red","CenterOnSurface")),this._debugCenters.set(this.centerOnSurfaceInfrequent,new m(f,"red","CenterOnSurface")),this._debugCenters.set(this.cameraOnSurface,new m(f,"blue","CameraOnSurface")),this._debugCenters.set(this.focus,new m(f,"green","Focus")),this._handles.add([s((()=>e.contentCamera),(e=>this._cameraChanged(e)),n),s((()=>t.extent),(()=>this._updateCenterPointsOfInterest())),i((()=>!t.updating),(()=>this._updateCenterPointsOfInterest()),n),o((()=>this.surfaceGeometryUpdates.events),"request-update",(()=>this._updateCenterPointsOfInterest())),o((()=>this.contentGeometryUpdates.events),"request-update",(()=>this._updateCenterOnContent())),i((()=>_.SHOW_POI),(e=>this._setDebug(e)),a)]),this._cameraChanged(this.view.state.contentCamera);for(const s of this._pois)s.runTask()}destroy(){this._setDebug(!1),this._handles.destroy(),this._propertiesPool.destroy();for(const e of this._pois)e.destroy();this.surfaceOrigin.destroy()}get updating(){return!(!this.surfaceGeometryUpdates?.updating&&!this._pois.some((e=>e.updating)))}get _centerRay(){return this._centerRayDirty&&(this._centerRayCached=this.view.sceneIntersectionHelper.getCenterRayWithSubpixelOffset(this.view.state.contentCamera,this._tmpRay),this._centerRayDirty=!1),this._centerRayCached}_estimateContentAltitudeAtCenter(){if(!this._contentAltitudeAtCenterDirty)return this._contentAltitudeAtCenter;this._contentAltitudeAtCenterDirty=!1;const e=this._centerRay;return null==e||(this.view.sceneIntersectionHelper.intersectRay(e,this._contentIntersector,U,F)?this._contentAltitudeAtCenter=this.view.renderCoordsHelper.getAltitude(U):this._contentAltitudeAtCenter=this._estimateSurfaceAltitudeAtCenter()),this._contentAltitudeAtCenter}_estimateSurfaceAltitudeAtCenter(){if(!this.view.basemapTerrain)return 0;if(!this._surfaceAltitudeAtCenterDirty)return this._surfaceAltitudeAtCenter;this._surfaceAltitudeAtCenterDirty=!1;const e=this._centerRay;if(null==e)return this._surfaceAltitudeAtCenter;const t=e.origin,r=h(U,e.origin,e.direction);return this._surfaceIntersector.resetWithRay(e,this.view.state.contentCamera),this.view.basemapTerrain.intersect(this._surfaceIntersector,null,t,r),this._surfaceIntersector.results.min.getIntersectionPoint(U)&&(this._surfaceAltitudeAtCenter=this.view.renderCoordsHelper.getAltitude(U)),this._surfaceAltitudeAtCenter}_estimateSurfaceIntersectionAtRenderPoint(e,t,r){const s=y(t,e,E);if(null==s)return null;const n=s.origin,i=h(U,s.origin,s.direction);return this._surfaceIntersector.resetWithRay(s,t),this.view.basemapTerrain.intersect(this._surfaceIntersector,null,n,i),this._surfaceIntersector.results.min.getIntersectionPoint(r)?r:null}_cameraChanged(e){this._updateCenterPointsOfInterest();const t=e.eye;d(this.renderPointOfView,t)||this._set("renderPointOfView",p(this._propertiesPool.get("renderPointOfView"),t))}_updateCenterPointsOfInterest(){this._centerRayDirty=!0,this._surfaceAltitudeAtCenterDirty=!0,this._contentAltitudeAtCenterDirty=!0;for(const e of this._pois)e.updateRenderLocation()}_updateCenterOnContent(){this._contentAltitudeAtCenterDirty=!0,this.centerOnContent.updateRenderLocation()}_setDebug(e){if(!e)return this._debugCenters.forEach((e=>e.hide())),void this._handles.remove("debug");for(const t of this._pois)this._handles.add(s((()=>t.renderLocation),(e=>this._debugCenters.get(t)?.show(e,t.renderCoordsHelper.spatialReference)),a),"debug")}get test(){return{update:()=>{this.surfaceGeometryUpdates.runTask();for(const e of this._pois)e.runTask()},surfaceGeometryUpdates:this.surfaceGeometryUpdates}}};e([c({readOnly:!0})],P.prototype,"centerOnContent",void 0),e([c({readOnly:!0})],P.prototype,"centerOnSurfaceFrequent",void 0),e([c({readOnly:!0})],P.prototype,"centerOnSurfaceInfrequent",void 0),e([c({readOnly:!0})],P.prototype,"cameraOnSurface",void 0),e([c({readOnly:!0})],P.prototype,"focus",void 0),e([c({readOnly:!0})],P.prototype,"renderPointOfView",void 0),e([c({readOnly:!0})],P.prototype,"surfaceOrigin",void 0),e([c({readOnly:!0})],P.prototype,"contentGeometryUpdates",void 0),e([c({readOnly:!0})],P.prototype,"surfaceGeometryUpdates",void 0),e([c({constructOnly:!0})],P.prototype,"view",void 0),e([c({readOnly:!0})],P.prototype,"updating",null),P=e([u("esri.views.3d.support.PointsOfInterest")],P);const j=Array,U=f(),E=l(),F={exclude:new Set([R])};export{P as PointsOfInterest};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import r from"../../../../core/Handles.js";import{watch as s,sync as n,when as i,on as o,initial as a}from"../../../../core/reactiveUtils.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as u}from"../../../../core/accessorSupport/decorators/subclass.js";import{g as h,h as d,c as p}from"../../../../chunks/vec3.js";import{c as f}from"../../../../chunks/vec3f64.js";import{create as l}from"../../../../geometry/support/ray.js";import{debugFlags as _}from"../debugFlags.js";import{PointGraphics as m}from"../debugUtils.js";import{PropertiesPool as C}from"../PropertiesPool.js";import{fromRenderAtEye as y}from"../geometryUtils/ray.js";import{CameraOnSurface as O}from"./CameraOnSurface.js";import{CenterOnSurface as A}from"./CenterOnSurface.js";import{ContentGeometryUpdates as g}from"./ContentGeometryUpdates.js";import{Focus as w}from"./Focus.js";import{StableSurfaceCenter as I}from"./StableSurfaceCenter.js";import{SurfaceGeometryUpdates as S}from"./SurfaceGeometryUpdates.js";import{newIntersector as v}from"../../webgl-engine/lib/Intersector.js";import{StoreResults as b}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{TERRAIN_ID as R}from"../../webgl-engine/lib/verticalOffsetUtils.js";import{TaskPriority as T}from"../../../support/Scheduler.js";let P=class extends t{constructor(e){super(e),this._handles=new r,this._tmpRay=l(),this._centerRayDirty=!0,this._surfaceAltitudeAtCenter=0,this._surfaceAltitudeAtCenterDirty=!0,this._contentAltitudeAtCenter=0,this._contentAltitudeAtCenterDirty=!0,this._propertiesPool=new C({renderPointOfView:j},this),this.renderPointOfView=f(),this._pois=new Array,this._debugCenters=new Map}initialize(){const{state:e,basemapTerrain:t,renderCoordsHelper:r,map:c}=this.view;this._surfaceIntersector=v(e.viewingMode),e.isGlobal?this._surfaceIntersector.options.backfacesTerrain=!1:this._surfaceIntersector.options.backfacesTerrain=!0,this._surfaceIntersector.options.invisibleTerrain=!1,this._surfaceIntersector.options.store=b.MIN,this._contentIntersector=v(e.viewingMode);const u=()=>this._estimateSurfaceAltitudeAtCenter(),h=this.view.resourceController.scheduler,d=this.view.basemapTerrain?.elevationQueryCache,p={state:e,scheduler:h,surface:t,renderCoordsHelper:r};this._set("centerOnSurfaceInfrequent",new A({...p,task:T.POINT_OF_INTEREST_INFREQUENT,estimateSurfaceAltitudeAtCenter:u})),this._set("centerOnSurfaceFrequent",new A({...p,task:T.POINT_OF_INTEREST_FREQUENT,estimateSurfaceAltitudeAtCenter:u})),this._set("centerOnContent",new A({...p,task:T.POINT_OF_INTEREST_FREQUENT,estimateSurfaceAltitudeAtCenter:()=>this._estimateContentAltitudeAtCenter()})),this._set("cameraOnSurface",new O({...p,cache:d,task:T.POINT_OF_INTEREST_INFREQUENT,map:c})),this._set("surfaceGeometryUpdates",new S({...p,centerOnSurfaces:[this.centerOnSurfaceFrequent,this.centerOnContent,this.centerOnSurfaceInfrequent]})),this._set("contentGeometryUpdates",new g({contentLayerViews:this.view.allLayerViews,renderCoordsHelper:r})),this._set("surfaceOrigin",new I({cache:d,view:this.view})),this._set("focus",new w({state:e,scheduler:h,surface:t,renderCoordsHelper:r,centerOnSurface:this.centerOnSurfaceFrequent,estimateSurfaceIntersectionAtRenderPoint:(e,t)=>this._estimateSurfaceIntersectionAtRenderPoint(e,this.view.state.contentCamera,t)})),this._pois.push(this.centerOnContent,this.centerOnSurfaceFrequent,this.centerOnSurfaceInfrequent,this.cameraOnSurface,this.focus);const f=this.view.graphics;this._debugCenters.set(this.centerOnContent,new m(f,"red","CenterOnContent")),this._debugCenters.set(this.centerOnSurfaceFrequent,new m(f,"red","CenterOnSurface")),this._debugCenters.set(this.centerOnSurfaceInfrequent,new m(f,"red","CenterOnSurface")),this._debugCenters.set(this.cameraOnSurface,new m(f,"blue","CameraOnSurface")),this._debugCenters.set(this.focus,new m(f,"green","Focus")),this._handles.add([s((()=>e.contentCamera),(e=>this._cameraChanged(e)),n),s((()=>t.extent),(()=>this._updateCenterPointsOfInterest())),i((()=>!t.updating),(()=>this._updateCenterPointsOfInterest()),n),o((()=>this.surfaceGeometryUpdates.events),"request-update",(()=>this._updateCenterPointsOfInterest())),o((()=>this.contentGeometryUpdates.events),"request-update",(()=>this._updateCenterOnContent())),i((()=>_.SHOW_POI),(e=>this._setDebug(e)),a)]),this._cameraChanged(this.view.state.contentCamera);for(const s of this._pois)s.runTask()}destroy(){this._setDebug(!1),this._handles.destroy(),this._propertiesPool.destroy();for(const e of this._pois)e.destroy();this.surfaceOrigin.destroy()}get updating(){return!(!this.surfaceGeometryUpdates?.updating&&!this._pois.some((e=>e.updating)))}get _centerRay(){return this._centerRayDirty&&(this._centerRayCached=this.view.sceneIntersectionHelper.getCenterRayWithSubpixelOffset(this.view.state.contentCamera,this._tmpRay),this._centerRayDirty=!1),this._centerRayCached}_estimateContentAltitudeAtCenter(){if(!this._contentAltitudeAtCenterDirty)return this._contentAltitudeAtCenter;this._contentAltitudeAtCenterDirty=!1;const e=this._centerRay;return null==e||(this.view.sceneIntersectionHelper.intersectRay(e,this._contentIntersector,U,F)?this._contentAltitudeAtCenter=this.view.renderCoordsHelper.getAltitude(U):this._contentAltitudeAtCenter=this._estimateSurfaceAltitudeAtCenter()),this._contentAltitudeAtCenter}_estimateSurfaceAltitudeAtCenter(){if(!this.view.basemapTerrain)return 0;if(!this._surfaceAltitudeAtCenterDirty)return this._surfaceAltitudeAtCenter;this._surfaceAltitudeAtCenterDirty=!1;const e=this._centerRay;if(null==e)return this._surfaceAltitudeAtCenter;const t=e.origin,r=h(U,e.origin,e.direction);return this._surfaceIntersector.resetWithRay(e,this.view.state.contentCamera),this.view.basemapTerrain.intersect(this._surfaceIntersector,null,t,r),this._surfaceIntersector.results.min.getIntersectionPoint(U)&&(this._surfaceAltitudeAtCenter=this.view.renderCoordsHelper.getAltitude(U)),this._surfaceAltitudeAtCenter}_estimateSurfaceIntersectionAtRenderPoint(e,t,r){const s=y(t,e,E);if(null==s)return null;const n=s.origin,i=h(U,s.origin,s.direction);return this._surfaceIntersector.resetWithRay(s,t),this.view.basemapTerrain.intersect(this._surfaceIntersector,null,n,i),this._surfaceIntersector.results.min.getIntersectionPoint(r)?r:null}_cameraChanged(e){this._updateCenterPointsOfInterest();const t=e.eye;d(this.renderPointOfView,t)||this._set("renderPointOfView",p(this._propertiesPool.get("renderPointOfView"),t))}_updateCenterPointsOfInterest(){this._centerRayDirty=!0,this._surfaceAltitudeAtCenterDirty=!0,this._contentAltitudeAtCenterDirty=!0;for(const e of this._pois)e.updateRenderLocation()}_updateCenterOnContent(){this._contentAltitudeAtCenterDirty=!0,this.centerOnContent.updateRenderLocation()}_setDebug(e){if(!e)return this._debugCenters.forEach((e=>e.hide())),void this._handles.remove("debug");for(const t of this._pois)this._handles.add(s((()=>t.renderLocation),(e=>this._debugCenters.get(t)?.show(e,t.renderCoordsHelper.spatialReference)),a),"debug")}get test(){return{update:()=>{this.surfaceGeometryUpdates.runTask();for(const e of this._pois)e.runTask()},surfaceGeometryUpdates:this.surfaceGeometryUpdates}}};e([c({readOnly:!0})],P.prototype,"centerOnContent",void 0),e([c({readOnly:!0})],P.prototype,"centerOnSurfaceFrequent",void 0),e([c({readOnly:!0})],P.prototype,"centerOnSurfaceInfrequent",void 0),e([c({readOnly:!0})],P.prototype,"cameraOnSurface",void 0),e([c({readOnly:!0})],P.prototype,"focus",void 0),e([c({readOnly:!0})],P.prototype,"renderPointOfView",void 0),e([c({readOnly:!0})],P.prototype,"surfaceOrigin",void 0),e([c({readOnly:!0})],P.prototype,"contentGeometryUpdates",void 0),e([c({readOnly:!0})],P.prototype,"surfaceGeometryUpdates",void 0),e([c({constructOnly:!0})],P.prototype,"view",void 0),e([c({readOnly:!0})],P.prototype,"updating",null),P=e([u("esri.views.3d.support.PointsOfInterest")],P);const j=Array,U=f(),E=l(),F={exclude:new Set([R])};export{P as PointsOfInterest};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{lerp as t,clamp as e}from"../../../core/mathUtils.js";import{d as i,i as n,r as o,n as a,o as l}from"../../../chunks/mat4.js";import{c as s}from"../../../chunks/mat4f64.js";import{j as c,l as r}from"../../../chunks/vec2.js";import{f as u,a as m}from"../../../chunks/vec2f64.js";import{s as d,f,n as h,b as g,m as b,e as y,i as p}from"../../../chunks/vec3.js";import{f as A,c as w,a as N}from"../../../chunks/vec3f64.js";import{ViewingMode as v}from"../../ViewingMode.js";import{S as T}from"../../../chunks/SunCalc.js";import{angle as M}from"./mathUtils.js";const j={local:{altitude:1500,ambientAtNight:.1,ambientAtNoon:.45,ambientAtTwilight:.2,directAtNoon:.65,directAtTwilight:.7},global:{altitude:8e5,ambient:.015,direct:.75},planarDirection:{localAltitude:1e4,globalAltitude:1e6,globalAngles:{azimuth:1.3*Math.PI,altitude:.6*Math.PI}}};class x{constructor(t,e){this.direct=t,this.ambient=e}}function S(i,n,o,a,l,s){d(s.ambient.color,1,1,1),s.ambient.intensity=j.global.ambient,d(s.direct.color,1,1,1),s.direct.intensity=j.global.direct;const c=n[2],r=e((Math.abs(c)-j.local.altitude)/(j.global.altitude-j.local.altitude),0,1);let u;if(s.globalFactor=r,null!=i&&(u=T.getTimes(i,n[1],n[0])),r<1){let e;if(null!=i)e=nt(i,u,a);else{const t=F(a);e={direct:{intensity:j.local.directAtNoon*t.direct,color:A(1,1,1)},ambient:{intensity:j.local.ambientAtNoon*t.ambient,color:A(1,1,1)},timeOfDay:"early afternoon"}}f(s.ambient.color,e.ambient.color,s.ambient.color,r),s.ambient.intensity=t(e.ambient.intensity,s.ambient.intensity,r),f(s.direct.color,e.direct.color,s.direct.color,r),s.direct.intensity=t(e.direct.intensity,s.direct.intensity,r),s.specularStrength="rainy"===a||"snowy"===a||"foggy"===a?0:1,s.environmentStrength="rainy"===a?.7:"snowy"===a||"foggy"===a?.75:1}s.noonFactor=null!=i?H(i,u):1,null!=i?P(i,n,o,s.direct.directionToLightSource):O(l,o,s.direct.directionToLightSource)}function O(t,e,n){e===v.Global?h(lt,t.eye):d(lt,0,0,1),g(st,t.viewForward,-1);const o=M(st,lt),a=Math.max(o-2*rt,0),l=.85*a/(a+1),s=Math.max(rt,o-rt-l);i(at,-s,t.viewRight),b(n,st,at),y(n,n,g(ct,t.viewRight,ut)),h(n,n)}function P(t,i,s,c){const r=G,u=n(I);if(s===v.Global)T.getPosition(t,0,0,r),d(c,0,0,-1),o(u,u,-r.azimuth),a(u,u,-r.altitude),b(c,c,u);else{const n=j.planarDirection,a=n.globalAngles,s=i[2];let m=(Math.abs(s)-n.localAltitude)/(n.globalAltitude-n.localAltitude);m=e(m,0,1),m<1?(T.getPosition(t,i[1],i[0],r),r.azimuth=(1-m)*r.azimuth+m*a.azimuth,r.altitude=(1-m)*r.altitude+m*a.altitude):(r.azimuth=a.azimuth,r.altitude=a.altitude),d(c,0,-1,0),l(u,u,-r.azimuth),o(u,u,-r.altitude),b(c,c,u)}}function z(t,e){if(e===v.Global)return!0;const i=j.planarDirection;return Math.abs(t)<i.localAltitude}function k(t,e,i,n,o){const a=t.getTime(),l=e.getTime()-a,s=Math.floor(l/i)+1,c=new Array(s);for(let r=0;r<s;++r)ot.setTime(a+i*r),c[r]=w(),P(ot,n,o,c[r]);return c}const D=A(.5773502691896258,-.5773502691896258,.5773502691896258);class E{constructor(){this.ambient={color:A(1,1,1),intensity:.55},this.direct={color:A(1,1,1),intensity:.55,directionToLightSource:N(D)},this.noonFactor=.5,this.globalFactor=0,this.specularStrength=1,this.environmentStrength=1}}const I=s(),G={azimuth:0,altitude:0};function H(t,i){const n=t.valueOf();let o,a;i.polarException===T.PolarException.MIDNIGHT_SUN?(o=n-60*(t.getHours()+48)*60*1e3-60*t.getMinutes()*1e3,a=o+432e6):i.polarException===T.PolarException.POLAR_NIGHT?(o=n-2,a=n-1):(o=i.sunrise.valueOf(),a=i.sunset.valueOf());const l=o+(a-o)/2;return 1-e(Math.abs(n-l)/432e5,0,1)}function F(t){switch(t){case"disabled":case"sunny":case"cloudy":return new x(1,1);case"rainy":return new x(.4,1.2);case"snowy":return new x(.5,1.3);case"foggy":return new x(.2,1.6)}}function L(t,e){const i=(t[0]+t[1]+t[2])/3;t[0]+=(i-t[0])*e,t[1]+=(i-t[1])*e,t[2]+=(i-t[2])*e}const R=A(.01,.01,.01),U=A(1,.6,.5),_=A(1,.98,.98),C=A(1,1,1),V=A(.8,.8,1),q=A(.8,.8,1),B=A(.98,.98,1),J=A(1,1,1),K=u(.01,j.local.ambientAtNight),Q=u(j.local.directAtTwilight,j.local.ambientAtTwilight),W=u(.9*j.local.directAtNoon,j.local.ambientAtNoon),X=u(j.local.directAtNoon,j.local.ambientAtNoon),Y=W,Z=_,$=B,tt=Q,et=U,it=q;function nt(t,e,i){const n=t.valueOf();let o,a;e.polarException===T.PolarException.MIDNIGHT_SUN?(o=n-60*(t.getHours()+48)*60*1e3-60*t.getMinutes()*1e3,a=o+432e6):e.polarException===T.PolarException.POLAR_NIGHT?(o=n-2,a=n-1):(o=e.sunrise.valueOf(),a=e.sunset.valueOf());const l=a-o,s=o+l/2,u=l/4,d=s-u,h=s+u,g=.06*l,b=o-g/2,y=o+g/2,A=a-g/2,N=a+g/2,v=m(),M=w(),j=w();let x="";if(n<b||n>N)c(v,K),p(M,R),p(j,V),x="night";else if(n<y){const t=(n-b)/(y-b);r(v,K,Q,t),f(M,R,U,t),f(j,V,q,t),x="sun rising"}else if(n<d){const t=(n-y)/(d-y);r(v,Q,W,t),f(M,U,_,t),f(j,q,B,t),x="early morning"}else if(n<s){const t=(n-d)/(s-d);r(v,W,X,t),f(M,_,C,t),f(j,B,J,t),x="late morning"}else if(n<h){const t=(n-s)/(h-s);r(v,X,Y,t),f(M,C,Z,t),f(j,J,$,t),x="early afternoon"}else if(n<A){const t=(n-h)/(A-h);r(v,Y,tt,t),f(M,Z,et,t),f(j,$,it,t),x="late afternoon"}else if(n<N){const t=(n-A)/(N-A);r(v,tt,K,t),f(M,et,R,t),f(j,it,V,t),x="sun setting"}let S=0;switch(i){case"rainy":case"foggy":S=.8;break;case"snowy":S=.5}S>0&&(L(M,S),L(j,S));const O=F(i);return{direct:{intensity:v[0]*O.direct,color:M},ambient:{intensity:v[1]*O.ambient,color:j},timeOfDay:x}}const ot=new Date(0),at=s(),lt=w(),st=w(),ct=w(),rt=.25,ut=.2;export{E as ColorAndIntensity,S as computeColorAndIntensity,k as computeDirectionsOverTime,z as computeShadowsEnabled,O as computeVirtualLightDirection};
5
+ import{lerp as t,clamp as e}from"../../../core/mathUtils.js";import{c as i,g as n,r as o,n as a,o as l}from"../../../chunks/mat4.js";import{a as s}from"../../../chunks/mat4f64.js";import{j as c,l as r}from"../../../chunks/vec2.js";import{f as u,a as m}from"../../../chunks/vec2f64.js";import{s as g,p as h,n as d,i as f,e as b,g as y,c as p}from"../../../chunks/vec3.js";import{f as A,c as w,g as N}from"../../../chunks/vec3f64.js";import{ViewingMode as v}from"../../ViewingMode.js";import{S as T}from"../../../chunks/SunCalc.js";import{angle as M}from"./mathUtils.js";const j={local:{altitude:1500,ambientAtNight:.1,ambientAtNoon:.45,ambientAtTwilight:.2,directAtNoon:.65,directAtTwilight:.7},global:{altitude:8e5,ambient:.015,direct:.75},planarDirection:{localAltitude:1e4,globalAltitude:1e6,globalAngles:{azimuth:1.3*Math.PI,altitude:.6*Math.PI}}};class x{constructor(t,e){this.direct=t,this.ambient=e}}function S(i,n,o,a,l,s){g(s.ambient.color,1,1,1),s.ambient.intensity=j.global.ambient,g(s.direct.color,1,1,1),s.direct.intensity=j.global.direct;const c=n[2],r=e((Math.abs(c)-j.local.altitude)/(j.global.altitude-j.local.altitude),0,1);let u;if(s.globalFactor=r,null!=i&&(u=T.getTimes(i,n[1],n[0])),r<1){let e;if(null!=i)e=nt(i,u,a);else{const t=F(a);e={direct:{intensity:j.local.directAtNoon*t.direct,color:A(1,1,1)},ambient:{intensity:j.local.ambientAtNoon*t.ambient,color:A(1,1,1)},timeOfDay:"early afternoon"}}h(s.ambient.color,e.ambient.color,s.ambient.color,r),s.ambient.intensity=t(e.ambient.intensity,s.ambient.intensity,r),h(s.direct.color,e.direct.color,s.direct.color,r),s.direct.intensity=t(e.direct.intensity,s.direct.intensity,r),s.specularStrength="rainy"===a||"snowy"===a||"foggy"===a?0:1,s.environmentStrength="rainy"===a?.7:"snowy"===a||"foggy"===a?.75:1}s.noonFactor=null!=i?H(i,u):1,null!=i?P(i,n,o,s.direct.directionToLightSource):O(l,o,s.direct.directionToLightSource)}function O(t,e,n){e===v.Global?d(lt,t.eye):g(lt,0,0,1),f(st,t.viewForward,-1);const o=M(st,lt),a=Math.max(o-2*rt,0),l=.85*a/(a+1),s=Math.max(rt,o-rt-l);i(at,-s,t.viewRight),b(n,st,at),y(n,n,f(ct,t.viewRight,ut)),d(n,n)}function P(t,i,s,c){const r=G,u=n(I);if(s===v.Global)T.getPosition(t,0,0,r),g(c,0,0,-1),o(u,u,-r.azimuth),a(u,u,-r.altitude),b(c,c,u);else{const n=j.planarDirection,a=n.globalAngles,s=i[2];let m=(Math.abs(s)-n.localAltitude)/(n.globalAltitude-n.localAltitude);m=e(m,0,1),m<1?(T.getPosition(t,i[1],i[0],r),r.azimuth=(1-m)*r.azimuth+m*a.azimuth,r.altitude=(1-m)*r.altitude+m*a.altitude):(r.azimuth=a.azimuth,r.altitude=a.altitude),g(c,0,-1,0),l(u,u,-r.azimuth),o(u,u,-r.altitude),b(c,c,u)}}function z(t,e){if(e===v.Global)return!0;const i=j.planarDirection;return Math.abs(t)<i.localAltitude}function k(t,e,i,n,o){const a=t.getTime(),l=e.getTime()-a,s=Math.floor(l/i)+1,c=new Array(s);for(let r=0;r<s;++r)ot.setTime(a+i*r),c[r]=w(),P(ot,n,o,c[r]);return c}const D=A(.5773502691896258,-.5773502691896258,.5773502691896258);class E{constructor(){this.ambient={color:A(1,1,1),intensity:.55},this.direct={color:A(1,1,1),intensity:.55,directionToLightSource:N(D)},this.noonFactor=.5,this.globalFactor=0,this.specularStrength=1,this.environmentStrength=1}}const I=s(),G={azimuth:0,altitude:0};function H(t,i){const n=t.valueOf();let o,a;i.polarException===T.PolarException.MIDNIGHT_SUN?(o=n-60*(t.getHours()+48)*60*1e3-60*t.getMinutes()*1e3,a=o+432e6):i.polarException===T.PolarException.POLAR_NIGHT?(o=n-2,a=n-1):(o=i.sunrise.valueOf(),a=i.sunset.valueOf());const l=o+(a-o)/2;return 1-e(Math.abs(n-l)/432e5,0,1)}function F(t){switch(t){case"disabled":case"sunny":case"cloudy":return new x(1,1);case"rainy":return new x(.4,1.2);case"snowy":return new x(.5,1.3);case"foggy":return new x(.2,1.6)}}function L(t,e){const i=(t[0]+t[1]+t[2])/3;t[0]+=(i-t[0])*e,t[1]+=(i-t[1])*e,t[2]+=(i-t[2])*e}const R=A(.01,.01,.01),U=A(1,.6,.5),_=A(1,.98,.98),C=A(1,1,1),V=A(.8,.8,1),q=A(.8,.8,1),B=A(.98,.98,1),J=A(1,1,1),K=u(.01,j.local.ambientAtNight),Q=u(j.local.directAtTwilight,j.local.ambientAtTwilight),W=u(.9*j.local.directAtNoon,j.local.ambientAtNoon),X=u(j.local.directAtNoon,j.local.ambientAtNoon),Y=W,Z=_,$=B,tt=Q,et=U,it=q;function nt(t,e,i){const n=t.valueOf();let o,a;e.polarException===T.PolarException.MIDNIGHT_SUN?(o=n-60*(t.getHours()+48)*60*1e3-60*t.getMinutes()*1e3,a=o+432e6):e.polarException===T.PolarException.POLAR_NIGHT?(o=n-2,a=n-1):(o=e.sunrise.valueOf(),a=e.sunset.valueOf());const l=a-o,s=o+l/2,u=l/4,g=s-u,d=s+u,f=.06*l,b=o-f/2,y=o+f/2,A=a-f/2,N=a+f/2,v=m(),M=w(),j=w();let x="";if(n<b||n>N)c(v,K),p(M,R),p(j,V),x="night";else if(n<y){const t=(n-b)/(y-b);r(v,K,Q,t),h(M,R,U,t),h(j,V,q,t),x="sun rising"}else if(n<g){const t=(n-y)/(g-y);r(v,Q,W,t),h(M,U,_,t),h(j,q,B,t),x="early morning"}else if(n<s){const t=(n-g)/(s-g);r(v,W,X,t),h(M,_,C,t),h(j,B,J,t),x="late morning"}else if(n<d){const t=(n-s)/(d-s);r(v,X,Y,t),h(M,C,Z,t),h(j,J,$,t),x="early afternoon"}else if(n<A){const t=(n-d)/(A-d);r(v,Y,tt,t),h(M,Z,et,t),h(j,$,it,t),x="late afternoon"}else if(n<N){const t=(n-A)/(N-A);r(v,tt,K,t),h(M,et,R,t),h(j,it,V,t),x="sun setting"}let S=0;switch(i){case"rainy":case"foggy":S=.8;break;case"snowy":S=.5}S>0&&(L(M,S),L(j,S));const O=F(i);return{direct:{intensity:v[0]*O.direct,color:M},ambient:{intensity:v[1]*O.ambient,color:j},timeOfDay:x}}const ot=new Date(0),at=s(),lt=w(),st=w(),ct=w(),rt=.25,ut=.2;export{E as ColorAndIntensity,S as computeColorAndIntensity,k as computeDirectionsOverTime,z as computeShadowsEnabled,O as computeVirtualLightDirection};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../Camera.js";import"../../../geometry.js";import e from"../../../Graphic.js";import n from"../../../Viewpoint.js";import{result as a}from"../../../core/asyncUtils.js";import"../../../core/has.js";import{cyclicalDegrees as o}from"../../../core/Cyclical.js";import r from"../../../core/Error.js";import{throwIfAborted as i}from"../../../core/promiseUtils.js";import{f as s,t as c}from"../../../chunks/mat3.js";import{c as l}from"../../../chunks/mat3f64.js";import{c as m}from"../../../chunks/mat4f64.js";import{b as u,e as f,h as p,i as g,g as h,s as y,t as d}from"../../../chunks/vec3.js";import{c as w}from"../../../chunks/vec3f64.js";import{project as x,projectWithZConversion as j}from"../../../geometry/projection.js";import{computeTranslationToOriginAndRotation as v}from"../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectPointToVectorWithEngine as b}from"../../../geometry/projection/projectPointToVectorWithEngine.js";import{projectVectorToPoint as R}from"../../../geometry/projection/projectVectorToPoint.js";import{projectVectorToVector as z}from"../../../geometry/projection/projectVectorToVector.js";import{create as G,empty as S,center as B,toRect as T,isPoint as M,expandWithVec3 as A,expandWithAABB as E,width as Z,height as k,depth as F}from"../../../geometry/support/aaBoundingBox.js";import{create as O,isPoint as P}from"../../../geometry/support/aaBoundingRect.js";import{intersectsPoint as D}from"../../../geometry/support/frustum.js";import{getResolutionInMetersForScale as U}from"../../../geometry/support/scaleUtils.js";import{cameraOnContentAlongViewDirection as V}from"../camera/intersectionUtils.js";import{getViewSR as C,fromExtentSync as I,fromExtentAsync as J,internalToExternal as K,OrientationMode as L,scaleToDistance as N,fromCenterDistanceSync as W,fromCenterDistanceAsync as Y,externalToInternal as q,computeScale as X,distanceToScale as _,fromCenterScale as H,directionToHeadingTilt as Q,zoomToScale as $}from"./cameraUtils.js";import{getElevationAtPoint as tt}from"./ElevationProvider.js";import et from"../../../geometry/Point.js";import nt from"../../../geometry/Extent.js";import at from"../../../geometry/SpatialReference.js";import ot from"../../../geometry/Geometry.js";import rt from"../../../geometry/Multipoint.js";const it=.66;function st(t){return 360-o.normalize(t)}function ct(t){return o.normalize(360-t)}function lt(t,e,n){const a=e.camera;if(null!=a)return ut(a,C(t));const{targetGeometry:o}=e;if(null==o)return null;const{camera:r,mode:i}=pt(t,e.rotation,n);if("point"===o.type)return gt(t,e,o,r,i);const s=o.extent;return null==s?null:I(t,s,r.heading,r.tilt,i)}async function mt(t,e,n,a){const o=e.camera;if(null!=o)return ft(o,C(t),a);const{targetGeometry:r}=e;if(null==r)throw new Error("Viewpoint has no targetGeometry!");const{camera:i,mode:s}=pt(t,e.rotation,n);if("point"===r.type)return ht(t,e,r,i,s,a);const c=r.extent;if(null==c)throw new Error("Target geometry has no extent!");return J(t,c,i.heading,i.tilt,s,a)}function ut(t,e){const n=t.position;let a;try{a=x(n,e)}catch(r){return null}const o=t.clone();return o.position=a.clone(),o}async function ft(t,e,n){const a=t.position,o=await j(a,e,{signal:n});i(n);const r=t.clone();return r.position=o.clone(),r}function pt(t,e,n){const a=K(t,t.state.camera);let o=L.ADJUST;return null!=e&&(a.heading=st(e),o=L.LOCKED),null!=n&&(a.tilt=n),{camera:a,mode:o}}function gt(t,e,n,a,o){const r=t.spatialReference;let i;try{i=x(n.clone(),r)}catch(c){return null}const s=null!=e.scale?N(t,e.scale,i.latitude):t.state.camera.distance;return W(t,i,s,a,o)}async function ht(t,e,n,a,o,r){const s=t.spatialReference,c=await j(n.clone(),s,{signal:r});i(r);const l=null!=e.scale?N(t,e.scale,c.latitude):t.state.camera.distance;return Y(t,c,l,a,o,r)}function yt(t,e,a=null){return null==a&&(a=new n),vt(t,null,e.clone(),a)}async function dt(e,a,o){const i=Ft(e,a);if(!i)throw new r("viewpointutils-create:no-target","Missing target for creating viewpoint");const s=new t({fov:e.camera.fov}),c=new n({camera:s});if(i.target instanceof n){return Ot(await Gt(e,i.target,i,o,c))}if(i.target instanceof t)return Ot(await St(e,i.target,o,c));const l=null!=i.scale||null!=i.zoom;if(i.target instanceof nt){const t=i.target.xmin===i.target.xmax||i.target.ymin===i.target.ymax;return Ot(l||t?await Tt(e,i,i.target.center,s,o,c):await Et(e,i,i.target,s,o,c))}const m={boundingBox:S(),hasZ:!1,screenSpaceObjects:[]},u=l?xt(e,i):void 0;if(await zt(e,i.target,u,m,o),isFinite(m.boundingBox[0])){let t;if(B(m.boundingBox,Dt),Wt.x=Dt[0],Wt.y=Dt[1],Wt.z=Dt[2],Wt.spatialReference=e.spatialReference,isFinite(Wt.z)&&m.hasZ?t=M(m.boundingBox):(Wt.z=void 0,t=P(T(m.boundingBox,It))),l||t)return Ot(await Tt(e,i,Wt,s,o,c));const n=Pt(e,m.screenSpaceObjects);return Ot(await kt(e,i,Wt,m.boundingBox,n,s,o,c))}return i.position?Ot(await Mt(e,i,s,c,o)):Ot(await At(e,i,s,o,c))}function wt(t,e){return null==e.scale&&null!=e.zoom?$(t,e.zoom):e.scale}function xt(t,e){const n=wt(t,e);return n?U(n):void 0}function jt(t,e){let n=!1;return null!=e.heading?(t.heading=e.heading,n=!0):null!=e.rotation&&(t.heading=st(e.rotation),n=!0),null!=e.tilt&&(t.tilt=e.tilt,n=!0),null!=e.fov&&(t.fov=e.fov),n}function vt(t,e,n,a){const o=t.spatialReference||at.WGS84;return null==(e=null!=e?e:q(t,n))||(a.targetGeometry=R(e.center,t.renderSpatialReference,o),a.scale=X(t,e),a.rotation=ct(n.heading),a.camera=n),a}async function bt(t,e,n,a){const o=()=>new r("viewpointutils:invalid-geometry","The target is missing a valid geometry");if(!e)throw o();const i=e.spatialReference,s=t.spatialReference,c=t.basemapTerrain.spatialReference;if(!e.hasZ&&t.basemapTerrain){let n;switch(e.type){case"point":n=e;break;case"multipoint":case"polyline":n=e.extent?.center;break;case"mesh":n=e.origin;break;case"extent":n=e.center;break;case"polygon":n=e.centroid}null!=n&&null!=c&&null!=t.elevationProvider?(n=await j(n,c,{signal:a}),Dt[2]=tt(t.elevationProvider,n)??0):Dt[2]=0}const l=Yt[e.type],m=new Array;if(l(e,e.hasZ?t=>{m.push([t[0],t[1],t[2]])}:t=>{m.push([t[0],t[1]])},Dt),0===m.length)throw o();const u=await j(new rt({spatialReference:i,hasZ:e.hasZ,hasM:!1,points:m}),s,{signal:a});if(e.hasZ&&(n.hasZ=!0),e.hasZ)for(const[r,f,p]of u.points)Dt[0]=r,Dt[1]=f,Dt[2]=p,A(n.boundingBox,Dt);else for(const[r,f]of u.points)Dt[0]=r,Dt[1]=f,A(n.boundingBox,Dt)}async function Rt(t,e,n,o,r){const i=await a(t.whenViewForGraphic(e));if(!1===i.ok||null==i.value||!("whenGraphicBounds"in i.value))return void await bt(t,e.geometry,o,r);const s=i.value,c=await a(s.whenGraphicBounds(e,{minDemResolution:n}));if(!1===c.ok||!c.value)return void await bt(t,e.geometry,o,r);const{screenSpaceObjects:l,boundingBox:m}=c.value;E(o.boundingBox,m),l&&l.forEach((t=>{o.screenSpaceObjects.push(t)})),isFinite(m[2])&&(o.hasZ=!0)}async function zt(t,n,a,o,r){if(Array.isArray(n)&&2===n.length){const e=n[0],a=n[1];if("number"==typeof e&&"number"==typeof a)return Wt.x=e,Wt.y=a,Wt.z=void 0,Wt.spatialReference=t.spatialReference?.isGeographic?t.spatialReference:at.WGS84,void await bt(t,Wt,o,r)}n&&"map"in n&&"function"==typeof n.map?await Promise.allSettled(n.map((e=>zt(t,e,a,o,r)))):n instanceof ot?await bt(t,n,o,r):n instanceof e&&await Rt(t,n,a,o,r)}async function Gt(t,e,n,a,o){if(null!=e.camera)return St(t,e.camera,a,o);o.scale=e.scale,o.rotation=e.rotation,o.targetGeometry=null!=e.targetGeometry?e.targetGeometry.clone():null,o.camera=null,null!=n.heading?o.rotation=ct(n.heading):null!=n.rotation&&(o.rotation=n.rotation);const r=wt(t,n);return null!=r&&(o.scale=r),o.camera=await mt(t,o,n.tilt,a),o}async function St(t,e,n,a){const o=t.spatialReference,r=await j(e.position,o,{signal:n});return(e=e.clone()).fov=t.camera.fov,e.position=r,vt(t,null,e,a)}async function Bt(t,e,n,a,o,r,i){const s=t.renderSpatialReference;return await b(e,Lt,s,0,{signal:i}),await b(n,Kt,s,0,{signal:i}),r.targetGeometry=new et(e),o.position=new et(n),h(Jt,Lt,Kt),Q(t,Kt,Jt,a.up,o),r.scale=_(t,p(Kt,Lt),r.targetGeometry.latitude),r.rotation=ct(o.heading),r.camera=o,r}async function Tt(t,e,n,a,o,i){if(null==n)throw new r("createfromcenter","invalid point");i.targetGeometry=n.clone();const s=V(t);if(e.position)return Bt(t,i.targetGeometry,e.position,s,a,i,o);if(e.zoomFactor){const a=s.distance/e.zoomFactor,o=u(Dt,s.viewForward,-a);s.eye=f(Dt,s.center,o),i.scale=_(t,a,n.latitude)}K(t,s,a);const c=jt(a,e)?L.LOCKED:L.ADJUST;if(!e.zoomFactor){const r=wt(t,e);if(null==r){const{renderSpatialReference:e}=t;await b(n,Dt,e,0,{signal:o}),D(s.frustum,Dt)?i.scale=_(t,p(s.eye,Dt),n.latitude):i.scale=X(t,s)}else i.scale=r;i.camera=await H(t,i.targetGeometry,i.scale,a,c,o)}return i}async function Mt(t,e,n,a,o){const r=V(t);g(Jt,r.viewForward),Q(t,r.eye,Jt,r.up,Nt);const i=t.spatialReference,{position:s}=e;if(s){const t=await j(s,i,{signal:o});n.position=t}else n.position=new et;return n.heading=null!=e.heading?e.heading:Nt.heading,n.tilt=null!=e.tilt?e.tilt:Nt.tilt,vt(t,null,n,a)}async function At(t,e,n,a,o){const r=V(t),{spatialReference:i,renderSpatialReference:s}=t;return Tt(t,e,R(r.center,s,i),n,a,o)}async function Et(t,e,n,a,o,r){r.targetGeometry=n.clone();const i=V(t);K(t,i,a);const s=jt(a,e)?L.LOCKED:L.ADJUST;return r.camera=await J(t,n,a.heading,a.tilt,s,o),r}function Zt(t,e,n,a,o){let r=0;null!=n.z?r=n.z:t.basemapTerrain&&t.elevationProvider&&(r=tt(t.elevationProvider,n)),y(Dt,n.x,n.y,r),v(t.spatialReference,Dt,Ut,t.renderSpatialReference),s(Vt,Ut),c(Vt,Vt),S(Ct);const i=[[0,1,2],[3,1,2],[0,4,2],[3,4,2],[0,1,5],[3,1,5],[0,4,5],[3,4,5]];for(let s=0;s<i.length;s++){const e=i[s];let n=a[e[2]];isFinite(n)||(n=r),y(Dt,a[e[0]],a[e[1]],n),z(Dt,t.spatialReference,Dt,t.renderSpatialReference),A(Ct,d(Dt,Dt,Vt))}const l=Z(Ct),m=k(Ct),u=F(Ct),f=1/Math.tan(e.fovX/2),p=1/Math.tan(e.fovY/2),g=.5*Math.sqrt(l*l+u*u)*Math.max(p,f)+.5*m,h=.5*m*p+.5*Math.max(l,u);return Math.max(g,h)/o}async function kt(t,e,n,a,o,r,i,s){s.targetGeometry=n.clone();const c=V(t),l=Zt(t,c,n,a,o);K(t,c,r);const m=jt(r,e)?L.LOCKED:L.ADJUST;return s.scale=_(t,l,s.targetGeometry.latitude),s.camera=await H(t,s.targetGeometry,s.scale,r,m,i),s}function Ft(t,e){if(!e||!t.spatialReference)return null;const n={target:void 0};return"declaredClass"in e||Array.isArray(e)?n.target=e:(Object.assign(n,e),e.center&&!n.target&&(n.target=e.center)),n}function Ot(t){return t&&null!=t.camera&&(t.rotation=ct(t.camera.heading)),t}function Pt(t,e){const n=it;if(!e.length)return n;let a=Number.NEGATIVE_INFINITY;for(let o=0;o<e.length;o++){const t=e[o].screenSpaceBoundingRect;a=Math.max(a,Math.abs(t[0]),Math.abs(t[1]),Math.abs(t[2]),Math.abs(t[3]))}return n-a/Math.min(t.width,t.height)*2}const Dt=w(),Ut=m(),Vt=l(),Ct=G(),It=O(),Jt=w(),Kt=w(),Lt=w(),Nt={heading:0,tilt:0},Wt=new et,Yt={point(t,e,n){n[0]=t.x,n[1]=t.y,null!=t.z&&(n[2]=t.z),e(n)},polygon(t,e,n){const a=t.hasZ;for(let o=0;o<t.rings.length;o++){const r=t.rings[o];for(let t=0;t<r.length;t++)n[0]=r[t][0],n[1]=r[t][1],a&&(n[2]=r[t][2]),e(n)}},polyline(t,e,n){const a=t.hasZ;for(let o=0;o<t.paths.length;o++){const r=t.paths[o];for(let t=0;t<r.length;t++)n[0]=r[t][0],n[1]=r[t][1],a&&(n[2]=r[t][2]),e(n)}},multipoint(t,e,n){const a=t.points,o=t.hasZ;for(let r=0;r<a.length;r++)n[0]=a[r][0],n[1]=a[r][1],o&&(n[2]=a[r][2]),e(n)},extent(t,e,n){null!=t.zmin&&null!=t.zmax?(e(y(n,t.xmin,t.ymin,t.zmin)),e(y(n,t.xmax,t.ymin,t.zmin)),e(y(n,t.xmin,t.ymax,t.zmin)),e(y(n,t.xmax,t.ymax,t.zmin)),e(y(n,t.xmin,t.ymin,t.zmax)),e(y(n,t.xmax,t.ymin,t.zmax)),e(y(n,t.xmin,t.ymax,t.zmax)),e(y(n,t.xmax,t.ymax,t.zmax))):(e(y(n,t.xmin,t.ymin,n[2])),e(y(n,t.xmax,t.ymin,n[2])),e(y(n,t.xmin,t.ymax,n[2])),e(y(n,t.xmax,t.ymax,n[2])))},mesh(t,e,n){const a=t.vertexAttributes&&t.vertexAttributes.position;if(a)for(let o=0;o<a.length;o+=3)e(y(n,a[o],a[o+1],a[o+2]))}};export{dt as create,yt as fromCamera,mt as toCameraAsync,lt as toCameraSync};
5
+ import t from"../../../Camera.js";import"../../../geometry.js";import e from"../../../Graphic.js";import n from"../../../Viewpoint.js";import{result as a}from"../../../core/asyncUtils.js";import"../../../core/has.js";import{cyclicalDegrees as o}from"../../../core/Cyclical.js";import r from"../../../core/Error.js";import{throwIfAborted as i}from"../../../core/promiseUtils.js";import{f as s,t as c}from"../../../chunks/mat3.js";import{a as l}from"../../../chunks/mat3f64.js";import{a as m}from"../../../chunks/mat4f64.js";import{i as u,g as f,m as p,c as g,f as h,s as y,t as d}from"../../../chunks/vec3.js";import{c as w}from"../../../chunks/vec3f64.js";import{project as x,projectWithZConversion as j}from"../../../geometry/projection.js";import{computeTranslationToOriginAndRotation as v}from"../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectPointToVectorWithEngine as b}from"../../../geometry/projection/projectPointToVectorWithEngine.js";import{projectVectorToPoint as R}from"../../../geometry/projection/projectVectorToPoint.js";import{projectVectorToVector as z}from"../../../geometry/projection/projectVectorToVector.js";import{create as G,empty as S,center as B,toRect as T,isPoint as M,expandWithVec3 as A,expandWithAABB as E,width as Z,height as k,depth as F}from"../../../geometry/support/aaBoundingBox.js";import{create as O,isPoint as P}from"../../../geometry/support/aaBoundingRect.js";import{intersectsPoint as D}from"../../../geometry/support/frustum.js";import{getResolutionInMetersForScale as U}from"../../../geometry/support/scaleUtils.js";import{cameraOnContentAlongViewDirection as V}from"../camera/intersectionUtils.js";import{getViewSR as C,fromExtentSync as I,fromExtentAsync as J,internalToExternal as K,OrientationMode as L,scaleToDistance as N,fromCenterDistanceSync as W,fromCenterDistanceAsync as Y,externalToInternal as q,computeScale as X,distanceToScale as _,fromCenterScale as H,directionToHeadingTilt as Q,zoomToScale as $}from"./cameraUtils.js";import{getElevationAtPoint as tt}from"./ElevationProvider.js";import et from"../../../geometry/Point.js";import nt from"../../../geometry/Extent.js";import at from"../../../geometry/SpatialReference.js";import ot from"../../../geometry/Geometry.js";import rt from"../../../geometry/Multipoint.js";const it=.66;function st(t){return 360-o.normalize(t)}function ct(t){return o.normalize(360-t)}function lt(t,e,n){const a=e.camera;if(null!=a)return ut(a,C(t));const{targetGeometry:o}=e;if(null==o)return null;const{camera:r,mode:i}=pt(t,e.rotation,n);if("point"===o.type)return gt(t,e,o,r,i);const s=o.extent;return null==s?null:I(t,s,r.heading,r.tilt,i)}async function mt(t,e,n,a){const o=e.camera;if(null!=o)return ft(o,C(t),a);const{targetGeometry:r}=e;if(null==r)throw new Error("Viewpoint has no targetGeometry!");const{camera:i,mode:s}=pt(t,e.rotation,n);if("point"===r.type)return ht(t,e,r,i,s,a);const c=r.extent;if(null==c)throw new Error("Target geometry has no extent!");return J(t,c,i.heading,i.tilt,s,a)}function ut(t,e){const n=t.position;let a;try{a=x(n,e)}catch(r){return null}const o=t.clone();return o.position=a.clone(),o}async function ft(t,e,n){const a=t.position,o=await j(a,e,{signal:n});i(n);const r=t.clone();return r.position=o.clone(),r}function pt(t,e,n){const a=K(t,t.state.camera);let o=L.ADJUST;return null!=e&&(a.heading=st(e),o=L.LOCKED),null!=n&&(a.tilt=n),{camera:a,mode:o}}function gt(t,e,n,a,o){const r=t.spatialReference;let i;try{i=x(n.clone(),r)}catch(c){return null}const s=null!=e.scale?N(t,e.scale,i.latitude):t.state.camera.distance;return W(t,i,s,a,o)}async function ht(t,e,n,a,o,r){const s=t.spatialReference,c=await j(n.clone(),s,{signal:r});i(r);const l=null!=e.scale?N(t,e.scale,c.latitude):t.state.camera.distance;return Y(t,c,l,a,o,r)}function yt(t,e,a=null){return null==a&&(a=new n),vt(t,null,e.clone(),a)}async function dt(e,a,o){const i=Ft(e,a);if(!i)throw new r("viewpointutils-create:no-target","Missing target for creating viewpoint");const s=new t({fov:e.camera.fov}),c=new n({camera:s});if(i.target instanceof n){return Ot(await Gt(e,i.target,i,o,c))}if(i.target instanceof t)return Ot(await St(e,i.target,o,c));const l=null!=i.scale||null!=i.zoom;if(i.target instanceof nt){const t=i.target.xmin===i.target.xmax||i.target.ymin===i.target.ymax;return Ot(l||t?await Tt(e,i,i.target.center,s,o,c):await Et(e,i,i.target,s,o,c))}const m={boundingBox:S(),hasZ:!1,screenSpaceObjects:[]},u=l?xt(e,i):void 0;if(await zt(e,i.target,u,m,o),isFinite(m.boundingBox[0])){let t;if(B(m.boundingBox,Dt),Wt.x=Dt[0],Wt.y=Dt[1],Wt.z=Dt[2],Wt.spatialReference=e.spatialReference,isFinite(Wt.z)&&m.hasZ?t=M(m.boundingBox):(Wt.z=void 0,t=P(T(m.boundingBox,It))),l||t)return Ot(await Tt(e,i,Wt,s,o,c));const n=Pt(e,m.screenSpaceObjects);return Ot(await kt(e,i,Wt,m.boundingBox,n,s,o,c))}return i.position?Ot(await Mt(e,i,s,c,o)):Ot(await At(e,i,s,o,c))}function wt(t,e){return null==e.scale&&null!=e.zoom?$(t,e.zoom):e.scale}function xt(t,e){const n=wt(t,e);return n?U(n):void 0}function jt(t,e){let n=!1;return null!=e.heading?(t.heading=e.heading,n=!0):null!=e.rotation&&(t.heading=st(e.rotation),n=!0),null!=e.tilt&&(t.tilt=e.tilt,n=!0),null!=e.fov&&(t.fov=e.fov),n}function vt(t,e,n,a){const o=t.spatialReference||at.WGS84;return null==(e=null!=e?e:q(t,n))||(a.targetGeometry=R(e.center,t.renderSpatialReference,o),a.scale=X(t,e),a.rotation=ct(n.heading),a.camera=n),a}async function bt(t,e,n,a){const o=()=>new r("viewpointutils:invalid-geometry","The target is missing a valid geometry");if(!e)throw o();const i=e.spatialReference,s=t.spatialReference,c=t.basemapTerrain.spatialReference;if(!e.hasZ&&t.basemapTerrain){let n;switch(e.type){case"point":n=e;break;case"multipoint":case"polyline":n=e.extent?.center;break;case"mesh":n=e.origin;break;case"extent":n=e.center;break;case"polygon":n=e.centroid}null!=n&&null!=c&&null!=t.elevationProvider?(n=await j(n,c,{signal:a}),Dt[2]=tt(t.elevationProvider,n)??0):Dt[2]=0}const l=Yt[e.type],m=new Array;if(l(e,e.hasZ?t=>{m.push([t[0],t[1],t[2]])}:t=>{m.push([t[0],t[1]])},Dt),0===m.length)throw o();const u=await j(new rt({spatialReference:i,hasZ:e.hasZ,hasM:!1,points:m}),s,{signal:a});if(e.hasZ&&(n.hasZ=!0),e.hasZ)for(const[r,f,p]of u.points)Dt[0]=r,Dt[1]=f,Dt[2]=p,A(n.boundingBox,Dt);else for(const[r,f]of u.points)Dt[0]=r,Dt[1]=f,A(n.boundingBox,Dt)}async function Rt(t,e,n,o,r){const i=await a(t.whenViewForGraphic(e));if(!1===i.ok||null==i.value||!("whenGraphicBounds"in i.value))return void await bt(t,e.geometry,o,r);const s=i.value,c=await a(s.whenGraphicBounds(e,{minDemResolution:n}));if(!1===c.ok||!c.value)return void await bt(t,e.geometry,o,r);const{screenSpaceObjects:l,boundingBox:m}=c.value;E(o.boundingBox,m),l&&l.forEach((t=>{o.screenSpaceObjects.push(t)})),isFinite(m[2])&&(o.hasZ=!0)}async function zt(t,n,a,o,r){if(Array.isArray(n)&&2===n.length){const e=n[0],a=n[1];if("number"==typeof e&&"number"==typeof a)return Wt.x=e,Wt.y=a,Wt.z=void 0,Wt.spatialReference=t.spatialReference?.isGeographic?t.spatialReference:at.WGS84,void await bt(t,Wt,o,r)}n&&"map"in n&&"function"==typeof n.map?await Promise.allSettled(n.map((e=>zt(t,e,a,o,r)))):n instanceof ot?await bt(t,n,o,r):n instanceof e&&await Rt(t,n,a,o,r)}async function Gt(t,e,n,a,o){if(null!=e.camera)return St(t,e.camera,a,o);o.scale=e.scale,o.rotation=e.rotation,o.targetGeometry=null!=e.targetGeometry?e.targetGeometry.clone():null,o.camera=null,null!=n.heading?o.rotation=ct(n.heading):null!=n.rotation&&(o.rotation=n.rotation);const r=wt(t,n);return null!=r&&(o.scale=r),o.camera=await mt(t,o,n.tilt,a),o}async function St(t,e,n,a){const o=t.spatialReference,r=await j(e.position,o,{signal:n});return(e=e.clone()).fov=t.camera.fov,e.position=r,vt(t,null,e,a)}async function Bt(t,e,n,a,o,r,i){const s=t.renderSpatialReference;return await b(e,Lt,s,0,{signal:i}),await b(n,Kt,s,0,{signal:i}),r.targetGeometry=new et(e),o.position=new et(n),h(Jt,Lt,Kt),Q(t,Kt,Jt,a.up,o),r.scale=_(t,p(Kt,Lt),r.targetGeometry.latitude),r.rotation=ct(o.heading),r.camera=o,r}async function Tt(t,e,n,a,o,i){if(null==n)throw new r("createfromcenter","invalid point");i.targetGeometry=n.clone();const s=V(t);if(e.position)return Bt(t,i.targetGeometry,e.position,s,a,i,o);if(e.zoomFactor){const a=s.distance/e.zoomFactor,o=u(Dt,s.viewForward,-a);s.eye=f(Dt,s.center,o),i.scale=_(t,a,n.latitude)}K(t,s,a);const c=jt(a,e)?L.LOCKED:L.ADJUST;if(!e.zoomFactor){const r=wt(t,e);if(null==r){const{renderSpatialReference:e}=t;await b(n,Dt,e,0,{signal:o}),D(s.frustum,Dt)?i.scale=_(t,p(s.eye,Dt),n.latitude):i.scale=X(t,s)}else i.scale=r;i.camera=await H(t,i.targetGeometry,i.scale,a,c,o)}return i}async function Mt(t,e,n,a,o){const r=V(t);g(Jt,r.viewForward),Q(t,r.eye,Jt,r.up,Nt);const i=t.spatialReference,{position:s}=e;if(s){const t=await j(s,i,{signal:o});n.position=t}else n.position=new et;return n.heading=null!=e.heading?e.heading:Nt.heading,n.tilt=null!=e.tilt?e.tilt:Nt.tilt,vt(t,null,n,a)}async function At(t,e,n,a,o){const r=V(t),{spatialReference:i,renderSpatialReference:s}=t;return Tt(t,e,R(r.center,s,i),n,a,o)}async function Et(t,e,n,a,o,r){r.targetGeometry=n.clone();const i=V(t);K(t,i,a);const s=jt(a,e)?L.LOCKED:L.ADJUST;return r.camera=await J(t,n,a.heading,a.tilt,s,o),r}function Zt(t,e,n,a,o){let r=0;null!=n.z?r=n.z:t.basemapTerrain&&t.elevationProvider&&(r=tt(t.elevationProvider,n)),y(Dt,n.x,n.y,r),v(t.spatialReference,Dt,Ut,t.renderSpatialReference),s(Vt,Ut),c(Vt,Vt),S(Ct);const i=[[0,1,2],[3,1,2],[0,4,2],[3,4,2],[0,1,5],[3,1,5],[0,4,5],[3,4,5]];for(let s=0;s<i.length;s++){const e=i[s];let n=a[e[2]];isFinite(n)||(n=r),y(Dt,a[e[0]],a[e[1]],n),z(Dt,t.spatialReference,Dt,t.renderSpatialReference),A(Ct,d(Dt,Dt,Vt))}const l=Z(Ct),m=k(Ct),u=F(Ct),f=1/Math.tan(e.fovX/2),p=1/Math.tan(e.fovY/2),g=.5*Math.sqrt(l*l+u*u)*Math.max(p,f)+.5*m,h=.5*m*p+.5*Math.max(l,u);return Math.max(g,h)/o}async function kt(t,e,n,a,o,r,i,s){s.targetGeometry=n.clone();const c=V(t),l=Zt(t,c,n,a,o);K(t,c,r);const m=jt(r,e)?L.LOCKED:L.ADJUST;return s.scale=_(t,l,s.targetGeometry.latitude),s.camera=await H(t,s.targetGeometry,s.scale,r,m,i),s}function Ft(t,e){if(!e||!t.spatialReference)return null;const n={target:void 0};return"declaredClass"in e||Array.isArray(e)?n.target=e:(Object.assign(n,e),e.center&&!n.target&&(n.target=e.center)),n}function Ot(t){return t&&null!=t.camera&&(t.rotation=ct(t.camera.heading)),t}function Pt(t,e){const n=it;if(!e.length)return n;let a=Number.NEGATIVE_INFINITY;for(let o=0;o<e.length;o++){const t=e[o].screenSpaceBoundingRect;a=Math.max(a,Math.abs(t[0]),Math.abs(t[1]),Math.abs(t[2]),Math.abs(t[3]))}return n-a/Math.min(t.width,t.height)*2}const Dt=w(),Ut=m(),Vt=l(),Ct=G(),It=O(),Jt=w(),Kt=w(),Lt=w(),Nt={heading:0,tilt:0},Wt=new et,Yt={point(t,e,n){n[0]=t.x,n[1]=t.y,null!=t.z&&(n[2]=t.z),e(n)},polygon(t,e,n){const a=t.hasZ;for(let o=0;o<t.rings.length;o++){const r=t.rings[o];for(let t=0;t<r.length;t++)n[0]=r[t][0],n[1]=r[t][1],a&&(n[2]=r[t][2]),e(n)}},polyline(t,e,n){const a=t.hasZ;for(let o=0;o<t.paths.length;o++){const r=t.paths[o];for(let t=0;t<r.length;t++)n[0]=r[t][0],n[1]=r[t][1],a&&(n[2]=r[t][2]),e(n)}},multipoint(t,e,n){const a=t.points,o=t.hasZ;for(let r=0;r<a.length;r++)n[0]=a[r][0],n[1]=a[r][1],o&&(n[2]=a[r][2]),e(n)},extent(t,e,n){null!=t.zmin&&null!=t.zmax?(e(y(n,t.xmin,t.ymin,t.zmin)),e(y(n,t.xmax,t.ymin,t.zmin)),e(y(n,t.xmin,t.ymax,t.zmin)),e(y(n,t.xmax,t.ymax,t.zmin)),e(y(n,t.xmin,t.ymin,t.zmax)),e(y(n,t.xmax,t.ymin,t.zmax)),e(y(n,t.xmin,t.ymax,t.zmax)),e(y(n,t.xmax,t.ymax,t.zmax))):(e(y(n,t.xmin,t.ymin,n[2])),e(y(n,t.xmax,t.ymin,n[2])),e(y(n,t.xmin,t.ymax,n[2])),e(y(n,t.xmax,t.ymax,n[2])))},mesh(t,e,n){const a=t.vertexAttributes&&t.vertexAttributes.position;if(a)for(let o=0;o<a.length;o+=3)e(y(n,a[o],a[o+1],a[o+2]))}};export{dt as create,yt as fromCamera,mt as toCameraAsync,lt as toCameraSync};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{create as e,offset as t,copy as r}from"../../../geometry/support/aaBoundingRect.js";import{RenderTargetType as s,OverlayIndex as i}from"./interfaces.js";import{fromValues as o}from"../webgl-engine/lib/LocalOriginFactory.js";var a;!function(e){e[e.None=0]="None",e[e.ColorAndWater=1]="ColorAndWater",e[e.Highlight=2]="Highlight",e[e.Occluded=3]="Occluded",e[e.ObjectAndLayerIdColor=4]="ObjectAndLayerIdColor"}(a||(a={}));const n=1.3;class h{get extent(){return this._extent}constructor(t,r){this.index=t,this.renderTargets=r,this._extent=e(),this.resolution=0,this.renderLocalOrigin=o(0,0,0,"O"),this.pixelRatio=1,this.mapUnitsPerPixel=1,this.canvasGeometries=new u,this.hasDrapedFeatureSource=!1,this.hasDrapedRasterSource=!1,this.hasTargetWithoutRasterImage=!1,this.index=t}getTargetTexture(e){return this.renderTargets.getTexture(e)}get _needsColorWithoutRasterImage(){return this.hasDrapedRasterSource&&this.hasDrapedFeatureSource&&this.hasTargetWithoutRasterImage}getColorTexture(e){switch(e){case a.ColorAndWater:return this.renderTargets.getTexture(s.Color);case a.Highlight:return this.renderTargets.getTexture(s.Highlight);case a.ObjectAndLayerIdColor:return this.renderTargets.getTexture(s.ObjectAndLayerIdColor);case a.Occluded:return this.renderTargets.getTexture(s.Occluded);case a.None:return null}}getColorTextureNoRasterImage(){return this._needsColorWithoutRasterImage?this.getTargetTexture(s.ColorNoRasterImage):this.hasDrapedFeatureSource?this.getTargetTexture(s.Color):null}getNormalTexture(e){return e===a.ColorAndWater?this.renderTargets.getTexture(s.Water):null}draw(e,t){for(const r of this.renderTargets.targets)(r.type!==s.ColorNoRasterImage||this._needsColorWithoutRasterImage)&&e.drawTarget(this,r,t)}setupGeometryViewsCyclical(e){this.setupGeometryViewsDirect();const r=.001*e.range;if(this._extent[0]-r<=e.min){const r=this.canvasGeometries.extents[this.canvasGeometries.numViews++];t(this._extent,e.range,0,r)}if(this._extent[2]+r>=e.max){const r=this.canvasGeometries.extents[this.canvasGeometries.numViews++];t(this._extent,-e.range,0,r)}}setupGeometryViewsDirect(){this.canvasGeometries.numViews=1,r(this.canvasGeometries.extents[0],this._extent)}hasSomeSizedView(){for(let e=0;e<this.canvasGeometries.numViews;e++){const t=this.canvasGeometries.extents[e];if(t[0]!==t[2]&&t[1]!==t[3])return!0}return!1}applyViewport(e){e.setViewport(this.index===i.INNER?0:this.resolution,0,this.resolution,this.resolution)}}class u{constructor(){this.extents=[e(),e(),e()],this.numViews=0}}export{h as Overlay,a as OverlaySource,n as OverlayStretch};
5
+ import{create as e,offset as t,copy as s}from"../../../geometry/support/aaBoundingRect.js";import{OverlayIndex as r}from"./interfaces.js";import{OverlayContent as i}from"./OverlayContent.js";import{fromValues as o}from"../webgl-engine/lib/LocalOriginFactory.js";const a=1.3;class n{get extent(){return this._extent}constructor(t,s){this.index=t,this.renderTargets=s,this._extent=e(),this.resolution=0,this.renderLocalOrigin=o(0,0,0,"O"),this.pixelRatio=1,this.mapUnitsPerPixel=1,this.canvasGeometries=new h,this.hasDrapedFeatureSource=!1,this.hasDrapedRasterSource=!1,this.hasTargetWithoutRasterImage=!1,this.index=t}get _needsColorWithoutRasterImage(){return this.hasDrapedRasterSource&&this.hasDrapedFeatureSource&&this.hasTargetWithoutRasterImage}getTexture(e){if(null!=e)return e===i.ColorNoRasterImage&&!this._needsColorWithoutRasterImage&&this.hasDrapedFeatureSource?this.renderTargets.getTexture(i.Color):this.renderTargets.getTexture(e)}draw(e,t){for(const s of this.renderTargets.targets)(s.content!==i.ColorNoRasterImage||this._needsColorWithoutRasterImage)&&e.drawTarget(this,s,t)}setupGeometryViewsCyclical(e){this.setupGeometryViewsDirect();const s=.001*e.range;if(this._extent[0]-s<=e.min){const s=this.canvasGeometries.extents[this.canvasGeometries.numViews++];t(this._extent,e.range,0,s)}if(this._extent[2]+s>=e.max){const s=this.canvasGeometries.extents[this.canvasGeometries.numViews++];t(this._extent,-e.range,0,s)}}setupGeometryViewsDirect(){this.canvasGeometries.numViews=1,s(this.canvasGeometries.extents[0],this._extent)}hasSomeSizedView(){for(let e=0;e<this.canvasGeometries.numViews;e++){const t=this.canvasGeometries.extents[e];if(t[0]!==t[2]&&t[1]!==t[3])return!0}return!1}applyViewport(e){e.setViewport(this.index===r.INNER?0:this.resolution,0,this.resolution,this.resolution)}}class h{constructor(){this.extents=[e(),e(),e()],this.numViews=0}}export{n as Overlay,a as OverlayStretch};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
+ */
5
+ var o;!function(o){o[o.Color=0]="Color",o[o.ColorNoRasterImage=1]="ColorNoRasterImage",o[o.Highlight=2]="Highlight",o[o.WaterNormal=3]="WaterNormal",o[o.Occluded=4]="Occluded",o[o.ObjectAndLayerIdColor=5]="ObjectAndLayerIdColor"}(o||(o={}));export{o as OverlayContent};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{Cyclical as r,cyclicalPI as s}from"../../../core/Cyclical.js";import has from"../../../core/has.js";import{clamp as i,deg2rad as a}from"../../../core/mathUtils.js";import{watch as n,sync as o}from"../../../core/reactiveUtils.js";import{Milliseconds as l}from"../../../core/time.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import{subclass as c}from"../../../core/accessorSupport/decorators/subclass.js";import{c as d}from"../../../chunks/vec2.js";import{e as u,g as p,z as _,i as m,h as y}from"../../../chunks/vec3.js";import{c as g}from"../../../chunks/vec3f64.js";import{t as v,b as f,a as R}from"../../../chunks/vec4.js";import{c as O,f as w}from"../../../chunks/vec4f64.js";import{getReferenceEllipsoid as T}from"../../../geometry/ellipsoidUtils.js";import{projectVectorToVector as x}from"../../../geometry/projection/projectVectorToVector.js";import{create as D,width as S,copy as E,center as P,height as M,intersection as I,contains as C,intersects as U,offset as j}from"../../../geometry/support/aaBoundingRect.js";import{create as b,wrap as N}from"../../../geometry/support/ray.js";import{b as A,e as G,t as L}from"../../../chunks/sphere.js";import{angleAroundAxis as V}from"../../../geometry/support/vector.js";import{y2lat as k}from"../../../geometry/support/webMercatorUtils.js";import{viewAngle as q}from"../state/utils/viewUtils.js";import{debugFlags as F}from"../support/debugFlags.js";import{PointGraphics as B}from"../support/debugUtils.js";import{OverlayIndex as H}from"./interfaces.js";import{OverlayRenderer as z}from"./OverlayRenderer.js";import{RenderRequestType as W}from"../webgl-engine/lib/basicInterfaces.js";import{newIntersector as Y}from"../webgl-engine/lib/Intersector.js";import{fromValues as X}from"../webgl-engine/lib/LocalOriginFactory.js";import{UpdateParameters as K}from"../webgl-engine/lib/Material.js";import{SortedRenderGeometryRenderer as Z}from"../webgl-engine/lib/SortedRenderGeometryRenderer.js";import{applyTextureResizeModulo as J}from"../webgl-engine/lib/textureUtils.js";import{removeLoadedShaderModules as Q}from"../webgl-engine/parts/requireUtils.js";import{TaskPriority as $,noBudget as ee,Task as te}from"../../support/Scheduler.js";const re=1.3,se=[[-.1,-2,3.9,2],[-.1,-3.9,3.9,.1],[-2,-3.9,2,.1],[-3.9,-3.9,.1,.1],[-3.9,-2,.1,2],[-3.9,-.1,.1,3.9],[-2,-.1,2,3.9],[-.1,-.1,3.9,3.9]];let ie,ae=class extends t{get running(){return this._placementDirty&&(this._drapeSources.size>0||this.view.graphics.length>0||F.OVERLAY_DRAW_DEBUG_TEXTURE)&&!!this._spatialReference&&!this.suspended&&this.surface.ready}get _isSpherical(){return this.view.state.isGlobal}get _worldToPCSRatio(){return null!=this._spatialReference&&this._spatialReference.isGeographic&&!this.view.state.isLocal?T(this._spatialReference).metersPerDegree:1}get _overlayStretch(){return re/this.view.resolutionScale}get suspended(){return this.surface.suspended}get updating(){return this.running||this.renderer.updating||this._contentUpdated}get rendersOccluded(){return this.renderer.rendersOccluded}constructor(e){super(e),this._spatialReference=null,this._renderSR=null,this._overlaySREqualsRenderSR=!0,this._drapeSources=new Set,this._drapeTargets=new Set,this._placementDirty=!1,this._contentUpdated=!1,this._drawTexturesDirty=!1,this._drawTexturesAnimateDirty=!1,this._longitudeCyclical=null,this._latestOriginId=0,this._maxResolution=has("esri-mobile")?2048:4096,this._animationTimeLast=0,this._removeRenderOverlay=()=>{}}initialize(){const e=this.view;this.renderer=new z({view:e,worldToPCSRatio:this._worldToPCSRatio,spatialReference:this._spatialReference}),e._stage.renderer.renderPlugins.add(this.renderer);const t=()=>this.setDrawTexturesDirty();this._groundIntersector=Y(this.view.state.viewingMode),this._groundIntersector.options.backfacesTerrain=!0,this._groundIntersector.options.invisibleTerrain=!0,this._groundIntersector.options.hud=!1,this.addHandles([n((()=>this.renderer.hasHighlights),t),this.renderer.events.on("has-water",(t=>e._stage?.renderer.setParameters({hasOverlayWater:t}))),this.renderer.events.on("renders-occluded",(()=>{t(),this.notifyChange("rendersOccluded")})),this.renderer.events.on("content-changed",t),n((()=>e.state.camera.pixelRatio),t),n((()=>e.state.alignPixelEnabled),t),this.renderer.events.on("textures-disposed",(()=>this.updateOverlayResult())),n((()=>[e.pointsOfInterest?.renderPointOfView,e.pointsOfInterest?.centerOnSurfaceFrequent?.location]),(()=>this.setPlacementDirty())),n((()=>[e.state?.pixelRatio,e.state?.contentPixelRatio]),(()=>this.setPlacementDirty()),o),this.surface.on("elevation-change",(()=>this.setPlacementDirty())),e.on("resize",(()=>this.setPlacementDirty())),e.resourceController.scheduler.registerTask($.OVERLAY,this),e._stage.renderView.events.on("force-camera-for-screenshot",(e=>{this._updateOverlays(ee,e.camera,W.BACKGROUND),this.renderer.hasOverlays&&this._drawOverlays(this.renderer.overlays,W.BACKGROUND,e)}))]);let r=e=>this._renderOverlay(e);this._removeRenderOverlay=()=>r=()=>{},e._stage?.renderer.setParameters({renderOverlay:e=>r(e)})}_renderOverlay(e){this._contentUpdated=!1;const t=this.renderer;t.processSyncDrapeSources(),t.hasOverlays&&(this._dispatchAnimationUpdate(e),this._drawOverlays(t.overlays,W.UPDATE,this.view.state))}destroy(){this._removeRenderOverlay(),this.view?._stage.renderer.renderPlugins.add(this.renderer),this.view?._stage.renderer.setParameters({renderOverlay:()=>{}}),null!=ie&&(ie.hide(),ie=null)}get hasOverlays(){return this.renderer.hasOverlays}setSpatialReference(e){this._spatialReference=e,this.renderer.spatialReference=e,this._longitudeCyclical=null;const t=this.view.renderSpatialReference;null!=e&&null!=t?(this._renderSR=t,this._overlaySREqualsRenderSR=e.equals(this._renderSR),this._isSpherical&&(this._longitudeCyclical=e.isWebMercator?new r(-20037508.342787,20037508.342787):new r(-180,180),this.renderer.longitudeCyclical=this._longitudeCyclical),this.renderer&&(this.renderer.worldToPCSRatio=this._worldToPCSRatio)):this.renderer.disposeOverlays()}registerDrapeSource(e,t,r){this._drapeSources.add(e),this.renderer.ensureOverlays(this._drapeTargets,this._drapeSources);const s=this.renderer.createDrapeSourceRenderer(e,t,r);return this._updateDrapeSourceExtent(e),this._setContentDirty(),this.notifyChange("running"),s}registerGeometryDrapeSource(e){return this.registerDrapeSource(e,Z)}_updateDrapeSourceExtent(e){2===this.renderer.overlays.length&&null!=e.setDrapingExtent&&null!=this._spatialReference&&e.setDrapingExtent(this.renderer.overlays,this._spatialReference)}unregisterDrapeSource(e){this._drapeSources.has(e)&&(this._drapeSources.delete(e),this.renderer.removeDrapeSourceRenderer(e),this.renderer.ensureDrapeSources(this._drapeSources),this._setContentDirty(),this.notifyChange("running"))}registerDrapeTarget(e){this._drapeTargets.add(e),this.renderer.ensureOverlays(this._drapeTargets,this._drapeSources)}updateOverlayResult(){this.view._stage?.renderer.setParameters({overlays:this.renderer.overlays})}unregisterDrapeTarget(e){this._drapeTargets.delete(e),this.renderer.ensureDrapeTargets(this._drapeTargets)}_setContentDirty(){this.setPlacementDirty(),this.setDrawTexturesDirty()}setPlacementDirty(){this._placementDirty=!0}runTask(e){return this._updateOverlays(e,this.view.state.contentCamera,W.UPDATE)}_updateOverlays(e,t,r){if(!this._spatialReference)return te.YIELD;const s=this._computeOverlayResolution(t);this._computeOverlayExtents(t,s,ce),this.renderer.ensureOverlays(this._drapeTargets,this._drapeSources,ce.stretch);const i=this._updateOverlay(H.INNER,ce.inner,s,1*ce.pixelRatioAdjustment,ce.mapUnitsPerPixel),a=S(ce.inner)/S(ce.outer),n=this._updateOverlay(H.OUTER,ce.outer,s,a*ce.pixelRatioAdjustment,ce.mapUnitsPerPixel);i!==_e.EXTENT&&n!==_e.EXTENT||(this._drapeSources.forEach((e=>this._updateDrapeSourceExtent(e))),this.surface.updateTileOverlayParams(r)),i===_e.NONE&&n===_e.NONE||this.setDrawTexturesDirty(),this._placementDirty=!1,e.madeProgress()}_computeOverlayResolution(e){const t=this.view.state.contentPixelRatio*this.view.resolutionScale,r=e.fullWidth/e.pixelRatio*t,s=e.fullHeight/e.pixelRatio*t,i=Math.ceil(1.5*Math.max(r,s));return Math.min(J(i),this._maxResolution)}_updateOverlay(e,t,r,s,i){if(0===this.renderer.overlays.length)return _e.NONE;const a=this.renderer.overlays[e],n=a.mapUnitsPerPixel;if(a.mapUnitsPerPixel=i,a.pixelRatio=s,ne(t,a.extent)&&r===a.resolution)return n===i?_e.NONE:_e.RERENDER_ONLY;E(a.extent,t),a.resolution=r;const o=P(a.extent);return a.renderLocalOrigin=X(o[0],o[1],0,"OV_"+this._latestOriginId++),_e.EXTENT}setTileParameters(e){const t=e.renderData.overlay;if(this.renderer.overlays.length>0){const r=this.renderer.overlays[H.INNER],s=this.renderer.overlays[H.OUTER],i=e.extent;this._rectInsideRect(r.extent,i)||this._rectanglesOverlap(i,r.extent)||this._rectanglesOverlap(i,s.extent)?(this._setTileOverlayData(i,H.INNER,t),this._setTileOverlayData(i,H.OUTER,t)):(this._clearTileOverlayData(H.INNER,t),this._clearTileOverlayData(H.OUTER,t))}else this._clearTileOverlayData(H.INNER,t),this._clearTileOverlayData(H.OUTER,t)}overlayPixelSizeInMapUnits(e,t){if(0===this.renderer.overlays.length)return t();const r=this.renderer.overlays[H.INNER],s=this.renderer.overlays[H.OUTER],i=this._pointIsInExtent(e,r.extent)?r:s;return(i.extent[2]-i.extent[0])/i.resolution}_setTileOverlayData(e,t,r){if(0===this.renderer.overlays.length)return;const s=this.renderer.overlays[t].extent,i=S(s),a=M(s);let n=e[0];if(this._longitudeCyclical){n=this._longitudeCyclical.minimalMonotonic(s[0],n);const t=this._longitudeCyclical.minimalMonotonic(s[0],e[2]);n>t&&(n=t-(e[2]-e[0]))}r.setScale(t,S(e)/i,M(e)/a),r.setOffset(t,(n-s[0])/i,(e[1]-s[1])/a)}_clearTileOverlayData(e,t){t.setScale(e,-1,-1),t.setOffset(e,-1,-1)}async reloadShaders(){Q(),await this.renderer.reloadShaders(),this.setDrawTexturesDirty(),this.runTask(ee)}_dispatchAnimationUpdate(e){const t=l(e-this._animationTimeLast);if(t>=this.surface.view._stage.renderer.animationTimestep||null!=this.view.state.forcedAnimationTime||this._drawTexturesDirty||this._drawTexturesAnimateDirty){const r=l(t/this.surface.view._stage.renderer.animationTimeDilation),s=new K(this.view.state.camera,r,this.view.state.forcedAnimationTime);this.renderer.updateAnimation(s)&&(this._drawTexturesAnimateDirty=!0),this._animationTimeLast=e}}setDrawTexturesDirty(){this.renderer.hasOverlays?(this._contentUpdated=!0,this._drawTexturesDirty=!0,this.view._stage.renderView.requestRender()):this.setPlacementDirty()}_intersectGroundFromView(e,t,r,s){const i=this.view.sceneIntersectionHelper.getCenterRayWithSubpixelOffset(e,pe,t,r);if(null==i)return!1;const a=i.origin,n=u(he,i.origin,i.direction);return this._groundIntersector.reset(a,n,e),this._groundIntersector.intersect([]),this.view.basemapTerrain.intersect(this._groundIntersector,null,a,n),this._groundIntersector.results.min.getIntersectionPoint(s)}_findHorizonBasedPointOfInterest(e,t){let r=.5;const a=.55,n=this.view.renderCoordsHelper.getAltitude(e.eye),o=this.view.pointsOfInterest.centerOnSurfaceFrequent,l=1e-5,h=i(o.estimatedSurfaceAltitude,e.aboveGround?-1/0:n+l,e.aboveGround?n-l:1/0),c=e.aboveGround;if("global"===this.view.viewingMode){const t=he;A(G(L,T(this.view.spatialReference).radius+h),N(e.eye,e.viewForward),t),p(t,t,e.eye);const i=s.normalize(V(e.viewForward,t,e.viewRight))/e.fovY+.5,n=i<=0||i>=1?.5:a;r=c?n*i:i+n*(1-i)}else{const t=.5*Math.PI-Math.acos(-e.viewForward[2]),s=Math.tan(t),n=w(0,s,1,0),o=v(n,n,e.projectionMatrix)[1],l=i(.5+.5*o,0,1);r=1===l||0===l?.5:c?l*a:1-(1-l)*a}return!!this._intersectGroundFromView(e,.5,r,t)&&_(t,e.eye)<o.distance*o.distance}_computeOverlayExtents(e,t,r){const s=this.view.pointsOfInterest.centerOnSurfaceFrequent.renderLocation,i=g();this._findHorizonBasedPointOfInterest(e,i)||m(i,s),F.OVERLAY_SHOW_CENTER?(null==ie&&(ie=new B(this.view.graphics,"red")),ie.show(i,this._renderSR)):null!=ie&&ie.hide();const n=Math.max(.1,y(e.eye,i)),o=q(this.view.renderCoordsHelper,s,e.eye);this._overlaySREqualsRenderSR||x(i,this._renderSR,i,this._spatialReference);const l=this.surface.extent,h=!this._isSpherical&&this._spatialReference&&this._spatialReference.isGeographic,c=h&&this._spatialReference?1/T(this._spatialReference).metersPerDegree:1,u=this.view.state.contentPixelRatio,p=e.perScreenPixelRatio/u*n*c;r.mapUnitsPerPixel=p/this._worldToPCSRatio,r.stretch=this._overlayStretch;let _=t*p/2*r.stretch,v=!1,O=h?90:1/0;this._isSpherical&&l&&this._spatialReference&&(this._spatialReference.isWebMercator?(_/=Math.cos(k(i[1])),O=l[3]):(v=!0,_/=T(this._spatialReference).metersPerDegree,O=90),_>=O&&(_=O,i[1]=0,this._spatialReference.isWebMercator&&(i[0]=0)));let w=1;v&&(w=1/Math.max(.2,Math.cos(Math.abs(a(i[1])))),_*w>180&&(w=180/_),r.mapUnitsPerPixel*=w);const D=Math.log(2)/12;_=Math.exp(Math.round(Math.log(_)/D)*D);const P=_*w,M=32,U=.5*t/(M*P),j=.5*t/(M*_);i[0]=Math.round(i[0]*U)/U,i[1]=Math.round(i[1]*j)/j;const b=r.inner;b[0]=i[0]-P,b[1]=i[1]-_,b[2]=i[0]+P,b[3]=i[1]+_,this._isSpherical&&this._shiftExtentToFitBounds(b,1/0,O);const N=r.outer;if(6*P>S(l))E(N,l);else{if(Math.PI/2-Math.abs(o-Math.PI/2)<=.25*Math.PI)N[0]=b[0]-P,N[1]=b[1]-_,N[2]=b[2]+P,N[3]=b[3]+_;else{x(e.eye,this._renderSR,he,this._spatialReference),d(le,i,he);let t=-Math.atan2(le[1],le[0])+.125*Math.PI;t<0&&(t+=2*Math.PI);const r=Math.floor(t/(.25*Math.PI));f(le,se[r],2*_),le[0]*=w,le[2]*=w,R(N,b,le)}}if(this._isSpherical)N[0]=this._longitudeCyclical.clamp(N[0]),N[2]=this._longitudeCyclical.clamp(N[2]),N[1]=Math.max(N[1],-O),N[3]=Math.min(N[3],O);else{const e=I(b,l,de),t=I(N,l,ue);C(e,t)&&(N[2]=N[0],N[3]=N[1])}const A=Math.abs(b[2]-b[0])/t;r.mapUnitsPerPixel=Math.max(r.mapUnitsPerPixel,A),r.pixelRatioAdjustment=r.mapUnitsPerPixel/A}_drawOverlays(e,t,r){if(0===e.length||!this._drawTexturesDirty&&!this._drawTexturesAnimateDirty)return;const s=this._drawTexturesDirty;this._drawTexturesDirty=!1,this._drawTexturesAnimateDirty=!1;const i=this.renderer.computeValidity();this.renderer.releaseRenderTargets(),this._drawOverlay(e[H.INNER],r),this._drawOverlay(e[H.OUTER],r);i!==this.renderer.computeValidity()&&this.surface.updateTileOverlayParams(W.UPDATE),this.updateOverlayResult(),s?(this.surface.requestRender(t),t===W.UPDATE&&this.surface.requestUpdate()):this.surface.requestRender(W.BACKGROUND)}_drawOverlay(e,t){this._longitudeCyclical?e.setupGeometryViewsCyclical(this._longitudeCyclical):e.setupGeometryViewsDirect(),e.draw(this.renderer,t)}_rectanglesOverlap(e,t){return null!=e&&(this._longitudeCyclical?(this._longitudeCyclical.contains(t[0],t[2],e[0])||this._longitudeCyclical.contains(t[0],t[2],e[2])||this._longitudeCyclical.contains(e[0],e[2],t[0]))&&!(e[1]>t[3]||e[3]<t[1]):U(e,t))}_rectInsideRect(e,t){return null!=t&&(this._longitudeCyclical?this._longitudeCyclical.contains(e[0],e[2],t[0])&&this._longitudeCyclical.contains(e[0],e[2],t[2])&&t[1]>e[1]&&t[3]<e[3]:C(e,t))}_pointIsInExtent(e,t){if(this._longitudeCyclical)return this._longitudeCyclical.contains(t[0],t[2],e.x)&&e.y>=t[1]&&e.y<=t[3];const r=e.x,s=e.y;return r>t[0]&&r<t[2]&&s>t[1]&&s<t[3]}_shiftExtentToFitBounds(e,t,r){let s=0,i=0;e[0]<-t?s=e[0]+t:e[2]>t&&(s=t-e[2]),e[1]<-r?i=e[1]+r:e[3]>r&&(i=r-e[3]),j(e,s,i)}get test(){return{renderer:this.renderer,update:()=>this.runTask(ee)}}};function ne(e,t){const r=1e-5,s=F.TESTS_DISABLE_OPTIMIZATIONS?0:r*Math.max(e[2]-e[0],e[3]-e[1],t[2]-t[0],t[3]-t[1]);return Math.abs(t[0]-e[0])<=s&&Math.abs(t[1]-e[1])<=s&&Math.abs(t[2]-e[2])<=s&&Math.abs(t[3]-e[3])<=s}e([h()],ae.prototype,"_spatialReference",void 0),e([h({readOnly:!0})],ae.prototype,"running",null),e([h()],ae.prototype,"_placementDirty",void 0),e([h()],ae.prototype,"_contentUpdated",void 0),e([h()],ae.prototype,"_isSpherical",null),e([h()],ae.prototype,"_worldToPCSRatio",null),e([h({autoDestroy:!0})],ae.prototype,"renderer",void 0),e([h({constructOnly:!0})],ae.prototype,"view",void 0),e([h({constructOnly:!0})],ae.prototype,"surface",void 0),e([h()],ae.prototype,"suspended",null),e([h()],ae.prototype,"updating",null),e([h({type:Boolean})],ae.prototype,"rendersOccluded",null),ae=e([c("esri.views.3d.terrain.OverlayManager")],ae);class oe{constructor(){this.inner=D(),this.outer=D(),this.mapUnitsPerPixel=0,this.pixelRatioAdjustment=1,this.stretch=re}}const le=O(),he=g(),ce=new oe,de=D(),ue=D(),pe=b();var _e;!function(e){e[e.NONE=0]="NONE",e[e.EXTENT=1]="EXTENT",e[e.RERENDER_ONLY=2]="RERENDER_ONLY"}(_e||(_e={}));export{ae as OverlayManager};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{Cyclical as r,cyclicalPI as s}from"../../../core/Cyclical.js";import has from"../../../core/has.js";import{clamp as i,deg2rad as a}from"../../../core/mathUtils.js";import{watch as n,sync as o}from"../../../core/reactiveUtils.js";import{Milliseconds as l}from"../../../core/time.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import{subclass as c}from"../../../core/accessorSupport/decorators/subclass.js";import{c as d}from"../../../chunks/vec2.js";import{g as u,f as p,x as _,c as m,m as y}from"../../../chunks/vec3.js";import{c as g}from"../../../chunks/vec3f64.js";import{t as v,b as f,a as R}from"../../../chunks/vec4.js";import{c as w,a as O}from"../../../chunks/vec4f64.js";import{getReferenceEllipsoid as T}from"../../../geometry/ellipsoidUtils.js";import{projectVectorToVector as x}from"../../../geometry/projection/projectVectorToVector.js";import{create as D,width as S,copy as E,center as P,height as M,intersection as I,contains as C,intersects as U,offset as j}from"../../../geometry/support/aaBoundingRect.js";import{create as b,wrap as N}from"../../../geometry/support/ray.js";import{b as A,e as G,t as L}from"../../../chunks/sphere.js";import{angleAroundAxis as V}from"../../../geometry/support/vector.js";import{y2lat as k}from"../../../geometry/support/webMercatorUtils.js";import{viewAngle as q}from"../state/utils/viewUtils.js";import{debugFlags as F}from"../support/debugFlags.js";import{PointGraphics as B}from"../support/debugUtils.js";import{OverlayIndex as H}from"./interfaces.js";import{OverlayRenderer as W}from"./OverlayRenderer.js";import{RenderRequestType as Y}from"../webgl-engine/lib/basicInterfaces.js";import{newIntersector as z}from"../webgl-engine/lib/Intersector.js";import{fromValues as X}from"../webgl-engine/lib/LocalOriginFactory.js";import{UpdateParameters as K}from"../webgl-engine/lib/Material.js";import{SortedRenderGeometryRenderer as Z}from"../webgl-engine/lib/SortedRenderGeometryRenderer.js";import{applyTextureResizeModulo as J}from"../webgl-engine/lib/textureUtils.js";import{removeLoadedShaderModules as Q}from"../webgl-engine/parts/requireUtils.js";import{TaskPriority as $,noBudget as ee,Task as te}from"../../support/Scheduler.js";const re=1.3,se=[[-.1,-2,3.9,2],[-.1,-3.9,3.9,.1],[-2,-3.9,2,.1],[-3.9,-3.9,.1,.1],[-3.9,-2,.1,2],[-3.9,-.1,.1,3.9],[-2,-.1,2,3.9],[-.1,-.1,3.9,3.9]];let ie,ae=class extends t{get running(){return this._placementDirty&&(this._drapeSources.size>0||this.view.graphics.length>0||F.OVERLAY_DRAW_DEBUG_TEXTURE)&&!!this._spatialReference&&!this.suspended&&this.surface.ready}get _isSpherical(){return this.view.state.isGlobal}get _worldToPCSRatio(){return null!=this._spatialReference&&this._spatialReference.isGeographic&&!this.view.state.isLocal?T(this._spatialReference).metersPerDegree:1}get _overlayStretch(){return re/this.view.resolutionScale}get suspended(){return this.surface.suspended}get updating(){return this.running||this.renderer.updating||this._contentUpdated}get rendersOccluded(){return this.renderer.rendersOccluded}constructor(e){super(e),this._spatialReference=null,this._renderSR=null,this._overlaySREqualsRenderSR=!0,this._drapeSources=new Set,this._drapeTargets=new Set,this._placementDirty=!1,this._contentUpdated=!1,this._drawTexturesDirty=!1,this._drawTexturesAnimateDirty=!1,this._longitudeCyclical=null,this._latestOriginId=0,this._maxResolution=has("esri-mobile")?2048:4096,this._animationTimeLast=0}initialize(){const e=this.view;this.renderer=new W({view:e,worldToPCSRatio:this._worldToPCSRatio,spatialReference:this._spatialReference}),e._stage.renderer.renderPlugins.add(this.renderer);const t=()=>this.setDrawTexturesDirty();this._groundIntersector=z(this.view.state.viewingMode),this._groundIntersector.options.backfacesTerrain=!0,this._groundIntersector.options.invisibleTerrain=!0,this._groundIntersector.options.hud=!1,this.addHandles([n((()=>this.renderer.hasHighlights),t),this.renderer.events.on("has-water",(t=>e._stage?.renderer.setParameters({hasOverlayWater:t}))),this.renderer.events.on("renders-occluded",(()=>{t(),this.notifyChange("rendersOccluded")})),this.renderer.events.on("content-changed",t),n((()=>e.state.camera.pixelRatio),t),n((()=>e.state.alignPixelEnabled),t),this.renderer.events.on("textures-disposed",(()=>this.updateOverlayResult())),n((()=>[e.pointsOfInterest?.renderPointOfView,e.pointsOfInterest?.centerOnSurfaceFrequent?.location]),(()=>this.setPlacementDirty())),n((()=>[e.state?.pixelRatio,e.state?.contentPixelRatio]),(()=>this.setPlacementDirty()),o),this.surface.on("elevation-change",(()=>this.setPlacementDirty())),e.on("resize",(()=>this.setPlacementDirty())),e.resourceController.scheduler.registerTask($.OVERLAY,this),e._stage.renderView.events.on("force-camera-for-screenshot",(e=>{this._updateOverlays(ee,e.camera,Y.BACKGROUND),this.renderer.hasOverlays&&this._drawOverlays(this.renderer.overlays,Y.BACKGROUND,e)}))]),e._stage.renderer.renderOverlay=e=>this._renderOverlay(e)}_renderOverlay(e){this._contentUpdated=!1,this.renderer.processSyncDrapeSources(),this.renderer.hasOverlays&&(this._dispatchAnimationUpdate(e),this._drawOverlays(this.renderer.overlays,Y.UPDATE,this.view.state))}destroy(){this.view?._stage&&(this.view._stage.renderer.renderPlugins.remove(this.renderer),this.view._stage.renderer.renderOverlay=()=>{}),ie&&(ie.hide(),ie=null)}get hasOverlays(){return this.renderer.hasOverlays}setSpatialReference(e){this._spatialReference=e,this.renderer.spatialReference=e,this._longitudeCyclical=null;const t=this.view.renderSpatialReference;null!=e&&null!=t?(this._renderSR=t,this._overlaySREqualsRenderSR=e.equals(this._renderSR),this._isSpherical&&(this._longitudeCyclical=e.isWebMercator?new r(-20037508.342787,20037508.342787):new r(-180,180),this.renderer.longitudeCyclical=this._longitudeCyclical),this.renderer&&(this.renderer.worldToPCSRatio=this._worldToPCSRatio)):this.renderer.disposeOverlays()}registerDrapeSource(e,t,r){this._drapeSources.add(e),this.renderer.ensureOverlays(this._drapeTargets,this._drapeSources);const s=this.renderer.createDrapeSourceRenderer(e,t,r);return this._updateDrapeSourceExtent(e),this._setContentDirty(),this.notifyChange("running"),s}registerGeometryDrapeSource(e){return this.registerDrapeSource(e,Z)}_updateDrapeSourceExtent(e){2===this.renderer.overlays.length&&null!=e.setDrapingExtent&&null!=this._spatialReference&&e.setDrapingExtent(this.renderer.overlays,this._spatialReference)}unregisterDrapeSource(e){this._drapeSources.has(e)&&(this._drapeSources.delete(e),this.renderer.removeDrapeSourceRenderer(e),this.renderer.ensureDrapeSources(this._drapeSources),this._setContentDirty(),this.notifyChange("running"))}registerDrapeTarget(e){this._drapeTargets.add(e),this.renderer.ensureOverlays(this._drapeTargets,this._drapeSources)}updateOverlayResult(){this.view._stage?.renderer.setParameters({overlays:this.renderer.overlays})}unregisterDrapeTarget(e){this._drapeTargets.delete(e),this.renderer.ensureDrapeTargets(this._drapeTargets)}_setContentDirty(){this.setPlacementDirty(),this.setDrawTexturesDirty()}setPlacementDirty(){this._placementDirty=!0}runTask(e){return this._updateOverlays(e,this.view.state.contentCamera,Y.UPDATE)}_updateOverlays(e,t,r){if(!this._spatialReference)return te.YIELD;const s=this._computeOverlayResolution(t);this._computeOverlayExtents(t,s,ce),this.renderer.ensureOverlays(this._drapeTargets,this._drapeSources,ce.stretch);const i=this._updateOverlay(H.INNER,ce.inner,s,1*ce.pixelRatioAdjustment,ce.mapUnitsPerPixel),a=S(ce.inner)/S(ce.outer),n=this._updateOverlay(H.OUTER,ce.outer,s,a*ce.pixelRatioAdjustment,ce.mapUnitsPerPixel);i!==_e.EXTENT&&n!==_e.EXTENT||(this._drapeSources.forEach((e=>this._updateDrapeSourceExtent(e))),this.surface.updateTileOverlayParams(r)),i===_e.NONE&&n===_e.NONE||this.setDrawTexturesDirty(),this._placementDirty=!1,e.madeProgress()}_computeOverlayResolution(e){const t=this.view.state.contentPixelRatio*this.view.resolutionScale,r=e.fullWidth/e.pixelRatio*t,s=e.fullHeight/e.pixelRatio*t,i=Math.ceil(1.5*Math.max(r,s));return Math.min(J(i),this._maxResolution)}_updateOverlay(e,t,r,s,i){if(0===this.renderer.overlays.length)return _e.NONE;const a=this.renderer.overlays[e],n=a.mapUnitsPerPixel;if(a.mapUnitsPerPixel=i,a.pixelRatio=s,ne(t,a.extent)&&r===a.resolution)return n===i?_e.NONE:_e.RERENDER_ONLY;E(a.extent,t),a.resolution=r;const o=P(a.extent);return a.renderLocalOrigin=X(o[0],o[1],0,"OV_"+this._latestOriginId++),_e.EXTENT}setTileParameters(e){const t=e.renderData.overlay;if(this.renderer.overlays.length>0){const r=this.renderer.overlays[H.INNER],s=this.renderer.overlays[H.OUTER],i=e.extent;this._rectInsideRect(r.extent,i)||this._rectanglesOverlap(i,r.extent)||this._rectanglesOverlap(i,s.extent)?(this._setTileOverlayData(i,H.INNER,t),this._setTileOverlayData(i,H.OUTER,t)):(this._clearTileOverlayData(H.INNER,t),this._clearTileOverlayData(H.OUTER,t))}else this._clearTileOverlayData(H.INNER,t),this._clearTileOverlayData(H.OUTER,t)}overlayPixelSizeInMapUnits(e,t){if(0===this.renderer.overlays.length)return t();const r=this.renderer.overlays[H.INNER],s=this.renderer.overlays[H.OUTER],i=this._pointIsInExtent(e,r.extent)?r:s;return(i.extent[2]-i.extent[0])/i.resolution}_setTileOverlayData(e,t,r){if(0===this.renderer.overlays.length)return;const s=this.renderer.overlays[t].extent,i=S(s),a=M(s);let n=e[0];if(this._longitudeCyclical){n=this._longitudeCyclical.minimalMonotonic(s[0],n);const t=this._longitudeCyclical.minimalMonotonic(s[0],e[2]);n>t&&(n=t-(e[2]-e[0]))}r.setScale(t,S(e)/i,M(e)/a),r.setOffset(t,(n-s[0])/i,(e[1]-s[1])/a)}_clearTileOverlayData(e,t){t.setScale(e,-1,-1),t.setOffset(e,-1,-1)}async reloadShaders(){Q(),await this.renderer.reloadShaders(),this.setDrawTexturesDirty(),this.runTask(ee)}_dispatchAnimationUpdate(e){const t=l(e-this._animationTimeLast);if(t>=this.surface.view._stage.renderer.animationTimestep||null!=this.view.state.forcedAnimationTime||this._drawTexturesDirty||this._drawTexturesAnimateDirty){const r=l(t/this.surface.view._stage.renderer.animationTimeDilation),s=new K(this.view.state.camera,r,this.view.state.forcedAnimationTime);this.renderer.updateAnimation(s)&&(this._drawTexturesAnimateDirty=!0),this._animationTimeLast=e}}setDrawTexturesDirty(){this.renderer.hasOverlays?(this._contentUpdated=!0,this._drawTexturesDirty=!0,this.view._stage.renderView.requestRender()):this.setPlacementDirty()}_intersectGroundFromView(e,t,r,s){const i=this.view.sceneIntersectionHelper.getCenterRayWithSubpixelOffset(e,pe,t,r);if(null==i)return!1;const a=i.origin,n=u(he,i.origin,i.direction);return this._groundIntersector.reset(a,n,e),this._groundIntersector.intersect([]),this.view.basemapTerrain.intersect(this._groundIntersector,null,a,n),this._groundIntersector.results.min.getIntersectionPoint(s)}_findHorizonBasedPointOfInterest(e,t){let r=.5;const a=.55,n=this.view.renderCoordsHelper.getAltitude(e.eye),o=this.view.pointsOfInterest.centerOnSurfaceFrequent,l=1e-5,h=i(o.estimatedSurfaceAltitude,e.aboveGround?-1/0:n+l,e.aboveGround?n-l:1/0),c=e.aboveGround;if("global"===this.view.viewingMode){const t=he;A(G(L,T(this.view.spatialReference).radius+h),N(e.eye,e.viewForward),t),p(t,t,e.eye);const i=s.normalize(V(e.viewForward,t,e.viewRight))/e.fovY+.5,n=i<=0||i>=1?.5:a;r=c?n*i:i+n*(1-i)}else{const t=.5*Math.PI-Math.acos(-e.viewForward[2]),s=Math.tan(t),n=O(0,s,1,0),o=v(n,n,e.projectionMatrix)[1],l=i(.5+.5*o,0,1);r=1===l||0===l?.5:c?l*a:1-(1-l)*a}return!!this._intersectGroundFromView(e,.5,r,t)&&_(t,e.eye)<o.distance*o.distance}_computeOverlayExtents(e,t,r){const s=this.view.pointsOfInterest.centerOnSurfaceFrequent.renderLocation,i=g();this._findHorizonBasedPointOfInterest(e,i)||m(i,s),F.OVERLAY_SHOW_CENTER?(null==ie&&(ie=new B(this.view.graphics,"red")),ie.show(i,this._renderSR)):null!=ie&&ie.hide();const n=Math.max(.1,y(e.eye,i)),o=q(this.view.renderCoordsHelper,s,e.eye);this._overlaySREqualsRenderSR||x(i,this._renderSR,i,this._spatialReference);const l=this.surface.extent,h=!this._isSpherical&&this._spatialReference&&this._spatialReference.isGeographic,c=h&&this._spatialReference?1/T(this._spatialReference).metersPerDegree:1,u=this.view.state.contentPixelRatio,p=e.perScreenPixelRatio/u*n*c;r.mapUnitsPerPixel=p/this._worldToPCSRatio,r.stretch=this._overlayStretch;let _=t*p/2*r.stretch,v=!1,w=h?90:1/0;this._isSpherical&&l&&this._spatialReference&&(this._spatialReference.isWebMercator?(_/=Math.cos(k(i[1])),w=l[3]):(v=!0,_/=T(this._spatialReference).metersPerDegree,w=90),_>=w&&(_=w,i[1]=0,this._spatialReference.isWebMercator&&(i[0]=0)));let O=1;v&&(O=1/Math.max(.2,Math.cos(Math.abs(a(i[1])))),_*O>180&&(O=180/_),r.mapUnitsPerPixel*=O);const D=Math.log(2)/12;_=Math.exp(Math.round(Math.log(_)/D)*D);const P=_*O,M=32,U=.5*t/(M*P),j=.5*t/(M*_);i[0]=Math.round(i[0]*U)/U,i[1]=Math.round(i[1]*j)/j;const b=r.inner;b[0]=i[0]-P,b[1]=i[1]-_,b[2]=i[0]+P,b[3]=i[1]+_,this._isSpherical&&this._shiftExtentToFitBounds(b,1/0,w);const N=r.outer;if(6*P>S(l))E(N,l);else{if(Math.PI/2-Math.abs(o-Math.PI/2)<=.25*Math.PI)N[0]=b[0]-P,N[1]=b[1]-_,N[2]=b[2]+P,N[3]=b[3]+_;else{x(e.eye,this._renderSR,he,this._spatialReference),d(le,i,he);let t=-Math.atan2(le[1],le[0])+.125*Math.PI;t<0&&(t+=2*Math.PI);const r=Math.floor(t/(.25*Math.PI));f(le,se[r],2*_),le[0]*=O,le[2]*=O,R(N,b,le)}}if(this._isSpherical)N[0]=this._longitudeCyclical.clamp(N[0]),N[2]=this._longitudeCyclical.clamp(N[2]),N[1]=Math.max(N[1],-w),N[3]=Math.min(N[3],w);else{const e=I(b,l,de),t=I(N,l,ue);C(e,t)&&(N[2]=N[0],N[3]=N[1])}const A=Math.abs(b[2]-b[0])/t;r.mapUnitsPerPixel=Math.max(r.mapUnitsPerPixel,A),r.pixelRatioAdjustment=r.mapUnitsPerPixel/A}_drawOverlays(e,t,r){if(0===e.length||!this._drawTexturesDirty&&!this._drawTexturesAnimateDirty)return;const s=this._drawTexturesDirty;this._drawTexturesDirty=!1,this._drawTexturesAnimateDirty=!1;const i=this.renderer.computeValidity();this.renderer.releaseRenderTargets(),this._drawOverlay(e[H.INNER],r),this._drawOverlay(e[H.OUTER],r);i!==this.renderer.computeValidity()&&this.surface.updateTileOverlayParams(Y.UPDATE),this.updateOverlayResult(),s?(this.surface.requestRender(t),t===Y.UPDATE&&this.surface.requestUpdate()):this.surface.requestRender(Y.BACKGROUND)}_drawOverlay(e,t){this._longitudeCyclical?e.setupGeometryViewsCyclical(this._longitudeCyclical):e.setupGeometryViewsDirect(),e.draw(this.renderer,t)}_rectanglesOverlap(e,t){return null!=e&&(this._longitudeCyclical?(this._longitudeCyclical.contains(t[0],t[2],e[0])||this._longitudeCyclical.contains(t[0],t[2],e[2])||this._longitudeCyclical.contains(e[0],e[2],t[0]))&&!(e[1]>t[3]||e[3]<t[1]):U(e,t))}_rectInsideRect(e,t){return null!=t&&(this._longitudeCyclical?this._longitudeCyclical.contains(e[0],e[2],t[0])&&this._longitudeCyclical.contains(e[0],e[2],t[2])&&t[1]>e[1]&&t[3]<e[3]:C(e,t))}_pointIsInExtent(e,t){if(this._longitudeCyclical)return this._longitudeCyclical.contains(t[0],t[2],e.x)&&e.y>=t[1]&&e.y<=t[3];const r=e.x,s=e.y;return r>t[0]&&r<t[2]&&s>t[1]&&s<t[3]}_shiftExtentToFitBounds(e,t,r){let s=0,i=0;e[0]<-t?s=e[0]+t:e[2]>t&&(s=t-e[2]),e[1]<-r?i=e[1]+r:e[3]>r&&(i=r-e[3]),j(e,s,i)}get test(){return{renderer:this.renderer,update:()=>this.runTask(ee)}}};function ne(e,t){const r=1e-5,s=F.TESTS_DISABLE_OPTIMIZATIONS?0:r*Math.max(e[2]-e[0],e[3]-e[1],t[2]-t[0],t[3]-t[1]);return Math.abs(t[0]-e[0])<=s&&Math.abs(t[1]-e[1])<=s&&Math.abs(t[2]-e[2])<=s&&Math.abs(t[3]-e[3])<=s}e([h()],ae.prototype,"_spatialReference",void 0),e([h({readOnly:!0})],ae.prototype,"running",null),e([h()],ae.prototype,"_placementDirty",void 0),e([h()],ae.prototype,"_contentUpdated",void 0),e([h()],ae.prototype,"_isSpherical",null),e([h()],ae.prototype,"_worldToPCSRatio",null),e([h({autoDestroy:!0})],ae.prototype,"renderer",void 0),e([h({constructOnly:!0})],ae.prototype,"view",void 0),e([h({constructOnly:!0})],ae.prototype,"surface",void 0),e([h()],ae.prototype,"suspended",null),e([h()],ae.prototype,"updating",null),e([h({type:Boolean})],ae.prototype,"rendersOccluded",null),ae=e([c("esri.views.3d.terrain.OverlayManager")],ae);class oe{constructor(){this.inner=D(),this.outer=D(),this.mapUnitsPerPixel=0,this.pixelRatioAdjustment=1,this.stretch=re}}const le=w(),he=g(),ce=new oe,de=D(),ue=D(),pe=b();var _e;!function(e){e[e.NONE=0]="NONE",e[e.EXTENT=1]="EXTENT",e[e.RERENDER_ONLY=2]="RERENDER_ONLY"}(_e||(_e={}));export{ae as OverlayManager};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import has from"../../../core/has.js";import{RenderTargetType as e}from"./interfaces.js";import{OverlayFramebufferObject as r}from"./OverlayFramebufferObject.js";import{ColorFormat as t}from"../webgl-engine/core/FBOCache.js";import{ShaderOutput as o}from"../webgl-engine/core/shaderLibrary/ShaderOutput.js";class s{constructor(e,o,s,i=t.RGBA_MIPMAP){this.output=o,this.type=s,this.fbo=new r(e,i)}get valid(){return this.fbo.valid}}class i{constructor(r){this.targets=[new s(r,o.Color,e.Color),new s(r,o.Color,e.ColorNoRasterImage),new s(r,o.Highlight,e.Highlight,t.RGBA4),new s(r,o.Normal,e.Water),new s(r,o.Color,e.Occluded)],has("enable-feature:objectAndLayerId-rendering")&&this.targets.push(new s(r,o.ObjectAndLayerIdColor,e.ObjectAndLayerIdColor))}getTexture(e){return this.targets[e]?.fbo.texture}dispose(){for(const e of this.targets)e.fbo.dispose()}computeValidity(){return this.targets.reduce(((e,r,t)=>r.valid?e|=1<<t:e),0)}}export{i as OverlayRenderTarget,s as RenderTargetDescriptor};
5
+ import has from"../../../core/has.js";import{OverlayContent as e}from"./OverlayContent.js";import{OverlayFramebufferObject as r}from"./OverlayFramebufferObject.js";import{ColorFormat as t}from"../webgl-engine/core/FBOCache.js";import{ShaderOutput as o}from"../webgl-engine/core/shaderLibrary/ShaderOutput.js";class s{constructor(e,o,s,a=t.RGBA_MIPMAP){this.output=o,this.content=s,this.fbo=new r(e,a)}get valid(){return this.fbo.valid}}class a{constructor(r){this.targets=[new s(r,o.Color,e.Color),new s(r,o.Color,e.ColorNoRasterImage),new s(r,o.Highlight,e.Highlight,t.RGBA4),new s(r,o.Normal,e.WaterNormal),new s(r,o.Color,e.Occluded)],has("enable-feature:objectAndLayerId-rendering")&&this.targets.push(new s(r,o.ObjectAndLayerIdColor,e.ObjectAndLayerIdColor))}getTexture(e){return this.targets[e]?.fbo.texture}dispose(){for(const e of this.targets)e.fbo.dispose()}computeValidity(){return this.targets.reduce(((e,r,t)=>r.valid?e|=1<<t:e),0)}}export{a as OverlayRenderTarget,s as RenderTargetDescriptor};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Evented.js";import{someMap as t}from"../../../core/MapUtils.js";import{releaseMaybe as s,disposeMaybe as i,destroyMaybe as o}from"../../../core/maybe.js";import a from"../../../core/PooledArray.js";import{watch as n,syncAndInitial as d,on as h}from"../../../core/reactiveUtils.js";import{someSet as l}from"../../../core/SetUtils.js";import{property as c}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as u}from"../../../core/accessorSupport/decorators/subclass.js";import{x as p,f as m}from"../../../chunks/mat4.js";import{s as _}from"../../../chunks/vec3.js";import{f as g}from"../../../chunks/vec3f64.js";import{ViewingMode as y}from"../../ViewingMode.js";import{DrapeTargetType as R,DrapeSourceType as f,DrapedRenderGroup as T}from"../layers/interfaces.js";import{debugFlags as b}from"../support/debugFlags.js";import{OverlayIndex as v,RenderTargetType as w}from"./interfaces.js";import{Overlay as x}from"./Overlay.js";import{OverlayRenderTarget as D}from"./OverlayRenderTarget.js";import{ColorFormat as S}from"../webgl-engine/core/FBOCache.js";import{ShaderOutput as P}from"../webgl-engine/core/shaderLibrary/ShaderOutput.js";import{OverlayMode as O}from"../webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{T as E}from"../../../chunks/TextureOnly.glsl.js";import{ShaderTechniqueRepository as j}from"../webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js";import{SyncRenderPlugin as C}from"../webgl-engine/effects/RenderPlugin.js";import{Camera as A}from"../webgl-engine/lib/Camera.js";import{GLMaterialRepository as M}from"../webgl-engine/lib/GLMaterialRepository.js";import{createEmptyDepthTexture as W}from"../webgl-engine/lib/glUtil3D.js";import{GridLocalOriginFactory as q}from"../webgl-engine/lib/GridLocalOriginFactory.js";import{RenderOccludedFlag as L}from"../webgl-engine/lib/Material.js";import{OverlayRenderContext as F}from"../webgl-engine/lib/RenderContext.js";import{RenderSlot as V}from"../webgl-engine/lib/RenderSlot.js";import{ShadowMap as U}from"../webgl-engine/lib/ShadowMap.js";import{SortedRenderGeometryRenderer as H}from"../webgl-engine/lib/SortedRenderGeometryRenderer.js";import{TextureTechnique as I}from"../webgl-engine/lib/TextureTechnique.js";import{TextureTechniqueConfiguration as k}from"../webgl-engine/lib/TextureTechniqueConfiguration.js";import{TransparencyPassType as N}from"../webgl-engine/lib/TransparencyPassType.js";import{UpdatePolicy as G}from"../webgl-engine/lib/UpdatePolicy.js";import{AmbientLight as B}from"../webgl-engine/lighting/Lightsources.js";import{O as z}from"../../../chunks/OverlayCompositing.glsl.js";import{OverlayCompositingTechnique as Y}from"../webgl-engine/shaders/OverlayCompositingTechnique.js";import{TaskPriority as X,noBudget as J}from"../../support/Scheduler.js";import{ClearBufferBit as K,TextureSamplingMode as Q}from"../../webgl/enums.js";import{Texture as Z}from"../../webgl/Texture.js";import{TextureDescriptor as $}from"../../webgl/TextureDescriptor.js";let ee=class extends C{get _bindParameters(){return this._renderContext.bindParameters}get _rctx(){return this.view._stage.renderView.renderingContext}get rctx(){return this._rctx}get materialRepository(){return this._materialRepository}get screenToWorldRatio(){return this._screenToWorldRatio}get localOriginFactory(){return this._localOriginFactory}constructor(e){super(e),this._overlays=null,this._overlayRenderTarget=null,this._overlayParameters=new z,this.hasHighlights=!1,this._rendersOccluded=!1,this._hasWater=!1,this._renderers=new Map,this._sortedDrapeSourceRenderersDirty=!1,this._sortedRenderers=new a,this._passParameters=new E,this._materialRepository=null,this._screenToWorldRatio=1,this._localOriginFactory=null,this.unloadedMemory=0,this.ignoresMemoryFactor=!1,this._camera=new A,this.worldToPCSRatio=1,this.events=new r,this.longitudeCyclical=null,this.renderSlots=[V.DRAPED_MATERIAL,V.DRAPED_WATER]}initialize(){const e=this.view._stage.renderer.fboCache,r=this.view._stage.renderView,{waterTextureRepository:t,stippleTextureRepository:s,markerTextureRepository:i}=r;this._shaderTechniqueRepository=new j({rctx:this._rctx,viewingMode:y.Local,stippleTextureRepository:s,markerTextureRepository:i,waterTextureRepository:t}),this._renderContext=new F(this._rctx,new U(e,this.view.state.viewingMode),null),this.addHandles([n((()=>t.updating),(()=>this.events.emit("content-changed")),d),n((()=>this.spatialReference),(e=>this._localOriginFactory=new q(e)),d),h((()=>this.view.allLayerViews),"after-changes",(()=>this._sortedDrapeSourceRenderersDirty=!0))]),this._materialRepository=new M(r.textureRepository,this._shaderTechniqueRepository,(e=>{(e.renderOccluded&ie)>0!==this._rendersOccluded&&this._updateRendersOccluded(),this.events.emit("content-changed"),this.notifyChange("updating"),this.notifyChange("isEmpty")}),(()=>this.events.emit("content-changed"))),this._bindParameters.slot=V.DRAPED_MATERIAL,this._bindParameters.mainDepth=W(this._rctx),this._camera.near=1,this._camera.far=1e4,this._camera.relativeElevation=null,this._bindParameters.camera=this._camera,this._bindParameters.transparencyPassType=N.NONE,this._bindParameters.newLighting.noonFactor=0,this._bindParameters.newLighting.globalFactor=0,this._bindParameters.newLighting.set([new B(g(1,1,1))]),this.addHandles(this.view.resourceController.scheduler.registerTask(X.STAGE,this))}destroy(){this._renderers.forEach((e=>e.destroy())),this._renderers.clear(),this._debugTextureTechnique=s(this._debugTextureTechnique),this._passParameters.texture=i(this._passParameters.texture),this._bindParameters.mainDepth=i(this._bindParameters.mainDepth),this._shaderTechniqueRepository=o(this._shaderTechniqueRepository),this.disposeOverlays()}produces(e,r){return!(r===P.Highlight&&!this.hasHighlights)&&(e===V.DRAPED_MATERIAL||e===V.DRAPED_WATER)}initializeRenderContext(e){this.pluginContext=e}uninitializeRenderContext(){}render(){}get updating(){return this._sortedDrapeSourceRenderersDirty||t(this._renderers,(e=>e.updating))}get hasOverlays(){return null!=this._overlays&&null!=this._overlayRenderTarget}get usedMemory(){return Array.from(this._renderers.values()).reduce(((e,r)=>e+r.usedMemory),0)}createGeometryDrapeSourceRenderer(e){return this.createDrapeSourceRenderer(e,H)}createDrapeSourceRenderer(e,r,t){const s=this._renderers.get(e);null!=s&&s.destroy();const i=new r({...t,rendererContext:this,drapeSource:e});return this._renderers.set(e,i),this._sortedDrapeSourceRenderersDirty=!0,"fullOpacity"in e&&this.addHandles(n((()=>e.fullOpacity),(()=>this.events.emit("content-changed"))),e),i}removeDrapeSourceRenderer(e){if(null==e)return;const r=this._renderers.get(e);null!=r&&(this._sortedDrapeSourceRenderersDirty=!0,this._renderers.delete(e),this.removeHandles(e),r.destroy())}computeValidity(){return this._overlayRenderTarget?.computeValidity()??0}releaseRenderTargets(){this._overlayRenderTarget?.dispose()}get overlays(){return this._overlays??[]}ensureDrapeTargets(e){null!=this._overlays&&this._overlays.forEach((r=>r.hasTargetWithoutRasterImage=l(e,(e=>e.drapeTargetType===R.WithoutRasterImage))))}ensureDrapeSources(e){null!=this._overlays&&this._overlays.forEach((r=>{r.hasDrapedFeatureSource=l(e,(e=>e.drapeSourceType===f.Features)),r.hasDrapedRasterSource=l(e,(e=>e.drapeSourceType===f.RasterImage))}))}ensureOverlays(e,r,t=this._bindParameters.overlayStretch){null==this._overlays&&(this._overlayRenderTarget=new D(this.view._stage.renderer.fboCache),this._overlays=[new x(v.INNER,this._overlayRenderTarget),new x(v.OUTER,this._overlayRenderTarget)]),this.ensureDrapeTargets(e),this.ensureDrapeSources(r),this._bindParameters.overlayStretch=t}disposeOverlays(){this._overlays=null,this._overlayRenderTarget=i(this._overlayRenderTarget),this.events.emit("textures-disposed")}get running(){return this.updating}runTask(e){this._processDrapeSources(e,(()=>!0))}_processDrapeSources(e,r){let s=!1;for(const[t,i]of this._renderers){if(e.done)break;(t.destroyed||r(t))&&(i.commitChanges()&&(s=!0,e.madeProgress()))}this._sortedDrapeSourceRenderersDirty&&(this._sortedDrapeSourceRenderersDirty=!1,s=!0,this._updateSortedDrapeSourceRenderers()),s&&(null!=this._overlays&&0===this._renderers.size&&this.disposeOverlays(),this.notifyChange("updating"),this.notifyChange("isEmpty"),this.events.emit("content-changed"),this.hasHighlights=t(this._renderers,(e=>e.hasHighlights)),this._updateRendersOccluded(),this._updateHasWater())}processSyncDrapeSources(){this._processDrapeSources(J,(e=>e.updatePolicy===G.SYNC))}get isEmpty(){return!b.OVERLAY_DRAW_DEBUG_TEXTURE&&!t(this._renderers,(e=>!e.isEmpty))}get hasWater(){return this._hasWater}get rendersOccluded(){return this._rendersOccluded}get mode(){return this.isEmpty?O.Disabled:this._overlayRenderTarget?.getTexture(w.Water)?O.EnabledWithWater:this._overlayRenderTarget?.getTexture(w.Color)?O.Enabled:O.Disabled}updateAnimation(e){let r=!1;return this._renderers.forEach((t=>r=t.updateAnimation(e)||r)),r}updateDrapeSourceOrder(){this._sortedDrapeSourceRenderersDirty=!0}drawTarget(e,r,t){const s=e.canvasGeometries;if(0===s.numViews)return;const{alignPixelEnabled:i,contentPixelRatio:o}=t;this._screenToWorldRatio=o*e.mapUnitsPerPixel/this._bindParameters.overlayStretch;const a=r.output;if(this.isEmpty||a===P.Highlight&&!this.hasHighlights||a===P.Normal&&!this.hasWater||!e.hasSomeSizedView())return;const n=this._rctx;this._camera.pixelRatio=e.pixelRatio*o,this._renderContext.output=a,this._bindParameters.alignPixelEnabled=i,this._bindParameters.screenToWorldRatio=this._screenToWorldRatio,this._bindParameters.screenToPCSRatio=this._screenToWorldRatio*this.worldToPCSRatio,this._bindParameters.slot=a===P.Normal?V.DRAPED_WATER:V.DRAPED_MATERIAL;const d=b.OVERLAY_DRAW_DEBUG_TEXTURE&&r.type!==w.Occluded;if(!d&&!this._sortedRenderers.some((({renderer:e})=>e.shouldRender(this._renderContext))))return;e.applyViewport(this._rctx);const h=2*e.resolution,l=e.resolution,c=r.fbo;if(c.bind(n,h,l),e.index===v.INNER&&(n.setClearColor(0,0,0,0),n.clearSafe(K.COLOR_BUFFER_BIT)),r.type===w.Occluded&&(this._renderContext.renderOccludedMask=ie),d)for(let u=0;u<s.numViews;u++)this._setViewParameters(s.extents[u],e),this._ensureDebugPatternResources(e.resolution,te[e.index]),this._rctx.bindTechnique(this._debugTextureTechnique,this._passParameters,null),this._rctx.screen.draw();this._sortedRenderers.forAll((({drapeSource:t,renderer:i})=>{if(r.type===w.ColorNoRasterImage&&t.drapeSourceType===f.RasterImage)return;const{fullOpacity:o}=t,d=null!=o&&o<1&&a===P.Color?this.bindTemporaryFramebuffer(h,l):null;for(let r=0;r<s.numViews;r++)this._setViewParameters(s.extents[r],e),i.render(this._renderContext);if(d){c.bind(n,h,l),this._overlayParameters.texture=d.colorTexture,this._overlayParameters.opacity=o,this._overlayParameters.overlayIndex=e.index;const r=this.pluginContext.techniqueRepository.acquire(Y);this._rctx.bindTechnique(r,this._overlayParameters,this._renderContext.bindParameters),this._rctx.screen.draw(),r.release(),d.release()}})),n.bindFramebuffer(null),c.generateMipMap(),this._renderContext.resetRenderOccludedMask()}bindTemporaryFramebuffer(e,r){const t=this.view._stage.renderer.fboCache,s=t.acquire(S.RGBA,e,r);return t.rctx.bindFramebuffer(s.fbo),t.rctx.clearSafe(K.COLOR_BUFFER_BIT),s}async reloadShaders(){await this._shaderTechniqueRepository.reloadAll()}notifyContentChanged(){this.events.emit("content-changed")}intersect(e,r,t,s){let i=0;for(const o of this._renderers.values())i=o.intersect?.(e,r,t,s,i)??i}_updateSortedDrapeSourceRenderers(){if(this._sortedRenderers.clear(),0===this._renderers.size)return;const e=this.view.map.allLayers;this._renderers.forEach(((r,t)=>{const s=e.indexOf(t.layer),i=s>=0,o=this._renderers.size*(t.renderGroup??(i?T.MapLayer:T.ViewLayer))+(i?s:0);this._sortedRenderers.push(new re(t,r,o))})),this._sortedRenderers.sort(((e,r)=>e.index-r.index))}_setViewParameters(e,r){const t=this._camera;t.viewport=[0,0,r.resolution,r.resolution],p(t.projectionMatrix,0,e[2]-e[0],0,e[3]-e[1],t.near,t.far),m(t.viewMatrix,[-e[0],-e[1],0])}_updateHasWater(){const e=t(this._renderers,(e=>e.hasWater));e!==this._hasWater&&(this._hasWater=e,this.events.emit("has-water",e))}_updateRendersOccluded(){const e=t(this._renderers,(e=>e.rendersOccluded));e!==this._rendersOccluded&&(this._rendersOccluded=e,this.events.emit("renders-occluded",e))}_ensureDebugPatternResources(e,r){if(_(this._passParameters.color,r[0],r[1],r[2]),this._passParameters.texture)return;const t=new Uint8Array(e*e*4);let s=0;for(let a=0;a<e;a++)for(let r=0;r<e;r++){const i=Math.floor(r/10),o=Math.floor(a/10);i<2||o<2||10*i>e-20||10*o>e-20?(t[s++]=255,t[s++]=255,t[s++]=255,t[s++]=255):(t[s++]=255,t[s++]=255,t[s++]=255,t[s++]=1&i&&1&o?1&r^1&a?0:255:1&i^1&o?0:128)}const i=new $(e);i.samplingMode=Q.NEAREST,this._passParameters.texture=new Z(this._rctx,i,t);const o=new k;o.hasAlpha=!0,this._debugTextureTechnique=this._shaderTechniqueRepository.acquire(I,o)}get test(){return{drapedRenderers:Array.from(this._renderers.values()),getDrapeSourceRenderer:e=>this._renderers.get(e)}}};e([c()],ee.prototype,"hasHighlights",void 0),e([c()],ee.prototype,"_sortedDrapeSourceRenderersDirty",void 0),e([c({autoDestroy:!0})],ee.prototype,"_shaderTechniqueRepository",void 0),e([c({constructOnly:!0})],ee.prototype,"view",void 0),e([c()],ee.prototype,"worldToPCSRatio",void 0),e([c()],ee.prototype,"spatialReference",void 0),e([c({type:Boolean,readOnly:!0})],ee.prototype,"updating",null),e([c()],ee.prototype,"isEmpty",null),ee=e([u("esri.views.3d.terrain.OverlayRenderer")],ee);class re{constructor(e,r,t){this.drapeSource=e,this.renderer=r,this.index=t}}const te=[[1,.5,.5],[.5,.5,1]],se=-2,ie=L.OccludeAndTransparent;export{se as DRAPED_Z,ee as OverlayRenderer,ie as overlayRenderOccludedFlag};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Evented.js";import{someMap as t}from"../../../core/MapUtils.js";import{releaseMaybe as s,disposeMaybe as i,destroyMaybe as o}from"../../../core/maybe.js";import a from"../../../core/PooledArray.js";import{watch as n,syncAndInitial as d,on as h}from"../../../core/reactiveUtils.js";import{someSet as l}from"../../../core/SetUtils.js";import{property as c}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as u}from"../../../core/accessorSupport/decorators/subclass.js";import{x as p,d as m}from"../../../chunks/mat4.js";import{s as _}from"../../../chunks/vec3.js";import{f as g}from"../../../chunks/vec3f64.js";import{ViewingMode as y}from"../../ViewingMode.js";import{DrapeTargetType as R,DrapeSourceType as f,DrapedRenderGroup as T}from"../layers/interfaces.js";import{debugFlags as b}from"../support/debugFlags.js";import{OverlayIndex as v}from"./interfaces.js";import{Overlay as w}from"./Overlay.js";import{OverlayContent as x}from"./OverlayContent.js";import{OverlayRenderTarget as D}from"./OverlayRenderTarget.js";import{ColorFormat as S}from"../webgl-engine/core/FBOCache.js";import{ShaderOutput as P}from"../webgl-engine/core/shaderLibrary/ShaderOutput.js";import{OverlayMode as O}from"../webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{T as j}from"../../../chunks/TextureOnly.glsl.js";import{ShaderTechniqueRepository as E}from"../webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js";import{SyncRenderPlugin as C}from"../webgl-engine/effects/RenderPlugin.js";import{Camera as A}from"../webgl-engine/lib/Camera.js";import{GLMaterialRepository as M}from"../webgl-engine/lib/GLMaterialRepository.js";import{createEmptyDepthTexture as W}from"../webgl-engine/lib/glUtil3D.js";import{GridLocalOriginFactory as q}from"../webgl-engine/lib/GridLocalOriginFactory.js";import{RenderOccludedFlag as L}from"../webgl-engine/lib/Material.js";import{OverlayRenderContext as F}from"../webgl-engine/lib/RenderContext.js";import{RenderSlot as V}from"../webgl-engine/lib/RenderSlot.js";import{ShadowMap as U}from"../webgl-engine/lib/ShadowMap.js";import{SortedRenderGeometryRenderer as H}from"../webgl-engine/lib/SortedRenderGeometryRenderer.js";import{TextureTechnique as I}from"../webgl-engine/lib/TextureTechnique.js";import{TextureTechniqueConfiguration as k}from"../webgl-engine/lib/TextureTechniqueConfiguration.js";import{TransparencyPassType as N}from"../webgl-engine/lib/TransparencyPassType.js";import{UpdatePolicy as G}from"../webgl-engine/lib/UpdatePolicy.js";import{AmbientLight as B}from"../webgl-engine/lighting/Lightsources.js";import{O as z}from"../../../chunks/OverlayCompositing.glsl.js";import{OverlayCompositingTechnique as Y}from"../webgl-engine/shaders/OverlayCompositingTechnique.js";import{TaskPriority as X,noBudget as J}from"../../support/Scheduler.js";import{ClearBufferBit as K,TextureSamplingMode as Q}from"../../webgl/enums.js";import{Texture as Z}from"../../webgl/Texture.js";import{TextureDescriptor as $}from"../../webgl/TextureDescriptor.js";let ee=class extends C{get _bindParameters(){return this._renderContext.bindParameters}get _rctx(){return this.view._stage.renderView.renderingContext}get rctx(){return this._rctx}get materialRepository(){return this._materialRepository}get screenToWorldRatio(){return this._screenToWorldRatio}get localOriginFactory(){return this._localOriginFactory}constructor(e){super(e),this._overlays=null,this._overlayRenderTarget=null,this._overlayParameters=new z,this.hasHighlights=!1,this._rendersOccluded=!1,this._hasWater=!1,this._renderers=new Map,this._sortedDrapeSourceRenderersDirty=!1,this._sortedRenderers=new a,this._passParameters=new j,this._materialRepository=null,this._screenToWorldRatio=1,this._localOriginFactory=null,this.unloadedMemory=0,this.ignoresMemoryFactor=!1,this._camera=new A,this.worldToPCSRatio=1,this.events=new r,this.longitudeCyclical=null,this.renderSlots=[V.DRAPED_MATERIAL,V.DRAPED_WATER]}initialize(){const e=this.view._stage.renderer.fboCache,r=this.view._stage.renderView,{waterTextureRepository:t,stippleTextureRepository:s,markerTextureRepository:i}=r;this._shaderTechniqueRepository=new E({rctx:this._rctx,viewingMode:y.Local,stippleTextureRepository:s,markerTextureRepository:i,waterTextureRepository:t}),this._renderContext=new F(this._rctx,new U(e,this.view.state.viewingMode),null),this.addHandles([n((()=>t.updating),(()=>this.events.emit("content-changed")),d),n((()=>this.spatialReference),(e=>this._localOriginFactory=new q(e)),d),h((()=>this.view.allLayerViews),"after-changes",(()=>this._sortedDrapeSourceRenderersDirty=!0))]),this._materialRepository=new M(r.textureRepository,this._shaderTechniqueRepository,(e=>{(e.renderOccluded&ie)>0!==this._rendersOccluded&&this._updateRendersOccluded(),this.events.emit("content-changed"),this.notifyChange("updating"),this.notifyChange("isEmpty")}),(()=>this.events.emit("content-changed"))),this._bindParameters.slot=V.DRAPED_MATERIAL,this._bindParameters.mainDepth=W(this._rctx),this._camera.near=1,this._camera.far=1e4,this._camera.relativeElevation=null,this._bindParameters.camera=this._camera,this._bindParameters.transparencyPassType=N.NONE,this._bindParameters.newLighting.noonFactor=0,this._bindParameters.newLighting.globalFactor=0,this._bindParameters.newLighting.set([new B(g(1,1,1))]),this.addHandles(this.view.resourceController.scheduler.registerTask(X.STAGE,this))}destroy(){this._renderers.forEach((e=>e.destroy())),this._renderers.clear(),this._debugTextureTechnique=s(this._debugTextureTechnique),this._passParameters.texture=i(this._passParameters.texture),this._bindParameters.mainDepth=i(this._bindParameters.mainDepth),this._shaderTechniqueRepository=o(this._shaderTechniqueRepository),this.disposeOverlays()}produces(e,r){return!(r===P.Highlight&&!this.hasHighlights)&&(e===V.DRAPED_MATERIAL||e===V.DRAPED_WATER)}initializeRenderContext(e){this.pluginContext=e}uninitializeRenderContext(){}render(){}get updating(){return this._sortedDrapeSourceRenderersDirty||t(this._renderers,(e=>e.updating))}get hasOverlays(){return null!=this._overlays&&null!=this._overlayRenderTarget}get usedMemory(){return Array.from(this._renderers.values()).reduce(((e,r)=>e+r.usedMemory),0)}createGeometryDrapeSourceRenderer(e){return this.createDrapeSourceRenderer(e,H)}createDrapeSourceRenderer(e,r,t){const s=this._renderers.get(e);null!=s&&s.destroy();const i=new r({...t,rendererContext:this,drapeSource:e});return this._renderers.set(e,i),this._sortedDrapeSourceRenderersDirty=!0,"fullOpacity"in e&&this.addHandles(n((()=>e.fullOpacity),(()=>this.events.emit("content-changed"))),e),i}removeDrapeSourceRenderer(e){if(null==e)return;const r=this._renderers.get(e);null!=r&&(this._sortedDrapeSourceRenderersDirty=!0,this._renderers.delete(e),this.removeHandles(e),r.destroy())}computeValidity(){return this._overlayRenderTarget?.computeValidity()??0}releaseRenderTargets(){this._overlayRenderTarget?.dispose()}get overlays(){return this._overlays??[]}ensureDrapeTargets(e){null!=this._overlays&&this._overlays.forEach((r=>r.hasTargetWithoutRasterImage=l(e,(e=>e.drapeTargetType===R.WithoutRasterImage))))}ensureDrapeSources(e){this._overlays&&this._overlays.forEach((r=>{r.hasDrapedFeatureSource=l(e,(e=>e.drapeSourceType===f.Features)),r.hasDrapedRasterSource=l(e,(e=>e.drapeSourceType===f.RasterImage))}))}ensureOverlays(e,r,t=this._bindParameters.overlayStretch){null==this._overlays&&(this._overlayRenderTarget=new D(this.view._stage.renderer.fboCache),this._overlays=[new w(v.INNER,this._overlayRenderTarget),new w(v.OUTER,this._overlayRenderTarget)]),this.ensureDrapeTargets(e),this.ensureDrapeSources(r),this._bindParameters.overlayStretch=t}disposeOverlays(){this._overlays=null,this._overlayRenderTarget=i(this._overlayRenderTarget),this.events.emit("textures-disposed")}get running(){return this.updating}runTask(e){this._processDrapeSources(e,(()=>!0))}_processDrapeSources(e,r){let s=!1;for(const[t,i]of this._renderers){if(e.done)break;(t.destroyed||r(t))&&(i.commitChanges()&&(s=!0,e.madeProgress()))}this._sortedDrapeSourceRenderersDirty&&(this._sortedDrapeSourceRenderersDirty=!1,s=!0,this._updateSortedDrapeSourceRenderers()),s&&(null!=this._overlays&&0===this._renderers.size&&this.disposeOverlays(),this.notifyChange("updating"),this.notifyChange("isEmpty"),this.events.emit("content-changed"),this.hasHighlights=t(this._renderers,(e=>e.hasHighlights)),this._updateRendersOccluded(),this._updateHasWater())}processSyncDrapeSources(){this._processDrapeSources(J,(e=>e.updatePolicy===G.SYNC))}get isEmpty(){return!b.OVERLAY_DRAW_DEBUG_TEXTURE&&!t(this._renderers,(e=>!e.isEmpty))}get hasWater(){return this._hasWater}get rendersOccluded(){return this._rendersOccluded}get mode(){return this.isEmpty?O.Disabled:this._overlayRenderTarget?.getTexture(x.WaterNormal)?O.EnabledWithWater:this._overlayRenderTarget?.getTexture(x.Color)?O.Enabled:O.Disabled}updateAnimation(e){let r=!1;return this._renderers.forEach((t=>r=t.updateAnimation(e)||r)),r}updateDrapeSourceOrder(){this._sortedDrapeSourceRenderersDirty=!0}drawTarget(e,r,t){const s=e.canvasGeometries;if(0===s.numViews)return;const{alignPixelEnabled:i,contentPixelRatio:o}=t;this._screenToWorldRatio=o*e.mapUnitsPerPixel/this._bindParameters.overlayStretch;const a=r.output;if(this.isEmpty||a===P.Highlight&&!this.hasHighlights||a===P.Normal&&!this.hasWater||!e.hasSomeSizedView())return;const n=this._rctx;this._camera.pixelRatio=e.pixelRatio*o,this._renderContext.output=a,this._bindParameters.alignPixelEnabled=i,this._bindParameters.screenToWorldRatio=this._screenToWorldRatio,this._bindParameters.screenToPCSRatio=this._screenToWorldRatio*this.worldToPCSRatio,this._bindParameters.slot=a===P.Normal?V.DRAPED_WATER:V.DRAPED_MATERIAL;const d=b.OVERLAY_DRAW_DEBUG_TEXTURE&&r.content!==x.Occluded;if(!d&&!this._sortedRenderers.some((({renderer:e})=>e.shouldRender(this._renderContext))))return;e.applyViewport(this._rctx);const h=2*e.resolution,l=e.resolution,c=r.fbo;if(c.bind(n,h,l),e.index===v.INNER&&(n.setClearColor(0,0,0,0),n.clearSafe(K.COLOR_BUFFER_BIT)),r.content===x.Occluded&&(this._renderContext.renderOccludedMask=ie),d)for(let u=0;u<s.numViews;u++)this._setViewParameters(s.extents[u],e),this._ensureDebugPatternResources(e.resolution,te[e.index]),this._rctx.bindTechnique(this._debugTextureTechnique,this._passParameters,null),this._rctx.screen.draw();this._sortedRenderers.forAll((({drapeSource:t,renderer:i})=>{if(r.content===x.ColorNoRasterImage&&t.drapeSourceType===f.RasterImage)return;const{fullOpacity:o}=t,d=null!=o&&o<1&&a===P.Color?this.bindTemporaryFramebuffer(h,l):null;for(let r=0;r<s.numViews;r++)this._setViewParameters(s.extents[r],e),i.render(this._renderContext);if(d){c.bind(n,h,l),this._overlayParameters.texture=d.colorTexture,this._overlayParameters.opacity=o,this._overlayParameters.overlayIndex=e.index;const r=this.pluginContext.techniqueRepository.acquire(Y);this._rctx.bindTechnique(r,this._overlayParameters,this._renderContext.bindParameters),this._rctx.screen.draw(),r.release(),d.release()}})),n.bindFramebuffer(null),c.generateMipMap(),this._renderContext.resetRenderOccludedMask()}bindTemporaryFramebuffer(e,r){const t=this.view._stage.renderer.fboCache,s=t.acquire(S.RGBA,e,r);return t.rctx.bindFramebuffer(s.fbo),t.rctx.clearSafe(K.COLOR_BUFFER_BIT),s}async reloadShaders(){await this._shaderTechniqueRepository.reloadAll()}notifyContentChanged(){this.events.emit("content-changed")}intersect(e,r,t,s){let i=0;for(const o of this._renderers.values())i=o.intersect?.(e,r,t,s,i)??i}_updateSortedDrapeSourceRenderers(){if(this._sortedRenderers.clear(),0===this._renderers.size)return;const e=this.view.map.allLayers;this._renderers.forEach(((r,t)=>{const s=e.indexOf(t.layer),i=s>=0,o=this._renderers.size*(t.renderGroup??(i?T.MapLayer:T.ViewLayer))+(i?s:0);this._sortedRenderers.push(new re(t,r,o))})),this._sortedRenderers.sort(((e,r)=>e.index-r.index))}_setViewParameters(e,r){const t=this._camera;t.viewport=[0,0,r.resolution,r.resolution],p(t.projectionMatrix,0,e[2]-e[0],0,e[3]-e[1],t.near,t.far),m(t.viewMatrix,[-e[0],-e[1],0])}_updateHasWater(){const e=t(this._renderers,(e=>e.hasWater));e!==this._hasWater&&(this._hasWater=e,this.events.emit("has-water",e))}_updateRendersOccluded(){const e=t(this._renderers,(e=>e.rendersOccluded));e!==this._rendersOccluded&&(this._rendersOccluded=e,this.events.emit("renders-occluded",e))}_ensureDebugPatternResources(e,r){if(_(this._passParameters.color,r[0],r[1],r[2]),this._passParameters.texture)return;const t=new Uint8Array(e*e*4);let s=0;for(let a=0;a<e;a++)for(let r=0;r<e;r++){const i=Math.floor(r/10),o=Math.floor(a/10);i<2||o<2||10*i>e-20||10*o>e-20?(t[s++]=255,t[s++]=255,t[s++]=255,t[s++]=255):(t[s++]=255,t[s++]=255,t[s++]=255,t[s++]=1&i&&1&o?1&r^1&a?0:255:1&i^1&o?0:128)}const i=new $(e);i.samplingMode=Q.NEAREST,this._passParameters.texture=new Z(this._rctx,i,t);const o=new k;o.hasAlpha=!0,this._debugTextureTechnique=this._shaderTechniqueRepository.acquire(I,o)}get test(){return{drapedRenderers:Array.from(this._renderers.values()),getDrapeSourceRenderer:e=>this._renderers.get(e)}}};e([c()],ee.prototype,"hasHighlights",void 0),e([c()],ee.prototype,"_sortedDrapeSourceRenderersDirty",void 0),e([c({autoDestroy:!0})],ee.prototype,"_shaderTechniqueRepository",void 0),e([c({constructOnly:!0})],ee.prototype,"view",void 0),e([c()],ee.prototype,"worldToPCSRatio",void 0),e([c()],ee.prototype,"spatialReference",void 0),e([c({type:Boolean,readOnly:!0})],ee.prototype,"updating",null),e([c()],ee.prototype,"isEmpty",null),ee=e([u("esri.views.3d.terrain.OverlayRenderer")],ee);class re{constructor(e,r,t){this.drapeSource=e,this.renderer=r,this.index=t}}const te=[[1,.5,.5],[.5,.5,1]],se=-2,ie=L.OccludeAndTransparent;export{se as DRAPED_Z,ee as OverlayRenderer,ie as overlayRenderOccludedFlag};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{e as t}from"../../../chunks/vec3.js";import{empty as e}from"../../../geometry/support/aaBoundingBox.js";import{BufferPool as s}from"../../../geometry/support/buffer/BufferPool.js";import{newLayout as i}from"../support/buffer/InterleavedLayout.js";import{internalAssert as r}from"./terrainUtils.js";import{decompressNormal as n,compressNormal as o}from"../webgl-engine/lib/Normals.js";import{VertexAttribute as u}from"../webgl-engine/lib/VertexAttribute.js";class l{constructor(){this.indices=null,this.vertexAttributes=null,this.boundingBox=e(),this.indexCount=0,this.numVerticesPerSide=0,this.uvRange=[0,0,1,1],this.outerEdges=[null,null,null,null],this.innerEdges=[null,null,null,null]}}class a{constructor(t,e,s,i,r){this.attributes=t,this.localOrigin=e,this.index0=s,this.stride=i,this.count=r}getVertexIndex(t){return this.getAttributeIndex(t)}getAttributeIndex(t){return r(0<=t&&t<this.count),this.index0+this.stride*t}_getVertexRaw(t,e){this.attributes.position.getVec(t,e)}getVertexPos(e,s){this._getVertexRaw(this.getAttributeIndex(s),e),t(e,e,this.localOrigin)}getNormal(t,e){const{typedBuffer:s,typedBufferStride:i}=this.attributes.normalCompressed;n(t,s,this.getAttributeIndex(e),i)}_setNormal(t,e,s,i){const{typedBuffer:r,typedBufferStride:n}=this.attributes.normalCompressed;o(r,t,e,s,i,n)}_setUV(t,e,s){b(this.attributes.uv0,t,e,s)}setNormalFromValues(t,e,s,i){this._setNormal(this.getAttributeIndex(t),e,s,i)}setVertexFromValuesRawPositionUV(t,e,s,i,r,n){const o=this.getAttributeIndex(t);this.attributes.position.setValues(o,e,s,i),this._setUV(o,r,n)}setVertexFromValuesRawPositionUVNormal(t,e,s,i,r,n,o,u,l){const a=this.getAttributeIndex(t);this.attributes.position.setValues(a,e,s,i),this._setUV(a,r,n),this._setNormal(a,o,u,l)}}const h=i().vec3f(u.POSITION).vec2i16(u.UV0).vec2i16(u.NORMALCOMPRESSED,{glNormalized:!0}),c=new s((t=>h.createBuffer(t)),(t=>t.count));function m(){c.clear()}function d(t){return c.acquire(t)}function f(t){c.release(t.vertexAttributes),t.vertexAttributes=null,t.indices=null}const g=16384;function b(t,e,s,i){t.setValues(e,s*g,i*g)}function x(t,e,s,i){t<i[0]?i[0]=t:t>i[3]&&(i[3]=t),e<i[1]?i[1]=e:e>i[4]&&(i[4]=e),s<i[2]?i[2]=s:s>i[5]&&(i[5]=s)}export{a as EdgeDescriptor,l as PatchGeometry,d as acquireTerrainAttributes,m as clearCaches,b as encodeUVInBuffer,x as minMaxBoundingBox,f as releaseGeometry};
5
+ import{g as t}from"../../../chunks/vec3.js";import{empty as e}from"../../../geometry/support/aaBoundingBox.js";import{BufferPool as s}from"../../../geometry/support/buffer/BufferPool.js";import{newLayout as i}from"../support/buffer/InterleavedLayout.js";import{internalAssert as r}from"./terrainUtils.js";import{decompressNormal as n,compressNormal as o}from"../webgl-engine/lib/Normals.js";import{VertexAttribute as u}from"../webgl-engine/lib/VertexAttribute.js";class l{constructor(){this.indices=null,this.vertexAttributes=null,this.boundingBox=e(),this.indexCount=0,this.numVerticesPerSide=0,this.uvRange=[0,0,1,1],this.outerEdges=[null,null,null,null],this.innerEdges=[null,null,null,null]}}class a{constructor(t,e,s,i,r){this.attributes=t,this.localOrigin=e,this.index0=s,this.stride=i,this.count=r}getVertexIndex(t){return this.getAttributeIndex(t)}getAttributeIndex(t){return r(0<=t&&t<this.count),this.index0+this.stride*t}_getVertexRaw(t,e){this.attributes.position.getVec(t,e)}getVertexPos(e,s){this._getVertexRaw(this.getAttributeIndex(s),e),t(e,e,this.localOrigin)}getNormal(t,e){const{typedBuffer:s,typedBufferStride:i}=this.attributes.normalCompressed;n(t,s,this.getAttributeIndex(e),i)}_setNormal(t,e,s,i){const{typedBuffer:r,typedBufferStride:n}=this.attributes.normalCompressed;o(r,t,e,s,i,n)}_setUV(t,e,s){b(this.attributes.uv0,t,e,s)}setNormalFromValues(t,e,s,i){this._setNormal(this.getAttributeIndex(t),e,s,i)}setVertexFromValuesRawPositionUV(t,e,s,i,r,n){const o=this.getAttributeIndex(t);this.attributes.position.setValues(o,e,s,i),this._setUV(o,r,n)}setVertexFromValuesRawPositionUVNormal(t,e,s,i,r,n,o,u,l){const a=this.getAttributeIndex(t);this.attributes.position.setValues(a,e,s,i),this._setUV(a,r,n),this._setNormal(a,o,u,l)}}const h=i().vec3f(u.POSITION).vec2i16(u.UV0).vec2i16(u.NORMALCOMPRESSED,{glNormalized:!0}),c=new s((t=>h.createBuffer(t)),(t=>t.count));function m(){c.clear()}function d(t){return c.acquire(t)}function f(t){c.release(t.vertexAttributes),t.vertexAttributes=null,t.indices=null}const g=16384;function b(t,e,s,i){t.setValues(e,s*g,i*g)}function x(t,e,s,i){t<i[0]?i[0]=t:t>i[3]&&(i[3]=t),e<i[1]?i[1]=e:e>i[4]&&(i[4]=e),s<i[2]?i[2]=s:s>i[5]&&(i[5]=s)}export{a as EdgeDescriptor,l as PatchGeometry,d as acquireTerrainAttributes,m as clearCaches,b as encodeUVInBuffer,x as minMaxBoundingBox,f as releaseGeometry};