@arcgis/core 4.25.0-next.20220919 → 4.25.0-next.20220921

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 (604) hide show
  1. package/AggregateGraphic.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{9f31ab2247c9defb882c.js → 01ac91fc0bc6b4d4e3c6.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{d26108352874af0b6762.js → 053564e659222e8f0efb.js} +1 -1
  5. package/assets/esri/core/workers/chunks/1c65fd714f637ac1ee8c.js +1 -0
  6. package/assets/esri/core/workers/chunks/{8588cbecb8e808f451fe.js → 249e32af1f2d433fae4c.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{5b16b30ac3166f33e81e.js → 26690f4ec1f3cb8099c2.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{be93b0cef85665446944.js → 274b4cdf6c8d77e8a2e6.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{52dcfd6b8b1dfa864e44.js → 2cae0ec5f60ab42a49aa.js} +1 -1
  10. package/assets/esri/core/workers/chunks/43e4560d65e5ddeeef6f.js +1 -0
  11. package/assets/esri/core/workers/chunks/{f436c86f86236ea7ea04.js → 4641e10e0e8e9d257521.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{7a45333de9ded92619c2.js → 466008f793c2e11e854c.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{c9d655675552dcf6cef7.js → 4a699b41072ee88f0956.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{14ea96e398f4842abe4e.js → 4fdd18f5cdaa0d82ebc1.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{9662da3e1e37f3445186.js → 562b9619b8ee13734813.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{5c1a5615c865c10209c2.js → 5880fa48bad79a7c93ab.js} +1 -1
  17. package/assets/esri/core/workers/chunks/58824250492b89ec24ea.js +1 -0
  18. package/assets/esri/core/workers/chunks/64a6b837f1d5d7ad7619.js +1 -0
  19. package/assets/esri/core/workers/chunks/{421241543afbc9a619ea.js → 64de93865088bbe0398f.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{99d56a707039d645622c.js → 6a20d8740ec2a5b2c579.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{8bab21bc6164a593278f.js → 771b92e524802de840ba.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{dbb1bf97c85848bb8ce1.js → 7ce250cc6fbe68aef50d.js} +32 -32
  23. package/assets/esri/core/workers/chunks/{2c4938512dd726a177dd.js → 7fab18074b130b71a648.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{f67357b3c6c591c9da5e.js → 872f1cb3596fb80e387f.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{3ee81834b3217720cb48.js → 8874e69378a27d155f9d.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{31de71018575457155e5.js → 8ee3da8677255b8c8709.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{2e44aee22e70857b893c.js → 93631b10452b0e0189b3.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{cb2dc84d972469445da6.js → 95cd9edca50ea163d50f.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{d31bbb13af45ce8e45dc.js → acf9f753741b677afb44.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{1455944edeba1560eb07.js → afdafa77f5ca1b9e3acc.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{cf3e1ac63580bc495ea6.js → b4da35f1093f3731f9ac.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{09f4296dcb80e3ae4b3d.js → b8eba8c9d5424a7ae5f2.js} +1 -1
  33. package/assets/esri/core/workers/chunks/bb0d86937faf0cd7d16d.js +1 -0
  34. package/assets/esri/core/workers/chunks/bf3e80023e156d5906c7.js +1 -0
  35. package/assets/esri/core/workers/chunks/{8ba83fee56dd4f306d87.js → c2a6ac7046134f725cf3.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{5d3fabe66e1bce1b30fb.js → cc7569489b572b8b3b53.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{fddd4ea487788e003fb1.js → d09f06eb4157a7c2c8ab.js} +1 -1
  38. package/assets/esri/core/workers/chunks/d1be3ab7846e3a555b6c.js +1 -0
  39. package/assets/esri/core/workers/chunks/e064035f959d68e9603f.js +1 -0
  40. package/assets/esri/core/workers/chunks/{d92975e56a1290255252.js → e09df62cf35d636b0975.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{674fa5b93704ef08c9e8.js → e0c763e05feb1c2093ba.js} +1 -1
  42. package/assets/esri/core/workers/chunks/e20e99f8f76f5002437e.js +1 -0
  43. package/assets/esri/core/workers/chunks/{51289d2f5277af4023e9.js → ed33e019bc7775db2e50.js} +1 -1
  44. package/assets/esri/core/workers/chunks/ef95d6ab7b1c032ab4ad.js +1 -0
  45. package/assets/esri/core/workers/chunks/{48aa432e1bf60c68de14.js → f0c4b408a0b88adf6576.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{169f4354a375db5de121.js → ffcbcb928b6cb8c596ad.js} +1 -1
  47. package/assets/esri/t9n/common_ar.json +1 -1
  48. package/assets/esri/t9n/common_bg.json +1 -1
  49. package/assets/esri/t9n/common_bs.json +1 -1
  50. package/assets/esri/t9n/common_ca.json +1 -1
  51. package/assets/esri/t9n/common_cs.json +1 -1
  52. package/assets/esri/t9n/common_da.json +1 -1
  53. package/assets/esri/t9n/common_de.json +1 -1
  54. package/assets/esri/t9n/common_el.json +1 -1
  55. package/assets/esri/t9n/common_es.json +1 -1
  56. package/assets/esri/t9n/common_et.json +1 -1
  57. package/assets/esri/t9n/common_fi.json +1 -1
  58. package/assets/esri/t9n/common_fr.json +1 -1
  59. package/assets/esri/t9n/common_he.json +1 -1
  60. package/assets/esri/t9n/common_hr.json +1 -1
  61. package/assets/esri/t9n/common_hu.json +1 -1
  62. package/assets/esri/t9n/common_id.json +1 -1
  63. package/assets/esri/t9n/common_it.json +1 -1
  64. package/assets/esri/t9n/common_ja.json +1 -1
  65. package/assets/esri/t9n/common_ko.json +1 -1
  66. package/assets/esri/t9n/common_lt.json +1 -1
  67. package/assets/esri/t9n/common_lv.json +1 -1
  68. package/assets/esri/t9n/common_nb.json +1 -1
  69. package/assets/esri/t9n/common_nl.json +1 -1
  70. package/assets/esri/t9n/common_pl.json +1 -1
  71. package/assets/esri/t9n/common_pt-BR.json +1 -1
  72. package/assets/esri/t9n/common_pt-PT.json +1 -1
  73. package/assets/esri/t9n/common_ro.json +1 -1
  74. package/assets/esri/t9n/common_ru.json +1 -1
  75. package/assets/esri/t9n/common_sk.json +1 -1
  76. package/assets/esri/t9n/common_sl.json +1 -1
  77. package/assets/esri/t9n/common_sr.json +1 -1
  78. package/assets/esri/t9n/common_sv.json +1 -1
  79. package/assets/esri/t9n/common_th.json +1 -1
  80. package/assets/esri/t9n/common_tr.json +1 -1
  81. package/assets/esri/t9n/common_uk.json +1 -1
  82. package/assets/esri/t9n/common_vi.json +1 -1
  83. package/assets/esri/t9n/common_zh-CN.json +1 -1
  84. package/assets/esri/t9n/common_zh-HK.json +1 -1
  85. package/assets/esri/t9n/common_zh-TW.json +1 -1
  86. package/assets/esri/themes/base/widgets/_Daylight.scss +1 -0
  87. package/assets/esri/themes/base/widgets/_Directions.scss +1 -2
  88. package/assets/esri/themes/dark/main.css +1 -1
  89. package/assets/esri/themes/light/main.css +1 -1
  90. package/assets/esri/themes/light/view.css +1 -1
  91. package/assets/esri/widgets/Feature/t9n/Feature_ar.json +1 -1
  92. package/assets/esri/widgets/Feature/t9n/Feature_bg.json +1 -1
  93. package/assets/esri/widgets/Feature/t9n/Feature_bs.json +1 -1
  94. package/assets/esri/widgets/Feature/t9n/Feature_ca.json +1 -1
  95. package/assets/esri/widgets/Feature/t9n/Feature_cs.json +1 -1
  96. package/assets/esri/widgets/Feature/t9n/Feature_da.json +1 -1
  97. package/assets/esri/widgets/Feature/t9n/Feature_de.json +1 -1
  98. package/assets/esri/widgets/Feature/t9n/Feature_el.json +1 -1
  99. package/assets/esri/widgets/Feature/t9n/Feature_es.json +1 -1
  100. package/assets/esri/widgets/Feature/t9n/Feature_et.json +1 -1
  101. package/assets/esri/widgets/Feature/t9n/Feature_fi.json +1 -1
  102. package/assets/esri/widgets/Feature/t9n/Feature_fr.json +1 -1
  103. package/assets/esri/widgets/Feature/t9n/Feature_he.json +1 -1
  104. package/assets/esri/widgets/Feature/t9n/Feature_hr.json +1 -1
  105. package/assets/esri/widgets/Feature/t9n/Feature_hu.json +1 -1
  106. package/assets/esri/widgets/Feature/t9n/Feature_id.json +1 -1
  107. package/assets/esri/widgets/Feature/t9n/Feature_it.json +1 -1
  108. package/assets/esri/widgets/Feature/t9n/Feature_ja.json +1 -1
  109. package/assets/esri/widgets/Feature/t9n/Feature_ko.json +1 -1
  110. package/assets/esri/widgets/Feature/t9n/Feature_lt.json +1 -1
  111. package/assets/esri/widgets/Feature/t9n/Feature_lv.json +1 -1
  112. package/assets/esri/widgets/Feature/t9n/Feature_nb.json +1 -1
  113. package/assets/esri/widgets/Feature/t9n/Feature_nl.json +1 -1
  114. package/assets/esri/widgets/Feature/t9n/Feature_pl.json +1 -1
  115. package/assets/esri/widgets/Feature/t9n/Feature_pt-BR.json +1 -1
  116. package/assets/esri/widgets/Feature/t9n/Feature_pt-PT.json +1 -1
  117. package/assets/esri/widgets/Feature/t9n/Feature_ro.json +1 -1
  118. package/assets/esri/widgets/Feature/t9n/Feature_ru.json +1 -1
  119. package/assets/esri/widgets/Feature/t9n/Feature_sk.json +1 -1
  120. package/assets/esri/widgets/Feature/t9n/Feature_sl.json +1 -1
  121. package/assets/esri/widgets/Feature/t9n/Feature_sr.json +1 -1
  122. package/assets/esri/widgets/Feature/t9n/Feature_sv.json +1 -1
  123. package/assets/esri/widgets/Feature/t9n/Feature_th.json +1 -1
  124. package/assets/esri/widgets/Feature/t9n/Feature_tr.json +1 -1
  125. package/assets/esri/widgets/Feature/t9n/Feature_uk.json +1 -1
  126. package/assets/esri/widgets/Feature/t9n/Feature_vi.json +1 -1
  127. package/assets/esri/widgets/Feature/t9n/Feature_zh-CN.json +1 -1
  128. package/assets/esri/widgets/Feature/t9n/Feature_zh-HK.json +1 -1
  129. package/assets/esri/widgets/Feature/t9n/Feature_zh-TW.json +1 -1
  130. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  131. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  132. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  133. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  134. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  135. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  136. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  137. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  138. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  139. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  140. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  141. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  142. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  143. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  144. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  145. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  146. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  147. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  148. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  149. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  150. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  151. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nb.json +1 -1
  152. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  153. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  154. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  155. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  156. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  157. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  158. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  159. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  160. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  161. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  162. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  163. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  164. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  165. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  166. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  167. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  168. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  169. package/assets/esri/widgets/Popup/t9n/Popup_ar.json +1 -1
  170. package/assets/esri/widgets/Popup/t9n/Popup_bg.json +1 -1
  171. package/assets/esri/widgets/Popup/t9n/Popup_bs.json +1 -1
  172. package/assets/esri/widgets/Popup/t9n/Popup_ca.json +1 -1
  173. package/assets/esri/widgets/Popup/t9n/Popup_cs.json +1 -1
  174. package/assets/esri/widgets/Popup/t9n/Popup_da.json +1 -1
  175. package/assets/esri/widgets/Popup/t9n/Popup_de.json +1 -1
  176. package/assets/esri/widgets/Popup/t9n/Popup_el.json +1 -1
  177. package/assets/esri/widgets/Popup/t9n/Popup_es.json +1 -1
  178. package/assets/esri/widgets/Popup/t9n/Popup_et.json +1 -1
  179. package/assets/esri/widgets/Popup/t9n/Popup_fi.json +1 -1
  180. package/assets/esri/widgets/Popup/t9n/Popup_fr.json +1 -1
  181. package/assets/esri/widgets/Popup/t9n/Popup_he.json +1 -1
  182. package/assets/esri/widgets/Popup/t9n/Popup_hr.json +1 -1
  183. package/assets/esri/widgets/Popup/t9n/Popup_hu.json +1 -1
  184. package/assets/esri/widgets/Popup/t9n/Popup_id.json +1 -1
  185. package/assets/esri/widgets/Popup/t9n/Popup_it.json +1 -1
  186. package/assets/esri/widgets/Popup/t9n/Popup_ja.json +1 -1
  187. package/assets/esri/widgets/Popup/t9n/Popup_ko.json +1 -1
  188. package/assets/esri/widgets/Popup/t9n/Popup_lt.json +1 -1
  189. package/assets/esri/widgets/Popup/t9n/Popup_lv.json +1 -1
  190. package/assets/esri/widgets/Popup/t9n/Popup_nb.json +1 -1
  191. package/assets/esri/widgets/Popup/t9n/Popup_nl.json +1 -1
  192. package/assets/esri/widgets/Popup/t9n/Popup_pl.json +1 -1
  193. package/assets/esri/widgets/Popup/t9n/Popup_pt-BR.json +1 -1
  194. package/assets/esri/widgets/Popup/t9n/Popup_pt-PT.json +1 -1
  195. package/assets/esri/widgets/Popup/t9n/Popup_ro.json +1 -1
  196. package/assets/esri/widgets/Popup/t9n/Popup_ru.json +1 -1
  197. package/assets/esri/widgets/Popup/t9n/Popup_sk.json +1 -1
  198. package/assets/esri/widgets/Popup/t9n/Popup_sl.json +1 -1
  199. package/assets/esri/widgets/Popup/t9n/Popup_sr.json +1 -1
  200. package/assets/esri/widgets/Popup/t9n/Popup_sv.json +1 -1
  201. package/assets/esri/widgets/Popup/t9n/Popup_th.json +1 -1
  202. package/assets/esri/widgets/Popup/t9n/Popup_tr.json +1 -1
  203. package/assets/esri/widgets/Popup/t9n/Popup_uk.json +1 -1
  204. package/assets/esri/widgets/Popup/t9n/Popup_vi.json +1 -1
  205. package/assets/esri/widgets/Popup/t9n/Popup_zh-CN.json +1 -1
  206. package/assets/esri/widgets/Popup/t9n/Popup_zh-HK.json +1 -1
  207. package/assets/esri/widgets/Popup/t9n/Popup_zh-TW.json +1 -1
  208. package/assets/esri/widgets/support/t9n/DatePicker_ar.json +1 -1
  209. package/assets/esri/widgets/support/t9n/DatePicker_bg.json +1 -1
  210. package/assets/esri/widgets/support/t9n/DatePicker_bs.json +1 -1
  211. package/assets/esri/widgets/support/t9n/DatePicker_ca.json +1 -1
  212. package/assets/esri/widgets/support/t9n/DatePicker_cs.json +1 -1
  213. package/assets/esri/widgets/support/t9n/DatePicker_da.json +1 -1
  214. package/assets/esri/widgets/support/t9n/DatePicker_de.json +1 -1
  215. package/assets/esri/widgets/support/t9n/DatePicker_el.json +1 -1
  216. package/assets/esri/widgets/support/t9n/DatePicker_es.json +1 -1
  217. package/assets/esri/widgets/support/t9n/DatePicker_et.json +1 -1
  218. package/assets/esri/widgets/support/t9n/DatePicker_fi.json +1 -1
  219. package/assets/esri/widgets/support/t9n/DatePicker_fr.json +1 -1
  220. package/assets/esri/widgets/support/t9n/DatePicker_he.json +1 -1
  221. package/assets/esri/widgets/support/t9n/DatePicker_hr.json +1 -1
  222. package/assets/esri/widgets/support/t9n/DatePicker_hu.json +1 -1
  223. package/assets/esri/widgets/support/t9n/DatePicker_id.json +1 -1
  224. package/assets/esri/widgets/support/t9n/DatePicker_it.json +1 -1
  225. package/assets/esri/widgets/support/t9n/DatePicker_ja.json +1 -1
  226. package/assets/esri/widgets/support/t9n/DatePicker_ko.json +1 -1
  227. package/assets/esri/widgets/support/t9n/DatePicker_lt.json +1 -1
  228. package/assets/esri/widgets/support/t9n/DatePicker_lv.json +1 -1
  229. package/assets/esri/widgets/support/t9n/DatePicker_nb.json +1 -1
  230. package/assets/esri/widgets/support/t9n/DatePicker_nl.json +1 -1
  231. package/assets/esri/widgets/support/t9n/DatePicker_pl.json +1 -1
  232. package/assets/esri/widgets/support/t9n/DatePicker_pt-BR.json +1 -1
  233. package/assets/esri/widgets/support/t9n/DatePicker_pt-PT.json +1 -1
  234. package/assets/esri/widgets/support/t9n/DatePicker_ro.json +1 -1
  235. package/assets/esri/widgets/support/t9n/DatePicker_ru.json +1 -1
  236. package/assets/esri/widgets/support/t9n/DatePicker_sk.json +1 -1
  237. package/assets/esri/widgets/support/t9n/DatePicker_sl.json +1 -1
  238. package/assets/esri/widgets/support/t9n/DatePicker_sr.json +1 -1
  239. package/assets/esri/widgets/support/t9n/DatePicker_sv.json +1 -1
  240. package/assets/esri/widgets/support/t9n/DatePicker_th.json +1 -1
  241. package/assets/esri/widgets/support/t9n/DatePicker_tr.json +1 -1
  242. package/assets/esri/widgets/support/t9n/DatePicker_uk.json +1 -1
  243. package/assets/esri/widgets/support/t9n/DatePicker_vi.json +1 -1
  244. package/assets/esri/widgets/support/t9n/DatePicker_zh-CN.json +1 -1
  245. package/assets/esri/widgets/support/t9n/DatePicker_zh-HK.json +1 -1
  246. package/assets/esri/widgets/support/t9n/DatePicker_zh-TW.json +1 -1
  247. package/assets/esri/widgets/support/t9n/TimePicker_ar.json +1 -1
  248. package/assets/esri/widgets/support/t9n/TimePicker_bg.json +1 -1
  249. package/assets/esri/widgets/support/t9n/TimePicker_bs.json +1 -1
  250. package/assets/esri/widgets/support/t9n/TimePicker_ca.json +1 -1
  251. package/assets/esri/widgets/support/t9n/TimePicker_cs.json +1 -1
  252. package/assets/esri/widgets/support/t9n/TimePicker_da.json +1 -1
  253. package/assets/esri/widgets/support/t9n/TimePicker_de.json +1 -1
  254. package/assets/esri/widgets/support/t9n/TimePicker_el.json +1 -1
  255. package/assets/esri/widgets/support/t9n/TimePicker_es.json +1 -1
  256. package/assets/esri/widgets/support/t9n/TimePicker_et.json +1 -1
  257. package/assets/esri/widgets/support/t9n/TimePicker_fi.json +1 -1
  258. package/assets/esri/widgets/support/t9n/TimePicker_fr.json +1 -1
  259. package/assets/esri/widgets/support/t9n/TimePicker_he.json +1 -1
  260. package/assets/esri/widgets/support/t9n/TimePicker_hr.json +1 -1
  261. package/assets/esri/widgets/support/t9n/TimePicker_hu.json +1 -1
  262. package/assets/esri/widgets/support/t9n/TimePicker_id.json +1 -1
  263. package/assets/esri/widgets/support/t9n/TimePicker_it.json +1 -1
  264. package/assets/esri/widgets/support/t9n/TimePicker_ja.json +1 -1
  265. package/assets/esri/widgets/support/t9n/TimePicker_ko.json +1 -1
  266. package/assets/esri/widgets/support/t9n/TimePicker_lt.json +1 -1
  267. package/assets/esri/widgets/support/t9n/TimePicker_lv.json +1 -1
  268. package/assets/esri/widgets/support/t9n/TimePicker_nb.json +1 -1
  269. package/assets/esri/widgets/support/t9n/TimePicker_nl.json +1 -1
  270. package/assets/esri/widgets/support/t9n/TimePicker_pl.json +1 -1
  271. package/assets/esri/widgets/support/t9n/TimePicker_pt-BR.json +1 -1
  272. package/assets/esri/widgets/support/t9n/TimePicker_pt-PT.json +1 -1
  273. package/assets/esri/widgets/support/t9n/TimePicker_ro.json +1 -1
  274. package/assets/esri/widgets/support/t9n/TimePicker_ru.json +1 -1
  275. package/assets/esri/widgets/support/t9n/TimePicker_sk.json +1 -1
  276. package/assets/esri/widgets/support/t9n/TimePicker_sl.json +1 -1
  277. package/assets/esri/widgets/support/t9n/TimePicker_sr.json +1 -1
  278. package/assets/esri/widgets/support/t9n/TimePicker_sv.json +1 -1
  279. package/assets/esri/widgets/support/t9n/TimePicker_th.json +1 -1
  280. package/assets/esri/widgets/support/t9n/TimePicker_tr.json +1 -1
  281. package/assets/esri/widgets/support/t9n/TimePicker_uk.json +1 -1
  282. package/assets/esri/widgets/support/t9n/TimePicker_vi.json +1 -1
  283. package/assets/esri/widgets/support/t9n/TimePicker_zh-CN.json +1 -1
  284. package/assets/esri/widgets/support/t9n/TimePicker_zh-HK.json +1 -1
  285. package/assets/esri/widgets/support/t9n/TimePicker_zh-TW.json +1 -1
  286. package/chunks/CheckerBoard.glsl.js +3 -3
  287. package/chunks/ColorMaterial.glsl.js +5 -5
  288. package/chunks/ComponentShader.glsl.js +1 -1
  289. package/chunks/Compositing.glsl.js +4 -19
  290. package/chunks/DefaultMaterial.glsl.js +2 -2
  291. package/chunks/HUDCompositing.glsl.js +7 -0
  292. package/chunks/HeatmapDensity.glsl.js +4 -4
  293. package/chunks/ImageMaterial.glsl.js +1 -1
  294. package/chunks/Laserlines.glsl.js +5 -5
  295. package/chunks/LineMarker.glsl.js +1 -1
  296. package/chunks/MeasurementArrow.glsl.js +3 -3
  297. package/chunks/NativeLine.glsl.js +1 -1
  298. package/chunks/OITCompositing.glsl.js +13 -0
  299. package/chunks/OverlayCompositing.glsl.js +8 -0
  300. package/chunks/Path.glsl.js +3 -3
  301. package/chunks/Pattern.glsl.js +1 -1
  302. package/chunks/Precipitation.glsl.js +3 -3
  303. package/chunks/RealisticTree.glsl.js +2 -2
  304. package/chunks/RibbonLine.glsl.js +25 -25
  305. package/chunks/ShadedColorMaterial.glsl.js +1 -1
  306. package/chunks/ShadowHighlight.glsl.js +1 -1
  307. package/chunks/SlicePlaneMaterial.glsl.js +2 -2
  308. package/chunks/Terrain.glsl.js +4 -4
  309. package/chunks/WaterSurface.glsl.js +1 -1
  310. package/chunks/ar.js +1 -1
  311. package/chunks/bg_BG.js +1 -1
  312. package/chunks/boundedPlane.js +1 -1
  313. package/chunks/bs_BA.js +1 -1
  314. package/chunks/ca_ES.js +1 -1
  315. package/chunks/cameraUtilsPlanar.js +1 -1
  316. package/chunks/cameraUtilsSpherical.js +1 -1
  317. package/chunks/cs_CZ.js +1 -1
  318. package/chunks/da_DK.js +1 -1
  319. package/chunks/de_CH.js +1 -1
  320. package/chunks/de_DE.js +1 -1
  321. package/chunks/el_GR.js +1 -1
  322. package/chunks/en_CA.js +1 -1
  323. package/chunks/en_US.js +1 -1
  324. package/chunks/es_ES.js +1 -1
  325. package/chunks/et_EE.js +1 -1
  326. package/chunks/fi_FI.js +1 -1
  327. package/chunks/fr_FR.js +1 -1
  328. package/chunks/he_IL.js +1 -1
  329. package/chunks/hr_HR.js +1 -1
  330. package/chunks/hu_HU.js +1 -1
  331. package/chunks/id_ID.js +1 -1
  332. package/chunks/index.js +1 -1
  333. package/chunks/it_IT.js +1 -1
  334. package/chunks/ja_JP.js +1 -1
  335. package/chunks/ko_KR.js +1 -1
  336. package/chunks/lt_LT.js +1 -1
  337. package/chunks/lv_LV.js +1 -1
  338. package/chunks/mat3.js +1 -1
  339. package/chunks/nb_NO.js +1 -1
  340. package/chunks/nl_NL.js +1 -1
  341. package/chunks/pl_PL.js +1 -1
  342. package/chunks/pt_BR.js +1 -1
  343. package/chunks/pt_PT.js +1 -1
  344. package/chunks/quat.js +1 -1
  345. package/chunks/quat2.js +1 -1
  346. package/chunks/quatf64.js +1 -1
  347. package/chunks/ro_RO.js +1 -1
  348. package/chunks/ru_RU.js +1 -1
  349. package/chunks/sk_SK.js +1 -1
  350. package/chunks/sl_SL.js +1 -1
  351. package/chunks/sphere.js +1 -1
  352. package/chunks/sr_RS.js +1 -1
  353. package/chunks/sv_SE.js +1 -1
  354. package/chunks/th_TH.js +1 -1
  355. package/chunks/tr_TR.js +1 -1
  356. package/chunks/uk_UA.js +1 -1
  357. package/chunks/vec3.js +1 -1
  358. package/chunks/vec3f32.js +1 -1
  359. package/chunks/vec4f64.js +1 -1
  360. package/chunks/vi_VN.js +1 -1
  361. package/chunks/zh_Hans.js +1 -1
  362. package/chunks/zh_Hant.js +1 -1
  363. package/core/VectorStack.js +1 -1
  364. package/core/libs/gl-matrix-2/factories/quatf64.js +1 -1
  365. package/core/libs/gl-matrix-2/factories/vec3f32.js +1 -1
  366. package/core/libs/gl-matrix-2/factories/vec4f64.js +1 -1
  367. package/core/libs/gl-matrix-2/math/mat3.js +1 -1
  368. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  369. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  370. package/core/perspectiveUtils.js +1 -1
  371. package/core/workers/workerFactory.js +1 -1
  372. package/geohash/GeohashTree.js +1 -1
  373. package/geometry/support/MeshTransform.js +1 -1
  374. package/geometry/support/axisAngle.js +1 -1
  375. package/geometry/support/axisAngleDegrees.js +1 -1
  376. package/geometry/support/lineSegment.js +1 -1
  377. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  378. package/geometry/support/meshUtils/exporters/gltf/node.js +1 -1
  379. package/geometry/support/meshUtils/georeference.js +1 -1
  380. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  381. package/geometry/support/meshUtils/projection.js +1 -1
  382. package/geometry/support/meshUtils/rotate.js +1 -1
  383. package/geometry/support/plane.js +1 -1
  384. package/interfaces.d.ts +70 -0
  385. package/layers/VoxelWasmPerSceneView.js +1 -1
  386. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  387. package/layers/graphics/featureConversionUtils.js +1 -1
  388. package/layers/mixins/EditBusLayer.js +1 -1
  389. package/layers/mixins/OperationalLayer.js +1 -1
  390. package/layers/support/AggregateField.js +1 -1
  391. package/layers/support/ControlPointsGeoreference.js +1 -1
  392. package/layers/support/ExportImageServiceParameters.js +1 -1
  393. package/layers/support/OutStatistic.js +1 -1
  394. package/layers/support/VoxelVolume.js +1 -1
  395. package/layers/support/voxelPlaneUtils.js +1 -1
  396. package/package.json +1 -1
  397. package/rest/support/AggregateFeatureSet.js +5 -0
  398. package/support/revision.js +1 -1
  399. package/views/2d/ViewState.js +1 -1
  400. package/views/2d/engine/flow/FlowDisplayObject.js +1 -1
  401. package/views/2d/engine/imagery/RasterVFTile.js +1 -1
  402. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  403. package/views/2d/engine/webgl/OverlayContainer.js +1 -1
  404. package/views/2d/engine/webgl/TiledDisplayObject.js +1 -1
  405. package/views/2d/engine/webgl/WGLTile.js +1 -1
  406. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  407. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  408. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  409. package/views/2d/layers/LayerView2D.js +1 -1
  410. package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
  411. package/views/2d/layers/features/schemaUtils.js +1 -1
  412. package/views/2d/layers/features/support/BinStore.js +1 -1
  413. package/views/2d/layers/features/support/ClusterStore.js +1 -1
  414. package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
  415. package/views/2d/layers/imagery/ImageryView2D.js +1 -1
  416. package/views/2d/layers/support/DebugOverlay.js +1 -1
  417. package/views/2d/layers/support/ExportStrategy.js +1 -1
  418. package/views/2d/layers/support/FeatureLayerProxy.js +1 -1
  419. package/views/2d/layers/support/clusterUtils.js +1 -1
  420. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  421. package/views/3d/analysis/Dimensioning/DimensioningTool.js +1 -1
  422. package/views/3d/analysis/Dimensioning/LengthDimensionComputation.js +1 -1
  423. package/views/3d/analysis/Dimensioning/LengthDimensionSubTool.js +1 -1
  424. package/views/3d/analysis/Dimensioning/LengthDimensionVisualization.js +1 -1
  425. package/views/3d/analysis/Dimensioning/lengthDimensionUtils.js +1 -1
  426. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  427. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  428. package/views/3d/analysis/Slice/sliceToolConfig.js +1 -1
  429. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  430. package/views/3d/camera/constraintUtils/distance.js +1 -1
  431. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  432. package/views/3d/environment/CloudsComposition.js +1 -1
  433. package/views/3d/environment/CloudsCompositionParameters.js +1 -1
  434. package/views/3d/environment/CloudsGenerator.js +1 -1
  435. package/views/3d/environment/CloudsPresets.js +1 -1
  436. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  437. package/views/3d/environment/Fog.js +1 -1
  438. package/views/3d/environment/PanoramicAtmosphere.js +1 -1
  439. package/views/3d/environment/Precipitation.js +1 -1
  440. package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
  441. package/views/3d/environment/SimpleAtmosphere.js +1 -1
  442. package/views/3d/environment/weatherUtils.js +1 -1
  443. package/views/3d/externalRenderers/ExternalRendererStore.js +1 -1
  444. package/views/3d/externalRenderers/RenderContext.js +1 -1
  445. package/views/3d/glTF/internal/Resource.js +1 -1
  446. package/views/3d/interactive/Manipulator3D.js +1 -1
  447. package/views/3d/interactive/editingTools/reshapeGraphic/edgeOffsetUtils.js +1 -1
  448. package/views/3d/interactive/editingTools/settings.js +1 -1
  449. package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
  450. package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
  451. package/views/3d/interactive/manipulatorUtils.js +1 -1
  452. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  453. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  454. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  455. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  456. package/views/3d/layers/I3SMeshView3D.js +1 -1
  457. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  458. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  459. package/views/3d/layers/PointCloudWorker.js +1 -1
  460. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  461. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  462. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  463. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  464. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  465. package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
  466. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  467. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  468. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  469. package/views/3d/layers/graphics/elevationAlignPointsInFeatures.js +1 -1
  470. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  471. package/views/3d/layers/i3s/I3SElevationProvider.js +1 -1
  472. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  473. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  474. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  475. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  476. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  477. package/views/3d/layers/support/I3STreeDebugger.js +1 -1
  478. package/views/3d/layers/support/edgeUtils.js +1 -1
  479. package/views/3d/layers/support/uvUtils.js +1 -1
  480. package/views/3d/state/Frustum.js +1 -1
  481. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  482. package/views/3d/state/controllers/RotateController.js +1 -1
  483. package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
  484. package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
  485. package/views/3d/state/controllers/local/ZoomController.js +1 -1
  486. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  487. package/views/3d/state/utils/navigationUtils.js +1 -1
  488. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  489. package/views/3d/support/orientedBoundingBox.js +1 -1
  490. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  491. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  492. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  493. package/views/3d/support/sunUtils.js +1 -1
  494. package/views/3d/terrain/OverlayManager.js +1 -1
  495. package/views/3d/terrain/OverlayRenderer.js +1 -1
  496. package/views/3d/terrain/PatchRenderData.js +1 -1
  497. package/views/3d/terrain/TerrainRenderer.js +1 -1
  498. package/views/3d/terrain/TerrainSurface.js +1 -1
  499. package/views/3d/terrain/Tile.js +1 -1
  500. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  501. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  502. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  503. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  504. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +1 -1
  505. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +1 -1
  506. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +2 -2
  507. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +6 -6
  508. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +2 -2
  509. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +13 -13
  510. package/views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js +1 -1
  511. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +9 -9
  512. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  513. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  514. package/views/3d/webgl-engine/core/util/TwoVectorPosition.js +1 -1
  515. package/views/3d/webgl-engine/lib/AnimationTimer.js +1 -1
  516. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  517. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  518. package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
  519. package/views/3d/webgl-engine/lib/GeometryRecord.js +1 -1
  520. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  521. package/views/3d/webgl-engine/lib/Highlight.js +1 -1
  522. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  523. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  524. package/views/3d/webgl-engine/lib/ObjectAndLayerIdRenderHelper.js +1 -1
  525. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  526. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  527. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  528. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  529. package/views/3d/webgl-engine/lib/Update.js +5 -0
  530. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  531. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  532. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  533. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  534. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  535. package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
  536. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  537. package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
  538. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  539. package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
  540. package/views/3d/webgl-engine/lighting/SphericalHarmonics.js +1 -1
  541. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  542. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  543. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  544. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  545. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  546. package/views/3d/webgl-engine/materials/WaterGLMaterial.js +1 -1
  547. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  548. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  549. package/views/3d/webgl-engine/shaders/Compositing.glsl.js +1 -1
  550. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  551. package/views/3d/webgl-engine/shaders/CompositingTechniqueConfiguration.js +1 -1
  552. package/views/3d/webgl-engine/shaders/HUDCompositing.glsl.js +5 -0
  553. package/views/3d/webgl-engine/shaders/HUDCompositingTechnique.js +5 -0
  554. package/views/3d/webgl-engine/shaders/OITCompositing.glsl.js +5 -0
  555. package/views/3d/webgl-engine/shaders/OITCompositingTechnique.js +5 -0
  556. package/views/3d/webgl-engine/shaders/OverlayCompositing.glsl.js +5 -0
  557. package/views/3d/webgl-engine/shaders/OverlayCompositingTechnique.js +5 -0
  558. package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
  559. package/views/SceneView.js +1 -1
  560. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  561. package/views/interactive/coordinateHelper.js +1 -1
  562. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  563. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  564. package/views/interactive/snapping/LineSnapper.js +1 -1
  565. package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
  566. package/views/interactive/snapping/RightAngleSnapper.js +1 -1
  567. package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
  568. package/views/interactive/snapping/SnappingAlgorithm.js +1 -1
  569. package/views/interactive/snapping/SnappingManager.js +1 -1
  570. package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
  571. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  572. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  573. package/views/interactive/snapping/featureSources/SnappingCandidateElevationAligner.js +1 -1
  574. package/views/interactive/snapping/featureSources/SnappingResultElevationFilter.js +1 -1
  575. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  576. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
  577. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  578. package/views/interactive/snapping/featureSources/snappingResultElevationUtils.js +5 -0
  579. package/views/interactive/snapping/snappingUtils.js +1 -1
  580. package/views/layers/FeatureLayerView.js +1 -1
  581. package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
  582. package/views/support/Scheduler.js +1 -1
  583. package/views/support/euclideanAreaMeasurementUtils.js +1 -1
  584. package/views/support/geometry3dUtils.js +1 -1
  585. package/widgets/Directions/support/resources.js +1 -1
  586. package/widgets/Directions.js +1 -1
  587. package/widgets/ElevationProfile/support/ProfileLines3D.js +1 -1
  588. package/widgets/ElevationProfile/support/constants.js +1 -1
  589. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  590. package/widgets/Feature/FeatureRelationship.js +1 -1
  591. package/widgets/Legend/LegendViewModel.js +1 -1
  592. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  593. package/widgets/Weather/LabeledSlider.js +1 -1
  594. package/widgets/Weather.js +1 -1
  595. package/assets/esri/core/workers/chunks/0059699bf824f851d51c.js +0 -1
  596. package/assets/esri/core/workers/chunks/01a6005569d0820992a0.js +0 -1
  597. package/assets/esri/core/workers/chunks/2eb547a0be305f2c816c.js +0 -1
  598. package/assets/esri/core/workers/chunks/36dd5654df5c7f00406d.js +0 -1
  599. package/assets/esri/core/workers/chunks/36e0a0d5f86b2b4b88f9.js +0 -1
  600. package/assets/esri/core/workers/chunks/8b8a813f5e6d6551a816.js +0 -1
  601. package/assets/esri/core/workers/chunks/bf84189bd9bf3de81df9.js +0 -1
  602. package/assets/esri/core/workers/chunks/cd7f5c3d328166f28f59.js +0 -1
  603. package/assets/esri/core/workers/chunks/de128d8a643b4297940b.js +0 -1
  604. package/assets/esri/core/workers/chunks/e208d9c34f5db4481441.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../geometry.js";import t from"../../../../analysis/SlicePlane.js";import"../../../../core/has.js";import e from"../../../../core/Logger.js";import{rad2deg as i,deg2rad as n}from"../../../../core/mathUtils.js";import{isNone as r,isSome as s}from"../../../../core/maybe.js";import{castRenderScreenPointArray3 as o}from"../../../../core/screenUtils.js";import{o as a,b as c,k as l,m as u,r as d,i as m,v as p,D as g}from"../../../../chunks/mat4.js";import{c as f}from"../../../../chunks/mat4f64.js";import{r as b}from"../../../../chunks/quat.js";import{g as h,c as T,e as O,f as E,n as I,a as R,l as w,b as j,s as A,p as y,y as M}from"../../../../chunks/vec3.js";import{a as L,c as _,f as C}from"../../../../chunks/vec3f64.js";import{tryProjectWithZConversion as k}from"../../../../geometry/projection.js";import{Axis as N}from"../../../../geometry/support/Axis.js";import{r as P,f as v,i as U,a as V,n as S,u as F}from"../../../../chunks/boundedPlane.js";import{fromVectorsAndPoint as H,fromPositionAndNormal as x}from"../../../../geometry/support/plane.js";import{create as G}from"../../../../geometry/support/ray.js";import{angleAroundAxis as D}from"../../../../geometry/support/vector.js";import{sv3d as X,sm4d as Y,sq4d as Z}from"../../../../geometry/support/vectorStacks.js";import{VERTICAL_DOT_THRESHOLD as W,SMALL_ANGLE_DOT_THRESHOLD as z,PLANE_MIN_BASIS_SCREEN_LEN2 as B,INITIAL_PLANE_HALF_SIZE_VIEW_PROPORTION as q,SHIFT_RESTART_OFFSET_DISTANCE as $,RESIZE_HANDLE_EDGE_PADDING_FRAC as J,SHIFT_RESTART_ARROW_TIP_COLOR as K,SHIFT_RESTART_ARROW_CAP_COLOR as Q,SHIFT_RESTART_TUBE_COLOR as tt,SHIFT_RESTART_OUTLINE_COLOR as et,SHIFT_RESTART_CALLOUT_COLOR as it,SHIFT_RESTART_TIP_RADIUS as nt,PLANE_OUTLINE_COLOR as rt,PLANE_OUTLINE_WIDTH as st,PLANE_BACKGROUND_COLOR as ot,GRID_COLOR as at,RESIZE_HANDLE_CORNER_INPUT_RADIUS as ct,RESIZE_HANDLE_EDGE_INPUT_RADIUS as lt,SHIFT_RESTART_TIP_LENGTH as ut,SHIFT_RESTART_ARROW_LENGTH as dt,SHIFT_RESTART_TUBE_RADIUS as mt,SHIFT_RESTART_TUBE_FOCUS_MULTIPLIER as pt,SHIFT_RESTART_TIP_FOCUS_MULTIPLIER as gt,SHIFT_RESTART_ARROW_OUTLINE_WIDTH as ft,RESIZE_HANDLE_CORNER_WIDTH as bt,RESIZE_HANDLE_EDGE_WIDTH as ht,DISPLAY_FOCUS_MULTIPLIER as Tt,RESIZE_HANDLE_COLOR as Ot}from"./sliceToolConfig.js";import{applyProjectionAndElevationAlignment as Et}from"../support/projectionUtils.js";import{Manipulator3D as It}from"../../interactive/Manipulator3D.js";import{calculateTranslateRotateFromBases as Rt,createRotateManipulator as wt}from"../../interactive/manipulatorUtils.js";import{LineVisualElement as jt}from"../../interactive/visualElements/LineVisualElement.js";import{SlicePlaneVisualElement as At}from"../../interactive/visualElements/SlicePlaneVisualElement.js";import{RenderCoordsHelper as yt}from"../../support/RenderCoordsHelper.js";import{fromRender as Mt}from"../../support/geometryUtils/ray.js";import{CullFaceOptions as Lt}from"../../webgl-engine/lib/basicInterfaces.js";import{createPolylineGeometry as _t,createExtrudedTriangle as Ct,createConeGeometry as kt,createPathExtrusionGeometry as Nt}from"../../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as Pt}from"../../webgl-engine/lib/Material.js";import{ColorMaterial as vt}from"../../webgl-engine/materials/ColorMaterial.js";import{NativeLineMaterial as Ut}from"../../webgl-engine/materials/NativeLineMaterial.js";import{RibbonLineMaterial as Vt}from"../../webgl-engine/materials/RibbonLineMaterial.js";import{ManipulatorStateCustomFlags as St,ManipulatorStateFlags as Ft}from"../../../interactive/interfaces.js";import Ht from"../../../../geometry/Extent.js";function xt(t,e,i,n,r,s,o,a){return Gt(e,o.worldUpAtPosition(t,X.get()),r,s,a.basis1,a.basis2),h(a.basis1,a.basis1,i),h(a.basis2,a.basis2,n),T(a.origin,t),H(a.basis2,a.basis1,a.origin,a.plane),a}function Gt(t,e,i,n,r,s){const o=O(t,e),a=X.get(),c=X.get();switch(n===Re.HORIZONTAL_OR_VERTICAL?Math.abs(o)>W?Re.HORIZONTAL:Re.VERTICAL:n){case Re.VERTICAL:{const n=Math.abs(o)<=z?t:i.viewUp;E(a,n,e),T(c,e);break}case Re.HORIZONTAL:E(a,i.viewUp,e),E(c,e,a);break;case Re.TILTED:{const n=Math.abs(o)<=z?e:i.viewUp;E(a,n,t),E(c,t,a);break}}const l=E(X.get(),a,c);O(l,i.viewForward)>0&&h(c,c,-1),I(r,a),I(s,c)}function Dt(t,e,i){const n=e.worldUpAtPosition(t.origin,X.get()),r=t.basis1,s=fe(t,n),o=Math.round(s/Ae)*Ae;return P(t,o-s,r,i)}function Xt(t,e,i,n,r,s){const o=T(X.get(),r.origin);R(o,o,h(X.get(),r.basis1,t.direction[0]<0?1:-1)),R(o,o,h(X.get(),r.basis2,t.direction[1]<0?1:-1));const a=w(r.basis1),c=w(r.basis2),l=j(X.get(),i,o),u=j(X.get(),e,o);let d=0,m=0;if(re(t)){const e=ne(r),i=ne(s);d=a-.5*t.direction[0]*O(r.basis1,u)/a,m=c-.5*t.direction[1]*O(r.basis2,u)/c;const n=i/e;d*=n,m*=n}const p=d+.5*t.direction[0]*O(r.basis1,l)/a,g=m+.5*t.direction[1]*O(r.basis2,l)/c,f=h(X.get(),r.basis1,p/a),b=h(X.get(),r.basis2,g/c);(p<=0||ee(s.origin,f,n)<=B)&&T(f,s.basis1),(g<=0||ee(s.origin,b,n)<=B)&&T(b,s.basis2);const E=T(X.get(),o);return R(E,E,h(X.get(),f,t.direction[0]<0?-1:1)),R(E,E,h(X.get(),b,t.direction[1]<0?-1:1)),v(E,f,b,s)}function Yt(t,e){return q*Math.min(e.width,e.height)*e.computeRenderPixelSizeAt(t)}function Zt(t,e,i,n){const r=E(X.get(),e,i);return E(r,r,e),x(t,r,n)}function Wt(t,e){return Rt(t.basis1,t.basis2,t.origin,e)}function zt(t,e,i,n){const r=e.worldUpAtPosition(t.origin,X.get()),s=X.get();switch(i){case Ie.HEADING:T(s,r);break;case Ie.TILT:T(s,t.basis1)}return x(t.origin,s,n)}function Bt(t,e,i,n){const r=te(i,Qt.NEGATIVE_X),s=Y.get();a(s,e,r.edge*Math.PI/2);const c=I(X.get(),r.basis);let l=h(X.get(),c,r.direction*n.computeScreenPixelSizeAt(r.position)*$);R(l,l,r.position);const u=n.projectToRenderScreen(l,o(X.get())),d=qt(n,u);Mt(n,u,je),I(je.direction,je.direction);const m=X.get();!d&&U(i,je,m)&&(l=m),s[12]=0,s[13]=0,s[14]=0,t.modelTransform=s,t.renderLocation=L(l),d?t.state|=we:t.state&=~we}function qt(t,e){const[i,n,r,s]=t.viewport,o=Math.min(r,s)/16;let a=!0;return e[0]<i+o?(e[0]=i+o,a=!1):e[0]>i+r-o&&(e[0]=i+r-o,a=!1),e[1]<n+o?(e[1]=n+o,a=!1):e[1]>n+s-o&&(e[1]=n+s-o,a=!1),a}function $t(t,e,i,n){const r=w(n.basis1),s=w(n.basis2),o=ie(n),a=ne(n),d=A(X.get(),0,0,0);R(d,h(X.get(),n.basis1,e.direction[0]),h(X.get(),n.basis2,e.direction[1])),R(d,n.origin,d);let m=0,p=1;if(re(e))1===e.direction[0]&&-1===e.direction[1]?m=Ae:1===e.direction[0]&&1===e.direction[1]?m=Math.PI:-1===e.direction[0]&&1===e.direction[1]&&(m=3*Math.PI/2),p=a;else{const t=0!==e.direction[0]?1:2;m=1===t?Ae:0,p=(1===t?s:r)-o}const g=c(Y.get(),m);l(g,g,A(X.get(),p,p,p)),u(g,i,g),g[12]=0,g[13]=0,g[14]=0,t.modelTransform=g,t.renderLocation=d}function Jt(t,e,i,n){const r=n.worldUpAtPosition(i.origin,X.get()),s=te(i,Qt.POSITIVE_X),o=c(Y.get(),s.edge*Math.PI/2);d(o,o,-fe(i,r)),u(o,e,o),o[12]=0,o[13]=0,o[14]=0,t.modelTransform=o,t.renderLocation=s.position}function Kt(t,e,i){const n=te(i,Qt.POSITIVE_Y),r=c(Y.get(),n.edge*Math.PI/2);d(r,r,Ae),u(r,e,r),r[12]=0,r[13]=0,r[14]=0,t.modelTransform=r,t.renderLocation=n.position}var Qt;function te(t,e){switch(e){case Qt.POSITIVE_X:return{basis:t.basis1,direction:1,position:R(X.get(),t.origin,t.basis1),edge:e};case Qt.POSITIVE_Y:return{basis:t.basis2,direction:1,position:R(X.get(),t.origin,t.basis2),edge:e};case Qt.NEGATIVE_X:return{basis:t.basis1,direction:-1,position:j(X.get(),t.origin,t.basis1),edge:e};case Qt.NEGATIVE_Y:return{basis:t.basis2,direction:-1,position:j(X.get(),t.origin,t.basis2),edge:e}}}function ee(t,e,i){const n=i.projectToRenderScreen(R(X.get(),t,e),o(X.get())),r=i.projectToRenderScreen(j(X.get(),t,e),o(X.get()));return y(j(n,n,r))}function ie(t){const e=w(t.basis1),i=w(t.basis2);return J*Math.min(e,i)}function ne(t){return ie(t)}function re(t){return 0!==t.direction[0]&&0!==t.direction[1]}function se(t,e=Le.CENTER_ON_ARROW){const i=e===Le.CENTER_ON_CALLOUT?$:0,n=[C(i,0,-dt/2),C(i,0,dt/2)],r=me(n,!0),s=(t,e)=>ue(n,n,{tubeRadius:mt,tipRadius:nt,tipLength:ut,tubeFocusMultiplier:pt,tipFocusMultiplier:gt,padding:t,bothEnds:!0,flat:null,focusTipLength:!0,addCap:e}),o=s(0,!1),a=s(ft,!0),c=new vt({color:K,cullFace:Lt.Back,renderOccluded:Pt.Opaque}),l=new vt({color:Q,cullFace:Lt.Back,renderOccluded:Pt.Opaque}),u=new vt({color:tt,cullFace:Lt.Back,renderOccluded:Pt.Opaque}),d=new vt({color:et,transparent:!0,writeDepth:!1,cullFace:Lt.Front,renderOccluded:Pt.Transparent}),m=_t([[i,0,0],[i-$,0,0]]),p=_t([[i,0,0],[i-$,0,0]]),g=new Ut({color:it,renderOccluded:Pt.OccludeAndTransparent});return new It({view:t,renderObjects:[...o.normal.map((({part:t,geometry:e,transform:i})=>({geometry:e,material:"tip"===t?c:"cap"===t?l:u,transform:i,stateMask:Ft.Unfocused|Ee}))),...a.normal.map((({geometry:t,transform:e})=>({geometry:t,material:d,transform:e,stateMask:Ft.Unfocused|Ee}))),{geometry:m,material:g,stateMask:Ft.Unfocused|Ee|we},...o.focused.map((({part:t,geometry:e,transform:i})=>({geometry:e,material:"tip"===t?c:"cap"===t?l:u,transform:i,stateMask:Ft.Focused|Ee}))),...a.focused.map((({geometry:t,transform:e})=>({geometry:t,material:d,transform:e,stateMask:Ft.Focused|Ee}))),{geometry:p,material:g,stateMask:Ft.Focused|Ee|we}],autoScaleRenderObjects:!1,collisionType:{type:"line",paths:[r]},collisionPriority:1,radius:nt,state:Ee})}function oe(t,e){const i=wt(t,e,Ee);return i.state=Ee,i}function ae(t){const e=[[-1,-1,0],[1,-1,0],[1,1,0],[-1,1,0],[-1,-1,0]];return new jt({view:t,attached:!0,color:rt,width:st,writeDepthEnabled:!1,renderOccluded:Pt.OccludeAndTransparent,geometry:[e]})}function ce(t){return new At({view:t,attached:!0,backgroundColor:[...ot],gridColor:at,gridWidth:4,renderOccluded:Pt.OccludeAndTransparent})}function le(t,e){const i=re(e),n=i?[C(1,0,0),C(0,0,0),C(0,1,0)]:[C(1,0,0),C(-1,0,0)],r=_t(n),s=Ot,o=t=>new Vt({color:s,width:t,renderOccluded:Pt.OccludeAndTransparent}),a=()=>new Ut({color:s,renderOccluded:Pt.OccludeAndTransparent}),c=i?bt:ht,l=c*Tt,u=ht,d=t=>t>1?o(t):a(),m=[{geometry:r,material:d(c),stateMask:Ft.Unfocused|ye},{geometry:r,material:d(l),stateMask:Ft.Focused|ye},{geometry:r,material:d(u),stateMask:Me}],p=new It({view:t,renderObjects:m,collisionType:{type:"line",paths:[n]},autoScaleRenderObjects:!1,worldSized:!0,radius:i?ct:lt});return p.state=ye,p}function ue(t,e,i){const n=n=>{const r=(n?e:t).slice(0),o=j(X.get(),r[0],r[1]);I(o,o);const a=j(X.get(),r[r.length-1],r[r.length-2]);if(I(a,a),i.padding>0){const t=h(_(),a,-i.padding);if(r[r.length-1]=R(t,t,r[r.length-1]),i.bothEnds){const t=h(_(),o,-i.padding);r[0]=R(t,t,r[0])}}const c=n?i.tipFocusMultiplier:1,d=i.tipLength*(i.focusTipLength?c:1),T=i.tipRadius*c,O=m(Y.get());if(i.padding>0){const t=d/4,e=A(X.get(),0,t,0),n=1+i.padding/t;p(O,O,e),l(O,O,A(X.get(),n,n,n)),p(O,O,h(e,e,-1/n))}const E=m(f()),w=C(0,1,0),y=g(f(),b(Z.get(),w,a));y[12]=r[r.length-1][0],y[13]=r[r.length-1][1],y[14]=r[r.length-1][2],u(y,y,O);const M=[{part:"tube",geometry:de(i.tubeRadius*(n?i.tubeFocusMultiplier:1)+i.padding,i.flat,r),transform:E}];let L,k;if(s(i.flat)?L=Ct(d,T,T,i.flat.thickness):(L=kt(d,T,24,!1,!1,!0),k=kt(d,T,24,!1,!0,!1)),M.push({part:"tip",geometry:L,transform:y}),k&&M.push({part:"cap",geometry:k,transform:y}),i.bothEnds){const t=g(f(),b(Z.get(),w,o));t[12]=r[0][0],t[13]=r[0][1],t[14]=r[0][2],u(t,t,O),M.push({part:"tip",geometry:L,transform:t}),k&&M.push({part:"cap",geometry:k,transform:t})}return M};return{normal:n(!1),focused:n(!0)}}function de(t,e,i){const n=[];if(s(e))n.push([t,e.thickness/2],[-t,e.thickness/2],[-t,-e.thickness/2],[t,-e.thickness/2]);else{const e=12;for(let i=0;i<e;i++){const r=i/e*2*Math.PI;n.push([Math.cos(r)*t,Math.sin(r)*t])}}return Nt(n,i,[],[],!1)}function me(t,e){const i=j(_(),t[t.length-1],t[t.length-2]);if(I(i,i),h(i,i,ut),R(i,i,t[t.length-1]),e){const e=j(_(),t[0],t[1]);return I(e,e),h(e,e,ut),R(e,e,t[0]),[e,...t,i]}return[...t,i]}function pe(e,n,s,o=new t){if(r(e))return null;const{renderCoordsHelper:a}=n,c=a.fromRenderCoords(e.origin,n.spatialReference);if(r(c))return null;const l=k(c,s);if(r(l))return null;o.position=l;const u=2*w(e.basis1),d=2*w(e.basis2),m=yt.renderUnitScaleFactor(n.spatialReference,s);o.width=u*m,o.height=d*m;const p=a.worldUpAtPosition(e.origin,X.get());return o.tilt=i(fe(e,p)),o.heading=a.headingAtPosition(e.origin,e.basis1)-90,o}function ge(t,e,i){if(r(t))return null;const n=t.origin,s=X.get(),o=X.get(),a=X.get(),c=X.get();let l,u,d,m,p,g;R(s,n,t.basis1),R(s,s,t.basis2),R(o,n,t.basis1),M(o,o,t.basis2),M(a,n,t.basis1),M(a,a,t.basis2),M(c,n,t.basis1),R(c,c,t.basis2);for(const f of[s,o,a,c]){const t=e.fromRenderCoords(f,f,i);if(r(t))return null;l=null==l?t[0]:Math.min(l,t[0]),u=null==u?t[0]:Math.max(u,t[0]),d=null==d?t[1]:Math.min(d,t[1]),m=null==m?t[1]:Math.max(m,t[1]),p=null==p?t[2]:Math.min(p,t[2]),g=null==g?t[2]:Math.max(g,t[2])}return new Ht({xmin:l,xmax:u,ymin:d,ymax:m,zmin:p,zmax:g,spatialReference:i})}function fe(t,e){return D(e,t.basis2,t.basis1)+Ae}function be(t,i,r,s,o,a,c=V()){return a.toRenderCoords(t,c.origin)?(a.worldBasisAtPosition(c.origin,N.X,c.basis1),a.worldBasisAtPosition(c.origin,N.Y,c.basis2),H(c.basis2,c.basis1,c.origin,c.plane),P(c,-n(i),S(c),c),P(c,n(r),c.basis1,c),h(c.basis1,c.basis1,s/2),h(c.basis2,c.basis2,o/2),F(c),c):(e.getLogger("esri.views.3d.analysis.Slice.sliceToolUtils").error(`Failed to project slice plane position, projection from ${t.spatialReference.wkid} is not supported`),null)}function he(t,e){if(r(t)||r(t.position))return null;const i=Et(t.position,e.spatialReference,e.elevationProvider);if(r(i))return null;const n=yt.renderUnitScaleFactor(t.position.spatialReference,e.spatialReference),s=t.width*n,o=t.height*n;return{position:i,heading:t.heading,tilt:t.tilt,renderWidth:s,renderHeight:o}}function Te(t,e,i,n=V()){const s=he(t,e);return r(s)?null:Oe(s,e,i,n)}function Oe(t,e,i,n=V()){if(r(t))return null;const o=be(t.position,t.heading,t.tilt,t.renderWidth,t.renderHeight,e.renderCoordsHelper,n);return!i.tiltEnabled&&s(o)&&Dt(o,e.renderCoordsHelper,o),o}!function(t){t[t.POSITIVE_X=0]="POSITIVE_X",t[t.POSITIVE_Y=1]="POSITIVE_Y",t[t.NEGATIVE_X=2]="NEGATIVE_X",t[t.NEGATIVE_Y=3]="NEGATIVE_Y"}(Qt||(Qt={}));const Ee=St.Custom1;var Ie,Re;!function(t){t[t.HEADING=1]="HEADING",t[t.TILT=2]="TILT"}(Ie||(Ie={})),function(t){t[t.HORIZONTAL_OR_VERTICAL=0]="HORIZONTAL_OR_VERTICAL",t[t.HORIZONTAL=1]="HORIZONTAL",t[t.VERTICAL=2]="VERTICAL",t[t.TILTED=3]="TILTED"}(Re||(Re={}));const we=St.Custom2,je=G(),Ae=Math.PI/2,ye=St.Custom1,Me=St.Custom2;var Le;function _e(t){const e="building-scene-3d"===t.type?t:null;return s(e)}!function(t){t[t.CENTER_ON_CALLOUT=0]="CENTER_ON_CALLOUT",t[t.CENTER_ON_ARROW=1]="CENTER_ON_ARROW"}(Le||(Le={}));export{Ee as DidPointerMoveRecentlyFlag,we as IsShiftEdgeOnScreenFlag,Le as OffsetMode,Ie as RotationAxis,Re as SliceOrientation,me as addArrowTips,Wt as calculateBoundedPlaneTranslateRotate,ne as calculateDiagonalResizeHandleScale,Yt as calculatePlaneHalfSize,ie as calculateResizeHandlePadding,ee as calculateScreenSpaceBasisLength2,ue as createArrowGeometry,ce as createGridVisualElement,ae as createOutlineVisualElement,xt as createPlane,le as createResizeManipulator,oe as createRotateManipulator,zt as createRotatePlane,se as createShiftManipulator,Zt as createShiftPlane,Dt as forceHorizontalOrVertical,re as isDiagonalResizeHandle,_e as isIBuildingSceneLayerView3D,Gt as normalToBases,ge as planeToExtent,pe as planeToShape,he as projectAndElevationAlignShape,Oe as projectedShapeToPlane,ye as resizeNormal,Me as resizeOutlineOnly,Xt as resizePlane,Te as shapeToPlane,$t as updateResizeHandle,Jt as updateRotateHeadingHandle,Kt as updateRotateTiltHandle,Bt as updateShiftRestartHandle};
5
+ import"../../../../geometry.js";import t from"../../../../analysis/SlicePlane.js";import"../../../../core/has.js";import e from"../../../../core/Logger.js";import{rad2deg as i,deg2rad as n}from"../../../../core/mathUtils.js";import{isNone as r,isSome as s}from"../../../../core/maybe.js";import{castRenderScreenPointArray3 as o}from"../../../../core/screenUtils.js";import{o as a,b as c,k as l,m as u,r as d,i as m,v as p,D as g}from"../../../../chunks/mat4.js";import{c as f}from"../../../../chunks/mat4f64.js";import{r as b}from"../../../../chunks/quat.js";import{g as h,c as T,e as O,f as E,n as I,a as R,l as w,b as j,s as A,z as y,p as M}from"../../../../chunks/vec3.js";import{a as L,c as _,f as C}from"../../../../chunks/vec3f64.js";import{tryProjectWithZConversion as k}from"../../../../geometry/projection.js";import{Axis as N}from"../../../../geometry/support/Axis.js";import{r as P,f as v,i as U,a as V,n as S,u as F}from"../../../../chunks/boundedPlane.js";import{fromVectorsAndPoint as H,fromPositionAndNormal as x}from"../../../../geometry/support/plane.js";import{create as G}from"../../../../geometry/support/ray.js";import{angleAroundAxis as D}from"../../../../geometry/support/vector.js";import{sv3d as X,sm4d as Y,sq4d as Z}from"../../../../geometry/support/vectorStacks.js";import{VERTICAL_DOT_THRESHOLD as z,SMALL_ANGLE_DOT_THRESHOLD as W,PLANE_MIN_BASIS_SCREEN_LEN2 as B,INITIAL_PLANE_HALF_SIZE_VIEW_PROPORTION as q,SHIFT_RESTART_OFFSET_DISTANCE as $,RESIZE_HANDLE_EDGE_PADDING_FRAC as J,SHIFT_RESTART_ARROW_TIP_COLOR as K,SHIFT_RESTART_ARROW_CAP_COLOR as Q,SHIFT_RESTART_TUBE_COLOR as tt,SHIFT_RESTART_OUTLINE_COLOR as et,SHIFT_RESTART_CALLOUT_COLOR as it,SHIFT_RESTART_TIP_RADIUS as nt,PLANE_OUTLINE_COLOR as rt,PLANE_OUTLINE_WIDTH as st,PLANE_BACKGROUND_COLOR as ot,GRID_COLOR as at,RESIZE_HANDLE_CORNER_INPUT_RADIUS as ct,RESIZE_HANDLE_EDGE_INPUT_RADIUS as lt,SHIFT_RESTART_TIP_LENGTH as ut,SHIFT_RESTART_ARROW_LENGTH as dt,SHIFT_RESTART_TUBE_RADIUS as mt,SHIFT_RESTART_TUBE_FOCUS_MULTIPLIER as pt,SHIFT_RESTART_TIP_FOCUS_MULTIPLIER as gt,SHIFT_RESTART_ARROW_OUTLINE_WIDTH as ft,RESIZE_HANDLE_CORNER_WIDTH as bt,RESIZE_HANDLE_EDGE_WIDTH as ht,DISPLAY_FOCUS_MULTIPLIER as Tt,RESIZE_HANDLE_COLOR as Ot}from"./sliceToolConfig.js";import{applyProjectionAndElevationAlignment as Et}from"../support/projectionUtils.js";import{Manipulator3D as It}from"../../interactive/Manipulator3D.js";import{calculateTranslateRotateFromBases as Rt,createRotateManipulator as wt}from"../../interactive/manipulatorUtils.js";import{LineVisualElement as jt}from"../../interactive/visualElements/LineVisualElement.js";import{SlicePlaneVisualElement as At}from"../../interactive/visualElements/SlicePlaneVisualElement.js";import{RenderCoordsHelper as yt}from"../../support/RenderCoordsHelper.js";import{fromRender as Mt}from"../../support/geometryUtils/ray.js";import{CullFaceOptions as Lt}from"../../webgl-engine/lib/basicInterfaces.js";import{createPolylineGeometry as _t,createExtrudedTriangle as Ct,createConeGeometry as kt,createPathExtrusionGeometry as Nt}from"../../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as Pt}from"../../webgl-engine/lib/Material.js";import{ColorMaterial as vt}from"../../webgl-engine/materials/ColorMaterial.js";import{NativeLineMaterial as Ut}from"../../webgl-engine/materials/NativeLineMaterial.js";import{RibbonLineMaterial as Vt}from"../../webgl-engine/materials/RibbonLineMaterial.js";import{ManipulatorStateCustomFlags as St,ManipulatorStateFlags as Ft}from"../../../interactive/interfaces.js";import Ht from"../../../../geometry/Extent.js";function xt(t,e,i,n,r,s,o,a){return Gt(e,o.worldUpAtPosition(t,X.get()),r,s,a.basis1,a.basis2),h(a.basis1,a.basis1,i),h(a.basis2,a.basis2,n),T(a.origin,t),H(a.basis2,a.basis1,a.origin,a.plane),a}function Gt(t,e,i,n,r,s){const o=O(t,e),a=X.get(),c=X.get();switch(n===Re.HORIZONTAL_OR_VERTICAL?Math.abs(o)>z?Re.HORIZONTAL:Re.VERTICAL:n){case Re.VERTICAL:{const n=Math.abs(o)<=W?t:i.viewUp;E(a,n,e),T(c,e);break}case Re.HORIZONTAL:E(a,i.viewUp,e),E(c,e,a);break;case Re.TILTED:{const n=Math.abs(o)<=W?e:i.viewUp;E(a,n,t),E(c,t,a);break}}const l=E(X.get(),a,c);O(l,i.viewForward)>0&&h(c,c,-1),I(r,a),I(s,c)}function Dt(t,e,i){const n=e.worldUpAtPosition(t.origin,X.get()),r=t.basis1,s=fe(t,n),o=Math.round(s/Ae)*Ae;return P(t,o-s,r,i)}function Xt(t,e,i,n,r,s){const o=T(X.get(),r.origin);R(o,o,h(X.get(),r.basis1,t.direction[0]<0?1:-1)),R(o,o,h(X.get(),r.basis2,t.direction[1]<0?1:-1));const a=w(r.basis1),c=w(r.basis2),l=j(X.get(),i,o),u=j(X.get(),e,o);let d=0,m=0;if(re(t)){const e=ne(r),i=ne(s);d=a-.5*t.direction[0]*O(r.basis1,u)/a,m=c-.5*t.direction[1]*O(r.basis2,u)/c;const n=i/e;d*=n,m*=n}const p=d+.5*t.direction[0]*O(r.basis1,l)/a,g=m+.5*t.direction[1]*O(r.basis2,l)/c,f=h(X.get(),r.basis1,p/a),b=h(X.get(),r.basis2,g/c);(p<=0||ee(s.origin,f,n)<=B)&&T(f,s.basis1),(g<=0||ee(s.origin,b,n)<=B)&&T(b,s.basis2);const E=T(X.get(),o);return R(E,E,h(X.get(),f,t.direction[0]<0?-1:1)),R(E,E,h(X.get(),b,t.direction[1]<0?-1:1)),v(E,f,b,s)}function Yt(t,e){return q*Math.min(e.width,e.height)*e.computeRenderPixelSizeAt(t)}function Zt(t,e,i,n){const r=E(X.get(),e,i);return E(r,r,e),x(t,r,n)}function zt(t,e){return Rt(t.basis1,t.basis2,t.origin,e)}function Wt(t,e,i,n){const r=e.worldUpAtPosition(t.origin,X.get()),s=X.get();switch(i){case Ie.HEADING:T(s,r);break;case Ie.TILT:T(s,t.basis1)}return x(t.origin,s,n)}function Bt(t,e,i,n){const r=te(i,Qt.NEGATIVE_X),s=Y.get();a(s,e,r.edge*Math.PI/2);const c=I(X.get(),r.basis);let l=h(X.get(),c,r.direction*n.computeScreenPixelSizeAt(r.position)*$);R(l,l,r.position);const u=n.projectToRenderScreen(l,o(X.get())),d=qt(n,u);Mt(n,u,je),I(je.direction,je.direction);const m=X.get();!d&&U(i,je,m)&&(l=m),s[12]=0,s[13]=0,s[14]=0,t.modelTransform=s,t.renderLocation=L(l),d?t.state|=we:t.state&=~we}function qt(t,e){const[i,n,r,s]=t.viewport,o=Math.min(r,s)/16;let a=!0;return e[0]<i+o?(e[0]=i+o,a=!1):e[0]>i+r-o&&(e[0]=i+r-o,a=!1),e[1]<n+o?(e[1]=n+o,a=!1):e[1]>n+s-o&&(e[1]=n+s-o,a=!1),a}function $t(t,e,i,n){const r=w(n.basis1),s=w(n.basis2),o=ie(n),a=ne(n),d=A(X.get(),0,0,0);R(d,h(X.get(),n.basis1,e.direction[0]),h(X.get(),n.basis2,e.direction[1])),R(d,n.origin,d);let m=0,p=1;if(re(e))1===e.direction[0]&&-1===e.direction[1]?m=Ae:1===e.direction[0]&&1===e.direction[1]?m=Math.PI:-1===e.direction[0]&&1===e.direction[1]&&(m=3*Math.PI/2),p=a;else{const t=0!==e.direction[0]?1:2;m=1===t?Ae:0,p=(1===t?s:r)-o}const g=c(Y.get(),m);l(g,g,A(X.get(),p,p,p)),u(g,i,g),g[12]=0,g[13]=0,g[14]=0,t.modelTransform=g,t.renderLocation=d}function Jt(t,e,i,n){const r=n.worldUpAtPosition(i.origin,X.get()),s=te(i,Qt.POSITIVE_X),o=c(Y.get(),s.edge*Math.PI/2);d(o,o,-fe(i,r)),u(o,e,o),o[12]=0,o[13]=0,o[14]=0,t.modelTransform=o,t.renderLocation=s.position}function Kt(t,e,i){const n=te(i,Qt.POSITIVE_Y),r=c(Y.get(),n.edge*Math.PI/2);d(r,r,Ae),u(r,e,r),r[12]=0,r[13]=0,r[14]=0,t.modelTransform=r,t.renderLocation=n.position}var Qt;function te(t,e){switch(e){case Qt.POSITIVE_X:return{basis:t.basis1,direction:1,position:R(X.get(),t.origin,t.basis1),edge:e};case Qt.POSITIVE_Y:return{basis:t.basis2,direction:1,position:R(X.get(),t.origin,t.basis2),edge:e};case Qt.NEGATIVE_X:return{basis:t.basis1,direction:-1,position:j(X.get(),t.origin,t.basis1),edge:e};case Qt.NEGATIVE_Y:return{basis:t.basis2,direction:-1,position:j(X.get(),t.origin,t.basis2),edge:e}}}function ee(t,e,i){const n=i.projectToRenderScreen(R(X.get(),t,e),o(X.get())),r=i.projectToRenderScreen(j(X.get(),t,e),o(X.get()));return y(j(n,n,r))}function ie(t){const e=w(t.basis1),i=w(t.basis2);return J*Math.min(e,i)}function ne(t){return ie(t)}function re(t){return 0!==t.direction[0]&&0!==t.direction[1]}function se(t,e=Le.CENTER_ON_ARROW){const i=e===Le.CENTER_ON_CALLOUT?$:0,n=[C(i,0,-dt/2),C(i,0,dt/2)],r=me(n,!0),s=(t,e)=>ue(n,n,{tubeRadius:mt,tipRadius:nt,tipLength:ut,tubeFocusMultiplier:pt,tipFocusMultiplier:gt,padding:t,bothEnds:!0,flat:null,focusTipLength:!0,addCap:e}),o=s(0,!1),a=s(ft,!0),c=new vt({color:K,cullFace:Lt.Back,renderOccluded:Pt.Opaque}),l=new vt({color:Q,cullFace:Lt.Back,renderOccluded:Pt.Opaque}),u=new vt({color:tt,cullFace:Lt.Back,renderOccluded:Pt.Opaque}),d=new vt({color:et,transparent:!0,writeDepth:!1,cullFace:Lt.Front,renderOccluded:Pt.Transparent}),m=_t([[i,0,0],[i-$,0,0]]),p=_t([[i,0,0],[i-$,0,0]]),g=new Ut({color:it,renderOccluded:Pt.OccludeAndTransparent});return new It({view:t,renderObjects:[...o.normal.map((({part:t,geometry:e,transform:i})=>({geometry:e,material:"tip"===t?c:"cap"===t?l:u,transform:i,stateMask:Ft.Unfocused|Ee}))),...a.normal.map((({geometry:t,transform:e})=>({geometry:t,material:d,transform:e,stateMask:Ft.Unfocused|Ee}))),{geometry:m,material:g,stateMask:Ft.Unfocused|Ee|we},...o.focused.map((({part:t,geometry:e,transform:i})=>({geometry:e,material:"tip"===t?c:"cap"===t?l:u,transform:i,stateMask:Ft.Focused|Ee}))),...a.focused.map((({geometry:t,transform:e})=>({geometry:t,material:d,transform:e,stateMask:Ft.Focused|Ee}))),{geometry:p,material:g,stateMask:Ft.Focused|Ee|we}],autoScaleRenderObjects:!1,collisionType:{type:"line",paths:[r]},collisionPriority:1,radius:nt,state:Ee})}function oe(t,e){const i=wt(t,e,Ee);return i.state=Ee,i}function ae(t){const e=[[-1,-1,0],[1,-1,0],[1,1,0],[-1,1,0],[-1,-1,0]];return new jt({view:t,attached:!0,color:rt,width:st,writeDepthEnabled:!1,renderOccluded:Pt.OccludeAndTransparent,geometry:[e]})}function ce(t){return new At({view:t,attached:!0,backgroundColor:[...ot],gridColor:at,gridWidth:4,renderOccluded:Pt.OccludeAndTransparent})}function le(t,e){const i=re(e),n=i?[C(1,0,0),C(0,0,0),C(0,1,0)]:[C(1,0,0),C(-1,0,0)],r=_t(n),s=Ot,o=t=>new Vt({color:s,width:t,renderOccluded:Pt.OccludeAndTransparent}),a=()=>new Ut({color:s,renderOccluded:Pt.OccludeAndTransparent}),c=i?bt:ht,l=c*Tt,u=ht,d=t=>t>1?o(t):a(),m=[{geometry:r,material:d(c),stateMask:Ft.Unfocused|ye},{geometry:r,material:d(l),stateMask:Ft.Focused|ye},{geometry:r,material:d(u),stateMask:Me}],p=new It({view:t,renderObjects:m,collisionType:{type:"line",paths:[n]},autoScaleRenderObjects:!1,worldSized:!0,radius:i?ct:lt});return p.state=ye,p}function ue(t,e,i){const n=n=>{const r=(n?e:t).slice(0),o=j(X.get(),r[0],r[1]);I(o,o);const a=j(X.get(),r[r.length-1],r[r.length-2]);if(I(a,a),i.padding>0){const t=h(_(),a,-i.padding);if(r[r.length-1]=R(t,t,r[r.length-1]),i.bothEnds){const t=h(_(),o,-i.padding);r[0]=R(t,t,r[0])}}const c=n?i.tipFocusMultiplier:1,d=i.tipLength*(i.focusTipLength?c:1),T=i.tipRadius*c,O=m(Y.get());if(i.padding>0){const t=d/4,e=A(X.get(),0,t,0),n=1+i.padding/t;p(O,O,e),l(O,O,A(X.get(),n,n,n)),p(O,O,h(e,e,-1/n))}const E=m(f()),w=C(0,1,0),y=g(f(),b(Z.get(),w,a));y[12]=r[r.length-1][0],y[13]=r[r.length-1][1],y[14]=r[r.length-1][2],u(y,y,O);const M=[{part:"tube",geometry:de(i.tubeRadius*(n?i.tubeFocusMultiplier:1)+i.padding,i.flat,r),transform:E}];let L,k;if(s(i.flat)?L=Ct(d,T,T,i.flat.thickness):(L=kt(d,T,24,!1,!1,!0),k=kt(d,T,24,!1,!0,!1)),M.push({part:"tip",geometry:L,transform:y}),k&&M.push({part:"cap",geometry:k,transform:y}),i.bothEnds){const t=g(f(),b(Z.get(),w,o));t[12]=r[0][0],t[13]=r[0][1],t[14]=r[0][2],u(t,t,O),M.push({part:"tip",geometry:L,transform:t}),k&&M.push({part:"cap",geometry:k,transform:t})}return M};return{normal:n(!1),focused:n(!0)}}function de(t,e,i){const n=[];if(s(e))n.push([t,e.thickness/2],[-t,e.thickness/2],[-t,-e.thickness/2],[t,-e.thickness/2]);else{const e=12;for(let i=0;i<e;i++){const r=i/e*2*Math.PI;n.push([Math.cos(r)*t,Math.sin(r)*t])}}return Nt(n,i,[],[],!1)}function me(t,e){const i=j(_(),t[t.length-1],t[t.length-2]);if(I(i,i),h(i,i,ut),R(i,i,t[t.length-1]),e){const e=j(_(),t[0],t[1]);return I(e,e),h(e,e,ut),R(e,e,t[0]),[e,...t,i]}return[...t,i]}function pe(e,n,s,o=new t){if(r(e))return null;const{renderCoordsHelper:a}=n,c=a.fromRenderCoords(e.origin,n.spatialReference);if(r(c))return null;const l=k(c,s);if(r(l))return null;o.position=l;const u=2*w(e.basis1),d=2*w(e.basis2),m=yt.renderUnitScaleFactor(n.spatialReference,s);o.width=u*m,o.height=d*m;const p=a.worldUpAtPosition(e.origin,X.get());return o.tilt=i(fe(e,p)),o.heading=a.headingAtPosition(e.origin,e.basis1)-90,o}function ge(t,e,i){if(r(t))return null;const n=t.origin,s=X.get(),o=X.get(),a=X.get(),c=X.get();let l,u,d,m,p,g;R(s,n,t.basis1),R(s,s,t.basis2),R(o,n,t.basis1),M(o,o,t.basis2),M(a,n,t.basis1),M(a,a,t.basis2),M(c,n,t.basis1),R(c,c,t.basis2);for(const f of[s,o,a,c]){const t=e.fromRenderCoords(f,f,i);if(r(t))return null;l=null==l?t[0]:Math.min(l,t[0]),u=null==u?t[0]:Math.max(u,t[0]),d=null==d?t[1]:Math.min(d,t[1]),m=null==m?t[1]:Math.max(m,t[1]),p=null==p?t[2]:Math.min(p,t[2]),g=null==g?t[2]:Math.max(g,t[2])}return new Ht({xmin:l,xmax:u,ymin:d,ymax:m,zmin:p,zmax:g,spatialReference:i})}function fe(t,e){return D(e,t.basis2,t.basis1)+Ae}function be(t,i,r,s,o,a,c=V()){return a.toRenderCoords(t,c.origin)?(a.worldBasisAtPosition(c.origin,N.X,c.basis1),a.worldBasisAtPosition(c.origin,N.Y,c.basis2),H(c.basis2,c.basis1,c.origin,c.plane),P(c,-n(i),S(c),c),P(c,n(r),c.basis1,c),h(c.basis1,c.basis1,s/2),h(c.basis2,c.basis2,o/2),F(c),c):(e.getLogger("esri.views.3d.analysis.Slice.sliceToolUtils").error(`Failed to project slice plane position, projection from ${t.spatialReference.wkid} is not supported`),null)}function he(t,e){if(r(t)||r(t.position))return null;const i=Et(t.position,e.spatialReference,e.elevationProvider);if(r(i))return null;const n=yt.renderUnitScaleFactor(t.position.spatialReference,e.spatialReference),s=t.width*n,o=t.height*n;return{position:i,heading:t.heading,tilt:t.tilt,renderWidth:s,renderHeight:o}}function Te(t,e,i,n=V()){const s=he(t,e);return r(s)?null:Oe(s,e,i,n)}function Oe(t,e,i,n=V()){if(r(t))return null;const o=be(t.position,t.heading,t.tilt,t.renderWidth,t.renderHeight,e.renderCoordsHelper,n);return!i.tiltEnabled&&s(o)&&Dt(o,e.renderCoordsHelper,o),o}!function(t){t[t.POSITIVE_X=0]="POSITIVE_X",t[t.POSITIVE_Y=1]="POSITIVE_Y",t[t.NEGATIVE_X=2]="NEGATIVE_X",t[t.NEGATIVE_Y=3]="NEGATIVE_Y"}(Qt||(Qt={}));const Ee=St.Custom1;var Ie,Re;!function(t){t[t.HEADING=1]="HEADING",t[t.TILT=2]="TILT"}(Ie||(Ie={})),function(t){t[t.HORIZONTAL_OR_VERTICAL=0]="HORIZONTAL_OR_VERTICAL",t[t.HORIZONTAL=1]="HORIZONTAL",t[t.VERTICAL=2]="VERTICAL",t[t.TILTED=3]="TILTED"}(Re||(Re={}));const we=St.Custom2,je=G(),Ae=Math.PI/2,ye=St.Custom1,Me=St.Custom2;var Le;function _e(t){const e="building-scene-3d"===t.type?t:null;return s(e)}!function(t){t[t.CENTER_ON_CALLOUT=0]="CENTER_ON_CALLOUT",t[t.CENTER_ON_ARROW=1]="CENTER_ON_ARROW"}(Le||(Le={}));export{Ee as DidPointerMoveRecentlyFlag,we as IsShiftEdgeOnScreenFlag,Le as OffsetMode,Ie as RotationAxis,Re as SliceOrientation,me as addArrowTips,zt as calculateBoundedPlaneTranslateRotate,ne as calculateDiagonalResizeHandleScale,Yt as calculatePlaneHalfSize,ie as calculateResizeHandlePadding,ee as calculateScreenSpaceBasisLength2,ue as createArrowGeometry,ce as createGridVisualElement,ae as createOutlineVisualElement,xt as createPlane,le as createResizeManipulator,oe as createRotateManipulator,Wt as createRotatePlane,se as createShiftManipulator,Zt as createShiftPlane,Dt as forceHorizontalOrVertical,re as isDiagonalResizeHandle,_e as isIBuildingSceneLayerView3D,Gt as normalToBases,ge as planeToExtent,pe as planeToShape,he as projectAndElevationAlignShape,Oe as projectedShapeToPlane,ye as resizeNormal,Me as resizeOutlineOnly,Xt as resizePlane,Te as shapeToPlane,$t as updateResizeHandle,Jt as updateRotateHeadingHandle,Kt as updateRotateTiltHandle,Bt as updateShiftRestartHandle};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as e}from"../../../../core/maybe.js";import{c as r,b as n,a as t,i as o,r as i}from"../../../../chunks/vec3.js";import{c as s}from"../../../../chunks/vec3f64.js";import{wrap as c}from"../../../../geometry/support/ray.js";import{i as a,k as f}from"../../../../chunks/sphere.js";import{defaultConstraintOptions as m,interactionDirectionTowardsConstraintMinimization as u,adjustRangeForInteraction as p}from"./common.js";import{InteractionType as y}from"./InteractionType.js";function d(e,r,n=m){if(!e.state.isLocal)return 0;const t=e.state.constraints.distance;if(!e.pointsOfInterest.surfaceOrigin.renderLocation||t===1/0)return 0;I.min=0,I.max=t,j(e,n,I);const o=g(e,r),i=I.max-o;return i>=-1e-6?0:i}function O(o,i,s=m){const p=d(o,i,s);if(0===p)return!1;const y=o.pointsOfInterest.surfaceOrigin,O=g(o,i)+p,j=r(l,i.eye),I=u(i,s.interactionDirection,x(o,i,k),h);if(!a(f(y.renderLocation,O),c(i.eye,I),C))return!1;i.eye=C;const N=n(L,i.eye,j);i.center=t(C,i.center,N);const b=o.renderCoordsHelper.getAltitude(i.center),v=o.renderCoordsHelper.intersectInfiniteManifold(i.ray,b,C);return e(v)&&(i.center=v),!0}function j(e,r,n){const t=r.interactionType;if(t===y.NONE)return;const{min:o,max:i}=n,{interactionStartCamera:s,interactionFactor:c}=r,a=t===y.ZOOM||t===y.PAN,f=d(e,s),m=0===f?0:g(e,s);n.min=o,n.max=i;p(f,m,a,c,.05*m,n)}function g(e,r){const n=e.pointsOfInterest.surfaceOrigin;return o(r.eye,n.renderLocation)}function x(e,r,n){const t=e.pointsOfInterest.surfaceOrigin;return i(n,r.eye,t.renderLocation)}const I={min:0,max:0},l=s(),L=s(),h=s(),k=s(),C=s();export{O as applyDistanceConstraint,d as getDistanceConstraintError};
5
+ import{isSome as e}from"../../../../core/maybe.js";import{c as n,b as r,a as t,i as o,A as i}from"../../../../chunks/vec3.js";import{c as s}from"../../../../chunks/vec3f64.js";import{wrap as c}from"../../../../geometry/support/ray.js";import{i as a,k as f}from"../../../../chunks/sphere.js";import{defaultConstraintOptions as m,interactionDirectionTowardsConstraintMinimization as u,adjustRangeForInteraction as p}from"./common.js";import{InteractionType as y}from"./InteractionType.js";function d(e,n,r=m){if(!e.state.isLocal)return 0;const t=e.state.constraints.distance;if(!e.pointsOfInterest.surfaceOrigin.renderLocation||t===1/0)return 0;I.min=0,I.max=t,j(e,r,I);const o=g(e,n),i=I.max-o;return i>=-1e-6?0:i}function O(o,i,s=m){const p=d(o,i,s);if(0===p)return!1;const y=o.pointsOfInterest.surfaceOrigin,O=g(o,i)+p,j=n(l,i.eye),I=u(i,s.interactionDirection,x(o,i,k),h);if(!a(f(y.renderLocation,O),c(i.eye,I),A))return!1;i.eye=A;const C=r(L,i.eye,j);i.center=t(A,i.center,C);const N=o.renderCoordsHelper.getAltitude(i.center),b=o.renderCoordsHelper.intersectInfiniteManifold(i.ray,N,A);return e(b)&&(i.center=b),!0}function j(e,n,r){const t=n.interactionType;if(t===y.NONE)return;const{min:o,max:i}=r,{interactionStartCamera:s,interactionFactor:c}=n,a=t===y.ZOOM||t===y.PAN,f=d(e,s),m=0===f?0:g(e,s);r.min=o,r.max=i;p(f,m,a,c,.05*m,r)}function g(e,n){const r=e.pointsOfInterest.surfaceOrigin;return o(n.eye,r.renderLocation)}function x(e,n,r){const t=e.pointsOfInterest.surfaceOrigin;return i(r,n.eye,t.renderLocation)}const I={min:0,max:0},l=s(),L=s(),h=s(),k=s(),A=s();export{O as applyDistanceConstraint,d as getDistanceConstraintError};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{neverReached as e}from"../../../../core/compilerUtils.js";import{clamp as t,acosClamped as r,asinClamped as n,deg2rad as i}from"../../../../core/mathUtils.js";import{isSome as s}from"../../../../core/maybe.js";import{d as a}from"../../../../chunks/mat4.js";import{c as o}from"../../../../chunks/mat4f64.js";import{b as c,m as u,g as m,a as l,i as d,e as f,n as p,l as y,p as M}from"../../../../chunks/vec3.js";import{c as h}from"../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as C}from"../../../../geometry/projectionEllipsoid.js";import{b as T,e as I,t as O}from"../../../../chunks/sphere.js";import{defaultConstraintOptions as A,hasConstraintType as D,adjustRangeForInteraction as S}from"./common.js";import{ConstraintTypes as j}from"./ConstraintTypes.js";import{InteractionType as w}from"./InteractionType.js";import{TiltMode as R}from"./TiltMode.js";import{viewAngle as x}from"../../state/utils/viewUtils.js";function P(t,r,n=A,i=!0){W.eyeCenterDistance=0,W.requiresTwoSteps=!1;const s=U(t,r,n,void 0,W);if(0===s)return!1;switch(a(z,-s,r.viewRight),n.tiltMode){case R.LOOK_AROUND:u(_,r.viewForward,z),m(_,_,W.eyeCenterDistance),r.center=l(G,r.eye,_);break;case R.TUMBLE:c(_,r.center,r.eye),u(_,_,z),r.eye=c(G,r.center,_);break;default:e(n.tiltMode)}return r.up=u(G,r.up,z),!W.requiresTwoSteps||!i||P(t,r,n,!1)}function U(e,t,r=A,n=A,i){if(!e.state.constraints.tilt)return 0;const s=t.distance,a=e.state.constraints.tilt(s,Q);return B(e,r,a),n.interactionType===w.TUMBLE&&D(n.selection,j.ALTITUDE)&&K(e,n.interactionStartCamera,a),r.tiltMode===R.LOOK_AROUND||n.tiltMode===R.LOOK_AROUND?L(e,t,a,i):v(e,t,a)}function v(e,r,n){const i=x(e.renderCoordsHelper,r.center,r.eye),s=i-t(i,n.min,n.max);return k(s)?s:0}function L(t,r,n,i){switch(i&&(i.requiresTwoSteps=!1),t.viewingMode){case"global":return q(t,r,n,i);case"local":return b(t,r,n,i);default:return void e(t.viewingMode)}}function b(e,r,n,i){const s=x(e.renderCoordsHelper,r.center,r.eye),a=t(s,n.min,n.max),o=s-a;if(!k(o))return 0;if(i){const t=e.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude,n=e.renderCoordsHelper.getAltitude(r.eye)-t,s=Math.cos(a);Math.abs(s)>1e-4?i.eyeCenterDistance=n/s:i.eyeCenterDistance=r.distance}return o}function q(e,r,n,i){const s=g(e,r,V),a=t(s.tiltAtCenter,n.min,n.max);if(!k(s.tiltAtCenter-a))return 0;let o,c;return s.centerIsOnSurface?(o=E(s),c=F(s,o)):(o=s.constraints.clampTilt(s.eyeCenterDistance,s.tiltAtCenter),i&&o<Math.PI/2&&(i.requiresTwoSteps=!0,o=Math.PI/2-1e-5),c=N(s,o)),i&&(i.eyeCenterDistance=H(s,o)),c}function g(e,t,n){const i=e.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude,a=i+C(e.spatialReference).radius,o=e.renderCoordsHelper.intersectManifold(t.ray,i,G);return n.eyeCenterDistance=t.distance,n.centerIsOnSurface=!1,s(o)?(n.eyeCenterDistance=d(t.eye,o),n.tiltAtCenter=x(e.renderCoordsHelper,o,t.eye),n.centerIsOnSurface=!0):e.state.isLocal?n.tiltAtCenter=x(e.renderCoordsHelper,t.center,t.eye):(T(I(O,a),t.ray,G),n.eyeCenterDistance=d(t.eye,G),n.tiltAtCenter=r(-f(t.viewForward,p(G,G)))),n.radius=a,n.eyeRadius=y(t.eye),n.constraints=e.state.constraints,n}function k(e){return Math.abs(e)>1e-9}function E(e){const{constraints:t,eyeCenterDistance:r,tiltAtCenter:n}=e;let i=n,s=t.clampTilt(r,n);const a=H(e,s);if(t.clampTilt(a,n)===s)return s;let o=0;for(;o<10&&k(s-i);){const r=(i+s)/2,n=H(e,r);k(t.clampTilt(n,r)-r)?i=r:s=r,o++}return s}function H(e,r){if(!e.centerIsOnSurface)return e.eyeCenterDistance;const i=Math.PI-t(r,0,Math.PI),s=n(e.radius/e.eyeRadius*Math.sin(i)),a=Math.PI-i-s,o=Math.sin(a)/Math.sin(i);if(e.eyeRadius<e.radius&&o>1){const t=Math.PI-s,r=Math.PI-i-t;return Math.sin(r)/Math.sin(i)*e.eyeRadius}return o*e.eyeRadius}function F(e,t){const r=n(e.radius/e.eyeRadius*Math.sin(e.tiltAtCenter)),i=n(e.radius/e.eyeRadius*Math.sin(t));return e.eyeRadius>e.radius?r-i:i-r}function N(e,t){return e.tiltAtCenter-Math.PI/2-(t-Math.PI/2)}function B(e,t,r){if(t.interactionType===w.NONE)return;const{interactionStartCamera:n,interactionFactor:i}=t,{min:s,max:a}=r,o=U(e,n,A,t),c=0===o?0:x(e.renderCoordsHelper,n.center,n.eye);r.min=s,r.max=a,t.interactionType===w.TUMBLE?(D(t.selection,j.ALTITUDE)&&K(e,n,r),S(o,c,!0,i,J,r)):S(o,c,!1,i,J,r)}function K(e,t,n){if(e.state.isLocal)return;const i=e.state.constraints;if(!i.altitude)return;const s=M(t.center),a=Math.sqrt(s),o=t.distance,c=C(e.spatialReference).radius,u=i.altitude.min+c,m=i.altitude.max+c,l=(u*u-o*o-s)/(-2*a*o),d=(m*m-o*o-s)/(-2*a*o);n.min=Math.max(n.min,Math.min(Math.PI-r(d),n.max)),n.max=Math.min(n.max,Math.PI-r(l))}const _=h(),z=o(),G=h(),J=i(5),Q={min:0,max:0},V={constraints:null,radius:0,eyeRadius:0,centerIsOnSurface:!0,eyeCenterDistance:0,tiltAtCenter:0},W={eyeCenterDistance:0,requiresTwoSteps:!1};export{P as applyTiltConstraint,U as getTiltConstraintError};
5
+ import{neverReached as e}from"../../../../core/compilerUtils.js";import{clamp as t,acosClamped as r,asinClamped as n,deg2rad as i}from"../../../../core/mathUtils.js";import{isSome as s}from"../../../../core/maybe.js";import{d as a}from"../../../../chunks/mat4.js";import{c as o}from"../../../../chunks/mat4f64.js";import{b as c,v as u,g as m,a as l,i as d,e as f,n as p,l as y,z as M}from"../../../../chunks/vec3.js";import{c as h}from"../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as C}from"../../../../geometry/projectionEllipsoid.js";import{b as T,e as I,t as O}from"../../../../chunks/sphere.js";import{defaultConstraintOptions as A,hasConstraintType as D,adjustRangeForInteraction as S}from"./common.js";import{ConstraintTypes as j}from"./ConstraintTypes.js";import{InteractionType as w}from"./InteractionType.js";import{TiltMode as R}from"./TiltMode.js";import{viewAngle as x}from"../../state/utils/viewUtils.js";function v(t,r,n=A,i=!0){W.eyeCenterDistance=0,W.requiresTwoSteps=!1;const s=P(t,r,n,void 0,W);if(0===s)return!1;switch(a(z,-s,r.viewRight),n.tiltMode){case R.LOOK_AROUND:u(_,r.viewForward,z),m(_,_,W.eyeCenterDistance),r.center=l(G,r.eye,_);break;case R.TUMBLE:c(_,r.center,r.eye),u(_,_,z),r.eye=c(G,r.center,_);break;default:e(n.tiltMode)}return r.up=u(G,r.up,z),!W.requiresTwoSteps||!i||v(t,r,n,!1)}function P(e,t,r=A,n=A,i){if(!e.state.constraints.tilt)return 0;const s=t.distance,a=e.state.constraints.tilt(s,Q);return B(e,r,a),n.interactionType===w.TUMBLE&&D(n.selection,j.ALTITUDE)&&K(e,n.interactionStartCamera,a),r.tiltMode===R.LOOK_AROUND||n.tiltMode===R.LOOK_AROUND?L(e,t,a,i):U(e,t,a)}function U(e,r,n){const i=x(e.renderCoordsHelper,r.center,r.eye),s=i-t(i,n.min,n.max);return k(s)?s:0}function L(t,r,n,i){switch(i&&(i.requiresTwoSteps=!1),t.viewingMode){case"global":return q(t,r,n,i);case"local":return b(t,r,n,i);default:return void e(t.viewingMode)}}function b(e,r,n,i){const s=x(e.renderCoordsHelper,r.center,r.eye),a=t(s,n.min,n.max),o=s-a;if(!k(o))return 0;if(i){const t=e.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude,n=e.renderCoordsHelper.getAltitude(r.eye)-t,s=Math.cos(a);Math.abs(s)>1e-4?i.eyeCenterDistance=n/s:i.eyeCenterDistance=r.distance}return o}function q(e,r,n,i){const s=g(e,r,V),a=t(s.tiltAtCenter,n.min,n.max);if(!k(s.tiltAtCenter-a))return 0;let o,c;return s.centerIsOnSurface?(o=E(s),c=F(s,o)):(o=s.constraints.clampTilt(s.eyeCenterDistance,s.tiltAtCenter),i&&o<Math.PI/2&&(i.requiresTwoSteps=!0,o=Math.PI/2-1e-5),c=N(s,o)),i&&(i.eyeCenterDistance=H(s,o)),c}function g(e,t,n){const i=e.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude,a=i+C(e.spatialReference).radius,o=e.renderCoordsHelper.intersectManifold(t.ray,i,G);return n.eyeCenterDistance=t.distance,n.centerIsOnSurface=!1,s(o)?(n.eyeCenterDistance=d(t.eye,o),n.tiltAtCenter=x(e.renderCoordsHelper,o,t.eye),n.centerIsOnSurface=!0):e.state.isLocal?n.tiltAtCenter=x(e.renderCoordsHelper,t.center,t.eye):(T(I(O,a),t.ray,G),n.eyeCenterDistance=d(t.eye,G),n.tiltAtCenter=r(-f(t.viewForward,p(G,G)))),n.radius=a,n.eyeRadius=y(t.eye),n.constraints=e.state.constraints,n}function k(e){return Math.abs(e)>1e-9}function E(e){const{constraints:t,eyeCenterDistance:r,tiltAtCenter:n}=e;let i=n,s=t.clampTilt(r,n);const a=H(e,s);if(t.clampTilt(a,n)===s)return s;let o=0;for(;o<10&&k(s-i);){const r=(i+s)/2,n=H(e,r);k(t.clampTilt(n,r)-r)?i=r:s=r,o++}return s}function H(e,r){if(!e.centerIsOnSurface)return e.eyeCenterDistance;const i=Math.PI-t(r,0,Math.PI),s=n(e.radius/e.eyeRadius*Math.sin(i)),a=Math.PI-i-s,o=Math.sin(a)/Math.sin(i);if(e.eyeRadius<e.radius&&o>1){const t=Math.PI-s,r=Math.PI-i-t;return Math.sin(r)/Math.sin(i)*e.eyeRadius}return o*e.eyeRadius}function F(e,t){const r=n(e.radius/e.eyeRadius*Math.sin(e.tiltAtCenter)),i=n(e.radius/e.eyeRadius*Math.sin(t));return e.eyeRadius>e.radius?r-i:i-r}function N(e,t){return e.tiltAtCenter-Math.PI/2-(t-Math.PI/2)}function B(e,t,r){if(t.interactionType===w.NONE)return;const{interactionStartCamera:n,interactionFactor:i}=t,{min:s,max:a}=r,o=P(e,n,A,t),c=0===o?0:x(e.renderCoordsHelper,n.center,n.eye);r.min=s,r.max=a,t.interactionType===w.TUMBLE?(D(t.selection,j.ALTITUDE)&&K(e,n,r),S(o,c,!0,i,J,r)):S(o,c,!1,i,J,r)}function K(e,t,n){if(e.state.isLocal)return;const i=e.state.constraints;if(!i.altitude)return;const s=M(t.center),a=Math.sqrt(s),o=t.distance,c=C(e.spatialReference).radius,u=i.altitude.min+c,m=i.altitude.max+c,l=(u*u-o*o-s)/(-2*a*o),d=(m*m-o*o-s)/(-2*a*o);n.min=Math.max(n.min,Math.min(Math.PI-r(d),n.max)),n.max=Math.min(n.max,Math.PI-r(l))}const _=h(),z=o(),G=h(),J=i(5),Q={min:0,max:0},V={constraints:null,radius:0,eyeRadius:0,centerIsOnSurface:!0,eyeCenterDistance:0,tiltAtCenter:0},W={eyeCenterDistance:0,requiresTwoSteps:!1};export{v as applyTiltConstraint,P as getTiltConstraintError};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Accessor.js";import{releaseMaybe as t,disposeMaybe as o,isNone as s}from"../../../core/maybe.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as c}from"../../../core/accessorSupport/decorators/subclass.js";import{CloudsCompositionTechnique as n}from"./CloudsCompositionTechnique.js";import{weatherfadingNeedsRender as a}from"./weatherUtils.js";import{NoParameters as p}from"../webgl-engine/core/shaderModules/interfaces.js";import{createQuadVAO as m}from"../webgl-engine/lib/glUtil3D.js";import{PrimitiveType as u}from"../../webgl/enums.js";let d=class extends r{constructor(e){super(e),this._technique=new n(e),this._vao=m(e.rctx)}destroy(){this._technique=t(this._technique),this._vao=o(this._vao)}render(e){const r=e.bindParameters.weatherParameter;if(s(this._vao)||s(r.cloudsFadingComposition.data))return;if(!this._technique.compiled)return void this.requestRender();const t=e.rctx.bindTechnique(this._technique,h,e.bindParameters);e.rctx.bindVAO(this._vao),t.assertCompatibleVertexAttributeLocations(this._vao),e.rctx.drawArrays(u.TRIANGLE_STRIP,0,4),a(r)&&this.requestRender()}};e([i({constructOnly:!0})],d.prototype,"rctx",void 0),e([i({constructOnly:!0})],d.prototype,"viewingMode",void 0),e([i({constructOnly:!0})],d.prototype,"planetRadius",void 0),e([i({constructOnly:!0})],d.prototype,"requestRender",void 0),d=e([c("esri.views.3d.environment.CloudsComposition")],d);const h=new p;export{d as CloudsComposition};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Accessor.js";import{releaseMaybe as t,disposeMaybe as o,isNone as s}from"../../../core/maybe.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as c}from"../../../core/accessorSupport/decorators/subclass.js";import{CloudsCompositionTechnique as n}from"./CloudsCompositionTechnique.js";import{weatherfadingNeedsRender as p}from"./weatherUtils.js";import{NoParameters as a}from"../webgl-engine/core/shaderModules/interfaces.js";import{createQuadVAO as m}from"../webgl-engine/lib/glUtil3D.js";import{PrimitiveType as u}from"../../webgl/enums.js";let d=class extends r{constructor(e){super(e),this._technique=new n(e),this._vao=m(e.rctx)}destroy(){this._technique=t(this._technique),this._vao=o(this._vao)}render(e){const r=e.bindParameters.cloudsFade;if(s(this._vao)||s(r.data))return;if(!this._technique.compiled)return void this.requestRender();const t=e.rctx.bindTechnique(this._technique,h,e.bindParameters);e.rctx.bindVAO(this._vao),t.assertCompatibleVertexAttributeLocations(this._vao),e.rctx.drawArrays(u.TRIANGLE_STRIP,0,4),p(r)&&this.requestRender()}};e([i({constructOnly:!0})],d.prototype,"rctx",void 0),e([i({constructOnly:!0})],d.prototype,"viewingMode",void 0),e([i({constructOnly:!0})],d.prototype,"planetRadius",void 0),e([i({constructOnly:!0})],d.prototype,"requestRender",void 0),d=e([c("esri.views.3d.environment.CloudsComposition")],d);const h=new a;export{d as CloudsComposition};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{c as t}from"../../../chunks/mat4f64.js";import{c as s}from"../../../chunks/vec3f64.js";import{CloudsTextureChannels as i,CloudsRenderingStages as a}from"./CloudsData.js";import{SceneLighting as r}from"../webgl-engine/lighting/SceneLighting.js";class o{constructor(){this.cloudsFadingComposition=new e,this.lightingFogFading=new n}}class e{constructor(){this.readChannels=i.RG,this.renderingStage=a.FINISHED,this.startTime=0,this.startTimeHeightFade=0,this.cameraPositionLastFrame=s(),this.isCameraPositionFinal=!0,this.parallax={anchorPointClouds:s(),cloudsHeight:1e5,radiusCurvatureCorrectionFactor:0,transform:t()},this.parallaxNew={anchorPointClouds:s(),cloudsHeight:1e5,radiusCurvatureCorrectionFactor:0,transform:t()},this.crossFade={enabled:!1,factor:0,distanceThresholdFactor:.3},this.fadeInOut={stage:c.FINISHED,factor:0,distanceThresholdFactor:.6},this.fadeIn={stage:h.FINISHED,factor:0,distanceThresholdFactor:2},this.fadeInOutHeight={stage:F.FINISHED,factor:-1}}}class n{constructor(){this.isWeatherFading=!1,this.fadingFactor=0,this.oldWeatherType="sunny",this.lightingOld=new r,this.lightingNew=new r}}var h,c,F;!function(t){t[t.FINISHED=0]="FINISHED",t[t.CHANGE_ANCHOR=1]="CHANGE_ANCHOR",t[t.FADE_IN=2]="FADE_IN"}(h||(h={})),function(t){t[t.FINISHED=0]="FINISHED",t[t.FADE_OUT=1]="FADE_OUT",t[t.SWITCH=2]="SWITCH",t[t.FADE_IN=3]="FADE_IN"}(c||(c={})),function(t){t[t.FINISHED=0]="FINISHED",t[t.HEIGHT_FADE=1]="HEIGHT_FADE"}(F||(F={}));export{e as CloudsFadingComposition,F as FadeHeightStages,c as FadeInOutStages,h as FadeInStages,n as WeatherFading,o as WeatherParameters};
5
+ import{c as t}from"../../../chunks/mat4f64.js";import{c as s}from"../../../chunks/vec3f64.js";import{CloudsTextureChannels as a,CloudsRenderingStages as e}from"./CloudsData.js";class i{constructor(){this.readChannels=a.RG,this.renderingStage=e.FINISHED,this.startTime=0,this.startTimeHeightFade=0,this.cameraPositionLastFrame=s(),this.isCameraPositionFinal=!0,this.parallax=new I,this.parallaxNew=new I,this.crossFade={enabled:!1,factor:0,distanceThresholdFactor:.3},this.fadeInOut={stage:o.FINISHED,factor:0,distanceThresholdFactor:.6},this.fadeIn={stage:r.FINISHED,factor:0,distanceThresholdFactor:2},this.fadeInOutHeight={stage:n.FINISHED,factor:-1}}get isFading(){return this.fadeInOut.stage===o.FADE_OUT||this.fadeInOutHeight.stage!==n.FINISHED||this.renderingStage===e.FADING_TEXTURE_CHANNELS}}var r,o,n;!function(t){t[t.FINISHED=0]="FINISHED",t[t.CHANGE_ANCHOR=1]="CHANGE_ANCHOR",t[t.FADE_IN=2]="FADE_IN"}(r||(r={})),function(t){t[t.FINISHED=0]="FINISHED",t[t.FADE_OUT=1]="FADE_OUT",t[t.SWITCH=2]="SWITCH",t[t.FADE_IN=3]="FADE_IN"}(o||(o={})),function(t){t[t.FINISHED=0]="FINISHED",t[t.HEIGHT_FADE=1]="HEIGHT_FADE"}(n||(n={}));class I{constructor(){this.anchorPointClouds=s(),this.cloudsHeight=1e5,this.radiusCurvatureCorrectionFactor=0,this.transform=t()}}export{i as CloudsFadeParameters,n as FadeHeightStages,o as FadeInOutStages,r as FadeInStages};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import s from"../../../core/Handles.js";import{lerp as i}from"../../../core/mathUtils.js";import{isSome as r,releaseMaybe as o,disposeMaybe as a,destroyMaybe as n,isNone as h}from"../../../core/maybe.js";import{watch as u,initial as c}from"../../../core/reactiveUtils.js";import{property as d}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as m}from"../../../core/accessorSupport/decorators/subclass.js";import{f as p}from"../../../chunks/mat3.js";import{u as l}from"../../../chunks/mat4.js";import{c as _}from"../../../chunks/mat4f64.js";import{f as g}from"../../../chunks/vec2f64.js";import{f,z as T}from"../../../chunks/vec3f32.js";import{getReferenceEllipsoid as w}from"../../../geometry/projectionEllipsoid.js";import{C,a as v}from"../../../chunks/Clouds.glsl.js";import{FadeInOutStages as y,FadeHeightStages as x}from"./CloudsCompositionParameters.js";import{CloudsTextureChannels as P,CloudsRenderingStages as b}from"./CloudsData.js";import{cloudPresets as S}from"./CloudsPresets.js";import{CloudsTechnique as j}from"./CloudsTechnique.js";import{CloudsTechniqueConfiguration as E}from"./CloudsTechniqueConfiguration.js";import{NoiseTextureAtlas as I}from"./NoiseTextureAtlas.js";import{BindParameters as M}from"../webgl-engine/lib/BindParameters.js";import{createQuadVAO as z}from"../webgl-engine/lib/glUtil3D.js";import{TaskPriority as D}from"../../support/Scheduler.js";import{TextureType as N,PixelFormat as U,PixelType as A,TextureWrapMode as F,TextureSamplingMode as R,TargetType as q}from"../../webgl/enums.js";import{FramebufferObject as H}from"../../webgl/FramebufferObject.js";let B=class extends t{constructor(e){super(e),this._frameTask=null,this._handles=new s,this._techniques=new Array,this._techniqueConfiguration=new E,this._passParameters=new C,this._bindParameters=new M(null,null,null),this._drawParameters=new v,this._weatherTile=g(0,0),this._weatherTileCount=128,this._faceIndex=0,this.coverage=i(W.coverage[0],W.coverage[1],.5),this.density=i(W.density[0],W.density[1],.5),this.absorption=i(W.absorption[0],W.absorption[1],.5),this.cloudSize=i(W.cloudSize[0],W.cloudSize[1],.5),this.detailSize=i(W.detailSize[0],W.detailSize[1],.5),this.smoothness=i(W.smoothness[0],W.smoothness[1],.5),this.cloudHeight=i(W.cloudHeight[0],W.cloudHeight[1],.5),this.raymarchingStepType=W.raymarchingStepType,this._viewMatrix=_(),this.running=!1}_getTechnique(e){const t=1-this.context.renderContext.bindParameters.weatherParameter.cloudsFadingComposition.readChannels,s=t===P.RG?2*e:2*e+1,i=this._techniques[s];return i||(this._techniqueConfiguration.writeTextureChannels=t,this._techniqueConfiguration.steps=e,this._techniques[s]=new j({rctx:this.context.renderContext.rctx,viewingMode:this.view.state.viewingMode},this._techniqueConfiguration),this._techniques[s])}_getWeatherTile(){const e=this.view.camera.position.latitude,t=this.view.camera.position.longitude;let s=g((e+90)/180,(t+180)/360);const i=Math.floor(this._weatherTileCount*Math.abs(2*s[0]-1));s=g(Math.floor(2*this._weatherTileCount*s[0]),Math.floor(4*(this._weatherTileCount-i)*s[1]));let o=0,a=0;if(r(this.view.environment)&&"virtual"!==this.view.environment.lighting.type&&r(this.view.environment.lighting.date)){const e=new Date(this.view.environment.lighting.date);e.setUTCHours(this.view.environment.lighting.date.getUTCHours()+this.view.environment.lighting.displayUTCOffset),o=31*e.getUTCMonth()+e.getUTCDate(),a=e.getUTCFullYear()}return s[0]=(s[0]+o)%(2*this._weatherTileCount),s[1]=(s[1]+a%100)%(4*this._weatherTileCount),s}initialize(){this._vao=z(this.context.renderContext.rctx);const e=w(this.view.spatialReference);this._passParameters.cloudRadius=.5*e.radius,this.setDirty(),this._weatherTile=this._getWeatherTile(),this._frameTask=this.view.resourceController.scheduler.registerTask(D.CLOUDS_GENERATOR,this),this._handles.add(this._frameTask),this._handles.add(u((()=>[this.coverage,this.density,this.absorption,this.cloudSize,this.detailSize,this.smoothness,this.cloudHeight,this.raymarchingStepType]),(()=>this.setDirty()),c))}destroy(){this._handles.destroy(),this._techniques.forEach((e=>o(e))),this._frameBufferCube=a(this._frameBufferCube),this._techniques.length=0,this._vao=a(this._vao),this._passParameters.noiseTexture=n(this._passParameters.noiseTexture)}_ensureNoiseTexture(){if(h(this._passParameters.noiseTexture)){const e=this.context;this._passParameters.noiseTexture=new I({context:e}),this._passParameters.noiseTexture.updateWeatherMap(this._weatherTile)}return r(this._passParameters.noiseTexture.textureAtlas)}ensureWeatherTile(){const e=this._getWeatherTile();r(this._passParameters.noiseTexture)&&r(this.context)&&this._passParameters.noiseTexture.updateWeatherMap(e),e[0]===this._weatherTile[0]&&e[1]===this._weatherTile[1]||(this._weatherTile=e,this.setDirty())}_ensureFrameBufferCube(e){if(h(this._frameBufferCube)){const t={target:N.TEXTURE_CUBE_MAP,pixelFormat:U.RGBA,dataType:A.UNSIGNED_BYTE,wrapMode:F.CLAMP_TO_EDGE,samplingMode:R.LINEAR,hasMipmap:!1,width:e,height:e};this._frameBufferCube=new H(this.context.renderContext.rctx,{colorTarget:q.CUBEMAP,width:e,height:e},t)}return this._frameBufferCube}get cubeMap(){return this._frameBufferCube}fadingDoNotGenerate(e){return e.cloudsFadingComposition.fadeInOut.stage===y.FADE_OUT||e.cloudsFadingComposition.fadeInOutHeight.stage!==x.FINISHED||e.cloudsFadingComposition.renderingStage===b.FADING_TEXTURE_CHANNELS}applyPreset(e,t){const s=e.median,r=e=>{const r=i(e[0],e[1],s);return t<.5?i(e[0],r,2*t):i(r,e[1],2*(t-.5))};this.coverage=r(e.coverage),this.density=r(e.density),this.absorption=r(e.absorption),this.cloudSize=r(e.cloudSize),this.detailSize=r(e.detailSize),this.smoothness=r(e.smoothness),this.cloudHeight=r(e.cloudHeight),this.raymarchingStepType=e.raymarchingStepType}setDirty(){this.running=!0}runTask(e){if(0===this.coverage||h(this._vao))return void(this.running=!1);const t=this._getTechnique(this.raymarchingStepType);if(!t.compiled)return;if(!this.context.renderContext.bindParameters.weatherParameter.cloudsFadingComposition.isCameraPositionFinal||this.fadingDoNotGenerate(this.context.renderContext.bindParameters.weatherParameter))return;if(this.ensureWeatherTile(),!this._ensureNoiseTexture())return;this.context.renderContext.bindParameters.weatherParameter.cloudsFadingComposition.renderingStage=b.RENDERING,this._passParameters.absorption=this.absorption,this._passParameters.density=this.density,this._passParameters.cloudSize=this.cloudSize,this._passParameters.detailSize=this.detailSize,this._passParameters.smoothness=this.smoothness,this._passParameters.cloudHeight=this.cloudHeight,this._passParameters.coverage=this.coverage;const s=this.context.renderContext.rctx,i=s.bindTechnique(t,this._passParameters,this._bindParameters);s.bindVAO(this._vao),i.assertCompatibleVertexAttributeLocations(this._vao);const r=s.getViewport(),o=t.configuration.cubeMapSize;s.setViewport(0,0,o,o);const a=this._ensureFrameBufferCube(o);s.bindFramebuffer(a);const n=k[this._faceIndex],u=O[this._faceIndex];l(this._viewMatrix,G,n,u),p(this._drawParameters.viewMatrix,this._viewMatrix);const c=N.TEXTURE_CUBE_MAP_POSITIVE_X+this._faceIndex;a.setColorTextureTarget(c),i.bindDraw(this._drawParameters,this._bindParameters,this._passParameters),s.gl.drawArrays(s.gl.TRIANGLE_STRIP,0,4),s.gl.flush(),s.setViewport(r.x,r.y,r.width,r.height),this.requestRender(),e.madeProgress(),4===this._faceIndex?(this.running=!1,this._faceIndex=0,this.context.renderContext.bindParameters.weatherParameter.cloudsFadingComposition.renderingStage=b.FINISHED_RENDERING):this._faceIndex++}};e([d({constructOnly:!0})],B.prototype,"context",void 0),e([d({constructOnly:!0})],B.prototype,"view",void 0),e([d({constructOnly:!0})],B.prototype,"requestRender",void 0),e([d()],B.prototype,"_frameTask",void 0),e([d()],B.prototype,"coverage",void 0),e([d()],B.prototype,"density",void 0),e([d()],B.prototype,"absorption",void 0),e([d()],B.prototype,"cloudSize",void 0),e([d()],B.prototype,"detailSize",void 0),e([d()],B.prototype,"smoothness",void 0),e([d()],B.prototype,"cloudHeight",void 0),e([d()],B.prototype,"raymarchingStepType",void 0),e([d()],B.prototype,"running",void 0),B=e([m("esri.views.3d.environment.CloudsGenerator")],B);const k=[f(1,0,0),f(-1,0,0),f(0,1,0),f(0,-1,0),f(0,0,1)],O=[f(0,1,0),f(0,1,0),f(0,0,-1),f(0,0,1),f(0,1,0)],G=T(),W=S.sunny;export{B as CloudsGenerator};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import s from"../../../core/Handles.js";import{lerp as i}from"../../../core/mathUtils.js";import{isSome as r,releaseMaybe as o,disposeMaybe as a,destroyMaybe as n,isNone as h}from"../../../core/maybe.js";import{watch as c,initial as d}from"../../../core/reactiveUtils.js";import{property as u}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{f as m}from"../../../chunks/mat3.js";import{u as p}from"../../../chunks/mat4.js";import{c as _}from"../../../chunks/mat4f64.js";import{f as g}from"../../../chunks/vec2f64.js";import{f,z as x}from"../../../chunks/vec3f32.js";import{getReferenceEllipsoid as T}from"../../../geometry/projectionEllipsoid.js";import{C as v,a as w}from"../../../chunks/Clouds.glsl.js";import{CloudsTextureChannels as y,CloudsRenderingStages as C}from"./CloudsData.js";import{cloudPresets as b}from"./CloudsPresets.js";import{CloudsTechnique as P}from"./CloudsTechnique.js";import{CloudsTechniqueConfiguration as S,RayMarchingSteps as j}from"./CloudsTechniqueConfiguration.js";import{NoiseTextureAtlas as I}from"./NoiseTextureAtlas.js";import{BindParameters as E}from"../webgl-engine/lib/BindParameters.js";import{createQuadVAO as M}from"../webgl-engine/lib/glUtil3D.js";import{TaskPriority as R}from"../../support/Scheduler.js";import{TextureType as z,PixelFormat as U,PixelType as D,TextureWrapMode as F,TextureSamplingMode as q,TargetType as N}from"../../webgl/enums.js";import{FramebufferObject as A}from"../../webgl/FramebufferObject.js";let H=class extends t{constructor(e){super(e),this.runOncePerFrame=!0,this._handles=new s,this._techniques=new Array,this._techniqueConfiguration=new S,this._bindParameters=new E(null,null,null),this._passParameters=new v,this._drawParameters=new w,this._weatherTile=g(0,0),this._weatherTileCount=128,this._faceIndex=0,this._tileIndex=0,this.coverage=i(G.coverage[0],G.coverage[1],.5),this.density=i(G.density[0],G.density[1],.5),this.absorption=i(G.absorption[0],G.absorption[1],.5),this.cloudSize=i(G.cloudSize[0],G.cloudSize[1],.5),this.detailSize=i(G.detailSize[0],G.detailSize[1],.5),this.smoothness=i(G.smoothness[0],G.smoothness[1],.5),this.cloudHeight=i(G.cloudHeight[0],G.cloudHeight[1],.5),this.raymarchingSteps=G.raymarchingSteps,this._renderRaymarchingSteps=G.raymarchingSteps,this._viewMatrix=_(),this._dirty=!1,this.running=!1}_getTechnique(e){const t=1-this.context.renderContext.bindParameters.cloudsFade.readChannels,s=t===y.RG?2*e:2*e+1,i=this._techniques[s];return i||(this._techniqueConfiguration.writeTextureChannels=t,this._techniqueConfiguration.steps=e,this._techniques[s]=new P({rctx:this.context.renderContext.rctx,viewingMode:this.view.state.viewingMode},this._techniqueConfiguration),this._techniques[s])}_getWeatherTile(){const e=this.view.camera.position.latitude,t=this.view.camera.position.longitude;let s=g((e+90)/180,(t+180)/360);const i=Math.floor(this._weatherTileCount*Math.abs(2*s[0]-1));s=g(Math.floor(2*this._weatherTileCount*s[0]),Math.floor(4*(this._weatherTileCount-i)*s[1]));let o=0,a=0;if(r(this.view.environment)&&"virtual"!==this.view.environment.lighting.type&&r(this.view.environment.lighting.date)){const e=new Date(this.view.environment.lighting.date);e.setUTCHours(this.view.environment.lighting.date.getUTCHours()+this.view.environment.lighting.displayUTCOffset),o=31*e.getUTCMonth()+e.getUTCDate(),a=e.getUTCFullYear()}return s[0]=(s[0]+o)%(2*this._weatherTileCount),s[1]=(s[1]+a%100)%(4*this._weatherTileCount),s}initialize(){this._vao=M(this.context.renderContext.rctx);const e=T(this.view.spatialReference);this._passParameters.cloudRadius=.5*e.radius,this.setDirty(),this._weatherTile=this._getWeatherTile(),this._handles.add([this.view.resourceController.scheduler.registerTask(R.CLOUDS_GENERATOR,this),c((()=>[this.coverage,this.density,this.absorption,this.cloudSize,this.detailSize,this.smoothness,this.cloudHeight,this.raymarchingSteps]),(()=>this.setDirty()),d)])}destroy(){this._handles.destroy(),this._techniques.forEach((e=>o(e))),this._frameBufferCube=a(this._frameBufferCube),this._techniques.length=0,this._vao=a(this._vao),this._passParameters.noiseTexture=n(this._passParameters.noiseTexture)}get _tilesPerFace(){switch(this._techniqueConfiguration.steps){case j.SIXTEEN:return 1;case j.HUNDRED:return 4;case j.COUNT:case j.TWOHUNDRED:return 8}}_ensureNoiseTexture(){if(h(this._passParameters.noiseTexture)){const e=this.context;this._passParameters.noiseTexture=new I({context:e}),this._passParameters.noiseTexture.updateWeatherMap(this._weatherTile)}return r(this._passParameters.noiseTexture.textureAtlas)}ensureWeatherTile(){const e=this._getWeatherTile();r(this._passParameters.noiseTexture)&&r(this.context)&&this._passParameters.noiseTexture.updateWeatherMap(e),e[0]===this._weatherTile[0]&&e[1]===this._weatherTile[1]||(this._weatherTile=e,this.setDirty())}_ensureFrameBufferCube(e){if(h(this._frameBufferCube)){const t={target:z.TEXTURE_CUBE_MAP,pixelFormat:U.RGBA,dataType:D.UNSIGNED_BYTE,wrapMode:F.CLAMP_TO_EDGE,samplingMode:q.LINEAR,hasMipmap:!1,width:e,height:e};this._frameBufferCube=new A(this.context.renderContext.rctx,{colorTarget:N.CUBEMAP,width:e,height:e},t)}return this._frameBufferCube}get cubeMap(){return this._frameBufferCube}applyPreset(e,t){const s=e.median,r=e=>{const r=i(e[0],e[1],s);return t<.5?i(e[0],r,2*t):i(r,e[1],2*(t-.5))};this.coverage=r(e.coverage),this.density=r(e.density),this.absorption=r(e.absorption),this.cloudSize=r(e.cloudSize),this.detailSize=r(e.detailSize),this.smoothness=r(e.smoothness),this.cloudHeight=r(e.cloudHeight),this.raymarchingSteps=e.raymarchingSteps}setDirty(){this._dirty=this.running=!0}runTask(e){if(0===this.coverage||h(this._vao))return void(this._dirty=this.running=!1);0===this._faceIndex&&0===this._tileIndex&&(this._renderRaymarchingSteps=this.raymarchingSteps);const t=this._getTechnique(this._renderRaymarchingSteps);if(!t.compiled)return;if(!this.context.renderContext.bindParameters.cloudsFade.isCameraPositionFinal||this.context.renderContext.bindParameters.cloudsFade.isFading)return;if(this.ensureWeatherTile(),!this._ensureNoiseTexture())return;0===this._faceIndex&&0===this._tileIndex&&(this.context.renderContext.bindParameters.cloudsFade.renderingStage=C.RENDERING,this._passParameters.absorption=this.absorption,this._passParameters.density=this.density,this._passParameters.cloudSize=this.cloudSize,this._passParameters.detailSize=this.detailSize,this._passParameters.smoothness=this.smoothness,this._passParameters.cloudHeight=this.cloudHeight,this._passParameters.coverage=this.coverage,this._dirty=!1);const s=this.context.renderContext.rctx,i=s.bindTechnique(t,this._passParameters,this._bindParameters);s.bindVAO(this._vao),i.assertCompatibleVertexAttributeLocations(this._vao);const r=s.getViewport(),o=t.configuration.cubeMapSize,a=o/this._tilesPerFace,n=this._tileIndex*a;s.setViewport(0,n,o,a);const c=this._ensureFrameBufferCube(o);s.bindFramebuffer(c);const d=B[this._faceIndex],u=O[this._faceIndex];p(this._viewMatrix,k,d,u),m(this._drawParameters.viewMatrix,this._viewMatrix);const l=z.TEXTURE_CUBE_MAP_POSITIVE_X+this._faceIndex;c.setColorTextureTarget(l),i.bindDraw(this._drawParameters,this._bindParameters,this._passParameters),s.gl.drawArrays(s.gl.TRIANGLE_STRIP,0,4),s.gl.flush(),s.setViewport(r.x,r.y,r.width,r.height),this.requestRender(),e.madeProgress(),++this._tileIndex,4===this._faceIndex&&this._tileIndex===this._tilesPerFace?(this.running=this._dirty,this._faceIndex=0,this._tileIndex=0,this.context.renderContext.bindParameters.cloudsFade.renderingStage=C.FINISHED_RENDERING):this._tileIndex===this._tilesPerFace&&(++this._faceIndex,this._tileIndex=0)}};e([u({constructOnly:!0})],H.prototype,"context",void 0),e([u({constructOnly:!0})],H.prototype,"view",void 0),e([u({constructOnly:!0})],H.prototype,"requestRender",void 0),e([u()],H.prototype,"coverage",void 0),e([u()],H.prototype,"density",void 0),e([u()],H.prototype,"absorption",void 0),e([u()],H.prototype,"cloudSize",void 0),e([u()],H.prototype,"detailSize",void 0),e([u()],H.prototype,"smoothness",void 0),e([u()],H.prototype,"cloudHeight",void 0),e([u()],H.prototype,"raymarchingSteps",void 0),e([u()],H.prototype,"running",void 0),H=e([l("esri.views.3d.environment.CloudsGenerator")],H);const B=[f(1,0,0),f(-1,0,0),f(0,1,0),f(0,-1,0),f(0,0,1)],O=[f(0,1,0),f(0,1,0),f(0,0,-1),f(0,0,1),f(0,1,0)],k=x(),G=b.sunny;export{H as CloudsGenerator};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{RayMarchingSteps as i}from"./CloudsTechniqueConfiguration.js";class s{constructor(i,s,t,e,n,o,h,r,c=.5){this.coverage=i,this.density=s,this.absorption=t,this.cloudSize=e,this.detailSize=n,this.smoothness=o,this.cloudHeight=h,this.raymarchingStepType=r,this.median=c}}const t={sunny:new s([0,.6],[.03,.03],[0,0],[.9,.9],[.8,.8],[.7,.7],[.05,.05],i.SIXTEEN),cloudy:new s([.3,.65],[.2,.4],[0,0],[.85,.85],[.75,.75],[.3,.4],[1,1],i.TWOHUNDRED,.6),rainy:new s([.6,.8],[.5,.8],[.1,.5],[.9,.9],[.75,.75],[.5,.5],[1,1],i.TWOHUNDRED,.4),snowy:new s([.25,.75],[.3,.3],[0,0],[.95,.95],[.7,.7],[.69,.75],[.3,1],i.HUNDRED,.65),foggy:new s([.8,.8],[.5,.5],[0,0],[.95,.95],[.9,.9],[.55,.55],[.3,.3],i.SIXTEEN)};export{s as CloudPresets,t as cloudPresets};
5
+ import{RayMarchingSteps as s}from"./CloudsTechniqueConfiguration.js";class i{constructor(s,i,t,n,o,e,h,r,c=.5){this.coverage=s,this.density=i,this.absorption=t,this.cloudSize=n,this.detailSize=o,this.smoothness=e,this.cloudHeight=h,this.raymarchingSteps=r,this.median=c}}const t={sunny:new i([0,.6],[.03,.03],[0,0],[.9,.9],[.8,.8],[.7,.7],[.05,.05],s.SIXTEEN),cloudy:new i([.3,.65],[.2,.4],[0,0],[.85,.85],[.75,.75],[.3,.4],[1,1],s.TWOHUNDRED,.6),rainy:new i([.6,.8],[.5,.8],[.1,.5],[.9,.9],[.75,.75],[.5,.5],[1,1],s.TWOHUNDRED,.4),snowy:new i([.25,.75],[.3,.3],[0,0],[.95,.95],[.7,.7],[.69,.75],[.3,1],s.HUNDRED,.65),foggy:new i([.8,.8],[.5,.5],[0,0],[.95,.95],[.9,.9],[.55,.55],[.3,.3],s.SIXTEEN)};export{i as CloudPresets,t as cloudPresets};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import"../../../core/has.js";import s from"../../../core/Handles.js";import{lerp as r}from"../../../core/mathUtils.js";import{destroyMaybe as i,isSome as o,isNone as n}from"../../../core/maybe.js";import{when as a,syncAndInitial as h,watch as p,initial as l}from"../../../core/reactiveUtils.js";import{property as d}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as m}from"../../../core/accessorSupport/decorators/subclass.js";import{l as _}from"../../../chunks/vec3.js";import{getReferenceEllipsoid as c}from"../../../geometry/projectionEllipsoid.js";import{isMoon as u,isEarth as w}from"../../../geometry/support/spatialReferenceUtils.js";import{AtmosphereType as y}from"./AtmosphereType.js";import{ChapmanAtmosphere as g}from"./ChapmanAtmosphere.js";import{CloudsComposition as v}from"./CloudsComposition.js";import{isReadyCloudsData as f}from"./CloudsData.js";import{CloudsGenerator as R}from"./CloudsGenerator.js";import{cloudPresets as b}from"./CloudsPresets.js";import{Fog as N}from"./Fog.js";import{PanoramicAtmosphere as E}from"./PanoramicAtmosphere.js";import{Precipitation as j}from"./Precipitation.js";import C from"./SimpleAtmosphere.js";import{Stars as T}from"./Stars.js";import{weatherHeightLimit as x}from"./weather.js";import{ShaderOutput as A}from"../webgl-engine/core/shaderLibrary/ShaderOutput.js";import{RenderSlot as P}from"../webgl-engine/lib/RenderSlot.js";var O;const S=[P.POSTPROCESSING_ENVIRONMENT_OPAQUE,P.POSTPROCESSING_ENVIRONMENT_TRANSPARENT];let M,U=O=class extends t{constructor(e){super(e),this._handles=new s,this._context=null,this._atmosphere=null}initialize(){this.view._stage.addRenderPlugin(S,this)}destroy(){null!=this.view?._stage&&this.view._stage.removeRenderPlugin(this),this._handles=i(this._handles),this._set("view",null)}get atmosphereType(){return o(this._atmosphere)?this._atmosphere.type:y.None}get canRender(){return!!this.view.basemapTerrain?.renderer.canRender||"global"!==this.view.viewingMode}get needsLinearDepth(){return o(this._atmosphere)&&this._atmosphere.type===y.Realistic}updateAnimation(e){return!!o(this._precipitation)&&this._precipitation.update(e)}get updating(){return o(this._stars)&&this._stars.updating||o(this._clouds)&&this._clouds.running}get weatherVisible(){return _(this.view.state.camera.eye)-c(this.view.spatialReference).radius<=x}get _stars(){const e=this.view,t=e.environment?.starsEnabled??!1,s=this._get("_stars");return!t||n(this._context)?(i(s),null):o(s)?s:new T({view:e,requestRender:()=>this._setNeedsRender()})}get _precipitation(){const e=this._get("_precipitation");if(!this._precipitationEnabled||n(this._context))return i(e),null;const t=this.view,s=this._context;return o(e)&&e.context===s?e:(i(e),new j({context:s,view:t}))}get _clouds(){const e=this._get("_clouds");if(!this.weatherEnabled||n(this._context))return i(e),null;if(o(e))return e;const t=this.view,s=this._context;return i(e),new R({context:s,view:t,requestRender:()=>this._setNeedsRender()})}get _cloudsComposition(){const e=this._get("_cloudsComposition");if(!this.weatherEnabled||n(this._context))return i(e),null;const t=this.view.state.viewingMode,s=this._context.renderContext.rctx,r=c(this.view.spatialReference).radius;return o(e)&&e.viewingMode===t&&e.planetRadius===r?e:(i(e),new v({rctx:s,viewingMode:t,planetRadius:r,requestRender:()=>this._setNeedsRender()}))}get _fog(){const e=this._get("_fog");if(!this.weatherEnabled||n(this._context))return i(e),null;if(o(e))return e;const t=this.view,s=this._context;return i(e),new N({context:s,view:t})}get weatherEnabled(){return!!this.view?.environmentManager?.weatherEnabled}get _precipitationEnabled(){return this.weatherEnabled&&("rainy"===this.view.environment.weather.type||"snowy"===this.view.environment.weather.type)}initializeRenderContext(e=null){this._context=e,this._handles.add([a((()=>this.view?.basemapTerrain),(()=>this._updateBasemapTerrain()),h),p((()=>({viewingMode:this.view.viewingMode,atmosphereEnabled:this.view.environment.atmosphereEnabled,atmosphereQuality:this.view.environment.atmosphere.quality})),(()=>this._updateAtmosphere()),h),p((()=>this._stars),(()=>this._setNeedsRender())),p((()=>this._clouds),(()=>this._updateWeather(this._weatherUpdateParameters)),l),p((()=>this._precipitation),(()=>this._setNeedsRender())),p((()=>this._fog),(()=>this._updateFog(this._weatherUpdateParameters)),l),p((()=>this._weatherUpdateParameters),(e=>{this._updateWeather(e),this._updateFog(e)}),h)])}uninitializeRenderContext(){this._context=null,this._atmosphere=i(this._atmosphere),this._set("_stars",i(this._stars)),this._set("_precipitation",i(this._precipitation)),this._set("_clouds",i(this._clouds)),this._set("_cloudsComposition",i(this._cloudsComposition)),this._set("_fog",i(this._fog))}prepareRender(e){e.bindParameters.weatherParameter.cloudsFadingComposition.data=f(this._clouds)?this._clouds:null}render(e){if(e.output===A.Color)switch(e.bindParameters.slot){case P.POSTPROCESSING_ENVIRONMENT_OPAQUE:o(this._stars)&&this._stars.render(e),o(this._atmosphere)&&(this._atmosphere.render(e),o(this._cloudsComposition)&&o(e.bindParameters.weatherParameter.cloudsFadingComposition.data)&&(this.weatherVisible&&o(this._clouds)&&this._clouds.ensureWeatherTile(),this._cloudsComposition.render(e)));break;case P.POSTPROCESSING_ENVIRONMENT_TRANSPARENT:if(o(this._atmosphere)){const t=this.weatherEnabled?this.view.environment.weather.type:"disabled";if(this._atmosphere.renderHaze(e,"rainy"===t),o(this._fog)){const s="foggy"===t||"rainy"===t||"snowy"===t;(s||this._selectAtmosphereType()!==y.Realistic)&&this._fog.render(e,s,"rainy"===t)}if(o(this._precipitation)){const t=this.view.environment.weather;"rainy"!==t.type&&"snowy"!==t.type||this._precipitation.render(e,t.precipitation,t.type)}}}}get _weatherUpdateParameters(){const e=this.weatherEnabled?this.view.environment.weather:null;return n(e)?null:"rainy"===e.type||"snowy"===e.type?{type:e.type,weatherAdjustment:e.cloudCover,effect:e.precipitation}:{type:e.type,weatherAdjustment:"foggy"===e.type?e.fogStrength:e.cloudCover}}_updateWeather(e){n(e)||n(this._clouds)||(this._clouds.applyPreset(b[e.type],e.weatherAdjustment),this._setNeedsRender())}_setNeedsRender(){o(this._context)&&this._context.requestRender()}_updateFog(e){if(!n(this._fog)&&!n(e))switch(e.type){case"foggy":this._fog.strength=r(3e-5,.005,e.weatherAdjustment**3),this._setNeedsRender();break;case"rainy":case"snowy":this._fog.strength=r(4e-6,2e-4,e.effect**3),this._setNeedsRender();break;default:this._fog.strength=4e-6,this._setNeedsRender()}}_updateAtmosphere(){const e=this._selectAtmosphereType();if(this.atmosphereType===e)return;const t=this._getAtmosphereClass();if(!t)return o(this._atmosphere)&&(this._atmosphere.destroy(),this._atmosphere=null,this._setNeedsRender()),void this._updateBasemapTerrain();o(this._context)&&(i(this._atmosphere),this._atmosphere=new t(this.view),this._atmosphere.initializeRenderContext(this._context),this._setNeedsRender(),this._updateBasemapTerrain())}_getAtmosphereClass(){switch(this._selectAtmosphereType()){case y.None:return null;case y.Realistic:return g;case y.Panoramic:return E;case y.Simple:return C;default:return}}_selectAtmosphereType(){const e=this.view.get("environment.atmosphereEnabled"),t=this.view.get("environment.atmosphere.quality"),s=this.view.viewingMode;return!e||null==t||u(this.view.spatialReference)?y.None:"local"===s?y.Panoramic:"high"===t&&o(this._context)&&g.isSupported(this._context)&&w(this.view.spatialReference)?y.Realistic:y.Simple}_updateBasemapTerrain(){this.view.basemapTerrain&&(this.view.basemapTerrain.velvetOverground=o(this._atmosphere)&&this.atmosphereType===y.Simple)}get test(){return{atmosphere:this._atmosphere,clouds:this._clouds,selectAtmosphereType:()=>this._selectAtmosphereType(),stubGetAtmosphereClass:e=>{M=O.prototype._getAtmosphereClass,O.prototype._getAtmosphereClass=e},restoreGetAtmosphereClass:()=>{O.prototype._getAtmosphereClass=M}}}};e([d({constructOnly:!0})],U.prototype,"view",void 0),e([d({type:Boolean,readOnly:!0})],U.prototype,"updating",null),e([d({readOnly:!0})],U.prototype,"weatherVisible",null),e([d()],U.prototype,"_context",void 0),e([d({readOnly:!0})],U.prototype,"_stars",null),e([d({readOnly:!0})],U.prototype,"_precipitation",null),e([d({readOnly:!0})],U.prototype,"_clouds",null),e([d({readOnly:!0})],U.prototype,"_cloudsComposition",null),e([d({readOnly:!0})],U.prototype,"_fog",null),e([d({readOnly:!0})],U.prototype,"weatherEnabled",null),e([d({readOnly:!0})],U.prototype,"_precipitationEnabled",null),e([d({readOnly:!0})],U.prototype,"_weatherUpdateParameters",null),U=O=e([m("esri.views.3d.environment.EnvironmentRenderer")],U);export{U as EnvironmentRenderer};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import"../../../core/has.js";import s from"../../../core/Handles.js";import{lerp as r}from"../../../core/mathUtils.js";import{destroyMaybe as i,isSome as o,isNone as n}from"../../../core/maybe.js";import{when as a,syncAndInitial as h,watch as p,initial as l}from"../../../core/reactiveUtils.js";import{property as d}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as _}from"../../../core/accessorSupport/decorators/subclass.js";import{l as m}from"../../../chunks/vec3.js";import{getReferenceEllipsoid as c}from"../../../geometry/projectionEllipsoid.js";import{isMoon as u,isEarth as w}from"../../../geometry/support/spatialReferenceUtils.js";import{AtmosphereType as y}from"./AtmosphereType.js";import{ChapmanAtmosphere as g}from"./ChapmanAtmosphere.js";import{CloudsComposition as v}from"./CloudsComposition.js";import{isReadyCloudsData as f}from"./CloudsData.js";import{CloudsGenerator as R}from"./CloudsGenerator.js";import{cloudPresets as b}from"./CloudsPresets.js";import{Fog as N}from"./Fog.js";import{PanoramicAtmosphere as E}from"./PanoramicAtmosphere.js";import{Precipitation as j}from"./Precipitation.js";import T from"./SimpleAtmosphere.js";import{Stars as x}from"./Stars.js";import{weatherHeightLimit as A}from"./weather.js";import{ShaderOutput as C}from"../webgl-engine/core/shaderLibrary/ShaderOutput.js";import{RenderSlot as P}from"../webgl-engine/lib/RenderSlot.js";var O;const S=[P.POSTPROCESSING_ENVIRONMENT_OPAQUE,P.POSTPROCESSING_ENVIRONMENT_TRANSPARENT];let M,U=O=class extends t{constructor(e){super(e),this._handles=new s,this._context=null,this._atmosphere=null}initialize(){this.view._stage.addRenderPlugin(S,this)}destroy(){null!=this.view?._stage&&this.view._stage.removeRenderPlugin(this),this._handles=i(this._handles),this._set("view",null)}get atmosphereType(){return o(this._atmosphere)?this._atmosphere.type:y.None}get canRender(){return!!this.view.basemapTerrain?.renderer.canRender||"global"!==this.view.viewingMode}get needsLinearDepth(){return o(this._atmosphere)&&this._atmosphere.type===y.Realistic}updateAnimation(e){return!!o(this._precipitation)&&this._precipitation.update(e)}get updating(){return o(this._stars)&&this._stars.updating||o(this._clouds)&&this._clouds.running}get weatherVisible(){return m(this.view.state.camera.eye)-c(this.view.spatialReference).radius<=A}get _stars(){const e=this.view,t=e.environment?.starsEnabled??!1,s=this._get("_stars");return!t||n(this._context)?(i(s),null):o(s)?s:new x({view:e,requestRender:()=>this._setNeedsRender()})}get _precipitation(){const e=this._get("_precipitation");if(!this._precipitationEnabled||n(this._context))return i(e),null;const t=this.view,s=this._context;return o(e)&&e.context===s?e:(i(e),new j({context:s,view:t}))}get _clouds(){const e=this._get("_clouds");if(!this.weatherEnabled||n(this._context))return i(e),null;if(o(e))return e;const t=this.view,s=this._context;return i(e),new R({context:s,view:t,requestRender:()=>this._setNeedsRender()})}get _cloudsComposition(){const e=this._get("_cloudsComposition");if(!this.weatherEnabled||n(this._context))return i(e),null;const t=this.view.state.viewingMode,s=this._context.renderContext.rctx,r=c(this.view.spatialReference).radius;return o(e)&&e.viewingMode===t&&e.planetRadius===r?e:(i(e),new v({rctx:s,viewingMode:t,planetRadius:r,requestRender:()=>this._setNeedsRender()}))}get _fog(){const e=this._get("_fog");if(!this.weatherEnabled||n(this._context))return i(e),null;if(o(e))return e;const t=this.view,s=this._context;return i(e),new N({context:s,view:t})}get weatherEnabled(){return!!this.view?.environmentManager?.weatherEnabled}get _precipitationEnabled(){return this.weatherEnabled&&("rainy"===this.view.environment.weather.type||"snowy"===this.view.environment.weather.type)}initializeRenderContext(e=null){this._context=e,this._handles.add([a((()=>this.view?.basemapTerrain),(()=>this._updateBasemapTerrain()),h),p((()=>({viewingMode:this.view.viewingMode,atmosphereEnabled:this.view.environment.atmosphereEnabled,atmosphereQuality:this.view.environment.atmosphere.quality})),(()=>this._updateAtmosphere()),h),p((()=>this._stars),(()=>this._setNeedsRender())),p((()=>this._clouds),(()=>this._updateWeather(this._weatherUpdateParameters)),l),p((()=>this._precipitation),(()=>this._setNeedsRender())),p((()=>this._fog),(()=>this._updateFog(this._weatherUpdateParameters)),l),p((()=>this._weatherUpdateParameters),(e=>{this._updateWeather(e),this._updateFog(e)}),h)])}uninitializeRenderContext(){this._context=null,this._atmosphere=i(this._atmosphere),this._set("_stars",i(this._stars)),this._set("_precipitation",i(this._precipitation)),this._set("_clouds",i(this._clouds)),this._set("_cloudsComposition",i(this._cloudsComposition)),this._set("_fog",i(this._fog))}prepareRender(e){e.bindParameters.cloudsFade.data=f(this._clouds)?this._clouds:null}render(e){if(e.output===C.Color)switch(e.bindParameters.slot){case P.POSTPROCESSING_ENVIRONMENT_OPAQUE:o(this._stars)&&this._stars.render(e),o(this._atmosphere)&&(this._atmosphere.render(e),o(this._cloudsComposition)&&o(e.bindParameters.cloudsFade.data)&&(this.weatherVisible&&o(this._clouds)&&this._clouds.ensureWeatherTile(),this._cloudsComposition.render(e)));break;case P.POSTPROCESSING_ENVIRONMENT_TRANSPARENT:if(o(this._atmosphere)){const t=this.weatherEnabled?this.view.environment.weather.type:"disabled";if(this._atmosphere.renderHaze(e,"rainy"===t),o(this._fog)){const s="foggy"===t||"rainy"===t||"snowy"===t;(s||this._selectAtmosphereType()!==y.Realistic)&&this._fog.render(e,s,"rainy"===t)}if(o(this._precipitation)){const t=this.view.environment.weather;"rainy"!==t.type&&"snowy"!==t.type||this._precipitation.render(e,t.precipitation,t.type)}}}}get _weatherUpdateParameters(){const e=this.weatherEnabled?this.view.environment.weather:null;return n(e)?null:"rainy"===e.type||"snowy"===e.type?{type:e.type,weatherAdjustment:e.cloudCover,effect:e.precipitation}:{type:e.type,weatherAdjustment:"foggy"===e.type?e.fogStrength:e.cloudCover}}_updateWeather(e){n(e)||n(this._clouds)||(this._clouds.applyPreset(b[e.type],e.weatherAdjustment),this._setNeedsRender())}_setNeedsRender(){o(this._context)&&this._context.requestRender()}_updateFog(e){if(!n(this._fog)&&!n(e))switch(e.type){case"foggy":this._fog.strength=r(3e-5,.005,e.weatherAdjustment**3),this._setNeedsRender();break;case"rainy":case"snowy":this._fog.strength=r(4e-6,2e-4,e.effect**3),this._setNeedsRender();break;default:this._fog.strength=4e-6,this._setNeedsRender()}}_updateAtmosphere(){const e=this._selectAtmosphereType();if(this.atmosphereType===e)return;const t=this._getAtmosphereClass();if(!t)return o(this._atmosphere)&&(this._atmosphere.destroy(),this._atmosphere=null,this._setNeedsRender()),void this._updateBasemapTerrain();o(this._context)&&(i(this._atmosphere),this._atmosphere=new t(this.view),this._atmosphere.initializeRenderContext(this._context),this._setNeedsRender(),this._updateBasemapTerrain())}_getAtmosphereClass(){switch(this._selectAtmosphereType()){case y.None:return null;case y.Realistic:return g;case y.Panoramic:return E;case y.Simple:return T;default:return}}_selectAtmosphereType(){const e=this.view.get("environment.atmosphereEnabled"),t=this.view.get("environment.atmosphere.quality"),s=this.view.viewingMode;return!e||null==t||u(this.view.spatialReference)?y.None:"local"===s?y.Panoramic:"high"===t&&o(this._context)&&g.isSupported(this._context)&&w(this.view.spatialReference)?y.Realistic:y.Simple}_updateBasemapTerrain(){this.view.basemapTerrain&&(this.view.basemapTerrain.velvetOverground=o(this._atmosphere)&&this.atmosphereType===y.Simple)}get test(){return{atmosphere:this._atmosphere,clouds:this._clouds,selectAtmosphereType:()=>this._selectAtmosphereType(),stubGetAtmosphereClass:e=>{M=O.prototype._getAtmosphereClass,O.prototype._getAtmosphereClass=e},restoreGetAtmosphereClass:()=>{O.prototype._getAtmosphereClass=M}}}};e([d({constructOnly:!0})],U.prototype,"view",void 0),e([d({type:Boolean,readOnly:!0})],U.prototype,"updating",null),e([d({readOnly:!0})],U.prototype,"weatherVisible",null),e([d()],U.prototype,"_context",void 0),e([d({readOnly:!0})],U.prototype,"_stars",null),e([d({readOnly:!0})],U.prototype,"_precipitation",null),e([d({readOnly:!0})],U.prototype,"_clouds",null),e([d({readOnly:!0})],U.prototype,"_cloudsComposition",null),e([d({readOnly:!0})],U.prototype,"_fog",null),e([d({readOnly:!0})],U.prototype,"weatherEnabled",null),e([d({readOnly:!0})],U.prototype,"_precipitationEnabled",null),e([d({readOnly:!0})],U.prototype,"_weatherUpdateParameters",null),U=O=e([_("esri.views.3d.environment.EnvironmentRenderer")],U);export{U as EnvironmentRenderer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{smoothstep as s}from"../../../core/mathUtils.js";import{releaseMaybe as r,disposeMaybe as i,isNone as o}from"../../../core/maybe.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{n as c,e as n,g as p,h as u,l as m}from"../../../chunks/vec3.js";import{c as d,f as g}from"../../../chunks/vec3f64.js";import{getReferenceEllipsoid as _}from"../../../geometry/projectionEllipsoid.js";import{atmosphereHeight as f}from"./atmosphereUtils.js";import{F as l}from"../../../chunks/Fog.glsl.js";import{FogTechniqueConfiguration as T,FogTechnique as q}from"./FogTechnique.js";import{weatherHeightLimit as b}from"./weather.js";import{Pos2Tex as j}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{createQuadVAO as F}from"../webgl-engine/lib/glUtil3D.js";import{PrimitiveType as y}from"../../webgl/enums.js";const v=.95,x=1,R=.7,C=1;let P=class extends t{constructor(e){super(e),this._passParameters=new l;const t=e.context.renderContext.rctx;this._vao=F(t,j);const s=_(e.view.spatialReference);this._planetRadius=s.radius,this._atmosphereRadius=s.radius+f}destroy(){this._hazeFogTechniqueCached=r(this._hazeFogTechniqueCached),this._thickFogTechniqueCached=r(this._thickFogTechniqueCached),this._vao=i(this._vao)}get _shaderTechniqueRepository(){return this.context.shaderTechniqueRepository}set strength(e){this._passParameters.fogStrength=e}get strength(){return this._passParameters.fogStrength}get _thickFogTechnique(){if(o(this._thickFogTechniqueCached)){const e=new T;e.haze=!1,this._thickFogTechniqueCached=this._shaderTechniqueRepository.acquire(q,e)}return this._thickFogTechniqueCached}get _hazeFogTechnique(){if(o(this._hazeFogTechniqueCached)){const e=new T;e.haze=!0,this._hazeFogTechniqueCached=this._shaderTechniqueRepository.acquire(q,e)}return this._hazeFogTechniqueCached}render(e,t,s){if(0===this.view.basemapTerrain.baseOpacity&&!t)return;if(this._update(e,t,s),this._passParameters.fogAmount<=0)return;const r=t?this._thickFogTechnique:this._hazeFogTechnique;if(!r.compiled)return void this.context.requestRender();const i=e.offscreenRenderingHelper;i.renderDepthDetached((()=>{this._passParameters.depthTexture=i.depthTexture;const t=e.rctx.bindTechnique(r,this._passParameters,e.bindParameters);this._renderFog(t,e)}))}_renderFog(e,t){if(o(this._vao))return!1;const s=t.rctx;return s.bindVAO(this._vao),e.assertCompatibleVertexAttributeLocations(this._vao),s.drawArrays(y.TRIANGLE_STRIP,0,4),!0}_update(e,t,r){const i=e.bindParameters.camera;c(A,i.eye);const o=Math.max(0,n(A,e.bindParameters.lighting.lightingMainDirection)),a=r?w:t?k:z;p(S,a,t?.1:0),u(this._passParameters.fogColor,S,a,o);const h=m(i.eye),d=h*h;this._passParameters.atmosphereC=d-this._atmosphereRadius*this._atmosphereRadius,this._passParameters.fogAmount=t?1-s(v*b,x*b,Math.abs(h-this._planetRadius)):1-s(R*b,C*b,Math.abs(h-this._planetRadius))}static isSupported(e){return e.capabilities.depthTexture}};e([a({constructOnly:!0})],P.prototype,"context",void 0),e([a({constructOnly:!0})],P.prototype,"view",void 0),P=e([h("esri.views.3d.environment.Fog")],P);const w=g(.5,.5,.5),k=g(1.5,1.5,1.5),z=g(.24,.44,.8),A=d(),S=d();export{P as Fog};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{smoothstep as s}from"../../../core/mathUtils.js";import{releaseMaybe as r,disposeMaybe as i,isNone as o}from"../../../core/maybe.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{n as c,e as n,g as p,h as u,l as m}from"../../../chunks/vec3.js";import{c as d,f as g}from"../../../chunks/vec3f64.js";import{getReferenceEllipsoid as _}from"../../../geometry/projectionEllipsoid.js";import{atmosphereHeight as f}from"./atmosphereUtils.js";import{F as l}from"../../../chunks/Fog.glsl.js";import{FogTechniqueConfiguration as T,FogTechnique as q}from"./FogTechnique.js";import{weatherHeightLimit as b}from"./weather.js";import{Pos2Tex as j}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{createQuadVAO as F}from"../webgl-engine/lib/glUtil3D.js";import{PrimitiveType as y}from"../../webgl/enums.js";const v=.95,x=1,R=.7,C=1;let P=class extends t{constructor(e){super(e),this._passParameters=new l;const t=e.context.renderContext.rctx;this._vao=F(t,j);const s=_(e.view.spatialReference);this._planetRadius=s.radius,this._atmosphereRadius=s.radius+f}destroy(){this._hazeFogTechniqueCached=r(this._hazeFogTechniqueCached),this._thickFogTechniqueCached=r(this._thickFogTechniqueCached),this._vao=i(this._vao)}get _shaderTechniqueRepository(){return this.context.shaderTechniqueRepository}set strength(e){this._passParameters.fogStrength=e}get strength(){return this._passParameters.fogStrength}get _thickFogTechnique(){if(o(this._thickFogTechniqueCached)){const e=new T;e.haze=!1,this._thickFogTechniqueCached=this._shaderTechniqueRepository.acquire(q,e)}return this._thickFogTechniqueCached}get _hazeFogTechnique(){if(o(this._hazeFogTechniqueCached)){const e=new T;e.haze=!0,this._hazeFogTechniqueCached=this._shaderTechniqueRepository.acquire(q,e)}return this._hazeFogTechniqueCached}render(e,t,s){if(0===this.view.basemapTerrain.baseOpacity&&!t)return;if(this._update(e,t,s),this._passParameters.fogAmount<=0)return;const r=t?this._thickFogTechnique:this._hazeFogTechnique;if(!r.compiled)return void this.context.requestRender();const i=e.offscreenRenderingHelper;i.renderDepthDetached((()=>{this._passParameters.depthTexture=i.depthTexture;const t=e.rctx.bindTechnique(r,this._passParameters,e.bindParameters);this._renderFog(t,e)}))}_renderFog(e,t){if(o(this._vao))return!1;const s=t.rctx;return s.bindVAO(this._vao),e.assertCompatibleVertexAttributeLocations(this._vao),s.drawArrays(y.TRIANGLE_STRIP,0,4),!0}_update(e,t,r){const i=e.bindParameters.camera;c(A,i.eye);const o=Math.max(0,n(A,e.bindParameters.lighting.mainLight.direction)),a=r?w:t?k:z;p(S,a,t?.1:0),u(this._passParameters.fogColor,S,a,o);const h=m(i.eye),d=h*h;this._passParameters.atmosphereC=d-this._atmosphereRadius*this._atmosphereRadius,this._passParameters.fogAmount=t?1-s(v*b,x*b,Math.abs(h-this._planetRadius)):1-s(R*b,C*b,Math.abs(h-this._planetRadius))}static isSupported(e){return e.capabilities.depthTexture}};e([a({constructOnly:!0})],P.prototype,"context",void 0),e([a({constructOnly:!0})],P.prototype,"view",void 0),P=e([h("esri.views.3d.environment.Fog")],P);const w=g(.5,.5,.5),k=g(1.5,1.5,1.5),z=g(.24,.44,.8),A=d(),S=d();export{P as Fog};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{disposeMaybe as e,isNone as t}from"../../../core/maybe.js";import{c as r}from"../../../chunks/mat4.js";import{c as i}from"../../../chunks/mat4f64.js";import{AtmosphereType as s}from"./AtmosphereType.js";import{S as o}from"../../../chunks/SimpleAtmosphere.glsl.js";import{SimpleAtmosphereTechnique as a}from"./SimpleAtmosphereTechnique.js";import{SimpleAtmosphereTechniqueConfiguration as n,SimpleAtmosphereGeometry as m}from"./SimpleAtmosphereTechniqueConfiguration.js";import{earthAtmosphereTextureSimple as p}from"./resources/SimpleAtmosphereTexture.js";import{glLayout as h}from"../support/buffer/glUtil.js";import{newLayout as c}from"../support/buffer/InterleavedLayout.js";import{Default3D as u}from"../webgl-engine/lib/DefaultVertexAttributeLocations.js";import{createPolySphereGeometry as f}from"../webgl-engine/lib/GeometryUtil.js";import{VertexArrayObject as l}from"../webgl-engine/lib/VertexArrayObject.js";import{VertexAttribute as b}from"../webgl-engine/lib/VertexAttribute.js";import{BufferObject as g}from"../../webgl/BufferObject.js";import{PixelFormat as _,PixelType as j,TextureWrapMode as x,TextureSamplingMode as d,PrimitiveType as A,Usage as w}from"../../webgl/enums.js";import{Texture as y}from"../../webgl/Texture.js";import{vertexCount as T}from"../../webgl/Util.js";class v{constructor(){this.type=s.Panoramic,this._techniqueConfig=new n,this._passParameters=new o}destroy(){this._passParameters.texture=e(this._passParameters.texture),this._vao=e(this._vao)}initializeRenderContext(e){this._techniqueConfig.geometry=m.Cylinder,this._technique=e.shaderTechniqueRepository.acquire(a,this._techniqueConfig);const t=e.renderContext.rctx;this._vao=this._createVertexArrayObject(t),this._vaoCount=T(this._vao,"geometry"),this._passParameters.texture=new y(t,{pixelFormat:_.RGBA,dataType:j.UNSIGNED_BYTE,wrapMode:x.CLAMP_TO_EDGE,samplingMode:d.LINEAR,flipped:!0,width:1,height:512},p),e.requestRender()}render(e){if(t(this._vao)||t(this._passParameters.texture))return;const r=e.rctx,i=r.bindTechnique(this._technique,this._passParameters,e.bindParameters);P(C,e.bindParameters.camera.viewMatrix),i.setUniformMatrix4fv("view",C),r.bindVAO(this._vao),i.assertCompatibleVertexAttributeLocations(this._vao),r.drawArrays(A.TRIANGLES,0,this._vaoCount)}renderHaze(){return!1}_createVertexArrayObject(e){const t=f(1,2,!1),r=t.indices.get(b.POSITION);for(let a=0;a<r.length;a+=3){const e=r[a];r[a]=r[a+2],r[a+2]=e}const i=t.vertexAttributes.get(b.POSITION).data,s=O.createBuffer(r.length),o=s.position;for(let a=0;a<r.length;++a){const e=3*r[a];o.set(a,0,i[e]),o.set(a,1,i[e+1]),o.set(a,2,i[e+2])}return new l(e,u,{geometry:h(O)},{geometry:g.createVertex(e,w.STATIC_DRAW,s.buffer)})}}function P(e,t){r(e,t),e[12]=0,e[13]=0,e[14]=0,e[15]=1}const C=i(),O=c().vec3f(b.POSITION);export{v as PanoramicAtmosphere};
5
+ import{disposeMaybe as e,isNone as t}from"../../../core/maybe.js";import{c as r}from"../../../chunks/mat4.js";import{c as i}from"../../../chunks/mat4f64.js";import{AtmosphereType as s}from"./AtmosphereType.js";import{S as o}from"../../../chunks/SimpleAtmosphere.glsl.js";import{SimpleAtmosphereTechnique as a}from"./SimpleAtmosphereTechnique.js";import{SimpleAtmosphereTechniqueConfiguration as n,SimpleAtmosphereGeometry as m}from"./SimpleAtmosphereTechniqueConfiguration.js";import{earthAtmosphereTextureSimple as p}from"./resources/SimpleAtmosphereTexture.js";import{glLayout as c}from"../support/buffer/glUtil.js";import{newLayout as h}from"../support/buffer/InterleavedLayout.js";import{Default3D as u}from"../webgl-engine/lib/DefaultVertexAttributeLocations.js";import{createPolySphereGeometry as f}from"../webgl-engine/lib/GeometryUtil.js";import{VertexArrayObject as l}from"../webgl-engine/lib/VertexArrayObject.js";import{VertexAttribute as b}from"../webgl-engine/lib/VertexAttribute.js";import{BufferObject as g}from"../../webgl/BufferObject.js";import{PixelFormat as _,PixelType as j,TextureWrapMode as x,TextureSamplingMode as d,PrimitiveType as A,Usage as w}from"../../webgl/enums.js";import{Texture as y}from"../../webgl/Texture.js";import{vertexCount as T}from"../../webgl/Util.js";class v{constructor(){this.type=s.Panoramic,this._configuration=new n,this._passParameters=new o}destroy(){this._passParameters.texture=e(this._passParameters.texture),this._vao=e(this._vao)}initializeRenderContext(e){this._configuration.geometry=m.Cylinder,this._technique=e.shaderTechniqueRepository.acquire(a,this._configuration);const t=e.renderContext.rctx;this._vao=this._createVertexArrayObject(t),this._vaoCount=T(this._vao,"geometry"),this._passParameters.texture=new y(t,{pixelFormat:_.RGBA,dataType:j.UNSIGNED_BYTE,wrapMode:x.CLAMP_TO_EDGE,samplingMode:d.LINEAR,flipped:!0,width:1,height:512},p),e.requestRender()}render(e){if(t(this._vao)||t(this._passParameters.texture))return;const r=e.rctx,i=r.bindTechnique(this._technique,this._passParameters,e.bindParameters);P(O,e.bindParameters.camera.viewMatrix),i.setUniformMatrix4fv("view",O),r.bindVAO(this._vao),i.assertCompatibleVertexAttributeLocations(this._vao),r.drawArrays(A.TRIANGLES,0,this._vaoCount)}renderHaze(){return!1}_createVertexArrayObject(e){const t=f(1,2,!1),r=t.indices.get(b.POSITION);for(let a=0;a<r.length;a+=3){const e=r[a];r[a]=r[a+2],r[a+2]=e}const i=t.vertexAttributes.get(b.POSITION).data,s=I.createBuffer(r.length),o=s.position;for(let a=0;a<r.length;++a){const e=3*r[a];o.set(a,0,i[e]),o.set(a,1,i[e+1]),o.set(a,2,i[e+2])}return new l(e,u,{geometry:c(I)},{geometry:g.createVertex(e,w.STATIC_DRAW,s.buffer)})}}function P(e,t){r(e,t),e[12]=0,e[13]=0,e[14]=0,e[15]=1}const O=i(),I=h().vec3f(b.POSITION);export{v as PanoramicAtmosphere};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{lerp as r}from"../../../core/mathUtils.js";import{releaseMaybe as i,disposeMaybe as s,isNone as n,isSome as a}from"../../../core/maybe.js";import{secondsFromMilliseconds as o}from"../../../core/time.js";import{property as c}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{WatchUpdatingTracking as p}from"../../../core/support/WatchUpdatingTracking.js";import{getReferenceEllipsoid as u}from"../../../geometry/projectionEllipsoid.js";import{PrecipitationPassParameters as m,PrecipitationTechnique as d,attributeLocations as _}from"./PrecipitationTechnique.js";import{PrecipitationTechniqueConfiguration as f,PrecipitationType as l}from"./PrecipitationTechniqueConfiguration.js";import{glLayout as T}from"../support/buffer/glUtil.js";import{newLayout as g}from"../support/buffer/InterleavedLayout.js";import{AnimationTimer as y}from"../webgl-engine/lib/AnimationTimer.js";import{VertexArrayObject as w}from"../webgl-engine/lib/VertexArrayObject.js";import{VertexAttribute as b}from"../webgl-engine/lib/VertexAttribute.js";import{BufferObject as j}from"../../webgl/BufferObject.js";import{PrimitiveType as q,Usage as I}from"../../webgl/enums.js";import{bindVertexBufferLayout as P,unbindVertexBufferLayout as A}from"../../webgl/Util.js";let v=class extends t{constructor(e){super(e),this._numParticles=25e4,this._rainSpeed=.1,this._snowSpeed=.01,this._passParameters=new m,this._animation=new y,this._updatingTracking=new p,this._passParameters.time=0,this._passParameters.radius=u(e.view.spatialReference).radius,this._shaderTechniqueRepository=e.context.shaderTechniqueRepository}destroy(){this._updatingTracking.destroy(),this._numParticles=0,this._snowTechniqueCached=i(this._snowTechniqueCached),this._rainTechniqueCached=i(this._rainTechniqueCached),this._vao=s(this._vao),this._instanceIdBuffer=s(this._instanceIdBuffer)}get updating(){return this._updatingTracking.updating}get _rainTechnique(){if(n(this._rainTechniqueCached)){const e=new f;e.type=l.Rain,this._rainTechniqueCached=this._shaderTechniqueRepository.acquire(d,e)}return this._rainTechniqueCached}get _snowTechnique(){if(n(this._snowTechniqueCached)){const e=new f;e.type=l.Snow,this._snowTechniqueCached=this._shaderTechniqueRepository.acquire(d,e)}return this._snowTechniqueCached}update(e){return this._animation.advance(e)}render(e,t,i){const s="rainy"===i?this._rainTechnique:this._snowTechnique;if(!s.compiled)return void this.context.requestRender();const c=e.rctx;if(this._ensureResources(c),n(s)||n(this._vao)||n(this._instanceIdBuffer))return;if(a(e.bindParameters.weatherParameter.cloudsFadingComposition.data)&&(this._passParameters.opacity=1-e.bindParameters.weatherParameter.cloudsFadingComposition.fadeInOutHeight.factor),this._passParameters.opacity<=0)return;const h=.35;t=t<.5?r(0,h,2*t):r(h,1,2*(t-.5)),this._passParameters.time=("rainy"===i?this._rainSpeed:this._snowSpeed)*o(this._animation.time)%1e5;const p=c.bindTechnique(s,this._passParameters,e.bindParameters);c.bindVAO(this._vao),p.assertCompatibleVertexAttributeLocations(this._vao),P(c,_,this._instanceIdBuffer,R,0),c.capabilities.instancing.drawArraysInstanced(q.TRIANGLES,0,3,this._numParticles*t),A(c,_,this._instanceIdBuffer,R)}_ensureResources(e){n(this._vao)&&(this._vao=this._createVertexArrayObject(e)),n(this._instanceIdBuffer)&&(this._instanceIdBuffer=this._createInstanceIndices(e))}_createInstanceIndices(e){const t=[];for(let r=0;r<this._numParticles;r++)t.push(r);return j.createVertex(e,I.STATIC_DRAW,new Float32Array(t))}_createVertexArrayObject(e){const t=new Float32Array([-1,0,1,1,0,-1,1,0,1]);return new w(e,_,{geometry:T(C)},{geometry:j.createVertex(e,I.STATIC_DRAW,t)})}};e([c({constructOnly:!0})],v.prototype,"context",void 0),e([c({constructOnly:!0})],v.prototype,"view",void 0),e([c({readOnly:!0})],v.prototype,"updating",null),e([c()],v.prototype,"_updatingTracking",void 0),v=e([h("esri.views.3d.environment.Precipitation")],v);const C=g().vec3f(b.POSITION),R=T(g().f32(b.INSTANCEFEATUREATTRIBUTE),1);export{v as Precipitation};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{lerp as r}from"../../../core/mathUtils.js";import{releaseMaybe as i,disposeMaybe as s,isNone as n,isSome as a}from"../../../core/maybe.js";import{secondsFromMilliseconds as o}from"../../../core/time.js";import{property as c}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{WatchUpdatingTracking as p}from"../../../core/support/WatchUpdatingTracking.js";import{getReferenceEllipsoid as u}from"../../../geometry/projectionEllipsoid.js";import{PrecipitationPassParameters as m,PrecipitationTechnique as d,attributeLocations as _}from"./PrecipitationTechnique.js";import{PrecipitationTechniqueConfiguration as f,PrecipitationType as l}from"./PrecipitationTechniqueConfiguration.js";import{glLayout as T}from"../support/buffer/glUtil.js";import{newLayout as y}from"../support/buffer/InterleavedLayout.js";import{AnimationTimer as g}from"../webgl-engine/lib/AnimationTimer.js";import{VertexArrayObject as w}from"../webgl-engine/lib/VertexArrayObject.js";import{VertexAttribute as b}from"../webgl-engine/lib/VertexAttribute.js";import{BufferObject as j}from"../../webgl/BufferObject.js";import{PrimitiveType as q,Usage as I}from"../../webgl/enums.js";import{bindVertexBufferLayout as A,unbindVertexBufferLayout as v}from"../../webgl/Util.js";let P=class extends t{constructor(e){super(e),this._numParticles=25e4,this._rainSpeed=.1,this._snowSpeed=.01,this._passParameters=new m,this._animation=new g,this._updatingTracking=new p,this._passParameters.time=0,this._passParameters.radius=u(e.view.spatialReference).radius,this._shaderTechniqueRepository=e.context.shaderTechniqueRepository}destroy(){this._updatingTracking.destroy(),this._numParticles=0,this._snowTechniqueCached=i(this._snowTechniqueCached),this._rainTechniqueCached=i(this._rainTechniqueCached),this._vao=s(this._vao),this._instanceIdBuffer=s(this._instanceIdBuffer)}get updating(){return this._updatingTracking.updating}get _rainTechnique(){if(n(this._rainTechniqueCached)){const e=new f;e.type=l.Rain,this._rainTechniqueCached=this._shaderTechniqueRepository.acquire(d,e)}return this._rainTechniqueCached}get _snowTechnique(){if(n(this._snowTechniqueCached)){const e=new f;e.type=l.Snow,this._snowTechniqueCached=this._shaderTechniqueRepository.acquire(d,e)}return this._snowTechniqueCached}update(e){return this._animation.advance(e)}render(e,t,i){const s="rainy"===i?this._rainTechnique:this._snowTechnique;if(!s.compiled)return void this.context.requestRender();const c=e.rctx;if(this._ensureResources(c),n(s)||n(this._vao)||n(this._instanceIdBuffer))return;if(a(e.bindParameters.cloudsFade.data)&&(this._passParameters.opacity=1-e.bindParameters.cloudsFade.fadeInOutHeight.factor),this._passParameters.opacity<=0)return;const h=.35;t=t<.5?r(0,h,2*t):r(h,1,2*(t-.5)),this._passParameters.time=("rainy"===i?this._rainSpeed:this._snowSpeed)*o(this._animation.time)%1e5;const p=c.bindTechnique(s,this._passParameters,e.bindParameters);c.bindVAO(this._vao),p.assertCompatibleVertexAttributeLocations(this._vao),A(c,_,this._instanceIdBuffer,R,0),c.capabilities.instancing.drawArraysInstanced(q.TRIANGLES,0,3,this._numParticles*t),v(c,_,this._instanceIdBuffer,R)}_ensureResources(e){n(this._vao)&&(this._vao=this._createVertexArrayObject(e)),n(this._instanceIdBuffer)&&(this._instanceIdBuffer=this._createInstanceIndices(e))}_createInstanceIndices(e){const t=[];for(let r=0;r<this._numParticles;r++)t.push(r);return j.createVertex(e,I.STATIC_DRAW,new Float32Array(t))}_createVertexArrayObject(e){const t=new Float32Array([-1,0,1,1,0,-1,1,0,1]);return new w(e,_,{geometry:T(C)},{geometry:j.createVertex(e,I.STATIC_DRAW,t)})}};e([c({constructOnly:!0})],P.prototype,"context",void 0),e([c({constructOnly:!0})],P.prototype,"view",void 0),e([c({readOnly:!0})],P.prototype,"updating",null),e([c()],P.prototype,"_updatingTracking",void 0),P=e([h("esri.views.3d.environment.Precipitation")],P);const C=y().vec3f(b.POSITION),R=T(y().f32(b.INSTANCEFEATUREATTRIBUTE),1);export{P as Precipitation};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Color.js";import r from"../../../core/Evented.js";import i from"../../../core/Handles.js";import{destroyMaybe as n,isSome as s,isNone as o,mapOr as a}from"../../../core/maybe.js";import{after as h}from"../../../core/promiseUtils.js";import{watch as d,sync as c,syncAndInitial as l}from"../../../core/reactiveUtils.js";import{property as p}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as _}from"../../../core/accessorSupport/decorators/subclass.js";import{s as u,g as m,c as g,h as f}from"../../../chunks/vec3.js";import{c as v,f as P}from"../../../chunks/vec3f64.js";import{b,f as w}from"../../../chunks/vec4f64.js";import{canProjectToWGS84ComparableLonLat as y,projectPointToWGS84ComparableLonLat as C}from"../../../geometry/projection.js";import{isEarth as U}from"../../../geometry/support/spatialReferenceUtils.js";import{ViewingMode as T}from"../../ViewingMode.js";import{EnvironmentRenderer as R}from"./EnvironmentRenderer.js";import{positionToTimezoneInfo as S}from"../support/earthUtils.js";import{computeColorAndIntensity as W,computeVirtualLightDirection as M,ColorAndIntensity as H,computeShadowsEnabled as G}from"../support/sunUtils.js";import{MainLight as j,AmbientLight as k,FillLight as E}from"../webgl-engine/lighting/Lightsources.js";import L from"../../../webscene/background/ColorBackground.js";let Q=class extends r.EventedAccessor{constructor(){super(),this._referencePointUpdateDelay=200,this._referencePointUpdateInterval=3e3,this._referencePointUpdateDistThreshold=1e6,this._referencePosUpdateQuery=null,this._referencePosMapCoordsRequested=null,this._viewHandles=new i,this._preserveAbsoluteDateTime=!1,this._trackingEnabled=!1,this._referencePosResetPreserveAbsoluteTime=!1,this._referencePosUpdateTimer=null,this._referencePosMapCoords=null,this._mainLight=new j,this._ambientLight=new k,this._moonLight=new E,this._oldWeatherType="sunny",this._isWeatherFading=!1,this.disableQueries=!1,this._disableWeather=!1,this._renderer=null,this._referencePosWGS84Comparable=null,this._resetReferencePosition()}destroy(){this.disconnectView(),this._viewHandles.destroy()}get _view(){return this._renderer?.view}get updating(){return!((this.disableQueries||!this._referencePosUpdateQuery&&!this._referencePosMapCoordsRequested)&&!this._renderer?.updating)}get weatherEnabled(){return this._view?.environment.atmosphereEnabled&&!this._disableWeather&&this._view?.state?.viewingMode===T.Global&&U(this._view.spatialReference)}get weatherVisible(){return this.weatherEnabled&&this._renderer?.weatherVisible}get referencePositionWGS84Comparable(){return this._referencePosWGS84Comparable}connectView(e){if(this._renderer)return;this._renderer=new R({view:e});const t=()=>this._updateRenderParameters(),r=()=>this._cameraHandler(),i=()=>this._updateLighting();this._viewHandles.add([d((()=>e.environment.lighting),(e=>this._updateLightingHandler(e)),c),d((()=>"virtual"!==e.environment.lighting.type?e.environment.lighting.date:null),(e=>this._lightingDateHandler(e)),c),d((()=>e.stationary),(()=>this._interactingStationaryHandler())),d((()=>e.environment.lighting.directShadowsEnabled),t,c),d((()=>e.environment.lighting.ambientOcclusionEnabled),t,c),d((()=>e.environment.lighting.waterReflectionEnabled),t,c),d((()=>e.environment.background?.color),t,c),d((()=>e.spatialReference),(()=>this._resetReferencePosition(!0)),c),d((()=>e.environment.weather.type),i,c),d((()=>this.weatherEnabled),i,c),d((()=>e.viewingMode),(()=>this._resetReferencePosition(!0)),l),d((()=>"virtual"!==e.environment.lighting.type&&e.environment.lighting.cameraTrackingEnabled),(e=>this._updateCameraTracking(e)),l),d((()=>e.state.camera),r,l),d((()=>this.disableQueries),r)]),this._updateRenderParameters(),this._updateLighting(),this._cameraHandler(),this.notifyChange("updating")}disconnectView(){this._viewHandles.removeAll(),this._resetReferencePosition(),this._renderer=n(this._renderer)}_updateLightingHandler(e){this._updateCameraTracking("virtual"!==e.type&&e.cameraTrackingEnabled),this._lightingDateHandler("virtual"!==e.type?e.date:null),this._updateRenderParameters()}_updateCameraTracking(e){if(this._trackingEnabled=e,e)this._cameraHandler();else{const e=this._view.environment.lighting;"virtual"!==e?.type&&(e.positionTimezoneInfo.autoUpdated=!1)}}_lightingDateHandler(e){const t=this._view.environment.lighting;if("virtual"!==t?.type){if(e){if(!t.positionTimezoneInfo.autoUpdated){this._preserveAbsoluteDateTime=!0;const r=this._view.spatialReference;if(!y(r)){const e=this._view.camera.position;if(!this._referencePosMapCoords||!this._referencePosMapCoords.equals(e))return void this._requestReferencePositionUpdate(e)}if(this._preupdateTracking(e),s(this._referencePosWGS84Comparable)){const e=S(this._referencePosWGS84Comparable,V);s(e)&&(t.autoUpdate(null,e),this._trackingEnabled&&(t.positionTimezoneInfo.autoUpdated=!0))}}this._updateLighting(e)}}else this._updateLighting()}_preupdateTracking(e){!this._trackingEnabled&&"virtual"!==this._view.environment.lighting.type&&this._view.environment.lighting.cameraTrackingEnabled&&this._cameraHandler(e)}_cameraHandler(e=null){const t=this._view;if(!t.ready)return;const r=t.stateManager.camera;r&&(this._cameraHandlerClientSide(r,e)||this._cameraHandlerServerSide(r))}_cameraHandlerClientSide(e,t){const r=U(this._view.spatialReference);if(r&&!y(this._view.spatialReference))return"virtual"===this._view.environment.lighting.type&&this._updateLighting(),!1;const i=e.position;return o(this._referencePosWGS84Comparable)&&(this._referencePosWGS84Comparable=v()),r?C(i,this._referencePosWGS84Comparable):u(this._referencePosWGS84Comparable,i.longitude,i.latitude,i.z),this.notifyChange("referencePositionWGS84Comparable"),this._autoUpdateTimezone(this._referencePosWGS84Comparable,t)||this._updateLighting(t),!0}_cameraHandlerServerSide(e){const t=e.position;(!this._referencePosMapCoords||this._referencePosMapCoordsRequested||this._exceedsReferencePosDistThreshold(t))&&this._requestReferencePositionUpdate(t,!0),this._view.mapCoordsHelper&&this._referencePosWGS84Comparable&&(this._referencePosWGS84Comparable[2]=t.z*this._view.mapCoordsHelper.unitInMeters,this._referencePosChanged())}_interactingStationaryHandler(){this._view.stationary&&this._executePendingReferencePositionUpdate()}_updateLighting(e){this.weatherEnabled||(this._oldWeatherType="sunny"),this._oldWeatherType||(this._oldWeatherType=this._view.environment.weather.type),this._isWeatherFading=!(this._oldWeatherType===this._view.environment.weather.type);const t=this._view,r=e||("virtual"!==t.environment.lighting.type?t.environment.lighting.date:null),i=this._referencePosWGS84Comparable,n=s(i)?D:q,o=this.weatherVisible?t.environment.weather.type:"disabled";s(i)?W(r,i,t.state.viewingMode,o,t.state.camera,t.environment.lighting.type,n):"virtual"===t.environment.lighting.type&&M(t.state.camera,t.state.viewingMode,n.direct.directionToLightSource);const a=this._mainLight,h=n.direct;m(a.intensity,h.color,h.intensity*Math.PI),g(a.direction,h.directionToLightSource),a.specularStrength=n.specularStrength,a.environmentStrength=n.environmentStrength;const d=this._ambientLight;m(d.intensity,n.ambient.color,n.ambient.intensity);const c=this._moonLight;f(c.intensity,I,F,n.globalFactor);const l=(1-.5*n.globalFactor)*(1-.4*n.noonFactor*(1-n.globalFactor));m(c.intensity,c.intensity,l),g(c.direction,h.directionToLightSource),t._stage.renderView.updateLightSources([a,d,c],n.noonFactor,n.globalFactor,this._isWeatherFading),this._updateRenderParameters(),this._oldWeatherType=this._view.environment.weather.type}_autoUpdateTimezone(e,t=null){if("virtual"===this._view.environment.lighting.type||!this._view.environment.lighting.cameraTrackingEnabled||o(e))return!1;const r=A;r.setTime((t||this._view.environment.lighting.date).getTime());const i=S(e,V);if(o(i))return!1;let n=this._view.environment.lighting.positionTimezoneInfo;if(n.autoUpdated){if(n.hours===i.hours&&n.minutes===i.minutes&&n.seconds===i.seconds)return!1}else n=i;const s=r.getUTCHours()-(i.hours-n.hours),a=r.getUTCMinutes()-(i.minutes-n.minutes),h=r.getUTCSeconds()-(i.seconds-n.seconds);return r.setUTCHours(s),r.setUTCMinutes(a),r.setUTCSeconds(h),!t&&this._view.environment.lighting.autoUpdate(r,i)}_updateRenderParameters(){const e=this._view._stage;if(!e)return;const r=a(this._referencePosWGS84Comparable,!0,(e=>G(e[2],this._view.state.viewingMode))),i=this._view.environment.background,n=i instanceof L?{type:"color",color:b(t.toUnitRGBA(i.color))}:{type:"color",color:w(0,0,0,1)};e.renderView.setRenderParameters({isWeatherFading:this._isWeatherFading,shadowMap:this._view.environment.lighting.directShadowsEnabled&&r,background:n,environment:this._view.environment,oldWeatherType:this._oldWeatherType,weatherVisible:this._view.environmentManager.weatherVisible})}_resetReferencePosition(e=!1){this._cancelReferencePosUpdates(),this._referencePosMapCoords=null,this._referencePosMapCoordsRequested=null,this._referencePosResetPreserveAbsoluteTime=null,this._referencePosWGS84Comparable=null,this.notifyChange("updating"),e&&this._cameraHandler()}_requestReferencePositionUpdate(e,t=!1){if(!this.disableQueries&&(this._referencePosMapCoordsRequested?this._referencePosMapCoordsRequested.copy(e):this._referencePosMapCoordsRequested=e.clone(),this._referencePosResetPreserveAbsoluteTime=!!t,!this._referencePosUpdateQuery&&!this._referencePosUpdateTimer&&this._view.stationary)){const e=this._referencePosUpdateQuery=h(this._referencePointUpdateDelay).then((()=>{if(this._referencePosUpdateQuery===e){const t=()=>this._referencePosUpdateQuery!==e;return this._doReferencePositionUpdateQuery(t)}})).catch((e=>{"mapcoordshelper:missing-geometry-service"===e.name&&(this.disableQueries=!0)})).then((()=>{this._referencePosUpdateQuery===e&&(this._referencePosUpdateQuery=null,this._referencePosUpdateTimer||this._executePendingReferencePositionUpdate(),this.notifyChange("updating"))})),t=this._referencePosUpdateTimer=h(this._referencePointUpdateInterval).then((()=>{this._referencePosUpdateTimer===t&&(this._referencePosUpdateTimer=null,this._referencePosUpdateQuery||this._executePendingReferencePositionUpdate())}));this.notifyChange("updating")}}async _doReferencePositionUpdateQuery(e){this._referencePosResetPreserveAbsoluteTime&&(this._preserveAbsoluteDateTime=!1),this._referencePosMapCoords?this._referencePosMapCoords.copy(this._referencePosMapCoordsRequested):this._referencePosMapCoords=this._referencePosMapCoordsRequested.clone(),this._referencePosResetPreserveAbsoluteTime=null,this._referencePosMapCoordsRequested=null;const t=await this._view.mapCoordsHelper.toGeographic(this._referencePosMapCoords);if(!e()&&!isNaN(t[0])&&!isNaN(t[1])){const e=this._referencePosMapCoords.z*this._view.mapCoordsHelper.unitInMeters;this._referencePosWGS84Comparable?(this._referencePosWGS84Comparable[0]=t[0],this._referencePosWGS84Comparable[1]=t[1],this._referencePosWGS84Comparable[2]=e):this._referencePosWGS84Comparable=[t[0],t[1],e],this._referencePosChanged()}}_executePendingReferencePositionUpdate(){const e=this._referencePosMapCoordsRequested;e&&this._requestReferencePositionUpdate(e,this._referencePosResetPreserveAbsoluteTime)}_referencePosChanged(){this._preserveAbsoluteDateTime?this._updateLighting():this._autoUpdateTimezone(this._referencePosWGS84Comparable)||this._updateLighting(),this.notifyChange("referencePositionWGS84Comparable")}_exceedsReferencePosDistThreshold(e){if(this._referencePosMapCoords){let t=this._referencePosMapCoords.distance(e);return this._view.mapCoordsHelper&&(t*=this._view.mapCoordsHelper.unitInMeters),t>this._referencePointUpdateDistThreshold}return!0}_cancelReferencePosUpdates(){const e=!!this._referencePosUpdateQuery;return this._referencePosUpdateQuery=null,this._referencePosUpdateTimer=null,e}get test(){const e=this;return{get renderer(){return e._renderer},set referencePointUpdateInterval(t){e._referencePointUpdateInterval=t},set referencePointUpdateDistThreshold(t){e._referencePointUpdateDistThreshold=t},set referencePosUpdateTimer(t){e._referencePosUpdateTimer=t},set referencePointUpdateDelay(t){e._referencePointUpdateDelay=t},set disableWeather(t){e._disableWeather=t}}}};e([p({type:Boolean,readOnly:!0})],Q.prototype,"updating",null),e([p()],Q.prototype,"disableQueries",void 0),e([p()],Q.prototype,"_disableWeather",void 0),e([p()],Q.prototype,"weatherEnabled",null),e([p()],Q.prototype,"weatherVisible",null),e([p()],Q.prototype,"referencePositionWGS84Comparable",null),e([p()],Q.prototype,"_renderer",void 0),e([p()],Q.prototype,"_referencePosWGS84Comparable",void 0),Q=e([_("esri.views.3d.environment.SceneViewEnvironmentManager")],Q);const D=new H,q=new H,A=new Date,V={hours:0,minutes:0,seconds:0},I=P(.22,.22,.33),F=P(.22,.22,.22);export{Q as SceneViewEnvironmentManager};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Color.js";import r from"../../../core/Evented.js";import i from"../../../core/Handles.js";import{destroyMaybe as n,isSome as s,isNone as o,mapOr as a}from"../../../core/maybe.js";import{after as h}from"../../../core/promiseUtils.js";import{watch as c,sync as d,syncAndInitial as l}from"../../../core/reactiveUtils.js";import{property as p}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as _}from"../../../core/accessorSupport/decorators/subclass.js";import{s as u,g as m,c as f,h as g}from"../../../chunks/vec3.js";import{c as P,f as v}from"../../../chunks/vec3f64.js";import{a as b,f as w}from"../../../chunks/vec4f64.js";import{canProjectToWGS84ComparableLonLat as C,projectPointToWGS84ComparableLonLat as y}from"../../../geometry/projection.js";import{isEarth as U}from"../../../geometry/support/spatialReferenceUtils.js";import{ViewingMode as T}from"../../ViewingMode.js";import{EnvironmentRenderer as R}from"./EnvironmentRenderer.js";import{positionToTimezoneInfo as S}from"../support/earthUtils.js";import{computeColorAndIntensity as M,computeVirtualLightDirection as H,ColorAndIntensity as W,computeShadowsEnabled as G}from"../support/sunUtils.js";import{Update as j}from"../webgl-engine/lib/Update.js";import{MainLight as L,AmbientLight as k,FillLight as E}from"../webgl-engine/lighting/Lightsources.js";import Q from"../../../webscene/background/ColorBackground.js";let D=class extends r.EventedAccessor{constructor(){super(),this._referencePointUpdateDelay=200,this._referencePointUpdateInterval=3e3,this._referencePointUpdateDistThreshold=1e6,this._referencePosUpdateQuery=null,this._referencePosMapCoordsRequested=null,this._viewHandles=new i,this._preserveAbsoluteDateTime=!1,this._trackingEnabled=!1,this._referencePosResetPreserveAbsoluteTime=!1,this._referencePosUpdateTimer=null,this._referencePosMapCoords=null,this._mainLight=new L,this._ambientLight=new k,this._moonLight=new E,this.disableQueries=!1,this._disableWeather=!1,this._renderer=null,this._referencePosWGS84Comparable=null,this._resetReferencePosition()}destroy(){this.disconnectView(),this._viewHandles.destroy()}get _view(){return this._renderer?.view}get updating(){return!((this.disableQueries||!this._referencePosUpdateQuery&&!this._referencePosMapCoordsRequested)&&!this._renderer?.updating)}get weatherEnabled(){return this._view?.environment.atmosphereEnabled&&!this._disableWeather&&this._view?.state?.viewingMode===T.Global&&U(this._view.spatialReference)}get weatherVisible(){return this.weatherEnabled&&this._renderer?.weatherVisible}get referencePositionWGS84Comparable(){return this._referencePosWGS84Comparable}connectView(e){if(this._renderer)return;this._renderer=new R({view:e});const t=()=>this._updateRenderParameters(),r=()=>this._cameraHandler();this._viewHandles.add([c((()=>e.environment.lighting),(e=>this._updateLightingHandler(e)),d),c((()=>"virtual"!==e.environment.lighting.type?e.environment.lighting.date:null),(e=>this._lightingDateHandler(e)),d),c((()=>e.stationary),(()=>this._interactingStationaryHandler())),c((()=>e.environment.lighting.directShadowsEnabled),t,d),c((()=>e.environment.lighting.ambientOcclusionEnabled),t,d),c((()=>e.environment.lighting.waterReflectionEnabled),t,d),c((()=>e.environment.background?.color),t,d),c((()=>e.spatialReference),(()=>this._resetReferencePosition(!0)),d),c((()=>e.environment.weather.type),(()=>this._updateLighting(null,j.Faded)),d),c((()=>this.weatherEnabled),(()=>this._updateLighting(null,j.Faded)),d),c((()=>e.viewingMode),(()=>this._resetReferencePosition(!0)),l),c((()=>"virtual"!==e.environment.lighting.type&&e.environment.lighting.cameraTrackingEnabled),(e=>this._updateCameraTracking(e)),l),c((()=>e.state.camera),r,l),c((()=>this.disableQueries),r)]),this._updateRenderParameters(),this._updateLighting(),this._cameraHandler(),this.notifyChange("updating")}disconnectView(){this._viewHandles.removeAll(),this._resetReferencePosition(),this._renderer=n(this._renderer)}_updateLightingHandler(e){this._updateCameraTracking("virtual"!==e.type&&e.cameraTrackingEnabled),this._lightingDateHandler("virtual"!==e.type?e.date:null),this._updateRenderParameters()}_updateCameraTracking(e){if(this._trackingEnabled=e,e)this._cameraHandler();else{const e=this._view.environment.lighting;"virtual"!==e?.type&&(e.positionTimezoneInfo.autoUpdated=!1)}}_lightingDateHandler(e){const t=this._view.environment.lighting;if("virtual"!==t?.type){if(e){if(!t.positionTimezoneInfo.autoUpdated){this._preserveAbsoluteDateTime=!0;const r=this._view.spatialReference;if(!C(r)){const e=this._view.camera.position;if(!this._referencePosMapCoords||!this._referencePosMapCoords.equals(e))return void this._requestReferencePositionUpdate(e)}if(this._preupdateTracking(e),s(this._referencePosWGS84Comparable)){const e=S(this._referencePosWGS84Comparable,V);s(e)&&(t.autoUpdate(null,e),this._trackingEnabled&&(t.positionTimezoneInfo.autoUpdated=!0))}}this._updateLighting(e)}}else this._updateLighting()}_preupdateTracking(e){!this._trackingEnabled&&"virtual"!==this._view.environment.lighting.type&&this._view.environment.lighting.cameraTrackingEnabled&&this._cameraHandler(e)}_cameraHandler(e=null){const t=this._view;if(!t.ready)return;const r=t.stateManager.camera;r&&(this._cameraHandlerClientSide(r,e)||this._cameraHandlerServerSide(r))}_cameraHandlerClientSide(e,t){const r=U(this._view.spatialReference);if(r&&!C(this._view.spatialReference))return"virtual"===this._view.environment.lighting.type&&this._updateLighting(),!1;const i=e.position;return o(this._referencePosWGS84Comparable)&&(this._referencePosWGS84Comparable=P()),r?y(i,this._referencePosWGS84Comparable):u(this._referencePosWGS84Comparable,i.longitude,i.latitude,i.z),this.notifyChange("referencePositionWGS84Comparable"),this._autoUpdateTimezone(this._referencePosWGS84Comparable,t)||this._updateLighting(t),!0}_cameraHandlerServerSide(e){const t=e.position;(!this._referencePosMapCoords||this._referencePosMapCoordsRequested||this._exceedsReferencePosDistThreshold(t))&&this._requestReferencePositionUpdate(t,!0),this._view.mapCoordsHelper&&this._referencePosWGS84Comparable&&(this._referencePosWGS84Comparable[2]=t.z*this._view.mapCoordsHelper.unitInMeters,this._referencePosChanged())}_interactingStationaryHandler(){this._view.stationary&&this._executePendingReferencePositionUpdate()}_updateLighting(e,t=j.Immediate){const r=this._view;e=e||("virtual"===r.environment.lighting.type?null:r.environment.lighting.date);const i=this._referencePosWGS84Comparable,n=s(i)?q:A,o=this.weatherVisible?r.environment.weather.type:"disabled";s(i)?M(e,i,r.state.viewingMode,o,r.state.camera,n):"virtual"===r.environment.lighting.type&&H(r.state.camera,r.state.viewingMode,n.direct.directionToLightSource);const a=this._mainLight,h=n.direct;m(a.intensity,h.color,h.intensity*Math.PI),f(a.direction,h.directionToLightSource),a.specularStrength=n.specularStrength,a.environmentStrength=n.environmentStrength;const c=this._ambientLight;m(c.intensity,n.ambient.color,n.ambient.intensity);const d=this._moonLight;g(d.intensity,z,x,n.globalFactor);const l=(1-.5*n.globalFactor)*(1-.4*n.noonFactor*(1-n.globalFactor));m(d.intensity,d.intensity,l),f(d.direction,h.directionToLightSource),r._stage.renderView.updateLightSources([a,c,d],n.noonFactor,n.globalFactor,t),this._updateRenderParameters()}_autoUpdateTimezone(e,t=null){if("virtual"===this._view.environment.lighting.type||!this._view.environment.lighting.cameraTrackingEnabled||o(e))return!1;const r=I;r.setTime((t||this._view.environment.lighting.date).getTime());const i=S(e,V);if(o(i))return!1;let n=this._view.environment.lighting.positionTimezoneInfo;if(n.autoUpdated){if(n.hours===i.hours&&n.minutes===i.minutes&&n.seconds===i.seconds)return!1}else n=i;const s=r.getUTCHours()-(i.hours-n.hours),a=r.getUTCMinutes()-(i.minutes-n.minutes),h=r.getUTCSeconds()-(i.seconds-n.seconds);return r.setUTCHours(s),r.setUTCMinutes(a),r.setUTCSeconds(h),!t&&this._view.environment.lighting.autoUpdate(r,i)}_updateRenderParameters(){const e=this._view._stage;if(!e)return;const r=a(this._referencePosWGS84Comparable,!0,(e=>G(e[2],this._view.state.viewingMode))),i=this._view.environment.background,n=i instanceof Q?{type:"color",color:b(t.toUnitRGBA(i.color))}:{type:"color",color:w(0,0,0,1)};e.renderView.setRenderParameters({shadowMap:this._view.environment.lighting.directShadowsEnabled&&r,background:n,environment:this._view.environment,weatherVisible:this._view.environmentManager.weatherVisible})}_resetReferencePosition(e=!1){this._cancelReferencePosUpdates(),this._referencePosMapCoords=null,this._referencePosMapCoordsRequested=null,this._referencePosResetPreserveAbsoluteTime=null,this._referencePosWGS84Comparable=null,this.notifyChange("updating"),e&&this._cameraHandler()}_requestReferencePositionUpdate(e,t=!1){if(!this.disableQueries&&(this._referencePosMapCoordsRequested?this._referencePosMapCoordsRequested.copy(e):this._referencePosMapCoordsRequested=e.clone(),this._referencePosResetPreserveAbsoluteTime=!!t,!this._referencePosUpdateQuery&&!this._referencePosUpdateTimer&&this._view.stationary)){const e=this._referencePosUpdateQuery=h(this._referencePointUpdateDelay).then((()=>{if(this._referencePosUpdateQuery===e){const t=()=>this._referencePosUpdateQuery!==e;return this._doReferencePositionUpdateQuery(t)}})).catch((e=>{"mapcoordshelper:missing-geometry-service"===e.name&&(this.disableQueries=!0)})).then((()=>{this._referencePosUpdateQuery===e&&(this._referencePosUpdateQuery=null,this._referencePosUpdateTimer||this._executePendingReferencePositionUpdate(),this.notifyChange("updating"))})),t=this._referencePosUpdateTimer=h(this._referencePointUpdateInterval).then((()=>{this._referencePosUpdateTimer===t&&(this._referencePosUpdateTimer=null,this._referencePosUpdateQuery||this._executePendingReferencePositionUpdate())}));this.notifyChange("updating")}}async _doReferencePositionUpdateQuery(e){this._referencePosResetPreserveAbsoluteTime&&(this._preserveAbsoluteDateTime=!1),this._referencePosMapCoords?this._referencePosMapCoords.copy(this._referencePosMapCoordsRequested):this._referencePosMapCoords=this._referencePosMapCoordsRequested.clone(),this._referencePosResetPreserveAbsoluteTime=null,this._referencePosMapCoordsRequested=null;const t=await this._view.mapCoordsHelper.toGeographic(this._referencePosMapCoords);if(!e()&&!isNaN(t[0])&&!isNaN(t[1])){const e=this._referencePosMapCoords.z*this._view.mapCoordsHelper.unitInMeters;this._referencePosWGS84Comparable?(this._referencePosWGS84Comparable[0]=t[0],this._referencePosWGS84Comparable[1]=t[1],this._referencePosWGS84Comparable[2]=e):this._referencePosWGS84Comparable=[t[0],t[1],e],this._referencePosChanged()}}_executePendingReferencePositionUpdate(){const e=this._referencePosMapCoordsRequested;e&&this._requestReferencePositionUpdate(e,this._referencePosResetPreserveAbsoluteTime)}_referencePosChanged(){this._preserveAbsoluteDateTime?this._updateLighting():this._autoUpdateTimezone(this._referencePosWGS84Comparable)||this._updateLighting(),this.notifyChange("referencePositionWGS84Comparable")}_exceedsReferencePosDistThreshold(e){if(this._referencePosMapCoords){let t=this._referencePosMapCoords.distance(e);return this._view.mapCoordsHelper&&(t*=this._view.mapCoordsHelper.unitInMeters),t>this._referencePointUpdateDistThreshold}return!0}_cancelReferencePosUpdates(){const e=!!this._referencePosUpdateQuery;return this._referencePosUpdateQuery=null,this._referencePosUpdateTimer=null,e}get test(){const e=this;return{get renderer(){return e._renderer},set referencePointUpdateInterval(t){e._referencePointUpdateInterval=t},set referencePointUpdateDistThreshold(t){e._referencePointUpdateDistThreshold=t},set referencePosUpdateTimer(t){e._referencePosUpdateTimer=t},set referencePointUpdateDelay(t){e._referencePointUpdateDelay=t},set disableWeather(t){e._disableWeather=t}}}};e([p({type:Boolean,readOnly:!0})],D.prototype,"updating",null),e([p()],D.prototype,"disableQueries",void 0),e([p()],D.prototype,"_disableWeather",void 0),e([p()],D.prototype,"weatherEnabled",null),e([p()],D.prototype,"weatherVisible",null),e([p()],D.prototype,"referencePositionWGS84Comparable",null),e([p()],D.prototype,"_renderer",void 0),e([p()],D.prototype,"_referencePosWGS84Comparable",void 0),D=e([_("esri.views.3d.environment.SceneViewEnvironmentManager")],D);const q=new W,A=new W,I=new Date,V={hours:0,minutes:0,seconds:0},z=v(.22,.22,.33),x=v(.22,.22,.22);export{D as SceneViewEnvironmentManager};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{lerp as e,clamp as t}from"../../../core/mathUtils.js";import{removeMaybe as s,disposeMaybe as r,isNone as i}from"../../../core/maybe.js";import{watch as a,syncAndInitial as o}from"../../../core/reactiveUtils.js";import{q as n}from"../../../chunks/mat4.js";import{c as h}from"../../../chunks/mat4f64.js";import{s as m}from"../../../chunks/vec2.js";import{l as c,g as u,a as p,i as _,f as d,p as l}from"../../../chunks/vec3.js";import{c as f}from"../../../chunks/vec3f64.js";import{getReferenceEllipsoid as g}from"../../../geometry/projectionEllipsoid.js";import{isMars as R}from"../../../geometry/support/spatialReferenceUtils.js";import{AtmosphereType as x}from"./AtmosphereType.js";import{computeInnerAltitudeFade as j,innerAtmosphereDepth as b}from"./atmosphereUtils.js";import{S as T}from"../../../chunks/SimpleAtmosphere.glsl.js";import{SimpleAtmosphereTechnique as V}from"./SimpleAtmosphereTechnique.js";import{SimpleAtmosphereTechniqueConfiguration as y,SimpleAtmosphereGeometry as q}from"./SimpleAtmosphereTechniqueConfiguration.js";import{marsAtmosphereTextureSimple as A}from"./resources/MarsAtmosphereTexture.js";import{earthAtmosphereTextureSimple as w}from"./resources/SimpleAtmosphereTexture.js";import{makePiecewiseLinearFunction as P}from"../support/mathUtils.js";import{glLayout as v}from"../support/buffer/glUtil.js";import{newLayout as C}from"../support/buffer/InterleavedLayout.js";import{Default3D as S}from"../webgl-engine/lib/DefaultVertexAttributeLocations.js";import{createQuadVAO as F}from"../webgl-engine/lib/glUtil3D.js";import{project as M}from"../webgl-engine/lib/Util.js";import{VertexArrayObject as U}from"../webgl-engine/lib/VertexArrayObject.js";import{VertexAttribute as I}from"../webgl-engine/lib/VertexAttribute.js";import{BufferObject as O}from"../../webgl/BufferObject.js";import{PixelFormat as E,PixelType as W,TextureWrapMode as k,TextureSamplingMode as L,PrimitiveType as N,Usage as D}from"../../webgl/enums.js";import{Texture as G}from"../../webgl/Texture.js";import{vertexCount as B}from"../../webgl/Util.js";const H=128,z=-b,Y=0,J=50,K=()=>1-511/512,Q=P([[50,.1015625],[500,.21875],[5e3,1-250/512],[5e4,.4140625]]);class X{constructor(e){this.view=e,this.type=x.Simple,this._passParameters=new T,this._fadeVaoCount=0,this._texV1=1,this._isOnMars=R(e.spatialReference);const t=g(e.spatialReference);this._planetRadius=t.radius,this._outerRimWidth=t.outerAtmosphereRimWidth,this._innerRimFactor=(this._planetRadius+z)/this._planetRadius,this._middleRimFactor=(this._planetRadius+Y)/this._planetRadius,this._outerRimFactor=(this._planetRadius+this._outerRimWidth)/this._planetRadius,this._texV0=Y/this._outerRimWidth,this._texVScale=this._texV1-this._texV0}destroy(){this._cameraChangeHandle=s(this._cameraChangeHandle),this._passParameters.texture=r(this._passParameters.texture),this._fadeVao=r(this._fadeVao),this._vao=r(this._vao)}async initializeRenderContext(e){this._shaderTechniqueRepository=e.shaderTechniqueRepository;const t=e.renderContext.rctx;this._cameraChangeHandle=a((()=>this.view.state?.camera),(()=>e.requestRender()),o),this._vao=this._createRibbon(t),this._vaoCount=B(this._vao,"geometry"),this._fadeVao=F(t),this._fadeVaoCount=B(this._fadeVao,"geometry");const s=this._isOnMars?A:w;this._passParameters.texture=new G(t,{pixelFormat:E.RGBA,dataType:W.UNSIGNED_BYTE,wrapMode:k.CLAMP_TO_EDGE,samplingMode:L.LINEAR,flipped:!0,width:1,height:512},s),e.requestRender()}get _coneTechnique(){if(i(this._coneTechniqueCached)){const e=new y;e.geometry=q.Cone,this._coneTechniqueCached=this._shaderTechniqueRepository.acquire(V,e)}return this._coneTechniqueCached}get _undergroundTechnique(){if(i(this._undergroundTechniqueCached)){const e=new y;e.geometry=q.Underground,this._undergroundTechniqueCached=this._shaderTechniqueRepository.acquire(V,e)}return this._undergroundTechniqueCached}render(e){if(i(this._vao)||i(this._passParameters.texture))return;const t=e.bindParameters.camera;this._update(t);const s=e.rctx;this._passParameters.undergroundFadeAlpha<1&&(s.bindTechnique(this._coneTechnique,this._passParameters,e.bindParameters),s.bindVAO(this._vao),s.drawArrays(N.TRIANGLES,0,this._vaoCount)),this._passParameters.undergroundFadeAlpha>0&&(s.bindTechnique(this._undergroundTechnique,this._passParameters,e.bindParameters),s.bindVAO(this._fadeVao),s.drawArrays(N.TRIANGLE_STRIP,0,this._fadeVaoCount))}renderHaze(){}_update(s){const r=f(),i=this._planetRadius,a=c(s.eye),o=a-i;if(o<0){const e=Math.min(-o/5e3,1);this._passParameters.undergroundFadeAlpha=e}else this._passParameters.undergroundFadeAlpha=0;const n=Math.max(J,o),h=i+z;this._passParameters.innerScale=se(i+n,i,h)-1,this._passParameters.altitudeFade=j(o),u(r,s.eye,(i+J)/a),Z(r,s.center,s.up,i,this._passParameters.silhouette);const p=this._computeScreenRimWidth(s,r,s.up,this._passParameters.silhouette),_=K(),d=Q(o);let l=this._texV0+_*this._texVScale,g=this._texV0+p*d*this._texVScale;if(o>J){Z(s.eye,s.center,s.up,i,this._passParameters.silhouette);const r=this._computeScreenRimWidth(s,s.eye,s.up,this._passParameters.silhouette),a=t((r-1.5)/(p-1.5),0,1);l=this._texV0+a*_*this._texVScale,g=this._texV0+e(this._texV1,p*d,a)*this._texVScale}m(this._passParameters.texV,l,g)}_createRibbon(e){const t=new Float32Array(3+3*H*3),s=new Uint32Array(3*H*5);t[0]=0,t[1]=0,t[2]=-1;for(let a=0;a<H;a++){const e=9*a+3;t[e+0]=a,t[e+1]=this._innerRimFactor,t[e+2]=-1,t[e+3]=a,t[e+4]=this._middleRimFactor,t[e+5]=0,t[e+6]=a,t[e+7]=this._outerRimFactor,t[e+8]=1;const r=3*a+1,i=a===H-1?1:r+3,o=15*a;s[o+0]=r,s[o+1]=r+1,s[o+2]=i+1,s[o+3]=i+1,s[o+4]=i,s[o+5]=r,s[o+6]=r+1,s[o+7]=r+2,s[o+8]=i+2,s[o+9]=i+2,s[o+10]=i+1,s[o+11]=r+1,s[o+12]=r,s[o+13]=i,s[o+14]=0}const r=re.createBuffer(s.length),i=r.position;for(let a=0;a<s.length;++a){const e=3*s[a];i.set(a,0,t[e]),i.set(a,1,t[e+1]),i.set(a,2,t[e+2])}return new U(e,S,{geometry:v(re)},{geometry:O.createVertex(e,D.STATIC_DRAW,r.buffer)})}_computeScreenRimWidth(e,t,s,r){return p(ee,r.center,r.v2),u(te,ee,this._outerRimFactor),n($,t,ee,s),M(ee,$,e.projectionMatrix,e.viewport),M(te,$,e.projectionMatrix,e.viewport),_(ee,te)/e.height}}function Z(e,t,s,r,i){const a=c(e),o=r*Math.sqrt(a*a-r*r)/a,n=Math.sqrt(r*r-o*o),h=i.v1,m=i.v2;return u(i.center,e,n/a),d(h,e,t),l(h)<1&&d(h,e,s),u(h,h,o/c(h)),d(m,h,e),u(m,m,o/c(m)),o}const $=h(),ee=f(),te=f();function se(e,t,s){return e*e/(Math.sqrt(e*e-t*t)*Math.sqrt(e*e-s*s)+t*s)}const re=C().vec3f(I.POSITION);export{X as default};
5
+ import{lerp as e,clamp as t}from"../../../core/mathUtils.js";import{removeMaybe as s,disposeMaybe as r,isNone as i}from"../../../core/maybe.js";import{watch as a,syncAndInitial as o}from"../../../core/reactiveUtils.js";import{q as n}from"../../../chunks/mat4.js";import{c as h}from"../../../chunks/mat4f64.js";import{s as m}from"../../../chunks/vec2.js";import{l as c,g as u,a as p,i as _,f as d,z as l}from"../../../chunks/vec3.js";import{c as f}from"../../../chunks/vec3f64.js";import{getReferenceEllipsoid as g}from"../../../geometry/projectionEllipsoid.js";import{isMars as R}from"../../../geometry/support/spatialReferenceUtils.js";import{AtmosphereType as x}from"./AtmosphereType.js";import{computeInnerAltitudeFade as j,innerAtmosphereDepth as b}from"./atmosphereUtils.js";import{S as T}from"../../../chunks/SimpleAtmosphere.glsl.js";import{SimpleAtmosphereTechnique as V}from"./SimpleAtmosphereTechnique.js";import{SimpleAtmosphereTechniqueConfiguration as y,SimpleAtmosphereGeometry as q}from"./SimpleAtmosphereTechniqueConfiguration.js";import{marsAtmosphereTextureSimple as A}from"./resources/MarsAtmosphereTexture.js";import{earthAtmosphereTextureSimple as w}from"./resources/SimpleAtmosphereTexture.js";import{makePiecewiseLinearFunction as P}from"../support/mathUtils.js";import{glLayout as v}from"../support/buffer/glUtil.js";import{newLayout as C}from"../support/buffer/InterleavedLayout.js";import{Default3D as S}from"../webgl-engine/lib/DefaultVertexAttributeLocations.js";import{createQuadVAO as F}from"../webgl-engine/lib/glUtil3D.js";import{project as M}from"../webgl-engine/lib/Util.js";import{VertexArrayObject as U}from"../webgl-engine/lib/VertexArrayObject.js";import{VertexAttribute as I}from"../webgl-engine/lib/VertexAttribute.js";import{BufferObject as O}from"../../webgl/BufferObject.js";import{PixelFormat as E,PixelType as W,TextureWrapMode as k,TextureSamplingMode as L,PrimitiveType as N,Usage as D}from"../../webgl/enums.js";import{Texture as G}from"../../webgl/Texture.js";import{vertexCount as B}from"../../webgl/Util.js";const H=128,z=-b,Y=0,J=50,K=()=>1-511/512,Q=P([[50,.1015625],[500,.21875],[5e3,1-250/512],[5e4,.4140625]]);class X{constructor(e){this.view=e,this.type=x.Simple,this._passParameters=new T,this._fadeVaoCount=0,this._texV1=1,this._isOnMars=R(e.spatialReference);const t=g(e.spatialReference);this._planetRadius=t.radius,this._outerRimWidth=t.outerAtmosphereRimWidth,this._innerRimFactor=(this._planetRadius+z)/this._planetRadius,this._middleRimFactor=(this._planetRadius+Y)/this._planetRadius,this._outerRimFactor=(this._planetRadius+this._outerRimWidth)/this._planetRadius,this._texV0=Y/this._outerRimWidth,this._texVScale=this._texV1-this._texV0}destroy(){this._cameraChangeHandle=s(this._cameraChangeHandle),this._passParameters.texture=r(this._passParameters.texture),this._fadeVao=r(this._fadeVao),this._vao=r(this._vao)}async initializeRenderContext(e){this._shaderTechniqueRepository=e.shaderTechniqueRepository;const t=e.renderContext.rctx;this._cameraChangeHandle=a((()=>this.view.state?.camera),(()=>e.requestRender()),o),this._vao=this._createRibbon(t),this._vaoCount=B(this._vao,"geometry"),this._fadeVao=F(t),this._fadeVaoCount=B(this._fadeVao,"geometry");const s=this._isOnMars?A:w;this._passParameters.texture=new G(t,{pixelFormat:E.RGBA,dataType:W.UNSIGNED_BYTE,wrapMode:k.CLAMP_TO_EDGE,samplingMode:L.LINEAR,flipped:!0,width:1,height:512},s),e.requestRender()}get _coneTechnique(){if(i(this._coneTechniqueCached)){const e=new y;e.geometry=q.Cone,this._coneTechniqueCached=this._shaderTechniqueRepository.acquire(V,e)}return this._coneTechniqueCached}get _undergroundTechnique(){if(i(this._undergroundTechniqueCached)){const e=new y;e.geometry=q.Underground,this._undergroundTechniqueCached=this._shaderTechniqueRepository.acquire(V,e)}return this._undergroundTechniqueCached}render(e){if(i(this._vao)||i(this._passParameters.texture))return;const t=e.bindParameters.camera;this._update(t);const s=e.rctx;this._passParameters.undergroundFadeAlpha<1&&(s.bindTechnique(this._coneTechnique,this._passParameters,e.bindParameters),s.bindVAO(this._vao),s.drawArrays(N.TRIANGLES,0,this._vaoCount)),this._passParameters.undergroundFadeAlpha>0&&(s.bindTechnique(this._undergroundTechnique,this._passParameters,e.bindParameters),s.bindVAO(this._fadeVao),s.drawArrays(N.TRIANGLE_STRIP,0,this._fadeVaoCount))}renderHaze(){}_update(s){const r=f(),i=this._planetRadius,a=c(s.eye),o=a-i;if(o<0){const e=Math.min(-o/5e3,1);this._passParameters.undergroundFadeAlpha=e}else this._passParameters.undergroundFadeAlpha=0;const n=Math.max(J,o),h=i+z;this._passParameters.innerScale=se(i+n,i,h)-1,this._passParameters.altitudeFade=j(o),u(r,s.eye,(i+J)/a),Z(r,s.center,s.up,i,this._passParameters.silhouette);const p=this._computeScreenRimWidth(s,r,s.up,this._passParameters.silhouette),_=K(),d=Q(o);let l=this._texV0+_*this._texVScale,g=this._texV0+p*d*this._texVScale;if(o>J){Z(s.eye,s.center,s.up,i,this._passParameters.silhouette);const r=this._computeScreenRimWidth(s,s.eye,s.up,this._passParameters.silhouette),a=t((r-1.5)/(p-1.5),0,1);l=this._texV0+a*_*this._texVScale,g=this._texV0+e(this._texV1,p*d,a)*this._texVScale}m(this._passParameters.texV,l,g)}_createRibbon(e){const t=new Float32Array(3+3*H*3),s=new Uint32Array(3*H*5);t[0]=0,t[1]=0,t[2]=-1;for(let a=0;a<H;a++){const e=9*a+3;t[e+0]=a,t[e+1]=this._innerRimFactor,t[e+2]=-1,t[e+3]=a,t[e+4]=this._middleRimFactor,t[e+5]=0,t[e+6]=a,t[e+7]=this._outerRimFactor,t[e+8]=1;const r=3*a+1,i=a===H-1?1:r+3,o=15*a;s[o+0]=r,s[o+1]=r+1,s[o+2]=i+1,s[o+3]=i+1,s[o+4]=i,s[o+5]=r,s[o+6]=r+1,s[o+7]=r+2,s[o+8]=i+2,s[o+9]=i+2,s[o+10]=i+1,s[o+11]=r+1,s[o+12]=r,s[o+13]=i,s[o+14]=0}const r=re.createBuffer(s.length),i=r.position;for(let a=0;a<s.length;++a){const e=3*s[a];i.set(a,0,t[e]),i.set(a,1,t[e+1]),i.set(a,2,t[e+2])}return new U(e,S,{geometry:v(re)},{geometry:O.createVertex(e,D.STATIC_DRAW,r.buffer)})}_computeScreenRimWidth(e,t,s,r){return p(ee,r.center,r.v2),u(te,ee,this._outerRimFactor),n($,t,ee,s),M(ee,$,e.projectionMatrix,e.viewport),M(te,$,e.projectionMatrix,e.viewport),_(ee,te)/e.height}}function Z(e,t,s,r,i){const a=c(e),o=r*Math.sqrt(a*a-r*r)/a,n=Math.sqrt(r*r-o*o),h=i.v1,m=i.v2;return u(i.center,e,n/a),d(h,e,t),l(h)<1&&d(h,e,s),u(h,h,o/c(h)),d(m,h,e),u(m,m,o/c(m)),o}const $=h(),ee=f(),te=f();function se(e,t,s){return e*e/(Math.sqrt(e*e-t*t)*Math.sqrt(e*e-s*s)+t*s)}const re=C().vec3f(I.POSITION);export{X as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{clamp as a}from"../../../core/mathUtils.js";import{e as t}from"../../../chunks/mat4.js";import{c as o}from"../../../chunks/mat4f64.js";import{l as e,F as n,n as i,g as r,c as s,b as g}from"../../../chunks/vec3.js";import{f as d,c}from"../../../chunks/vec3f64.js";import{create as F,fromPoints as f,axis as l}from"../../../geometry/support/axisAngleDegrees.js";import{FadeInStages as I,FadeInOutStages as h,FadeHeightStages as m}from"./CloudsCompositionParameters.js";import{CloudsRenderingStages as u,ensureClouds as C}from"./CloudsData.js";import{weatherHeightLimit as N}from"./weather.js";function E(t){const o=t.cloudsFadingComposition,e=performance.now(),n=o.parallax.anchorPointClouds;o.fadeIn.stage===I.FINISHED&&(o.fadeIn.factor=1,s(n,W),o.fadeIn.stage=I.CHANGE_ANCHOR,o.crossFade.enabled=!1,o.fadeInOut.stage=h.FINISHED),o.fadeIn.stage===I.CHANGE_ANCHOR&&o.isCameraPositionFinal&&C(o.data)&&o.renderingStage!==u.RENDERING&&(s(n,W),o.fadeIn.stage=I.FADE_IN,o.startTime=e,o.renderingStage=u.SWITCH_CHANNELS),o.fadeIn.factor>0&&o.fadeIn.stage===I.FADE_IN?o.fadeIn.factor=a(1-(e-o.startTime)/x,0,1):o.fadeIn.factor<=0&&o.fadeIn.stage===I.FADE_IN&&(o.fadeIn.stage=I.FINISHED,o.fadeIn.factor=0,!0===t.lightingFogFading.isWeatherFading&&(t.lightingFogFading.isWeatherFading=!1))}function H(t){const o=t.cloudsFadingComposition,e=performance.now(),{fadeInOut:n,crossFade:i}=o;n.stage===h.FINISHED&&(o.startTime=e,n.factor=0,n.stage=h.FADE_OUT),n.factor<1&&n.stage===h.FADE_OUT?n.factor=a((e-o.startTime)/b,0,1):(n.factor>=1&&n.stage===h.FADE_OUT&&(n.factor=1,s(o.parallax.anchorPointClouds,W)),n.factor>=1&&n.stage===h.FADE_OUT&&o.isCameraPositionFinal&&(n.factor=1,n.stage=h.SWITCH,o.crossFade.enabled=!1,i.factor=1),C(o.data)&&n.stage===h.SWITCH&&o.renderingStage!==u.RENDERING&&(o.startTime=e,n.factor=1,n.stage=h.FADE_IN,s(o.parallax.anchorPointClouds,W),o.crossFade.enabled=!1,i.factor=1,o.renderingStage=u.SWITCH_CHANNELS),n.factor>0&&n.stage===h.FADE_IN?n.factor=a(1-(e-o.startTime)/x,0,1):n.factor<=0&&n.stage===h.FADE_IN&&(n.stage=h.FINISHED,n.factor=0,!0===t.lightingFogFading.isWeatherFading&&(t.lightingFogFading.isWeatherFading=!1)))}function p(t){const o=t.cloudsFadingComposition,e=performance.now(),{crossFade:n}=o,i=o.parallax.anchorPointClouds;o.crossFade.enabled||(s(o.parallaxNew.anchorPointClouds,W),o.startTime=e,n.factor=0,o.crossFade.enabled=!0),n.factor<1&&o.crossFade.enabled?n.factor=a((e-o.startTime)/L,0,1):n.factor>=1&&o.crossFade.enabled&&(o.crossFade.enabled=!1,n.factor=1,s(i,o.parallaxNew.anchorPointClouds),o.renderingStage===u.FADING_TEXTURE_CHANNELS&&(o.renderingStage=u.SWITCH_CHANNELS),!0===t.lightingFogFading.isWeatherFading&&(t.lightingFogFading.isWeatherFading=!1))}function S(t,o){const e=t.cloudsFadingComposition,n=performance.now(),i=e.fadeInOutHeight,r=(n-(i.stage===m.FINISHED?n:e.startTimeHeightFade))/R;i.factor+=o?-r:r,e.startTimeHeightFade=n,i.factor=a(i.factor,0,1),i.stage=m.HEIGHT_FADE}function D(t){t.cloudsFadingComposition.fadeIn.stage!==I.FADE_IN?t.cloudsFadingComposition.fadeInOut.stage!==h.FADE_IN?t.cloudsFadingComposition.crossFade.enabled?t.lightingFogFading.fadingFactor=a(t.cloudsFadingComposition.crossFade.factor,0,1):t.lightingFogFading.fadingFactor=0:t.lightingFogFading.fadingFactor=1-Math.max(a(t.cloudsFadingComposition.fadeInOut.factor,0,1)):t.lightingFogFading.fadingFactor=1-Math.max(a(t.cloudsFadingComposition.fadeIn.factor,0,1))}function T(a,d,c,F){const T=a.cloudsFadingComposition;T.renderingStage===u.FINISHED_RENDERING&&(T.renderingStage=u.FADING_TEXTURE_CHANNELS);const{parallax:A}=T;T.fadeInOutHeight.factor<0&&(T.fadeInOutHeight.factor=e(d)-F>N?1:0),T.isCameraPositionFinal=n(T.cameraPositionLastFrame,d),i(W,d),r(W,W,F),0===A.anchorPointClouds[0]&&0===A.anchorPointClouds[1]&&0===A.anchorPointClouds[2]&&s(A.anchorPointClouds,W);const _=e(g(w,A.anchorPointClouds,W));let x=!0;_>T.fadeIn.distanceThresholdFactor*A.cloudsHeight||T.fadeIn.stage!==I.FINISHED?E(a):_>T.fadeInOut.distanceThresholdFactor*A.cloudsHeight||T.fadeInOut.stage!==h.FINISHED?H(a):(_>T.crossFade.distanceThresholdFactor*A.cloudsHeight&&!c||T.crossFade.enabled)&&C(T.data)||T.renderingStage===u.FADING_TEXTURE_CHANNELS?p(a):x=!1;const b=e(d),L=b-F;if((L>1.7*N||L<-N)&&T.fadeInOutHeight.factor<1?T.fadeInOutHeight.factor=1:(L>N||L<-.35*N)&&T.fadeInOutHeight.factor<1?S(a,!1):L<N&&L>-.35*N&&T.fadeInOutHeight.factor>0?S(a,!0):T.fadeInOutHeight.stage=m.FINISHED,T.renderingStage===u.SWITCH_CHANNELS&&(T.readChannels=1-T.readChannels,T.renderingStage=u.FINISHED),a.lightingFogFading.isWeatherFading&&D(a),A.radiusCurvatureCorrectionFactor=.84*Math.sqrt(Math.max(b*b-F*F,0))/b,f(O,A.anchorPointClouds,P),A.transform=o(),t(A.transform,A.transform,P[3],l(P)),x){const{parallaxNew:a}=T;f(O,a.anchorPointClouds,P),a.transform=o(),t(a.transform,a.transform,P[3],l(P))}s(T.cameraPositionLastFrame,d)}function A(a){return a.cloudsFadingComposition.crossFade.enabled||a.cloudsFadingComposition.fadeInOut.stage!==h.FINISHED||a.cloudsFadingComposition.fadeIn.stage!==I.FINISHED||a.cloudsFadingComposition.fadeInOutHeight.stage!==m.FINISHED||a.cloudsFadingComposition.renderingStage!==u.FINISHED}function _(a){if(!a.weatherParameter.lightingFogFading.isWeatherFading)return;const t=a.weatherParameter.lightingFogFading.lightingOld,o=a.weatherParameter.lightingFogFading.lightingNew,e=a.weatherParameter.lightingFogFading.fadingFactor;a.lighting.setLerpLighting(t,o,e)}const O=d(0,0,1),P=F(),W=c(),w=c(),x=500,b=250,L=650,R=500;export{_ as lerpLightingFadingParameters,T as setWeatherFadingParallaxParameters,A as weatherfadingNeedsRender};
5
+ import{clamp as a}from"../../../core/mathUtils.js";import{e}from"../../../chunks/mat4.js";import{l as t,F as r,n as o,g as s,c as n,b as d}from"../../../chunks/vec3.js";import{f as i,c}from"../../../chunks/vec3f64.js";import{I as f}from"../../../chunks/mat4f64.js";import{create as g,fromPoints as I,axis as l}from"../../../geometry/support/axisAngleDegrees.js";import{earth as F}from"../../../geometry/support/Ellipsoid.js";import{FadeInStages as u,FadeInOutStages as N,FadeHeightStages as E}from"./CloudsCompositionParameters.js";import{CloudsRenderingStages as h,ensureClouds as m}from"./CloudsData.js";import{weatherHeightLimit as H}from"./weather.js";function S(e,t){const r=e.parallax.anchorPointClouds;e.fadeIn.stage===u.FINISHED&&(e.fadeIn.factor=1,n(r,L),e.fadeIn.stage=u.CHANGE_ANCHOR,e.crossFade.enabled=!1,e.fadeInOut.stage=N.FINISHED),e.fadeIn.stage===u.CHANGE_ANCHOR&&e.isCameraPositionFinal&&m(e.data)&&e.renderingStage!==h.RENDERING&&(n(r,L),e.fadeIn.stage=u.FADE_IN,e.startTime=t,e.renderingStage=h.SWITCH_CHANNELS),e.fadeIn.factor>0&&e.fadeIn.stage===u.FADE_IN?e.fadeIn.factor=a(1-(t-e.startTime)/R,0,1):e.fadeIn.factor<=0&&e.fadeIn.stage===u.FADE_IN&&(e.fadeIn.stage=u.FINISHED,e.fadeIn.factor=0)}function C(e,t){const{fadeInOut:r,crossFade:o}=e;r.stage===N.FINISHED&&(e.startTime=t,r.factor=0,r.stage=N.FADE_OUT),r.factor<1&&r.stage===N.FADE_OUT?r.factor=a((t-e.startTime)/b,0,1):(r.factor>=1&&r.stage===N.FADE_OUT&&(r.factor=1,n(e.parallax.anchorPointClouds,L)),r.factor>=1&&r.stage===N.FADE_OUT&&e.isCameraPositionFinal&&(r.factor=1,r.stage=N.SWITCH,e.crossFade.enabled=!1,o.factor=1),m(e.data)&&r.stage===N.SWITCH&&e.renderingStage!==h.RENDERING&&(e.startTime=t,r.factor=1,r.stage=N.FADE_IN,n(e.parallax.anchorPointClouds,L),e.crossFade.enabled=!1,o.factor=1,e.renderingStage=h.SWITCH_CHANNELS),r.factor>0&&r.stage===N.FADE_IN?r.factor=a(1-(t-e.startTime)/R,0,1):r.factor<=0&&r.stage===N.FADE_IN&&(r.stage=N.FINISHED,r.factor=0))}function D(e,t){const{crossFade:r}=e,o=e.parallax.anchorPointClouds;e.crossFade.enabled||(n(e.parallaxNew.anchorPointClouds,L),e.startTime=t,r.factor=0,e.crossFade.enabled=!0),r.factor<1&&e.crossFade.enabled?r.factor=a((t-e.startTime)/j,0,1):r.factor>=1&&e.crossFade.enabled&&(e.crossFade.enabled=!1,r.factor=1,n(o,e.parallaxNew.anchorPointClouds),e.renderingStage===h.FADING_TEXTURE_CHANNELS&&(e.renderingStage=h.SWITCH_CHANNELS))}function T(e,t,r){const o=e.fadeInOutHeight,s=(r-(o.stage===E.FINISHED?r:e.startTimeHeightFade))/G;o.factor+=t?-s:s,e.startTimeHeightFade=r,o.factor=a(o.factor,0,1),o.stage=E.HEIGHT_FADE}function A(e){if(!e.lightingFading)return;const t=e.cloudsFade;return t.fadeIn.stage===u.FADE_IN?e.fadeLighting(1-Math.max(a(t.fadeIn.factor,0,1))):t.fadeInOut.stage===N.FADE_IN?e.fadeLighting(1-Math.max(a(t.fadeInOut.factor,0,1))):t.crossFade.enabled?e.fadeLighting(a(t.crossFade.factor,0,1)):t.renderingStage===h.RENDERING?e.fadeLighting(0):void e.fadeLighting(1)}function _(a,i,c,g){a.renderingStage===h.FINISHED_RENDERING&&(a.renderingStage=h.FADING_TEXTURE_CHANNELS);const A=t(i.eye);a.fadeInOutHeight.factor<0&&(a.fadeInOutHeight.factor=A-F.radius>H?1:0),a.isCameraPositionFinal=r(a.cameraPositionLastFrame,i.eye),o(L,i.eye),s(L,L,F.radius);const _=a.parallax;0===_.anchorPointClouds[0]&&0===_.anchorPointClouds[1]&&0===_.anchorPointClouds[2]&&n(_.anchorPointClouds,L);const p=t(d(x,_.anchorPointClouds,L));let R=!0;p>a.fadeIn.distanceThresholdFactor*_.cloudsHeight||a.fadeIn.stage!==u.FINISHED?S(a,g):p>a.fadeInOut.distanceThresholdFactor*_.cloudsHeight||a.fadeInOut.stage!==N.FINISHED?C(a,g):(p>a.crossFade.distanceThresholdFactor*_.cloudsHeight&&!c||a.crossFade.enabled)&&m(a.data)||a.renderingStage===h.FADING_TEXTURE_CHANNELS?D(a,g):R=!1;const b=A-F.radius;if((b>1.7*H||b<-H)&&a.fadeInOutHeight.factor<1?a.fadeInOutHeight.factor=1:(b>H||b<-.35*H)&&a.fadeInOutHeight.factor<1?T(a,!1,g):b<H&&b>-.35*H&&a.fadeInOutHeight.factor>0?T(a,!0,g):a.fadeInOutHeight.stage=E.FINISHED,a.renderingStage===h.SWITCH_CHANNELS&&(a.readChannels=1-a.readChannels,a.renderingStage=h.FINISHED),_.radiusCurvatureCorrectionFactor=.84*Math.sqrt(Math.max(A*A-F.radius*F.radius,0))/A,I(O,_.anchorPointClouds,P),e(_.transform,f,P[3],l(P)),R){const{parallaxNew:t}=a;I(O,t.anchorPointClouds,P),e(t.transform,f,P[3],l(P))}n(a.cameraPositionLastFrame,i.eye)}function p(a){return a.crossFade.enabled||a.fadeInOut.stage!==N.FINISHED||a.fadeIn.stage!==u.FINISHED||a.fadeInOutHeight.stage!==E.FINISHED||a.renderingStage!==h.FINISHED}const O=i(0,0,1),P=g(),L=c(),x=c(),R=500,b=250,j=650,G=500;export{A as updateLightFading,_ as updateWeatherFadingParameters,p as weatherfadingNeedsRender};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Collection.js";import t from"../../../core/Logger.js";import{watch as r,initial as n}from"../../../core/reactiveUtils.js";import{c as s}from"../../../chunks/vec3.js";import i from"./RenderContext.js";import{ShaderOutput as d}from"../webgl-engine/core/shaderLibrary/ShaderOutput.js";import{RenderSlot as o}from"../webgl-engine/lib/RenderSlot.js";class a{constructor(){this._renderers=new e}add(e,t){this._findOrCreateStageRenderer(e).add(t)}remove(e,t){const r=this._findStageRenderer(e);r&&r.remove(t),0===r.renderers.length&&(r.destroy(),this._renderers.remove(r))}_findStageRenderer(e){return this._renderers.find((t=>t.view===e))}_findOrCreateStageRenderer(e){let t=this._findStageRenderer(e);return t||(t=new h(e),this._renderers.add(t)),t}}class h{constructor(t){this.view=t,this.canRender=!0,this.renderers=new e,this._readyWatchHandle=r((()=>t.ready),(e=>{e?(this.context=new i(this.view),this.view._stage.addRenderPlugin([o.OPAQUE_MATERIAL,o.TRANSPARENT_MATERIAL],this)):(this.renderers.forEach((e=>c(e,"dispose",this.context))),this.context=null)}),n)}destroy(){this.renderers.drain((e=>{this.context&&c(e,"dispose",this.context)})),this.view._stage&&this.view._stage.removeRenderPlugin(this),this._readyWatchHandle&&(this._readyWatchHandle.remove(),this._readyWatchHandle=null),this.context=null}add(e){this.renderers.includes(e)?t.getLogger("esri.views.3d.externalRenderers.ExternalRendererStore").warn("add(): Cannot add external renderer: renderer has already been added"):(this.renderers.add(e),this.context&&(this._webglStateReset(),c(e,"setup",this.context),this.view._stage.renderView.requestRender()))}remove(e){const t=this.renderers.indexOf(e);-1!==t&&(this.renderers.removeAt(t),this.context&&(c(e,"dispose",this.context),this.view._stage.renderView.requestRender()))}initializeRenderContext(e){this.context.rctx=e.renderContext.rctx,this.renderers.length>0&&this._webglStateReset(),this.renderers.forEach((e=>c(e,"setup",this.context)))}uninitializeRenderContext(){}render(e){0===this.renderers.length||e.output!==d.Color||e.bindParameters.slot!==o.OPAQUE_MATERIAL&&e.bindParameters.slot!==o.TRANSPARENT_MATERIAL||(this._updateContext(e),this._webglStateReset(),this.renderers.forEach((t=>{switch(e.bindParameters.slot){case o.OPAQUE_MATERIAL:c(t,"render",this.context);break;case o.TRANSPARENT_MATERIAL:c(t,"renderTransparent",this.context)}})))}_updateContext(e){this.context.camera.copyFrom(e.bindParameters.camera),s(this.context.sunLight.direction,e.bindParameters.lighting.old.direction),s(this.context.sunLight.diffuse.color,e.bindParameters.lighting.old.diffuse.color),s(this.context.sunLight.ambient.color,e.bindParameters.lighting.old.ambient.color),this.context._renderTargetHelper=e.offscreenRenderingHelper}_webglStateReset(){this.context.rctx.resetState(),this.context._renderTargetHelper?.bindFramebuffer()}get needsTransparentPass(){return this.renderers.some((e=>"function"==typeof e.renderTransparent))}}function c(e,t,r){"function"==typeof e[t]&&e[t](r)}export{a as default};
5
+ import e from"../../../core/Collection.js";import t from"../../../core/Logger.js";import{watch as r,initial as n}from"../../../core/reactiveUtils.js";import s from"./RenderContext.js";import{ShaderOutput as i}from"../webgl-engine/core/shaderLibrary/ShaderOutput.js";import{RenderSlot as d}from"../webgl-engine/lib/RenderSlot.js";class a{constructor(){this._renderers=new e}add(e,t){this._findOrCreateStageRenderer(e).add(t)}remove(e,t){const r=this._findStageRenderer(e);r&&r.remove(t),0===r.renderers.length&&(r.destroy(),this._renderers.remove(r))}_findStageRenderer(e){return this._renderers.find((t=>t.view===e))}_findOrCreateStageRenderer(e){let t=this._findStageRenderer(e);return t||(t=new o(e),this._renderers.add(t)),t}}class o{constructor(t){this.view=t,this.canRender=!0,this.renderers=new e,this._readyWatchHandle=r((()=>t.ready),(e=>{e?(this.context=new s(this.view),this.view._stage.addRenderPlugin([d.OPAQUE_MATERIAL,d.TRANSPARENT_MATERIAL],this)):(this.renderers.forEach((e=>h(e,"dispose",this.context))),this.context=null)}),n)}destroy(){this.renderers.drain((e=>{this.context&&h(e,"dispose",this.context)})),this.view._stage&&this.view._stage.removeRenderPlugin(this),this._readyWatchHandle&&(this._readyWatchHandle.remove(),this._readyWatchHandle=null),this.context=null}add(e){this.renderers.includes(e)?t.getLogger("esri.views.3d.externalRenderers.ExternalRendererStore").warn("add(): Cannot add external renderer: renderer has already been added"):(this.renderers.add(e),this.context&&(this._webglStateReset(),h(e,"setup",this.context),this.view._stage.renderView.requestRender()))}remove(e){const t=this.renderers.indexOf(e);-1!==t&&(this.renderers.removeAt(t),this.context&&(h(e,"dispose",this.context),this.view._stage.renderView.requestRender()))}initializeRenderContext(e){this.context.rctx=e.renderContext.rctx,this.renderers.length>0&&this._webglStateReset(),this.renderers.forEach((e=>h(e,"setup",this.context)))}uninitializeRenderContext(){}render(e){0===this.renderers.length||e.output!==i.Color||e.bindParameters.slot!==d.OPAQUE_MATERIAL&&e.bindParameters.slot!==d.TRANSPARENT_MATERIAL||(this._updateContext(e),this._webglStateReset(),this.renderers.forEach((t=>{switch(e.bindParameters.slot){case d.OPAQUE_MATERIAL:h(t,"render",this.context);break;case d.TRANSPARENT_MATERIAL:h(t,"renderTransparent",this.context)}})))}_updateContext(e){this.context.camera.copyFrom(e.bindParameters.camera),this.context.sunLight=e.bindParameters.lighting.legacy,this.context._renderTargetHelper=e.offscreenRenderingHelper}_webglStateReset(){this.context.rctx.resetState(),this.context._renderTargetHelper?.bindFramebuffer()}get needsTransparentPass(){return this.renderers.some((e=>"function"==typeof e.renderTransparent))}}function h(e,t,r){"function"==typeof e[t]&&e[t](r)}export{a as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{c as e}from"../../../chunks/vec3f64.js";import{Camera as r}from"../webgl-engine/lib/Camera.js";class t{constructor(t){this.view=t,this.camera=new r,this.sunLight={direction:e(),ambient:{color:e(),intensity:1},diffuse:{color:e(),intensity:1}},this._renderTargetHelper=null}get gl(){return this.rctx.gl}resetWebGLState(){null!=this.rctx&&(this.rctx.enforceState(),this._renderTargetHelper&&this._renderTargetHelper.bindFramebuffer())}bindRenderTarget(){this._renderTargetHelper&&this._renderTargetHelper.framebuffer.initializeAndBind()}}export{t as default};
5
+ import{Camera as e}from"../webgl-engine/lib/Camera.js";class r{constructor(r){this.view=r,this.camera=new e,this._renderTargetHelper=null}get gl(){return this.rctx.gl}resetWebGLState(){null!=this.rctx&&(this.rctx.enforceState(),this._renderTargetHelper&&this._renderTargetHelper.bindFramebuffer())}bindRenderTarget(){this._renderTargetHelper&&this._renderTargetHelper.framebuffer.initializeAndBind()}}export{r as default};