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

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 (541) hide show
  1. package/Graphic.js +1 -1
  2. package/applications/Components/QuantityFormatter.js +1 -1
  3. package/arcade/Feature.js +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/{91cd29f53f07bc38fe75.js → 14b3c18581b31c93af82.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{9c8224ca29475556e5ea.js → 26d3c9c6215c4076f943.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{66a1b92358344dd28ee1.js → 571252c9822d73cf7b01.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{151d6354e7bc105b25c0.js → 585c7b485c42555ec554.js} +6 -6
  9. package/assets/esri/core/workers/chunks/62b2d3720693c93a60f2.js +1 -0
  10. package/assets/esri/core/workers/chunks/{2adf558cd8d8155d07d7.js → 80b596496800e8d60eb8.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{9d5eac3bd1526e2b33e3.js → 8fda0a5b247385e68dc0.js} +1 -1
  12. package/assets/esri/core/workers/chunks/9b610fbfcd47c3dde34d.js +1 -0
  13. package/assets/esri/core/workers/chunks/a0c35521e677459f6fa3.js +1 -0
  14. package/assets/esri/core/workers/chunks/a22e5b2874647fe0d31a.js +1 -0
  15. package/assets/esri/core/workers/chunks/{0a4cece5e96fb7e8a57b.js → b893012bff5dc55e542d.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{6fa1a5b7276a037dbd6a.js → cc4a6f4000cb6680be48.js} +4 -4
  17. package/assets/esri/themes/base/_core.scss +2 -0
  18. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationLayers.scss +1 -1
  19. package/assets/esri/themes/base/widgets/_Legend.scss +0 -4
  20. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +1 -1
  21. package/assets/esri/themes/base/widgets/_OrientedImageryViewerNavigationSettingsUI.scss +16 -0
  22. package/assets/esri/themes/dark/main.css +1 -1
  23. package/assets/esri/themes/light/main.css +1 -1
  24. package/assets/esri/themes/light/view.css +1 -1
  25. package/assets/esri/views/magnifier/overlay.ts.svg +1 -1
  26. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ar.json +1 -1
  27. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bg.json +1 -1
  28. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bs.json +1 -1
  29. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ca.json +1 -1
  30. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_cs.json +1 -1
  31. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_da.json +1 -1
  32. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_de.json +1 -1
  33. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_el.json +1 -1
  34. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_es.json +1 -1
  35. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_et.json +1 -1
  36. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fi.json +1 -1
  37. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fr.json +1 -1
  38. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_he.json +1 -1
  39. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hr.json +1 -1
  40. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hu.json +1 -1
  41. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_id.json +1 -1
  42. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_it.json +1 -1
  43. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ja.json +1 -1
  44. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ko.json +1 -1
  45. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lt.json +1 -1
  46. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lv.json +1 -1
  47. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nl.json +1 -1
  48. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_no.json +1 -1
  49. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pl.json +1 -1
  50. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-BR.json +1 -1
  51. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-PT.json +1 -1
  52. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ro.json +1 -1
  53. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ru.json +1 -1
  54. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sk.json +1 -1
  55. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sl.json +1 -1
  56. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sr.json +1 -1
  57. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sv.json +1 -1
  58. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_th.json +1 -1
  59. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_tr.json +1 -1
  60. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_uk.json +1 -1
  61. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_vi.json +1 -1
  62. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-CN.json +1 -1
  63. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-HK.json +1 -1
  64. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-TW.json +1 -1
  65. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
  66. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
  67. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ar.json +1 -1
  68. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_bg.json +1 -1
  69. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_bs.json +1 -1
  70. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ca.json +1 -1
  71. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_cs.json +1 -1
  72. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_da.json +1 -1
  73. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_de.json +1 -1
  74. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_el.json +1 -1
  75. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_es.json +1 -1
  76. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_et.json +1 -1
  77. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_fi.json +1 -1
  78. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_fr.json +1 -1
  79. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_he.json +1 -1
  80. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_hr.json +1 -1
  81. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_hu.json +1 -1
  82. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_id.json +1 -1
  83. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_it.json +1 -1
  84. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ja.json +1 -1
  85. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ko.json +1 -1
  86. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_lt.json +1 -1
  87. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_lv.json +1 -1
  88. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_nl.json +1 -1
  89. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_no.json +1 -1
  90. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pl.json +1 -1
  91. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pt-BR.json +1 -1
  92. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pt-PT.json +1 -1
  93. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ro.json +1 -1
  94. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ru.json +1 -1
  95. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sk.json +1 -1
  96. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sl.json +1 -1
  97. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sr.json +1 -1
  98. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sv.json +1 -1
  99. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_th.json +1 -1
  100. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_tr.json +1 -1
  101. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_uk.json +1 -1
  102. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_vi.json +1 -1
  103. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-CN.json +1 -1
  104. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-HK.json +1 -1
  105. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-TW.json +1 -1
  106. package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
  107. package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
  108. package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
  109. package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
  110. package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
  111. package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
  112. package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
  113. package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
  114. package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
  115. package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
  116. package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
  117. package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
  118. package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
  119. package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
  120. package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
  121. package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
  122. package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
  123. package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
  124. package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
  125. package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
  126. package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
  127. package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
  128. package/assets/esri/widgets/Directions/t9n/Directions_no.json +1 -1
  129. package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
  130. package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
  131. package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
  132. package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
  133. package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
  134. package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
  135. package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
  136. package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
  137. package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
  138. package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
  139. package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
  140. package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
  141. package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
  142. package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
  143. package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
  144. package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
  145. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  146. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  147. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  148. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  149. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  150. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  151. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  152. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  153. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  154. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  155. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  156. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  157. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  158. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  159. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  160. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  161. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  162. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  163. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  164. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  165. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  166. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  167. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
  168. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  169. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  170. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  171. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  172. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  173. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  174. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  175. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  176. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  177. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  178. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  179. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  180. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  181. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  182. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  183. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  184. package/assets/esri/widgets/LayerList/t9n/LayerList_ar.json +1 -1
  185. package/assets/esri/widgets/LayerList/t9n/LayerList_bg.json +1 -1
  186. package/assets/esri/widgets/LayerList/t9n/LayerList_bs.json +1 -1
  187. package/assets/esri/widgets/LayerList/t9n/LayerList_ca.json +1 -1
  188. package/assets/esri/widgets/LayerList/t9n/LayerList_cs.json +1 -1
  189. package/assets/esri/widgets/LayerList/t9n/LayerList_da.json +1 -1
  190. package/assets/esri/widgets/LayerList/t9n/LayerList_de.json +1 -1
  191. package/assets/esri/widgets/LayerList/t9n/LayerList_el.json +1 -1
  192. package/assets/esri/widgets/LayerList/t9n/LayerList_es.json +1 -1
  193. package/assets/esri/widgets/LayerList/t9n/LayerList_et.json +1 -1
  194. package/assets/esri/widgets/LayerList/t9n/LayerList_fi.json +1 -1
  195. package/assets/esri/widgets/LayerList/t9n/LayerList_fr.json +1 -1
  196. package/assets/esri/widgets/LayerList/t9n/LayerList_he.json +1 -1
  197. package/assets/esri/widgets/LayerList/t9n/LayerList_hr.json +1 -1
  198. package/assets/esri/widgets/LayerList/t9n/LayerList_hu.json +1 -1
  199. package/assets/esri/widgets/LayerList/t9n/LayerList_id.json +1 -1
  200. package/assets/esri/widgets/LayerList/t9n/LayerList_it.json +1 -1
  201. package/assets/esri/widgets/LayerList/t9n/LayerList_ja.json +1 -1
  202. package/assets/esri/widgets/LayerList/t9n/LayerList_ko.json +1 -1
  203. package/assets/esri/widgets/LayerList/t9n/LayerList_lt.json +1 -1
  204. package/assets/esri/widgets/LayerList/t9n/LayerList_lv.json +1 -1
  205. package/assets/esri/widgets/LayerList/t9n/LayerList_nl.json +1 -1
  206. package/assets/esri/widgets/LayerList/t9n/LayerList_no.json +1 -1
  207. package/assets/esri/widgets/LayerList/t9n/LayerList_pl.json +1 -1
  208. package/assets/esri/widgets/LayerList/t9n/LayerList_pt-BR.json +1 -1
  209. package/assets/esri/widgets/LayerList/t9n/LayerList_pt-PT.json +1 -1
  210. package/assets/esri/widgets/LayerList/t9n/LayerList_ro.json +1 -1
  211. package/assets/esri/widgets/LayerList/t9n/LayerList_ru.json +1 -1
  212. package/assets/esri/widgets/LayerList/t9n/LayerList_sk.json +1 -1
  213. package/assets/esri/widgets/LayerList/t9n/LayerList_sl.json +1 -1
  214. package/assets/esri/widgets/LayerList/t9n/LayerList_sr.json +1 -1
  215. package/assets/esri/widgets/LayerList/t9n/LayerList_sv.json +1 -1
  216. package/assets/esri/widgets/LayerList/t9n/LayerList_th.json +1 -1
  217. package/assets/esri/widgets/LayerList/t9n/LayerList_tr.json +1 -1
  218. package/assets/esri/widgets/LayerList/t9n/LayerList_uk.json +1 -1
  219. package/assets/esri/widgets/LayerList/t9n/LayerList_vi.json +1 -1
  220. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-CN.json +1 -1
  221. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-HK.json +1 -1
  222. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-TW.json +1 -1
  223. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  224. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  225. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  226. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  227. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  228. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  229. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  230. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  231. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  232. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  233. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  234. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  235. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  236. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  237. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  238. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  239. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  240. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  241. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  242. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  243. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  244. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  245. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  246. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  247. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  248. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  249. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  250. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  251. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  252. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  253. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  254. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  255. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  256. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  257. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  258. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  259. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  260. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  261. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  262. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  263. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  264. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ar.json +1 -1
  265. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bg.json +1 -1
  266. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bs.json +1 -1
  267. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ca.json +1 -1
  268. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_cs.json +1 -1
  269. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_da.json +1 -1
  270. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_de.json +1 -1
  271. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_el.json +1 -1
  272. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_es.json +1 -1
  273. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_et.json +1 -1
  274. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fi.json +1 -1
  275. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fr.json +1 -1
  276. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_he.json +1 -1
  277. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hr.json +1 -1
  278. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hu.json +1 -1
  279. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_id.json +1 -1
  280. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_it.json +1 -1
  281. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ja.json +1 -1
  282. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ko.json +1 -1
  283. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lt.json +1 -1
  284. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lv.json +1 -1
  285. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_nl.json +1 -1
  286. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_no.json +1 -1
  287. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pl.json +1 -1
  288. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-BR.json +1 -1
  289. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-PT.json +1 -1
  290. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ro.json +1 -1
  291. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ru.json +1 -1
  292. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sk.json +1 -1
  293. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sl.json +1 -1
  294. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sr.json +1 -1
  295. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sv.json +1 -1
  296. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_th.json +1 -1
  297. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_tr.json +1 -1
  298. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_uk.json +1 -1
  299. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_vi.json +1 -1
  300. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-CN.json +1 -1
  301. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-HK.json +1 -1
  302. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-TW.json +1 -1
  303. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ar.json +1 -1
  304. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_bg.json +1 -1
  305. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_bs.json +1 -1
  306. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ca.json +1 -1
  307. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_cs.json +1 -1
  308. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_da.json +1 -1
  309. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_de.json +1 -1
  310. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_el.json +1 -1
  311. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_es.json +1 -1
  312. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_et.json +1 -1
  313. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_fi.json +1 -1
  314. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_fr.json +1 -1
  315. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_he.json +1 -1
  316. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_hr.json +1 -1
  317. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_hu.json +1 -1
  318. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_id.json +1 -1
  319. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_it.json +1 -1
  320. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ja.json +1 -1
  321. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ko.json +1 -1
  322. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_lt.json +1 -1
  323. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_lv.json +1 -1
  324. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_nl.json +1 -1
  325. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_no.json +1 -1
  326. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pl.json +1 -1
  327. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pt-BR.json +1 -1
  328. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pt-PT.json +1 -1
  329. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ro.json +1 -1
  330. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ru.json +1 -1
  331. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sk.json +1 -1
  332. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sl.json +1 -1
  333. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sr.json +1 -1
  334. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sv.json +1 -1
  335. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_th.json +1 -1
  336. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_tr.json +1 -1
  337. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_uk.json +1 -1
  338. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_vi.json +1 -1
  339. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-CN.json +1 -1
  340. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-HK.json +1 -1
  341. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-TW.json +1 -1
  342. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ar.json +1 -1
  343. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_bg.json +1 -1
  344. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_bs.json +1 -1
  345. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ca.json +1 -1
  346. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_cs.json +1 -1
  347. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_da.json +1 -1
  348. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_de.json +1 -1
  349. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_el.json +1 -1
  350. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_es.json +1 -1
  351. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_et.json +1 -1
  352. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_fi.json +1 -1
  353. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_fr.json +1 -1
  354. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_he.json +1 -1
  355. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_hr.json +1 -1
  356. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_hu.json +1 -1
  357. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_id.json +1 -1
  358. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_it.json +1 -1
  359. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ja.json +1 -1
  360. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ko.json +1 -1
  361. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_lt.json +1 -1
  362. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_lv.json +1 -1
  363. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_nl.json +1 -1
  364. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_no.json +1 -1
  365. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pl.json +1 -1
  366. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pt-BR.json +1 -1
  367. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pt-PT.json +1 -1
  368. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ro.json +1 -1
  369. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ru.json +1 -1
  370. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sk.json +1 -1
  371. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sl.json +1 -1
  372. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sr.json +1 -1
  373. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sv.json +1 -1
  374. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_th.json +1 -1
  375. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_tr.json +1 -1
  376. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_uk.json +1 -1
  377. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_vi.json +1 -1
  378. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-CN.json +1 -1
  379. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-HK.json +1 -1
  380. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-TW.json +1 -1
  381. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ar.json +1 -1
  382. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_bg.json +1 -1
  383. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_bs.json +1 -1
  384. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ca.json +1 -1
  385. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_cs.json +1 -1
  386. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_da.json +1 -1
  387. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_de.json +1 -1
  388. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_el.json +1 -1
  389. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_es.json +1 -1
  390. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_et.json +1 -1
  391. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_fi.json +1 -1
  392. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_fr.json +1 -1
  393. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_he.json +1 -1
  394. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_hr.json +1 -1
  395. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_hu.json +1 -1
  396. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_id.json +1 -1
  397. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_it.json +1 -1
  398. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ja.json +1 -1
  399. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ko.json +1 -1
  400. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_lt.json +1 -1
  401. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_lv.json +1 -1
  402. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_nl.json +1 -1
  403. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_no.json +1 -1
  404. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_pl.json +1 -1
  405. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_pt-BR.json +1 -1
  406. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_pt-PT.json +1 -1
  407. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ro.json +1 -1
  408. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ru.json +1 -1
  409. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sk.json +1 -1
  410. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sl.json +1 -1
  411. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sr.json +1 -1
  412. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sv.json +1 -1
  413. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_th.json +1 -1
  414. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_tr.json +1 -1
  415. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_uk.json +1 -1
  416. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_vi.json +1 -1
  417. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_zh-CN.json +1 -1
  418. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_zh-HK.json +1 -1
  419. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_zh-TW.json +1 -1
  420. package/chunks/HUDMaterial.glsl.js +6 -6
  421. package/geometry/operators/densifyOperator.d.ts +1 -0
  422. package/geometry/operators/json/geodesicBufferOperator.js +1 -1
  423. package/interfaces.d.ts +87 -3
  424. package/layers/OrientedImageryLayer.js +1 -1
  425. package/layers/VideoLayer.js +1 -1
  426. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  427. package/layers/support/rasterFunctions/clipUtils.js +1 -1
  428. package/layers/video/VideoController.js +1 -1
  429. package/networks/CircuitManager.js +5 -0
  430. package/package.json +3 -3
  431. package/request.js +1 -1
  432. package/rest/knowledgeGraph/GraphUpdateSearchIndexResult.js +5 -0
  433. package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
  434. package/rest/knowledgeGraph/wasmInterface/wasmToDataModelChangeResponseFactories.js +1 -1
  435. package/rest/knowledgeGraphService.js +1 -1
  436. package/rest/networks/circuits/exportCircuits.js +5 -0
  437. package/rest/networks/circuits/queryCircuits.js +1 -1
  438. package/rest/networks/circuits/support/ExportCircuitsParameters.js +5 -0
  439. package/rest/networks/circuits/support/ExportCircuitsResult.js +5 -0
  440. package/rest/networks/circuits/support/QueryCircuitsParameters.js +1 -1
  441. package/rest/networks/circuits/support/QueryCircuitsResult.js +1 -1
  442. package/rest/networks/circuits/support/VerifyCircuitsResult.js +1 -1
  443. package/smartMapping/renderers/support/spikeUtils.js +1 -1
  444. package/support/revision.js +1 -1
  445. package/symbols/support/previewCIMSymbol.js +1 -1
  446. package/views/2d/engine/imagery/RasterBitmap.js +1 -1
  447. package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
  448. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
  449. package/views/2d/layers/VideoLayerView2D.js +1 -1
  450. package/views/3d/FocusAreasView.js +1 -1
  451. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  452. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  453. package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
  454. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  455. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  456. package/views/3d/layers/I3SMeshView3D.js +1 -1
  457. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  458. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  459. package/views/3d/layers/SceneLayerView3D.js +1 -1
  460. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  461. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  462. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  463. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  464. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  465. package/views/3d/terrain/TerrainRenderer.js +1 -1
  466. package/views/3d/terrain/TileRenderer.js +1 -1
  467. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  468. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  469. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  470. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  471. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  472. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  473. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  474. package/views/3d/webgl-engine/lib/Material.js +1 -1
  475. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  476. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  477. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  478. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  479. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  480. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  481. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  482. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  483. package/views/FocusArea.js +1 -1
  484. package/views/FocusAreaOutline.js +1 -1
  485. package/views/FocusAreaOutlineItem.js +1 -1
  486. package/views/VideoView.js +1 -1
  487. package/views/View2D.js +1 -1
  488. package/views/input/recognizers/DoubleTapDrag.js +1 -1
  489. package/views/input/recognizers/ImmediateDoubleClick.js +1 -1
  490. package/views/input/recognizers/PointerClickHoldAndDrag.js +1 -1
  491. package/views/input/recognizers/SingleAndDoubleClick.js +1 -1
  492. package/views/input/recognizers/support.js +1 -1
  493. package/views/magnifier/overlay-svg.js +1 -1
  494. package/views/support/LayerLayerViewInfo.js +1 -1
  495. package/views/support/LayerViewManager.js +1 -1
  496. package/views/support/TextureCompressionWorker.js +1 -1
  497. package/views/support/TextureCompressionWorkerHandle.js +1 -1
  498. package/views/ui/video/DefaultUIVideo.js +5 -0
  499. package/views/webgl/RenderingContext.js +1 -1
  500. package/views/webgl/Texture.js +1 -1
  501. package/views/webgl/checkWebGLError.js +1 -1
  502. package/views/webgl/rasterUtils.js +1 -1
  503. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
  504. package/widgets/AreaMeasurement3D.js +1 -1
  505. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  506. package/widgets/BatchAttributeForm.js +1 -1
  507. package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
  508. package/widgets/DirectLineMeasurement3D.js +1 -1
  509. package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
  510. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  511. package/widgets/FeatureForm/UtilityNetworkAssociationAddAssociationViewModel.js +1 -1
  512. package/widgets/Legend/styles/support/sizeRampUtils.js +1 -1
  513. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  514. package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
  515. package/widgets/LineOfSight.js +1 -1
  516. package/widgets/NavigationToggle/NavigationToggleViewModel.js +1 -1
  517. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  518. package/widgets/OrientedImageryViewer/components/Alert.js +5 -0
  519. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  520. package/widgets/OrientedImageryViewer/components/NavigationActions.js +5 -0
  521. package/widgets/OrientedImageryViewer/components/NavigationSettings.js +5 -0
  522. package/widgets/OrientedImageryViewer/components/NavigationUI.js +1 -1
  523. package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +5 -0
  524. package/widgets/OrientedImageryViewer/css.js +1 -1
  525. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  526. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
  527. package/widgets/OrientedImageryViewer/navigation/errors.js +1 -1
  528. package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
  529. package/widgets/OrientedImageryViewer.js +1 -1
  530. package/widgets/PanoramicViewer.js +1 -1
  531. package/widgets/Slice/SliceViewModel.js +1 -1
  532. package/widgets/Slice.js +1 -1
  533. package/widgets/VideoPlayer.js +1 -1
  534. package/widgets/Weather/WeatherViewModel.js +1 -1
  535. package/widgets/support/AnalysisViewModel.js +1 -1
  536. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  537. package/widgets/support/SelectionToolbar.js +1 -1
  538. package/assets/esri/core/workers/chunks/2873cb727c59328074db.js +0 -1
  539. package/assets/esri/core/workers/chunks/47fe2379f2214bf50036.js +0 -1
  540. package/assets/esri/core/workers/chunks/7a9a0383f27f4967bcfa.js +0 -1
  541. package/assets/esri/core/workers/chunks/a937076d2f8c2b6a5d8a.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 e from"../../../../Color.js";import{throwIfAborted as t}from"../../../../core/promiseUtils.js";import{pt2px as s}from"../../../../core/screenUtils.js";import{identity as r,scale as i,translate as o,copy as a}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{l,u as c,c as h,C as d,f as m,i as p}from"../../../../chunks/vec32.js";import{fromArray as u,ONES as f,create as y,ZEROS as _,fromValues as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as b,ZEROS as x,create as P}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{computeTranslationToOriginAndRotation as R}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectPointToVector as v}from"../../../../geometry/projection/projectPointToVector.js";import{create as L,size as S,containsPoint as C,center as w}from"../../../../geometry/support/aaBoundingBox.js";import{EmissiveSourceMode as U,getEmissiveMode as j}from"../../../../symbols/support/materialUtils.js";import{defaultPrimitive as O}from"../../../../symbols/support/ObjectSymbol3DLayerResource.js";import{objectSymbolLayerPrimitiveBoundingBox as E,objectSymbolLayerSizeWithResourceSize as T}from"../../../../symbols/support/symbolLayerUtils3D.js";import{estimateNumVerticesForLods as B,defaultSymbolLayerMemoryComplexity as G}from"./defaultSymbolComplexity.js";import{perLodInstanceElevationAligner as I}from"./ElevationAligners.js";import{needsElevationUpdates3D as F,SampleElevationInfo as A,evaluateElevationInfoAtPoint as D}from"./elevationAlignmentUtils.js";import{Graphics3DLodInstanceGraphicLayer as z}from"./Graphics3DLodInstanceGraphicLayer.js";import{Graphics3DSymbolLayer as V}from"./Graphics3DSymbolLayer.js";import{validateSymbolLayerSize as k,computeObjectScale as H,computeObjectRotation as M}from"./graphicUtils.js";import{ApplyRendererDiffResult as W}from"./interfaces.js";import{LoadStatus as q}from"./Loadable.js";import{makeLodResources as N}from"./lodResourceUtils.js";import{fetch as $}from"./objectResourceUtils.js";import{placePointOnGeometry as Z,extendPointGraphicElevationContext as J}from"./pointUtils.js";import{isValidPrimitive as K,primitiveLodResources as Q}from"./primitiveObjectSymbolUtils.js";import{SymbolComplexity as X}from"./SymbolComplexity.js";import{getResourceUrlFromSymbolStyle as Y}from"./webStyleUtils.js";import{initFastSymbolUpdatesState as ee,updateFastSymbolUpdatesState as te,ConvertOptions as se,evaluateModelTransformScale as re,evaluateModelTransform as ie}from"../support/FastSymbolUpdates.js";import{olidEnabled as oe}from"../../webgl-engine/effects/geometry/olidUtils.js";import{CullFaceOptions as ae}from"../../webgl-engine/lib/basicInterfaces.js";import{VertexAttribute as ne}from"../../webgl-engine/lib/VertexAttribute.js";import{LodRenderer as le}from"../../webgl-engine/lib/lodRendering/LodRenderer.js";import{DefaultMaterial as ce}from"../../webgl-engine/materials/DefaultMaterial.js";import{schematicMRRFactors as he}from"../../webgl-engine/materials/pbrUtils.js";class de{constructor(e,t,s,r,i,o,a,n,l,c,h=null){this.lodResources=e,this.lodRenderer=t,this.stageResources=s,this.resourceSize=r,this.isEsriSymbolResource=i,this.isWosr=o,this.resourceBoundingBox=a,this.symbolSize=n,this.extentPadding=l,this.physicalBasedRenderingEnabled=c,this.pivotOffset=h}}class me extends V{getCachedSize(){const[e,t,s]=null!=this._resources?this._resources.symbolSize:[1,1,1];return{width:e,depth:t,height:s}}constructor(e,t,s,r){super(e,t,s,r,fe(t)),this._resources=null,this._optionalFields=new Array,this._instanceIndexToGraphicUid=new Map,this._hasLoadedPBRTextures=!1,this._disposeResourceHandles=new Array,this.skipHighSymbolLodsChanged=!1,this.ensureDrapedStatus(!1),this._hasLoadedPBRTextures=s.physicalBasedRenderingEnabled}async doLoad(e){if(!this._drivenProperties.size){const e=k(this.symbolLayer);if(e)throw new Error(e)}if(this._isPrimitive){const t=this.symbolLayer.resource,s=t&&K(t?.primitive)?t.primitive:O;this._resources=await this._createResourcesForPrimitive(s,e)}else{const t=await Y(this.symbol.styleOrigin),s=t?.href??this.symbolLayer.resource?.href;this._resources=await this._createResourcesForUrl(s,e)}this.layerOpacityChanged(),this.slicePlaneEnabledChanged(),this.physicalBasedRenderingChanged(),this.updateComplexity()}get extentPadding(){return null!=this._resources?this._resources.extentPadding:0}get _isPrimitive(){return null!=this._primitive}get lodRenderer(){return this._resources?.lodRenderer}get materials(){return this._resources?.stageResources.materials??[]}async _createResourcesForPrimitive(t,r){const i=this.symbolLayer,o=L(E(t)),a=u(S(o)),n=u(T(a,i)),c=l(n),h=!1,d=!1,m=i?.material,p={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,mrrFactors:he,ambient:f,diffuse:f,opacity:1,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:i.castShadows,emissiveStrength:m?.emissive?.strength??0,emissiveSource:U.Color,offsetTransparentBackfaces:!1,drivenOpacity:this.needsDrivenTransparentPass},y=!!p.usePBR,_=m?.color,g=this.symbol;if("point-3d"===g.type&&g.verticalOffset){const{screenLength:e,minWorldLength:t,maxWorldLength:r}=g.verticalOffset;p.verticalOffset={screenLength:s(e),minWorldLength:t||0,maxWorldLength:null!=r?r:1/0},p.castShadows=!1}if(this._context.screenSizePerspectiveEnabled&&(p.screenSizePerspective=this._context.sharedResources.screenSizePerspectiveSettings),this._drivenProperties.color)p.externalColor=b;else{const t=null!=_?e.toUnitRGBA(_):this._drivenProperties.opacity?b:x;p.externalColor=t}this._fastUpdates=ee(this._context.renderer,this._fastVisualVariableConvertOptions(o,n,a,null)),p.isInstanced=!0,this._fastUpdates?(Object.assign(p,this._fastUpdates.materialParameters),this._optionalFields.push(ne.FEATUREATTRIBUTE)):this._hasPerInstanceColor()&&(p.hasInstancedColor=!0,this._optionalFields.push(ne.COLOR)),oe()&&this._optionalFields.push(ne.OLIDCOLOR);const P=new ce(p,this._context);P.setParameters({cullFace:ye(P.transparent)});const R=Q(t,P);if(!R)throw new Error(`Unknown object symbol primitive: ${t}`);const v=await this._createStageResources(R,y,r),C=await this._createLodRenderer(R,r);return new de(R,C,v,a,h,d,o,n,c,y)}async _createResourcesForUrl(e,t){const r={isInstanced:!0,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:this.symbolLayer.castShadows},i={spherical:this._context.spherical,materialParameters:r,streamDataRequester:this._context.streamDataRequester,cache:this._context.sharedResources.objectResourceCache,compressionHandle:this._context.compressionHandle,compressionCallback:()=>this.updateComplexity()};this._fastUpdates=ee(this._context.renderer,this._fastVisualVariableConvertOptions(null,null,null,null)),this._fastUpdates?(Object.assign(i.materialParameters,this._fastUpdates.materialParameters),this._optionalFields.push(ne.FEATUREATTRIBUTE)):this._hasPerInstanceColor()&&(i.materialParameters.hasInstancedColor=!0,this._optionalFields.push(ne.COLOR)),oe()&&this._optionalFields.push(ne.OLIDCOLOR);const o=this.symbol;if("point-3d"===o.type&&o.verticalOffset){const{screenLength:e,minWorldLength:t,maxWorldLength:r}=o.verticalOffset;i.materialParameters.verticalOffset={screenLength:s(e),minWorldLength:t||0,maxWorldLength:null!=r?r:1/0},i.materialParameters.castShadows=!1}const a=this._context.physicalBasedRenderingEnabled;i.signal=t,i.usePBR=a,i.skipHighLods=this._context.skipHighSymbolLods;const n=await $(e,i),c=n.isEsriSymbolResource,h=n.isWosr,d=N(n.lods),m=this._context,p=this.symbolLayer.material,f=this._getExternalColorParameters(p),y=this.needsDrivenTransparentPass,_=d.getMaterials();_.forEach((e=>{e.setParameters({...f,drivenOpacity:y}),m.screenSizePerspectiveEnabled&&e.setParameters({screenSizePerspective:m.sharedResources.screenSizePerspectiveSettings})}));const g=n.referenceBoundingBox,b=u(S(g)),x=u(d.levels[0].pivotOffset),P=u(T(b,this.symbolLayer)),R=l(P),v=this._fastUpdates;te(v,this._context.renderer,this._fastVisualVariableConvertOptions(g,P,b,x))&&_.forEach((e=>e.setParameters(v.materialParameters)));const L=await this._createStageResources(d,a,t),C=await this._createLodRenderer(d,t);return new de(d,C,L,b,c,h,g,P,R,a,x)}_addDisposeResource(e){this._disposeResourceHandles.push(e)}async _createStageResources(e,s,r){const i=this._context.stage,o=e.getMaterials();s!==this._context.physicalBasedRenderingEnabled&&this.physicalBasedRenderingChanged();const a=e.getTextures();i.addTextures(a),this._addDisposeResource((()=>{a.forEach((e=>e.unload())),i.removeTextures(a)})),await Promise.all(a.map((e=>this._context.stage.schedule((()=>e.load(i.renderView.renderingContext)),r)))),t(r);const n=e.getEngineGeometries();return{materials:o,textures:a,geometries:n}}async _createLodRenderer(e,t){const s=this._context.stage,r={layerViewUid:this._context.layerViewUid,graphicUid:e=>this._instanceIndexToGraphicUid.get(e),notifyGraphicGeometryChanged:e=>this._context.notifyGraphicGeometryChanged(this._instanceIndexToGraphicUid.get(e)),notifyGraphicVisibilityChanged:e=>this._context.notifyGraphicVisibilityChanged(this._instanceIndexToGraphicUid.get(e))},i=this._fastUpdates,o=i?{applyTransform:(e,t,s)=>{e.getFeatureAttribute(t,xe),a(s,ie(i.materialParameters,xe,s))},scaleFactor:(e,t,s)=>{t.getFeatureAttribute(s,xe),re(e,i.materialParameters,xe)}}:null,n=new le({symbol:e,optionalFields:this._optionalFields,metadata:r,shaderTransformation:o},this._context.scheduler);return n.slicePlaneEnabled=this._context.slicePlaneEnabled,this._addDisposeResource((()=>{s.removeRenderPlugin(n),n.destroy()})),await s.addRenderPlugin(n,t),n}_getExternalColorParameters(t){const s={};return this._drivenProperties.color?s.externalColor=b:null!=t?.color?s.externalColor=e.toUnitRGBA(t.color):(s.externalColor=b,s.colorMixMode="ignore"),s.emissiveStrength=t?.emissive?.strength??1,s.emissiveSource=j(t?.emissive?.source??"emissive"),s}destroy(){super.destroy(),this._cleanupResources()}_cleanupResources(){this._disposeResourceHandles.forEach((e=>e())),this._disposeResourceHandles.length=0,this._resources=null}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry))return null;const s=Z(t.geometry);if(null==s)return this.logger.warn(`unsupported geometry type for object symbol: ${t.geometry.type}`),null;const r=this.setGraphicElevationContext(t),i=e.renderingInfo;return this._createAs3DShape(t,s,i,r,t.uid)}notifyDestroyGraphicLayer(e){this._instanceIndexToGraphicUid.delete(e.instanceIndex)}graphicLayerToGraphicId(){return 0}layerOpacityChanged(){if(null==this._resources)return;const e=this._getLayerOpacity(),t=this._resources.stageResources.materials;for(let s=0;s<t.length;s++){const r=t[s];r.setParameters({layerOpacity:e}),this._isPrimitive&&r.setParameters({cullFace:ye(r.transparent)})}}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,F)}slicePlaneEnabledChanged(){if(null==this._resources)return!0;this._resources.lodRenderer.slicePlaneEnabled=this._context.slicePlaneEnabled;for(const e of this._resources.stageResources.materials)e.setParameters({hasSlicePlane:this._context.slicePlaneEnabled});return!0}physicalBasedRenderingChanged(){if(null==this._resources)return!0;const{stageResources:e,isWosr:t}=this._resources;for(const s of e.materials)this._isPrimitive?s.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}):t||s.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!1});return!1!==this._hasLoadedPBRTextures||!0!==this._context.physicalBasedRenderingEnabled||(this._hasLoadedPBRTextures=!0,!1)}applyRendererDiff(e,t){if(null==this._resources)return W.RecreateSymbol;const{stageResources:{materials:s},lodRenderer:r,resourceBoundingBox:i,symbolSize:o,resourceSize:a,pivotOffset:n}=this._resources;for(const l in e.diff){if("visualVariables"!==l)return W.RecreateSymbol;if(!te(this._fastUpdates,t,this._fastVisualVariableConvertOptions(i,o,a,n)))return W.RecreateSymbol;for(const e of s)e.setParameters(this._fastUpdates.materialParameters);r.notifyShaderTransformationChanged()}return W.FastUpdate}computeComplexity(){if(null==this._resources)return super.computeComplexity();const e=this._resources.lodResources,t=B(e.levels),s=e.computeUsedMemory(),r={...G(this.symbol,this.symbolLayer),resourceBytes:s};return new X({verticesPerFeature:t,memory:r})}_hasLodRenderer(){return null!=this._resources}_createAs3DShape(e,t,s,r,i){if(!this._hasLodRenderer()||null==this._resources)return null;const o=this.getFastUpdateAttrValues(e),a=this._context.clippingExtent;if(v(t,_e,this._context.elevationProvider.spatialReference),null!=a&&!C(a,_e))return null;const n=ue(r),l=this._computeGlobalTransform(t,r,be,Pe),c=this._computeLocalTransform(this._resources,this.symbolLayer,s,ge),h=this._resources.lodRenderer.instanceData,d=h.addInstance();if(this._instanceIndexToGraphicUid.set(d,i),h.setLocalTransform(d,c,!1),h.setGlobalTransform(d,l),o&&h.setFeatureAttribute(d,o),null==this._fastUpdates&&this._hasPerInstanceColor()){const e=this._getVertexOpacityAndColor(s,this._getFallbackOpacityAndColor(),255);h.setColor(d,e)}const m=this._context.stage.renderView.olidRenderHelper;if(m){const e=m.getObjectAndLayerIdColor({graphicUid:i,layerViewUid:this._context.layerViewUid});h.setObjectAndLayerIdColor(d,e)}const p=new z(this,d,I,r,this._context.stage.view.state.highlightOrderMap);return n&&(p.alignedSampledElevation=Pe.sampledElevation),p.needsElevationUpdates=F(r.mode),J(p,t,this._context.elevationProvider),p}_computeGlobalTransform(e,t,s,r){return D(e,this._context.elevationProvider,t,this._context.renderCoordsHelper,r),_e[0]=e.x,_e[1]=e.y,_e[2]=r.z,R(e.spatialReference,_e,s,this._context.renderCoordsHelper.spatialReference),s}_computeLocalTransform(e,t,s,i){return r(i),this._applyObjectRotation(s,!1,i),this._applyObjectRotation(t,!0,i),this._applyObjectScale(e,s,i),this._applyAnchor(e,t,i),i}_applyObjectScale(e,t,s){if(this._fastUpdates?.requiresShaderTransformation)return;const r=this._drivenProperties.size&&t.size?t.size:e.symbolSize,o=H(r,e.symbolSize,e.resourceSize,this._context.renderCoordsHelper.unitInMeters);1===o[0]&&1===o[1]&&1===o[2]||i(s,s,o)}prepareSymbolLayerPatch(e){if("partial"!==e.diff.type)return;const t=e.diff.diff;this._preparePatchTransform(e,t),this._preparePatchColor(e,t)}updateGeometry(e,t){if(null==this._resources)return!0;const s=t&&Z(t);if(null==s)return!1;const r=this.getGeometryElevationMode(t);return e.elevationContext.mode===r&&(this._computeGlobalTransform(s,e.elevationContext,be,Pe),ue(e.elevationContext)&&(e.alignedSampledElevation=Pe.sampledElevation),this._resources.lodRenderer.instanceData.setGlobalTransform(e.instanceIndex,be,!0),J(e,s,this._context.elevationProvider),!0)}_preparePatchTransform(e,t){if(!(t.heading||t.tilt||t.roll||t.width||t.height||t.depth||t.anchor||t.anchorPosition))return;if(null==this._resources)return;const s=(e,t,s)=>(null!=e&&"complete"===e.type?e.newValue:t)??s,r=s(t.heading,this.symbolLayer.heading,0),i=s(t.tilt,this.symbolLayer.tilt,0),o=s(t.roll,this.symbolLayer.roll,0),a=s(t.width,this.symbolLayer.width,void 0),n=s(t.height,this.symbolLayer.height,void 0),l=s(t.depth,this.symbolLayer.depth,void 0),c=s(t.anchor,this.symbolLayer.anchor,void 0),h=s(t.anchorPosition,this.symbolLayer.anchorPosition,void 0);delete t.heading,delete t.tilt,delete t.roll,delete t.width,delete t.height,delete t.depth,delete t.anchor,delete t.anchorPosition;const d={heading:r,tilt:i,roll:o,anchor:c,anchorPosition:h},m=this._resources;this.loadStatus===q.LOADED&&e.symbolLayerStatePatches.push((()=>{m.symbolSize=u(T(m.resourceSize,{width:a,height:n,depth:l,isPrimitive:this._isPrimitive}))})),e.graphics3DGraphicPatches.push((({instanceIndex:e},t)=>{const s=this._computeLocalTransform(m,d,t,ge);m.lodRenderer.instanceData.setLocalTransform(e,s,!0)}))}_preparePatchColor(t,s){if(!s.material||"partial"!==s.material.type)return;const r=s.material.diff;if(!r.color||"complete"!==r.color.type||null==r.color.newValue||null==r.color.oldValue)return;const i=r.color.newValue,o=null!=i?e.toUnitRGBA(i):b;delete r.color;const a=this._resources;if(null==a)return;const n=this._isPrimitive;t.graphics3DGraphicPatches.push((({instanceIndex:e})=>{if(this._hasPerInstanceColor())a.lodRenderer.instanceData.setColor(e,o);else{const e={externalColor:o};for(const t of a.stageResources.materials)t.setParameters(e),n&&t.setParameters({cullFace:ye(t.transparent)})}}))}_applyObjectRotation(e,t,s){if(!this._fastUpdates?.requiresShaderTransformation||!t)return M(e.heading,e.tilt,e.roll,s)}_applyAnchor(e,t,s){if(this._fastUpdates?.requiresShaderTransformation)return;const r=pe(e.resourceBoundingBox,e.pivotOffset,t);r&&o(s,s,r)}_hasPerInstanceColor(){return this._drivenProperties.color||this._drivenProperties.opacity}_fastVisualVariableConvertOptions(e,t,s,r){const i=null!=e?u(S(e)):f,o=null!=e?pe(e,r,this.symbolLayer):_,a=this._context.renderCoordsHelper.unitInMeters,n=H(null!=t?t:void 0,t,s,a),l=g(this.symbolLayer.tilt||0,this.symbolLayer.roll||0,this.symbolLayer.heading||0);return new se({supports:{size:!0,color:!0,rotation:!0,opacity:!1},modelSize:i,symbolSize:t??f,unitInMeters:a,anchor:o,scale:n,rotation:l,fallbackColor:this._getFallbackOpacityAndColor(),fallbackSize:n})}get _primitive(){const{resource:e}=this.symbolLayer;return null!=e?.href?null:e?.primitive??O}_getFallbackOpacityAndColor(){const t=this.symbolLayer.material?.color;if(null==t){return null==this._primitive?b:x}return e.toUnitRGBA(t)}}function pe(e,t,s){const r=y();switch(s.anchor){case"center":h(r,w(e)),c(r,r);break;case"top":{const t=w(e);p(r,-t[0],-t[1],-e[5]);break}case"bottom":{const t=w(e);p(r,-t[0],-t[1],-e[2]);break}case"relative":{const t=w(e),i=S(e),o=s.anchorPosition,a=o?g(o.x,o.y,o.z):_;d(r,i,a),m(r,r,t),c(r,r);break}default:null!=t?c(r,t):h(r,_)}return r}function ue(e){return"absolute-height"!==e.mode}function fe(e){return 1===(e.material?.color?.a??1)&&null==e.resource?.href}function ye(e){return e?ae.None:ae.Back}const _e=y(),ge=n(),be=n(),xe=P(),Pe=new A;export{me as Graphics3DObjectSymbolLayer};
5
+ import e from"../../../../Color.js";import{throwIfAborted as t}from"../../../../core/promiseUtils.js";import{pt2px as s}from"../../../../core/screenUtils.js";import{identity as r,scale as i,translate as o,copy as a}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{l,u as c,c as h,C as d,f as m,i as p}from"../../../../chunks/vec32.js";import{fromArray as u,ONES as f,create as y,ZEROS as _,fromValues as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromArray as b,ONES as x,ZEROS as P,create as R}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{computeTranslationToOriginAndRotation as v}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectPointToVector as L}from"../../../../geometry/projection/projectPointToVector.js";import{create as S,size as C,containsPoint as w,center as U}from"../../../../geometry/support/aaBoundingBox.js";import{EmissiveSourceMode as j,getEmissiveMode as O}from"../../../../symbols/support/materialUtils.js";import{defaultPrimitive as E}from"../../../../symbols/support/ObjectSymbol3DLayerResource.js";import{objectSymbolLayerPrimitiveBoundingBox as T,objectSymbolLayerSizeWithResourceSize as B}from"../../../../symbols/support/symbolLayerUtils3D.js";import{estimateNumVerticesForLods as G,defaultSymbolLayerMemoryComplexity as I}from"./defaultSymbolComplexity.js";import{perLodInstanceElevationAligner as A}from"./ElevationAligners.js";import{needsElevationUpdates3D as F,SampleElevationInfo as D,evaluateElevationInfoAtPoint as z}from"./elevationAlignmentUtils.js";import{Graphics3DLodInstanceGraphicLayer as V}from"./Graphics3DLodInstanceGraphicLayer.js";import{Graphics3DSymbolLayer as k}from"./Graphics3DSymbolLayer.js";import{validateSymbolLayerSize as H,computeObjectScale as M,computeObjectRotation as W}from"./graphicUtils.js";import{ApplyRendererDiffResult as q}from"./interfaces.js";import{LoadStatus as N}from"./Loadable.js";import{makeLodResources as $}from"./lodResourceUtils.js";import{fetch as Z}from"./objectResourceUtils.js";import{placePointOnGeometry as J,extendPointGraphicElevationContext as K}from"./pointUtils.js";import{isValidPrimitive as Q,primitiveLodResources as X}from"./primitiveObjectSymbolUtils.js";import{SymbolComplexity as Y}from"./SymbolComplexity.js";import{getResourceUrlFromSymbolStyle as ee}from"./webStyleUtils.js";import{initFastSymbolUpdatesState as te,updateFastSymbolUpdatesState as se,ConvertOptions as re,evaluateModelTransformScale as ie,evaluateModelTransform as oe}from"../support/FastSymbolUpdates.js";import{olidEnabled as ae}from"../../webgl-engine/effects/geometry/olidUtils.js";import{CullFaceOptions as ne}from"../../webgl-engine/lib/basicInterfaces.js";import{VertexAttribute as le}from"../../webgl-engine/lib/VertexAttribute.js";import{LodRenderer as ce}from"../../webgl-engine/lib/lodRendering/LodRenderer.js";import{DefaultMaterial as he}from"../../webgl-engine/materials/DefaultMaterial.js";import{schematicMRRFactors as de}from"../../webgl-engine/materials/pbrUtils.js";class me{constructor(e,t,s,r,i,o,a,n,l,c,h=null){this.lodResources=e,this.lodRenderer=t,this.stageResources=s,this.resourceSize=r,this.isEsriSymbolResource=i,this.isWosr=o,this.resourceBoundingBox=a,this.symbolSize=n,this.extentPadding=l,this.physicalBasedRenderingEnabled=c,this.pivotOffset=h}}class pe extends k{getCachedSize(){const[e,t,s]=null!=this._resources?this._resources.symbolSize:[1,1,1];return{width:e,depth:t,height:s}}constructor(e,t,s,r){super(e,t,s,r,ye(t)),this._resources=null,this._optionalFields=new Array,this._instanceIndexToGraphicUid=new Map,this._hasLoadedPBRTextures=!1,this._disposeResourceHandles=new Array,this.skipHighSymbolLodsChanged=!1,this.ensureDrapedStatus(!1),this._hasLoadedPBRTextures=s.physicalBasedRenderingEnabled}async doLoad(e){if(!this._drivenProperties.size){const e=H(this.symbolLayer);if(e)throw new Error(e)}if(this._isPrimitive){const t=this.symbolLayer.resource,s=t&&Q(t?.primitive)?t.primitive:E;this._resources=await this._createResourcesForPrimitive(s,e)}else{const t=await ee(this.symbol.styleOrigin),s=t?.href??this.symbolLayer.resource?.href;this._resources=await this._createResourcesForUrl(s,e)}this.layerOpacityChanged(),this.slicePlaneEnabledChanged(),this.physicalBasedRenderingChanged(),this.updateComplexity()}get extentPadding(){return null!=this._resources?this._resources.extentPadding:0}get _isPrimitive(){return null!=this._primitive}get lodRenderer(){return this._resources?.lodRenderer}get materials(){return this._resources?.stageResources.materials??[]}async _createResourcesForPrimitive(t,r){const i=this.symbolLayer,o=S(T(t)),a=u(C(o)),n=u(B(a,i)),c=l(n),h=!1,d=!1,m=i?.material,p={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,mrrFactors:de,ambient:f,diffuse:f,opacity:1,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:i.castShadows,emissiveStrength:m?.emissive?.strength??0,emissiveSource:j.Color,offsetTransparentBackfaces:!1,drivenOpacity:this.needsDrivenTransparentPass},y=!!p.usePBR,_=m?.color,g=this.symbol;if("point-3d"===g.type&&g.verticalOffset){const{screenLength:e,minWorldLength:t,maxWorldLength:r}=g.verticalOffset;p.verticalOffset={screenLength:s(e),minWorldLength:t||0,maxWorldLength:null!=r?r:1/0},p.castShadows=!1}if(this._context.screenSizePerspectiveEnabled&&(p.screenSizePerspective=this._context.sharedResources.screenSizePerspectiveSettings),this._drivenProperties.color)p.externalColor=x;else{const t=null!=_?this._drivenProperties.opacity?b([...e.toUnitRGB(_),1]):e.toUnitRGBA(_):this._drivenProperties.opacity?x:P;p.externalColor=t}this._fastUpdates=te(this._context.renderer,this._fastVisualVariableConvertOptions(o,n,a,null)),p.isInstanced=!0,this._fastUpdates?(Object.assign(p,this._fastUpdates.materialParameters),this._optionalFields.push(le.FEATUREATTRIBUTE)):this._hasPerInstanceColor()&&(p.hasInstancedColor=!0,this._optionalFields.push(le.COLOR)),ae()&&this._optionalFields.push(le.OLIDCOLOR);const R=new he(p,this._context);R.setParameters({cullFace:_e(R.transparent)});const v=X(t,R);if(!v)throw new Error(`Unknown object symbol primitive: ${t}`);const L=await this._createStageResources(v,y,r),w=await this._createLodRenderer(v,r);return new me(v,w,L,a,h,d,o,n,c,y)}async _createResourcesForUrl(e,t){const r={isInstanced:!0,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:this.symbolLayer.castShadows},i={spherical:this._context.spherical,materialParameters:r,streamDataRequester:this._context.streamDataRequester,cache:this._context.sharedResources.objectResourceCache,compressionHandle:this._context.compressionHandle,compressionCallback:()=>this.updateComplexity()};this._fastUpdates=te(this._context.renderer,this._fastVisualVariableConvertOptions(null,null,null,null)),this._fastUpdates?(Object.assign(i.materialParameters,this._fastUpdates.materialParameters),this._optionalFields.push(le.FEATUREATTRIBUTE)):this._hasPerInstanceColor()&&(i.materialParameters.hasInstancedColor=!0,this._optionalFields.push(le.COLOR)),ae()&&this._optionalFields.push(le.OLIDCOLOR);const o=this.symbol;if("point-3d"===o.type&&o.verticalOffset){const{screenLength:e,minWorldLength:t,maxWorldLength:r}=o.verticalOffset;i.materialParameters.verticalOffset={screenLength:s(e),minWorldLength:t||0,maxWorldLength:null!=r?r:1/0},i.materialParameters.castShadows=!1}const a=this._context.physicalBasedRenderingEnabled;i.signal=t,i.usePBR=a,i.skipHighLods=this._context.skipHighSymbolLods;const n=await Z(e,i),c=n.isEsriSymbolResource,h=n.isWosr,d=$(n.lods),m=this._context,p=this.symbolLayer.material,f=this._getExternalColorParameters(p),y=this.needsDrivenTransparentPass,_=d.getMaterials();_.forEach((e=>{e.setParameters({...f,drivenOpacity:y}),m.screenSizePerspectiveEnabled&&e.setParameters({screenSizePerspective:m.sharedResources.screenSizePerspectiveSettings})}));const g=n.referenceBoundingBox,b=u(C(g)),x=u(d.levels[0].pivotOffset),P=u(B(b,this.symbolLayer)),R=l(P),v=this._fastUpdates;se(v,this._context.renderer,this._fastVisualVariableConvertOptions(g,P,b,x))&&_.forEach((e=>e.setParameters(v.materialParameters)));const L=await this._createStageResources(d,a,t),S=await this._createLodRenderer(d,t);return new me(d,S,L,b,c,h,g,P,R,a,x)}_addDisposeResource(e){this._disposeResourceHandles.push(e)}async _createStageResources(e,s,r){const i=this._context.stage,o=e.getMaterials();s!==this._context.physicalBasedRenderingEnabled&&this.physicalBasedRenderingChanged();const a=e.getTextures();i.addTextures(a),this._addDisposeResource((()=>{a.forEach((e=>e.unload())),i.removeTextures(a)})),await Promise.all(a.map((e=>this._context.stage.schedule((()=>e.load(i.renderView.renderingContext)),r)))),t(r);const n=e.getEngineGeometries();return{materials:o,textures:a,geometries:n}}async _createLodRenderer(e,t){const s=this._context.stage,r={layerViewUid:this._context.layerViewUid,graphicUid:e=>this._instanceIndexToGraphicUid.get(e),notifyGraphicGeometryChanged:e=>this._context.notifyGraphicGeometryChanged(this._instanceIndexToGraphicUid.get(e)),notifyGraphicVisibilityChanged:e=>this._context.notifyGraphicVisibilityChanged(this._instanceIndexToGraphicUid.get(e))},i=this._fastUpdates,o=i?{applyTransform:(e,t,s)=>{e.getFeatureAttribute(t,Pe),a(s,oe(i.materialParameters,Pe,s))},scaleFactor:(e,t,s)=>{t.getFeatureAttribute(s,Pe),ie(e,i.materialParameters,Pe)}}:null,n=new ce({symbol:e,optionalFields:this._optionalFields,metadata:r,shaderTransformation:o},this._context.scheduler);return n.slicePlaneEnabled=this._context.slicePlaneEnabled,this._addDisposeResource((()=>{s.removeRenderPlugin(n),n.destroy()})),await s.addRenderPlugin(n,t),n}_getExternalColorParameters(t){const s={};if(this._drivenProperties.color)s.externalColor=x;else if(null!=t?.color){const r=e.toUnitRGBA(t.color);this._drivenProperties.opacity&&(r[3]=1),s.externalColor=r}else s.externalColor=x,s.colorMixMode="ignore";return s.emissiveStrength=t?.emissive?.strength??1,s.emissiveSource=O(t?.emissive?.source??"emissive"),s}destroy(){super.destroy(),this._cleanupResources()}_cleanupResources(){this._disposeResourceHandles.forEach((e=>e())),this._disposeResourceHandles.length=0,this._resources=null}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry))return null;const s=J(t.geometry);if(null==s)return this.logger.warn(`unsupported geometry type for object symbol: ${t.geometry.type}`),null;const r=this.setGraphicElevationContext(t),i=e.renderingInfo;return this._createAs3DShape(t,s,i,r,t.uid)}notifyDestroyGraphicLayer(e){this._instanceIndexToGraphicUid.delete(e.instanceIndex)}graphicLayerToGraphicId(){return 0}layerOpacityChanged(){if(null==this._resources)return;const e=this._getLayerOpacity(),t=this._resources.stageResources.materials;for(let s=0;s<t.length;s++){const r=t[s];r.setParameters({layerOpacity:e}),this._isPrimitive&&r.setParameters({cullFace:_e(r.transparent)})}}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,F)}slicePlaneEnabledChanged(){if(null==this._resources)return!0;this._resources.lodRenderer.slicePlaneEnabled=this._context.slicePlaneEnabled;for(const e of this._resources.stageResources.materials)e.setParameters({hasSlicePlane:this._context.slicePlaneEnabled});return!0}physicalBasedRenderingChanged(){if(null==this._resources)return!0;const{stageResources:e,isWosr:t}=this._resources;for(const s of e.materials)this._isPrimitive?s.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}):t||s.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!1});return!1!==this._hasLoadedPBRTextures||!0!==this._context.physicalBasedRenderingEnabled||(this._hasLoadedPBRTextures=!0,!1)}applyRendererDiff(e,t){if(null==this._resources)return q.RecreateSymbol;const{stageResources:{materials:s},lodRenderer:r,resourceBoundingBox:i,symbolSize:o,resourceSize:a,pivotOffset:n}=this._resources;for(const l in e.diff){if("visualVariables"!==l)return q.RecreateSymbol;if(!se(this._fastUpdates,t,this._fastVisualVariableConvertOptions(i,o,a,n)))return q.RecreateSymbol;for(const e of s)e.setParameters(this._fastUpdates.materialParameters);r.notifyShaderTransformationChanged()}return q.FastUpdate}computeComplexity(){if(null==this._resources)return super.computeComplexity();const e=this._resources.lodResources,t=G(e.levels),s=e.computeUsedMemory(),r={...I(this.symbol,this.symbolLayer),resourceBytes:s};return new Y({verticesPerFeature:t,memory:r})}_hasLodRenderer(){return null!=this._resources}_createAs3DShape(e,t,s,r,i){if(!this._hasLodRenderer()||null==this._resources)return null;const o=this.getFastUpdateAttrValues(e),a=this._context.clippingExtent;if(L(t,ge,this._context.elevationProvider.spatialReference),null!=a&&!w(a,ge))return null;const n=fe(r),l=this._computeGlobalTransform(t,r,xe,Re),c=this._computeLocalTransform(this._resources,this.symbolLayer,s,be),h=this._resources.lodRenderer.instanceData,d=h.addInstance();if(this._instanceIndexToGraphicUid.set(d,i),h.setLocalTransform(d,c,!1),h.setGlobalTransform(d,l),o&&h.setFeatureAttribute(d,o),null==this._fastUpdates&&this._hasPerInstanceColor()){const e=this._getVertexOpacityAndColor(s,this._getFallbackOpacityAndColor(),255);h.setColor(d,e)}const m=this._context.stage.renderView.olidRenderHelper;if(m){const e=m.getObjectAndLayerIdColor({graphicUid:i,layerViewUid:this._context.layerViewUid});h.setObjectAndLayerIdColor(d,e)}const p=new V(this,d,A,r,this._context.stage.view.state.highlightOrderMap);return n&&(p.alignedSampledElevation=Re.sampledElevation),p.needsElevationUpdates=F(r.mode),K(p,t,this._context.elevationProvider),p}_computeGlobalTransform(e,t,s,r){return z(e,this._context.elevationProvider,t,this._context.renderCoordsHelper,r),ge[0]=e.x,ge[1]=e.y,ge[2]=r.z,v(e.spatialReference,ge,s,this._context.renderCoordsHelper.spatialReference),s}_computeLocalTransform(e,t,s,i){return r(i),this._applyObjectRotation(s,!1,i),this._applyObjectRotation(t,!0,i),this._applyObjectScale(e,s,i),this._applyAnchor(e,t,i),i}_applyObjectScale(e,t,s){if(this._fastUpdates?.requiresShaderTransformation)return;const r=this._drivenProperties.size&&t.size?t.size:e.symbolSize,o=M(r,e.symbolSize,e.resourceSize,this._context.renderCoordsHelper.unitInMeters);1===o[0]&&1===o[1]&&1===o[2]||i(s,s,o)}prepareSymbolLayerPatch(e){if("partial"!==e.diff.type)return;const t=e.diff.diff;this._preparePatchTransform(e,t),this._preparePatchColor(e,t)}updateGeometry(e,t){if(null==this._resources)return!0;const s=t&&J(t);if(null==s)return!1;const r=this.getGeometryElevationMode(t);return e.elevationContext.mode===r&&(this._computeGlobalTransform(s,e.elevationContext,xe,Re),fe(e.elevationContext)&&(e.alignedSampledElevation=Re.sampledElevation),this._resources.lodRenderer.instanceData.setGlobalTransform(e.instanceIndex,xe,!0),K(e,s,this._context.elevationProvider),!0)}_preparePatchTransform(e,t){if(!(t.heading||t.tilt||t.roll||t.width||t.height||t.depth||t.anchor||t.anchorPosition))return;if(null==this._resources)return;const s=(e,t,s)=>(null!=e&&"complete"===e.type?e.newValue:t)??s,r=s(t.heading,this.symbolLayer.heading,0),i=s(t.tilt,this.symbolLayer.tilt,0),o=s(t.roll,this.symbolLayer.roll,0),a=s(t.width,this.symbolLayer.width,void 0),n=s(t.height,this.symbolLayer.height,void 0),l=s(t.depth,this.symbolLayer.depth,void 0),c=s(t.anchor,this.symbolLayer.anchor,void 0),h=s(t.anchorPosition,this.symbolLayer.anchorPosition,void 0);delete t.heading,delete t.tilt,delete t.roll,delete t.width,delete t.height,delete t.depth,delete t.anchor,delete t.anchorPosition;const d={heading:r,tilt:i,roll:o,anchor:c,anchorPosition:h},m=this._resources;this.loadStatus===N.LOADED&&e.symbolLayerStatePatches.push((()=>{m.symbolSize=u(B(m.resourceSize,{width:a,height:n,depth:l,isPrimitive:this._isPrimitive}))})),e.graphics3DGraphicPatches.push((({instanceIndex:e},t)=>{const s=this._computeLocalTransform(m,d,t,be);m.lodRenderer.instanceData.setLocalTransform(e,s,!0)}))}_preparePatchColor(t,s){if(!s.material||"partial"!==s.material.type)return;const r=s.material.diff;if(!r.color||"complete"!==r.color.type||null==r.color.newValue||null==r.color.oldValue)return;const i=r.color.newValue,o=null!=i?e.toUnitRGBA(i):x;delete r.color;const a=this._resources;if(null==a)return;const n=this._isPrimitive;t.graphics3DGraphicPatches.push((({instanceIndex:e})=>{if(this._hasPerInstanceColor())a.lodRenderer.instanceData.setColor(e,o);else{const e={externalColor:o};for(const t of a.stageResources.materials)t.setParameters(e),n&&t.setParameters({cullFace:_e(t.transparent)})}}))}_applyObjectRotation(e,t,s){if(!this._fastUpdates?.requiresShaderTransformation||!t)return W(e.heading,e.tilt,e.roll,s)}_applyAnchor(e,t,s){if(this._fastUpdates?.requiresShaderTransformation)return;const r=ue(e.resourceBoundingBox,e.pivotOffset,t);r&&o(s,s,r)}_hasPerInstanceColor(){return this._drivenProperties.color||this._drivenProperties.opacity}_fastVisualVariableConvertOptions(e,t,s,r){const i=null!=e?u(C(e)):f,o=null!=e?ue(e,r,this.symbolLayer):_,a=this._context.renderCoordsHelper.unitInMeters,n=M(null!=t?t:void 0,t,s,a),l=g(this.symbolLayer.tilt||0,this.symbolLayer.roll||0,this.symbolLayer.heading||0);return new re({supports:{size:!0,color:!0,rotation:!0,opacity:!1},modelSize:i,symbolSize:t??f,unitInMeters:a,anchor:o,scale:n,rotation:l,fallbackColor:this._getFallbackOpacityAndColor(),fallbackSize:n})}get _primitive(){const{resource:e}=this.symbolLayer;return null!=e?.href?null:e?.primitive??E}_getFallbackOpacityAndColor(){const t=this.symbolLayer.material?.color;if(null==t){return null==this._primitive?x:P}return e.toUnitRGBA(t)}}function ue(e,t,s){const r=y();switch(s.anchor){case"center":h(r,U(e)),c(r,r);break;case"top":{const t=U(e);p(r,-t[0],-t[1],-e[5]);break}case"bottom":{const t=U(e);p(r,-t[0],-t[1],-e[2]);break}case"relative":{const t=U(e),i=C(e),o=s.anchorPosition,a=o?g(o.x,o.y,o.z):_;d(r,i,a),m(r,r,t),c(r,r);break}default:null!=t?c(r,t):h(r,_)}return r}function fe(e){return"absolute-height"!==e.mode}function ye(e){return 1===(e.material?.color?.a??1)&&null==e.resource?.href}function _e(e){return e?ne.None:ne.Back}const ge=y(),be=n(),xe=n(),Pe=R(),Re=new D;export{pe as Graphics3DObjectSymbolLayer};
@@ -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{validateColorAndOpacity as e,validateColor as o}from"../../../../core/colorUtils.js";import has from"../../../../core/has.js";import{clamp as r}from"../../../../core/mathUtils.js";import{EmissiveSourceMode as s}from"../../../../symbols/support/materialUtils.js";import{TextureUsage as a,TextureEncoding as t}from"./enums.js";import{RenderTexture as l}from"../../webgl-engine/core/material/RenderTexture.js";import{getEllipsoidMode as n}from"../../webgl-engine/core/shaderLibrary/util/EllipsoidMode.js";import{CullFaceOptions as i,AlphaDiscardMode as u,TextureEncodingMimeType as c}from"../../webgl-engine/lib/basicInterfaces.js";import{Texture as m}from"../../webgl-engine/lib/Texture.js";import{useSchematicPBRI3S as d,useSchematicPBR as p,schematicMRRFactors as g,advancedMRRFactors as h}from"../../webgl-engine/materials/pbrUtils.js";import{TextureWrapMode as f}from"../../../webgl/enums.js";import{alphaCutoff as T}from"../../../../webscene/support/AlphaCutoff.js";function x(o,r,s){const t=new Map,l=(e,o)=>{if(null==e)return-1;const r=t.get(e.id);if(r)return r.usage|=o,r.id;const s=t.size;return t.set(e.id,{id:s,usage:o}),s},n=r.pbrMetallicRoughness,u=n?.baseColorFactor?e(n.baseColorFactor):null,c=r.emissiveFactor,m=has("disable-feature:diffuse-rendering-i3s")||s?d({normalTexture:r.normalTexture,emissiveTexture:r.emissiveTexture,emissiveFactor:r.emissiveFactor,occlusionTexture:r.occlusionTexture,metallicRoughnessTexture:n?.metallicRoughnessTexture,metallicFactor:n?.metallicFactor,roughnessFactor:n?.roughnessFactor}):p({normalTexture:r.normalTexture,emissiveTexture:r.emissiveTexture,emissiveFactor:r.emissiveFactor,occlusionTexture:r.occlusionTexture,metallicRoughnessTexture:n?.metallicRoughnessTexture,metallicFactor:n?.metallicFactor,roughnessFactor:n?.roughnessFactor}),f=m?g[0]:n?.metallicFactor??h[0],T=m?g[1]:n?.roughnessFactor??h[1],x="mask"===r.alphaMode?a.Color|a.AlphaMask:a.Color,C={baseColorFactor:u?[u[0],u[1],u[2],u[3]]:[1,1,1,1],baseColorTextureId:l(n?.baseColorTexture,x),metallicRoughnessTextureId:l(n?.metallicRoughnessTexture,a.MetallicRoughness),metallicFactor:f,roughnessFactor:T},S={alphaMode:r.alphaMode,alphaCutoff:r.alphaCutoff,doubleSided:r.doubleSided,cullFace:"none"===r.cullFace?i.None:"back"===r.cullFace?i.Back:"front"===r.cullFace?i.Front:i.None,normalTextureId:l(r.normalTexture,a.Normal),emissiveTextureId:l(r.emissiveTexture,a.Emissive),occlusionTextureId:l(r.occlusionTexture,a.Occlusion),emissiveFactor:c?[c[0],c[1],c[2]]:[0,0,0],metallicRoughness:C,wrapTextures:!1,hasParametersFromSource:m},P=[];return t.forEach((({usage:e},r)=>{const s=null!=o&&o[r]&&o[r].formats,a=s?F(s.map((({name:e,format:o})=>({name:e,encoding:b[o]})))):[];P.push({id:r,usage:e,encodings:a})})),{material:S,textures:P}}function F(e){return e.sort(((e,o)=>e.encoding-o.encoding))}const b={ktx2:t.KTX2,basis:t.Basis,dds:t.DDS_S3TC,png:t.PNG,jpg:t.JPG,"ktx-etc2":t.KTX_ETC2},C={[c.KTX2_ENCODING]:t.Basis,[c.BASIS_ENCODING]:t.Basis,[c.DDS_ENCODING]:t.DDS_S3TC,"image/png":t.PNG,"image/jpg":t.JPG,"image/jpeg":t.JPG,"image/ktx":t.KTX_ETC2};function S(e){const s=e?.materialDefinitions?Object.keys(e.materialDefinitions)[0]:null,t=e?.textureDefinitions?Object.keys(e.textureDefinitions)[0]:null,l=s?e.materialDefinitions?.[s]:null,n=t?e.textureDefinitions?.[t]:null,u=P();if(null!=l){const e=l.params;e.diffuse&&(o(e.diffuse),u.metallicRoughness.baseColorFactor=[e.diffuse[0],e.diffuse[1],e.diffuse[2],1]),null!=e.doubleSided&&(u.doubleSided=e.doubleSided,u.cullFace=e.doubleSided?i.None:i.Back),"none"!==e.cullFace&&"front"!==e.cullFace&&"back"!==e.cullFace||(u.cullFace="none"===e.cullFace?i.None:"back"===e.cullFace?i.Back:i.Front),e.transparency&&(u.metallicRoughness.baseColorFactor[3]=r(1-e.transparency,0,1)),(e.useVertexColorAlpha||u.metallicRoughness.baseColorFactor[3]<1)&&(u.alphaMode="blend")}const c=[];if(null!=n){const e=0;!n.wrap||"repeat"!==n.wrap[0]&&"repeat"!==n.wrap[1]||(u.wrapTextures=!0);let o=a.Color;"rgba"===n.channels&&(u.alphaMode="blend",o|=a.AlphaMask);const r=n.images.length-1,s=n.images[r],t=e=>e?.split("/").pop(),l=Array.isArray(n.encoding)?F(n.encoding.map(((e,o)=>({name:t(s.href[o]),encoding:C[e]||0})))):[{name:t(s.href),encoding:C[n.encoding]||0}];c.push({id:e,usage:o,encodings:l}),u.metallicRoughness.baseColorTextureId=e}return{material:u,textures:c}}const P=()=>({alphaMode:"opaque",alphaCutoff:T,doubleSided:!0,cullFace:i.None,normalTextureId:-1,emissiveTextureId:-1,occlusionTextureId:-1,emissiveFactor:[0,0,0],metallicRoughness:{baseColorFactor:[.8,.8,.8,1],baseColorTextureId:-1,metallicRoughnessTextureId:-1,metallicFactor:0,roughnessFactor:.6},wrapTextures:!1,hasParametersFromSource:!0});function M(e,o,r,s){if(null==e?.data)return null;const t=e.data,l=s.renderingContext.parameters.maxMaxAnisotropy,n=l>1,i=r||!o.wrapTextures?D:R,u=k(e.encoding),c=e.usage&a.Color?"opaque"===o.alphaMode?3:4:3;return new m(t,{mipmap:n,maxAnisotropy:l,encoding:u,wrap:i,components:c,noUnpackFlip:!0})}const D={s:f.CLAMP_TO_EDGE,t:f.CLAMP_TO_EDGE},R={s:f.REPEAT,t:f.REPEAT};function w(o,r,t,i,c,m){const d=m.rendererTextureUsage,p=e=>I(i,t,e&d),f=e(r.metallicRoughness.baseColorFactor);o.baseColor=[f[0],f[1],f[2],f[3]],o.hasParametersFromSource=!!r.hasParametersFromSource,o.usePBR=m.usePBR,o.mrrFactors=[r.metallicRoughness.metallicFactor,r.metallicRoughness.roughnessFactor,r.hasParametersFromSource?g[2]:h[2]],o.emissiveBaseColor=r.emissiveFactor,o.emissiveSource=s.Emissive,o.isIntegratedMesh=m.isIntegratedMesh,o.textureAlphaCutoff="mask"===r.alphaMode?r.alphaCutoff:T,o.alphaDiscardMode="opaque"===r.alphaMode?u.Opaque:"mask"===r.alphaMode?u.Mask:u.MaskBlend;const x=[],F=p(a.Color|a.AlphaMask);null!=F&&(o.baseColorTexture=new l(c,F),x.push(o.baseColorTexture.loadPromise));const b=p(a.MetallicRoughness);null!=b&&(o.metallicRoughnessTexture=new l(c,b),x.push(o.metallicRoughnessTexture.loadPromise));const C=p(a.Emissive);null!=C&&(o.emissionTexture=new l(c,C),x.push(o.emissionTexture.loadPromise));const S=p(a.Occlusion);null!=S&&(o.occlusionTexture=new l(c,S),x.push(o.occlusionTexture.loadPromise));const P=p(a.Normal);return null!=P&&(o.normalTexture=new l(c,P),x.push(o.normalTexture.loadPromise)),o.commonMaterialParameters.hasSlicePlane=m.slicePlaneEnabled,o.commonMaterialParameters.doubleSided=r.doubleSided,o.commonMaterialParameters.cullFace=r.cullFace,o.ellipsoidMode=n(m.viewSpatialReference),Promise.all(x)}function E(e){const o=!!e.compressedTextureS3TC,r=!!e.compressedTextureETC,s=has("disable-feature:i3s-basis")?0:t.Basis|t.KTX2,a=t.JPG|t.PNG,l=s|t.DDS_S3TC;return a|(o?l:0)|(r?s:0)}function N(e,o){if(null!=o)return e.find((e=>0!==(e.encoding&o)))}function I(e,o,r){if(null==e||r===a.None)return null;for(let s=0;s<e.length;s++){const a=e[s];if(null!=a&&0!==(a.usage&r)){const e=o[s];return null!=e?e.id:null}}return null}function k(e){switch(e){case t.KTX2:return c.KTX2_ENCODING;case t.Basis:return c.BASIS_ENCODING;case t.DDS_S3TC:return c.DDS_ENCODING;case t.PNG:return"image/png";case t.JPG:return"image/jpeg";case t.KTX_ETC2:return"image/ktx";default:return""}}export{w as configureMaterial,M as createTexture,P as defaultMaterial,x as getMaterialAndTextures,S as getMaterialAndTexturesFromShared,E as getSupportedEncodings,N as selectEncoding};
5
+ import{validateColorAndOpacity as e,validateColor as o}from"../../../../core/colorUtils.js";import has from"../../../../core/has.js";import{clamp as r}from"../../../../core/mathUtils.js";import{EmissiveSourceMode as s}from"../../../../symbols/support/materialUtils.js";import{TextureUsage as a,TextureEncoding as t}from"./enums.js";import{RenderTexture as l}from"../../webgl-engine/core/material/RenderTexture.js";import{getEllipsoidMode as n}from"../../webgl-engine/core/shaderLibrary/util/EllipsoidMode.js";import{CullFaceOptions as i,AlphaDiscardMode as u,TextureEncodingMimeType as c}from"../../webgl-engine/lib/basicInterfaces.js";import{Texture as m}from"../../webgl-engine/lib/Texture.js";import{useSchematicPBRI3S as d,useSchematicPBR as p,schematicMRRFactors as g,advancedMRRFactors as h}from"../../webgl-engine/materials/pbrUtils.js";import{TextureWrapMode as f}from"../../../webgl/enums.js";import{alphaCutoff as T}from"../../../../webscene/support/AlphaCutoff.js";function x(o,r,s){const t=new Map,l=(e,o)=>{if(null==e)return-1;const r=t.get(e.id);if(r)return r.usage|=o,r.id;const s=t.size;return t.set(e.id,{id:s,usage:o}),s},n=r.pbrMetallicRoughness,u=n?.baseColorFactor?e(n.baseColorFactor):null,c=r.emissiveFactor,m=has("disable-feature:diffuse-rendering-i3s")||s?d({normalTexture:r.normalTexture,emissiveTexture:r.emissiveTexture,emissiveFactor:r.emissiveFactor,occlusionTexture:r.occlusionTexture,metallicRoughnessTexture:n?.metallicRoughnessTexture,metallicFactor:n?.metallicFactor,roughnessFactor:n?.roughnessFactor}):p({normalTexture:r.normalTexture,emissiveTexture:r.emissiveTexture,emissiveFactor:r.emissiveFactor,occlusionTexture:r.occlusionTexture,metallicRoughnessTexture:n?.metallicRoughnessTexture,metallicFactor:n?.metallicFactor,roughnessFactor:n?.roughnessFactor}),f=m?g[0]:n?.metallicFactor??h[0],T=m?g[1]:n?.roughnessFactor??h[1],x="mask"===r.alphaMode?a.Color|a.AlphaMask:a.Color,C={baseColorFactor:u?[u[0],u[1],u[2],u[3]]:[1,1,1,1],baseColorTextureId:l(n?.baseColorTexture,x),metallicRoughnessTextureId:l(n?.metallicRoughnessTexture,a.MetallicRoughness),metallicFactor:f,roughnessFactor:T},S={alphaMode:r.alphaMode,alphaCutoff:r.alphaCutoff,doubleSided:r.doubleSided,cullFace:"none"===r.cullFace?i.None:"back"===r.cullFace?i.Back:"front"===r.cullFace?i.Front:i.None,normalTextureId:l(r.normalTexture,a.Normal),emissiveTextureId:l(r.emissiveTexture,a.Emissive),occlusionTextureId:l(r.occlusionTexture,a.Occlusion),emissiveFactor:c?[c[0],c[1],c[2]]:[0,0,0],metallicRoughness:C,wrapTextures:!1,hasParametersFromSource:m},M=[];return t.forEach((({usage:e},r)=>{const s=null!=o&&o[r]&&o[r].formats,a=s?F(s.map((({name:e,format:o})=>({name:e,encoding:b[o]})))):[];M.push({id:r,usage:e,encodings:a})})),{material:S,textures:M}}function F(e){return e.sort(((e,o)=>e.encoding-o.encoding))}const b={ktx2:t.KTX2,basis:t.Basis,dds:t.DDS_S3TC,png:t.PNG,jpg:t.JPG,"ktx-etc2":t.KTX_ETC2},C={[c.KTX2_ENCODING]:t.Basis,[c.BASIS_ENCODING]:t.Basis,[c.DDS_ENCODING]:t.DDS_S3TC,"image/png":t.PNG,"image/jpg":t.JPG,"image/jpeg":t.JPG,"image/ktx":t.KTX_ETC2};function S(e){const s=e?.materialDefinitions?Object.keys(e.materialDefinitions)[0]:null,t=e?.textureDefinitions?Object.keys(e.textureDefinitions)[0]:null,l=s?e.materialDefinitions?.[s]:null,n=t?e.textureDefinitions?.[t]:null,u=M();if(null!=l){const e=l.params;e.diffuse&&(o(e.diffuse),u.metallicRoughness.baseColorFactor=[e.diffuse[0],e.diffuse[1],e.diffuse[2],1]),null!=e.doubleSided&&(u.doubleSided=e.doubleSided,u.cullFace=e.doubleSided?i.None:i.Back),"none"!==e.cullFace&&"front"!==e.cullFace&&"back"!==e.cullFace||(u.cullFace="none"===e.cullFace?i.None:"back"===e.cullFace?i.Back:i.Front),e.transparency&&(u.metallicRoughness.baseColorFactor[3]=r(1-e.transparency,0,1)),(e.useVertexColorAlpha||u.metallicRoughness.baseColorFactor[3]<1)&&(u.alphaMode="blend")}const c=[];if(null!=n){const e=0;!n.wrap||"repeat"!==n.wrap[0]&&"repeat"!==n.wrap[1]||(u.wrapTextures=!0);let o=a.Color;"rgba"===n.channels&&(u.alphaMode="blend",o|=a.AlphaMask);const r=n.images.length-1,s=n.images[r],t=e=>e?.split("/").pop(),l=Array.isArray(n.encoding)?F(n.encoding.map(((e,o)=>({name:t(s.href[o]),encoding:C[e]||0})))):[{name:t(s.href),encoding:C[n.encoding]||0}];c.push({id:e,usage:o,encodings:l}),u.metallicRoughness.baseColorTextureId=e}return{material:u,textures:c}}const M=()=>({alphaMode:"opaque",alphaCutoff:T,doubleSided:!0,cullFace:i.None,normalTextureId:-1,emissiveTextureId:-1,occlusionTextureId:-1,emissiveFactor:[0,0,0],metallicRoughness:{baseColorFactor:[.8,.8,.8,1],baseColorTextureId:-1,metallicRoughnessTextureId:-1,metallicFactor:0,roughnessFactor:.6},wrapTextures:!1,hasParametersFromSource:!0});function P(e,o,r,s,t,l){if(null==e?.data)return null;const n=e.data,i=s.renderingContext.parameters.maxMaxAnisotropy,u=i>1,c=r||!o.wrapTextures?R:D,d=I(e.encoding),p=e.usage&a.Color?"opaque"===o.alphaMode?3:4:3,g=k(e.usage);return new m(n,{mipmap:u,maxAnisotropy:i,encoding:d,wrap:c,components:p,compressionHandle:g?t:void 0,compressionCallback:g?l:void 0,noUnpackFlip:!0})}const R={s:f.CLAMP_TO_EDGE,t:f.CLAMP_TO_EDGE},D={s:f.REPEAT,t:f.REPEAT};function w(o,r,t,i,c,m){const d=m.rendererTextureUsage,p=e=>v(i,t,e&d),f=e(r.metallicRoughness.baseColorFactor);o.baseColor=[f[0],f[1],f[2],f[3]],o.hasParametersFromSource=!!r.hasParametersFromSource,o.usePBR=m.usePBR,o.mrrFactors=[r.metallicRoughness.metallicFactor,r.metallicRoughness.roughnessFactor,r.hasParametersFromSource?g[2]:h[2]],o.emissiveBaseColor=r.emissiveFactor,o.emissiveSource=s.Emissive,o.isIntegratedMesh=m.isIntegratedMesh,o.textureAlphaCutoff="mask"===r.alphaMode?r.alphaCutoff:T,o.alphaDiscardMode="opaque"===r.alphaMode?u.Opaque:"mask"===r.alphaMode?u.Mask:u.MaskBlend;const x=[],F=p(a.Color|a.AlphaMask);null!=F&&(o.baseColorTexture=new l(c,F),x.push(o.baseColorTexture.loadPromise));const b=p(a.MetallicRoughness);null!=b&&(o.metallicRoughnessTexture=new l(c,b),x.push(o.metallicRoughnessTexture.loadPromise));const C=p(a.Emissive);null!=C&&(o.emissionTexture=new l(c,C),x.push(o.emissionTexture.loadPromise));const S=p(a.Occlusion);null!=S&&(o.occlusionTexture=new l(c,S),x.push(o.occlusionTexture.loadPromise));const M=p(a.Normal);return null!=M&&(o.normalTexture=new l(c,M),x.push(o.normalTexture.loadPromise)),o.commonMaterialParameters.hasSlicePlane=m.slicePlaneEnabled,o.commonMaterialParameters.doubleSided=r.doubleSided,o.commonMaterialParameters.cullFace=r.cullFace,o.ellipsoidMode=n(m.viewSpatialReference),Promise.all(x)}function E(e){const o=!!e.compressedTextureS3TC,r=!!e.compressedTextureETC,s=has("disable-feature:i3s-basis")?0:t.Basis|t.KTX2,a=t.JPG|t.PNG,l=s|t.DDS_S3TC;return a|(o?l:0)|(r?s:0)}function N(e,o){if(null!=o)return e.find((e=>0!==(e.encoding&o)))}function v(e,o,r){if(null==e||r===a.None)return null;for(let s=0;s<e.length;s++){const a=e[s];if(null!=a&&0!==(a.usage&r)){const e=o[s];return null!=e?e.id:null}}return null}function k(e){return!(e&~(a.Color|a.MetallicRoughness))}function I(e){switch(e){case t.KTX2:return c.KTX2_ENCODING;case t.Basis:return c.BASIS_ENCODING;case t.DDS_S3TC:return c.DDS_ENCODING;case t.PNG:return"image/png";case t.JPG:return"image/jpeg";case t.KTX_ETC2:return"image/ktx";default:return""}}export{w as configureMaterial,P as createTexture,M as defaultMaterial,x as getMaterialAndTextures,S as getMaterialAndTexturesFromShared,E as getSupportedEncodings,N as selectEncoding};
@@ -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 q}from"../webgl-engine/collections/Component/ComponentIntersectionData.js";import{ShaderOutput as F}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._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 q(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 F.Color:case F.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 F.Shadow:case F.ShadowExcludeHighlight:return this._castShadows?this._acquireTechnique(F.Shadow):null;case F.ViewshedShadow:return this._inViewshed?this._acquireTechnique(F.ViewshedShadow):null;case F.Depth:case F.Normal:return this._acquireTechnique(e.output);case F.ObjectAndLayerIdColor:return this._acquireTechnique(F.ObjectAndLayerIdColor);case F.Highlight:return r.hasHighlightMixTexture=null!=e.bind.highlightMixTexture,this._overlayRenderer.hasHighlights?this._acquireTechnique(F.Highlight):null}return null}render(e,t){switch(this._updatePatchGroups(),t.useStencil=!1,e.output){case F.Color:case F.ColorEmission:{const i=e.bind.slot===Z.OCCLUDED_TERRAIN?O.Occluded:O.Color;this._renderMaterialPass(e,t,i);break}case F.Depth:case F.Normal:this._renderAuxiliaryPass(e,t,O.Color,this._visiblePatchesByOrigin);break;case F.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 F.Shadow:case F.ShadowExcludeHighlight:case F.ViewshedShadow:this._renderAuxiliaryPass(e,t,null,this._allPatchesByOrigin);break;case F.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 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};
@@ -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"../../../core/has.js";import{disposeMaybe as e,releaseMaybe as t}from"../../../core/maybe.js";import{set as r,copy as s}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{ZEROS as o}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as i}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isBaseLayer as a,isGroupLayer as n,isReferenceLayer as u}from"../../../layers/support/layerUtils.js";import{isLayerViewWithFlowRenderer as c}from"../support/flowUtils.js";import{BlendLayersPassParameters as l}from"./BlendLayersTechnique.js";import{TextureUpdate as p}from"./interfaces.js";import{LayerClass as d}from"./LayerClass.js";import{NeighborIndex as m}from"./NeighborIndex.js";import{isImageWithType as h}from"./TerrainData.js";import{isBlendableLayerView as f,isVectorTileLayerView as _,isVectorTileRenderInfo as T,isImageryTileRenderInfo as x,isImageSourceRenderInfo as y,isTextureTileRenderInfo as b,isVectorTilePerLayerInfo as g}from"./terrainUtils.js";import{ActivationTime as I}from"./TextureFader.js";import{TextureReference as w}from"./TextureReference.js";import{TileCompositor as A}from"./TileCompositor.js";import{TileRenderInfo as P}from"./TileRenderInfo.js";import{TileTexture as k,getCacheKey as E}from"./TileTexture.js";import{TileUpdate as O}from"./TileUpdate.js";import{fallsWithinLayerView as j}from"./tileUtils.js";import{blendModeFromString as M}from"../webgl-engine/core/shaderLibrary/output/BlendOptions.js";import{BlendLayersOutput as C}from"../webgl-engine/core/shaderLibrary/terrain/BlendLayersOutput.js";import{createEmptyTexture as L}from"../webgl-engine/lib/glUtil3D.js";import{isCompressible as R}from"../../support/TextureCompressionWorkerHandle.js";import{TextureSamplingMode as N,TextureWrapMode as D,PixelFormat as B}from"../../webgl/enums.js";import{Texture as U}from"../../webgl/Texture.js";import{TextureDescriptor as S}from"../../webgl/TextureDescriptor.js";class G{constructor(e,t,r,s,o,i){this.start=e,this.end=t,this.blendMode=r,this.opacity=s,this.output=o,this.baseOpacity=i}}class F{constructor(e,t,r,s,o){this._rctx=e,this.tileSize=t,this._techniques=r,this._cache=s,this._compressionHandle=o,this._passParameters=new l,this._backgroundColor=null,this._maxAnisotropy=this._rctx.parameters.maxMaxAnisotropy,this._compositor=new A(this._rctx,this._techniques)}dispose(){this._compositor=e(this._compositor),this._backgroundTexture=t(this._backgroundTexture)}get backgroundIsGrid(){return null==this._backgroundColor}get backgroundColor(){return this._backgroundColor}updateHeading(e){this._compositor?.updateHeading(e)}updateTileTexture(e,t){if(!e.renderData)return;const r=e.surface,s=r.baseOpacity;let o=0,i=0,l=this.tileSize,m=!1,h=!1;const T=r.view.state.contentPixelRatio;let x=!1;V.clear(),X.length=0;const y=e.layerInfo[d.MAP];let b=0,g=null;for(;b<y.length;b++){const t=r.layerViewByIndex(b,d.MAP),p=t.layer,I=!j(e,t),w=p.opacity,A=t.fullOpacity;if(h=h||a(p),c(t))continue;if(f(t)){let e="normal"!==t.layer.blendMode;if(n(p.parent)){const t=p.parent.uid;null!=t&&""!==t&&(e=q(p.parent)||e)}e&&(x=e,m=!1)}if((I||0===w)&&!x){y[b].pendingUpdates&=~(O.TEXTURE_NOFADING&O.TEXTURE_FADING);continue}++i;const P=_(t),k=H(e,b,P);if(k){if(y[b].pendingUpdates&=~(O.TEXTURE_NOFADING&O.TEXTURE_FADING),n(p.parent)){const e=p.parent.uid;null!=e&&""!==e&&z(p.parent,b)}P?l=Math.max(l,this.tileSize*T):1===s&&1===A&&(t.isOpaque||this._dataToTexture(k,u(p))&&k.sourceLayerInfo.data.descriptor.isOpaque)&&(m=!0),++o,null===g&&(g=b)}}const I=l/this.tileSize;0!==o&&null!==g?1===o&&!x&&this._useLayerTexture(e,g)||this._composeLayers(e,t,b-1,h,l,I,!m||x,V,x):this._useBackgroundTexture(e,i,t!==p.FADING)}setBackground(e){this._backgroundColor!==e&&(this._backgroundColor=e,this._backgroundTexture&&this._drawBackgroundTexture(this._backgroundTexture))}_ensureBackgroundTexture(){return null==this._backgroundTexture&&(this._backgroundTexture=this._buildTexture(this.tileSize,!1),this._drawBackgroundTexture(this._backgroundTexture)),this._backgroundTexture}_drawBackgroundTexture(e){this._compositor.bind(this.tileSize),this._passParameters.offset=o,this._passParameters.scale=1,this._passParameters.opacity=1,this.backgroundColor&&(this._passParameters.backgroundColor=this.backgroundColor),this._compositor.drawBackground(this._passParameters,null!=this.backgroundColor),this._compositor.copyFBOToTexture(e),this._compositor.unbind()}_useBackgroundTexture(e,t,r){const s=e.renderData,o=!r&&null!=s.textureReference&&(e.surface.view.layerViewManager.updating||t>0)?I.Delayed:I.Immediate,i=this._ensureBackgroundTexture();s.setTextureReference(new w(i,p.FADING,J,e.surface.baseOpacity,0,1),o)}_useLayerTexture(e,t){const r=e.surface.layerViewByIndex(t,d.MAP),s=a(r.layer),o=s?e.surface.baseOpacity:1,n=s?1:e.surface.baseOpacity,c=r.fullOpacity,l=H(e,t,!1);return!!this._dataToTexture(l,u(r.layer))&&(e.renderData.setTextureReference(new w(l.sourceLayerInfo.data,p.FADING,i(l.offset[0],l.offset[1],l.scale,l.scale),o,n,c)),!0)}_composeLayers(e,t,r,s,i,n,c,l,p){this._compositor.ensureBuffer(i);const m=e.surface.baseOpacity;let h=!1,y=N.LINEAR_MIPMAP_LINEAR,b=!1,g=0;for(let w=r;w>=0;w--){const t=e.surface.layerViewByIndex(w,d.MAP),r=t.layer,I=_(t),A=H(e,w,I),P=r.opacity,k=!j(e,t);if(!A||(0===P||k)&&!p)continue;const E=!a(r)&&!h;E&&(h=!0);let O=!1;l.forEach((e=>{e.start===w&&(e.output=s?C.Composite:c&&E?this.backgroundIsGrid?C.GridComposite:C.ColorComposite:C.Composite,e.baseOpacity=E?m:1,X.push(e),this._compositor.openGroup(i),O=!0)}));const L=0===g,R=O?C.GroupBackgroundComposite:c&&L?this.backgroundIsGrid?C.GridComposite:C.ColorComposite:C.Composite,D=M[f(t)?t.layer.blendMode:"normal"];for(this._passParameters.baseOpacity=E&&!O&&m<1?m:1,this._passParameters.opacity=P,T(A)?b=this._compositor.drawVectorData(this._passParameters,R,i,D,A,n,this.tileSize,b):x(A)?(this._compositor.drawRasterData(this._passParameters,R,i,D,A),v(A)&&(y=N.NEAREST)):this._dataToTexture(A,u(r))&&(this._passParameters.texture=A.sourceLayerInfo.data.texture,this._passParameters.offset=A.offset,this._passParameters.scale=A.scale,this._compositor.drawImageData(this._passParameters,R,i,D));X.length>0&&X[X.length-1].end===w;){const e=X.pop();this._passParameters.baseOpacity=e.baseOpacity,this._passParameters.opacity=e.opacity,this._passParameters.offset=o,this._passParameters.scale=1,this._compositor.drawGroup(this._passParameters,e.output,i,M[e.blendMode])}g++}const I=e.renderData,A=p||h&&m<1,P=I.ensureTexture(i,A,t,(()=>this._buildTexture(i,A,y)));this._compositor.copyFBOToTexture(P),this._compositor.unbind(),I.setTextureReference(new w(P,t,J,h?1:m,0,1))}_dataToTexture(e,t){if(y(e)){const r=e.sourceLayerInfo,s=1===e.scale&&!t;r.data=this._buildTexture(r.data,!0,s,e.tile.onCompressionFinished),e.tile.setMemoryDirty()}return b(e)}_buildTexture(e,t,r=N.LINEAR_MIPMAP_LINEAR,s=()=>{}){if(null==e)return null;const o=new S;o.wrapMode=D.CLAMP_TO_EDGE,o.samplingMode="boolean"==typeof r?N.LINEAR_MIPMAP_LINEAR:r,o.maxAnisotropy=this._maxAnisotropy,o.preMultiplyAlpha=!0,o.flipped=!0,o.hasMipmap=!0,t||(o.pixelFormat=B.RGB);const i=this._rctx,a="boolean"==typeof r&&r;let n;if("number"==typeof e)o.width=o.height=e,n=this._buildTileTexture(o);else if(h(e))o.isOpaque=e.isOpaque,o.isOpaque&&(o.pixelFormat=B.RGB),o.width=e.element.width,o.height=e.element.height,n=this._buildTileTexture(o,a,s,e.element);else try{o.width=e.width,o.height=e.height,n=this._buildTileTexture(o,a,s,e)}catch(c){n=new k(L(i)),console.warn("TileRenderer: failed to execute 'texImage2D', cross-origin image may not be loaded.")}const u=i.bindTexture(n.texture,U.TEXTURE_UNIT_FOR_UPDATES);return n.generateMipmap(),i.bindTexture(u,U.TEXTURE_UNIT_FOR_UPDATES),n}_buildTileTexture(e,t=!1,r=()=>{},s){const o=this._cache.pop(E(e,!1))??this._cache.pop(E(e,!0));if(t&&=R(s),o)return o.retain(),t?o.texture.enableCompression(this._compressionHandle,r):o.texture.disableCompression(),o.texture.setData(s),o;e.compressionHandle=t?this._compressionHandle:null,e.compressionCallback=r;const i=new U(this._rctx,e,s);return new k(i,this._cache)}get test(){}}function H(e,t,o){W.layerIndex=t,W.vtlNeighborInfos.clear();const i=e.layerInfo[d.MAP][t];if(r(W.offset,0,0),W.tile=e,W.scale=1,W.sourceLod=e.lij,W.sourceLayerInfo=i,W.isVTLBackground=o,i.data)return o&&e.forEachLoadedNeighbor(((r,s)=>{if(r.level!==e.level)return;const o=r.layerInfo[d.MAP][t];if(!g(o)||i.data===o.data)return;const a=W.vtlNeighborInfos.pushNew();a.offset=K[s],a.sourceLod=r.lij,a.sourceLayerInfo=o})),W;const a=i.upsampleInfo,n=a?.tile?.layerInfo[d.MAP][t];return n&&a.tile?(W.tile=a.tile,s(W.offset,a.offset),W.scale=a.scale,W.sourceLod=a.tile.lij,W.sourceLayerInfo=n,W):o?W:null}function v(e){const t=e.sourceLayerInfo.data;return!!t.source&&"nearest"===t.interpolation}function q(e){let t="normal"!==e.blendMode;return n(e.parent)&&(t=q(e.parent)||t),t}function z(e,t){n(e.parent)&&z(e.parent,t);const r=e.uid;if(null!=r&&""!==r){const s=V.get(r);s?s.start=t:V.set(r,new G(t,t,e.blendMode,e.opacity,C.Composite,1))}}const V=new Map,X=new Array,W=new P,J=i(0,0,1,1),K=new Array;K[m.NORTH]=[0,-1],K[m.NORTH_EAST]=[-1,-1],K[m.EAST]=[-1,0],K[m.SOUTH_EAST]=[-1,1],K[m.SOUTH]=[0,1],K[m.SOUTH_WEST]=[1,1],K[m.WEST]=[1,0],K[m.NORTH_WEST]=[1,-1];export{G as GroupInfo,F as TileRenderer};
5
+ import"../../../core/has.js";import{disposeMaybe as e,releaseMaybe as t}from"../../../core/maybe.js";import{set as r,copy as s}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{ZEROS as o}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as i}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isBaseLayer as a,isGroupLayer as n,isReferenceLayer as u}from"../../../layers/support/layerUtils.js";import{isLayerViewWithFlowRenderer as c}from"../support/flowUtils.js";import{BlendLayersPassParameters as l}from"./BlendLayersTechnique.js";import{TextureUpdate as p}from"./interfaces.js";import{LayerClass as d}from"./LayerClass.js";import{NeighborIndex as m}from"./NeighborIndex.js";import{isImageWithType as h}from"./TerrainData.js";import{isBlendableLayerView as f,isVectorTileLayerView as _,isVectorTileRenderInfo as T,isImageryTileRenderInfo as x,isImageSourceRenderInfo as y,isTextureTileRenderInfo as b,isVectorTilePerLayerInfo as g}from"./terrainUtils.js";import{ActivationTime as I}from"./TextureFader.js";import{TextureReference as w}from"./TextureReference.js";import{TileCompositor as A}from"./TileCompositor.js";import{TileRenderInfo as P}from"./TileRenderInfo.js";import{TileTexture as k,getCacheKey as E}from"./TileTexture.js";import{TileUpdate as O}from"./TileUpdate.js";import{fallsWithinLayerView as j}from"./tileUtils.js";import{blendModeFromString as M}from"../webgl-engine/core/shaderLibrary/output/BlendOptions.js";import{BlendLayersOutput as C}from"../webgl-engine/core/shaderLibrary/terrain/BlendLayersOutput.js";import{createEmptyTexture as L}from"../webgl-engine/lib/glUtil3D.js";import{isCompressible as R}from"../../support/TextureCompressionWorkerHandle.js";import{TextureSamplingMode as N,TextureWrapMode as D,PixelFormat as B}from"../../webgl/enums.js";import{Texture as U}from"../../webgl/Texture.js";import{TextureDescriptor as S}from"../../webgl/TextureDescriptor.js";class G{constructor(e,t,r,s,o,i){this.start=e,this.end=t,this.blendMode=r,this.opacity=s,this.output=o,this.baseOpacity=i}}class F{constructor(e,t,r,s,o){this._rctx=e,this.tileSize=t,this._techniques=r,this._cache=s,this._compressionHandle=o,this._passParameters=new l,this._backgroundColor=null,this._maxAnisotropy=this._rctx.parameters.maxMaxAnisotropy,this._compositor=new A(this._rctx,this._techniques)}dispose(){this._compositor=e(this._compositor),this._backgroundTexture=t(this._backgroundTexture)}get backgroundIsGrid(){return null==this._backgroundColor}get backgroundColor(){return this._backgroundColor}updateHeading(e){this._compositor?.updateHeading(e)}updateTileTexture(e,t){if(!e.renderData)return;const r=e.surface,s=r.baseOpacity;let o=0,i=0,l=this.tileSize,m=!1,h=!1;const T=r.view.state.contentPixelRatio;let x=!1;V.clear(),X.length=0;const y=e.layerInfo[d.MAP];let b=0,g=null;for(;b<y.length;b++){const t=r.layerViewByIndex(b,d.MAP),p=t.layer,I=!j(e,t),w=p.opacity,A=t.fullOpacity;if(h=h||a(p),c(t))continue;if(f(t)){let e="normal"!==t.layer.blendMode;if(n(p.parent)){const t=p.parent.uid;null!=t&&""!==t&&(e=q(p.parent)||e)}e&&(x=e,m=!1)}if((I||0===w)&&!x){y[b].pendingUpdates&=~(O.TEXTURE_NOFADING&O.TEXTURE_FADING);continue}++i;const P=_(t),k=H(e,b,P);if(k){if(y[b].pendingUpdates&=~(O.TEXTURE_NOFADING&O.TEXTURE_FADING),n(p.parent)){const e=p.parent.uid;null!=e&&""!==e&&z(p.parent,b)}P?l=Math.max(l,this.tileSize*T):1===s&&1===A&&(t.isOpaque||this._dataToTexture(k,u(p))&&k.sourceLayerInfo.data.descriptor.isOpaque)&&(m=!0),++o,null===g&&(g=b)}}const I=l/this.tileSize;0!==o&&null!==g?1===o&&!x&&this._useLayerTexture(e,g)||this._composeLayers(e,t,b-1,h,l,I,!m||x,V,x):this._useBackgroundTexture(e,i,t!==p.FADING)}setBackground(e){this._backgroundColor!==e&&(this._backgroundColor=e,this._backgroundTexture&&this._drawBackgroundTexture(this._backgroundTexture))}_ensureBackgroundTexture(){return null==this._backgroundTexture&&(this._backgroundTexture=this._buildTexture(this.tileSize,!1),this._drawBackgroundTexture(this._backgroundTexture)),this._backgroundTexture}_drawBackgroundTexture(e){this._compositor.bind(this.tileSize),this._passParameters.offset=o,this._passParameters.scale=1,this._passParameters.opacity=1,this.backgroundColor&&(this._passParameters.backgroundColor=this.backgroundColor),this._compositor.drawBackground(this._passParameters,null!=this.backgroundColor),this._compositor.copyFBOToTexture(e),this._compositor.unbind()}_useBackgroundTexture(e,t,r){const s=e.renderData,o=!r&&null!=s.textureReference&&(e.surface.view.layerViewManager.updating||t>0)?I.Delayed:I.Immediate,i=this._ensureBackgroundTexture();s.setTextureReference(new w(i,p.FADING,J,e.surface.baseOpacity,0,1),o)}_useLayerTexture(e,t){const r=e.surface.layerViewByIndex(t,d.MAP),s=a(r.layer),o=s?e.surface.baseOpacity:1,n=s?1:e.surface.baseOpacity,c=r.fullOpacity,l=H(e,t,!1);return!!this._dataToTexture(l,u(r.layer))&&(e.renderData.setTextureReference(new w(l.sourceLayerInfo.data,p.FADING,i(l.offset[0],l.offset[1],l.scale,l.scale),o,n,c)),!0)}_composeLayers(e,t,r,s,i,n,c,l,p){this._compositor.ensureBuffer(i);const m=e.surface.baseOpacity;let h=!1,y=N.LINEAR_MIPMAP_LINEAR,b=!1,g=0;for(let w=r;w>=0;w--){const t=e.surface.layerViewByIndex(w,d.MAP),r=t.layer,I=_(t),A=H(e,w,I),P=r.opacity,k=!j(e,t);if(!A||(0===P||k)&&!p)continue;const E=!a(r)&&!h;E&&(h=!0);let O=!1;l.forEach((e=>{e.start===w&&(e.output=s?C.Composite:c&&E?this.backgroundIsGrid?C.GridComposite:C.ColorComposite:C.Composite,e.baseOpacity=E?m:1,X.push(e),this._compositor.openGroup(i),O=!0)}));const L=0===g,R=O?C.GroupBackgroundComposite:c&&L?this.backgroundIsGrid?C.GridComposite:C.ColorComposite:C.Composite,D=M[f(t)?t.layer.blendMode:"normal"];for(this._passParameters.baseOpacity=E&&!O&&m<1?m:1,this._passParameters.opacity=P,T(A)?b=this._compositor.drawVectorData(this._passParameters,R,i,D,A,n,this.tileSize,b):x(A)?(this._compositor.drawRasterData(this._passParameters,R,i,D,A),v(A)&&(y=N.NEAREST)):this._dataToTexture(A,u(r))&&(this._passParameters.texture=A.sourceLayerInfo.data.texture,this._passParameters.offset=A.offset,this._passParameters.scale=A.scale,this._compositor.drawImageData(this._passParameters,R,i,D));X.length>0&&X[X.length-1].end===w;){const e=X.pop();this._passParameters.baseOpacity=e.baseOpacity,this._passParameters.opacity=e.opacity,this._passParameters.offset=o,this._passParameters.scale=1,this._compositor.drawGroup(this._passParameters,e.output,i,M[e.blendMode])}g++}const I=e.renderData,A=p||h&&m<1,P=I.ensureTexture(i,A,t,(()=>this._buildTexture(i,A,y)));this._compositor.copyFBOToTexture(P),this._compositor.unbind(),I.setTextureReference(new w(P,t,J,h?1:m,0,1))}_dataToTexture(e,t){if(y(e)){const r=e.sourceLayerInfo,s=1===e.scale&&!t;r.data=this._buildTexture(r.data,!0,s,e.tile.onCompressionFinished),e.tile.setMemoryDirty()}return b(e)}_buildTexture(e,t,r=N.LINEAR_MIPMAP_LINEAR,s=()=>{}){if(null==e)return null;const o=new S;o.wrapMode=D.CLAMP_TO_EDGE,o.samplingMode="boolean"==typeof r?N.LINEAR_MIPMAP_LINEAR:r,o.maxAnisotropy=this._maxAnisotropy,o.preMultiplyAlpha=!0,o.flipped=!0,o.hasMipmap=!0,t||(o.pixelFormat=B.RGB);const i=this._rctx,a="boolean"==typeof r&&r;let n;if("number"==typeof e)o.width=o.height=e,n=this._buildTileTexture(o);else if(h(e))o.isOpaque=e.isOpaque,o.isOpaque&&(o.pixelFormat=B.RGB),o.width=e.element.width,o.height=e.element.height,n=this._buildTileTexture(o,a,s,e.element);else try{o.width=e.width,o.height=e.height,n=this._buildTileTexture(o,a,s,e)}catch(c){n=new k(L(i)),console.warn("TileRenderer: failed to execute 'texImage2D', cross-origin image may not be loaded.")}const u=i.bindTexture(n.texture,U.TEXTURE_UNIT_FOR_UPDATES);return n.generateMipmap(),i.bindTexture(u,U.TEXTURE_UNIT_FOR_UPDATES),n}_buildTileTexture(e,t=!1,r=()=>{},s){const o=this._cache.pop(E(e,!1))??this._cache.pop(E(e,!0));if(t&&=R(s,e),o)return o.retain(),t?o.texture.enableCompression(this._compressionHandle,r):o.texture.disableCompression(),o.texture.setData(s),o;e.compressionHandle=t?this._compressionHandle:null,e.compressionCallback=r;const i=new U(this._rctx,e,s);return new k(i,this._cache)}get test(){}}function H(e,t,o){W.layerIndex=t,W.vtlNeighborInfos.clear();const i=e.layerInfo[d.MAP][t];if(r(W.offset,0,0),W.tile=e,W.scale=1,W.sourceLod=e.lij,W.sourceLayerInfo=i,W.isVTLBackground=o,i.data)return o&&e.forEachLoadedNeighbor(((r,s)=>{if(r.level!==e.level)return;const o=r.layerInfo[d.MAP][t];if(!g(o)||i.data===o.data)return;const a=W.vtlNeighborInfos.pushNew();a.offset=K[s],a.sourceLod=r.lij,a.sourceLayerInfo=o})),W;const a=i.upsampleInfo,n=a?.tile?.layerInfo[d.MAP][t];return n&&a.tile?(W.tile=a.tile,s(W.offset,a.offset),W.scale=a.scale,W.sourceLod=a.tile.lij,W.sourceLayerInfo=n,W):o?W:null}function v(e){const t=e.sourceLayerInfo.data;return!!t.source&&"nearest"===t.interpolation}function q(e){let t="normal"!==e.blendMode;return n(e.parent)&&(t=q(e.parent)||t),t}function z(e,t){n(e.parent)&&z(e.parent,t);const r=e.uid;if(null!=r&&""!==r){const s=V.get(r);s?s.start=t:V.set(r,new G(t,t,e.blendMode,e.opacity,C.Composite,1))}}const V=new Map,X=new Array,W=new P,J=i(0,0,1,1),K=new Array;K[m.NORTH]=[0,-1],K[m.NORTH_EAST]=[-1,-1],K[m.EAST]=[-1,0],K[m.SOUTH_EAST]=[-1,1],K[m.SOUTH]=[0,1],K[m.SOUTH_WEST]=[1,1],K[m.WEST]=[1,0],K[m.NORTH_WEST]=[1,-1];export{G as GroupInfo,F as TileRenderer};
@@ -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 o,ColorFormats as n,DepthFormat as s}from"./FBOCacheFormats.js";import{FBOPool as i}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._acquired=new Set,this._cache=new i(e.newCache,"FBOCache"),this._depthCache=new i(e.newCache,"DepthAttachmentCache"),this._colorCache=new i(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}acquire(t,r,o,n=c.RGBA8UNORM){const i=w(n,t,r);let d=this._cache.pop(i);const{rctx:f}=this;if(d){d.retain(),d.setName(o);const t=d.getAttachment(l);t&&(t.name=C(o));const r=d.getAttachment(u);r&&(r.name=p(o,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),_=(e,a,h)=>{a??=c.RGBA8UNORM;const o=this._acquireColor(a,t,r,h??p(d.name,e-u));return this.rctx.unbindTexture(o.attachment),d.attachColor(o,e),o.release(),d},w=e=>{e??=s.DEPTH24_STENCIL8;const a=this.acquireDepth(e,t,r,C(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(i,o,e,_,w,b),h(n)?d.acquireDepth(n):d.acquireColor(u,n,o)}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,{...o[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),o=this._colorCache.pop(h);if(o)return o.retain(),o.name=c,o;const s=new t(h,new d(this.rctx,{...n[e],width:r,height:a}),(()=>{this._colorCache.put(s)}));return s.name=c,s}_trackHandle(e){return this._acquired.add(e),e}}function p(e,t=0){return`${e}.color${t}`}function C(e){return`${e}.depth`}const _=new a("default","default",null,(()=>_),(()=>_),(()=>{}));function w(e,t,r){return`${t}x${r}:${e}`}_.release=()=>!1;export{f as FBOCache,_ 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(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};
@@ -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/Accessor.js";import{ShaderOutput as r}from"../core/shaderLibrary/ShaderOutput.js";const t={required:[]},s={required:[r.Depth]};class n extends e{precompile(e){return!!this.acquireTechniques(e)}consumes(){return t}get usedMemory(){return 0}get isDecoration(){return!1}get running(){return!1}modify(e,r){}get numGeometries(){return 0}get hasOccludees(){return!1}get hasEmissions(){return!1}forEachGeometry(e){}queryRenderOccludedState(e){return!1}}class u extends n{}class o extends n{}export{o as AsyncRenderPlugin,s as ConsumesDepth,t as ConsumesNone,u as SyncRenderPlugin};
5
+ import e from"../../../../core/Accessor.js";import{ShaderOutput as r}from"../core/shaderLibrary/ShaderOutput.js";import{RenderOccludedFlag as t}from"../lib/Material.js";const s={required:[]},n={required:[r.Depth]};class u extends e{precompile(e){return!!this.acquireTechniques(e)}consumes(){return s}get usedMemory(){return 0}get renderOccludedFlags(){return t.Occlude}get isDecoration(){return!1}get running(){return!1}modify(e,r){}get numGeometries(){return 0}get hasOccludees(){return!1}get hasEmissions(){return!1}forEachGeometry(e){}}class o extends u{}class c extends u{}export{c as AsyncRenderPlugin,n as ConsumesDepth,s as ConsumesNone,o as SyncRenderPlugin};
@@ -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"../../../../core/has.js";import e from"../../../../core/PooledArray.js";import{isPromiseLike as t,createAbortError as r}from"../../../../core/promiseUtils.js";import{signal as s}from"../../../../core/signal.js";import{DepthRange as n}from"../lib/DepthRange.js";import{RenderOccludedFlag as o}from"../lib/Material.js";import{RenderSlot as i}from"../lib/RenderSlot.js";class d{constructor(t){this.context=t,this._renderPlugins=new e,this._slots=new Array,this._version=s(0);for(let e=0;e<i.MAX_SLOTS;++e)this._slots[e]=[]}destroy(){this._renderPlugins.forEach((e=>e.destroy())),this._renderPlugins.clear()}get plugins(){return this._renderPlugins}add(e,s){const n=()=>{if(s?.aborted)throw e.uninitializeRenderContext(),r();this._renderPlugins.push(e),e.produces.forEach(((t,r)=>this._slots[r].push(e))),this.context.requestRender(),this._version.value++},o=e.initializeRenderContext(this.context,s);if(t(o))return o.then(n);n()}remove(e){this._renderPlugins.removeUnordered(e),e.uninitializeRenderContext();for(let t=0;t<this._slots.length;++t)this._slots[t]=this._slots[t].filter((t=>t!==e));this.context.requestRender(),this._version.value++}prepareRender(){this._renderPlugins.forAll((e=>{e.prepareRender&&e.prepareRender(this.context.renderContext)}))}updateAnimation(e){let t=!1;return this._renderPlugins.forAll((r=>t=r.updateAnimation?.(e)||t)),t}precompile(...e){++this.context.techniques.precompiling;const t=this.context.renderContext.bind.slot;for(const r of e)this.context.renderContext.bind.slot=r,this._forEachRender((()=>{}));this.context.renderContext.bind.slot=t,--this.context.techniques.precompiling}render(...e){for(const t of e)this.context.renderContext.bind.slot=t,this._forEachRender(((e,t)=>e.render(this.context.renderContext,t)))}_forEachRender(e){const t=this.context.renderContext.bind.slot,r=this.context.renderContext.output;this._slots[t].forEach((s=>{const n=s.produces.get(t);if(!n?.(r)||s.isDecoration&&!this.context.renderContext.bind.decorations)return;const o=s.acquireTechniques(this.context.renderContext);o&&e(s,o)}))}queryDepthRange(e){const t=new n;return this._renderPlugins.forAll((r=>{const s=r.queryDepthRange?.(e);t.union(s)})),t}get updating(){return this._version.value>=0&&this._renderPlugins.some((e=>e.running))}produces(e,...t){return t.some((t=>this._slots[t].some((r=>{const s=r.produces.get(t);return!!s&&s(e)}))))}consumes(e){return this._renderPlugins.some((t=>t.consumes().required.includes(e)))}hasHighlight(e){return h.some((t=>this._slots[t].some((t=>t.hasHighlight(e)))))}get hasDecorations(){return this._renderPlugins.some((e=>e.isDecoration))}get hasOccludees(){return this._renderPlugins.some((e=>e.hasOccludees))}get hasEmissions(){return this._renderPlugins.some((e=>e.hasEmissions))}get renderOccludedFlags(){return this._renderPlugins.reduce(((e,t)=>e|t.renderOccludedFlags),o.None)}get usedMemory(){return this._renderPlugins.reduce(((e,t)=>t.material?e:e+(t.usedMemory??0)),0)}get test(){}}const h=[i.OPAQUE_MATERIAL,i.TRANSPARENT_MATERIAL,i.DRAPED_MATERIAL,i.HUD_MATERIAL,i.LABEL_MATERIAL];export{d as RenderPluginManager};
5
+ import"../../../../core/has.js";import e from"../../../../core/PooledArray.js";import{isPromiseLike as t,createAbortError as r}from"../../../../core/promiseUtils.js";import{signal as s}from"../../../../core/signal.js";import{DepthRange as n}from"../lib/DepthRange.js";import{RenderOccludedFlag as o}from"../lib/Material.js";import{RenderSlot as i}from"../lib/RenderSlot.js";class d{constructor(t){this.context=t,this._renderPlugins=new e,this._slots=new Array,this._version=s(0);for(let e=0;e<i.MAX_SLOTS;++e)this._slots[e]=[]}destroy(){this._renderPlugins.forEach((e=>e.destroy())),this._renderPlugins.clear()}get plugins(){return this._renderPlugins}add(e,s){const n=()=>{if(s?.aborted)throw e.uninitializeRenderContext(),r();this._renderPlugins.push(e),e.produces.forEach(((t,r)=>this._slots[r].push(e))),this.context.requestRender(),this._version.value++},o=e.initializeRenderContext(this.context,s);if(t(o))return o.then(n);n()}remove(e){this._renderPlugins.removeUnordered(e),e.uninitializeRenderContext();for(let t=0;t<this._slots.length;++t)this._slots[t]=this._slots[t].filter((t=>t!==e));this.context.requestRender(),this._version.value++}prepareRender(){this._renderPlugins.forAll((e=>{e.prepareRender&&e.prepareRender(this.context.renderContext)}))}updateAnimation(e){let t=!1;return this._renderPlugins.forAll((r=>t=r.updateAnimation?.(e)||t)),t}precompile(...e){++this.context.techniques.precompiling;const t=this.context.renderContext.bind.slot;for(const r of e)this.context.renderContext.bind.slot=r,this._forEachRender((()=>{}));this.context.renderContext.bind.slot=t,--this.context.techniques.precompiling}render(...e){for(const t of e)this.context.renderContext.bind.slot=t,this._forEachRender(((e,t)=>e.render(this.context.renderContext,t)))}_forEachRender(e){const t=this.context.renderContext.bind.slot,r=this.context.renderContext.output;this._slots[t].forEach((s=>{const n=s.produces.get(t);if(!n?.(r)||s.isDecoration&&!this.context.renderContext.bind.decorations)return;const o=s.acquireTechniques(this.context.renderContext);o&&e(s,o)}))}queryDepthRange(e){const t=new n;return this._renderPlugins.forAll((r=>{const s=r.queryDepthRange?.(e);t.union(s)})),t}get updating(){return this._version.value>=0&&this._renderPlugins.some((e=>e.running))}produces(e,...t){return t.some((t=>this._slots[t].some((r=>{const s=r.produces.get(t);return!!s&&s(e)}))))}consumes(e){return this._renderPlugins.some((t=>t.consumes().required.includes(e)))}hasHighlight(e){return h.some((t=>this._slots[t].some((t=>t.hasHighlight(e)))))}get hasDecorations(){return this._renderPlugins.some((e=>e.isDecoration))}get hasOccludees(){return this._renderPlugins.some((e=>e.hasOccludees))}get hasEmissions(){return this._renderPlugins.some((e=>e.hasEmissions))}get renderOccludedFlags(){return this._renderPlugins.reduce(((e,t)=>e|(t.renderOccludedFlags??o.None)),o.None)}get usedMemory(){return this._renderPlugins.reduce(((e,t)=>t.material?e:e+(t.usedMemory??0)),0)}get test(){}}const h=[i.OPAQUE_MATERIAL,i.TRANSPARENT_MATERIAL,i.DRAPED_MATERIAL,i.HUD_MATERIAL,i.LABEL_MATERIAL];export{d as RenderPluginManager};
@@ -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{FramebufferBit as a,DepthStencilAttachment as p}from"../../../../webgl/enums.js";let n=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,n=c.fullViewport[2],u=c.fullViewport[3],h=e.find((({name:e})=>e===o.FOCUSAREA)),d=this.fboCache.acquire(n,u,this.produces),f=this.renderingContext;return f.clear(a.STENCIL),f.bindFramebuffer(d.fbo),this._passParameters.color=s.getTexture(),this._passParameters.focusArea=h.getTexture(),this._passParameters.effect=m[this.focusAreasView.style],f.bindTechnique(r,t,this._passParameters),f.screen.draw(),d.attachDepth(s.getAttachment(p)),d}};var u;e([r()],n.prototype,"consumes",void 0),e([r()],n.prototype,"produces",void 0),e([r({constructOnly:!0})],n.prototype,"focusAreasView",void 0),n=e([s("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaColorNode")],n),function(e){e[e.NONE=0]="NONE",e[e.BRIGHT=1]="BRIGHT",e[e.DARK=2]="DARK"}(u||(u={}));const m={none:u.NONE,bright:u.BRIGHT,dark:u.DARK};export{n 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{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};
@@ -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 o}from"../../../webgl.js";import i from"../../../webgl/RenderNode.js";import{ColorFormat as n}from"../../core/FBOCacheFormats.js";import{FocusAreaMaskTechnique as a}from"./FocusAreaMaskTechnique.js";import{Default3D as c}from"../../lib/DefaultVertexAttributeLocations.js";import{Pos3 as h}from"../../lib/DefaultVertexBufferLayouts.js";import{VertexArrayObject as p}from"../../lib/VertexArrayObject.js";import{F as u}from"../../../../../chunks/FocusAreaMask.glsl.js";import{BufferObject as l}from"../../../../webgl/BufferObject.js";import{DepthStencilAttachment as m,FramebufferBit as d,Face as f,StencilOperation as g,CompareFunction as A,PrimitiveType as E,Usage as w}from"../../../../webgl/enums.js";import{noParameters as b}from"../../../../webgl/NoParameters.js";let _=class extends i{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[r.TRANSPARENT]},this.produces=o.FOCUSAREA,this._vaos=new Array,this._counts=new Array,this._origins=new Array,this._maskParameters=new u}initialize(){this.updateGeometries()}destroy(){this._vaos.forEach((e=>e.dispose())),this._vaos.length=this._counts.length=this._origins.length=0}precompile(){this.techniques.precompile(a)}render(e){const t=this.techniques.get(a),s=this.bindParameters,i=s.camera,c=i.fullViewport[2],h=i.fullViewport[3];if(!t.compiled||!this._vaos)return void this.requestRender();const p=e.find((({name:e})=>e===r.TRANSPARENT)),u=this.renderingContext,l=this.fboCache.acquire(c,h,o.FOCUSAREA,n.RGBA8UNORM).attachDepth(p.getAttachment(m));u.bindFramebuffer(l.fbo),u.clear(d.COLOR|d.STENCIL),u.setViewport(0,0,c,h),u.clear(d.STENCIL,0);const w=u.bindTechnique(t,s);u.setFaceCullingEnabled(!1),u.setStencilTestEnabled(!0),u.setStencilOpSeparate(f.FRONT,g.KEEP,g.INCR_WRAP,g.KEEP),u.setStencilOpSeparate(f.BACK,g.KEEP,g.DECR_WRAP,g.KEEP),u.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,b,this._maskParameters),u.bindVAO(e),u.setDepthTestEnabled(!0),u.setStencilWriteMask(255),u.setStencilFunction(A.ALWAYS,0,255),u.setColorMask(!1,!1,!1,!1),u.drawArrays(E.TRIANGLES,0,t),u.setDepthTestEnabled(!1),u.setStencilWriteMask(0),u.setStencilFunction(A.NOTEQUAL,0,255),u.setColorMask(!0,!0,!0,!0),u.drawArrays(E.TRIANGLES,0,t)}return l}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 i=0;i<s.length;i++)t.push(e.positions[3*(s[i]-1)]),t.push(e.positions[3*(s[i]-1)+1]),t.push(e.positions[3*(s[i]-1)+2]);const r=e.indicesExtruded;for(let i=0;i<r.length;i++)t.push(e.positions[3*r[i]]),t.push(e.positions[3*r[i]+1]),t.push(e.positions[3*r[i]+2]);const o=new p(this.renderingContext,c,new Map([["geometry",h]]),new Map([["geometry",l.createVertex(this.renderingContext,w.STATIC_DRAW,new Float32Array(t))]]));this._vaos.push(o),this._counts.push(s.length+r.length),this._origins.push(e.origin)})))),this.requestRender()}};e([t()],_.prototype,"consumes",void 0),e([t()],_.prototype,"produces",void 0),e([t({constructOnly:!0})],_.prototype,"focusAreasView",void 0),_=e([s("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaMaskNode")],_);class R{constructor(e,t,s,r,o){this.positions=e,this.indicesBottom=t,this.indicesExtruded=s,this.height=r,this.origin=o}}var S;!function(e){e[e.NONE=0]="NONE",e[e.BRIGHT=1]="BRIGHT",e[e.DARK=2]="DARK"}(S||(S={}));export{S as FocusAreaEffect,R as FocusAreaGeometry,_ 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 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};
@@ -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 s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{ZEROS as o}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as n}from"../../../webgl.js";import i from"../../../webgl/RenderNode.js";import{DepthFormat as c}from"../../core/FBOCacheFormats.js";import{Blit as a}from"../blit/Blit.js";import{StencilBits as l}from"../../lib/basicInterfaces.js";import{RenderOccludedFlag as d}from"../../lib/Material.js";import{RenderSlot as p}from"../../lib/RenderSlot.js";import{BlitMode as u}from"../../shaders/CompositingTechniqueConfiguration.js";import{DepthStencilAttachment as m}from"../../../../webgl/enums.js";let f=class extends i{constructor(e){super(e),this.consumes={required:[n.OCCLUDED]},this.produces=n.OCCLUDED,this._blit=new a(e.view.stage.renderView.techniques,u.PremultipliedAlpha)}precompile(){const e=this.view.stage.renderer;e.plugins.plugins.forAll((r=>{e.precompileSlots(r,p.OCCLUDED_TERRAIN,p.TRANSPARENT_OCCLUDER_MATERIAL),r.material&&e.precompileOccludedSlots(r,g)}))}render(e){const r=e.find((({name:e})=>e===this.produces)),t=this.view.stage.renderer;let s=0;if(h.clear(),t.plugins.plugins.forAll((e=>{if(!e.material)return;e.queryRenderOccludedState(d.OccludeAndTransparentStencil)&&(s|=d.OccludeAndTransparentStencil,h.push(e))})),h.length>0&&(t.renderSlots(h,p.OCCLUDER_MATERIAL),s&d.OccludeAndTransparentStencil&&this._renderAndComposite(r,.5,(()=>t.renderSlots(h,p.TRANSPARENT_OCCLUDER_MATERIAL)),!1,!1)),h.clear(),t.plugins.plugins.forAll((e=>{if(!e.material)return;const r=e.queryRenderOccludedState(d.OccludeAndTransparent),t=e.queryRenderOccludedState(d.Transparent),o=e.queryRenderOccludedState(d.Opaque);(r||t||o)&&(s|=r?d.OccludeAndTransparent:t?d.Transparent:d.Opaque,h.push(e))})),s|=t.plugins.renderOccludedFlags,!s)return r;for(const o of g)s&o&&this._renderAndComposite(r,o===d.Opaque?1:.5,(()=>t.renderOccludedSlots(h,o)),!0,l.OutlineVisualElementMask);return h.clear(),r}_renderAndComposite(e,r,t,s,n){const i=this.renderingContext,{width:a,height:l}=e.fbo,d=this.fboCache.acquire(a,l,"tmp color"),p=s?this.fboCache.acquireDepth(c.DEPTH24_STENCIL8,a,l,"tmp depth"):e.getAttachment(m);d.attachDepth(p),i.bindFramebuffer(d.fbo),i.clearFramebuffer(o,s,n),t(),d.detachDepth(),this._blit.blend(i,d,e,this.bindParameters,r),s&&p.release(),d.release()}};e([t()],f.prototype,"consumes",void 0),e([t()],f.prototype,"produces",void 0),f=e([s("esri.views.3d.webgl-engine.effects.geometry.RenderOccludedRenderNode")],f);const h=new r,g=[d.OccludeAndTransparent,d.Transparent,d.Opaque];export{f 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_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};
@@ -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{createTask as s}from"../../../../../core/asyncUtils.js";import{clamp as i}from"../../../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../../../core/maybe.js";import{watch as t,syncAndInitial as a}from"../../../../../core/reactiveUtils.js";import{createScreenPointArray as o,createRenderScreenPointArray as m,screenPointObjectToArray as n}from"../../../../../core/screenUtils.js";import{isSVG as l}from"../../../../../core/urlUtils.js";import{property as h}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as p}from"../../../../../core/accessorSupport/decorators/subclass.js";import{requestImage as u}from"../../../../../support/requestImageUtils.js";import{InternalRenderCategory as c}from"../../../webgl.js";import _ from"../../../webgl/RenderNode.js";import{MagnifierTechnique as g}from"./MagnifierTechnique.js";import{RenderRequestType as d}from"../../lib/basicInterfaces.js";import{Default3D as f}from"../../lib/DefaultVertexAttributeLocations.js";import{createQuadVAO as v,Layout as P}from"../../lib/glUtil3D.js";import{M as T}from"../../../../../chunks/Magnifier.glsl.js";import{loadMagnifierResources as k}from"../../../../magnifier/resources.js";import{PrimitiveType as y,PixelFormat as b,TextureWrapMode as j}from"../../../../webgl/enums.js";import{Texture as R}from"../../../../webgl/Texture.js";import{TextureDescriptor as S}from"../../../../webgl/TextureDescriptor.js";let w=class extends _{constructor(){super(...arguments),this.produces=c.MAGNIFIER,this.consumes={required:[c.MAGNIFIER]},this._imageSources=null,this._imageLoadTask=null,this._passParameters=new T,this._vao=null,this._magnifier=null,this._tmpScreenPoint=o(),this._tmpRenderPoint=m()}initialize(){this.addHandles([t((()=>this.view.magnifier),(e=>this._update(e)),a)])}_update(e){if(e===this._magnifier)return;this.removeAllHandles(),this._magnifier=e;const s=()=>{const e=this._validMagnifier;e?(this._loadResources(e),this.produces=c.MAGNIFIER):this.produces="disabled",this.requestRender()};this._magnifier&&this.addHandles(t((()=>this._magnifier?.version),s)),s()}get _validMagnifier(){return this._magnifier?.visible&&this._magnifier?.position&&this._magnifier?.size>0?this._magnifier:null}get _factor(){return this._magnifier?.factor||1}destroy(){this._magnifier=null,null!=this._imageLoadTask&&(this._imageLoadTask.task.abort(),this._imageLoadTask=null),this._disposeTextures(),this._vao=r(this._vao)}_disposeTextures(){this._passParameters.mask=r(this._passParameters.mask),this._passParameters.overlay=r(this._passParameters.overlay),this._passParameters.input=r(this._passParameters.input)}precompile(){this._imageSources&&this.techniques.precompile(g)}render(e){const s=this._validMagnifier,r=e.find((({name:e})=>e===c.MAGNIFIER));if(null==s)return r;if(null==this._imageSources)return this.requestRender(d.UPDATE),r;const t=this.renderingContext,a=this.camera.pixelRatio,o=Math.ceil(a*s.size);this._vao??=v(t,P.Pos2,f,0,1);const m=this.techniques.get(g);if(this._ensureTextureResources(t,o),!m.compiled||!this._passParameters.input)return this.requestRender(d.UPDATE),r;const l=Math.ceil(1/this._factor*o),h=this._passParameters.input;h.resize(l,l),n(s.position,this._tmpScreenPoint);const p=this.camera.screenToRender(this._tmpScreenPoint,this._tmpRenderPoint),u=this.camera.fullWidth,_=this.camera.fullHeight,T=.5*l,k=.5*l;p[0]=i(p[0],T,u-T-1),p[1]=i(p[1],k,_-k-1);const b=Math.floor(p[0]-T),j=Math.floor(p[1]-k);t.bindFramebuffer(r.fbo);return m.program.bindTexture("textureInput",h),t.gl.copyTexImage2D(h.descriptor.target,0,h.descriptor.pixelFormat,b,j,l,l,0),this._passParameters.magnifier=s,t.bindTechnique(m,this.bindParameters,this._passParameters),t.bindVAO(this._vao),t.drawArrays(y.TRIANGLE_STRIP,0,4),r}_loadResources(e){const{maskUrl:i,overlayUrl:r}=e;this._imageLoadTask?.maskUrl===i&&this._imageLoadTask?.overlayUrl===r||(this._imageLoadTask?.task.abort(),this._imageLoadTask=this._imageSources=null),this._imageSources||this._imageLoadTask||(this._imageLoadTask={maskUrl:i,overlayUrl:r,task:s((async e=>{const s=null==i||null==r?k(e):null,t=null!=i?u(i,{signal:e}):s.then((e=>e.mask)),a=null!=r?u(r,{signal:e}):s.then((e=>e.overlay));this._imageSources={mask:await t,overlay:await a}}))})}_ensureTextureResources(e,s){if(null==this._imageSources||this._passParameters.size===s&&this._passParameters.input&&this._passParameters.mask&&this._passParameters.overlay)return;this._disposeTextures(),this._imageSources.overlay.width=this._imageSources.mask.width=s,this._imageSources.overlay.height=this._imageSources.mask.height=s;const i=new S;i.internalFormat=b.RGBA,i.wrapMode=j.CLAMP_TO_EDGE,i.flipped=!0,i.preMultiplyAlpha=!l(this._imageSources.overlay.src)||!e.driverTest.svgPremultipliesAlpha.result,this._passParameters.overlay=new R(e,i,this._imageSources.overlay),i.pixelFormat=i.internalFormat=b.ALPHA,i.preMultiplyAlpha=!1,this._passParameters.mask=new R(e,i,this._imageSources.mask),i.pixelFormat=i.internalFormat=b.RGBA,i.flipped=!1,this._passParameters.input=new R(e,i)}};e([h()],w.prototype,"produces",void 0),e([h()],w.prototype,"consumes",void 0),e([h()],w.prototype,"_imageSources",void 0),e([h()],w.prototype,"_imageLoadTask",void 0),w=e([p("esri.views.3d.webgl-engine.effects.magnifier.Magnifier")],w);export{w as Magnifier};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import{createTask as s}from"../../../../../core/asyncUtils.js";import{clamp as r}from"../../../../../core/mathUtils.js";import{disposeMaybe as i}from"../../../../../core/maybe.js";import{watch as t,syncAndInitial as a}from"../../../../../core/reactiveUtils.js";import{createScreenPointArray as o,createRenderScreenPointArray as m,screenPointObjectToArray as n}from"../../../../../core/screenUtils.js";import{isSVG as h}from"../../../../../core/urlUtils.js";import{property as l}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as p}from"../../../../../core/accessorSupport/decorators/subclass.js";import{requestImage as u}from"../../../../../support/requestImageUtils.js";import{InternalRenderCategory as c}from"../../../webgl.js";import _ from"../../../webgl/RenderNode.js";import{MagnifierTechnique as g}from"./MagnifierTechnique.js";import{RenderRequestType as d}from"../../lib/basicInterfaces.js";import{Default3D as f}from"../../lib/DefaultVertexAttributeLocations.js";import{createQuadVAO as T,Layout as v}from"../../lib/glUtil3D.js";import{M as P}from"../../../../../chunks/Magnifier.glsl.js";import{loadMagnifierResources as k}from"../../../../magnifier/resources.js";import{PrimitiveType as b,PixelFormat as y,TextureWrapMode as j}from"../../../../webgl/enums.js";import{Texture as x}from"../../../../webgl/Texture.js";import{TextureDescriptor as R}from"../../../../webgl/TextureDescriptor.js";let S=class extends _{constructor(){super(...arguments),this.produces=c.MAGNIFIER,this.consumes={required:[c.MAGNIFIER]},this._imageSources=null,this._imageLoadTask=null,this._passParameters=new P,this._vao=null,this._magnifier=null,this._tmpScreenPoint=o(),this._tmpRenderPoint=m()}initialize(){this.addHandles([t((()=>this.view.magnifier),(e=>this._update(e)),a)])}_update(e){if(e===this._magnifier)return;this.removeAllHandles(),this._magnifier=e;const s=()=>{const e=this._validMagnifier;e?(this._loadResources(e),this.produces=c.MAGNIFIER):this.produces="disabled",this.requestRender()};this._magnifier&&this.addHandles(t((()=>this._magnifier?.version),s)),s()}get _validMagnifier(){return this._magnifier?.visible&&this._magnifier?.position&&this._magnifier?.size>0?this._magnifier:null}get _factor(){return this._magnifier?.factor||1}destroy(){this._magnifier=null,null!=this._imageLoadTask&&(this._imageLoadTask.task.abort(),this._imageLoadTask=null),this._disposeTextures(),this._vao=i(this._vao)}_disposeTextures(){this._passParameters.mask=i(this._passParameters.mask),this._passParameters.overlay=i(this._passParameters.overlay),this._passParameters.input=i(this._passParameters.input)}precompile(){this._imageSources&&this.techniques.precompile(g)}render(e){const s=this._validMagnifier,i=e.find((({name:e})=>e===c.MAGNIFIER));if(null==s)return i;if(null==this._imageSources)return this.requestRender(d.UPDATE),i;const t=this.renderingContext,a=this.camera.pixelRatio,o=Math.ceil(a*s.size);this._vao??=T(t,v.Pos2,f,0,1);const m=this.techniques.get(g);if(this._ensureTextureResources(t,o),!m.compiled||!this._passParameters.input)return this.requestRender(d.UPDATE),i;const h=Math.ceil(1/this._factor*o),l=this._passParameters.input;l.resize(h,h),n(s.position,this._tmpScreenPoint);const p=this.camera.screenToRender(this._tmpScreenPoint,this._tmpRenderPoint),u=this.camera.fullWidth,_=this.camera.fullHeight,P=.5*h,k=.5*h;p[0]=r(p[0],P,u-P-1),p[1]=r(p[1],k,_-k-1);const y=Math.floor(p[0]-P),j=Math.floor(p[1]-k);t.bindFramebuffer(i.fbo);return m.program.bindTexture("textureInput",l),t.gl.copyTexImage2D(l.descriptor.target,0,l.descriptor.pixelFormat,y,j,h,h,0),this._passParameters.magnifier=s,t.bindTechnique(m,this.bindParameters,this._passParameters),t.bindVAO(this._vao),t.drawArrays(b.TRIANGLE_STRIP,0,4),i}_loadResources(e){const{maskUrl:r,overlayUrl:i}=e;this._imageLoadTask?.maskUrl===r&&this._imageLoadTask?.overlayUrl===i||(this._imageLoadTask?.task.abort(),this._imageLoadTask=this._imageSources=null),this._imageSources||this._imageLoadTask||(this._imageLoadTask={maskUrl:r,overlayUrl:i,task:s((async e=>{const s=null==r||null==i?k(e):null,t=null!=r?u(r,{signal:e}):s.then((e=>e.mask)),a=null!=i?u(i,{signal:e}):s.then((e=>e.overlay));this._imageSources={mask:await t,overlay:await a}}))})}_ensureTextureResources(e,s){null==this._imageSources||this._passParameters.size===s&&this._passParameters.input&&this._passParameters.mask&&this._passParameters.overlay||(this._disposeTextures(),this._imageSources.overlay.width=this._imageSources.mask.width=s,this._imageSources.overlay.height=this._imageSources.mask.height=s,this._passParameters.overlay=new x(e,this._createTextureDescriptor(s,y.RGBA,this._imageSources.overlay),this._imageSources.overlay),this._passParameters.mask=new x(e,this._createTextureDescriptor(s,y.ALPHA,this._imageSources.mask),this._imageSources.mask),this._passParameters.input=new x(e,this._createTextureDescriptor(s,y.RGBA,null)))}_createTextureDescriptor(e,s,r){const i=this.renderingContext,t=new R(e,e);return t.pixelFormat=t.internalFormat=s,t.wrapMode=j.CLAMP_TO_EDGE,t.flipped=!!r,t.preMultiplyAlpha=!(s!==y.RGBA||!r||h(r.src)&&i.driverTest.svgPremultipliesAlpha.result),t}};e([l()],S.prototype,"produces",void 0),e([l()],S.prototype,"consumes",void 0),e([l()],S.prototype,"_imageSources",void 0),e([l()],S.prototype,"_imageLoadTask",void 0),S=e([p("esri.views.3d.webgl-engine.effects.magnifier.Magnifier")],S);export{S as Magnifier};
@@ -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{generateUID as e}from"../../../../core/uid.js";import{ShaderOutput as r}from"../core/shaderLibrary/ShaderOutput.js";import{Default3D as t}from"./DefaultVertexAttributeLocations.js";import{DefaultTechniqueConfiguration as i}from"../materials/DefaultTechniqueConfiguration.js";import{updateParameters as s}from"../materials/internal/MaterialUtil.js";import{NoParameters as a}from"../../../webgl/NoParameters.js";class n{constructor(r,i){this.id=e(),this.supportsEdges=!1,this.vertexAttributeLocations=t,this._renderPriority=0,this._parameters=new i,s(this._parameters,r),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,r=!0){s(this._parameters,e)&&(this.validateParameters(this._parameters),r&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&0!==(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}queryRenderOccludedState(e){return this.visible&&this.parameters.renderOccluded===e}get hasEmissions(){return!1}getConfiguration(e,t,s=new i){return s.output=e,s.hasHighlightMixTexture=e===r.Highlight&&null!=t.highlightMixTexture,s}}var o;!function(e){e[e.None=0]="None",e[e.Occlude=1]="Occlude",e[e.Transparent=2]="Transparent",e[e.OccludeAndTransparent=4]="OccludeAndTransparent",e[e.OccludeAndTransparentStencil=8]="OccludeAndTransparentStencil",e[e.Opaque=16]="Opaque"}(o||(o={}));class u extends a{constructor(){super(...arguments),this.renderOccluded=o.Occlude,this.isDecoration=!1}}export{n as Material,u as MaterialParameters,o as RenderOccludedFlag};
5
+ import{generateUID as e}from"../../../../core/uid.js";import{ShaderOutput as r}from"../core/shaderLibrary/ShaderOutput.js";import{Default3D as t}from"./DefaultVertexAttributeLocations.js";import{DefaultTechniqueConfiguration as i}from"../materials/DefaultTechniqueConfiguration.js";import{updateParameters as s}from"../materials/internal/MaterialUtil.js";import{NoParameters as a}from"../../../webgl/NoParameters.js";class n{constructor(r,i){this.id=e(),this.supportsEdges=!1,this.vertexAttributeLocations=t,this._renderPriority=0,this._parameters=new i,s(this._parameters,r),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,r=!0){s(this._parameters,e)&&(this.validateParameters(this._parameters),r&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&0!==(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:o.None}get hasEmissions(){return!1}getConfiguration(e,t,s=new i){return s.output=e,s.hasHighlightMixTexture=e===r.Highlight&&null!=t.highlightMixTexture,s}}var o;!function(e){e[e.None=0]="None",e[e.Occlude=1]="Occlude",e[e.Transparent=2]="Transparent",e[e.OccludeAndTransparent=4]="OccludeAndTransparent",e[e.OccludeAndTransparentStencil=8]="OccludeAndTransparentStencil",e[e.Opaque=16]="Opaque"}(o||(o={}));class d extends a{constructor(){super(...arguments),this.renderOccluded=o.Occlude,this.isDecoration=!1}}export{n as Material,d as MaterialParameters,o as RenderOccludedFlag};