@arcgis/core 4.33.0-next.20250521 → 4.33.0-next.20250523

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 (520) hide show
  1. package/Map.js +1 -1
  2. package/WebScene.js +1 -1
  3. package/analysis/DimensionAnalysis.js +1 -1
  4. package/analysis/LineOfSightAnalysis.js +1 -1
  5. package/analysis/ViewshedAnalysis.js +1 -1
  6. package/applications/Components/analysisUtils.d.ts +2 -0
  7. package/applications/Components/analysisUtils.js +1 -1
  8. package/arcade/Voxel.js +1 -1
  9. package/arcade/featureset/actions/GroupBy.js +1 -1
  10. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  11. package/arcade/functions/knowledgegraph.js +1 -1
  12. package/assets/esri/core/workers/RemoteClient.js +1 -1
  13. package/assets/esri/core/workers/chunks/{253bcc3cc7bc4c2dc6ea.js → 03db109e9b695528c35d.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{f74f8ed3f17713a208c3.js → 07e58dff44fcbb3b3539.js} +1 -1
  15. package/assets/esri/core/workers/chunks/09da6b3085fc84cd69d5.js +1 -0
  16. package/assets/esri/core/workers/chunks/09f76ca9b47b465c934f.js +1 -0
  17. package/assets/esri/core/workers/chunks/0a770f283eb77c8dc97a.js +1 -0
  18. package/assets/esri/core/workers/chunks/0b70b2ee62904318a12c.js +1 -0
  19. package/assets/esri/core/workers/chunks/0dcab04dd1feeb5521cf.js +1 -0
  20. package/assets/esri/core/workers/chunks/{8a2cee726b7843c7408a.js → 0fb5de3f8a4d69b2d514.js} +1 -1
  21. package/assets/esri/core/workers/chunks/0fd826e7f64a37aaaa1e.js +1 -0
  22. package/assets/esri/core/workers/chunks/28b1819bf744ce957dfd.js +2 -0
  23. package/assets/esri/core/workers/chunks/28b1819bf744ce957dfd.js.LICENSE.txt +33 -0
  24. package/assets/esri/core/workers/chunks/{7c819b3e6d69c526f4b2.js → 28e31ac00dc95a1318e9.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{234117cc5cb7c6863313.js → 2d90806faa4269828948.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{b53a7040a71b0f1f3854.js → 330f1996cfc3e9c952cc.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{0d23610475c85385fbff.js → 355e6bcdb401ada71f39.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{bba6d7615d8f3862fe70.js → 36f0046ff6b46adce7b7.js} +1 -1
  29. package/assets/esri/core/workers/chunks/397b15d46f22718c9f38.js +1 -0
  30. package/assets/esri/core/workers/chunks/{b0522dffa5600345c07e.js → 3e85e63148b5e93d3074.js} +1 -1
  31. package/assets/esri/core/workers/chunks/40f54c4f8ae63c6f3df9.js +1 -0
  32. package/assets/esri/core/workers/chunks/4193c52799aa3b6337c9.js +2 -0
  33. package/assets/esri/core/workers/chunks/{9588328d4ed6b0f04166.js.LICENSE.txt → 4193c52799aa3b6337c9.js.LICENSE.txt} +0 -34
  34. package/assets/esri/core/workers/chunks/{14b3c18581b31c93af82.js → 41cbba9b286cf5558a9c.js} +1 -1
  35. package/assets/esri/core/workers/chunks/42bb9bb6fe44a47d9b81.js +1 -0
  36. package/assets/esri/core/workers/chunks/4dd0a5f327fa5fc7249d.js +1 -0
  37. package/assets/esri/core/workers/chunks/{e2cada6644c49b1b6e79.js → 51ba7345c31e6eb79060.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{8a6aac37b3133de74cce.js → 51c31e6d014005107d42.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{66e79aa02b3aa12b3778.js → 5200be8bce60fa831026.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{6b23ca6570357f9fb724.js → 52a57106a41b8c9483d7.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{585c7b485c42555ec554.js → 61f9747c960d959b571b.js} +2 -2
  42. package/assets/esri/core/workers/chunks/{9fc35ec8185beba96715.js → 632d1a1287dde980479e.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{5c8d52b72a3bea4202ac.js → 634a418310e44e2436e0.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{1d043965dcdc11b3aeaa.js → 63852887b3f07d50f7c9.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{c16e0da7a19310c71e8b.js → 677af0281e4fc9f3bd98.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{6ecc3a3737ae8622dfa4.js → 7b12607633bbdc318936.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{83fcc6f770ad084b8ab9.js → 86023cc5ccbc7ac43479.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{d839a237d5edc243d645.js → 8aa8f9986b966ccb64e2.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{12e99071f6582f6caeaf.js → 8b3d1973eb75b81b0fb4.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{67338948e470c1251d8a.js → 8d14e957219364a81d5f.js} +3 -3
  51. package/assets/esri/core/workers/chunks/92a5dccb328229a9336b.js +1 -0
  52. package/assets/esri/core/workers/chunks/{631205dc4d73d49ec9ed.js → 95507ff0a243e451b99e.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{1051a5a57b2fb843a555.js → 9cd55043f3d789f41815.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{2b1486a466760d2152f5.js → a0f2df8ca7cd14bfa013.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{06eb4832b6c86744e52e.js → aba19485b6cdcb70dac6.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{cc4a6f4000cb6680be48.js → ac2607f1e8cd2e99907c.js} +2 -2
  57. package/assets/esri/core/workers/chunks/{9a06476b834584d00d5c.js → b160dcbea6256e0cf689.js} +1 -1
  58. package/assets/esri/core/workers/chunks/b2a6afa0cd537805b4b8.js +1 -0
  59. package/assets/esri/core/workers/chunks/{571252c9822d73cf7b01.js → b845586219f284a215b2.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{97c148adf0347c69a79c.js → c9604f8df909ec4fad46.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{b87fec1753f164c845c5.js → ca76950d81ab4ebb65e1.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{faa40ef04604c7cce706.js → cb63ea6a53d3c2fc3179.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{55f087bca75c3f2a4515.js → d3c0d7799c92c6f0e7d3.js} +1 -1
  64. package/assets/esri/core/workers/chunks/dbe10c20df7e0e563a0b.js +1 -0
  65. package/assets/esri/core/workers/chunks/{ca60b34c3e1ed2ff5934.js → dd2b316baae02bbdddac.js} +1 -1
  66. package/assets/esri/core/workers/chunks/df933eac03dc63064723.js +1 -0
  67. package/assets/esri/core/workers/chunks/e77371ddbaf4b2d9be8d.js +1 -0
  68. package/assets/esri/core/workers/chunks/{80b596496800e8d60eb8.js → ed75e0962358523f4439.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{19a58adc75a34f84b0ef.js → ee6240636d04d7d37b7b.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{0cf979a093e9744d1e80.js → ef7955a2509be0f03ca2.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{b5d68d8460b7c15001dd.js → f1c6df5cf2ccb6ac47a1.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{523046e04679e301797d.js → f3d97a4c4f433adbdab5.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{6c29a768f02dc7ce0ed6.js → fb9e9b9e567e32f37042.js} +1 -1
  74. package/assets/esri/themes/base/widgets/_Editor.scss +41 -2
  75. package/assets/esri/themes/base/widgets/_FeatureForm.scss +4 -0
  76. package/assets/esri/themes/base/widgets/_SelectionList.scss +21 -15
  77. package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +1 -0
  78. package/assets/esri/themes/dark/main.css +1 -1
  79. package/assets/esri/themes/light/main.css +1 -1
  80. package/assets/esri/themes/light/view.css +1 -1
  81. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_no.json +1 -1
  82. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
  83. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
  84. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
  85. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
  86. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
  87. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
  88. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
  89. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
  90. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
  91. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
  92. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
  93. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
  94. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
  95. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
  96. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
  97. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
  98. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
  99. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
  100. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
  101. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
  102. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
  103. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
  104. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
  105. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
  106. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
  107. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
  108. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
  109. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
  110. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
  111. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
  112. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
  113. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
  114. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
  115. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
  116. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
  117. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
  118. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
  119. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
  120. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
  121. package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
  122. package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
  123. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  124. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  125. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  126. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  127. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  128. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  129. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  130. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  131. package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
  132. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  133. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  134. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  135. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  136. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  137. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  138. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  139. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  140. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  141. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  142. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  143. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  144. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  145. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  146. package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
  147. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  148. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  149. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  150. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  151. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  152. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  153. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  154. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  155. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  156. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  157. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  158. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  159. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  160. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  161. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  162. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  163. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm.json +1 -1
  164. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ar.json +1 -1
  165. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bg.json +1 -1
  166. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bs.json +1 -1
  167. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ca.json +1 -1
  168. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_cs.json +1 -1
  169. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_da.json +1 -1
  170. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_de.json +1 -1
  171. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_el.json +1 -1
  172. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_en.json +1 -1
  173. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_es.json +1 -1
  174. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_et.json +1 -1
  175. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fi.json +1 -1
  176. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fr.json +1 -1
  177. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_he.json +1 -1
  178. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hr.json +1 -1
  179. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hu.json +1 -1
  180. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_id.json +1 -1
  181. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_it.json +1 -1
  182. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ja.json +1 -1
  183. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ko.json +1 -1
  184. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lt.json +1 -1
  185. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lv.json +1 -1
  186. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_nl.json +1 -1
  187. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_no.json +1 -1
  188. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pl.json +1 -1
  189. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-BR.json +1 -1
  190. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-PT.json +1 -1
  191. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ro.json +1 -1
  192. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ru.json +1 -1
  193. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sk.json +1 -1
  194. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sl.json +1 -1
  195. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sr.json +1 -1
  196. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sv.json +1 -1
  197. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_th.json +1 -1
  198. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_tr.json +1 -1
  199. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_uk.json +1 -1
  200. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_vi.json +1 -1
  201. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-CN.json +1 -1
  202. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-HK.json +1 -1
  203. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-TW.json +1 -1
  204. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable.json +1 -1
  205. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_en.json +1 -1
  206. package/assets/esri/widgets/Home/t9n/Home_pt-BR.json +1 -1
  207. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  208. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  209. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  210. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  211. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  212. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  213. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  214. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  215. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  216. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  217. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  218. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  219. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  220. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  221. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  222. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  223. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  224. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  225. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  226. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  227. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  228. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  229. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  230. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  231. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  232. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  233. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  234. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  235. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  236. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  237. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  238. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  239. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  240. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  241. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  242. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  243. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  244. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  245. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  246. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  247. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  248. package/chunks/ComponentShader.glsl.js +24 -15
  249. package/chunks/FocusAreaColor.glsl.js +10 -8
  250. package/chunks/persistableUrlUtils.js +1 -1
  251. package/core/accessorSupport/decorators/persistable.js +1 -1
  252. package/core/sanitizerUtils.js +5 -0
  253. package/editing/sharedTemplates/SharedTemplate.js +1 -1
  254. package/editing/sharedTemplates/templateDefinitions/FeatureTemplateDefinition.js +1 -1
  255. package/editing/sharedTemplates/templateDefinitions/GroupTemplateDefinition.js +1 -1
  256. package/editing/sharedTemplates/templateDefinitions/PresetTemplateDefinition.js +1 -1
  257. package/editing/sharedTemplates/templateDefinitions/parts/FeatureTemplateRelationshipPart.js +1 -1
  258. package/editing/sharedTemplates/templateDefinitions/parts/GroupTemplatePart.js +1 -1
  259. package/editing/sharedTemplates/templateDefinitions/parts/PresetTemplatePart.js +1 -1
  260. package/geometry/projection/projectPointToVector.js +1 -1
  261. package/geometry/projection/projectVectorToPoint.js +1 -1
  262. package/geometry/projection/projectVectorToVector.js +1 -1
  263. package/geometry/projection.js +1 -1
  264. package/geometry/projectionUtils.js +5 -0
  265. package/geometry/support/meshUtils/elevation.js +1 -1
  266. package/geometry/support/meshUtils/extent.js +1 -1
  267. package/interfaces.d.ts +436 -80
  268. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  269. package/layers/IntegratedMeshLayer.js +1 -1
  270. package/layers/MapNotesLayer.js +1 -1
  271. package/layers/OrientedImageryLayer.js +1 -1
  272. package/layers/RouteLayer.js +1 -1
  273. package/layers/VideoLayer.js +1 -1
  274. package/layers/WMSLayer.js +1 -1
  275. package/layers/graphics/applyEditsUtils.js +1 -1
  276. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  277. package/layers/graphics/data/QueryEngine.js +1 -1
  278. package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
  279. package/layers/graphics/data/projectionSupport.js +1 -1
  280. package/layers/graphics/data/queryUtils.js +1 -1
  281. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  282. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  283. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  284. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  285. package/layers/mixins/ArcGISImageService.js +1 -1
  286. package/layers/ogc/wfsUtils.js +1 -1
  287. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  288. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  289. package/layers/orientedImagery/core/utils.js +1 -1
  290. package/layers/orientedImagery/queries.js +1 -1
  291. package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
  292. package/layers/orientedImagery/transformations/utils.js +1 -1
  293. package/layers/support/ControlPointsGeoreference.js +1 -1
  294. package/layers/support/CornersGeoreference.js +1 -1
  295. package/layers/support/ElevationQuery.js +1 -1
  296. package/layers/support/ExtentAndRotationGeoreference.js +1 -1
  297. package/layers/support/GeoreferenceBase.js +1 -1
  298. package/layers/support/LocalMediaElementSource.js +1 -1
  299. package/layers/support/MediaElementView.js +1 -1
  300. package/layers/support/PolygonCollection.js +1 -1
  301. package/layers/support/SceneModification.js +1 -1
  302. package/layers/support/Sublayer.js +1 -1
  303. package/layers/support/VideoElement.js +1 -1
  304. package/layers/support/capabilities.js +1 -1
  305. package/layers/support/rasterFunctions/clipUtils.js +1 -1
  306. package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
  307. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  308. package/layers/video/VideoController.js +1 -1
  309. package/libs/maquette/projection.js +1 -1
  310. package/networks/UnitIdentifierManager.js +5 -0
  311. package/networks/support/UNTraceConfiguration.js +1 -1
  312. package/package.json +1 -1
  313. package/portal/schemas/definitions.js +1 -1
  314. package/portal/schemas/webScene.js +1 -1
  315. package/portal/support/portalItemUtils.js +1 -1
  316. package/renderers/support/AuthoringInfoVisualVariable.js +1 -1
  317. package/rest/featureService/FeatureService.js +1 -1
  318. package/rest/knowledgeGraph/GraphAddNamedTypesResult.d.ts +4 -0
  319. package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.d.ts +4 -0
  320. package/rest/knowledgeGraphService.d.ts +2 -0
  321. package/rest/networks/unitIdentifiers/support/UnitQueryResult.js +1 -1
  322. package/rest/query/executeQuery.js +1 -1
  323. package/rest/query/executeQueryJSON.js +1 -1
  324. package/rest/query/executeQueryPBF.js +1 -1
  325. package/rest/query.js +1 -1
  326. package/smartMapping/renderers/size.js +1 -1
  327. package/smartMapping/renderers/support/spikeUtils.d.ts +4 -0
  328. package/smartMapping/renderers/support/spikeUtils.js +1 -1
  329. package/smartMapping/statistics/histogram.js +1 -1
  330. package/smartMapping/statistics/summaryStatistics.js +1 -1
  331. package/support/persistableUrlUtils.js +1 -1
  332. package/support/revision.js +1 -1
  333. package/views/2d/LabelManager.js +1 -1
  334. package/views/2d/ViewStateManager.js +1 -1
  335. package/views/2d/constraints/GeometryConstraint.js +1 -1
  336. package/views/2d/engine/imagery/RasterBitmap.js +1 -1
  337. package/views/2d/engine/vectorTiles/decluttering/SymbolDeclutterer.js +1 -1
  338. package/views/2d/engine/vectorTiles/decluttering/core.js +1 -1
  339. package/views/2d/engine/webgl/FeatureTile.js +1 -1
  340. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  341. package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
  342. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  343. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  344. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ReprojectTechnique.js +1 -1
  345. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterColorizerShader.js +1 -1
  346. package/views/2d/grid/GridView2D.js +1 -1
  347. package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
  348. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  349. package/views/2d/layers/KMLLayerView2D.js +1 -1
  350. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  351. package/views/2d/layers/VideoLayerView2D.js +1 -1
  352. package/views/2d/layers/features/FeatureContainer.js +1 -1
  353. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  354. package/views/2d/layers/support/vectorTileDebugUtils.js +1 -1
  355. package/views/2d/viewpointUtils.js +1 -1
  356. package/views/3d/FocusAreasView.js +1 -1
  357. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
  358. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  359. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  360. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  361. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  362. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  363. package/views/3d/analysis/support/projectionUtils.js +1 -1
  364. package/views/3d/environment/EnvironmentManager.js +1 -1
  365. package/views/3d/interactive/Manipulator3D.js +1 -1
  366. package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
  367. package/views/3d/interactive/editingTools/media/MediaElementControllerControlPoints.js +1 -1
  368. package/views/3d/interactive/editingTools/media/MediaElementControllerShape.js +1 -1
  369. package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
  370. package/views/3d/interactive/visualElements/support/Segment.js +1 -1
  371. package/views/3d/layers/FeatureLayerView3D.js +1 -1
  372. package/views/3d/layers/FlowSubView3D.js +1 -1
  373. package/views/3d/layers/I3SMeshView3D.js +1 -1
  374. package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
  375. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  376. package/views/3d/layers/SceneLayerWorker.js +1 -1
  377. package/views/3d/layers/TileLayerView3D.js +1 -1
  378. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  379. package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
  380. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  381. package/views/3d/layers/graphics/focusAreaStyle.js +1 -1
  382. package/views/3d/layers/graphics/graphicUtils.js +1 -1
  383. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  384. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  385. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  386. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  387. package/views/3d/layers/i3s/enums.js +1 -1
  388. package/views/3d/layers/support/FeatureTile.js +1 -1
  389. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  390. package/views/3d/layers/support/FeatureTileFetcher3DDebugger.js +1 -1
  391. package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
  392. package/views/3d/state/ViewStateManager.js +1 -1
  393. package/views/3d/support/cameraUtils.js +1 -1
  394. package/views/3d/support/viewpointUtils.js +1 -1
  395. package/views/3d/terrain/ExtentHelper.js +1 -1
  396. package/views/3d/terrain/TerrainRenderer.js +1 -1
  397. package/views/3d/terrain/TextureFader.js +1 -1
  398. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  399. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  400. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  401. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  402. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  403. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  404. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  405. package/views/3d/webgl-engine/effects/focusArea/FocusAreaEffect.js +5 -0
  406. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  407. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  408. package/views/3d/webgl-engine/lib/RenderSlot.js +1 -1
  409. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  410. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  411. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  412. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  413. package/views/3d/webgl-engine/shaders/FocusAreaColor.glsl.js +1 -1
  414. package/views/FocusArea.js +1 -1
  415. package/views/FocusAreaOutline.js +1 -1
  416. package/views/FocusAreas.js +1 -1
  417. package/views/SceneView.js +1 -1
  418. package/views/VideoView.js +1 -1
  419. package/views/View2D.js +1 -1
  420. package/views/interactive/GraphicManipulator.js +1 -1
  421. package/views/interactive/dragEventPipeline.js +1 -1
  422. package/views/interactive/snapping/GridSnappingEngine.js +1 -1
  423. package/views/interactive/snapping/SnappingManager.js +1 -1
  424. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  425. package/views/layers/SceneLayerView.js +1 -1
  426. package/views/support/geodesicAreaMeasurementUtils.js +1 -1
  427. package/views/support/projectionUtils.js +1 -1
  428. package/views/ui/UI.js +1 -1
  429. package/views/webgl/FramebufferObject.js +1 -1
  430. package/views/webgl/RenderingContext.js +1 -1
  431. package/views/webgl/Texture.js +1 -1
  432. package/views/webgl/rasterUtils.js +1 -1
  433. package/webscene/Slide.js +1 -1
  434. package/webscene/support/analysisUtils.js +1 -1
  435. package/widgets/AreaMeasurement3D.js +1 -1
  436. package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
  437. package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
  438. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  439. package/widgets/CoordinateConversion/support/Format.js +1 -1
  440. package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
  441. package/widgets/DirectLineMeasurement3D.js +1 -1
  442. package/widgets/DirectionalPad.js +1 -1
  443. package/widgets/Editor/EditorViewModel.js +1 -1
  444. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  445. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  446. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  447. package/widgets/Editor/UpdateWorkflow.js +1 -1
  448. package/widgets/Editor/Upload.js +1 -1
  449. package/widgets/Editor/VisibleElements.js +1 -1
  450. package/widgets/Editor/components/FooterActions.js +1 -1
  451. package/widgets/Editor/components/Notices.js +1 -1
  452. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  453. package/widgets/Editor/css.js +1 -1
  454. package/widgets/Editor/workflowUtils.js +1 -1
  455. package/widgets/Editor.js +1 -1
  456. package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
  457. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  458. package/widgets/FeatureForm/TextElementInput.js +1 -1
  459. package/widgets/FeatureForm/css.js +1 -1
  460. package/widgets/FeatureForm.js +1 -1
  461. package/widgets/FeatureTable/AttachmentsColumn.js +1 -1
  462. package/widgets/FeatureTable/FieldColumn.js +1 -1
  463. package/widgets/FeatureTable/Grid/Column.js +1 -1
  464. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  465. package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
  466. package/widgets/FeatureTable/support/exportUtils.js +1 -1
  467. package/widgets/FeatureTable/support/tableUtils.js +1 -1
  468. package/widgets/FeatureTable.js +1 -1
  469. package/widgets/Features/FeaturesViewModel.js +1 -1
  470. package/widgets/LineOfSight.js +1 -1
  471. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  472. package/widgets/OrientedImageryViewer/OrientedImageryViewerVisibleElements.js +1 -1
  473. package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
  474. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  475. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  476. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  477. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  478. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  479. package/widgets/OrientedImageryViewer/components/NavigationAction.js +5 -0
  480. package/widgets/OrientedImageryViewer/components/NavigationActions.js +1 -1
  481. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +5 -0
  482. package/widgets/OrientedImageryViewer/constants.js +1 -1
  483. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  484. package/widgets/OrientedImageryViewer.js +1 -1
  485. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  486. package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
  487. package/widgets/Sketch/SketchViewModel.js +1 -1
  488. package/widgets/Sketch.js +1 -1
  489. package/widgets/Slice.js +1 -1
  490. package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
  491. package/widgets/support/AnalysisViewModel.js +1 -1
  492. package/widgets/support/AnchorElementViewModel.js +1 -1
  493. package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
  494. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  495. package/widgets/support/SelectionList/VisibleElements.js +1 -1
  496. package/widgets/support/SelectionList.js +1 -1
  497. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  498. package/widgets/support/SelectionToolbar/VisibleElements.js +1 -1
  499. package/widgets/support/SelectionToolbar.js +1 -1
  500. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  501. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  502. package/widgets/support/tests.js +1 -1
  503. package/widgets/support/widget.js +1 -1
  504. package/widgets/support/widgetUtils.js +1 -1
  505. package/assets/esri/core/workers/chunks/0c50ee1f3cdd30d96479.js +0 -1
  506. package/assets/esri/core/workers/chunks/133e4bde346828d4510b.js +0 -1
  507. package/assets/esri/core/workers/chunks/3a743653b786b010a57f.js +0 -1
  508. package/assets/esri/core/workers/chunks/5228d39c05d660a135b6.js +0 -1
  509. package/assets/esri/core/workers/chunks/5f4ca51b82daf0e51010.js +0 -1
  510. package/assets/esri/core/workers/chunks/6d1e1a4fcb90ea8b6848.js +0 -1
  511. package/assets/esri/core/workers/chunks/7e6141b5baae47682f97.js +0 -1
  512. package/assets/esri/core/workers/chunks/87fc7b6c3e2d4f7775e2.js +0 -1
  513. package/assets/esri/core/workers/chunks/8fda0a5b247385e68dc0.js +0 -1
  514. package/assets/esri/core/workers/chunks/938f1eebc48871be64e9.js +0 -1
  515. package/assets/esri/core/workers/chunks/9588328d4ed6b0f04166.js +0 -2
  516. package/assets/esri/core/workers/chunks/9839309d0cd804fe52c2.js +0 -1
  517. package/assets/esri/core/workers/chunks/9b610fbfcd47c3dde34d.js +0 -1
  518. package/assets/esri/core/workers/chunks/be2c8c0a8b2bce7979b6.js +0 -1
  519. package/assets/esri/core/workers/chunks/f218a190015de1444018.js +0 -1
  520. package/assets/esri/core/workers/chunks/f9567108862629f25c8b.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.33/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../Camera.js";import e from"../../../Graphic.js";import n from"../../../Viewpoint.js";import{result as a}from"../../../core/asyncUtils.js";import"../../../core/has.js";import{cyclicalDegrees as r}from"../../../core/Cyclical.js";import o from"../../../core/Error.js";import{throwIfAborted as i}from"../../../core/promiseUtils.js";import{fromMat4 as s,transpose as c}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as l}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{g as u,f,j as p,c as g,d as y,i as h,o as d}from"../../../chunks/vec32.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import x from"../../../geometry/Extent.js";import j from"../../../geometry/Geometry.js";import v from"../../../geometry/Multipoint.js";import b from"../../../geometry/Point.js";import{projectWithZConversion as R,tryProjectWithZConversion as z}from"../../../geometry/projection.js";import G from"../../../geometry/SpatialReference.js";import{computeTranslationToOriginAndRotation as S}from"../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectPointToVectorAsync as B}from"../../../geometry/projection/projectPointToVector.js";import{projectVectorToPoint as T}from"../../../geometry/projection/projectVectorToPoint.js";import{projectVectorToVector as M}from"../../../geometry/projection/projectVectorToVector.js";import{create as Z,center as A,toRect as E,isPoint as F,empty as O,expandWithVec3 as P,expandWithAABB as D,width as U,height as V,depth as C}from"../../../geometry/support/aaBoundingBox.js";import{create as k,isPoint as I}from"../../../geometry/support/aaBoundingRect.js";import{intersectsPoint as J}from"../../../geometry/support/frustum.js";import{getResolutionInMetersForScale as K}from"../../../geometry/support/scaleUtils.js";import{cameraOnContentAlongViewDirection as L}from"../camera/intersectionUtils.js";import{getViewSR as N,fromExtentAsync as W,internalToExternal as Y,OrientationMode as q,scaleToDistance as X,fromCenterDistanceAsync as _,fromExtentSync as H,externalToInternal as Q,distanceToScale as $,fromCenterDistanceSync as tt,fromCenterScale as et,directionToHeadingTilt as nt,zoomToScale as at}from"./cameraUtils.js";import{getElevationAtPoint as rt}from"./ElevationProvider.js";const ot=.66;function it(t){return 360-r.normalize(t)}function st(t){return r.normalize(360-t)}function ct(t,e,n){const a=e.camera;if(null!=a)return mt(a,N(t));const{targetGeometry:r}=e;if(null==r)return null;const{camera:o,mode:i}=ft(t,e.rotation,n);if("point"===r.type)return pt(t,e,r,o,i);const s=r.extent;return null==s?null:H(t,s,o.heading,o.tilt,i)}async function lt(t,e,n,a){const r=e.camera;if(null!=r)return ut(r,N(t),a);const{targetGeometry:o}=e;if(null==o)throw new Error("Viewpoint has no targetGeometry!");const{camera:i,mode:s}=ft(t,e.rotation,n);if("point"===o.type)return gt(t,e,o,i,s,a);const c=o.extent;if(null==c)throw new Error("Target geometry has no extent!");return W(t,c,i.heading,i.tilt,s,a)}function mt(t,e){const n=t.position;let a;try{a=z(n,e)}catch(o){return null}if(!a)return null;const r=t.clone();return r.position=a.clone(),r}async function ut(t,e,n){const a=t.position,r=await R(a,e,{signal:n});i(n);const o=t.clone();return o.position=r.clone(),o}function ft(t,e,n){const a=Y(t,t.state.camera);let r=q.ADJUST;return null!=e&&(a.heading=it(e),r=q.LOCKED),null!=n&&(a.tilt=n),{camera:a,mode:r}}function pt(t,e,n,a,r){const o=t.spatialReference;let i;try{i=z(n.clone(),o)}catch(c){return null}if(!i)return null;const s=null!=e.scale?X(t,e.scale):t.state.camera.distance;return tt(t,i,s,a,r)}async function gt(t,e,n,a,r,o){const s=t.spatialReference,c=await R(n.clone(),s,{signal:o});i(o);const l=null!=e.scale?X(t,e.scale):t.state.camera.distance;return _(t,c,l,a,r,o)}function yt(t,e,a=null){return null==a&&(a=new n),jt(t,null,e.clone(),a)}async function ht(e,a,r){const i=Ft(e,a);if(!i)throw new o("viewpointutils-create:no-target","Missing target for creating viewpoint");const s=new t({fov:e.camera.fov}),c=new n({camera:s});if(i.target instanceof n){return Ot(await zt(e,i.target,i,r,c))}if(i.target instanceof t)return Ot(await Gt(e,i.target,r,c));const l=null!=i.scale||null!=i.zoom;if(i.target instanceof x){const t=i.target.xmin===i.target.xmax||i.target.ymin===i.target.ymax;return Ot(l||t?await Bt(e,i,i.target.center,s,r,c):await Zt(e,i,i.target,s,r,c))}const m=new Dt,u=l?wt(e,i):void 0;if(await Rt(e,i.target,u,m,r),isFinite(m.boundingBox[0])){let t;if(A(m.boundingBox,Ut),Wt.x=Ut[0],Wt.y=Ut[1],Wt.z=Ut[2],Wt.spatialReference=e.spatialReference,isFinite(Wt.z)&&m.hasZ?t=F(m.boundingBox):(Wt.z=void 0,t=I(E(m.boundingBox,It))),l||t)return Ot(await Bt(e,i,Wt,s,r,c));const n=Pt(e,m.screenSpaceObjects);return Ot(await Et(e,i,Wt,m.boundingBox,n,s,r,c))}return i.position?Ot(await Tt(e,i,s,c,r)):Ot(await Mt(e,i,s,r,c))}function dt(t,e){return null==e.scale&&null!=e.zoom?at(t,e.zoom):e.scale}function wt(t,e){const n=dt(t,e);return n?K(n):void 0}function xt(t,e){let n=!1;return null!=e.heading?(t.heading=e.heading,n=!0):null!=e.rotation&&(t.heading=it(e.rotation),n=!0),null!=e.tilt&&(t.tilt=e.tilt,n=!0),null!=e.fov&&(t.fov=e.fov),n}function jt(t,e,n,a){const r=t.spatialReference||G.WGS84;if(e??=Q(t,n),null==e)return a;const o=new b({spatialReference:r});return T(e.center,t.renderSpatialReference,o)?(a.targetGeometry=o,a.scale=$(t,e.distance),a.rotation=st(n.heading),a.camera=n,a):a}async function vt(t,e,n,a){const r=()=>new o("viewpointutils:invalid-geometry","The target is missing a valid geometry");if(!e)throw r();"mesh"===e.type&&(e=e.extent);const i=t.basemapTerrain.spatialReference;if(!e.hasZ&&t.basemapTerrain){let n;switch(e.type){case"point":n=e;break;case"multipoint":case"polyline":n=e.extent?.center;break;case"extent":n=e.center;break;case"polygon":n=e.centroid}null!=n&&i&&t.elevationProvider?(n=await R(n,i,{signal:a}),Ut[2]=rt(t.elevationProvider,n)??0):Ut[2]=0}const s=Yt[e.type],c=new Array;if(s(e,e.hasZ?t=>{c.push([t[0],t[1],t[2]])}:t=>{c.push([t[0],t[1]])},Ut),0===c.length)throw r();const l=e.spatialReference,m=t.spatialReference,u=await R(new v({spatialReference:l,hasZ:e.hasZ,hasM:!1,points:c}),m,{signal:a});if(e.hasZ&&(n.hasZ=!0),e.hasZ)for(const[o,f,p]of u.points)Ut[0]=o,Ut[1]=f,Ut[2]=p,P(n.boundingBox,Ut);else for(const[o,f]of u.points)Ut[0]=o,Ut[1]=f,P(n.boundingBox,Ut)}async function bt(t,e,n,r,o){const i=await a(t.whenViewForGraphic(e));if(!1===i.ok||null==i.value||!("whenGraphicBounds"in i.value))return void await vt(t,e.geometry,r,o);const s=i.value,c=await a(s.whenGraphicBounds(e,{minDemResolution:n}));if(!1===c.ok||!c.value)return void await vt(t,e.geometry,r,o);const{screenSpaceObjects:l,boundingBox:m}=c.value;D(r.boundingBox,m),l&&l.forEach((t=>{r.screenSpaceObjects.push(t)})),isFinite(m[2])&&(r.hasZ=!0)}async function Rt(t,n,a,r,o){if(Array.isArray(n)&&2===n.length){const e=n[0],a=n[1];if("number"==typeof e&&"number"==typeof a)return Wt.x=e,Wt.y=a,Wt.z=void 0,Wt.spatialReference=t.spatialReference?.isGeographic?t.spatialReference:G.WGS84,void await vt(t,Wt,r,o)}n&&"map"in n&&"function"==typeof n.map?await Promise.allSettled(n.map((e=>Rt(t,e,a,r,o)))):n instanceof j?await vt(t,n,r,o):n instanceof e&&await bt(t,n,a,r,o)}async function zt(t,e,n,a,r){if(e.camera)return Gt(t,e.camera,a,r);r.scale=e.scale,r.rotation=e.rotation,r.targetGeometry=null!=e.targetGeometry?e.targetGeometry.clone():null,r.camera=null,null!=n.heading?r.rotation=st(n.heading):null!=n.rotation&&(r.rotation=n.rotation);const o=dt(t,n);return null!=o&&(r.scale=o),r.camera=await lt(t,r,n.tilt,a),r}async function Gt(t,e,n,a){const r=t.spatialReference,o=await R(e.position,r,{signal:n}),i=e.clone();return i.position=o,jt(t,null,i,a)}async function St(t,e,n,a,r,o,i){const s=t.renderSpatialReference;return await B(e,Lt,s,0,{signal:i}),await B(n,Kt,s,0,{signal:i}),o.targetGeometry=new b(e),r.position=new b(n),y(Jt,Lt,Kt),nt(t,Kt,Jt,a.up,r),o.scale=$(t,p(Kt,Lt)),o.rotation=st(r.heading),o.camera=r,o}async function Bt(t,e,n,a,r,o){o.targetGeometry=n.clone();const i=L(t);if(e.position)return St(t,o.targetGeometry,e.position,i,a,o,r);if(e.zoomFactor){const n=i.distance/e.zoomFactor,a=u(Ut,i.viewForward,-n);i.eye=f(Ut,i.center,a),o.scale=$(t,n)}Y(t,i,a);const s=xt(a,e)?q.LOCKED:q.ADJUST;if(!e.zoomFactor){const n=dt(t,e);if(null==n){await B(o.targetGeometry,Ut,t.renderSpatialReference,0,{signal:r});const e=J(i.frustum,Ut)?p(i.eye,Ut):i.distance;o.camera=await _(t,o.targetGeometry,e,a,s),o.scale=$(t,e)}else o.scale=n,o.camera=await et(t,o.targetGeometry,o.scale,a,s,r)}return o}async function Tt(t,e,n,a,r){const o=L(t);g(Jt,o.viewForward),nt(t,o.eye,Jt,o.up,Nt);const i=t.spatialReference,{position:s}=e;if(s){const t=await R(s,i,{signal:r});n.position=t}else n.position=new b;return n.heading=null!=e.heading?e.heading:Nt.heading,n.tilt=null!=e.tilt?e.tilt:Nt.tilt,jt(t,null,n,a)}async function Mt(t,e,n,a,r){if(null!=e.heading||null!=e.rotation||null!=e.scale||null!=e.tilt||null!=e.zoom||null!=e.zoomFactor){const o=L(t),{spatialReference:i,renderSpatialReference:s}=t,c=new b({spatialReference:i});return T(o.center,s,c)?Bt(t,e,c,n,a,r):r}return r.scale=t.scale,r.camera=t.camera.clone(),xt(r.camera,e),r}async function Zt(t,e,n,a,r,o){o.targetGeometry=n.clone();const i=L(t);Y(t,i,a);const s=xt(a,e)?q.LOCKED:q.ADJUST;return o.camera=await W(t,n,a.heading,a.tilt,s,r),o}function At(t,e,n,a,r){let o=0;null!=n.z?o=n.z:t.basemapTerrain&&t.elevationProvider&&(o=rt(t.elevationProvider,n)),h(Ut,n.x,n.y,o),S(t.spatialReference,Ut,Vt,t.renderSpatialReference),s(Ct,Vt),c(Ct,Ct),O(kt);const i=[[0,1,2],[3,1,2],[0,4,2],[3,4,2],[0,1,5],[3,1,5],[0,4,5],[3,4,5]];for(let s=0;s<i.length;s++){const e=i[s];let n=a[e[2]];isFinite(n)||(n=o),h(Ut,a[e[0]],a[e[1]],n),M(Ut,t.spatialReference,Ut,t.renderSpatialReference),P(kt,d(Ut,Ut,Ct))}const l=U(kt),m=V(kt),u=C(kt),f=1/Math.tan(e.fovX/2),p=1/Math.tan(e.fovY/2),g=.5*Math.sqrt(l*l+u*u)*Math.max(p,f)+.5*m,y=.5*m*p+.5*Math.max(l,u);return Math.max(g,y)/r}async function Et(t,e,n,a,r,o,i,s){s.targetGeometry=n.clone();const c=L(t),l=At(t,c,n,a,r);Y(t,c,o);const m=xt(o,e)?q.LOCKED:q.ADJUST;return s.camera=await _(t,s.targetGeometry,l,o,m,i),s.scale=$(t,l),s}function Ft(t,e){if(!e||!t.spatialReference)return null;const n={target:void 0};return"declaredClass"in e||Array.isArray(e)?n.target=e:(Object.assign(n,e),!n.target&&"center"in e&&e.center&&(n.target=e.center)),n}function Ot(t){return null!=t?.camera&&(t.rotation=st(t.camera.heading)),t}function Pt(t,e){const n=ot;if(!e.length)return n;let a=Number.NEGATIVE_INFINITY;for(let r=0;r<e.length;r++){const t=e[r].screenSpaceBoundingRect;a=Math.max(a,Math.abs(t[0]),Math.abs(t[1]),Math.abs(t[2]),Math.abs(t[3]))}return n-a/Math.min(t.width,t.height)*2}class Dt{constructor(){this.hasZ=!1,this.boundingBox=O(),this.screenSpaceObjects=new Array}}const Ut=w(),Vt=m(),Ct=l(),kt=Z(),It=k(),Jt=w(),Kt=w(),Lt=w(),Nt={heading:0,tilt:0},Wt=new b,Yt={point(t,e,n){n[0]=t.x,n[1]=t.y,null!=t.z&&(n[2]=t.z),e(n)},polygon(t,e,n){const a=t.hasZ;for(let r=0;r<t.rings.length;r++){const o=t.rings[r];for(let t=0;t<o.length;t++)n[0]=o[t][0],n[1]=o[t][1],a&&(n[2]=o[t][2]),e(n)}},polyline(t,e,n){const a=t.hasZ;for(let r=0;r<t.paths.length;r++){const o=t.paths[r];for(let t=0;t<o.length;t++)n[0]=o[t][0],n[1]=o[t][1],a&&(n[2]=o[t][2]),e(n)}},multipoint(t,e,n){const a=t.points,r=t.hasZ;for(let o=0;o<a.length;o++)n[0]=a[o][0],n[1]=a[o][1],r&&(n[2]=a[o][2]),e(n)},extent(t,e,n){null!=t.zmin&&null!=t.zmax?(e(h(n,t.xmin,t.ymin,t.zmin)),e(h(n,t.xmax,t.ymin,t.zmin)),e(h(n,t.xmin,t.ymax,t.zmin)),e(h(n,t.xmax,t.ymax,t.zmin)),e(h(n,t.xmin,t.ymin,t.zmax)),e(h(n,t.xmax,t.ymin,t.zmax)),e(h(n,t.xmin,t.ymax,t.zmax)),e(h(n,t.xmax,t.ymax,t.zmax))):(e(h(n,t.xmin,t.ymin,n[2])),e(h(n,t.xmax,t.ymin,n[2])),e(h(n,t.xmin,t.ymax,n[2])),e(h(n,t.xmax,t.ymax,n[2])))}};export{ht as create,yt as fromCamera,lt as toCameraAsync,ct as toCameraSync};
5
+ import t from"../../../Camera.js";import e from"../../../Graphic.js";import n from"../../../Viewpoint.js";import{result as a}from"../../../core/asyncUtils.js";import"../../../core/has.js";import{cyclicalDegrees as r}from"../../../core/Cyclical.js";import o from"../../../core/Error.js";import{throwIfAborted as i}from"../../../core/promiseUtils.js";import{fromMat4 as s,transpose as c}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as l}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{g as u,f,j as p,c as g,d as y,i as h,o as d}from"../../../chunks/vec32.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import x from"../../../geometry/Extent.js";import j from"../../../geometry/Geometry.js";import v from"../../../geometry/Multipoint.js";import b from"../../../geometry/Point.js";import{projectWithZConversion as R,tryProjectWithZConversion as z}from"../../../geometry/projectionUtils.js";import G from"../../../geometry/SpatialReference.js";import{computeTranslationToOriginAndRotation as S}from"../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectPointToVectorAsync as B}from"../../../geometry/projection/projectPointToVector.js";import{projectVectorToPoint as T}from"../../../geometry/projection/projectVectorToPoint.js";import{projectVectorToVector as M}from"../../../geometry/projection/projectVectorToVector.js";import{create as Z,center as A,toRect as E,isPoint as F,empty as O,expandWithVec3 as P,expandWithAABB as U,width as D,height as V,depth as C}from"../../../geometry/support/aaBoundingBox.js";import{create as k,isPoint as I}from"../../../geometry/support/aaBoundingRect.js";import{intersectsPoint as J}from"../../../geometry/support/frustum.js";import{getResolutionInMetersForScale as K}from"../../../geometry/support/scaleUtils.js";import{cameraOnContentAlongViewDirection as L}from"../camera/intersectionUtils.js";import{getViewSR as N,fromExtentAsync as W,internalToExternal as Y,OrientationMode as q,scaleToDistance as X,fromCenterDistanceAsync as _,fromExtentSync as H,externalToInternal as Q,distanceToScale as $,fromCenterDistanceSync as tt,fromCenterScale as et,directionToHeadingTilt as nt,zoomToScale as at}from"./cameraUtils.js";import{getElevationAtPoint as rt}from"./ElevationProvider.js";const ot=.66;function it(t){return 360-r.normalize(t)}function st(t){return r.normalize(360-t)}function ct(t,e,n){const a=e.camera;if(null!=a)return mt(a,N(t));const{targetGeometry:r}=e;if(null==r)return null;const{camera:o,mode:i}=ft(t,e.rotation,n);if("point"===r.type)return pt(t,e,r,o,i);const s=r.extent;return null==s?null:H(t,s,o.heading,o.tilt,i)}async function lt(t,e,n,a){const r=e.camera;if(null!=r)return ut(r,N(t),a);const{targetGeometry:o}=e;if(null==o)throw new Error("Viewpoint has no targetGeometry!");const{camera:i,mode:s}=ft(t,e.rotation,n);if("point"===o.type)return gt(t,e,o,i,s,a);const c=o.extent;if(null==c)throw new Error("Target geometry has no extent!");return W(t,c,i.heading,i.tilt,s,a)}function mt(t,e){const n=t.position;let a;try{a=z(n,e)}catch(o){return null}if(!a)return null;const r=t.clone();return r.position=a.clone(),r}async function ut(t,e,n){const a=t.position,r=await R(a,e,{signal:n});i(n);const o=t.clone();return o.position=r.clone(),o}function ft(t,e,n){const a=Y(t,t.state.camera);let r=q.ADJUST;return null!=e&&(a.heading=it(e),r=q.LOCKED),null!=n&&(a.tilt=n),{camera:a,mode:r}}function pt(t,e,n,a,r){const o=t.spatialReference;let i;try{i=z(n.clone(),o)}catch(c){return null}if(!i)return null;const s=null!=e.scale?X(t,e.scale):t.state.camera.distance;return tt(t,i,s,a,r)}async function gt(t,e,n,a,r,o){const s=t.spatialReference,c=await R(n.clone(),s,{signal:o});i(o);const l=null!=e.scale?X(t,e.scale):t.state.camera.distance;return _(t,c,l,a,r,o)}function yt(t,e,a=null){return null==a&&(a=new n),jt(t,null,e.clone(),a)}async function ht(e,a,r){const i=Ft(e,a);if(!i)throw new o("viewpointutils-create:no-target","Missing target for creating viewpoint");const s=new t({fov:e.camera.fov}),c=new n({camera:s});if(i.target instanceof n){return Ot(await zt(e,i.target,i,r,c))}if(i.target instanceof t)return Ot(await Gt(e,i.target,r,c));const l=null!=i.scale||null!=i.zoom;if(i.target instanceof x){const t=i.target.xmin===i.target.xmax||i.target.ymin===i.target.ymax;return Ot(l||t?await Bt(e,i,i.target.center,s,r,c):await Zt(e,i,i.target,s,r,c))}const m=new Ut,u=l?wt(e,i):void 0;if(await Rt(e,i.target,u,m,r),isFinite(m.boundingBox[0])){let t;if(A(m.boundingBox,Dt),Wt.x=Dt[0],Wt.y=Dt[1],Wt.z=Dt[2],Wt.spatialReference=e.spatialReference,isFinite(Wt.z)&&m.hasZ?t=F(m.boundingBox):(Wt.z=void 0,t=I(E(m.boundingBox,It))),l||t)return Ot(await Bt(e,i,Wt,s,r,c));const n=Pt(e,m.screenSpaceObjects);return Ot(await Et(e,i,Wt,m.boundingBox,n,s,r,c))}return i.position?Ot(await Tt(e,i,s,c,r)):Ot(await Mt(e,i,s,r,c))}function dt(t,e){return null==e.scale&&null!=e.zoom?at(t,e.zoom):e.scale}function wt(t,e){const n=dt(t,e);return n?K(n):void 0}function xt(t,e){let n=!1;return null!=e.heading?(t.heading=e.heading,n=!0):null!=e.rotation&&(t.heading=it(e.rotation),n=!0),null!=e.tilt&&(t.tilt=e.tilt,n=!0),null!=e.fov&&(t.fov=e.fov),n}function jt(t,e,n,a){const r=t.spatialReference||G.WGS84;if(e??=Q(t,n),null==e)return a;const o=new b({spatialReference:r});return T(e.center,t.renderSpatialReference,o)?(a.targetGeometry=o,a.scale=$(t,e.distance),a.rotation=st(n.heading),a.camera=n,a):a}async function vt(t,e,n,a){const r=()=>new o("viewpointutils:invalid-geometry","The target is missing a valid geometry");if(!e)throw r();"mesh"===e.type&&(e=e.extent);const i=t.basemapTerrain.spatialReference;if(!e.hasZ&&t.basemapTerrain){let n;switch(e.type){case"point":n=e;break;case"multipoint":case"polyline":n=e.extent?.center;break;case"extent":n=e.center;break;case"polygon":n=e.centroid}null!=n&&i&&t.elevationProvider?(n=await R(n,i,{signal:a}),Dt[2]=rt(t.elevationProvider,n)??0):Dt[2]=0}const s=Yt[e.type],c=new Array;if(s(e,e.hasZ?t=>{c.push([t[0],t[1],t[2]])}:t=>{c.push([t[0],t[1]])},Dt),0===c.length)throw r();const l=e.spatialReference,m=t.spatialReference,u=await R(new v({spatialReference:l,hasZ:e.hasZ,hasM:!1,points:c}),m,{signal:a});if(e.hasZ&&(n.hasZ=!0),e.hasZ)for(const[o,f,p]of u.points)Dt[0]=o,Dt[1]=f,Dt[2]=p,P(n.boundingBox,Dt);else for(const[o,f]of u.points)Dt[0]=o,Dt[1]=f,P(n.boundingBox,Dt)}async function bt(t,e,n,r,o){const i=await a(t.whenViewForGraphic(e));if(!1===i.ok||null==i.value||!("whenGraphicBounds"in i.value))return void await vt(t,e.geometry,r,o);const s=i.value,c=await a(s.whenGraphicBounds(e,{minDemResolution:n}));if(!1===c.ok||!c.value)return void await vt(t,e.geometry,r,o);const{screenSpaceObjects:l,boundingBox:m}=c.value;U(r.boundingBox,m),l&&l.forEach((t=>{r.screenSpaceObjects.push(t)})),isFinite(m[2])&&(r.hasZ=!0)}async function Rt(t,n,a,r,o){if(Array.isArray(n)&&2===n.length){const e=n[0],a=n[1];if("number"==typeof e&&"number"==typeof a)return Wt.x=e,Wt.y=a,Wt.z=void 0,Wt.spatialReference=t.spatialReference?.isGeographic?t.spatialReference:G.WGS84,void await vt(t,Wt,r,o)}n&&"map"in n&&"function"==typeof n.map?await Promise.allSettled(n.map((e=>Rt(t,e,a,r,o)))):n instanceof j?await vt(t,n,r,o):n instanceof e&&await bt(t,n,a,r,o)}async function zt(t,e,n,a,r){if(e.camera)return Gt(t,e.camera,a,r);r.scale=e.scale,r.rotation=e.rotation,r.targetGeometry=null!=e.targetGeometry?e.targetGeometry.clone():null,r.camera=null,null!=n.heading?r.rotation=st(n.heading):null!=n.rotation&&(r.rotation=n.rotation);const o=dt(t,n);return null!=o&&(r.scale=o),r.camera=await lt(t,r,n.tilt,a),r}async function Gt(t,e,n,a){const r=t.spatialReference,o=await R(e.position,r,{signal:n}),i=e.clone();return i.position=o,jt(t,null,i,a)}async function St(t,e,n,a,r,o,i){const s=t.renderSpatialReference;return await B(e,Lt,s,0,{signal:i}),await B(n,Kt,s,0,{signal:i}),o.targetGeometry=new b(e),r.position=new b(n),y(Jt,Lt,Kt),nt(t,Kt,Jt,a.up,r),o.scale=$(t,p(Kt,Lt)),o.rotation=st(r.heading),o.camera=r,o}async function Bt(t,e,n,a,r,o){o.targetGeometry=n.clone();const i=L(t);if(e.position)return St(t,o.targetGeometry,e.position,i,a,o,r);if(e.zoomFactor){const n=i.distance/e.zoomFactor,a=u(Dt,i.viewForward,-n);i.eye=f(Dt,i.center,a),o.scale=$(t,n)}Y(t,i,a);const s=xt(a,e)?q.LOCKED:q.ADJUST;if(!e.zoomFactor){const n=dt(t,e);if(null==n){await B(o.targetGeometry,Dt,t.renderSpatialReference,0,{signal:r});const e=J(i.frustum,Dt)?p(i.eye,Dt):i.distance;o.camera=await _(t,o.targetGeometry,e,a,s),o.scale=$(t,e)}else o.scale=n,o.camera=await et(t,o.targetGeometry,o.scale,a,s,r)}return o}async function Tt(t,e,n,a,r){const o=L(t);g(Jt,o.viewForward),nt(t,o.eye,Jt,o.up,Nt);const i=t.spatialReference,{position:s}=e;if(s){const t=await R(s,i,{signal:r});n.position=t}else n.position=new b;return n.heading=null!=e.heading?e.heading:Nt.heading,n.tilt=null!=e.tilt?e.tilt:Nt.tilt,jt(t,null,n,a)}async function Mt(t,e,n,a,r){if(null!=e.heading||null!=e.rotation||null!=e.scale||null!=e.tilt||null!=e.zoom||null!=e.zoomFactor){const o=L(t),{spatialReference:i,renderSpatialReference:s}=t,c=new b({spatialReference:i});return T(o.center,s,c)?Bt(t,e,c,n,a,r):r}return r.scale=t.scale,r.camera=t.camera.clone(),xt(r.camera,e),r}async function Zt(t,e,n,a,r,o){o.targetGeometry=n.clone();const i=L(t);Y(t,i,a);const s=xt(a,e)?q.LOCKED:q.ADJUST;return o.camera=await W(t,n,a.heading,a.tilt,s,r),o}function At(t,e,n,a,r){let o=0;null!=n.z?o=n.z:t.basemapTerrain&&t.elevationProvider&&(o=rt(t.elevationProvider,n)),h(Dt,n.x,n.y,o),S(t.spatialReference,Dt,Vt,t.renderSpatialReference),s(Ct,Vt),c(Ct,Ct),O(kt);const i=[[0,1,2],[3,1,2],[0,4,2],[3,4,2],[0,1,5],[3,1,5],[0,4,5],[3,4,5]];for(let s=0;s<i.length;s++){const e=i[s];let n=a[e[2]];isFinite(n)||(n=o),h(Dt,a[e[0]],a[e[1]],n),M(Dt,t.spatialReference,Dt,t.renderSpatialReference),P(kt,d(Dt,Dt,Ct))}const l=D(kt),m=V(kt),u=C(kt),f=1/Math.tan(e.fovX/2),p=1/Math.tan(e.fovY/2),g=.5*Math.sqrt(l*l+u*u)*Math.max(p,f)+.5*m,y=.5*m*p+.5*Math.max(l,u);return Math.max(g,y)/r}async function Et(t,e,n,a,r,o,i,s){s.targetGeometry=n.clone();const c=L(t),l=At(t,c,n,a,r);Y(t,c,o);const m=xt(o,e)?q.LOCKED:q.ADJUST;return s.camera=await _(t,s.targetGeometry,l,o,m,i),s.scale=$(t,l),s}function Ft(t,e){if(!e||!t.spatialReference)return null;const n={target:void 0};return"declaredClass"in e||Array.isArray(e)?n.target=e:(Object.assign(n,e),!n.target&&"center"in e&&e.center&&(n.target=e.center)),n}function Ot(t){return null!=t?.camera&&(t.rotation=st(t.camera.heading)),t}function Pt(t,e){const n=ot;if(!e.length)return n;let a=Number.NEGATIVE_INFINITY;for(let r=0;r<e.length;r++){const t=e[r].screenSpaceBoundingRect;a=Math.max(a,Math.abs(t[0]),Math.abs(t[1]),Math.abs(t[2]),Math.abs(t[3]))}return n-a/Math.min(t.width,t.height)*2}class Ut{constructor(){this.hasZ=!1,this.boundingBox=O(),this.screenSpaceObjects=new Array}}const Dt=w(),Vt=m(),Ct=l(),kt=Z(),It=k(),Jt=w(),Kt=w(),Lt=w(),Nt={heading:0,tilt:0},Wt=new b,Yt={point(t,e,n){n[0]=t.x,n[1]=t.y,null!=t.z&&(n[2]=t.z),e(n)},polygon(t,e,n){const a=t.hasZ;for(let r=0;r<t.rings.length;r++){const o=t.rings[r];for(let t=0;t<o.length;t++)n[0]=o[t][0],n[1]=o[t][1],a&&(n[2]=o[t][2]),e(n)}},polyline(t,e,n){const a=t.hasZ;for(let r=0;r<t.paths.length;r++){const o=t.paths[r];for(let t=0;t<o.length;t++)n[0]=o[t][0],n[1]=o[t][1],a&&(n[2]=o[t][2]),e(n)}},multipoint(t,e,n){const a=t.points,r=t.hasZ;for(let o=0;o<a.length;o++)n[0]=a[o][0],n[1]=a[o][1],r&&(n[2]=a[o][2]),e(n)},extent(t,e,n){null!=t.zmin&&null!=t.zmax?(e(h(n,t.xmin,t.ymin,t.zmin)),e(h(n,t.xmax,t.ymin,t.zmin)),e(h(n,t.xmin,t.ymax,t.zmin)),e(h(n,t.xmax,t.ymax,t.zmin)),e(h(n,t.xmin,t.ymin,t.zmax)),e(h(n,t.xmax,t.ymin,t.zmax)),e(h(n,t.xmin,t.ymax,t.zmax)),e(h(n,t.xmax,t.ymax,t.zmax))):(e(h(n,t.xmin,t.ymin,n[2])),e(h(n,t.xmax,t.ymin,n[2])),e(h(n,t.xmin,t.ymax,n[2])),e(h(n,t.xmax,t.ymax,n[2])))}};export{ht as create,yt as fromCamera,lt as toCameraAsync,ct as toCameraSync};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import{projectWithoutEngine as i}from"../../../geometry/projection.js";import{fromExtent as l,empty as s,expand as o,allFinite as a,equals as c}from"../../../geometry/support/aaBoundingRect.js";import{isIntegratedMeshOperationalLayer as p,isTiledLayer as u}from"../../../layers/support/layerUtils.js";import{ViewingMode as y}from"../../ViewingMode.js";import{webMercatorWorldExtent as f,geographicWorldExtent as d}from"./TerrainConst.js";import{getTiledLayerInfo as E,isProjectableRasterLayer as m}from"./terrainUtils.js";let x=class extends t{constructor(e){super(e)}initialize(){this.addHandles([this.layerViews.on("change",(()=>this.notifyChange("stencilEnabledExtents")))])}destroy(){}get layerViewsExtent(){return this._computeLayerViewsExtent()}get tiledLayersExtent(){return this._computeTiledLayersExtent()}get stencilEnabledExtents(){return this._computeStencilEnabledExtents()}_computeStencilEnabledExtents(){const e=[];return this.layerViews.forEach((t=>{const r=t.layer;if("operationalLayerType"in r&&p(r.operationalLayerType)&&null!=this.viewSpatialReference){const t=L(r.fullExtent,this.viewSpatialReference);null!=t&&e.push(l(t))}})),e}};function h(e,t){return e===y.Global?new w(t):new g(t)}e([r({readOnly:!0})],x.prototype,"layerViewsExtent",null),e([r({readOnly:!0})],x.prototype,"tiledLayersExtent",null),e([r({readOnly:!0})],x.prototype,"stencilEnabledExtents",null),e([r()],x.prototype,"viewSpatialReference",void 0),e([r()],x.prototype,"tilingScheme",void 0),e([r()],x.prototype,"defaultTiledLayersExtent",void 0),e([r({constructOnly:!0})],x.prototype,"layers",void 0),e([r({constructOnly:!0})],x.prototype,"layerViews",void 0),x=e([n("esri.views.3d.terrain.ExtentHelper")],x);let w=class extends x{_computeLayerViewsExtent(){return this._globalExtent}_computeTiledLayersExtent(){return this._globalExtent}get _globalExtent(){return this.viewSpatialReference.isWebMercator?f:d}};w=e([n("esri.views.3d.terrain.ExtentHelper.ExtentHelperGlobal")],w);let g=class extends x{_computeLayerViewsExtent(){const e=s(),t=this.viewSpatialReference;this.layerViews.forEach((r=>{const n=r.layer;if(r.isResolved()&&("graphics"!==n.type||!n.internal)){const n=L("fullExtentInLocalViewSpatialReference"in r&&r.fullExtentInLocalViewSpatialReference||r.layer.fullExtent,t);o(e,n,e)}}));const r=a(e)?e:null,n=this._get("layerViewsExtent");return c(r,n)?n:r}_computeTiledLayersExtent(){const e=this.tilingScheme;if(!e)return null;const t=this.viewSpatialReference,r=s();this.layers.forEach((n=>{if(n.loaded&&u(n)){const i=E(n,t,y.Local);if(null==i)return;const{tileInfo:l,fullExtent:s}=i,a="tilemapCache"in n?n.tilemapCache?.effectiveMaxLOD:void 0;null!=l&&null!=s&&(m(n)||e.compatibleWith(l,a)&&s.spatialReference.equals(e.spatialReference))&&o(r,s,r)}})),o(r,this.defaultTiledLayersExtent,r);const n=a(r)?r:null,i=this._get("tiledLayersExtent");return c(n,i)?i:n}};function L(e,t){return null==e||e.spatialReference.equals(t)?e:i(e,e.spatialReference,t)}g=e([n("esri.views.3d.terrain.ExtentHelper.ExtentHelperLocal")],g);export{x as ExtentHelper,h as create};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import{projectWithoutEngine as i}from"../../../geometry/projectionUtils.js";import{fromExtent as l,empty as s,expand as o,allFinite as a,equals as c}from"../../../geometry/support/aaBoundingRect.js";import{isIntegratedMeshOperationalLayer as p,isTiledLayer as u}from"../../../layers/support/layerUtils.js";import{ViewingMode as y}from"../../ViewingMode.js";import{webMercatorWorldExtent as f,geographicWorldExtent as d}from"./TerrainConst.js";import{getTiledLayerInfo as E,isProjectableRasterLayer as m}from"./terrainUtils.js";let x=class extends t{constructor(e){super(e)}initialize(){this.addHandles([this.layerViews.on("change",(()=>this.notifyChange("stencilEnabledExtents")))])}destroy(){}get layerViewsExtent(){return this._computeLayerViewsExtent()}get tiledLayersExtent(){return this._computeTiledLayersExtent()}get stencilEnabledExtents(){return this._computeStencilEnabledExtents()}_computeStencilEnabledExtents(){const e=[];return this.layerViews.forEach((t=>{const r=t.layer;if("operationalLayerType"in r&&p(r.operationalLayerType)&&null!=this.viewSpatialReference){const t=L(r.fullExtent,this.viewSpatialReference);null!=t&&e.push(l(t))}})),e}};function h(e,t){return e===y.Global?new w(t):new g(t)}e([r({readOnly:!0})],x.prototype,"layerViewsExtent",null),e([r({readOnly:!0})],x.prototype,"tiledLayersExtent",null),e([r({readOnly:!0})],x.prototype,"stencilEnabledExtents",null),e([r()],x.prototype,"viewSpatialReference",void 0),e([r()],x.prototype,"tilingScheme",void 0),e([r()],x.prototype,"defaultTiledLayersExtent",void 0),e([r({constructOnly:!0})],x.prototype,"layers",void 0),e([r({constructOnly:!0})],x.prototype,"layerViews",void 0),x=e([n("esri.views.3d.terrain.ExtentHelper")],x);let w=class extends x{_computeLayerViewsExtent(){return this._globalExtent}_computeTiledLayersExtent(){return this._globalExtent}get _globalExtent(){return this.viewSpatialReference.isWebMercator?f:d}};w=e([n("esri.views.3d.terrain.ExtentHelper.ExtentHelperGlobal")],w);let g=class extends x{_computeLayerViewsExtent(){const e=s(),t=this.viewSpatialReference;this.layerViews.forEach((r=>{const n=r.layer;if(r.isResolved()&&("graphics"!==n.type||!n.internal)){const n=L("fullExtentInLocalViewSpatialReference"in r&&r.fullExtentInLocalViewSpatialReference||r.layer.fullExtent,t);o(e,n,e)}}));const r=a(e)?e:null,n=this._get("layerViewsExtent");return c(r,n)?n:r}_computeTiledLayersExtent(){const e=this.tilingScheme;if(!e)return null;const t=this.viewSpatialReference,r=s();this.layers.forEach((n=>{if(n.loaded&&u(n)){const i=E(n,t,y.Local);if(null==i)return;const{tileInfo:l,fullExtent:s}=i,a="tilemapCache"in n?n.tilemapCache?.effectiveMaxLOD:void 0;null!=l&&null!=s&&(m(n)||e.compatibleWith(l,a)&&s.spatialReference.equals(e.spatialReference))&&o(r,s,r)}})),o(r,this.defaultTiledLayersExtent,r);const n=a(r)?r:null,i=this._get("tiledLayersExtent");return c(n,i)?i:n}};function L(e,t){return null==e||e.spatialReference.equals(t)?e:i(e,e.spatialReference,t)}g=e([n("esri.views.3d.terrain.ExtentHelper.ExtentHelperLocal")],g);export{x as ExtentHelper,h as create};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Color.js";import has from"../../../core/has.js";import{disposeMaybe as i}from"../../../core/maybe.js";import{MemCachePool as r}from"../../../core/MemCachePool.js";import s from"../../../core/ObjectPool.js";import{watch as n,sync as a}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{d as c,i as d,e as h}from"../../../chunks/vec32.js";import{ZEROS as u,create as g,fromValues as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as _,ZEROS as f}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as m,set as b}from"../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as y}from"../../../geometry/support/buffer/BufferView.js";import{ViewingMode as T}from"../../ViewingMode.js";import{TextureUpdate as R}from"./interfaces.js";import{LayerClass as x}from"./LayerClass.js";import{OverlayContent as O}from"./OverlayContent.js";import{overlayRenderOccludedFlag as v}from"./OverlayRenderer.js";import{PatchRenderData as w}from"./PatchRenderData.js";import{RenderOrder as P}from"./RenderOrder.js";import{TerrainAttributesCache as D}from"./TerrainAttributesCache.js";import{enableTerrainInternalChecks as S}from"./terrainUtils.js";import{TileRenderer as E}from"./TileRenderer.js";import{TileUpdate as C}from"./TileUpdate.js";import{IteratorPreorder as A,sortTiles as j,compareTiles as N}from"./tileUtils.js";import{TransparencyMode as B}from"./TransparencyMode.js";import{componentMinimalSizeForIntersectionData as I,ComponentIntersectionData as F}from"../webgl-engine/collections/Component/ComponentIntersectionData.js";import{ShaderOutput as q}from"../webgl-engine/core/shaderLibrary/ShaderOutput.js";import{TileBlendInput as M}from"../webgl-engine/core/shaderLibrary/terrain/TileBlendInput.js";import{SyncRenderPlugin as U,ConsumesDepth as G,ConsumesNone as L}from"../webgl-engine/effects/RenderPlugin.js";import{Vertices as k}from"../webgl-engine/lib/Attribute.js";import{RenderRequestType as z}from"../webgl-engine/lib/basicInterfaces.js";import{StoreResults as H}from"../webgl-engine/lib/IntersectorInterfaces.js";import{IntersectorResult as V}from"../webgl-engine/lib/IntersectorResult.js";import{IntersectorType as Y}from"../webgl-engine/lib/IntersectorType.js";import{RenderOccludedFlag as Q}from"../webgl-engine/lib/Material.js";import{intersectAabbInvDirBefore as W,MeshIntersectionOptions as X,intersectTriangles as K}from"../webgl-engine/lib/RayIntersections.js";import{RenderSlot as Z}from"../webgl-engine/lib/RenderSlot.js";import{getSettings as J}from"../webgl-engine/lib/screenSizePerspectiveUtils.js";import{VertexAttribute as $}from"../webgl-engine/lib/VertexAttribute.js";import{terrainId as ee,getVerticalOffsetTerrain as te}from"../webgl-engine/lib/verticalOffsetUtils.js";import{DrawParameters as ie}from"../webgl-engine/materials/DrawParameters.js";import{T as re}from"../../../chunks/Terrain.glsl.js";import{TerrainTechnique as se}from"../webgl-engine/shaders/TerrainTechnique.js";import{TerrainTechniqueConfiguration as ne}from"../webgl-engine/shaders/TerrainTechniqueConfiguration.js";import{PrimitiveType as ae}from"../../webgl/enums.js";const oe=7,le=10,ce=m();let de=class extends U{get _isGlobal(){return this._stage.viewingMode===T.Global}get _techniques(){return this._context.techniques}get _rctx(){return this._context.renderContext.rctx}constructor(e,t,i,n,a,o){super({}),this._overlayRenderer=e,this._stage=t,this._allTiles=i,this._ellipsoidRadius=n,this._compressionHandle=a,this.type=Y.TERRAIN,this.isGround=!0,this._passParameters=new re,this._drawParameters=new ie,this._renderDataPool=new s(w),this._visiblePatchesByOrigin=new Map,this._allPatchesByOrigin=new Map,this._patchesByOriginDirty=!0,this._patchSortingDirty=!0,this._tileIterator=new A,this._castShadows=!1,this._inViewshed=!1,this._tileRenderer=null,this._stencilEnabledLayerExtents=new Array,this._numTilesRendered=0,this._numTilesCulled=0,this._numOriginsRendered=0,this.renderOccludedFlags=Q.Occlude,this.produces=new Map([[Z.OPAQUE_TERRAIN,()=>this._produces()&&this.transparency===B.Opaque],[Z.TRANSPARENT_TERRAIN,()=>this._produces()&&(this.transparency===B.Transparent||this.transparency===B.InvisibleWithDraped)],[Z.OCCLUDED_TERRAIN,()=>this._produces()&&this.renderOccludedFlags===v]]),this._tileSize=256,this._configuration=new ne(t.viewingMode===T.Global),this._tileTextureCache=new r(((e,t)=>o.newCache(e,t)),"TileTexture"),this.tileGeometryCache=new D(o)}normalizeCtorArgs(){return{}}initialize(){this._stage.addRenderPlugin(this),this.addHandles(n((()=>this._overlayRenderer.rendersOccludedDraped),(e=>{this.renderOccludedFlags=e?v:Q.Occlude,this.setNeedsRender()}),a))}destroy(){this._stage.removeRenderPlugin(this),this._tileTextureCache.destroy(),this.tileGeometryCache.destroy()}_produces(){return this.visible&&!!this._rootTiles&&!this.renderingDisabled}consumes(){return this._overlayRenderer.hasWater?G:L}set renderingDisabled(e){this._set("renderingDisabled",!!e),this.setDirty()}set visible(e){this._set("visible",!!e),this.setDirty()}updateHeading(e){this._tileRenderer?.updateHeading(e)}set transparency(e){this._configuration.transparencyMode!==e&&(this._configuration.transparencyMode=e,this.setNeedsRender())}get transparency(){return this._configuration.transparencyMode}get renderPatchBorders(){return this._configuration.tileBorders}set renderPatchBorders(e){this._configuration.tileBorders!==e&&(this._configuration.tileBorders=e,this.setNeedsRender(),this.notifyChange("renderPatchBorders"))}get visualizeNormals(){return this._configuration.visualizeNormals}set visualizeNormals(e){this._configuration.visualizeNormals!==e&&(this._configuration.visualizeNormals=e,this.setNeedsRender(),this.notifyChange("visualizeNormals"))}get cullBackFaces(){return this._configuration.backfaceCullingEnabled}set cullBackFaces(e){this._configuration.backfaceCullingEnabled!==e&&(this._configuration.backfaceCullingEnabled=e,this.notifyChange("cullBackFaces"),this.setNeedsRender())}set renderOrder(e){this._set("renderOrder",e),this._setSortingDirty()}get layerViewUid(){return ee}get slicePlaneEnabled(){return this._configuration.hasSlicePlane}set slicePlaneEnabled(e){this._configuration.hasSlicePlane!==e&&(this._configuration.hasSlicePlane=e,this.setNeedsRender())}set textureFadingEnabled(e){this._configuration.textureFadingEnabled!==e&&(this._configuration.textureFadingEnabled=e,this.setNeedsRender())}set pbrMode(e){this._configuration.pbrMode!==e&&(this._configuration.pbrMode=e,this.setNeedsRender())}setDebugScreenSizePerspective(e){this._configuration.screenSizePerspective!==e&&(this._configuration.screenSizePerspective=e,this.setNeedsRender())}setRootTiles(e){this._rootTiles=e,this.setDirty()}setStencilEnabledLayerExtents(e){this._stencilEnabledLayerExtents=e,this._setSortingDirty()}set tileSize(e){this._tileSize=e,null!=this._tileRenderer&&(this._tileRenderer.tileSize=e),this.setDirty()}get tileSize(){return this._tileSize}_ensureRenderData(e){e.renderData||(e.renderData=this._renderDataPool.acquire(),e.renderData.init(e,this._getLocalOriginOfTile(e)))}loadTile(e){this._ensureRenderData(e),this.updateTileGeometryState(e),this.reuseTextureFromParent(e)||this.updateTileTexture(e,C.TEXTURE_FADING)}reuseTextureFromParent(e){const t=e.parent;if(!t)return!1;const i=_(1&e.lij[2]?.5:0,1&e.lij[1]?0:.5,.5,.5);return t.renderData?.reuseTexture(e.renderData,i)??!1}updateTileTexture(e,t){null!=this._tileRenderer&&(this._tileRenderer.updateTileTexture(e,t===C.TEXTURE_FADING?R.FADING:R.UNFADED),this.setNeedsRender(),e.resetPendingUpdate(t))}updateTileGeometryState(e){for(const i of e.layerInfo[x.ELEVATION])i.pendingUpdates&=~C.GEOMETRY;e.resetPendingUpdate(C.GEOMETRY);const t=e.renderData.updateGeometryState();return t&&this.setDirty(),t}updateGeometryIfNeeded(e){e.loaded&&e.renderData.updateGeometryIfNeeded(this._rctx)}unloadTile(e){const t=e.renderData;t&&(t.releaseGeometry(),this._renderDataPool.release(t),t.clear(),e.renderData=null,e.setMemoryDirty(),this.setDirty())}_getLocalOriginOfTile(e){const t=le-oe,i=Math.max(0,Math.floor((e.level-t)/oe)*oe);if(this._isGlobal&&0===i)return u;for(;e.parent&&e.level>i;)e=e.parent;return e.centerAtSeaLevel}getStats(){return{numTilesRendered:this._numTilesRendered,numTilesCulled:this._numTilesCulled,numOriginsRendered:this._numOriginsRendered}}set wireframe(e){this._get("wireframe")!==e&&(this._set("wireframe",e),this.setNeedsRender())}setDirty(e=z.UPDATE){this._patchesByOriginDirty=!0,this._context.requestRender(e)}_setSortingDirty(e=z.UPDATE){this._patchSortingDirty=!0,this._context.requestRender(e)}setNeedsRender(e=z.UPDATE){this._context.requestRender(e)}initializeRenderContext(e){this._context=e,this._tileRenderer=new E(this._rctx,this._tileSize,this._techniques,this._tileTextureCache,this._compressionHandle),this.updateTileBackground()}uninitializeRenderContext(){this._tileRenderer=i(this._tileRenderer)}intersect(e,t,i,r){if(!this._rootTiles||e.options.selectOpaqueTerrainOnly&&e.options.selectionMode&&this.transparency!==B.Opaque)return;const s=he,n=ue;c(s,r,i),d(n,1/s[0],1/s[1],1/s[2]);const a=e.results.min,o=e.results.max,l=e.results.ground,u=e.options.store===H.MIN,g=!!e.results.ground.target,p=te(e.verticalOffset),_=e.tolerance;let f,m=u&&null!=a.distance?a.distance:1/0;const T=e.options,R=T.normalRequired||!T.backfacesTerrain,x=new X(!1,R),O=d=>{const g=d.renderData;if(!g?.vao)return;const O=g.geometry;b(ce,O.boundingBox);const v=g.localOrigin;null!=p&&(p.localOrigin=v,p.applyToAabb(ce));const w=ce;if(ge[0]=i[0]-v[0],ge[1]=i[1]-v[1],ge[2]=i[2]-v[2],!W(w,ge,n,_,m))return;const P=(e,t,i)=>{e.set(this.type,d,t,i),m=u&&null!=a.distance?a.distance:1/0},D=(n,c,d)=>{if((!R||null!=d)&&n>=0&&(T.backfacesTerrain||h(d,s)<0)&&(T.invisibleTerrain||!T.selectionMode||null==t||t(i,r,n))){if((null==l.distance||n<l.distance)&&P(l,n,d),T.isFiltered)return;T.store===H.ALL&&(null==f?(f=new V(e.ray),P(f,n,d),e.results.all.push(f)):n<f.distance&&P(f,n,d)),(null==a.distance||n<a.distance)&&P(a,n,d),T.store!==H.MIN&&(null==o.distance||n>o.distance)&&P(o,n,d)}},S=pe;c(S,r,v);const{indices:E,indexCount:C}=O,A=O.vertexAttributes,j=A.getField($.POSITION,y),N=new k(j.typedBuffer,3,A.stride/4),B=C/3;if(!p&&B>I){const e=d.renderData;null==e.intersectionData&&(e.intersectionData=new F(E,0,B,N)),e.intersectionData.intersectRay(ge,S,x,D)}else K(ge,S,0,B,E,N,p,x,D)},v=this._rootTiles;if(null!=v){(()=>{const t=this._tileIterator;t.reset(v);const r=e.options.invisibleTerrain;for(let e=t.next();e;e=t.next())!(e.visible||r&&e.intersectsClippingArea)||null==p&&!e.intersectsRay(i,s,_,m)||g&&this._useStencilForTile(e)?t.skipSubtree():O(e)})()}}processScaleRangeQueries(e,t){if(!t.done&&e)for(this._updatePatchGroups();e.updating&&!t.done;){e.prepare();for(const t of this._visiblePatchesByOrigin.values())for(const i of t)null!=i.renderData?.textureReference&&e.queriesForTile(i);e.process(),t.madeProgress()}}acquireTechniques(e){const t=!!has("enable-feature:terrain-shadows")&&e.bind.shadowMap.enabled;t!==this._castShadows&&(this._castShadows=t,this._patchesByOriginDirty=!0);const i=e.bind.viewshedEnabled;if(this._inViewshed!==i&&(this._inViewshed=i,this._patchesByOriginDirty=!0),e.bind.slot===Z.OCCLUDED_TERRAIN){if(0===(e.renderOccludedMask&v))return null}else{const t=this.transparency===B.Opaque?Z.OPAQUE_TERRAIN:Z.TRANSPARENT_TERRAIN;if(e.bind.slot!==t)return null}if(this.transparency===B.Invisible)return null;const r=this._configuration;switch(r.screenSpaceReflections=r.cloudReflections=r.receiveShadows=r.receiveAmbientOcclusion=r.renderOccluded=r.hasHighlightMixTexture=!1,r.overlayMode=this._overlayRenderer.mode,e.output){case q.Color:case q.ColorEmission:{r.screenSpaceReflections=null!=e.bind.ssr.lastFrameColor,r.cloudReflections=null!=e.bind.clouds.data,r.receiveShadows=e.bind.shadowMap.ready;const t=e.bind.slot===Z.OCCLUDED_TERRAIN;return r.renderOccluded=t,r.receiveAmbientOcclusion=!t&&null!=e.bind.ssao,this._acquireTechnique(e.output)}case q.Shadow:case q.ShadowExcludeHighlight:return this._castShadows?this._acquireTechnique(q.Shadow):null;case q.ViewshedShadow:return this._inViewshed?this._acquireTechnique(q.ViewshedShadow):null;case q.Depth:case q.Normal:return this._acquireTechnique(e.output);case q.ObjectAndLayerIdColor:return this._acquireTechnique(q.ObjectAndLayerIdColor);case q.Highlight:return r.hasHighlightMixTexture=null!=e.bind.highlightMixTexture,this._overlayRenderer.hasHighlights?this._acquireTechnique(q.Highlight):null}return null}render(e,t){switch(this._updatePatchGroups(),t.useStencil=!1,e.output){case q.Color:case q.ColorEmission:{const i=e.bind.slot===Z.OCCLUDED_TERRAIN?O.Occluded:O.Color;this._renderMaterialPass(e,t,i);break}case q.Depth:case q.Normal:this._renderAuxiliaryPass(e,t,O.Color,this._visiblePatchesByOrigin);break;case q.Highlight:{const i=e.bind.highlight?.name;i&&this._overlayRenderer.hasHighlights&&this._overlayRenderer.renders(O.Highlight)&&this._overlayRenderer.hasHighlight(i)&&this._renderAuxiliaryPass(e,t,O.Highlight,this._visiblePatchesByOrigin);break}case q.Shadow:case q.ShadowExcludeHighlight:case q.ViewshedShadow:this._renderAuxiliaryPass(e,t,null,this._allPatchesByOrigin);break;case q.ObjectAndLayerIdColor:this._renderAuxiliaryPass(e,t,O.ObjectAndLayerIdColor,this._visiblePatchesByOrigin)}}updateTileBackground(e){if(null==this._tileRenderer)return;const i=this._tileRenderer;let r;if(null!=e){const i=t.toUnitRGBA(e);r=p(i[0]||0,i[1]||0,i[2]||0)}i.setBackground(r),this._allTiles.forAll((e=>i.updateTileTexture(e,R.FADING))),this._configuration.tileBlendInput=i.backgroundIsGrid?M.GridComposite:null!=i.backgroundColor?M.ColorComposite:M.LayerOnly,this.setNeedsRender()}_updatePatchGroups(){if(this._patchesByOriginDirty&&(this._rebuildPatchGroups(),this._patchesByOriginDirty=!1,this._patchSortingDirty=!0),this._patchSortingDirty&&this.renderOrder!==P.NONE){const e=Array.from(this._visiblePatchesByOrigin.values()),t=this._stencilEnabledLayerExtents;for(const i of e)j(this.renderOrder,i,t);e.sort(((e,t)=>N(e[0],t[0],this.renderOrder))),this._visiblePatchesByOrigin=new Map(e.map((e=>[e[0].renderData.localOrigin,e]))),this._patchSortingDirty=!1}}_rebuildPatchGroups(){const e=this._rootTiles;if(null!=e){e[0]?.surface.checkAllTilesWaterproofness(),this._visiblePatchesByOrigin.clear(),this._allPatchesByOrigin.clear();for(const t of e)this._rebuildPatchGroupsForRootTile(t)}}_rebuildPatchGroupsForRootTile(e){const t=this._tileIterator;for(t.resetOne(e);!t.done;){const e=t.next(),i=e.renderData;if(!i){this._numTilesCulled++;continue}const r=i.localOrigin;if(this._castShadows||this._inViewshed){let t=this._allPatchesByOrigin.get(r);t||(t=[],this._allPatchesByOrigin.set(r,t)),t.push(e)}if(!e.visible){this._numTilesCulled++,t.skipSubtree();continue}let s=this._visiblePatchesByOrigin.get(r);s||(s=[],this._visiblePatchesByOrigin.set(r,s)),s.push(e),t.skipSubtree()}}_useStencilForTile(e){for(const t of this._stencilEnabledLayerExtents)if(e.intersectsExtent(t))return!0;return!1}_renderAuxiliaryPass(e,t,i,r){const s=e.rctx;this._passParameters.overlayContent=i,s.bindTechnique(t,e.bind,this._passParameters);const n=this._stencilEnabledLayerExtents.length>0;r.forEach((r=>{this._drawParameters.origin=r[0].renderData.localOrigin,t.program.bindDraw(e.bind,this._passParameters,this._drawParameters);for(let s=0;s<r.length;s++)this._renderPatch(e,t,r[s],ae.TRIANGLES,n,i)})),e.rctx.bindVAO(null)}_renderMaterialPass(e,t,i){const{rctx:r}=e;this._passParameters.overlayContent=i,r.bindTechnique(t,e.bind,this._passParameters),this._numTilesRendered=0,this._numTilesCulled=0,this._numOriginsRendered=0;const s=e.bind.camera,n=t.program;if(this._configuration.screenSizePerspective&&this.pointsOfInterest){const e=J(this._stage.viewingMode,this._ellipsoidRadius),t=this.pointsOfInterest.centerOnSurfaceFrequent.distance;e.update({distance:t,fovY:s.fovY})}const a=this._stencilEnabledLayerExtents.length>0,o=i===O.Occluded;o&&(n.bindTexture("tex",r.emptyTexture),n.setUniform3fv("textureOpacities",u),n.setUniform4fv("texOffsetAndScale",f));const l=null!=this._tileRenderer?.backgroundColor?this._tileRenderer.backgroundColor:u;this._configuration.tileBlendInput===M.ColorComposite&&n.setUniform3fv("backgroundColor",l);const c=this.wireframe?ae.LINES:ae.TRIANGLES;this._configuration.textureFadingEnabled&&n.bindTexture("texNext",r.emptyTexture);const d=this._visiblePatchesByOrigin;for(const h of d.values()){const r=h[0].renderData.localOrigin;this._drawParameters.origin=r,t.program.bindDraw(e.bind,this._passParameters,this._drawParameters),this._numOriginsRendered++;for(const s of h){const r=s.renderData,l=r.textureReference;if(null!=l){if(!o){n.setUniform4fv("texOffsetAndScale",l.offsetAndScale),n.bindTexture("tex",l.texture.texture);const e=r.textureFadeFactor,t=e<1?r.nextTextureReference:null;this._configuration.textureFadingEnabled&&t&&e<1?(n.setUniform1f("fadeFactor",e),n.setUniform4fv("nextTexOffsetAndScale",t.offsetAndScale),n.setUniform3fv("nextTexOpacities",t.opacities),n.bindTexture("texNext",t.texture.texture)):n.setUniform1f("fadeFactor",1),r.textureIsFading&&this.setNeedsRender(),n.setUniform3fv("textureOpacities",l.opacities)}this._renderPatch(e,t,s,c,a,i),s.renderOrder=this._numTilesRendered,this._numTilesRendered++}}}e.rctx.bindVAO(null)}_renderPatch(e,t,i,r,s,n){const a=i.renderData,o=a.vao,l=o?.indexBuffer;if(!o||null==l)return void(S&&console.error("Rendered tile with no indices: ",i.lij," : ",a));const c=t.program;null==n||this._overlayRenderer.isEmpty||this._bindOverlayPatchData(c,a.overlay),s&&(t.useStencil=this._useStencilForTile(i),e.rctx.setPipelineState(t.getPipeline()));const d=a.geometry.indexCount;e.rctx.bindVAO(o),c.assertCompatibleVertexAttributeLocations(o),e.rctx.drawElements(r,d,l.indexType,0)}_bindOverlayPatchData(e,t){e.setUniform4fv("overlayTexOffset",t.offsets),e.setUniform4fv("overlayTexScale",t.scales)}_acquireTechnique(e){return this._configuration.output=e,this._techniques.get(se,this._configuration)}get test(){}hasHighlight(e){return this._overlayRenderer.hasHighlight(e)}};e([o({readOnly:!0})],de.prototype,"_isGlobal",null),e([o()],de.prototype,"renderOccludedFlags",void 0),e([o({value:!1})],de.prototype,"renderingDisabled",null),e([o({value:!0})],de.prototype,"visible",null),e([o()],de.prototype,"renderPatchBorders",null),e([o()],de.prototype,"visualizeNormals",null),e([o()],de.prototype,"cullBackFaces",null),e([o({value:P.FRONT_TO_BACK})],de.prototype,"renderOrder",null),e([o()],de.prototype,"wireframe",null),de=e([l("esri.views.3d.terrain.TerrainRenderer")],de);const he=g(),ue=g(),ge=g(),pe=g();export{de as TerrainRenderer};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Color.js";import has from"../../../core/has.js";import{disposeMaybe as i}from"../../../core/maybe.js";import{MemCachePool as r}from"../../../core/MemCachePool.js";import s from"../../../core/ObjectPool.js";import{watch as n,sync as a}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{d as c,i as d,e as h}from"../../../chunks/vec32.js";import{ZEROS as u,create as g,fromValues as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as _,ZEROS as f}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as m,set as b}from"../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as y}from"../../../geometry/support/buffer/BufferView.js";import{ViewingMode as T}from"../../ViewingMode.js";import{TextureUpdate as O}from"./interfaces.js";import{LayerClass as R}from"./LayerClass.js";import{OverlayContent as x}from"./OverlayContent.js";import{overlayRenderOccludedFlag as v}from"./OverlayRenderer.js";import{PatchRenderData as w}from"./PatchRenderData.js";import{RenderOrder as P}from"./RenderOrder.js";import{TerrainAttributesCache as D}from"./TerrainAttributesCache.js";import{enableTerrainInternalChecks as S}from"./terrainUtils.js";import{TileRenderer as C}from"./TileRenderer.js";import{TileUpdate as E}from"./TileUpdate.js";import{IteratorPreorder as j,sortTiles as A,compareTiles as N}from"./tileUtils.js";import{TransparencyMode as B}from"./TransparencyMode.js";import{componentMinimalSizeForIntersectionData as I,ComponentIntersectionData as U}from"../webgl-engine/collections/Component/ComponentIntersectionData.js";import{ShaderOutput as G}from"../webgl-engine/core/shaderLibrary/ShaderOutput.js";import{TileBlendInput as F}from"../webgl-engine/core/shaderLibrary/terrain/TileBlendInput.js";import{SyncRenderPlugin as q,ConsumesDepth as M,ConsumesNone as L}from"../webgl-engine/effects/RenderPlugin.js";import{Vertices as k}from"../webgl-engine/lib/Attribute.js";import{RenderRequestType as z}from"../webgl-engine/lib/basicInterfaces.js";import{StoreResults as H}from"../webgl-engine/lib/IntersectorInterfaces.js";import{IntersectorResult as V}from"../webgl-engine/lib/IntersectorResult.js";import{IntersectorType as Y}from"../webgl-engine/lib/IntersectorType.js";import{RenderOccludedFlag as Q}from"../webgl-engine/lib/Material.js";import{intersectAabbInvDirBefore as W,MeshIntersectionOptions as X,intersectTriangles as K}from"../webgl-engine/lib/RayIntersections.js";import{RenderSlot as Z}from"../webgl-engine/lib/RenderSlot.js";import{getSettings as J}from"../webgl-engine/lib/screenSizePerspectiveUtils.js";import{VertexAttribute as $}from"../webgl-engine/lib/VertexAttribute.js";import{terrainId as ee,getVerticalOffsetTerrain as te}from"../webgl-engine/lib/verticalOffsetUtils.js";import{DrawParameters as ie}from"../webgl-engine/materials/DrawParameters.js";import{T as re}from"../../../chunks/Terrain.glsl.js";import{TerrainTechnique as se}from"../webgl-engine/shaders/TerrainTechnique.js";import{TerrainTechniqueConfiguration as ne}from"../webgl-engine/shaders/TerrainTechniqueConfiguration.js";import{PrimitiveType as ae}from"../../webgl/enums.js";const oe=7,le=10,ce=m();let de=class extends q{get _isGlobal(){return this._stage.viewingMode===T.Global}get _techniques(){return this._context.techniques}get _rctx(){return this._context.renderContext.rctx}constructor(e,t,i,n,a,o){super({}),this._overlayRenderer=e,this._stage=t,this._allTiles=i,this._ellipsoidRadius=n,this._compressionHandle=a,this.type=Y.TERRAIN,this.isGround=!0,this._passParameters=new re,this._drawParameters=new ie,this._renderDataPool=new s(w),this._visiblePatchesByOrigin=new Map,this._allPatchesByOrigin=new Map,this._patchesByOriginDirty=!0,this._patchSortingDirty=!0,this._tileIterator=new j,this._castShadows=!1,this._inViewshed=!1,this._tileRenderer=null,this._stencilEnabledLayerExtents=new Array,this._numTilesRendered=0,this._numTilesCulled=0,this._numOriginsRendered=0,this.renderOccludedFlags=Q.Occlude,this.produces=new Map([[Z.OPAQUE_TERRAIN,()=>this._produces()&&this.transparency===B.Opaque],[Z.TRANSPARENT_TERRAIN,()=>this._produces()&&(this.transparency===B.Transparent||this.transparency===B.InvisibleWithDraped)],[Z.OCCLUDED_GROUND,()=>this._produces()&&this.renderOccludedFlags===v]]),this._tileSize=256,this._configuration=new ne(t.viewingMode===T.Global),this._tileTextureCache=new r(((e,t)=>o.newCache(e,t)),"TileTexture"),this.tileGeometryCache=new D(o)}normalizeCtorArgs(){return{}}initialize(){this._stage.addRenderPlugin(this),this.addHandles(n((()=>this._overlayRenderer.rendersOccludedDraped),(e=>{this.renderOccludedFlags=e?v:Q.Occlude,this.setNeedsRender()}),a))}destroy(){this._stage.removeRenderPlugin(this),this._tileTextureCache.destroy(),this.tileGeometryCache.destroy()}_produces(){return this.visible&&!!this._rootTiles&&!this.renderingDisabled}consumes(){return this._overlayRenderer.hasWater?M:L}set renderingDisabled(e){this._set("renderingDisabled",!!e),this.setDirty()}set visible(e){this._set("visible",!!e),this.setDirty()}updateHeading(e){this._tileRenderer?.updateHeading(e)}set transparency(e){this._configuration.transparencyMode!==e&&(this._configuration.transparencyMode=e,this.setNeedsRender())}get transparency(){return this._configuration.transparencyMode}get renderPatchBorders(){return this._configuration.tileBorders}set renderPatchBorders(e){this._configuration.tileBorders!==e&&(this._configuration.tileBorders=e,this.setNeedsRender(),this.notifyChange("renderPatchBorders"))}get visualizeNormals(){return this._configuration.visualizeNormals}set visualizeNormals(e){this._configuration.visualizeNormals!==e&&(this._configuration.visualizeNormals=e,this.setNeedsRender(),this.notifyChange("visualizeNormals"))}get cullBackFaces(){return this._configuration.backfaceCullingEnabled}set cullBackFaces(e){this._configuration.backfaceCullingEnabled!==e&&(this._configuration.backfaceCullingEnabled=e,this.notifyChange("cullBackFaces"),this.setNeedsRender())}set renderOrder(e){this._set("renderOrder",e),this._setSortingDirty()}get layerViewUid(){return ee}get slicePlaneEnabled(){return this._configuration.hasSlicePlane}set slicePlaneEnabled(e){this._configuration.hasSlicePlane!==e&&(this._configuration.hasSlicePlane=e,this.setNeedsRender())}set textureFadingEnabled(e){this._configuration.textureFadingEnabled!==e&&(this._configuration.textureFadingEnabled=e,this.setNeedsRender())}set pbrMode(e){this._configuration.pbrMode!==e&&(this._configuration.pbrMode=e,this.setNeedsRender())}setDebugScreenSizePerspective(e){this._configuration.screenSizePerspective!==e&&(this._configuration.screenSizePerspective=e,this.setNeedsRender())}setRootTiles(e){this._rootTiles=e,this.setDirty()}setStencilEnabledLayerExtents(e){this._stencilEnabledLayerExtents=e,this._setSortingDirty()}set tileSize(e){this._tileSize=e,null!=this._tileRenderer&&(this._tileRenderer.tileSize=e),this.setDirty()}get tileSize(){return this._tileSize}_ensureRenderData(e){e.renderData||(e.renderData=this._renderDataPool.acquire(),e.renderData.init(e,this._getLocalOriginOfTile(e)))}loadTile(e){this._ensureRenderData(e),this.updateTileGeometryState(e),this.reuseTextureFromParent(e)||this.updateTileTexture(e,E.TEXTURE_FADING)}reuseTextureFromParent(e){const t=e.parent;if(!t)return!1;const i=_(1&e.lij[2]?.5:0,1&e.lij[1]?0:.5,.5,.5);return t.renderData?.reuseTexture(e.renderData,i)??!1}updateTileTexture(e,t){null!=this._tileRenderer&&(this._tileRenderer.updateTileTexture(e,t===E.TEXTURE_FADING?O.FADING:O.UNFADED),this.setNeedsRender(),e.resetPendingUpdate(t))}updateTileGeometryState(e){for(const i of e.layerInfo[R.ELEVATION])i.pendingUpdates&=~E.GEOMETRY;e.resetPendingUpdate(E.GEOMETRY);const t=e.renderData.updateGeometryState();return t&&this.setDirty(),t}updateGeometryIfNeeded(e){e.loaded&&e.renderData.updateGeometryIfNeeded(this._rctx)}unloadTile(e){const t=e.renderData;t&&(t.releaseGeometry(),this._renderDataPool.release(t),t.clear(),e.renderData=null,e.setMemoryDirty(),this.setDirty())}_getLocalOriginOfTile(e){const t=le-oe,i=Math.max(0,Math.floor((e.level-t)/oe)*oe);if(this._isGlobal&&0===i)return u;for(;e.parent&&e.level>i;)e=e.parent;return e.centerAtSeaLevel}getStats(){return{numTilesRendered:this._numTilesRendered,numTilesCulled:this._numTilesCulled,numOriginsRendered:this._numOriginsRendered}}set wireframe(e){this._get("wireframe")!==e&&(this._set("wireframe",e),this.setNeedsRender())}setDirty(e=z.UPDATE){this._patchesByOriginDirty=!0,this._context.requestRender(e)}_setSortingDirty(e=z.UPDATE){this._patchSortingDirty=!0,this._context.requestRender(e)}setNeedsRender(e=z.UPDATE){this._context.requestRender(e)}initializeRenderContext(e){this._context=e,this._tileRenderer=new C(this._rctx,this._tileSize,this._techniques,this._tileTextureCache,this._compressionHandle),this.updateTileBackground()}uninitializeRenderContext(){this._tileRenderer=i(this._tileRenderer)}intersect(e,t,i,r){if(!this._rootTiles||e.options.selectOpaqueTerrainOnly&&e.options.selectionMode&&this.transparency!==B.Opaque)return;const s=he,n=ue;c(s,r,i),d(n,1/s[0],1/s[1],1/s[2]);const a=e.results.min,o=e.results.max,l=e.results.ground,u=e.options.store===H.MIN,g=!!e.results.ground.target,p=te(e.verticalOffset),_=e.tolerance;let f,m=u&&null!=a.distance?a.distance:1/0;const T=e.options,O=T.normalRequired||!T.backfacesTerrain,R=new X(!1,O),x=d=>{const g=d.renderData;if(!g?.vao)return;const x=g.geometry;b(ce,x.boundingBox);const v=g.localOrigin;null!=p&&(p.localOrigin=v,p.applyToAabb(ce));const w=ce;if(ge[0]=i[0]-v[0],ge[1]=i[1]-v[1],ge[2]=i[2]-v[2],!W(w,ge,n,_,m))return;const P=(e,t,i)=>{e.set(this.type,d,t,i),m=u&&null!=a.distance?a.distance:1/0},D=(n,c,d)=>{if((!O||null!=d)&&n>=0&&(T.backfacesTerrain||h(d,s)<0)&&(T.invisibleTerrain||!T.selectionMode||null==t||t(i,r,n))){if((null==l.distance||n<l.distance)&&P(l,n,d),T.isFiltered)return;T.store===H.ALL&&(null==f?(f=new V(e.ray),P(f,n,d),e.results.all.push(f)):n<f.distance&&P(f,n,d)),(null==a.distance||n<a.distance)&&P(a,n,d),T.store!==H.MIN&&(null==o.distance||n>o.distance)&&P(o,n,d)}},S=pe;c(S,r,v);const{indices:C,indexCount:E}=x,j=x.vertexAttributes,A=j.getField($.POSITION,y),N=new k(A.typedBuffer,3,j.stride/4),B=E/3;if(!p&&B>I){const e=d.renderData;null==e.intersectionData&&(e.intersectionData=new U(C,0,B,N)),e.intersectionData.intersectRay(ge,S,R,D)}else K(ge,S,0,B,C,N,p,R,D)},v=this._rootTiles;if(null!=v){(()=>{const t=this._tileIterator;t.reset(v);const r=e.options.invisibleTerrain;for(let e=t.next();e;e=t.next())!(e.visible||r&&e.intersectsClippingArea)||null==p&&!e.intersectsRay(i,s,_,m)||g&&this._useStencilForTile(e)?t.skipSubtree():x(e)})()}}processScaleRangeQueries(e,t){if(!t.done&&e)for(this._updatePatchGroups();e.updating&&!t.done;){e.prepare();for(const t of this._visiblePatchesByOrigin.values())for(const i of t)null!=i.renderData?.textureReference&&e.queriesForTile(i);e.process(),t.madeProgress()}}acquireTechniques(e){const t=!!has("enable-feature:terrain-shadows")&&e.bind.shadowMap.enabled;t!==this._castShadows&&(this._castShadows=t,this._patchesByOriginDirty=!0);const i=e.bind.viewshedEnabled;if(this._inViewshed!==i&&(this._inViewshed=i,this._patchesByOriginDirty=!0),e.bind.slot===Z.OCCLUDED_GROUND){if(0===(e.renderOccludedMask&v))return null}else{const t=this.transparency===B.Opaque?Z.OPAQUE_TERRAIN:Z.TRANSPARENT_TERRAIN;if(e.bind.slot!==t)return null}if(this.transparency===B.Invisible)return null;const r=this._configuration;switch(r.screenSpaceReflections=r.cloudReflections=r.receiveShadows=r.receiveAmbientOcclusion=r.renderOccluded=r.hasHighlightMixTexture=!1,r.overlayMode=this._overlayRenderer.mode,e.output){case G.Color:case G.ColorEmission:{r.screenSpaceReflections=null!=e.bind.ssr.lastFrameColor,r.cloudReflections=null!=e.bind.clouds.data,r.receiveShadows=e.bind.shadowMap.ready;const t=e.bind.slot===Z.OCCLUDED_GROUND;return r.renderOccluded=t,r.receiveAmbientOcclusion=!t&&null!=e.bind.ssao,this._acquireTechnique(e.output)}case G.Shadow:case G.ShadowExcludeHighlight:return this._castShadows?this._acquireTechnique(G.Shadow):null;case G.ViewshedShadow:return this._inViewshed?this._acquireTechnique(G.ViewshedShadow):null;case G.Depth:case G.Normal:return this._acquireTechnique(e.output);case G.ObjectAndLayerIdColor:return this._acquireTechnique(G.ObjectAndLayerIdColor);case G.Highlight:return r.hasHighlightMixTexture=null!=e.bind.highlightMixTexture,this._overlayRenderer.hasHighlights?this._acquireTechnique(G.Highlight):null}return null}render(e,t){switch(this._updatePatchGroups(),t.useStencil=!1,e.output){case G.Color:case G.ColorEmission:{const i=e.bind.slot===Z.OCCLUDED_GROUND?x.Occluded:x.Color;this._renderMaterialPass(e,t,i);break}case G.Depth:case G.Normal:this._renderAuxiliaryPass(e,t,x.Color,this._visiblePatchesByOrigin);break;case G.Highlight:{const i=e.bind.highlight?.name;i&&this._overlayRenderer.hasHighlights&&this._overlayRenderer.renders(x.Highlight)&&this._overlayRenderer.hasHighlight(i)&&this._renderAuxiliaryPass(e,t,x.Highlight,this._visiblePatchesByOrigin);break}case G.Shadow:case G.ShadowExcludeHighlight:case G.ViewshedShadow:this._renderAuxiliaryPass(e,t,null,this._allPatchesByOrigin);break;case G.ObjectAndLayerIdColor:this._renderAuxiliaryPass(e,t,x.ObjectAndLayerIdColor,this._visiblePatchesByOrigin)}}updateTileBackground(e){if(null==this._tileRenderer)return;const i=this._tileRenderer;let r;if(null!=e){const i=t.toUnitRGBA(e);r=p(i[0]||0,i[1]||0,i[2]||0)}i.setBackground(r),this._allTiles.forAll((e=>i.updateTileTexture(e,O.FADING))),this._configuration.tileBlendInput=i.backgroundIsGrid?F.GridComposite:null!=i.backgroundColor?F.ColorComposite:F.LayerOnly,this.setNeedsRender()}_updatePatchGroups(){if(this._patchesByOriginDirty&&(this._rebuildPatchGroups(),this._patchesByOriginDirty=!1,this._patchSortingDirty=!0),this._patchSortingDirty&&this.renderOrder!==P.NONE){const e=Array.from(this._visiblePatchesByOrigin.values()),t=this._stencilEnabledLayerExtents;for(const i of e)A(this.renderOrder,i,t);e.sort(((e,t)=>N(e[0],t[0],this.renderOrder))),this._visiblePatchesByOrigin=new Map(e.map((e=>[e[0].renderData.localOrigin,e]))),this._patchSortingDirty=!1}}_rebuildPatchGroups(){const e=this._rootTiles;if(null!=e){e[0]?.surface.checkAllTilesWaterproofness(),this._visiblePatchesByOrigin.clear(),this._allPatchesByOrigin.clear();for(const t of e)this._rebuildPatchGroupsForRootTile(t)}}_rebuildPatchGroupsForRootTile(e){const t=this._tileIterator;for(t.resetOne(e);!t.done;){const e=t.next(),i=e.renderData;if(!i){this._numTilesCulled++;continue}const r=i.localOrigin;if(this._castShadows||this._inViewshed){let t=this._allPatchesByOrigin.get(r);t||(t=[],this._allPatchesByOrigin.set(r,t)),t.push(e)}if(!e.visible){this._numTilesCulled++,t.skipSubtree();continue}let s=this._visiblePatchesByOrigin.get(r);s||(s=[],this._visiblePatchesByOrigin.set(r,s)),s.push(e),t.skipSubtree()}}_useStencilForTile(e){for(const t of this._stencilEnabledLayerExtents)if(e.intersectsExtent(t))return!0;return!1}_renderAuxiliaryPass(e,t,i,r){const s=e.rctx;this._passParameters.overlayContent=i,s.bindTechnique(t,e.bind,this._passParameters);const n=this._stencilEnabledLayerExtents.length>0;r.forEach((r=>{this._drawParameters.origin=r[0].renderData.localOrigin,t.program.bindDraw(e.bind,this._passParameters,this._drawParameters);for(let s=0;s<r.length;s++)this._renderPatch(e,t,r[s],ae.TRIANGLES,n,i)})),e.rctx.bindVAO(null)}_renderMaterialPass(e,t,i){const{rctx:r}=e;this._passParameters.overlayContent=i,r.bindTechnique(t,e.bind,this._passParameters),this._numTilesRendered=0,this._numTilesCulled=0,this._numOriginsRendered=0;const s=e.bind.camera,n=t.program;if(this._configuration.screenSizePerspective&&this.pointsOfInterest){const e=J(this._stage.viewingMode,this._ellipsoidRadius),t=this.pointsOfInterest.centerOnSurfaceFrequent.distance;e.update({distance:t,fovY:s.fovY})}const a=this._stencilEnabledLayerExtents.length>0,o=i===x.Occluded;o&&(n.bindTexture("tex",r.emptyTexture),n.setUniform3fv("textureOpacities",u),n.setUniform4fv("texOffsetAndScale",f));const l=null!=this._tileRenderer?.backgroundColor?this._tileRenderer.backgroundColor:u;this._configuration.tileBlendInput===F.ColorComposite&&n.setUniform3fv("backgroundColor",l);const c=this.wireframe?ae.LINES:ae.TRIANGLES;this._configuration.textureFadingEnabled&&n.bindTexture("texNext",r.emptyTexture);const d=this._visiblePatchesByOrigin;for(const h of d.values()){const r=h[0].renderData.localOrigin;this._drawParameters.origin=r,t.program.bindDraw(e.bind,this._passParameters,this._drawParameters),this._numOriginsRendered++;for(const s of h){const r=s.renderData,l=r.textureReference;if(null!=l){if(!o){n.setUniform4fv("texOffsetAndScale",l.offsetAndScale),n.bindTexture("tex",l.texture.texture);const e=r.textureFadeFactor,t=e<1?r.nextTextureReference:null;this._configuration.textureFadingEnabled&&t&&e<1?(n.setUniform1f("fadeFactor",e),n.setUniform4fv("nextTexOffsetAndScale",t.offsetAndScale),n.setUniform3fv("nextTexOpacities",t.opacities),n.bindTexture("texNext",t.texture.texture)):n.setUniform1f("fadeFactor",1),r.textureIsFading&&this.setNeedsRender(),n.setUniform3fv("textureOpacities",l.opacities)}this._renderPatch(e,t,s,c,a,i),s.renderOrder=this._numTilesRendered,this._numTilesRendered++}}}e.rctx.bindVAO(null)}_renderPatch(e,t,i,r,s,n){const a=i.renderData,o=a.vao,l=o?.indexBuffer;if(!o||null==l)return void(S&&console.error("Rendered tile with no indices: ",i.lij," : ",a));const c=t.program;null==n||this._overlayRenderer.isEmpty||this._bindOverlayPatchData(c,a.overlay),s&&(t.useStencil=this._useStencilForTile(i),e.rctx.setPipelineState(t.getPipeline()));const d=a.geometry.indexCount;e.rctx.bindVAO(o),c.assertCompatibleVertexAttributeLocations(o),e.rctx.drawElements(r,d,l.indexType,0)}_bindOverlayPatchData(e,t){e.setUniform4fv("overlayTexOffset",t.offsets),e.setUniform4fv("overlayTexScale",t.scales)}_acquireTechnique(e){return this._configuration.output=e,this._techniques.get(se,this._configuration)}get test(){}hasHighlight(e){return this._overlayRenderer.hasHighlight(e)}};e([o({readOnly:!0})],de.prototype,"_isGlobal",null),e([o()],de.prototype,"renderOccludedFlags",void 0),e([o({value:!1})],de.prototype,"renderingDisabled",null),e([o({value:!0})],de.prototype,"visible",null),e([o()],de.prototype,"renderPatchBorders",null),e([o()],de.prototype,"visualizeNormals",null),e([o()],de.prototype,"cullBackFaces",null),e([o({value:P.FRONT_TO_BACK})],de.prototype,"renderOrder",null),e([o()],de.prototype,"wireframe",null),de=e([l("esri.views.3d.terrain.TerrainRenderer")],de);const he=g(),ue=g(),ge=g(),pe=g();export{de as TerrainRenderer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{destroyMaybe as t}from"../../../core/maybe.js";import{TextureUpdate as e}from"./interfaces.js";class i{constructor(t){this._getFadeDuration=t,this._fadeStart=0,this._delayedTime=0}clear(){this._current=t(this._current),this._next=t(this._next),this._waiting=t(this._waiting),this._delayed=t(this._delayed)}get current(){if(null==this._current)return null;if(!this._isFadingEnabled){const e=this._delayed||this._waiting||this._next||this._current;e!==this._current&&(this._current=t(this._current),this.clear(),this._current=e)}let s=i.test.fadeMoment;if(this._delayed&&(s=s||performance.now(),s>=this._delayedTime&&(this._push(this._delayed,n.Immediate),this._delayed=null)),this._next){s=s||performance.now();const i=this._fadeDuration,n=null!=this._current&&this._next.texture===this._current.texture,r=this._next.type!==e.FADING,a=s-this._fadeStart>=i;(n||r||a)&&(t(this._current),this._current=this._next,this._next=this._waiting,this._waiting=null,this._fadeStart=this._alignFadeStart(s))}return this._current}get next(){return this._next}get fadeFactor(){if(null==this._next)return 1;const t=i.test.fadeMoment||performance.now(),e=Math.max(0,t-this._fadeStart),n=this._fadeDuration;return e>n?0:1-e/n}get isFading(){return null!=this._next||null!=this._delayed}push(e,i=n.Immediate){this._delayed=t(this._delayed),this._push(e,i)}_push(e,s){if(this._isFadingEnabled||this.clear(),null==this._current)return void(this._current=e);const r=i.test.fadeMoment||performance.now();return s!==n.Immediate?(this._delayed=e,void(this._delayedTime=r+s)):null==this._next?(this._next=e,void(this._fadeStart=this._alignFadeStart(r))):void(null!=e&&(t(this._waiting),this._waiting=e))}get _fadeDuration(){const t=this._getFadeDuration();return this._waiting?.5*t:t}_alignFadeStart(t){const e=this._getFadeDuration();return t+e-t%e}get _isFadingEnabled(){return this._getFadeDuration()>0}static{this.test={fadeMoment:0}}}var n;!function(t){t[t.Immediate=0]="Immediate",t[t.Delayed=5e3]="Delayed"}(n||(n={}));export{n as ActivationTime,i as TextureFader};
5
+ import{destroyMaybe as t}from"../../../core/maybe.js";import{TextureUpdate as e}from"./interfaces.js";class i{constructor(t){this._getFadeDuration=t,this._fadeStart=0,this._delayedTime=0}clear(){this._current=t(this._current),this._next=t(this._next),this._waiting=t(this._waiting),this._delayed=t(this._delayed)}get current(){if(null==this._current)return null;if(!this._isFadingEnabled){let t=null;this._delayed?(t=this._delayed,this._delayed=null):this._waiting?(t=this._waiting,this._waiting=null):this._next&&(t=this._next,this._next=null),t&&(this.clear(),this._current=t)}let s=i.test.fadeMoment;if(this._delayed&&(s=s||performance.now(),s>=this._delayedTime&&(this._push(this._delayed,n.Immediate),this._delayed=null)),this._next){s=s||performance.now();const i=this._fadeDuration,n=null!=this._current&&this._next.texture===this._current.texture,a=this._next.type!==e.FADING,r=s-this._fadeStart>=i;(n||a||r)&&(t(this._current),this._current=this._next,this._next=this._waiting,this._waiting=null,this._fadeStart=this._alignFadeStart(s))}return this._current}get next(){return this._next}get fadeFactor(){if(null==this._next)return 1;const t=i.test.fadeMoment||performance.now(),e=Math.max(0,t-this._fadeStart),n=this._fadeDuration;return e>n?0:1-e/n}get isFading(){return null!=this._next||null!=this._delayed}push(e,i=n.Immediate){this._delayed=t(this._delayed),this._push(e,i)}_push(e,s){if(this._isFadingEnabled||this.clear(),null==this._current)return void(this._current=e);const a=i.test.fadeMoment||performance.now();return s!==n.Immediate?(this._delayed=e,void(this._delayedTime=a+s)):null==this._next?(this._next=e,void(this._fadeStart=this._alignFadeStart(a))):void(null!=e&&(t(this._waiting),this._waiting=e))}get _fadeDuration(){const t=this._getFadeDuration();return this._waiting?.5*t:t}_alignFadeStart(t){const e=this._getFadeDuration();return t+e-t%e}get _isFadingEnabled(){return this._getFadeDuration()>0}static{this.test={fadeMoment:0}}}var n;!function(t){t[t.Immediate=0]="Immediate",t[t.Delayed=5e3]="Delayed"}(n||(n={}));export{n as ActivationTime,i as TextureFader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../../chunks/tslib.es6.js";import{invert as t,transpose as r}from"../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{clone as o}from"../../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{q as s,I as i}from"../../../../../../chunks/vec32.js";import{freeze as a,ZEROS as l}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{v as n}from"../../../../../../chunks/vec42.js";import{freeze as h,fromValues as u}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{EmissiveSourceMode as p}from"../../../../../../symbols/support/materialUtils.js";import{ColorMixModeEnum as c}from"../../../../layers/support/symbolColorUtils.js";import{OverlayContent as d}from"../../../../terrain/OverlayContent.js";import{ComponentTechnique as m}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as g,IntegratedMeshMode as f}from"./ComponentTechniqueConfiguration.js";import{ComponentDataType as x}from"./shader/ComponentData.glsl.js";import{VertexDiscardMode as v}from"./shader/VertexDiscardMode.js";import{parameter as M,parameterBlock as b,MaterialBase as y,MaterialParameterBlock as T}from"../../../core/material/MaterialBase.js";import{RenderPassIdentifier as O}from"../../../core/renderPasses/RenderPassIdentifier.js";import{ShaderOutput as C,isColorEmission as S}from"../../../core/shaderLibrary/ShaderOutput.js";import{NormalType as w}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{EmissionSource as N}from"../../../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as P}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as j}from"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{EllipsoidMode as D}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{TwoVectorPosition as q}from"../../../core/util/TwoVectorPosition.js";import{AlphaDiscardMode as A,CullFaceOptions as R}from"../../../lib/basicInterfaces.js";import{OITPass as I}from"../../../lib/OITPass.js";import{advancedMRRFactors as E}from"../../../materials/pbrUtils.js";import{defaultHighlightName as F}from"../../../../../support/HighlightDefaults.js";import{alphaCutoff as B}from"../../../../../../webscene/support/AlphaCutoff.js";class W extends y{constructor(e,s){super(),this.toMapSpace=s,this.baseColor=h(1,1,1,1),this.usePBR=!1,this.hasParametersFromSource=!1,this.mrrFactors=E,this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.normalTexture=null,this.occlusionTexture=null,this.emissionTexture=null,this.emissiveBaseColor=a(0,0,0),this.emissiveStrength=1,this.emissiveSource=p.Emissive,this.commonMaterialParameters=new H,this.componentParameters=new V,this.objectOpacity=1,this.textureAlphaCutoff=B,this.alphaDiscardMode=A.Opaque,this.isIntegratedMesh=!1,this.polygonOffsetEnabled=!1,this.ellipsoidMode=D.Earth,this.hasOccludees=!1;const i=new q(e.position),l=o(e.rotationScale);t(l,l),r(l,l),this.transformNormalGlobalFromModel=l,this.transformWorldFromModelTL=i.low,this.transformWorldFromModelTH=i.high,this.transformWorldFromModelRS=e.rotationScale}dispose(){this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null}get hasEmissions(){return null!=this.emissionTexture||!s(this.emissiveBaseColor,l)}get texture(){return this.baseColorTexture?.glTexture}get textureMetallicRoughness(){return this.metallicRoughnessTexture?.glTexture}get textureEmissive(){return this.emissionTexture?.glTexture}get textureOcclusion(){return this.occlusionTexture?.glTexture}get textureNormal(){return this.normalTexture?.glTexture}acquireTechnique(e,t,r,o){const s=new g(e.context.spherical);s.hasVertexColors=o.colors,s.hasNormals=o.hasNormals,s.textureCoordinateType=o.textureCoordinates,s.hasMetallicRoughnessTexture=null!=this.metallicRoughnessTexture,s.hasOcclusionTexture=null!=this.occlusionTexture,s.hasNormalTexture=null!=this.normalTexture,s.oitPass=t.identifier===O.Material&&null!=r.oitPass?r.oitPass:I.NONE,s.terrainDepthTest=t.identifier===O.Material&&r.terrainDepthTest,s.cullAboveTerrain=t.identifier===O.Material&&r.cullAboveTerrain,s.ellipsoidMode=this.ellipsoidMode,s.componentData=this.componentParameters.type,s.cullFace=this.commonMaterialParameters.cullFace,s.doubleSidedMode=this.commonMaterialParameters.doubleSided?P.View:P.None,s.hasColorTexture=null!=this.baseColorTexture;const i=this._computeWhichMaterialPass();if(s.blendingEnabled=i===k.Transparent||i===k.OpaqueAndTransparent,s.alphaDiscardMode=this.alphaDiscardMode,s.integratedMeshMode=this.isIntegratedMesh?G(r)?z(r)?f.ColorOverlayWithWater:f.ColorOverlay:f.NoOverlay:f.None,s.hasPolygonOffset=this.polygonOffsetEnabled,s.pbrMode=s.integratedMeshMode===f.ColorOverlayWithWater?j.WaterOnIntegratedMesh:this.usePBR?this.hasParametersFromSource?o.shadeNormals&&this.isIntegratedMesh?j.Disabled:j.Schematic:j.Normal:j.Disabled,s.emissionSource=this.hasEmissions?null!=this.emissionTexture?N.Texture:s.pbrMode===j.Normal?N.SymbolColor:N.None:N.None,s.shadeNormals=o.shadeNormals,s.normalType=s.hasNormals?w.Compressed:w.ScreenDerivative,s.hasSlicePlane=null!=r.slicePlane&&this.commonMaterialParameters.hasSlicePlane,s.receiveAmbientOcclusion=s.hasOccludees=s.receiveShadows=s.screenSpaceReflections=s.cloudReflections=s.hasHighlightMixTexture=!1,t.identifier===O.ShadowMap)s.output=C.Shadow,s.vertexDiscardMode=v.None;else if(t.identifier===O.ViewshedShadowMap)s.output=C.ViewshedShadow,s.vertexDiscardMode=v.None;else if(t.identifier===O.Highlight)s.output=C.Highlight,s.vertexDiscardMode=v.None,s.hasHighlightMixTexture=null!=r.highlightMixTexture;else{switch(i===k.OpaqueAndTransparent?s.vertexDiscardMode=t.transparent?v.Opaque:v.Transparent:s.vertexDiscardMode=v.None,s.hasBloom=S(t.output),s.output=t.output,t.output){case C.Color:case C.ColorEmission:s.receiveAmbientOcclusion=o.applySSAO&&null!=r.ssao?.getTexture(),s.hasOccludees=r.hasOccludees,s.receiveShadows=r.shadowMap.ready,s.screenSpaceReflections=null!=r.ssr.lastFrameColor,s.cloudReflections=null!=r.clouds.data?.cubeMap?.colorTexture;break;case C.ObjectAndLayerIdColor:s.objectAndLayerIdColor=!0}s.snowCover=r.snowCover}const a=e.get(m,s);return this._setClean(),a}submit(e,t,r){if(this.objectOpacity<=0)return;const{componentData:o,renderable:s}=r,{geometry:i}=s,a=s.meta.cameraDepthSquared;o.updateHighlights(t.highlights);const{geometryRanges:l,highlightRangesMap:n,shadowmapRanges:h}=o;switch(this._computeWhichMaterialPass()){case k.Opaque:e.opaque.submitDraw(this,i,l,a);break;case k.Transparent:e.transparent.submitDraw(this,i,l,a);break;case k.OpaqueAndTransparent:e.opaque.submitDraw(this,i,l,a),e.transparent.submitDraw(this,i,l,a);break;case k.IntegratedMesh:e.integratedMesh.submitDraw(this,i,l,a),U(t)&&e.highlightIntegratedMesh.submitDraw(this,i,l,a)}if(this.componentParameters.castShadows!==L.None){if(null!=n)for(const t of n)t[0]===F&&e.highlightShadowMap.submitDraw(this,i,t[1],a,t[0]);null!=h&&e.defaultShadowMap.submitDraw(this,i,h,a),e.shadowMap.submitDraw(this,i,l,a)}if(null!=n)for(const u of n)e.highlight.submitDraw(this,i,u[1],a,u[0]);t.viewshedEnabled&&e.viewshedShadowMap.submitDraw(this,i,l,a)}_computeWhichMaterialPass(){if(this.isIntegratedMesh)return k.IntegratedMesh;if(this.objectOpacity<1)return k.Transparent;if(this.componentParameters.opaqueOverride===L.All)return k.Opaque;if(this.baseColor[3]<1||this.alphaDiscardMode===A.Blend||this.alphaDiscardMode===A.MaskBlend)return k.Transparent;switch(this.componentParameters.transparent){case L.None:return k.Opaque;case L.All:return k.Transparent;case L.Some:return k.OpaqueAndTransparent}}}var k,L;e([M({vectorOps:n})],W.prototype,"baseColor",void 0),e([M()],W.prototype,"usePBR",void 0),e([M()],W.prototype,"hasParametersFromSource",void 0),e([M({vectorOps:i})],W.prototype,"mrrFactors",void 0),e([M({dispose:!0})],W.prototype,"baseColorTexture",void 0),e([M({dispose:!0})],W.prototype,"metallicRoughnessTexture",void 0),e([M({dispose:!0})],W.prototype,"normalTexture",void 0),e([M({dispose:!0})],W.prototype,"occlusionTexture",void 0),e([M({dispose:!0})],W.prototype,"emissionTexture",void 0),e([M({vectorOps:i})],W.prototype,"emissiveBaseColor",void 0),e([M()],W.prototype,"emissiveStrength",void 0),e([M()],W.prototype,"emissiveSource",void 0),e([b()],W.prototype,"commonMaterialParameters",void 0),e([b()],W.prototype,"componentParameters",void 0),e([M()],W.prototype,"objectOpacity",void 0),e([M()],W.prototype,"textureAlphaCutoff",void 0),e([M()],W.prototype,"alphaDiscardMode",void 0),e([M()],W.prototype,"isIntegratedMesh",void 0),e([M()],W.prototype,"polygonOffsetEnabled",void 0),e([M()],W.prototype,"ellipsoidMode",void 0),e([M()],W.prototype,"hasOccludees",void 0),function(e){e[e.Opaque=0]="Opaque",e[e.Transparent=1]="Transparent",e[e.OpaqueAndTransparent=2]="OpaqueAndTransparent",e[e.IntegratedMesh=3]="IntegratedMesh"}(k||(k={}));class H extends T{constructor(){super(...arguments),this.doubleSided=!1,this.cullFace=R.Back,this.hasSlicePlane=!0}}e([M()],H.prototype,"doubleSided",void 0),e([M()],H.prototype,"cullFace",void 0),e([M()],H.prototype,"hasSlicePlane",void 0);class V extends T{constructor(){super(...arguments),this.externalColor=u(1,1,1,1),this.externalColorMixMode=c.Multiply,this.castShadows=L.All}get transparent(){return this.externalColor[3]<1?L.All:L.None}get opaqueOverride(){return this.externalColorMixMode===c.Replace&&1===this.externalColor[3]?L.All:L.None}get visible(){return this.externalColor[3]>0?L.All:L.None}get type(){return x.Uniform}}e([M({vectorOps:n})],V.prototype,"externalColor",void 0),e([M()],V.prototype,"externalColorMixMode",void 0),e([M()],V.prototype,"castShadows",void 0),function(e){e[e.All=0]="All",e[e.Some=1]="Some",e[e.None=2]="None"}(L||(L={}));class _ extends T{constructor(){super(...arguments),this.texture=null,this.transparent=L.None,this.opaqueOverride=L.None,this.castShadows=L.None}get type(){return x.Varying}}function U(e){return null!=e.overlay?.getTexture(d.Highlight)}function z(e){return null!=e.overlay?.getTexture(d.WaterNormal)}function G(e){return null!=e.overlay?.getTexture(d.ColorNoRasterImage)}e([M()],_.prototype,"texture",void 0),e([M()],_.prototype,"transparent",void 0),e([M()],_.prototype,"opaqueOverride",void 0),e([M()],_.prototype,"castShadows",void 0);export{H as CommonMaterialParameters,W as ComponentMaterial,L as ComponentParameterSummary,V as ComponentParametersUniform,_ as ComponentParametersVarying};
5
+ import{_ as e}from"../../../../../../chunks/tslib.es6.js";import{invert as t,transpose as r}from"../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{clone as o}from"../../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{q as s,I as i}from"../../../../../../chunks/vec32.js";import{freeze as a,ZEROS as l}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{v as n}from"../../../../../../chunks/vec42.js";import{freeze as u,fromValues as h}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{EmissiveSourceMode as p}from"../../../../../../symbols/support/materialUtils.js";import{ColorMixModeEnum as c}from"../../../../layers/support/symbolColorUtils.js";import{OverlayContent as d}from"../../../../terrain/OverlayContent.js";import{ComponentTechnique as m}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as g,IntegratedMeshMode as f}from"./ComponentTechniqueConfiguration.js";import{ComponentDataType as x}from"./shader/ComponentData.glsl.js";import{VertexDiscardMode as v}from"./shader/VertexDiscardMode.js";import{parameter as b,parameterBlock as M,MaterialBase as y,MaterialParameterBlock as T}from"../../../core/material/MaterialBase.js";import{RenderPassIdentifier as O}from"../../../core/renderPasses/RenderPassIdentifier.js";import{ShaderOutput as C,isColorEmission as S}from"../../../core/shaderLibrary/ShaderOutput.js";import{NormalType as w}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{EmissionSource as D}from"../../../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as N}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as j}from"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{EllipsoidMode as P}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{TwoVectorPosition as q}from"../../../core/util/TwoVectorPosition.js";import{AlphaDiscardMode as A,CullFaceOptions as R}from"../../../lib/basicInterfaces.js";import{OITPass as I}from"../../../lib/OITPass.js";import{RenderSlot as E}from"../../../lib/RenderSlot.js";import{advancedMRRFactors as F}from"../../../materials/pbrUtils.js";import{defaultHighlightName as B}from"../../../../../support/HighlightDefaults.js";import{alphaCutoff as W}from"../../../../../../webscene/support/AlphaCutoff.js";class L extends y{constructor(e,s){super(),this.toMapSpace=s,this.baseColor=u(1,1,1,1),this.usePBR=!1,this.hasParametersFromSource=!1,this.mrrFactors=F,this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.normalTexture=null,this.occlusionTexture=null,this.emissionTexture=null,this.emissiveBaseColor=a(0,0,0),this.emissiveStrength=1,this.emissiveSource=p.Emissive,this.commonMaterialParameters=new V,this.componentParameters=new U,this.objectOpacity=1,this.textureAlphaCutoff=W,this.alphaDiscardMode=A.Opaque,this.isIntegratedMesh=!1,this.polygonOffsetEnabled=!1,this.ellipsoidMode=P.Earth,this.hasOccludees=!1;const i=new q(e.position),l=o(e.rotationScale);t(l,l),r(l,l),this.transformNormalGlobalFromModel=l,this.transformWorldFromModelTL=i.low,this.transformWorldFromModelTH=i.high,this.transformWorldFromModelRS=e.rotationScale}dispose(){this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null}get hasEmissions(){return null!=this.emissionTexture||!s(this.emissiveBaseColor,l)}get texture(){return this.baseColorTexture?.glTexture}get textureMetallicRoughness(){return this.metallicRoughnessTexture?.glTexture}get textureEmissive(){return this.emissionTexture?.glTexture}get textureOcclusion(){return this.occlusionTexture?.glTexture}get textureNormal(){return this.normalTexture?.glTexture}acquireTechnique(e,t,r,o){const s=new g(e.context.spherical);s.renderOccluded=r.slot===E.OCCLUDED_GROUND,s.hasVertexColors=o.colors,s.hasNormals=o.hasNormals,s.textureCoordinateType=o.textureCoordinates,s.hasMetallicRoughnessTexture=null!=this.metallicRoughnessTexture,s.hasOcclusionTexture=null!=this.occlusionTexture,s.hasNormalTexture=null!=this.normalTexture,s.oitPass=t.identifier===O.Material&&null!=r.oitPass?r.oitPass:I.NONE,s.terrainDepthTest=t.identifier===O.Material&&r.terrainDepthTest,s.cullAboveTerrain=t.identifier===O.Material&&r.cullAboveTerrain,s.ellipsoidMode=this.ellipsoidMode,s.componentData=this.componentParameters.type,s.cullFace=this.commonMaterialParameters.cullFace,s.doubleSidedMode=this.commonMaterialParameters.doubleSided?N.View:N.None,s.hasColorTexture=null!=this.baseColorTexture;const i=this._computeWhichMaterialPass();if(s.blendingEnabled=i===k.Transparent||i===k.OpaqueAndTransparent,s.alphaDiscardMode=this.alphaDiscardMode,s.integratedMeshMode=this.isIntegratedMesh?J(r)?z(r)?f.ColorOverlayWithWater:f.ColorOverlay:f.NoOverlay:f.None,s.hasPolygonOffset=this.polygonOffsetEnabled,s.pbrMode=s.integratedMeshMode===f.ColorOverlayWithWater?j.WaterOnIntegratedMesh:this.usePBR?this.hasParametersFromSource?o.shadeNormals&&this.isIntegratedMesh?j.Disabled:j.Schematic:j.Normal:j.Disabled,s.emissionSource=this.hasEmissions?null!=this.emissionTexture?D.Texture:s.pbrMode===j.Normal?D.SymbolColor:D.None:D.None,s.shadeNormals=o.shadeNormals,s.normalType=s.hasNormals?w.Compressed:w.ScreenDerivative,s.hasSlicePlane=null!=r.slicePlane&&this.commonMaterialParameters.hasSlicePlane,s.receiveAmbientOcclusion=s.hasOccludees=s.receiveShadows=s.screenSpaceReflections=s.cloudReflections=s.hasHighlightMixTexture=!1,t.identifier===O.ShadowMap)s.output=C.Shadow,s.vertexDiscardMode=v.None;else if(t.identifier===O.ViewshedShadowMap)s.output=C.ViewshedShadow,s.vertexDiscardMode=v.None;else if(t.identifier===O.Highlight)s.output=C.Highlight,s.vertexDiscardMode=v.None,s.hasHighlightMixTexture=null!=r.highlightMixTexture;else{switch(i===k.OpaqueAndTransparent?s.vertexDiscardMode=t.transparent?v.Opaque:v.Transparent:s.vertexDiscardMode=v.None,s.hasBloom=S(t.output),s.output=t.output,t.output){case C.Color:case C.ColorEmission:s.receiveAmbientOcclusion=o.applySSAO&&null!=r.ssao?.getTexture(),s.hasOccludees=r.hasOccludees,s.receiveShadows=r.shadowMap.ready,s.screenSpaceReflections=null!=r.ssr.lastFrameColor,s.cloudReflections=null!=r.clouds.data?.cubeMap?.colorTexture;break;case C.ObjectAndLayerIdColor:s.objectAndLayerIdColor=!0}s.snowCover=r.snowCover}const a=e.get(m,s);return this._setClean(),a}submit(e,t,r){if(this.objectOpacity<=0)return;const{componentData:o,renderable:s}=r,{geometry:i}=s,a=s.meta.cameraDepthSquared;o.updateHighlights(t.highlights);const{geometryRanges:l,highlightRangesMap:n,shadowmapRanges:u}=o;switch(this._computeWhichMaterialPass()){case k.Opaque:e.opaque.submitDraw(this,i,l,a);break;case k.Transparent:e.transparent.submitDraw(this,i,l,a);break;case k.OpaqueAndTransparent:e.opaque.submitDraw(this,i,l,a),e.transparent.submitDraw(this,i,l,a);break;case k.IntegratedMesh:e.integratedMesh.submitDraw(this,i,l,a),K(t)&&e.occludedGround.submitDraw(this,i,l,a),G(t)&&e.highlightIntegratedMesh.submitDraw(this,i,l,a)}if(this.componentParameters.castShadows!==H.None){if(null!=n)for(const t of n)t[0]===B&&e.highlightShadowMap.submitDraw(this,i,t[1],a,t[0]);null!=u&&e.defaultShadowMap.submitDraw(this,i,u,a),e.shadowMap.submitDraw(this,i,l,a)}if(null!=n)for(const h of n)e.highlight.submitDraw(this,i,h[1],a,h[0]);t.viewshedEnabled&&e.viewshedShadowMap.submitDraw(this,i,l,a)}_computeWhichMaterialPass(){if(this.isIntegratedMesh)return k.IntegratedMesh;if(this.objectOpacity<1)return k.Transparent;if(this.componentParameters.opaqueOverride===H.All)return k.Opaque;if(this.baseColor[3]<1||this.alphaDiscardMode===A.Blend||this.alphaDiscardMode===A.MaskBlend)return k.Transparent;switch(this.componentParameters.transparent){case H.None:return k.Opaque;case H.All:return k.Transparent;case H.Some:return k.OpaqueAndTransparent}}}var k,H;e([b({vectorOps:n})],L.prototype,"baseColor",void 0),e([b()],L.prototype,"usePBR",void 0),e([b()],L.prototype,"hasParametersFromSource",void 0),e([b({vectorOps:i})],L.prototype,"mrrFactors",void 0),e([b({dispose:!0})],L.prototype,"baseColorTexture",void 0),e([b({dispose:!0})],L.prototype,"metallicRoughnessTexture",void 0),e([b({dispose:!0})],L.prototype,"normalTexture",void 0),e([b({dispose:!0})],L.prototype,"occlusionTexture",void 0),e([b({dispose:!0})],L.prototype,"emissionTexture",void 0),e([b({vectorOps:i})],L.prototype,"emissiveBaseColor",void 0),e([b()],L.prototype,"emissiveStrength",void 0),e([b()],L.prototype,"emissiveSource",void 0),e([M()],L.prototype,"commonMaterialParameters",void 0),e([M()],L.prototype,"componentParameters",void 0),e([b()],L.prototype,"objectOpacity",void 0),e([b()],L.prototype,"textureAlphaCutoff",void 0),e([b()],L.prototype,"alphaDiscardMode",void 0),e([b()],L.prototype,"isIntegratedMesh",void 0),e([b()],L.prototype,"polygonOffsetEnabled",void 0),e([b()],L.prototype,"ellipsoidMode",void 0),e([b()],L.prototype,"hasOccludees",void 0),function(e){e[e.Opaque=0]="Opaque",e[e.Transparent=1]="Transparent",e[e.OpaqueAndTransparent=2]="OpaqueAndTransparent",e[e.IntegratedMesh=3]="IntegratedMesh"}(k||(k={}));class V extends T{constructor(){super(...arguments),this.doubleSided=!1,this.cullFace=R.Back,this.hasSlicePlane=!0}}e([b()],V.prototype,"doubleSided",void 0),e([b()],V.prototype,"cullFace",void 0),e([b()],V.prototype,"hasSlicePlane",void 0);class U extends T{constructor(){super(...arguments),this.externalColor=h(1,1,1,1),this.externalColorMixMode=c.Multiply,this.castShadows=H.All}get transparent(){return this.externalColor[3]<1?H.All:H.None}get opaqueOverride(){return this.externalColorMixMode===c.Replace&&1===this.externalColor[3]?H.All:H.None}get visible(){return this.externalColor[3]>0?H.All:H.None}get type(){return x.Uniform}}e([b({vectorOps:n})],U.prototype,"externalColor",void 0),e([b()],U.prototype,"externalColorMixMode",void 0),e([b()],U.prototype,"castShadows",void 0),function(e){e[e.All=0]="All",e[e.Some=1]="Some",e[e.None=2]="None"}(H||(H={}));class _ extends T{constructor(){super(...arguments),this.texture=null,this.transparent=H.None,this.opaqueOverride=H.None,this.castShadows=H.None}get type(){return x.Varying}}function G(e){return null!=e.overlay?.getTexture(d.Highlight)}function z(e){return null!=e.overlay?.getTexture(d.WaterNormal)}function J(e){return null!=e.overlay?.getTexture(d.ColorNoRasterImage)}function K(e){return null!=e.overlay?.getTexture(d.Occluded)}e([b()],_.prototype,"texture",void 0),e([b()],_.prototype,"transparent",void 0),e([b()],_.prototype,"opaqueOverride",void 0),e([b()],_.prototype,"castShadows",void 0);export{V as CommonMaterialParameters,L as ComponentMaterial,H as ComponentParameterSummary,U as ComponentParametersUniform,_ as ComponentParametersVarying};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{IntegratedMeshMode as e}from"./ComponentTechniqueConfiguration.js";import{C as r}from"../../../../../../chunks/ComponentShader.glsl.js";import{isColorOrColorEmission as t}from"../../../core/shaderLibrary/ShaderOutput.js";import{ReloadableShaderModule as o}from"../../../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as n,depthOnlyOutputBuffersOr as s}from"../../../core/shaderTechnique/ShaderTechnique.js";import{StencilBits as i}from"../../../lib/basicInterfaces.js";import{OITPass as l}from"../../../lib/OITPass.js";import{OITPolygonOffset as a,oitDepthTest as c,blending as d,getDrawBuffers as u}from"../../../lib/OrderIndependentTransparency.js";import{replaceBitWhenDepthTestPasses as m,stencilBaseAllZerosParams as p,stencilWriteMaskOn as f}from"../../../lib/StencilUtils.js";import{VertexAttribute as h}from"../../../lib/VertexAttribute.js";import{makePipelineState as O,defaultColorWrite as b,defaultDepthWrite as j,cullingParams as g}from"../../../../../webgl/renderState.js";class M extends n{constructor(e,t){super(e,t,new o(r,(()=>import("./shader/ComponentShader.glsl.js"))),N)}initializePipeline(r){const{integratedMeshMode:o,output:n,blendingEnabled:h,cullFace:M,hasOccludees:N,hasPolygonOffset:S,oitPass:T}=r,C=o!==e.None,E=T===l.NONE,I=T===l.FrontFace;return O({blending:t(n)&&h?d(T):null,culling:g(M),depthTest:{func:c(T)},depthWrite:E||I?j:null,drawBuffers:s(n,u(T,n)),colorWrite:b,stencilWrite:C||N?f:null,stencilTest:C?m(i.IntegratedMeshMaskExcluded):N?p:null,polygonOffset:E||I?S?{factor:2,units:2}:null:a})}}const N=new Map([[h.POSITION,0],[h.NORMAL,1],[h.NORMALCOMPRESSED,1],[h.COLOR,2],[h.UV0,3],[h.UVREGION,4],[h.COMPONENTINDEX,5]]);export{M as ComponentTechnique,N as vertexAttributeLocations};
5
+ import{IntegratedMeshMode as e}from"./ComponentTechniqueConfiguration.js";import{C as r}from"../../../../../../chunks/ComponentShader.glsl.js";import{isColorOrColorEmission as t}from"../../../core/shaderLibrary/ShaderOutput.js";import{ReloadableShaderModule as n}from"../../../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as o,depthOnlyOutputBuffersOr as s}from"../../../core/shaderTechnique/ShaderTechnique.js";import{StencilBits as i}from"../../../lib/basicInterfaces.js";import{OITPass as l}from"../../../lib/OITPass.js";import{OITPolygonOffset as a,oitDepthTest as c,blending as d,getDrawBuffers as u}from"../../../lib/OrderIndependentTransparency.js";import{replaceBitWhenDepthTestPasses as m,stencilBaseAllZerosParams as p,stencilWriteMaskOn as f}from"../../../lib/StencilUtils.js";import{VertexAttribute as h}from"../../../lib/VertexAttribute.js";import{makePipelineState as O,defaultColorWrite as b,defaultDepthWrite as j,cullingParams as g,premultipliedAlpha as M}from"../../../../../webgl/renderState.js";class N extends o{constructor(e,t){super(e,t,new n(r,(()=>import("./shader/ComponentShader.glsl.js"))),S)}initializePipeline(r){const{integratedMeshMode:n,output:o,blendingEnabled:h,cullFace:N,hasOccludees:S,hasPolygonOffset:T,oitPass:C,renderOccluded:E}=r,I=n!==e.None,P=C===l.NONE,R=C===l.FrontFace;return O({blending:E?M:t(o)&&h?d(C):null,culling:g(N),depthTest:E?null:{func:c(C)},depthWrite:E||!P&&!R?null:j,drawBuffers:s(o,u(C,o)),colorWrite:b,stencilWrite:!E&&I||S?f:null,stencilTest:I?m(i.IntegratedMeshMaskExcluded):S?p:null,polygonOffset:P||R?T?{factor:2,units:2}:null:a})}}const S=new Map([[h.POSITION,0],[h.NORMAL,1],[h.NORMALCOMPRESSED,1],[h.COLOR,2],[h.UV0,3],[h.UVREGION,4],[h.COMPONENTINDEX,5]]);export{N as ComponentTechnique,S as vertexAttributeLocations};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../../../../../chunks/tslib.es6.js";import{ComponentDataType as e}from"./shader/ComponentData.glsl.js";import{VertexDiscardMode as t}from"./shader/VertexDiscardMode.js";import{ShaderOutput as r,isColorEmissionHighlightOrOID as i}from"../../../core/shaderLibrary/ShaderOutput.js";import{NormalType as s}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateType as a}from"../../../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as d}from"../../../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as h}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as p}from"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{EllipsoidMode as l}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{parameter as n,ShaderTechniqueConfiguration as c}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{CullFaceOptions as u,AlphaDiscardMode as y}from"../../../lib/basicInterfaces.js";import{OITPass as m}from"../../../lib/OITPass.js";import{BindType as v}from"../../../../../webgl/BindType.js";var T;!function(o){o[o.None=0]="None",o[o.NoOverlay=1]="NoOverlay",o[o.ColorOverlay=2]="ColorOverlay",o[o.ColorOverlayWithWater=3]="ColorOverlayWithWater",o[o.COUNT=4]="COUNT"}(T||(T={}));class C extends c{constructor(o){super(),this.spherical=o,this.output=r.Color,this.textureCoordinateType=a.None,this.componentData=e.Uniform,this.cullFace=u.Back,this.vertexDiscardMode=t.None,this.doubleSidedMode=h.WindingOrder,this.alphaDiscardMode=y.Opaque,this.integratedMeshMode=T.None,this.oitPass=m.NONE,this.ellipsoidMode=l.Earth,this.pbrMode=p.Disabled,this.normalType=s.Attribute,this.emissionSource=d.None,this.hasVertexColors=!1,this.hasNormals=!1,this.shadeNormals=!0,this.hasSlicePlane=!1,this.hasColorTexture=!1,this.hasHighlightMixTexture=!1,this.receiveAmbientOcclusion=!0,this.receiveShadows=!0,this.blendingEnabled=!0,this.screenSpaceReflections=!1,this.hasPolygonOffset=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasNormalTextureTransform=!1,this.cloudReflections=!0,this.snowCover=!1,this.objectAndLayerIdColor=!1,this.hasBloom=!1,this.discardInvisibleFragments=!1,this.occlusionPass=!1,this.bindType=v.Draw,this.useCustomDTRExponentForWater=!1,this.hasVertexTangents=!1,this.highStepCount=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.useFillLights=!0,this.objectAndLayerIdColorInstanced=!1,this.draped=!1}get overlayEnabled(){return(this.integratedMeshMode===T.ColorOverlay||this.integratedMeshMode===T.ColorOverlayWithWater)&&i(this.output)}}o([n({count:r.COUNT})],C.prototype,"output",void 0),o([n({count:a.COUNT})],C.prototype,"textureCoordinateType",void 0),o([n({count:e.COUNT})],C.prototype,"componentData",void 0),o([n({count:u.COUNT})],C.prototype,"cullFace",void 0),o([n({count:t.COUNT})],C.prototype,"vertexDiscardMode",void 0),o([n({count:h.COUNT})],C.prototype,"doubleSidedMode",void 0),o([n({count:y.COUNT})],C.prototype,"alphaDiscardMode",void 0),o([n({count:T.COUNT})],C.prototype,"integratedMeshMode",void 0),o([n({count:m.COUNT})],C.prototype,"oitPass",void 0),o([n({count:l.COUNT})],C.prototype,"ellipsoidMode",void 0),o([n({count:p.COUNT})],C.prototype,"pbrMode",void 0),o([n({count:s.COUNT})],C.prototype,"normalType",void 0),o([n({count:d.COUNT})],C.prototype,"emissionSource",void 0),o([n()],C.prototype,"hasVertexColors",void 0),o([n()],C.prototype,"hasNormals",void 0),o([n()],C.prototype,"shadeNormals",void 0),o([n()],C.prototype,"hasSlicePlane",void 0),o([n()],C.prototype,"hasColorTexture",void 0),o([n()],C.prototype,"hasHighlightMixTexture",void 0),o([n()],C.prototype,"receiveAmbientOcclusion",void 0),o([n()],C.prototype,"receiveShadows",void 0),o([n()],C.prototype,"blendingEnabled",void 0),o([n()],C.prototype,"screenSpaceReflections",void 0),o([n()],C.prototype,"hasPolygonOffset",void 0),o([n()],C.prototype,"hasMetallicRoughnessTexture",void 0),o([n()],C.prototype,"hasOcclusionTexture",void 0),o([n()],C.prototype,"hasNormalTexture",void 0),o([n()],C.prototype,"hasOccludees",void 0),o([n()],C.prototype,"terrainDepthTest",void 0),o([n()],C.prototype,"cullAboveTerrain",void 0),o([n()],C.prototype,"hasNormalTextureTransform",void 0),o([n()],C.prototype,"cloudReflections",void 0),o([n()],C.prototype,"snowCover",void 0),o([n()],C.prototype,"objectAndLayerIdColor",void 0),o([n()],C.prototype,"hasBloom",void 0);export{C as ComponentTechniqueConfiguration,T as IntegratedMeshMode};
5
+ import{_ as o}from"../../../../../../chunks/tslib.es6.js";import{ComponentDataType as e}from"./shader/ComponentData.glsl.js";import{VertexDiscardMode as t}from"./shader/VertexDiscardMode.js";import{ShaderOutput as r,isColorEmissionHighlightOrOID as i}from"../../../core/shaderLibrary/ShaderOutput.js";import{NormalType as s}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateType as a}from"../../../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as d}from"../../../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as h}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as p}from"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{EllipsoidMode as l}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{parameter as n,ShaderTechniqueConfiguration as c}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{CullFaceOptions as u,AlphaDiscardMode as y}from"../../../lib/basicInterfaces.js";import{OITPass as m}from"../../../lib/OITPass.js";import{BindType as v}from"../../../../../webgl/BindType.js";var T;!function(o){o[o.None=0]="None",o[o.NoOverlay=1]="NoOverlay",o[o.ColorOverlay=2]="ColorOverlay",o[o.ColorOverlayWithWater=3]="ColorOverlayWithWater",o[o.COUNT=4]="COUNT"}(T||(T={}));class C extends c{constructor(o){super(),this.spherical=o,this.output=r.Color,this.textureCoordinateType=a.None,this.componentData=e.Uniform,this.cullFace=u.Back,this.vertexDiscardMode=t.None,this.doubleSidedMode=h.WindingOrder,this.alphaDiscardMode=y.Opaque,this.integratedMeshMode=T.None,this.oitPass=m.NONE,this.ellipsoidMode=l.Earth,this.pbrMode=p.Disabled,this.normalType=s.Attribute,this.emissionSource=d.None,this.hasVertexColors=!1,this.hasNormals=!1,this.shadeNormals=!0,this.hasSlicePlane=!1,this.hasColorTexture=!1,this.hasHighlightMixTexture=!1,this.receiveAmbientOcclusion=!0,this.receiveShadows=!0,this.blendingEnabled=!0,this.screenSpaceReflections=!1,this.hasPolygonOffset=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasNormalTextureTransform=!1,this.cloudReflections=!0,this.snowCover=!1,this.objectAndLayerIdColor=!1,this.hasBloom=!1,this.renderOccluded=!1,this.discardInvisibleFragments=!1,this.occlusionPass=!1,this.bindType=v.Draw,this.useCustomDTRExponentForWater=!1,this.hasVertexTangents=!1,this.highStepCount=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.useFillLights=!0,this.objectAndLayerIdColorInstanced=!1,this.draped=!1}get overlayEnabled(){return(this.integratedMeshMode===T.ColorOverlay||this.integratedMeshMode===T.ColorOverlayWithWater)&&i(this.output)}}o([n({count:r.COUNT})],C.prototype,"output",void 0),o([n({count:a.COUNT})],C.prototype,"textureCoordinateType",void 0),o([n({count:e.COUNT})],C.prototype,"componentData",void 0),o([n({count:u.COUNT})],C.prototype,"cullFace",void 0),o([n({count:t.COUNT})],C.prototype,"vertexDiscardMode",void 0),o([n({count:h.COUNT})],C.prototype,"doubleSidedMode",void 0),o([n({count:y.COUNT})],C.prototype,"alphaDiscardMode",void 0),o([n({count:T.COUNT})],C.prototype,"integratedMeshMode",void 0),o([n({count:m.COUNT})],C.prototype,"oitPass",void 0),o([n({count:l.COUNT})],C.prototype,"ellipsoidMode",void 0),o([n({count:p.COUNT})],C.prototype,"pbrMode",void 0),o([n({count:s.COUNT})],C.prototype,"normalType",void 0),o([n({count:d.COUNT})],C.prototype,"emissionSource",void 0),o([n()],C.prototype,"hasVertexColors",void 0),o([n()],C.prototype,"hasNormals",void 0),o([n()],C.prototype,"shadeNormals",void 0),o([n()],C.prototype,"hasSlicePlane",void 0),o([n()],C.prototype,"hasColorTexture",void 0),o([n()],C.prototype,"hasHighlightMixTexture",void 0),o([n()],C.prototype,"receiveAmbientOcclusion",void 0),o([n()],C.prototype,"receiveShadows",void 0),o([n()],C.prototype,"blendingEnabled",void 0),o([n()],C.prototype,"screenSpaceReflections",void 0),o([n()],C.prototype,"hasPolygonOffset",void 0),o([n()],C.prototype,"hasMetallicRoughnessTexture",void 0),o([n()],C.prototype,"hasOcclusionTexture",void 0),o([n()],C.prototype,"hasNormalTexture",void 0),o([n()],C.prototype,"hasOccludees",void 0),o([n()],C.prototype,"terrainDepthTest",void 0),o([n()],C.prototype,"cullAboveTerrain",void 0),o([n()],C.prototype,"hasNormalTextureTransform",void 0),o([n()],C.prototype,"cloudReflections",void 0),o([n()],C.prototype,"snowCover",void 0),o([n()],C.prototype,"objectAndLayerIdColor",void 0),o([n()],C.prototype,"hasBloom",void 0),o([n()],C.prototype,"renderOccluded",void 0);export{C as ComponentTechniqueConfiguration,T as IntegratedMeshMode};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../core/Error.js";import{ManagedColorAttachment as t}from"../../webgl/ManagedColorAttachment.js";import{ManagedDepthTexture as r}from"../../webgl/ManagedDepthTexture.js";import a from"../../webgl/ManagedFBO.js";import{ColorFormat as c,isDepthFormat as h,DepthTextureFormats as i,ColorFormats as n,DepthFormat as o}from"./FBOCacheFormats.js";import{FBOPool as s}from"./FBOPool.js";import{DepthStencilAttachment as l,ColorAttachment0 as u}from"../../../webgl/enums.js";import{FramebufferObject as m}from"../../../webgl/FramebufferObject.js";import{Texture as d}from"../../../webgl/Texture.js";class f{constructor(e){this.rctx=e,this._interactive=!1,this._acquired=new Set,this._cache=new s(e.newCache,"FBOCache"),this._depthCache=new s(e.newCache,"DepthAttachmentCache"),this._colorCache=new s(e.newCache,"ColorAttachmentCache")}destroy(){this._cache.destroy(),this._depthCache.destroy(),this._colorCache.destroy()}clean(){this._cache.clean(),this._colorCache.clean(),this._depthCache.clean()}frameStart(){this._cache.frame(),this._colorCache.frame(),this._depthCache.frame(),this.debugCallback?.()}frameEnd(){const{debugCallback:e}=this;e&&this._acquired.forEach((t=>e(t.name,t.fbo)))}get usedMemory(){return Array.from(this._acquired.values()).reduce(((e,t)=>e+t.cachedMemory),this._cache.usedMemory+this._colorCache.usedMemory+this._depthCache.usedMemory)}set interactive(e){this._cache.interactive=this._colorCache.interactive=this._depthCache.interactive=e,this._interactive=e}get interactive(){return this._interactive}acquire(t,r,i,n=c.RGBA8UNORM){const s=w(n,t,r);let d=this._cache.pop(s);const{rctx:f}=this;if(d){d.retain(),d.setName(i);const t=d.getAttachment(l);t&&(t.name=_(i));const r=d.getAttachment(u);r&&(r.name=p(i,0));const{fbo:a}=d;if(!a)throw new e("renderer","attempt to use a none existing framebuffer");f.temporaryBindFramebufferObject(a,(()=>{f.setDrawBuffers([u]),f.unbindTexture(a.colorTexture)}))}else{const e=new m(f),C=(e,a,h)=>{a??=c.RGBA8UNORM;const i=this._acquireColor(a,t,r,h??p(d.name,e-u));return this.rctx.unbindTexture(i.attachment),d.attachColor(i,e),i.release(),d},w=e=>{e??=o.DEPTH24_STENCIL8;const a=this.acquireDepth(e,t,r,_(d.name));return d.attachDepth(a),a.release(),d},b=()=>{this.debugCallback?.(d.name,d.fbo),this._acquired.delete(d);const e=h(n);!e&&null!=d?.getAttachment(u)||e&&null!=d?.getAttachment(l)?(e?(d.fbo?.invalidateAttachments([l]),d.detachAllColors()):(d.fbo?.invalidateAttachments([u],!0),d.detachAllButColor0()),this._cache.put(d)):d?.dispose()};d=new a(s,i,e,C,w,b),h(n)?d.acquireDepth(n):d.acquireColor(u,n,i)}return this._trackHandle(d)}acquireDepth(e,t,a,c){const h=w(e,t,a);let n=this._depthCache.pop(h);if(n)n.retain(),n.attachment.setShadowFiltering(!1);else{const c=new d(this.rctx,{...i[e],width:t,height:a});n=new r(h,c,(()=>this._depthCache.put(n)))}return n.name=c,n}_acquireColor(e,r,a,c){const h=w(e,r,a),i=this._colorCache.pop(h);if(i)return i.retain(),i.name=c,i;const o=new t(h,new d(this.rctx,{...n[e],width:r,height:a}),(()=>{this._colorCache.put(o)}));return o.name=c,o}_trackHandle(e){return this._acquired.add(e),e}}function p(e,t=0){return`${e}.color${t}`}function _(e){return`${e}.depth`}const C=new a("default","default",null,(()=>C),(()=>C),(()=>{}));function w(e,t,r){return`${t}x${r}:${e}`}C.release=()=>!1;export{f as FBOCache,C as defaultWebGLFBO};
5
+ import e from"../../../../core/Error.js";import{ManagedColorAttachment as t}from"../../webgl/ManagedColorAttachment.js";import{ManagedDepthTexture as r}from"../../webgl/ManagedDepthTexture.js";import a from"../../webgl/ManagedFBO.js";import{ColorFormat as c,isDepthFormat as h,DepthTextureFormats as i,ColorFormats as n,DepthFormat as o}from"./FBOCacheFormats.js";import{FBOPool as s}from"./FBOPool.js";import{DepthStencilAttachment as l,ColorAttachment0 as u}from"../../../webgl/enums.js";import{FramebufferObject as m}from"../../../webgl/FramebufferObject.js";import{Texture as d}from"../../../webgl/Texture.js";class f{constructor(e){this.rctx=e,this._interactive=!1,this._acquired=new Set,this._cache=new s(e.newCache,"FBOCache"),this._depthCache=new s(e.newCache,"DepthAttachmentCache"),this._colorCache=new s(e.newCache,"ColorAttachmentCache")}destroy(){this._cache.destroy(),this._depthCache.destroy(),this._colorCache.destroy()}clean(){this._cache.clean(),this._colorCache.clean(),this._depthCache.clean()}frameStart(){this._cache.frame(),this._colorCache.frame(),this._depthCache.frame(),this.debugCallback?.()}frameEnd(){const{debugCallback:e}=this;e&&this._acquired.forEach((t=>e(t.name,t.fbo)))}get usedMemory(){return Array.from(this._acquired.values()).reduce(((e,t)=>e+t.cachedMemory),this._cache.usedMemory+this._colorCache.usedMemory+this._depthCache.usedMemory)}set interactive(e){this._cache.interactive=this._colorCache.interactive=this._depthCache.interactive=e,this._interactive=e}get interactive(){return this._interactive}acquire(t,r,i,n=c.RGBA8UNORM){const s=w(n,t,r);let d=this._cache.pop(s);const{rctx:f}=this;if(d){d.retain(),d.setName(i);const t=d.getAttachment(l);t&&(t.name=_(i));const r=d.getAttachment(u);r&&(r.name=p(i,0));const{fbo:a}=d;if(!a)throw new e("renderer","attempt to use a none existing framebuffer");f.temporaryBindFramebufferObject(a,(()=>{f.setDrawBuffers([u]),f.unbindTexture(a.colorTexture)}))}else{const e=new m(f),C=(e,a,h)=>{a??=c.RGBA8UNORM;const i=this._acquireColor(a,t,r,h??p(d.name,e-u));return this.rctx.unbindTexture(i.attachment),d.attachColor(i,e),i.release(),d},w=e=>{e??=o.DEPTH24_STENCIL8;const a=this.acquireDepth(e,t,r,_(d.name));return d.attachDepth(a),a.release(),d},b=()=>{this.debugCallback?.(d.name,d.fbo),this._acquired.delete(d);const e=h(n);e&&null!=d?.getAttachment(l)||!e&&null!=d?.getAttachment(u)?(e?(d.fbo?.invalidateAttachments([l]),d.detachAllColors()):(d.fbo?.invalidateAttachments([u]),d.detachAllButColor0()),this._cache.put(d)):d?.dispose()};d=new a(s,i,e,C,w,b),h(n)?d.acquireDepth(n):d.acquireColor(u,n,i)}return this._trackHandle(d)}acquireDepth(e,t,a,c){const h=w(e,t,a);let n=this._depthCache.pop(h);if(n)n.retain(),n.attachment.setShadowFiltering(!1);else{const c=new d(this.rctx,{...i[e],width:t,height:a});n=new r(h,c,(()=>this._depthCache.put(n)))}return n.name=c,n}_acquireColor(e,r,a,c){const h=w(e,r,a),i=this._colorCache.pop(h);if(i)return i.retain(),i.name=c,i;const o=new t(h,new d(this.rctx,{...n[e],width:r,height:a}),(()=>{this._colorCache.put(o)}));return o.name=c,o}_trackHandle(e){return this._acquired.add(e),e}}function p(e,t=0){return`${e}.color${t}`}function _(e){return`${e}.depth`}const C=new a("default","default",null,(()=>C),(()=>C),(()=>{}));function w(e,t,r){return`${t}x${r}:${e}`}C.release=()=>!1;export{f as FBOCache,C as defaultWebGLFBO};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{create as t}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{RenderPass as s,RenderPassSorting as e}from"./RenderPass.js";import{RenderPassIdentifier as i}from"./RenderPassIdentifier.js";import{ShaderOutput as r}from"../shaderLibrary/ShaderOutput.js";import{VertexNormalPassParameters as a,VertexNormalDrawParameters as n}from"../shaderLibrary/attributes/VertexNormal.glsl.js";class h{constructor(t){const i=t.renderContext.rctx,r=t.techniques;this.opaque=new s(i,r),this.transparent=new s(i,r,e.BackToFront),this.integratedMesh=new s(i,r),this.shadowMap=new s(i,r),this.highlight=new s(i,r),this.highlightIntegratedMesh=new s(i,r),this.highlightShadowMap=new s(i,r),this.viewshedShadowMap=new s(i,r),this.defaultShadowMap=new s(i,r)}}class o extends a{constructor(){super(...arguments),this.slicePlaneLocalOrigin=t(),this.origin=this.slicePlaneLocalOrigin}}class c extends n{}class d extends o{constructor(){super(...arguments),this.identifier=i.Material,this.output=r.Color,this.transparent=!1}}class l extends o{constructor(){super(...arguments),this.identifier=i.ShadowMap}}class p extends o{constructor(){super(...arguments),this.identifier=i.Highlight}}class u extends o{constructor(){super(...arguments),this.identifier=i.ViewshedShadowMap}}export{h as AllRenderPasses,c as DrawParameters,p as HighlightPassParameters,d as MaterialPassParameters,o as PassParameters,l as ShadowMapPassParameters,u as ViewshedShadowMapPassParameters};
5
+ import{create as t}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{RenderPass as e,RenderPassSorting as s}from"./RenderPass.js";import{RenderPassIdentifier as i}from"./RenderPassIdentifier.js";import{ShaderOutput as r}from"../shaderLibrary/ShaderOutput.js";import{VertexNormalPassParameters as n,VertexNormalDrawParameters as a}from"../shaderLibrary/attributes/VertexNormal.glsl.js";class o{constructor(t){const i=t.renderContext.rctx,r=t.techniques;this.opaque=new e(i,r),this.transparent=new e(i,r,s.BackToFront),this.integratedMesh=new e(i,r),this.occludedGround=new e(i,r),this.shadowMap=new e(i,r),this.highlight=new e(i,r),this.highlightIntegratedMesh=new e(i,r),this.highlightShadowMap=new e(i,r),this.viewshedShadowMap=new e(i,r),this.defaultShadowMap=new e(i,r)}}class h extends n{constructor(){super(...arguments),this.slicePlaneLocalOrigin=t(),this.origin=this.slicePlaneLocalOrigin}}class c extends a{}class d extends h{constructor(){super(...arguments),this.identifier=i.Material,this.output=r.Color,this.transparent=!1}}class l extends h{constructor(){super(...arguments),this.identifier=i.ShadowMap}}class p extends h{constructor(){super(...arguments),this.identifier=i.Highlight}}class u extends h{constructor(){super(...arguments),this.identifier=i.ViewshedShadowMap}}export{o as AllRenderPasses,c as DrawParameters,p as HighlightPassParameters,d as MaterialPassParameters,h as PassParameters,l as ShadowMapPassParameters,u as ViewshedShadowMapPassParameters};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as s}from"../../../../../chunks/tslib.es6.js";import"../../../../../core/Logger.js";import"../../../../../core/has.js";import"../../../../../core/RandomLCG.js";import"../../../../../core/Error.js";import{subclass as e}from"../../../../../core/accessorSupport/decorators/subclass.js";import{fromMat4 as t,transpose as r,invert as a}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{copy as o}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{i as h,c as n}from"../../../../../chunks/vec32.js";import{create as m}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{MaterialPassParameters as c,ShadowMapPassParameters as l,HighlightPassParameters as u,ViewshedShadowMapPassParameters as p,AllRenderPasses as d}from"./AllRenderPasses.js";import{RenderPassIdentifier as _}from"./RenderPassIdentifier.js";import{ShaderOutput as P}from"../shaderLibrary/ShaderOutput.js";import{TwoVectorPosition as g}from"../util/TwoVectorPosition.js";import{SyncRenderPlugin as w}from"../../effects/RenderPlugin.js";import{DepthRange as f}from"../../lib/DepthRange.js";import{RenderSlot as R}from"../../lib/RenderSlot.js";let E=class extends w{constructor(){super({}),this.produces=new Map([[R.OPAQUE_MATERIAL,s=>this._produces(s,R.OPAQUE_MATERIAL)],[R.TRANSPARENT_MATERIAL,s=>this._produces(s,R.TRANSPARENT_MATERIAL)],[R.INTEGRATED_MESH,s=>this._produces(s,R.INTEGRATED_MESH)]]),this._materialPassParameters=new c,this._shadowPassParameters=new l,this._highlightPassParameters=new u,this._viewshedPassParameters=new p,this._systems=new Set}initializeRenderContext(s){this._context=s,this._passes=new d(s)}get rctx(){return this._context.renderContext.rctx}uninitializeRenderContext(){}dispose(){this._context=null,this._systems.clear()}register(s){this._systems.add(s)}_produces(s,e){return!!this._invoke(s,e,(s=>s.count>0))}prepareRender(s){const{_systems:e,_passes:t}=this;if(0!==e.size&&null!=t){for(const s of Object.values(t))s.prepareSubmit();e.forEach((e=>e.submit(t,s.bind)));for(const s of Object.values(t))s.finishSubmit()}}acquireTechniques(s){if(0===this._systems.size)return null;const e=s.output===P.Shadow||s.output===P.ShadowHighlight||s.output===P.ShadowExcludeHighlight?this._shadowPassParameters:s.output===P.ViewshedShadow?this._viewshedPassParameters:s.output===P.Highlight?this._highlightPassParameters:this._materialPassParameters,t=s.bind;return this._updateParameters(t.camera,e,t.slot===R.TRANSPARENT_MATERIAL),this._materialPassParameters.output=s.output,this._invoke(s.output,s.bind.slot,((e,t)=>e.acquire(t,s.bind)))}render(s,e){this._invoke(s.output,s.bind.slot,((t,r)=>t.dispatch(r,s.bind,e)))}_invoke(s,e,t){if(null==this._passes)return null;switch(e){case R.OPAQUE_MATERIAL:switch(s){case P.Color:case P.ColorEmission:case P.Depth:case P.Normal:case P.ObjectAndLayerIdColor:return t(this._passes.opaque,this._materialPassParameters);case P.Highlight:return t(this._passes.highlight,this._highlightPassParameters);case P.Shadow:return t(this._passes.shadowMap,this._shadowPassParameters);case P.ShadowHighlight:return t(this._passes.highlightShadowMap,this._shadowPassParameters);case P.ShadowExcludeHighlight:return t(this._passes.defaultShadowMap,this._shadowPassParameters);case P.ViewshedShadow:return t(this._passes.viewshedShadowMap,this._viewshedPassParameters)}break;case R.TRANSPARENT_MATERIAL:switch(s){case P.Color:case P.ColorEmission:case P.Depth:case P.Normal:case P.ObjectAndLayerIdColor:return t(this._passes.transparent,this._materialPassParameters)}break;case R.INTEGRATED_MESH:switch(s){case P.Color:case P.ColorEmission:case P.Depth:case P.Normal:case P.ObjectAndLayerIdColor:return t(this._passes.integratedMesh,this._materialPassParameters);case P.Highlight:return t(this._passes.highlightIntegratedMesh,this._highlightPassParameters)}}return null}notifyDirty(){this._context.requestRender()}queryDepthRange(s){const e=new f;return this._systems.forEach((t=>e.union(t.queryDepthRange(s)))),e}get hasEmissions(){let s=!1;return this._systems.forEach((e=>s=e.hasEmissions||s)),s}_updateParameters(s,e,i){const m=s.viewInverseTransposeMatrix;h(A,m[3],m[7],m[11]),S.set(A),n(e.transformWorldFromViewTH,S.high),n(e.transformWorldFromViewTL,S.low),n(e.slicePlaneLocalOrigin,A),t(e.transformViewFromCameraRelativeRS,s.viewMatrix),o(e.transformProjFromView,s.projectionMatrix),e.identifier===_.Material&&(this._materialPassParameters.transparent=i,r(b,e.transformViewFromCameraRelativeRS),a(e.transformNormalViewFromGlobal,b))}hasHighlight(s){for(const e of this._systems)if(e.hasHighlight(s))return!0;return!1}};E=s([e("esri.views.3d.webgl-engine.core.renderPasses.RenderPassManager")],E);const A=m(),b=i(),S=new g;export{E as RenderPassManager};
5
+ import{_ as s}from"../../../../../chunks/tslib.es6.js";import"../../../../../core/Logger.js";import"../../../../../core/has.js";import"../../../../../core/RandomLCG.js";import"../../../../../core/Error.js";import{subclass as e}from"../../../../../core/accessorSupport/decorators/subclass.js";import{fromMat4 as t,transpose as r,invert as a}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{copy as o}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{i as h,c as n}from"../../../../../chunks/vec32.js";import{create as m}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{MaterialPassParameters as c,ShadowMapPassParameters as l,HighlightPassParameters as u,ViewshedShadowMapPassParameters as d,AllRenderPasses as p}from"./AllRenderPasses.js";import{RenderPassIdentifier as _}from"./RenderPassIdentifier.js";import{ShaderOutput as P}from"../shaderLibrary/ShaderOutput.js";import{TwoVectorPosition as g}from"../util/TwoVectorPosition.js";import{SyncRenderPlugin as w}from"../../effects/RenderPlugin.js";import{DepthRange as f}from"../../lib/DepthRange.js";import{RenderSlot as E}from"../../lib/RenderSlot.js";let R=class extends w{constructor(){super({}),this.produces=new Map([[E.OPAQUE_MATERIAL,s=>this._produces(s,E.OPAQUE_MATERIAL)],[E.TRANSPARENT_MATERIAL,s=>this._produces(s,E.TRANSPARENT_MATERIAL)],[E.INTEGRATED_MESH,s=>this._produces(s,E.INTEGRATED_MESH)],[E.OCCLUDED_GROUND,s=>this._produces(s,E.OCCLUDED_GROUND)]]),this._materialPassParameters=new c,this._shadowPassParameters=new l,this._highlightPassParameters=new u,this._viewshedPassParameters=new d,this._systems=new Set}initializeRenderContext(s){this._context=s,this._passes=new p(s)}get rctx(){return this._context.renderContext.rctx}uninitializeRenderContext(){}dispose(){this._context=null,this._systems.clear()}register(s){this._systems.add(s)}_produces(s,e){return!!this._invoke(s,e,(s=>s.count>0))}prepareRender(s){const{_systems:e,_passes:t}=this;if(0!==e.size&&null!=t){for(const s of Object.values(t))s.prepareSubmit();e.forEach((e=>e.submit(t,s.bind)));for(const s of Object.values(t))s.finishSubmit()}}acquireTechniques(s){if(0===this._systems.size)return null;const e=s.output===P.Shadow||s.output===P.ShadowHighlight||s.output===P.ShadowExcludeHighlight?this._shadowPassParameters:s.output===P.ViewshedShadow?this._viewshedPassParameters:s.output===P.Highlight?this._highlightPassParameters:this._materialPassParameters,t=s.bind;return this._updateParameters(t.camera,e,t.slot===E.TRANSPARENT_MATERIAL),this._materialPassParameters.output=s.output,this._invoke(s.output,s.bind.slot,((e,t)=>e.acquire(t,s.bind)))}render(s,e){this._invoke(s.output,s.bind.slot,((t,r)=>t.dispatch(r,s.bind,e)))}_invoke(s,e,t){if(null==this._passes)return null;switch(e){case E.OPAQUE_MATERIAL:switch(s){case P.Color:case P.ColorEmission:case P.Depth:case P.Normal:case P.ObjectAndLayerIdColor:return t(this._passes.opaque,this._materialPassParameters);case P.Highlight:return t(this._passes.highlight,this._highlightPassParameters);case P.Shadow:return t(this._passes.shadowMap,this._shadowPassParameters);case P.ShadowHighlight:return t(this._passes.highlightShadowMap,this._shadowPassParameters);case P.ShadowExcludeHighlight:return t(this._passes.defaultShadowMap,this._shadowPassParameters);case P.ViewshedShadow:return t(this._passes.viewshedShadowMap,this._viewshedPassParameters)}break;case E.TRANSPARENT_MATERIAL:switch(s){case P.Color:case P.ColorEmission:case P.Depth:case P.Normal:case P.ObjectAndLayerIdColor:return t(this._passes.transparent,this._materialPassParameters)}break;case E.INTEGRATED_MESH:switch(s){case P.Color:case P.ColorEmission:case P.Depth:case P.Normal:case P.ObjectAndLayerIdColor:return t(this._passes.integratedMesh,this._materialPassParameters);case P.Highlight:return t(this._passes.highlightIntegratedMesh,this._highlightPassParameters)}break;case E.OCCLUDED_GROUND:switch(s){case P.Color:case P.ColorEmission:case P.Depth:case P.Normal:case P.ObjectAndLayerIdColor:return t(this._passes.occludedGround,this._materialPassParameters)}}return null}notifyDirty(){this._context.requestRender()}queryDepthRange(s){const e=new f;return this._systems.forEach((t=>e.union(t.queryDepthRange(s)))),e}get hasEmissions(){let s=!1;return this._systems.forEach((e=>s=e.hasEmissions||s)),s}_updateParameters(s,e,i){const m=s.viewInverseTransposeMatrix;h(A,m[3],m[7],m[11]),j.set(A),n(e.transformWorldFromViewTH,j.high),n(e.transformWorldFromViewTL,j.low),n(e.slicePlaneLocalOrigin,A),t(e.transformViewFromCameraRelativeRS,s.viewMatrix),o(e.transformProjFromView,s.projectionMatrix),e.identifier===_.Material&&(this._materialPassParameters.transparent=i,r(b,e.transformViewFromCameraRelativeRS),a(e.transformNormalViewFromGlobal,b))}hasHighlight(s){for(const e of this._systems)if(e.hasHighlight(s))return!0;return!1}};R=s([e("esri.views.3d.webgl-engine.core.renderPasses.RenderPassManager")],R);const A=m(),b=i(),j=new g;export{R as RenderPassManager};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import{property as r}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{InternalRenderCategory as o}from"../../../webgl.js";import t from"../../../webgl/RenderNode.js";import{FocusAreaColorTechnique as i}from"./FocusAreaColorTechnique.js";import{F as c}from"../../../../../chunks/FocusAreaColor.glsl.js";import{DepthStencilAttachment as a}from"../../../../webgl/enums.js";let p=class extends t{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[o.FOCUSAREA_COLOR,o.FOCUSAREA]},this.produces=o.FOCUSAREA_COLOR,this._passParameters=new c}precompile(){this.techniques.precompile(i)}render(e){const r=this.techniques.get(i),s=e.find((({name:e})=>e===this.produces));if(!r.compiled)return this.requestRender(),s;const t=this.bindParameters,c=t.camera,p=c.fullViewport[2],n=c.fullViewport[3],m=e.find((({name:e})=>e===o.FOCUSAREA)),h=this.fboCache.acquire(p,n,this.produces),d=this.renderingContext;return d.bindFramebuffer(h.fbo),this._passParameters.color=s.getTexture(),this._passParameters.focusArea=m.getTexture(),this._passParameters.effect=u[this.focusAreasView.style],d.bindTechnique(r,t,this._passParameters),d.screen.draw(),h.attachDepth(s.getAttachment(a)),h}};var n;e([r()],p.prototype,"consumes",void 0),e([r()],p.prototype,"produces",void 0),e([r({constructOnly:!0})],p.prototype,"focusAreasView",void 0),p=e([s("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaColorNode")],p),function(e){e[e.NONE=0]="NONE",e[e.BRIGHT=1]="BRIGHT",e[e.DARK=2]="DARK"}(n||(n={}));const u={none:n.NONE,bright:n.BRIGHT,dark:n.DARK};export{p as FocusAreaColorNode};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import{property as r}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{InternalRenderCategory as o}from"../../../webgl.js";import t from"../../../webgl/RenderNode.js";import{FocusAreaColorTechnique as i}from"./FocusAreaColorTechnique.js";import{FocusAreaEffect as c}from"./FocusAreaEffect.js";import{F as a}from"../../../../../chunks/FocusAreaColor.glsl.js";import{DepthStencilAttachment as p}from"../../../../webgl/enums.js";let m=class extends t{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[o.FOCUSAREA_COLOR,o.FOCUSAREA]},this.produces=o.FOCUSAREA_COLOR,this._passParameters=new a}precompile(){this.techniques.precompile(i)}render(e){const r=this.techniques.get(i),s=e.find((({name:e})=>e===this.produces));if(!r.compiled)return this.requestRender(),s;const t=this.focusAreasView.style,c=this.bindParameters,a=c.camera,m=a.fullViewport[2],n=a.fullViewport[3],f=e.find((({name:e})=>e===o.FOCUSAREA)),h=this.fboCache.acquire(m,n,this.produces),d=this.renderingContext;return d.bindFramebuffer(h.fbo),this._passParameters.color=s.getTexture(),this._passParameters.focusArea=f.getTexture(),this._passParameters.effect=u[t],d.bindTechnique(r,c,this._passParameters),d.screen.draw(),h.attachDepth(s.getAttachment(p)),h}};e([r()],m.prototype,"consumes",void 0),e([r()],m.prototype,"produces",void 0),e([r({constructOnly:!0})],m.prototype,"focusAreasView",void 0),m=e([s("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaColorNode")],m);const u={bright:c.BRIGHT,dark:c.DARK};export{m as FocusAreaColorNode};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
+ */
5
+ var R;!function(R){R[R.BRIGHT=0]="BRIGHT",R[R.DARK=1]="DARK"}(R||(R={}));export{R as FocusAreaEffect};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import{property as t}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{RenderCategory as r,InternalRenderCategory as i}from"../../../webgl.js";import o from"../../../webgl/RenderNode.js";import{ColorFormat as n,DepthFormat as a}from"../../core/FBOCacheFormats.js";import{FocusAreaMaskTechnique as c}from"./FocusAreaMaskTechnique.js";import{Default3D as h}from"../../lib/DefaultVertexAttributeLocations.js";import{Pos3 as p}from"../../lib/DefaultVertexBufferLayouts.js";import{VertexArrayObject as u}from"../../lib/VertexArrayObject.js";import{F as l}from"../../../../../chunks/FocusAreaMask.glsl.js";import{BufferObject as m}from"../../../../webgl/BufferObject.js";import{FramebufferBit as d,DepthStencilAttachment as f,Face as g,StencilOperation as A,CompareFunction as E,PrimitiveType as b,Usage as w}from"../../../../webgl/enums.js";import{noParameters as _}from"../../../../webgl/NoParameters.js";let R=class extends o{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[r.TRANSPARENT]},this.produces=i.FOCUSAREA,this._vaos=new Array,this._counts=new Array,this._origins=new Array,this._maskParameters=new l}initialize(){this.updateGeometries()}destroy(){this._vaos.forEach((e=>e.dispose())),this._vaos.length=this._counts.length=this._origins.length=0}precompile(){this.techniques.precompile(c)}render(e){const t=this.techniques.get(c),s=this.bindParameters,o=s.camera,h=o.fullViewport[2],p=o.fullViewport[3];if(!t.compiled||!this._vaos)return void this.requestRender();const u=e.find((({name:e})=>e===r.TRANSPARENT)),l=this.renderingContext,m=this.fboCache.acquire(h,p,i.FOCUSAREA,n.RGBA8UNORM);this.view.stage.renderer.occludedRequiresStencil?(m.acquireDepth(a.DEPTH24_STENCIL8),l.blitFramebuffer(u.fbo,m.fbo,d.DEPTH)):m.attachDepth(u.getAttachment(f)),l.bindFramebuffer(m.fbo),l.clear(d.COLOR|d.STENCIL),l.setViewport(0,0,h,p);const w=l.bindTechnique(t,s);l.setFaceCullingEnabled(!1),l.setStencilTestEnabled(!0),l.setStencilOpSeparate(g.FRONT,A.KEEP,A.INCR_WRAP,A.KEEP),l.setStencilOpSeparate(g.BACK,A.KEEP,A.DECR_WRAP,A.KEEP),l.setDepthWriteEnabled(!1);for(let r=0;r<this._vaos.length;r++){const e=this._vaos[r],t=this._counts[r];this._maskParameters.origin=this._origins[r],w.bindDraw(s,_,this._maskParameters),l.bindVAO(e),l.setDepthTestEnabled(!0),l.setStencilWriteMask(255),l.setStencilFunction(E.ALWAYS,0,255),l.setColorMask(!1,!1,!1,!1),l.drawArrays(b.TRIANGLES,0,t),l.setDepthTestEnabled(!1),l.setStencilWriteMask(0),l.setStencilFunction(E.NOTEQUAL,0,255),l.setColorMask(!0,!0,!0,!0),l.drawArrays(b.TRIANGLES,0,t)}return m}updateGeometries(){if(!this.view.stage)return;this._vaos.forEach((e=>e.dispose())),this._vaos.length=this._counts.length=this._origins.length=0;this.focusAreasView.volumes.forEach((e=>e.forEach((e=>{const t=new Array,s=e.indicesBottom;for(let o=0;o<s.length;o++)t.push(e.positions[3*(s[o]-1)]),t.push(e.positions[3*(s[o]-1)+1]),t.push(e.positions[3*(s[o]-1)+2]);const r=e.indicesExtruded;for(let o=0;o<r.length;o++)t.push(e.positions[3*r[o]]),t.push(e.positions[3*r[o]+1]),t.push(e.positions[3*r[o]+2]);const i=new u(this.renderingContext,h,new Map([["geometry",p]]),new Map([["geometry",m.createVertex(this.renderingContext,w.STATIC_DRAW,new Float32Array(t))]]));this._vaos.push(i),this._counts.push(s.length+r.length),this._origins.push(e.origin)})))),this.requestRender()}};e([t()],R.prototype,"consumes",void 0),e([t()],R.prototype,"produces",void 0),e([t({constructOnly:!0})],R.prototype,"focusAreasView",void 0),R=e([s("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaMaskNode")],R);class S{constructor(e,t,s,r,i){this.positions=e,this.indicesBottom=t,this.indicesExtruded=s,this.height=r,this.origin=i}}var T;!function(e){e[e.NONE=0]="NONE",e[e.BRIGHT=1]="BRIGHT",e[e.DARK=2]="DARK"}(T||(T={}));export{T as FocusAreaEffect,S as FocusAreaGeometry,R as FocusAreaMaskNode};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import{property as t}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{RenderCategory as r,InternalRenderCategory as i}from"../../../webgl.js";import o from"../../../webgl/RenderNode.js";import{ColorFormat as n,DepthFormat as a}from"../../core/FBOCacheFormats.js";import{FocusAreaMaskTechnique as c}from"./FocusAreaMaskTechnique.js";import{Default3D as h}from"../../lib/DefaultVertexAttributeLocations.js";import{Pos3 as p}from"../../lib/DefaultVertexBufferLayouts.js";import{VertexArrayObject as u}from"../../lib/VertexArrayObject.js";import{F as l}from"../../../../../chunks/FocusAreaMask.glsl.js";import{BufferObject as m}from"../../../../webgl/BufferObject.js";import{FramebufferBit as d,DepthStencilAttachment as f,Face as g,StencilOperation as A,CompareFunction as b,PrimitiveType as E,Usage as w}from"../../../../webgl/enums.js";import{noParameters as _}from"../../../../webgl/NoParameters.js";let R=class extends o{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[r.TRANSPARENT]},this.produces=i.FOCUSAREA,this._vaos=new Array,this._counts=new Array,this._origins=new Array,this._maskParameters=new l}initialize(){this.updateGeometries()}destroy(){this._vaos.forEach((e=>e.dispose())),this._vaos.length=this._counts.length=this._origins.length=0}precompile(){this.techniques.precompile(c)}render(e){const t=this.techniques.get(c),s=this.bindParameters,o=s.camera,h=o.fullViewport[2],p=o.fullViewport[3];if(!t.compiled||!this._vaos)return void this.requestRender();const u=e.find((({name:e})=>e===r.TRANSPARENT)),l=this.renderingContext,m=this.fboCache.acquire(h,p,i.FOCUSAREA,n.RGBA8UNORM);this.view.stage.renderer.occludedRequiresStencil?(m.acquireDepth(a.DEPTH24_STENCIL8),l.blitFramebuffer(u.fbo,m.fbo,d.DEPTH)):m.attachDepth(u.getAttachment(f)),l.bindFramebuffer(m.fbo),l.clear(d.COLOR|d.STENCIL),l.setViewport(0,0,h,p);const w=l.bindTechnique(t,s);l.setFaceCullingEnabled(!1),l.setStencilTestEnabled(!0),l.setStencilOpSeparate(g.FRONT,A.KEEP,A.INCR_WRAP,A.KEEP),l.setStencilOpSeparate(g.BACK,A.KEEP,A.DECR_WRAP,A.KEEP),l.setDepthWriteEnabled(!1);for(let r=0;r<this._vaos.length;r++){const e=this._vaos[r],t=this._counts[r];this._maskParameters.origin=this._origins[r],w.bindDraw(s,_,this._maskParameters),l.bindVAO(e),l.setDepthTestEnabled(!0),l.setStencilWriteMask(255),l.setStencilFunction(b.ALWAYS,0,255),l.setColorMask(!1,!1,!1,!1),l.drawArrays(E.TRIANGLES,0,t),l.setDepthTestEnabled(!1),l.setStencilWriteMask(0),l.setStencilFunction(b.NOTEQUAL,0,255),l.setColorMask(!0,!0,!0,!0),l.drawArrays(E.TRIANGLES,0,t)}return m}updateGeometries(){if(!this.view.stage)return;this._vaos.forEach((e=>e.dispose())),this._vaos.length=this._counts.length=this._origins.length=0;this.focusAreasView.volumes.forEach((e=>e.forEach((e=>{const t=new Array,s=e.indicesBottom;for(let o=0;o<s.length;o++)t.push(e.positions[3*(s[o]-1)]),t.push(e.positions[3*(s[o]-1)+1]),t.push(e.positions[3*(s[o]-1)+2]);const r=e.indicesExtruded;for(let o=0;o<r.length;o++)t.push(e.positions[3*r[o]]),t.push(e.positions[3*r[o]+1]),t.push(e.positions[3*r[o]+2]);const i=new u(this.renderingContext,h,new Map([["geometry",p]]),new Map([["geometry",m.createVertex(this.renderingContext,w.STATIC_DRAW,new Float32Array(t))]]));this._vaos.push(i),this._counts.push(s.length+r.length),this._origins.push(e.origin)})))),this.requestRender()}};e([t()],R.prototype,"consumes",void 0),e([t()],R.prototype,"produces",void 0),e([t({constructOnly:!0})],R.prototype,"focusAreasView",void 0),R=e([s("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaMaskNode")],R);class S{constructor(e,t,s,r,i){this.positions=e,this.indicesBottom=t,this.indicesExtruded=s,this.height=r,this.origin=i}}export{S as FocusAreaGeometry,R as FocusAreaMaskNode};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import r from"../../../../../core/PooledArray.js";import{property as t}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators/subclass.js";import{ZEROS as s}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as i}from"../../../webgl.js";import n from"../../../webgl/RenderNode.js";import{DepthFormat as c}from"../../core/FBOCacheFormats.js";import{Blit as l}from"../blit/Blit.js";import{RenderOccludedFlag as d}from"../../lib/Material.js";import{RenderSlot as a}from"../../lib/RenderSlot.js";import{BlitMode as p}from"../../shaders/CompositingTechniqueConfiguration.js";import{DepthStencilAttachment as m,FramebufferBit as h}from"../../../../webgl/enums.js";let u=class extends n{constructor(e){super(e),this.consumes={required:[i.OCCLUDED]},this.produces=i.OCCLUDED,this._blit=new l(e.view.stage.renderView.techniques,p.PremultipliedAlpha)}precompile(){const e=this.view.stage.renderer;e.plugins.plugins.forAll((r=>{e.precompileSlots(r,a.OCCLUDED_TERRAIN,a.TRANSPARENT_OCCLUDER_MATERIAL),r.material&&e.precompileOccludedSlots(r,g)}))}render(e){const r=e.find((({name:e})=>e===this.produces));return this._renderOccludedAndTransparentStencil(r),this._renderOccludedComposite(r),r}_renderOccludedAndTransparentStencil(e){const r=this.view.stage.renderer,t=f;t.clear();for(const o of r.plugins.plugins)o.renderOccludedFlags&d.OccludeAndTransparentStencil&&t.push(o);0!==t.length&&(r.renderSlots(t,a.OCCLUDER_MATERIAL),this._renderAndComposite(e,e.getAttachment(m),.5,(()=>r.renderSlots(t,a.TRANSPARENT_OCCLUDER_MATERIAL)),!1,!1),t.clear())}_renderOccludedComposite(e){const r=this.view.stage.renderer,t=f;t.clear();let o=0;for(const n of r.plugins.plugins){const e=n.renderOccludedFlags&C;o|=e,e&&t.push(n)}if(!o)return void t.clear();const s=this._getDepthStencilAttachment(e);let i=s.clearStencil;for(const n of g)o&n&&(this._renderAndComposite(e,s.depth,n===d.Opaque?1:.5,(()=>r.renderOccludedSlots(t,n)),!0,i),i=!1);s.release(),t.clear()}_renderAndComposite(e,r,t,o,i,n){const c=this.renderingContext,{width:l,height:d}=e.fbo,a=this.fboCache.acquire(l,d,"tmp color");a.attachDepth(r),c.bindFramebuffer(a.fbo),c.clearFramebuffer(s,i,n),o(),a.detachDepth(),this._blit.blend(c,a,e,this.bindParameters,t),a.release()}_getDepthStencilAttachment(e){const{width:r,height:t}=e.fbo;if(!this.view.stage.renderer.occludedRequiresIntegratedMeshStencil){const e=this.fboCache.acquireDepth(c.DEPTH24_STENCIL8,r,t,"retained stencil");return{depth:e,release:()=>e.release(),clearStencil:!0}}const o=this.fboCache.acquire(r,t,"retained stencil",c.DEPTH24_STENCIL8);return this.renderingContext.blitFramebuffer(e.fbo,o.fbo,h.STENCIL),{depth:o.getAttachment(m),release:()=>o.release(),clearStencil:!1}}};e([t()],u.prototype,"consumes",void 0),e([t()],u.prototype,"produces",void 0),u=e([o("esri.views.3d.webgl-engine.effects.geometry.RenderOccludedRenderNode")],u);const f=new r,g=[d.OccludeAndTransparent,d.Transparent,d.Opaque],C=g.reduce(((e,r)=>e|r),d.None);export{u as RenderOccludedRenderNode};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import r from"../../../../../core/PooledArray.js";import{property as t}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators/subclass.js";import{ZEROS as s}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as i}from"../../../webgl.js";import n from"../../../webgl/RenderNode.js";import{DepthFormat as c}from"../../core/FBOCacheFormats.js";import{Blit as l}from"../blit/Blit.js";import{RenderOccludedFlag as d}from"../../lib/Material.js";import{RenderSlot as a}from"../../lib/RenderSlot.js";import{BlitMode as p}from"../../shaders/CompositingTechniqueConfiguration.js";import{DepthStencilAttachment as m,FramebufferBit as h}from"../../../../webgl/enums.js";let u=class extends n{constructor(e){super(e),this.consumes={required:[i.OCCLUDED]},this.produces=i.OCCLUDED,this._blit=new l(e.view.stage.renderView.techniques,p.PremultipliedAlpha)}precompile(){const e=this.view.stage.renderer;e.plugins.plugins.forAll((r=>{e.precompileSlots(r,a.OCCLUDED_GROUND,a.TRANSPARENT_OCCLUDER_MATERIAL),r.material&&e.precompileOccludedSlots(r,g)}))}render(e){const r=e.find((({name:e})=>e===this.produces));return this._renderOccludedAndTransparentStencil(r),this._renderOccludedComposite(r),r}_renderOccludedAndTransparentStencil(e){const r=this.view.stage.renderer,t=f;t.clear();for(const o of r.plugins.plugins)o.renderOccludedFlags&d.OccludeAndTransparentStencil&&t.push(o);0!==t.length&&(r.renderSlots(t,a.OCCLUDER_MATERIAL),this._renderAndComposite(e,e.getAttachment(m),.5,(()=>r.renderSlots(t,a.TRANSPARENT_OCCLUDER_MATERIAL)),!1,!1),t.clear())}_renderOccludedComposite(e){const r=this.view.stage.renderer,t=f;t.clear();let o=0;for(const n of r.plugins.plugins){const e=n.renderOccludedFlags&C;o|=e,e&&t.push(n)}if(!o)return void t.clear();const s=this._getDepthStencilAttachment(e);let i=s.clearStencil;for(const n of g)o&n&&(this._renderAndComposite(e,s.depth,n===d.Opaque?1:.5,(()=>r.renderOccludedSlots(t,n)),!0,i),i=!1);s.release(),t.clear()}_renderAndComposite(e,r,t,o,i,n){const c=this.renderingContext,{width:l,height:d}=e.fbo,a=this.fboCache.acquire(l,d,"tmp color");a.attachDepth(r),c.bindFramebuffer(a.fbo),c.clearFramebuffer(s,i,n),o(),a.detachDepth(),this._blit.blend(c,a,e,this.bindParameters,t),a.release()}_getDepthStencilAttachment(e){const{width:r,height:t}=e.fbo;if(!this.view.stage.renderer.occludedRequiresIntegratedMeshStencil){const e=this.fboCache.acquireDepth(c.DEPTH24_STENCIL8,r,t,"retained stencil");return{depth:e,release:()=>e.release(),clearStencil:!0}}const o=this.fboCache.acquire(r,t,"retained stencil",c.DEPTH24_STENCIL8);return this.renderingContext.blitFramebuffer(e.fbo,o.fbo,h.STENCIL),{depth:o.getAttachment(m),release:()=>o.release(),clearStencil:!1}}};e([t()],u.prototype,"consumes",void 0),e([t()],u.prototype,"produces",void 0),u=e([o("esri.views.3d.webgl-engine.effects.geometry.RenderOccludedRenderNode")],u);const f=new r,g=[d.OccludeAndTransparent,d.Transparent,d.Opaque],C=g.reduce(((e,r)=>e|r),d.None);export{u as RenderOccludedRenderNode};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- var A;!function(A){A[A.INTEGRATED_MESH=0]="INTEGRATED_MESH",A[A.OPAQUE_TERRAIN=1]="OPAQUE_TERRAIN",A[A.OPAQUE_MATERIAL=2]="OPAQUE_MATERIAL",A[A.OPAQUE_MATERIAL_WITHOUT_NORMALS=3]="OPAQUE_MATERIAL_WITHOUT_NORMALS",A[A.TRANSPARENT_MATERIAL=4]="TRANSPARENT_MATERIAL",A[A.TRANSPARENT_MATERIAL_WITHOUT_NORMALS=5]="TRANSPARENT_MATERIAL_WITHOUT_NORMALS",A[A.TRANSPARENT_TERRAIN=6]="TRANSPARENT_TERRAIN",A[A.TRANSPARENT_MATERIAL_WITHOUT_DEPTH=7]="TRANSPARENT_MATERIAL_WITHOUT_DEPTH",A[A.OCCLUDED_TERRAIN=8]="OCCLUDED_TERRAIN",A[A.OCCLUDER_MATERIAL=9]="OCCLUDER_MATERIAL",A[A.TRANSPARENT_OCCLUDER_MATERIAL=10]="TRANSPARENT_OCCLUDER_MATERIAL",A[A.OCCLUSION_PIXELS=11]="OCCLUSION_PIXELS",A[A.HUD_MATERIAL=12]="HUD_MATERIAL",A[A.LABEL_MATERIAL=13]="LABEL_MATERIAL",A[A.LINE_CALLOUTS=14]="LINE_CALLOUTS",A[A.LINE_CALLOUTS_HUD_DEPTH=15]="LINE_CALLOUTS_HUD_DEPTH",A[A.OVERLAY=16]="OVERLAY",A[A.DRAPED_MATERIAL=17]="DRAPED_MATERIAL",A[A.DRAPED_WATER=18]="DRAPED_WATER",A[A.VOXEL=19]="VOXEL",A[A.MAX_SLOTS=20]="MAX_SLOTS"}(A||(A={}));export{A as RenderSlot};
5
+ var A;!function(A){A[A.INTEGRATED_MESH=0]="INTEGRATED_MESH",A[A.OPAQUE_TERRAIN=1]="OPAQUE_TERRAIN",A[A.OPAQUE_MATERIAL=2]="OPAQUE_MATERIAL",A[A.OPAQUE_MATERIAL_WITHOUT_NORMALS=3]="OPAQUE_MATERIAL_WITHOUT_NORMALS",A[A.TRANSPARENT_MATERIAL=4]="TRANSPARENT_MATERIAL",A[A.TRANSPARENT_MATERIAL_WITHOUT_NORMALS=5]="TRANSPARENT_MATERIAL_WITHOUT_NORMALS",A[A.TRANSPARENT_TERRAIN=6]="TRANSPARENT_TERRAIN",A[A.TRANSPARENT_MATERIAL_WITHOUT_DEPTH=7]="TRANSPARENT_MATERIAL_WITHOUT_DEPTH",A[A.OCCLUDED_GROUND=8]="OCCLUDED_GROUND",A[A.OCCLUDER_MATERIAL=9]="OCCLUDER_MATERIAL",A[A.TRANSPARENT_OCCLUDER_MATERIAL=10]="TRANSPARENT_OCCLUDER_MATERIAL",A[A.OCCLUSION_PIXELS=11]="OCCLUSION_PIXELS",A[A.HUD_MATERIAL=12]="HUD_MATERIAL",A[A.LABEL_MATERIAL=13]="LABEL_MATERIAL",A[A.LINE_CALLOUTS=14]="LINE_CALLOUTS",A[A.LINE_CALLOUTS_HUD_DEPTH=15]="LINE_CALLOUTS_HUD_DEPTH",A[A.OVERLAY=16]="OVERLAY",A[A.DRAPED_MATERIAL=17]="DRAPED_MATERIAL",A[A.DRAPED_WATER=18]="DRAPED_WATER",A[A.VOXEL=19]="VOXEL",A[A.MAX_SLOTS=20]="MAX_SLOTS"}(A||(A={}));export{A as RenderSlot};