@arcgis/core 4.34.0-next.87 → 4.34.0-next.89

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 (504) hide show
  1. package/PopupTemplate.js +1 -1
  2. package/arcade/Dictionary.js +1 -1
  3. package/arcade/Feature.js +1 -1
  4. package/arcade/Pixel.js +1 -1
  5. package/arcade/Voxel.js +1 -1
  6. package/arcade/containerUtils.js +1 -1
  7. package/arcade/featureSetUtils.js +1 -1
  8. package/arcade/featureset/actions/GroupBy.js +1 -1
  9. package/arcade/featureset/actions/OrderBy.js +1 -1
  10. package/arcade/featureset/support/FeatureSet.js +1 -1
  11. package/arcade/functions/date.js +1 -1
  12. package/arcade/functions/feature.js +1 -1
  13. package/arcade/functions/featuresetbase.js +1 -1
  14. package/arcade/functions/featuresetstats.js +1 -1
  15. package/arcade/functions/featuresetstring.js +1 -1
  16. package/arcade/functions/fieldStats.js +1 -1
  17. package/arcade/functions/geometry.js +1 -1
  18. package/arcade/functions/maths.js +1 -1
  19. package/arcade/functions/string.js +1 -1
  20. package/arcade/languageUtils.js +1 -1
  21. package/assets/components/assets/accordion-item/t9n/messages.ar.json +1 -1
  22. package/assets/components/assets/accordion-item/t9n/messages.bg.json +1 -1
  23. package/assets/components/assets/accordion-item/t9n/messages.bs.json +1 -1
  24. package/assets/components/assets/accordion-item/t9n/messages.ca.json +1 -1
  25. package/assets/components/assets/accordion-item/t9n/messages.cs.json +1 -1
  26. package/assets/components/assets/accordion-item/t9n/messages.da.json +1 -1
  27. package/assets/components/assets/accordion-item/t9n/messages.de.json +1 -1
  28. package/assets/components/assets/accordion-item/t9n/messages.el.json +1 -1
  29. package/assets/components/assets/accordion-item/t9n/messages.es.json +1 -1
  30. package/assets/components/assets/accordion-item/t9n/messages.et.json +1 -1
  31. package/assets/components/assets/accordion-item/t9n/messages.fi.json +1 -1
  32. package/assets/components/assets/accordion-item/t9n/messages.fr.json +1 -1
  33. package/assets/components/assets/accordion-item/t9n/messages.he.json +1 -1
  34. package/assets/components/assets/accordion-item/t9n/messages.hr.json +1 -1
  35. package/assets/components/assets/accordion-item/t9n/messages.hu.json +1 -1
  36. package/assets/components/assets/accordion-item/t9n/messages.id.json +1 -1
  37. package/assets/components/assets/accordion-item/t9n/messages.it.json +1 -1
  38. package/assets/components/assets/accordion-item/t9n/messages.ja.json +1 -1
  39. package/assets/components/assets/accordion-item/t9n/messages.ko.json +1 -1
  40. package/assets/components/assets/accordion-item/t9n/messages.lt.json +1 -1
  41. package/assets/components/assets/accordion-item/t9n/messages.lv.json +1 -1
  42. package/assets/components/assets/accordion-item/t9n/messages.nl.json +1 -1
  43. package/assets/components/assets/accordion-item/t9n/messages.no.json +1 -1
  44. package/assets/components/assets/accordion-item/t9n/messages.pl.json +1 -1
  45. package/assets/components/assets/accordion-item/t9n/messages.pt-BR.json +1 -1
  46. package/assets/components/assets/accordion-item/t9n/messages.pt-PT.json +1 -1
  47. package/assets/components/assets/accordion-item/t9n/messages.ro.json +1 -1
  48. package/assets/components/assets/accordion-item/t9n/messages.ru.json +1 -1
  49. package/assets/components/assets/accordion-item/t9n/messages.sk.json +1 -1
  50. package/assets/components/assets/accordion-item/t9n/messages.sl.json +1 -1
  51. package/assets/components/assets/accordion-item/t9n/messages.sr.json +1 -1
  52. package/assets/components/assets/accordion-item/t9n/messages.sv.json +1 -1
  53. package/assets/components/assets/accordion-item/t9n/messages.th.json +1 -1
  54. package/assets/components/assets/accordion-item/t9n/messages.tr.json +1 -1
  55. package/assets/components/assets/accordion-item/t9n/messages.uk.json +1 -1
  56. package/assets/components/assets/accordion-item/t9n/messages.vi.json +1 -1
  57. package/assets/components/assets/accordion-item/t9n/messages.zh-CN.json +1 -1
  58. package/assets/components/assets/accordion-item/t9n/messages.zh-HK.json +1 -1
  59. package/assets/components/assets/accordion-item/t9n/messages.zh-TW.json +1 -1
  60. package/assets/components/assets/action-bar/t9n/messages.ar.json +1 -1
  61. package/assets/components/assets/action-bar/t9n/messages.bg.json +1 -1
  62. package/assets/components/assets/action-bar/t9n/messages.bs.json +1 -1
  63. package/assets/components/assets/action-bar/t9n/messages.ca.json +1 -1
  64. package/assets/components/assets/action-bar/t9n/messages.cs.json +1 -1
  65. package/assets/components/assets/action-bar/t9n/messages.da.json +1 -1
  66. package/assets/components/assets/action-bar/t9n/messages.de.json +1 -1
  67. package/assets/components/assets/action-bar/t9n/messages.el.json +1 -1
  68. package/assets/components/assets/action-bar/t9n/messages.es.json +1 -1
  69. package/assets/components/assets/action-bar/t9n/messages.et.json +1 -1
  70. package/assets/components/assets/action-bar/t9n/messages.fi.json +1 -1
  71. package/assets/components/assets/action-bar/t9n/messages.fr.json +1 -1
  72. package/assets/components/assets/action-bar/t9n/messages.he.json +1 -1
  73. package/assets/components/assets/action-bar/t9n/messages.hr.json +1 -1
  74. package/assets/components/assets/action-bar/t9n/messages.hu.json +1 -1
  75. package/assets/components/assets/action-bar/t9n/messages.id.json +1 -1
  76. package/assets/components/assets/action-bar/t9n/messages.it.json +1 -1
  77. package/assets/components/assets/action-bar/t9n/messages.ja.json +1 -1
  78. package/assets/components/assets/action-bar/t9n/messages.ko.json +1 -1
  79. package/assets/components/assets/action-bar/t9n/messages.lt.json +1 -1
  80. package/assets/components/assets/action-bar/t9n/messages.lv.json +1 -1
  81. package/assets/components/assets/action-bar/t9n/messages.nl.json +1 -1
  82. package/assets/components/assets/action-bar/t9n/messages.no.json +1 -1
  83. package/assets/components/assets/action-bar/t9n/messages.pl.json +1 -1
  84. package/assets/components/assets/action-bar/t9n/messages.pt-BR.json +1 -1
  85. package/assets/components/assets/action-bar/t9n/messages.pt-PT.json +1 -1
  86. package/assets/components/assets/action-bar/t9n/messages.ro.json +1 -1
  87. package/assets/components/assets/action-bar/t9n/messages.ru.json +1 -1
  88. package/assets/components/assets/action-bar/t9n/messages.sk.json +1 -1
  89. package/assets/components/assets/action-bar/t9n/messages.sl.json +1 -1
  90. package/assets/components/assets/action-bar/t9n/messages.sr.json +1 -1
  91. package/assets/components/assets/action-bar/t9n/messages.sv.json +1 -1
  92. package/assets/components/assets/action-bar/t9n/messages.th.json +1 -1
  93. package/assets/components/assets/action-bar/t9n/messages.tr.json +1 -1
  94. package/assets/components/assets/action-bar/t9n/messages.uk.json +1 -1
  95. package/assets/components/assets/action-bar/t9n/messages.vi.json +1 -1
  96. package/assets/components/assets/action-bar/t9n/messages.zh-CN.json +1 -1
  97. package/assets/components/assets/action-bar/t9n/messages.zh-HK.json +1 -1
  98. package/assets/components/assets/action-bar/t9n/messages.zh-TW.json +1 -1
  99. package/assets/components/assets/action-pad/t9n/messages.ar.json +1 -1
  100. package/assets/components/assets/action-pad/t9n/messages.bg.json +1 -1
  101. package/assets/components/assets/action-pad/t9n/messages.bs.json +1 -1
  102. package/assets/components/assets/action-pad/t9n/messages.ca.json +1 -1
  103. package/assets/components/assets/action-pad/t9n/messages.cs.json +1 -1
  104. package/assets/components/assets/action-pad/t9n/messages.da.json +1 -1
  105. package/assets/components/assets/action-pad/t9n/messages.de.json +1 -1
  106. package/assets/components/assets/action-pad/t9n/messages.el.json +1 -1
  107. package/assets/components/assets/action-pad/t9n/messages.es.json +1 -1
  108. package/assets/components/assets/action-pad/t9n/messages.et.json +1 -1
  109. package/assets/components/assets/action-pad/t9n/messages.fi.json +1 -1
  110. package/assets/components/assets/action-pad/t9n/messages.fr.json +1 -1
  111. package/assets/components/assets/action-pad/t9n/messages.he.json +1 -1
  112. package/assets/components/assets/action-pad/t9n/messages.hr.json +1 -1
  113. package/assets/components/assets/action-pad/t9n/messages.hu.json +1 -1
  114. package/assets/components/assets/action-pad/t9n/messages.id.json +1 -1
  115. package/assets/components/assets/action-pad/t9n/messages.it.json +1 -1
  116. package/assets/components/assets/action-pad/t9n/messages.ja.json +1 -1
  117. package/assets/components/assets/action-pad/t9n/messages.ko.json +1 -1
  118. package/assets/components/assets/action-pad/t9n/messages.lt.json +1 -1
  119. package/assets/components/assets/action-pad/t9n/messages.lv.json +1 -1
  120. package/assets/components/assets/action-pad/t9n/messages.nl.json +1 -1
  121. package/assets/components/assets/action-pad/t9n/messages.no.json +1 -1
  122. package/assets/components/assets/action-pad/t9n/messages.pl.json +1 -1
  123. package/assets/components/assets/action-pad/t9n/messages.pt-BR.json +1 -1
  124. package/assets/components/assets/action-pad/t9n/messages.pt-PT.json +1 -1
  125. package/assets/components/assets/action-pad/t9n/messages.ro.json +1 -1
  126. package/assets/components/assets/action-pad/t9n/messages.ru.json +1 -1
  127. package/assets/components/assets/action-pad/t9n/messages.sk.json +1 -1
  128. package/assets/components/assets/action-pad/t9n/messages.sl.json +1 -1
  129. package/assets/components/assets/action-pad/t9n/messages.sr.json +1 -1
  130. package/assets/components/assets/action-pad/t9n/messages.sv.json +1 -1
  131. package/assets/components/assets/action-pad/t9n/messages.th.json +1 -1
  132. package/assets/components/assets/action-pad/t9n/messages.tr.json +1 -1
  133. package/assets/components/assets/action-pad/t9n/messages.uk.json +1 -1
  134. package/assets/components/assets/action-pad/t9n/messages.vi.json +1 -1
  135. package/assets/components/assets/action-pad/t9n/messages.zh-CN.json +1 -1
  136. package/assets/components/assets/action-pad/t9n/messages.zh-HK.json +1 -1
  137. package/assets/components/assets/action-pad/t9n/messages.zh-TW.json +1 -1
  138. package/assets/components/assets/icon/layer3D16.json +1 -0
  139. package/assets/components/assets/icon/layer3D24.json +1 -0
  140. package/assets/components/assets/icon/layer3D32.json +1 -0
  141. package/assets/components/assets/sort-handle/t9n/messages.ar.json +1 -1
  142. package/assets/components/assets/sort-handle/t9n/messages.bg.json +1 -1
  143. package/assets/components/assets/sort-handle/t9n/messages.bs.json +1 -1
  144. package/assets/components/assets/sort-handle/t9n/messages.ca.json +1 -1
  145. package/assets/components/assets/sort-handle/t9n/messages.cs.json +1 -1
  146. package/assets/components/assets/sort-handle/t9n/messages.da.json +1 -1
  147. package/assets/components/assets/sort-handle/t9n/messages.de.json +1 -1
  148. package/assets/components/assets/sort-handle/t9n/messages.el.json +1 -1
  149. package/assets/components/assets/sort-handle/t9n/messages.es.json +1 -1
  150. package/assets/components/assets/sort-handle/t9n/messages.et.json +1 -1
  151. package/assets/components/assets/sort-handle/t9n/messages.fi.json +1 -1
  152. package/assets/components/assets/sort-handle/t9n/messages.fr.json +1 -1
  153. package/assets/components/assets/sort-handle/t9n/messages.he.json +1 -1
  154. package/assets/components/assets/sort-handle/t9n/messages.hr.json +1 -1
  155. package/assets/components/assets/sort-handle/t9n/messages.hu.json +1 -1
  156. package/assets/components/assets/sort-handle/t9n/messages.id.json +1 -1
  157. package/assets/components/assets/sort-handle/t9n/messages.it.json +1 -1
  158. package/assets/components/assets/sort-handle/t9n/messages.ja.json +1 -1
  159. package/assets/components/assets/sort-handle/t9n/messages.ko.json +1 -1
  160. package/assets/components/assets/sort-handle/t9n/messages.lt.json +1 -1
  161. package/assets/components/assets/sort-handle/t9n/messages.lv.json +1 -1
  162. package/assets/components/assets/sort-handle/t9n/messages.nl.json +1 -1
  163. package/assets/components/assets/sort-handle/t9n/messages.no.json +1 -1
  164. package/assets/components/assets/sort-handle/t9n/messages.pl.json +1 -1
  165. package/assets/components/assets/sort-handle/t9n/messages.pt-BR.json +1 -1
  166. package/assets/components/assets/sort-handle/t9n/messages.pt-PT.json +1 -1
  167. package/assets/components/assets/sort-handle/t9n/messages.ro.json +1 -1
  168. package/assets/components/assets/sort-handle/t9n/messages.ru.json +1 -1
  169. package/assets/components/assets/sort-handle/t9n/messages.sk.json +1 -1
  170. package/assets/components/assets/sort-handle/t9n/messages.sl.json +1 -1
  171. package/assets/components/assets/sort-handle/t9n/messages.sr.json +1 -1
  172. package/assets/components/assets/sort-handle/t9n/messages.sv.json +1 -1
  173. package/assets/components/assets/sort-handle/t9n/messages.th.json +1 -1
  174. package/assets/components/assets/sort-handle/t9n/messages.tr.json +1 -1
  175. package/assets/components/assets/sort-handle/t9n/messages.uk.json +1 -1
  176. package/assets/components/assets/sort-handle/t9n/messages.vi.json +1 -1
  177. package/assets/components/assets/sort-handle/t9n/messages.zh-CN.json +1 -1
  178. package/assets/components/assets/sort-handle/t9n/messages.zh-HK.json +1 -1
  179. package/assets/components/assets/sort-handle/t9n/messages.zh-TW.json +1 -1
  180. package/assets/esri/core/workers/RemoteClient.js +1 -1
  181. package/assets/esri/core/workers/chunks/{ed8863c3d334f438b625.js → 0037abf0a82d1ed32e91.js} +1 -1
  182. package/assets/esri/core/workers/chunks/{c6d4b8d683a34fc0d111.js → 0103b70126bc5dffc55e.js} +1 -1
  183. package/assets/esri/core/workers/chunks/{d7fc8ea2ff527a09f4b9.js → 0296ebe8e37e30af771c.js} +1 -1
  184. package/assets/esri/core/workers/chunks/{39a1f361bb69073af765.js → 04dbdaa63c950f32b8f0.js} +1 -1
  185. package/assets/esri/core/workers/chunks/05aac984cbbadb5f6aa0.js +1 -0
  186. package/assets/esri/core/workers/chunks/0fadd1defbb6743dacdc.js +1 -0
  187. package/assets/esri/core/workers/chunks/{0f05425954578ac796ec.js → 135142f3cbfaf24949bc.js} +1 -1
  188. package/assets/esri/core/workers/chunks/24921d31efa8d222ad2d.js +2 -0
  189. package/assets/esri/core/workers/chunks/{268f5b233640a9dbbf89.js.LICENSE.txt → 24921d31efa8d222ad2d.js.LICENSE.txt} +1 -1
  190. package/assets/esri/core/workers/chunks/2b2f1fcd50dea017d891.js +1 -0
  191. package/assets/esri/core/workers/chunks/2e1cc11462846febb3b2.js +1 -0
  192. package/assets/esri/core/workers/chunks/300b96f0f8e34b4a5d8b.js +1 -0
  193. package/assets/esri/core/workers/chunks/37b5007660535f1c91c6.js +1 -0
  194. package/assets/esri/core/workers/chunks/{2dc88379ee94fabdaf52.js → 39a5863355cccaabd2d6.js} +1 -1
  195. package/assets/esri/core/workers/chunks/3a457e718a901a45902e.js +2 -0
  196. package/assets/esri/core/workers/chunks/{47e4f66c33bb697fbe6b.js.LICENSE.txt → 3a457e718a901a45902e.js.LICENSE.txt} +1 -1
  197. package/assets/esri/core/workers/chunks/{f3ee035fa7bf638c8e60.js → 3d68a650a1f944ec5171.js} +1 -1
  198. package/assets/esri/core/workers/chunks/46ef545d2b3b3f4e6d32.js +2 -0
  199. package/assets/esri/core/workers/chunks/{336b54144afec0c7d396.js.LICENSE.txt → 46ef545d2b3b3f4e6d32.js.LICENSE.txt} +1 -1
  200. package/assets/esri/core/workers/chunks/47c0c16c1e995a441ec2.js +1 -0
  201. package/assets/esri/core/workers/chunks/48913b944c28343816ac.js +1 -0
  202. package/assets/esri/core/workers/chunks/{4d4db6854aff7656f6e1.js → 4dd4b19c410026233999.js} +1 -1
  203. package/assets/esri/core/workers/chunks/4e77b9cc1d9437bcbb0c.js +1 -0
  204. package/assets/esri/core/workers/chunks/52121179d4f9833008ec.js +1 -0
  205. package/assets/esri/core/workers/chunks/58e2652810143f509fe1.js +1 -0
  206. package/assets/esri/core/workers/chunks/{97489bf16a1d327992b2.js → 595593dd03bcfba795c8.js} +11 -16
  207. package/assets/esri/core/workers/chunks/59e27818cb68f0285d54.js +1 -0
  208. package/assets/esri/core/workers/chunks/620a94b54be3ed78350d.js +1 -0
  209. package/assets/esri/core/workers/chunks/67d9cfe02613cb73ee37.js.LICENSE.txt +1 -1
  210. package/assets/esri/core/workers/chunks/6f29951f5a2da068b257.js +1 -0
  211. package/assets/esri/core/workers/chunks/71c6c0b26253c4ca1b68.js +1 -0
  212. package/assets/esri/core/workers/chunks/{1c1b0cc91fe9cb3fec61.js → 71df48968d6cdc736458.js} +1 -1
  213. package/assets/esri/core/workers/chunks/773d106f60f7dad1493d.js +1 -0
  214. package/assets/esri/core/workers/chunks/779ee975efebb838b5d6.js +1 -0
  215. package/assets/esri/core/workers/chunks/7a240ab31d9ff2d2c5af.js +1 -0
  216. package/assets/esri/core/workers/chunks/834985ec601623df34a1.js +1 -0
  217. package/assets/esri/core/workers/chunks/{5dee8c0c60ced791e57f.js → 84a556dafd583635ad5e.js} +1 -1
  218. package/assets/esri/core/workers/chunks/8be9fa12e854a83062c3.js +1 -0
  219. package/assets/esri/core/workers/chunks/8f4cfef97716c3502b0f.js +1 -0
  220. package/assets/esri/core/workers/chunks/{65ec21d29e8563fdbc55.js → 94c9d3094c93f7760433.js} +1 -1
  221. package/assets/esri/core/workers/chunks/{177840d5f0076c0de46b.js → 96de78f9994207aa7201.js} +1 -1
  222. package/assets/esri/core/workers/chunks/{366db86914a63e6d0c68.js → 978ffde9ebebf5c83aea.js} +1 -1
  223. package/assets/esri/core/workers/chunks/a1abe9865d66789bd5af.js +1 -0
  224. package/assets/esri/core/workers/chunks/{47e4f66c33bb697fbe6b.js → a8f998b8ec8c56150479.js} +2 -2
  225. package/assets/esri/core/workers/chunks/{f6e18668f728dfd8ba5e.js.LICENSE.txt → a8f998b8ec8c56150479.js.LICENSE.txt} +1 -1
  226. package/assets/esri/core/workers/chunks/{257fd65786feb5951b90.js → a96e58ed9a4a2329ee53.js} +1 -1
  227. package/assets/esri/core/workers/chunks/{0074f1836d7ff69ff6ec.js → aa778e5d7db40d9b9b4a.js} +1 -1
  228. package/assets/esri/core/workers/chunks/aa78b69219d9a0ef1c54.js.LICENSE.txt +1 -1
  229. package/assets/esri/core/workers/chunks/{c78de6dd6c10280cee69.js → baa48614d9567d5f240d.js} +1 -1
  230. package/assets/esri/core/workers/chunks/c1d75c48558ed23c5b2b.js +1 -0
  231. package/assets/esri/core/workers/chunks/c3010d783506f8410f99.js +1 -0
  232. package/assets/esri/core/workers/chunks/c55c096669677321a227.js +1 -0
  233. package/assets/esri/core/workers/chunks/c86ca87959f04075e834.js +1 -0
  234. package/assets/esri/core/workers/chunks/c954d281038f6bf80232.js +1 -0
  235. package/assets/esri/core/workers/chunks/{c50e8d5f554cf151865c.js → ce16489cf7eb0d78c741.js} +2 -2
  236. package/assets/esri/core/workers/chunks/{c50e8d5f554cf151865c.js.LICENSE.txt → ce16489cf7eb0d78c741.js.LICENSE.txt} +1 -1
  237. package/assets/esri/core/workers/chunks/{a48f980c1531805db73b.js → d1fc2c6e95fe2572d297.js} +1 -1
  238. package/assets/esri/core/workers/chunks/{fc5ac54aab66562c8463.js → d51aabb9b950f49df183.js} +1 -1
  239. package/assets/esri/core/workers/chunks/d6e0528eacee7ea4c1ce.js.LICENSE.txt +1 -1
  240. package/assets/esri/core/workers/chunks/{639d856cd217914dfe1f.js → de34c21d3e6913befe5a.js} +1 -1
  241. package/assets/esri/core/workers/chunks/e99fc64b67bb0c71dc34.js +1 -0
  242. package/assets/esri/core/workers/chunks/f651c05604eab83aef5f.js.LICENSE.txt +1 -1
  243. package/assets/esri/core/workers/chunks/f6806780ca2aa591475a.js +1 -0
  244. package/assets/esri/themes/dark/main.css +1 -1
  245. package/assets/esri/themes/light/main.css +1 -1
  246. package/assets/esri/themes/light/view.css +1 -1
  247. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ar.json +1 -0
  248. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_bg.json +1 -0
  249. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_bs.json +1 -0
  250. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ca.json +1 -0
  251. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_cs.json +1 -0
  252. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_da.json +1 -0
  253. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_de.json +1 -0
  254. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_el.json +1 -0
  255. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_en.json +1 -0
  256. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_es.json +1 -0
  257. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_et.json +1 -0
  258. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_fi.json +1 -0
  259. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_fr.json +1 -0
  260. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_he.json +1 -0
  261. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_hr.json +1 -0
  262. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_hu.json +1 -0
  263. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_id.json +1 -0
  264. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_it.json +1 -0
  265. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ja.json +1 -0
  266. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ko.json +1 -0
  267. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_lt.json +1 -0
  268. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_lv.json +1 -0
  269. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_nl.json +1 -0
  270. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_no.json +1 -0
  271. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pl.json +1 -0
  272. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pt-BR.json +1 -0
  273. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pt-PT.json +1 -0
  274. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ro.json +1 -0
  275. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ru.json +1 -0
  276. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sk.json +1 -0
  277. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sl.json +1 -0
  278. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sr.json +1 -0
  279. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sv.json +1 -0
  280. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_th.json +1 -0
  281. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_tr.json +1 -0
  282. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_uk.json +1 -0
  283. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_vi.json +1 -0
  284. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-CN.json +1 -0
  285. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-HK.json +1 -0
  286. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-TW.json +1 -0
  287. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  288. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  289. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  290. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  291. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  292. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  293. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  294. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  295. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  296. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  297. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  298. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  299. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  300. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  301. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  302. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  303. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  304. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  305. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  306. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  307. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  308. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  309. package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
  310. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  311. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  312. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  313. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  314. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  315. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  316. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  317. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  318. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  319. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  320. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  321. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  322. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  323. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  324. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  325. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  326. package/chunks/ComponentShader.glsl.js +15 -16
  327. package/chunks/DefaultMaterial.glsl.js +15 -16
  328. package/chunks/Path.glsl.js +12 -12
  329. package/chunks/RealisticTree.glsl.js +5 -6
  330. package/chunks/aiServices.js +1 -1
  331. package/chunks/array.js +1 -1
  332. package/chunks/languageUtils.js +1 -1
  333. package/config.js +1 -1
  334. package/editing/sharedTemplates/SharedTemplate.js +1 -1
  335. package/editing/sharedTemplates/SharedTemplateMetadata.js +1 -1
  336. package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
  337. package/editing/sharedTemplates/templateDefinitions/FeatureTemplateDefinition.js +1 -1
  338. package/editing/sharedTemplates/templateDefinitions/GroupTemplateDefinition.js +1 -1
  339. package/editing/sharedTemplates/templateDefinitions/PresetTemplateDefinition.js +1 -1
  340. package/editing/sharedTemplates/templateDefinitions/TemplateDefinitionBase.js +1 -1
  341. package/editing/sharedTemplates/templateDefinitions/parts/FeatureTemplateRelationshipPart.js +1 -1
  342. package/editing/sharedTemplates/templateDefinitions/parts/PresetTemplatePart.js +1 -1
  343. package/editing/sharedTemplates/templateDefinitions/parts/TemplatePartBase.js +1 -1
  344. package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
  345. package/interfaces.d.ts +106 -47
  346. package/kernel.js +1 -1
  347. package/layers/CSVLayer.js +1 -1
  348. package/layers/FeatureLayer.js +1 -1
  349. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  350. package/layers/OrientedImageryLayer.js +1 -1
  351. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  352. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  353. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  354. package/layers/support/BuildingFieldStatistics.js +5 -0
  355. package/layers/support/BuildingSummaryStatistics.js +1 -1
  356. package/layers/support/ControlPoint.js +5 -0
  357. package/layers/support/ControlPointsGeoreference.js +1 -1
  358. package/layers/support/DateTimeFieldFormat.js +1 -1
  359. package/layers/support/FieldConfiguration.js +1 -1
  360. package/layers/support/FieldFormat.js +1 -1
  361. package/layers/support/NumberFieldFormat.js +1 -1
  362. package/layers/support/Sublayer.js +1 -1
  363. package/layers/support/VideoFrame.js +1 -1
  364. package/layers/support/capabilities.js +1 -1
  365. package/layers/support/fieldConfigUtils.js +1 -1
  366. package/layers/support/fieldFormatUtils.js +5 -0
  367. package/layers/support/mediaUtils.js +1 -1
  368. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  369. package/layers/support/vectorTileLayerLoader.js +1 -1
  370. package/package.json +2 -2
  371. package/popup/FieldInfo.js +1 -1
  372. package/popup/content/FieldsContent.js +1 -1
  373. package/portal/Portal.js +1 -1
  374. package/portal/schemas/definitions.js +1 -1
  375. package/renderers/support/RasterSymbolizer.js +1 -1
  376. package/rest/sharedTemplates/addSharedTemplates.js +5 -0
  377. package/rest/sharedTemplates/querySharedTemplates.js +1 -1
  378. package/rest/sharedTemplates/utils.js +5 -0
  379. package/rest/support/imageMeasureUtils.js +1 -1
  380. package/support/ArcadeExpression.js +1 -1
  381. package/support/revision.js +1 -1
  382. package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
  383. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  384. package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
  385. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  386. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsDiffShader.js +1 -1
  387. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsMinMaxSumShader.js +1 -1
  388. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsStdDevShader.js +1 -1
  389. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsSumOfSquaredDiffShader.js +1 -1
  390. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterColorizerStretchShader.js +1 -1
  391. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/math.js +1 -1
  392. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/stretch.js +1 -1
  393. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
  394. package/views/2d/layers/BaseLayerView2D.js +1 -1
  395. package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
  396. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  397. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  398. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  399. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementConfiguration.js +1 -1
  400. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  401. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  402. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  403. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  404. package/views/3d/environment/CloudsComposition.js +1 -1
  405. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  406. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  407. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  408. package/views/3d/layers/GaussianSplatLayerViewPerformanceInfo.js +5 -0
  409. package/views/3d/layers/I3SMeshView3D.js +1 -1
  410. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  411. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  412. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  413. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  414. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  415. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  416. package/views/3d/layers/support/MediaLayerInteractionOptions.js +1 -1
  417. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  418. package/views/3d/state/ViewState.js +1 -1
  419. package/views/3d/state/ViewStateManager.js +1 -1
  420. package/views/3d/support/QualitySettings.js +1 -1
  421. package/views/3d/support/ResourceController.js +1 -1
  422. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  423. package/views/3d/support/orientedBoundingBox.js +1 -1
  424. package/views/3d/terrain/TerrainRenderer.js +1 -1
  425. package/views/3d/webgl/RenderNode.js +1 -1
  426. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  427. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  428. package/views/3d/webgl-engine/collections/Component/{ComponentObjectElevationAgnosticComponentBVH.js → ComponentObjectElevationAgnosticBVH.js} +1 -1
  429. package/views/3d/webgl-engine/collections/Component/ComponentObjectFixedBVH.js +5 -0
  430. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  431. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  432. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  433. package/views/3d/webgl-engine/collections/Component/ObjectParameters.js +1 -1
  434. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  435. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  436. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  437. package/views/3d/webgl-engine/effects/weather/SnowCover.glsl.js +0 -3
  438. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  439. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  440. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  441. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  442. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  443. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  444. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  445. package/views/GroundView.js +1 -1
  446. package/views/analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js +1 -1
  447. package/views/draw/input/DrawEvents.js +1 -1
  448. package/views/interactive/dragEventPipeline.js +1 -1
  449. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  450. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  451. package/views/layers/ImageryTileLayerView.js +1 -1
  452. package/views/support/Scheduler.js +1 -1
  453. package/widgets/Editor/AddAssociationWorkflowData.js +1 -1
  454. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  455. package/widgets/Editor/EditorViewModel.js +1 -1
  456. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  457. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  458. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  459. package/widgets/Editor/UpdateWorkflow.js +1 -1
  460. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  461. package/widgets/Editor/components/FeatureList.js +1 -1
  462. package/widgets/Editor/workflowUtils.js +1 -1
  463. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  464. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  465. package/widgets/FeatureTable/support/templateUtils.js +1 -1
  466. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  467. package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
  468. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  469. package/widgets/OrientedImageryViewer.js +1 -1
  470. package/widgets/PanoramicVideoViewer.js +5 -0
  471. package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +5 -0
  472. package/widgets/ScaleRangeSlider.js +1 -1
  473. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  474. package/assets/esri/core/workers/chunks/09c2004126f4a5242b85.js +0 -1
  475. package/assets/esri/core/workers/chunks/0dd6b8b3e634bb5f0ca7.js +0 -1
  476. package/assets/esri/core/workers/chunks/0dfc2ca36014910457ef.js +0 -1
  477. package/assets/esri/core/workers/chunks/1c7fffb496af6f2540dd.js +0 -1
  478. package/assets/esri/core/workers/chunks/1fc6311d4f0d27e88737.js +0 -1
  479. package/assets/esri/core/workers/chunks/268f5b233640a9dbbf89.js +0 -2
  480. package/assets/esri/core/workers/chunks/2fe96bf7dedef11a3b63.js +0 -1
  481. package/assets/esri/core/workers/chunks/336b54144afec0c7d396.js +0 -2
  482. package/assets/esri/core/workers/chunks/36a006c55766f9540bfc.js +0 -1
  483. package/assets/esri/core/workers/chunks/4840bd93d8fe15c7aefd.js +0 -1
  484. package/assets/esri/core/workers/chunks/637a5293e36f4f7f2853.js +0 -1
  485. package/assets/esri/core/workers/chunks/7540b34e743a23e67729.js +0 -1
  486. package/assets/esri/core/workers/chunks/7be11a3ef1f49245089f.js +0 -1
  487. package/assets/esri/core/workers/chunks/804e3b3df375177e6c86.js +0 -1
  488. package/assets/esri/core/workers/chunks/819a8bc1f0a694017ee6.js +0 -1
  489. package/assets/esri/core/workers/chunks/88d8ff0140f5ea97c6b7.js +0 -1
  490. package/assets/esri/core/workers/chunks/8de11aab65d91e7f1a4d.js +0 -1
  491. package/assets/esri/core/workers/chunks/96740c75ad65d651cc43.js +0 -1
  492. package/assets/esri/core/workers/chunks/9971de3f38a55735cec9.js +0 -1
  493. package/assets/esri/core/workers/chunks/9e47f680b66320dcfd34.js +0 -1
  494. package/assets/esri/core/workers/chunks/a2652d10bb0bc41c9a8d.js +0 -1
  495. package/assets/esri/core/workers/chunks/a7fcb60d5a9d2d9560e4.js +0 -1
  496. package/assets/esri/core/workers/chunks/aa84775399420e35c6a5.js +0 -1
  497. package/assets/esri/core/workers/chunks/b0508c96338d7cf296c1.js +0 -1
  498. package/assets/esri/core/workers/chunks/b09b34f64a6bc2b49e0a.js +0 -1
  499. package/assets/esri/core/workers/chunks/c0ae186620b68d43b338.js +0 -1
  500. package/assets/esri/core/workers/chunks/cc579c94438f48a0dbab.js +0 -1
  501. package/assets/esri/core/workers/chunks/ce0bf0d0cd9e9a90093b.js +0 -1
  502. package/assets/esri/core/workers/chunks/d142a42755a78bb157ed.js +0 -1
  503. package/assets/esri/core/workers/chunks/f35003a90163847fe1e2.js +0 -1
  504. package/assets/esri/core/workers/chunks/f6e18668f728dfd8ba5e.js +0 -2
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";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 _,fromValues as g}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as f,ZEROS as p}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as m,set as y}from"../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as b}from"../../../geometry/support/buffer/BufferView.js";import{overlayRenderOccludedFlag as T}from"./OverlayRenderer.js";import{PatchRenderData as x}from"./PatchRenderData.js";import{TerrainAttributesCache as v}from"./TerrainAttributesCache.js";import{enableTerrainInternalChecks as R}from"./terrainUtils.js";import{TileRenderer as O}from"./TileRenderer.js";import{IteratorPreorder as P,sortTiles as w,compareTiles as D}from"./tileUtils.js";import{componentMinimalSizeForIntersectionData as S,ComponentIntersectionData as B}from"../webgl-engine/collections/Component/ComponentIntersectionData.js";import{getOverlayContentForOutputTerrain as C}from"../webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{SyncRenderPlugin as E,ConsumesDepth as j,ConsumesNone as F}from"../webgl-engine/effects/RenderPlugin.js";import{Vertices as q}from"../webgl-engine/lib/Attribute.js";import{IntersectorResult as A}from"../webgl-engine/lib/IntersectorResult.js";import{intersectAabbInvDirBefore as k,MeshIntersectionOptions as M,intersectTriangles as N}from"../webgl-engine/lib/RayIntersections.js";import{terrainId as G,getVerticalOffsetTerrain as U}from"../webgl-engine/lib/verticalOffsetUtils.js";import{DrawParameters as z}from"../webgl-engine/materials/DrawParameters.js";import{T as L}from"../../../chunks/Terrain.glsl.js";import{TerrainTechnique as I}from"../webgl-engine/shaders/TerrainTechnique.js";import{TerrainTechniqueConfiguration as V}from"../webgl-engine/shaders/TerrainTechniqueConfiguration.js";import{PrimitiveType as H}from"../../webgl/enums.js";const W=7,Q=10,Z=m();let J=class extends E{get visibleTiles(){return Array.from(this._visiblePatchesByOrigin.values()).flat()}get _isGlobal(){return 1===this._stage.viewingMode}get _techniques(){return this._context.techniques}get _rctx(){return this._context.renderContext.rctx}constructor(e,t,i,n,a){super({}),this._overlayRenderer=e,this._stage=t,this._allTiles=i,this._compressionTracker=n,this.type=7,this.isGround=!0,this._passParameters=new L,this._drawParameters=new z,this._renderDataPool=new s(()=>new x),this._visiblePatchesByOrigin=new Map,this._allPatchesByOrigin=new Map,this._patchesByOriginDirty=!0,this._patchSortingDirty=!0,this._tileIterator=new P,this._castShadows=!1,this._inViewshed=!1,this._cutFillEnabled=!1,this._tileRenderer=null,this._stencilEnabledLayerExtents=new Array,this._numTilesRendered=0,this._numTilesCulled=0,this._numOriginsRendered=0,this.renderOccludedFlags=1,this.produces=new Map([[1,()=>this._produces()&&0===this.transparency],[6,()=>this._produces()&&(1===this.transparency||2===this.transparency)],[9,()=>this._produces()&&this.renderOccludedFlags===T]]),this._tileSize=256,this._configuration=new V(1===t.viewingMode),this._tileTextureCache=new r((e,t)=>a.newCache(e,t),"TileTexture"),this.tileGeometryCache=new v(a)}normalizeCtorArgs(){return{}}initialize(){this._stage.addRenderPlugin(this),this.addHandles(n(()=>this._overlayRenderer.renderOccludedFlags,e=>{this.renderOccludedFlags=e,this.setNeedsRender()},a))}destroy(){this._stage.removeRenderPlugin(this),this._tileTextureCache.destroy(),this.tileGeometryCache.destroy(),this._allTiles.prune(),this._tileRenderer=null}_produces(){return this.visible&&!!this._rootTiles&&!this.renderingDisabled}consumes(){return this._overlayRenderer.hasWater?j:F}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())}get layerViewUid(){return G}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())}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,32)}reuseTextureFromParent(e){const t=e.parent;if(!t)return!1;const i=f(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,32===t?0:2),this.setNeedsRender(),e.resetPendingUpdate(t))}updateTileGeometryState(e){for(const i of e.layerInfo[0])i.pendingUpdates&=-9;e.resetPendingUpdate(8);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=Q-W,i=Math.max(0,Math.floor((e.level-t)/W)*W);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=1){this._patchesByOriginDirty=!0,this._context.requestRender(e)}_setSortingDirty(e=1){this._patchSortingDirty=!0,this._context.requestRender(e)}setNeedsRender(e=1){this._context.requestRender(e)}initializeRenderContext(e){this._context=e,this._tileRenderer=new O(this._rctx,this._tileSize,this._techniques,this._tileTextureCache,this._compressionTracker),this.updateTileBackground()}uninitializeRenderContext(){this._tileRenderer=i(this._tileRenderer)}intersect(e,t,i,r){if(!this._rootTiles||e.options.selectOpaqueTerrainOnly&&e.options.selectionMode&&0!==this.transparency)return;const s=K,n=X;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=0===e.options.store,_=!!e.results.ground.target,g=U(e.verticalOffset),f=e.tolerance;let p,m=u&&null!=a.distance?a.distance:1/0;const T=e.options,x=T.normalRequired||!T.backfacesTerrain,v=new M(!1,x),R=d=>{const _=d.renderData;if(!_?.vao)return;const R=_.geometry;y(Z,R.boundingBox);const O=_.localOrigin;null!=g&&(g.localOrigin=O,g.applyToAabb(Z));const P=Z;if(Y[0]=i[0]-O[0],Y[1]=i[1]-O[1],Y[2]=i[2]-O[2],!k(P,Y,n,f,m))return;const w=(e,t,i)=>{e.set(this.type,d,t,i),m=u&&null!=a.distance?a.distance:1/0},D=(n,c,d)=>{if((!x||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)&&w(l,n,d),T.isFiltered)return;2===T.store&&(null==p?(p=new A(e.ray),w(p,n,d),e.results.all.push(p)):n<p.distance&&w(p,n,d)),(null==a.distance||n<a.distance)&&w(a,n,d),0!==T.store&&(null==o.distance||n>o.distance)&&w(o,n,d)}},C=$;c(C,r,O);const{indices:E,indexCount:j}=R,F=R.vertexAttributes,M=F.getField("position",b),G=new q(M.typedBuffer,3,F.stride/4),U=j/3;if(!g&&U>S){const e=d.renderData;null==e.intersectionData&&(e.intersectionData=new B(E,0,U,G)),e.intersectionData.intersectRay(Y,C,v,D)}else N(Y,C,0,U,E,G,g,v,D)},O=this._rootTiles;if(null!=O){(()=>{const t=this._tileIterator;t.reset(O);const r=e.options.invisibleTerrain;for(let e=t.next();e;e=t.next())!(e.visible||r&&e.intersectsClippingArea)||null==g&&!e.intersectsRay(i,s,f,m)||_&&this._useStencilForTile(e)?t.skipSubtree():R(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;this._inViewshed!==i&&(this._inViewshed=i,this._patchesByOriginDirty=!0);const r=e.bind.cutFillEnabled;if(this._cutFillEnabled!==r&&(this._cutFillEnabled=r,this._patchesByOriginDirty=!0),9===e.bind.slot){if(0===(e.renderOccludedMask&T))return null}else{const t=0===this.transparency?1:6;if(e.bind.slot!==t)return null}if(3===this.transparency)return null;const s=this._configuration;switch(s.screenSpaceReflections=s.cloudReflections=s.receiveShadows=s.receiveAmbientOcclusion=s.renderOccluded=s.hasHighlightMixTexture=!1,s.overlayMode=this._overlayRenderer.mode,e.output){case 0:case 1:{s.screenSpaceReflections=null!=e.bind.ssr.lastFrameColor,s.cloudReflections=null!=e.bind.clouds.data;const t=9===e.bind.slot;return s.receiveShadows=e.bind.shadowMap.ready&&!t,s.renderOccluded=t,s.receiveAmbientOcclusion=!t&&null!=e.bind.ssao,this._acquireTechnique(e.output)}case 4:case 6:return this._castShadows?this._acquireTechnique(4):null;case 7:return this._inViewshed?this._acquireTechnique(7):null;case 8:return this._cutFillEnabled?this._acquireTechnique(8):null;case 2:case 3:return this._acquireTechnique(e.output);case 10:return this._acquireTechnique(10);case 9:return s.hasHighlightMixTexture=null!=e.bind.highlightMixTexture,this._overlayRenderer.hasHighlights?this._acquireTechnique(9):null}return null}render(e,t){switch(this._updatePatchGroups(),t.useStencil=!1,this._passParameters.overlayContent=C(e.output,e.bind),e.output){case 0:case 1:this._renderMaterialPass(e,t);break;case 2:case 3:case 10:this._renderAuxiliaryPass(e,t,this._visiblePatchesByOrigin);break;case 9:{const i=e.bind.highlight?.name;i&&this._overlayRenderer.hasHighlights&&this._overlayRenderer.renders(2)&&this._overlayRenderer.hasHighlight(i)&&this._renderAuxiliaryPass(e,t,this._visiblePatchesByOrigin);break}case 4:case 6:case 7:case 8:this._renderAuxiliaryPass(e,t,this._allPatchesByOrigin)}}updateTileBackground(e){if(null==this._tileRenderer)return;const i=this._tileRenderer;let r;if(null!=e){const i=t.toUnitRGBA(e);r=g(i[0]||0,i[1]||0,i[2]||0)}i.setBackground(r),this._allTiles.forAll(e=>i.updateTileTexture(e,0)),this._configuration.tileBlendInput=i.backgroundIsGrid?2:null!=i.backgroundColor?1:0,this.setNeedsRender()}_updatePatchGroups(){if(this._patchesByOriginDirty&&(this._rebuildPatchGroups(),this._patchesByOriginDirty=!1,this._patchSortingDirty=!0),this._patchSortingDirty){const e=Array.from(this._visiblePatchesByOrigin.values()),t=this._stencilEnabledLayerExtents;for(const i of e)w(i,t);e.sort((e,t)=>D(e[0],t[0])),this._visiblePatchesByOrigin=new Map(e.map(e=>[e[0].renderData.localOrigin,e])),this.notifyChange("visibleTiles"),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||this._cutFillEnabled){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){const{rctx:r,bind:s}=e;r.bindTechnique(t,s,this._passParameters);const n=this._stencilEnabledLayerExtents.length>0;i.forEach(e=>{this._drawParameters.origin=e[0].renderData.localOrigin,t.program.bindDraw(s,this._passParameters,this._drawParameters);for(let i=0;i<e.length;i++)this._renderPatch(r,t,e[i],H.TRIANGLES,n,null===this._passParameters.overlayContent)}),r.bindVAO(null)}_renderMaterialPass(e,t){const{rctx:i,bind:r}=e;i.bindTechnique(t,r,this._passParameters),this._numTilesRendered=0,this._numTilesCulled=0,this._numOriginsRendered=0;const s=t.program,n=this._stencilEnabledLayerExtents.length>0,a=9===r.slot;a&&(s.bindTexture("tex",i.emptyTexture),s.setUniform3fv("textureOpacities",u),s.setUniform4fv("texOffsetAndScale",p));const o=null!=this._tileRenderer?.backgroundColor?this._tileRenderer.backgroundColor:u;1===this._configuration.tileBlendInput&&s.setUniform3fv("backgroundColor",o);const l=this.wireframe?H.LINES:H.TRIANGLES;this._configuration.textureFadingEnabled&&s.bindTexture("texNext",i.emptyTexture);const c=this._visiblePatchesByOrigin;for(const d of c.values()){const e=d[0].renderData.localOrigin;this._drawParameters.origin=e,t.program.bindDraw(r,this._passParameters,this._drawParameters),this._numOriginsRendered++;for(const r of d){const e=r.renderData,o=e.textureReference;if(null!=o){if(!a){s.setUniform4fv("texOffsetAndScale",o.offsetAndScale),s.bindTexture("tex",o.texture.texture);const t=e.textureFadeFactor,i=t<1?e.nextTextureReference:null;this._configuration.textureFadingEnabled&&i&&t<1?(s.setUniform1f("fadeFactor",t),s.setUniform4fv("nextTexOffsetAndScale",i.offsetAndScale),s.setUniform3fv("nextTexOpacities",i.opacities),s.bindTexture("texNext",i.texture.texture)):s.setUniform1f("fadeFactor",1),e.textureIsFading&&this.setNeedsRender(),s.setUniform3fv("textureOpacities",o.opacities)}this._renderPatch(i,t,r,l,n),r.renderOrder=this._numTilesRendered,this._numTilesRendered++}}}i.bindVAO(null)}_renderPatch(e,t,i,r,s,n=!1){const a=i.renderData,o=a.vao,l=o?.indexBuffer;if(!o||null==l)return void(R&&console.error("Rendered tile with no indices: ",i.lij," : ",a));const c=t.program;n||this._overlayRenderer.isEmpty||this._bindOverlayPatchData(c,a.overlay),s&&(t.useStencil=this._useStencilForTile(i),e.setPipelineState(t.getPipeline()));const d=a.geometry.indexCount;e.bindVAO(o),c.assertCompatibleVertexAttributeLocations(o),e.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(I,this._configuration)}get test(){}hasHighlight(e){return this._overlayRenderer.hasHighlight(e)}};e([o({readOnly:!0})],J.prototype,"visibleTiles",null),e([o({readOnly:!0})],J.prototype,"_isGlobal",null),e([o()],J.prototype,"renderOccludedFlags",void 0),e([o({value:!1})],J.prototype,"renderingDisabled",null),e([o({value:!0})],J.prototype,"visible",null),e([o()],J.prototype,"renderPatchBorders",null),e([o()],J.prototype,"visualizeNormals",null),e([o()],J.prototype,"cullBackFaces",null),e([o()],J.prototype,"wireframe",null),J=e([l("esri.views.3d.terrain.TerrainRenderer")],J);const K=_(),X=_(),Y=_(),$=_();export{J as TerrainRenderer};
5
+ import{__decorate as e}from"tslib";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 _,fromValues as g}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as f,ZEROS as p}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as m,set as y}from"../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as b}from"../../../geometry/support/buffer/BufferView.js";import{overlayRenderOccludedFlag as T}from"./OverlayRenderer.js";import{PatchRenderData as x}from"./PatchRenderData.js";import{TerrainAttributesCache as v}from"./TerrainAttributesCache.js";import{enableTerrainInternalChecks as R}from"./terrainUtils.js";import{TileRenderer as O}from"./TileRenderer.js";import{IteratorPreorder as P,sortTiles as w,compareTiles as D}from"./tileUtils.js";import{componentMinimalSizeForIntersectionData as S,ComponentIntersectionData as B}from"../webgl-engine/collections/Component/ComponentIntersectionData.js";import{getOverlayContentForOutputTerrain as C}from"../webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{SyncRenderPlugin as E,ConsumesDepth as j,ConsumesNone as F}from"../webgl-engine/effects/RenderPlugin.js";import{Vertices as q}from"../webgl-engine/lib/Attribute.js";import{IntersectorResult as A}from"../webgl-engine/lib/IntersectorResult.js";import{intersectAabbInvDirBefore as k,MeshIntersectionOptions as M,intersectTriangles as N}from"../webgl-engine/lib/RayIntersections.js";import{terrainId as G,getVerticalOffsetTerrain as U}from"../webgl-engine/lib/verticalOffsetUtils.js";import{DrawParameters as z}from"../webgl-engine/materials/DrawParameters.js";import{T as L}from"../../../chunks/Terrain.glsl.js";import{TerrainTechnique as I}from"../webgl-engine/shaders/TerrainTechnique.js";import{TerrainTechniqueConfiguration as V}from"../webgl-engine/shaders/TerrainTechniqueConfiguration.js";import{PrimitiveType as H}from"../../webgl/enums.js";const W=7,Q=10,Z=m();let J=class extends E{get visibleTiles(){return Array.from(this._visiblePatchesByOrigin.values()).flat()}get _isGlobal(){return 1===this._stage.viewingMode}get _techniques(){return this._context.techniques}get _rctx(){return this._context.renderContext.rctx}constructor(e,t,i,n,a){super({}),this._overlayRenderer=e,this._stage=t,this._allTiles=i,this._compressionTracker=n,this.type=7,this.isGround=!0,this._passParameters=new L,this._drawParameters=new z,this._renderDataPool=new s(()=>new x),this._visiblePatchesByOrigin=new Map,this._allPatchesByOrigin=new Map,this._patchesByOriginDirty=!0,this._patchSortingDirty=!0,this._tileIterator=new P,this._castShadows=!1,this._inViewshed=!1,this._cutFillEnabled=!1,this._tileRenderer=null,this._stencilEnabledLayerExtents=new Array,this._numTilesRendered=0,this._numTilesCulled=0,this._numOriginsRendered=0,this.renderOccludedFlags=1,this.produces=new Map([[1,()=>this._produces()&&0===this.transparency],[6,()=>this._produces()&&(1===this.transparency||2===this.transparency)],[9,()=>this._produces()&&this.renderOccludedFlags===T]]),this._tileSize=256,this._configuration=new V(1===t.viewingMode),this._tileTextureCache=new r((e,t)=>a.newCache(e,t),"TileTexture"),this.tileGeometryCache=new v(a)}normalizeCtorArgs(){return{}}initialize(){this._stage.addRenderPlugin(this),this.addHandles(n(()=>this._overlayRenderer.renderOccludedFlags,e=>{this.renderOccludedFlags=e,this.setNeedsRender()},a))}destroy(){this._stage.removeRenderPlugin(this),this._tileTextureCache.destroy(),this.tileGeometryCache.destroy(),this._allTiles.prune(),this._tileRenderer=null}_produces(){return this.visible&&!!this._rootTiles&&!this.renderingDisabled}consumes(){return this._overlayRenderer.hasWater?j:F}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())}get layerViewUid(){return G}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())}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,32)}reuseTextureFromParent(e){const t=e.parent;if(!t)return!1;const i=f(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,32===t?0:2),this.setNeedsRender(),e.resetPendingUpdate(t))}updateTileGeometryState(e){for(const i of e.layerInfo[0])i.pendingUpdates&=-9;e.resetPendingUpdate(8);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=Q-W,i=Math.max(0,Math.floor((e.level-t)/W)*W);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=1){this._patchesByOriginDirty=!0,this._context.requestRender(e)}_setSortingDirty(e=1){this._patchSortingDirty=!0,this._context.requestRender(e)}setNeedsRender(e=1){this._context.requestRender(e)}initializeRenderContext(e){this._context=e,this._tileRenderer=new O(this._rctx,this._tileSize,this._techniques,this._tileTextureCache,this._compressionTracker),this.updateTileBackground()}uninitializeRenderContext(){this._tileRenderer=i(this._tileRenderer)}intersect(e,t,i,r){if(!this._rootTiles||e.options.selectOpaqueTerrainOnly&&e.options.selectionMode&&0!==this.transparency)return;const s=K,n=X;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=0===e.options.store,_=!!e.results.ground.target,g=U(e.verticalOffset),f=e.tolerance;let p,m=u&&null!=a.distance?a.distance:1/0;const T=e.options,x=T.normalRequired||!T.backfacesTerrain,v=new M(f,!1,x),R=d=>{const _=d.renderData;if(!_?.vao)return;const R=_.geometry;y(Z,R.boundingBox);const O=_.localOrigin;null!=g&&(g.localOrigin=O,g.applyToAabb(Z));const P=Z;if(Y[0]=i[0]-O[0],Y[1]=i[1]-O[1],Y[2]=i[2]-O[2],!k(P,Y,n,f,m))return;const w=(e,t,i)=>{e.set(this.type,d,t,i),m=u&&null!=a.distance?a.distance:1/0},D=(n,c,d)=>{if((!x||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)&&w(l,n,d),T.isFiltered)return;2===T.store&&(null==p?(p=new A(e.ray),w(p,n,d),e.results.all.push(p)):n<p.distance&&w(p,n,d)),(null==a.distance||n<a.distance)&&w(a,n,d),0!==T.store&&(null==o.distance||n>o.distance)&&w(o,n,d)}},C=$;c(C,r,O);const{indices:E,indexCount:j}=R,F=R.vertexAttributes,M=F.getField("position",b),G=new q(M.typedBuffer,3,F.stride/4),U=j/3;if(!g&&U>S){const e=d.renderData;null==e.intersectionData&&(e.intersectionData=new B(E,0,U,G)),e.intersectionData.intersectRay(Y,C,v,D)}else N(Y,C,0,U,E,G,g,v,D)},O=this._rootTiles;if(null!=O){(()=>{const t=this._tileIterator;t.reset(O);const r=e.options.invisibleTerrain;for(let e=t.next();e;e=t.next())!(e.visible||r&&e.intersectsClippingArea)||null==g&&!e.intersectsRay(i,s,f,m)||_&&this._useStencilForTile(e)?t.skipSubtree():R(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;this._inViewshed!==i&&(this._inViewshed=i,this._patchesByOriginDirty=!0);const r=e.bind.cutFillEnabled;if(this._cutFillEnabled!==r&&(this._cutFillEnabled=r,this._patchesByOriginDirty=!0),9===e.bind.slot){if(0===(e.renderOccludedMask&T))return null}else{const t=0===this.transparency?1:6;if(e.bind.slot!==t)return null}if(3===this.transparency)return null;const s=this._configuration;switch(s.screenSpaceReflections=s.cloudReflections=s.receiveShadows=s.receiveAmbientOcclusion=s.renderOccluded=s.hasHighlightMixTexture=!1,s.overlayMode=this._overlayRenderer.mode,e.output){case 0:case 1:{s.screenSpaceReflections=null!=e.bind.ssr.lastFrameColor,s.cloudReflections=null!=e.bind.clouds.data;const t=9===e.bind.slot;return s.receiveShadows=e.bind.shadowMap.ready&&!t,s.renderOccluded=t,s.receiveAmbientOcclusion=!t&&null!=e.bind.ssao,this._acquireTechnique(e.output)}case 4:case 6:return this._castShadows?this._acquireTechnique(4):null;case 7:return this._inViewshed?this._acquireTechnique(7):null;case 8:return this._cutFillEnabled?this._acquireTechnique(8):null;case 2:case 3:return this._acquireTechnique(e.output);case 10:return this._acquireTechnique(10);case 9:return s.hasHighlightMixTexture=null!=e.bind.highlightMixTexture,this._overlayRenderer.hasHighlights?this._acquireTechnique(9):null}return null}render(e,t){switch(this._updatePatchGroups(),t.useStencil=!1,this._passParameters.overlayContent=C(e.output,e.bind),e.output){case 0:case 1:this._renderMaterialPass(e,t);break;case 2:case 3:case 10:this._renderAuxiliaryPass(e,t,this._visiblePatchesByOrigin);break;case 9:{const i=e.bind.highlight?.name;i&&this._overlayRenderer.hasHighlights&&this._overlayRenderer.renders(2)&&this._overlayRenderer.hasHighlight(i)&&this._renderAuxiliaryPass(e,t,this._visiblePatchesByOrigin);break}case 4:case 6:case 7:case 8:this._renderAuxiliaryPass(e,t,this._allPatchesByOrigin)}}updateTileBackground(e){if(null==this._tileRenderer)return;const i=this._tileRenderer;let r;if(null!=e){const i=t.toUnitRGBA(e);r=g(i[0]||0,i[1]||0,i[2]||0)}i.setBackground(r),this._allTiles.forAll(e=>i.updateTileTexture(e,0)),this._configuration.tileBlendInput=i.backgroundIsGrid?2:null!=i.backgroundColor?1:0,this.setNeedsRender()}_updatePatchGroups(){if(this._patchesByOriginDirty&&(this._rebuildPatchGroups(),this._patchesByOriginDirty=!1,this._patchSortingDirty=!0),this._patchSortingDirty){const e=Array.from(this._visiblePatchesByOrigin.values()),t=this._stencilEnabledLayerExtents;for(const i of e)w(i,t);e.sort((e,t)=>D(e[0],t[0])),this._visiblePatchesByOrigin=new Map(e.map(e=>[e[0].renderData.localOrigin,e])),this.notifyChange("visibleTiles"),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||this._cutFillEnabled){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){const{rctx:r,bind:s}=e;r.bindTechnique(t,s,this._passParameters);const n=this._stencilEnabledLayerExtents.length>0;i.forEach(e=>{this._drawParameters.origin=e[0].renderData.localOrigin,t.program.bindDraw(s,this._passParameters,this._drawParameters);for(let i=0;i<e.length;i++)this._renderPatch(r,t,e[i],H.TRIANGLES,n,null===this._passParameters.overlayContent)}),r.bindVAO(null)}_renderMaterialPass(e,t){const{rctx:i,bind:r}=e;i.bindTechnique(t,r,this._passParameters),this._numTilesRendered=0,this._numTilesCulled=0,this._numOriginsRendered=0;const s=t.program,n=this._stencilEnabledLayerExtents.length>0,a=9===r.slot;a&&(s.bindTexture("tex",i.emptyTexture),s.setUniform3fv("textureOpacities",u),s.setUniform4fv("texOffsetAndScale",p));const o=null!=this._tileRenderer?.backgroundColor?this._tileRenderer.backgroundColor:u;1===this._configuration.tileBlendInput&&s.setUniform3fv("backgroundColor",o);const l=this.wireframe?H.LINES:H.TRIANGLES;this._configuration.textureFadingEnabled&&s.bindTexture("texNext",i.emptyTexture);const c=this._visiblePatchesByOrigin;for(const d of c.values()){const e=d[0].renderData.localOrigin;this._drawParameters.origin=e,t.program.bindDraw(r,this._passParameters,this._drawParameters),this._numOriginsRendered++;for(const r of d){const e=r.renderData,o=e.textureReference;if(null!=o){if(!a){s.setUniform4fv("texOffsetAndScale",o.offsetAndScale),s.bindTexture("tex",o.texture.texture);const t=e.textureFadeFactor,i=t<1?e.nextTextureReference:null;this._configuration.textureFadingEnabled&&i&&t<1?(s.setUniform1f("fadeFactor",t),s.setUniform4fv("nextTexOffsetAndScale",i.offsetAndScale),s.setUniform3fv("nextTexOpacities",i.opacities),s.bindTexture("texNext",i.texture.texture)):s.setUniform1f("fadeFactor",1),e.textureIsFading&&this.setNeedsRender(2),s.setUniform3fv("textureOpacities",o.opacities)}this._renderPatch(i,t,r,l,n),r.renderOrder=this._numTilesRendered,this._numTilesRendered++}}}i.bindVAO(null)}_renderPatch(e,t,i,r,s,n=!1){const a=i.renderData,o=a.vao,l=o?.indexBuffer;if(!o||null==l)return void(R&&console.error("Rendered tile with no indices: ",i.lij," : ",a));const c=t.program;n||this._overlayRenderer.isEmpty||this._bindOverlayPatchData(c,a.overlay),s&&(t.useStencil=this._useStencilForTile(i),e.setPipelineState(t.getPipeline()));const d=a.geometry.indexCount;e.bindVAO(o),c.assertCompatibleVertexAttributeLocations(o),e.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(I,this._configuration)}get test(){}hasHighlight(e){return this._overlayRenderer.hasHighlight(e)}};e([o({readOnly:!0})],J.prototype,"visibleTiles",null),e([o({readOnly:!0})],J.prototype,"_isGlobal",null),e([o()],J.prototype,"renderOccludedFlags",void 0),e([o({value:!1})],J.prototype,"renderingDisabled",null),e([o({value:!0})],J.prototype,"visible",null),e([o()],J.prototype,"renderPatchBorders",null),e([o()],J.prototype,"visualizeNormals",null),e([o()],J.prototype,"cullBackFaces",null),e([o()],J.prototype,"wireframe",null),J=e([l("esri.views.3d.terrain.TerrainRenderer")],J);const K=_(),X=_(),Y=_(),$=_();export{J 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.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import r from"../../../core/Accessor.js";import t from"../../../core/Error.js";import{watch as i,initial as n}from"../../../core/reactiveUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{RenderCategory as d}from"../webgl.js";let a=class extends r{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=d.COMPOSITE,this.requireGeometryDepth=!1,this._dirty=!0}initialize(){this.addHandles([i(()=>this.view.ready,e=>{e&&this.view.stage?.renderer.addRenderNode(this)},n)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new t("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const e=this._frameBuffer?.getTexture()?.descriptor,r=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return r.fbo?.initializeAndBind(),r}bindRenderTarget(){return this._frameBuffer?.fbo?.initializeAndBind(),this._frameBuffer}requestRender(e){1===e&&this.view.stage?.renderView.requestRender(e),this._dirty=!0}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find(({name:e})=>e===this.produces);try{return this.render(e)}finally{this._frameBuffer=null}}};e([s({constructOnly:!0})],a.prototype,"view",void 0),e([s({constructOnly:!0})],a.prototype,"consumes",void 0),e([s()],a.prototype,"produces",void 0),e([s({readOnly:!0})],a.prototype,"techniques",null),a=e([o("esri.views.3d.webgl.RenderNode")],a);export{a as default};
5
+ import{__decorate as e}from"tslib";import r from"../../../core/Accessor.js";import"../../../core/has.js";import t from"../../../core/Error.js";import{watch as i,initial as s}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{RenderCategory as d}from"../webgl.js";let a=class extends r{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=d.COMPOSITE,this.requireGeometryDepth=!1,this._dirty=!0}initialize(){this.addHandles([i(()=>this.view.ready,e=>{e&&this.view.stage?.renderer.addRenderNode(this)},s)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new t("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const e=this._frameBuffer?.getTexture()?.descriptor,r=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return r.fbo?.initializeAndBind(),r}bindRenderTarget(){return this._frameBuffer?.fbo?.initializeAndBind(),this._frameBuffer}requestRender(e){switch(e){case 2:this.view.state.fading=!0;case 1:this.view.stage?.renderView.requestRender(e);case 0:case void 0:this._dirty=!0}}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find(({name:e})=>e===this.produces);try{return this.render(e)}finally{this._frameBuffer=null}}};e([n({constructOnly:!0})],a.prototype,"view",void 0),e([n({constructOnly:!0})],a.prototype,"consumes",void 0),e([n()],a.prototype,"produces",void 0),e([n({readOnly:!0})],a.prototype,"techniques",null),a=e([o("esri.views.3d.webgl.RenderNode")],a);export{a as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{destroyMaybe as t}from"../../../../../core/maybe.js";import{i as o,o as e,f as r}from"../../../../../chunks/vec32.js";import{create as s}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as i}from"../../../../../geometry/support/aaBoundingBox.js";class a{constructor(t,o,e,r,s,i){this.transform=t,this.toMapSpace=o,this.obb=e,this.componentData=r,this.renderable=s,this.intersectionGeometry=i,this.visible=!1,this.offsetObb=null,this._aabbInWorldCoordinates=null}destroy(){this.intersectionGeometry=t(this.intersectionGeometry),this.renderable=t(this.renderable),this.componentData=t(this.componentData)}get aabbInWorldCoordinates(){let t=this._aabbInWorldCoordinates;return t||(t=this._computeAabbInWorldCoordinates(),this._aabbInWorldCoordinates=t),t}_computeAabbInWorldCoordinates(){const t=i(),a=this.intersectionGeometry.positions;if(Math.floor(a.length/3)>0){const{rotationScale:i,position:n}=this.transform;let h=1/0,m=1/0,c=1/0,l=-1/0,b=-1/0,d=-1/0;const p=s();for(let t=0;t<a.length;t+=3)o(p,a[t+0],a[t+1],a[t+2]),e(p,p,i),r(p,p,n),h=Math.min(h,p[0]),m=Math.min(m,p[1]),c=Math.min(c,p[2]),l=Math.max(l,p[0]),b=Math.max(b,p[1]),d=Math.max(d,p[2]);t[0]=h,t[1]=m,t[2]=c,t[3]=l,t[4]=b,t[5]=d}return t}}export{a as ComponentObject};
5
+ import{destroyMaybe as t}from"../../../../../core/maybe.js";import{i as o,o as e,f as r}from"../../../../../chunks/vec32.js";import{create as s}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as i}from"../../../../../geometry/support/aaBoundingBox.js";class a{constructor(t,o,e,r,s,i){this.transform=t,this.toMapSpace=o,this.obb=e,this.componentData=r,this.renderable=s,this.intersectionGeometry=i,this.visible=!1,this.offsetObb=null,this._aabbInWorldCoordinates=null}destroy(){this.intersectionGeometry=t(this.intersectionGeometry),this.renderable=t(this.renderable),this.componentData=t(this.componentData)}get aabbInWorldCoordinates(){let t=this._aabbInWorldCoordinates;return t||(t=this._computeAabbInWorldCoordinates(),this._aabbInWorldCoordinates=t),t}_computeAabbInWorldCoordinates(){const t=i(),{positions:a}=this.intersectionGeometry;if(Math.floor(a.length/3)>0){const{rotationScale:i,position:n}=this.transform;let h=1/0,m=1/0,c=1/0,l=-1/0,b=-1/0,d=-1/0;const p=s();for(let t=0;t<a.length;t+=3)o(p,a[t+0],a[t+1],a[t+2]),e(p,p,i),r(p,p,n),h=Math.min(h,p[0]),m=Math.min(m,p[1]),c=Math.min(c,p[2]),l=Math.max(l,p[0]),b=Math.max(b,p[1]),d=Math.max(d,p[2]);t[0]=h,t[1]=m,t[2]=c,t[3]=l,t[4]=b,t[5]=d}return t}}export{a as ComponentObject};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../../core/Logger.js";import{getOrCreateMapValue as t}from"../../../../../core/MapUtils.js";import i from"../../../../../core/PooledArray.js";import{isTypedArray as o}from"../../../../../core/typedArrayUtil.js";import{s as n}from"../../../../../chunks/vec32.js";import{clone as r}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as s}from"../../../../../geometry/support/aaBoundingBox.js";import{compactIndices as a}from"../../../../../geometry/support/Indices.js";import{c}from"../../../../../chunks/vec3.js";import{c as l}from"../../../../../chunks/vec33.js";import{encodeSymbolColor as m}from"../../../layers/support/symbolColorUtils.js";import{computeOffsetObb as h}from"../../../support/orientedBoundingBox.js";import{glLayout as f}from"../../../support/buffer/glUtil.js";import{ComponentData as p}from"./ComponentData.js";import{ComponentObject as g}from"./ComponentObject.js";import{IntersectionGeometry as d}from"./IntersectionGeometry.js";import{Renderable as u}from"./Renderable.js";import{RenderGeometry as b}from"./RenderGeometry.js";import{RenderSubmitSystem as v}from"./RenderSubmitSystem.js";import{createVertexBufferLayout as y}from"./SourceGeometry.js";import{UniformComponentParameters as _}from"./UniformComponentParameters.js";import{ComponentParametersVarying as M,ComponentParametersUniform as C,ComponentMaterial as j}from"./Material/ComponentMaterial.js";import{indexGlLayout as w}from"./Material/ComponentTechnique.js";import{getComponentFieldCount as O,encodeElevationOffset as x,encodeEmissiveStrength as D}from"./Material/shader/ComponentData.glsl.js";import{olidEnabled as R}from"../../effects/geometry/olidUtils.js";import{getVisibility as S,updatePickabilityWithCount as A}from"../../lib/ComponentUtils.js";import{assert as P}from"../../lib/Util.js";import{VertexArrayObject as B}from"../../lib/VertexArrayObject.js";import{getVerticalOffsetI3S as E}from"../../lib/verticalOffsetUtils.js";import{BufferManager as H}from"../../lib/TextureBackedBuffer/BufferManager.js";import{BufferObject as U}from"../../../../webgl/BufferObject.js";import{PrimitiveType as V}from"../../../../webgl/enums.js";import{VertexBuffer as I}from"../../../../webgl/VertexBuffer.js";const N=()=>e.getLogger("esri.views.3d.webgl-engine.collections.Component.ComponentObjectCollection");class k{constructor(e,t){this._renderManager=e,this._viewingMode=t,this._elevationRangeCacheVerticalOffset=NaN,this._elevationRangeCacheMin=NaN,this._elevationRangeCacheMax=NaN,this._activeHighlightOptions=new Map,this._visible=new i,this._hidden=new i,this._renderSubmit=new v(this),this._renderManager.register(this._renderSubmit),this._componentBufferManager=new H(e.rctx,O())}destroy(){P(0===this._hidden.length&&0===this._visible.length,"ObjectCollection should be empty upon disposal"),this._componentBufferManager.destroy(),this._componentBufferManager=null,this._visible.forAll(e=>e.destroy()),this._visible.prune(),this._hidden.forAll(e=>e.destroy()),this._hidden.prune(),this._renderSubmit.destroy()}createObject(e){const{geometry:t}=e,i=new p(this._componentBufferManager,a(t.componentOffsets)),o=this._createRenderable(e,i),n=new d(this._viewingMode,t.positionData,i),r=new g(e.transform,e.toMapSpace,e.obb.clone(),i,o,n);return(r.visible?this._visible:this._hidden).push(r),r}destroyObject(e){const t=e;(t.visible?this._visible:this._hidden).removeUnordered(t),t.destroy(),this._notifyDirty()}setObjectVisibility(e,t){const i=e;t!==i.visible&&(t?(this._hidden.removeUnordered(i),this._visible.push(i)):(this._visible.removeUnordered(i),this._hidden.push(i)),i.visible=t,this._notifyDirty())}preSubmit(e){const t=e.camera.eye;this.visibleObjects.forAll(e=>e.renderable.meta.cameraDepthSquared=n(t,e.obb.center))}getMaterial(e){return e.renderable.material}updateMaterial(e,t){const i=e.renderable.material;t(i),i.dirty&&this._notifyDirty()}setAllComponentVisibilities(e,t){const i=e;i.componentData.visibility.reset(t),i.componentData.markVisibilityDirty(),this._notifyDirty()}forEachVisibleComponent(e,t){return e.componentData.visibility.forEachComponent(t)}getComponentCount(e){const t=e,i=t.componentData.visibility.componentCount;return{visible:i,invisible:t.componentData.count-i}}setComponentData(e,t){const i=e,{renderable:o,componentData:n}=i,r=o.material,s=n.materialDataBuffer,a=n.materialDataIndices,c=new _,l=s.textureBuffer,f=new Uint8Array(4),p=new Uint32Array(f.buffer);let g=0,d=0,u=0,b=0,v=0,y=n.verticalOffsets,j=1/0,w=-1/0,O=!1,P=!1,B=!1,E=0;for(let h=0;h<n.count;h++){t(h,c),g+=+(c.externalColor[3]<1),d+=+(3===c.externalColorMixMode&&1===c.externalColor[3]),b+=+(c.emissiveStrength>0),v+=+(1===c.emissiveSource),P||=1!==c.emissiveStrength,u+=+c.castShadows,m(c.externalColor,c.externalColorMixMode,f),f[2]=254&f[2]|+c.castShadows,l.setData(a[h],0,f[0],f[1],f[2],f[3]),O||=h>0&&E!==p[0],E=p[0],B||=0!==c.elevationOffset,B&&null==y&&(y=new Array(h).fill(0)),null!=y&&(y[h]=c.elevationOffset),j=Math.min(j,c.elevationOffset),w=Math.max(w,c.elevationOffset),x(c.elevationOffset,f),l.setData(a[h],1,f[0],f[1],f[2],f[3]),D(c.emissiveStrength,f),l.setData(a[h],2,f[0],f[1],f[2],0===c.emissiveSource?0:255);const e=c.olidColor;null!=e&&l.setData(a[h],3,e[0],e[1],e[2],e[3]),c.pickable!==S(n.pickability,h)&&A(n,h,c.pickable)}n.verticalOffsets=B?y:null,i.offsetObb=B?h(i.obb,j,w,this._viewingMode,i.offsetObb??i.obb.clone()):null,O||B||R()||(P||v>0)&&b>0?(r.componentParameters=new M,r.componentParameters.castShadows=G(u,n.count),r.componentParameters.transparent=G(g,n.count),r.componentParameters.opaqueOverride=G(d,n.count),r.componentParameters.emissiveOverride=G(b,n.count),r.componentParameters.emissiveSourceOverride=G(v,n.count),r.componentParameters.texture=l,l.updateTexture()):(r.componentParameters=new C,r.componentParameters.castShadows=c.castShadows?0:2,r.componentParameters.externalColor=c.externalColor,r.componentParameters.externalColorMixMode=c.externalColorMixMode,r.componentParameters.emissiveStrength=c.emissiveStrength,r.componentParameters.emissiveSource=c.emissiveSource),this._elevationRangeCacheVerticalOffset=NaN,this._notifyDirty()}getComponentAabb(e,t,i,o=!1){e.intersectionGeometry.getComponentAabb(t,i);const n=e,r=n.componentData.verticalOffsets;if(o||null==r)return i;const s=r[t];if(2===this._viewingMode||0===s)return i[2]+=s,i[5]+=s,i;const a=E(s);return a.localOrigin=n.transform.position,a.applyToAabb(i)}getComponentObb(e){return e.obb}getObjectTransform(e){return e.transform}getComponentPositions(e,t,i){return e.intersectionGeometry.getComponentPositions(t,i)}expandRangeWithComponentObjectElevationRange(e,t,i,o){Number.isNaN(this._elevationRangeCacheVerticalOffset)||this._elevationRangeCacheVerticalOffset!==t||o.expandElevationRangeValues(this._elevationRangeCacheMin,this._elevationRangeCacheMax);const n=e,r=n.componentData,s=r.count,a=r.verticalOffsets,c=n.intersectionGeometry,l=2===this._viewingMode,m=c.getComponentAabbs(),h=L;let f=1/0,p=-1/0;for(let g=0;g<s;g++){const e=6*g,r=a?.[g]??0;let s=1/0,c=-1/0;if(l)s=m[e+2]+r+t,c=m[e+5]+r+t;else{if(h[0]=m[e],h[1]=m[e+1],h[2]=m[e+2],h[3]=m[e+3],h[4]=m[e+4],h[5]=m[e+5],0!==r){const e=E(r);e.localOrigin=n.transform.position,e.applyToAabb(h)}const s=Math.max(Math.abs(h[3]),Math.abs(h[0])),a=Math.max(Math.abs(h[4]),Math.abs(h[1])),c=t+h[5]+i;o.expandElevationRangeValues(t+h[2],Math.sqrt(s*s+a*a+c*c)-i)}o.expandElevationRangeValues(s,c),f=Math.min(f,s),p=Math.max(p,c)}this._elevationRangeCacheVerticalOffset=t,this._elevationRangeCacheMin=f,this._elevationRangeCacheMax=p}intersect(e,t,i,o,n,r,s){const a=e,{transform:c,componentData:l,intersectionGeometry:m}=a;return null!=n&&(n.localOrigin=c.position),m.intersect(t,i,o,n,l.verticalOffsets,c,r,s)}addEdges(e,t,i,o,n){const r=e,{indices:s,positions:a}=r.intersectionGeometry,c=r.componentData.offsets;return t.addComponentObject(r,a,s,c,i,o,n)}async extractEdgeInformation(e,t,i){const o=e,n=o.componentData.visibility;if(n.allInvisible()){const{extractComponentsEdgeLocationsLayout:e}=await import("../../lib/edgeRendering/edgeProcessing.js");return{buffer:e.createBuffer(0),origin:[0,0,0]}}const{indices:s,positions:a}=o.intersectionGeometry,m=o.componentData.offsets,{EdgeInputBufferLayout:h}=await import("../../lib/edgeRendering/bufferLayouts.js"),f=h.createBuffer(a.length/3);l(f.position.typedBuffer,a,f.position.typedBufferStride,3),c(f.position,f.position,o.transform.rotationScale),this._setComponentIndices(f.componentIndex,s,m);const p=f.count,g=this._computeVisibilityIndices(s,n,m,p);return{origin:r(o.transform.position),buffer:await t.extractComponentsEdgeLocations({indices:g,indicesLength:g.length,skipDeduplicate:!0,data:f,writerSettings:{reducedPrecision:!1,variants:0}},i)}}_setComponentIndices(e,t,i){let o=0;for(let n=0;n<i.length-1;n++){const r=i[n],s=i[n+1];for(let i=r;i<s;i++){const n=t?t[i]:i;e.set(n,o)}o++}}_computeVisibilityIndices(e,t,i,n){if(e&&t.allVisible())return e;let r=0;t.forEachComponentRange((e,t)=>(r+=i[t]-i[e],!0));const s=o(e)?2===e?.BYTES_PER_ELEMENT||n<=65536?new Uint16Array(r):new Uint32Array(r):new Array(r);let a=0;return t.forEachComponentRange((t,o)=>{const n=i[t],r=i[o];for(let i=n;i<r;i++)s[a++]=e?e[i]:i;return!0}),s}addComponentHighlight(e,i,o){const n=e.componentData,r=t(n.componentHighlights,o,()=>new Uint32Array(n.count+1));{const e=this._activeHighlightOptions.get(o)??0;this._activeHighlightOptions.set(o,e+1)}0===r[i]++&&(n.markHighlightsDirty(),this._notifyDirty()),r[n.count]++}removeComponentHighlight(e,t,i){const{componentData:o}=e,n=o.componentHighlights.get(i);if(void 0===n)return void N().warn("Removing non-existing highlight.");const r=n[t];if(0===r)return void N().warn("Removing non-existing highlight.");this._removeActiveHighlight(i);const s=n[o.count];if(r>1)return n[t]=r-1,void(n[o.count]=s-1);n[t]=0,1===s?o.componentHighlights.delete(i):n[o.count]=s-1,o.markHighlightsDirty(),this._notifyDirty()}_removeActiveHighlight(e,t=1){const i=this._activeHighlightOptions.get(e);if(void 0===i)N().warn("Removing non-existing highlight.");else{const o=i-t;o<0&&N().warn("Removing non-existing highlight."),o<=0?this._activeHighlightOptions.delete(e):this._activeHighlightOptions.set(e,o)}}clearHighlights(e){const{componentData:t}=e,{componentHighlights:i}=t;if(i.size>0){for(const e of i)this._removeActiveHighlight(e[0],e[1][t.count]);i.clear(),t.markHighlightsDirty(),this._notifyDirty()}}hasHighlight(e){return this._activeHighlightOptions.has(e)}getObjectGPUMemoryUsage(e){return e.renderable.meta.gpuMemoryEstimate}get visibleObjects(){return this._visible}_createRenderable(e,t){const i=this._renderManager.rctx,o=e.geometry,n=o.vertices.layoutParameters,r=f(y(n)),s=new I(i,r,o.vertices.data),a=o.indices?U.createIndex(i,35044,o.indices):null,c=new Uint16Array(o.vertices.count);for(let f=0;f<t.count;f++){const e=t.offsets[f],i=t.offsets[f+1],n=t.materialDataIndices[f];if(null!=o.indices)for(let t=e;t<i;t++){c[o.indices[t]]=n}else for(let t=e;t<i;t++)c[t]=n}const l=new I(i,w,c.buffer),m=new j(e.transform,e.toMapSpace),h=new B(i,new Map([["geometry",s],["componentIndices",l]]),a),p=new b(h,V.TRIANGLES,n,null!=a),g={cameraDepthSquared:.5,gpuMemoryEstimate:s.usedMemory+l.usedMemory+(null!=a?a.usedMemory:0)};return new u(m,p,g)}_notifyDirty(){this._renderManager.notifyDirty()}}function G(e,t){return e===t?0:0===e?2:1}const L=s();export{k as ComponentObjectCollection};
5
+ import e from"../../../../../core/Logger.js";import{getOrCreateMapValue as t}from"../../../../../core/MapUtils.js";import i from"../../../../../core/PooledArray.js";import{isTypedArray as o}from"../../../../../core/typedArrayUtil.js";import{s as n}from"../../../../../chunks/vec32.js";import{clone as r}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as s}from"../../../../../geometry/support/aaBoundingBox.js";import{compactIndices as a}from"../../../../../geometry/support/Indices.js";import{c}from"../../../../../chunks/vec3.js";import{c as l}from"../../../../../chunks/vec33.js";import{encodeSymbolColor as m}from"../../../layers/support/symbolColorUtils.js";import{computeOffsetObb as h}from"../../../support/orientedBoundingBox.js";import{glLayout as f}from"../../../support/buffer/glUtil.js";import{ComponentData as p}from"./ComponentData.js";import{ComponentObject as g}from"./ComponentObject.js";import{IntersectionGeometry as d}from"./IntersectionGeometry.js";import{Renderable as u}from"./Renderable.js";import{RenderGeometry as b}from"./RenderGeometry.js";import{RenderSubmitSystem as v}from"./RenderSubmitSystem.js";import{createVertexBufferLayout as y}from"./SourceGeometry.js";import{UniformComponentParameters as _}from"./UniformComponentParameters.js";import{ComponentParametersVarying as M,ComponentParametersUniform as C,ComponentMaterial as j}from"./Material/ComponentMaterial.js";import{indexGlLayout as w}from"./Material/ComponentTechnique.js";import{getComponentFieldCount as O,encodeElevationOffset as x,encodeEmissiveStrength as D}from"./Material/shader/ComponentData.glsl.js";import{olidEnabled as R}from"../../effects/geometry/olidUtils.js";import{getVisibility as S,updatePickabilityWithCount as A}from"../../lib/ComponentUtils.js";import{assert as P}from"../../lib/Util.js";import{VertexArrayObject as B}from"../../lib/VertexArrayObject.js";import{getVerticalOffsetI3S as E}from"../../lib/verticalOffsetUtils.js";import{BufferManager as H}from"../../lib/TextureBackedBuffer/BufferManager.js";import{BufferObject as U}from"../../../../webgl/BufferObject.js";import{PrimitiveType as V}from"../../../../webgl/enums.js";import{VertexBuffer as I}from"../../../../webgl/VertexBuffer.js";const N=()=>e.getLogger("esri.views.3d.webgl-engine.collections.Component.ComponentObjectCollection");class k{constructor(e,t){this._renderManager=e,this._viewingMode=t,this._elevationRangeCacheVerticalOffset=NaN,this._elevationRangeCacheMin=NaN,this._elevationRangeCacheMax=NaN,this._activeHighlightOptions=new Map,this._visible=new i,this._hidden=new i,this._renderSubmit=new v(this),this._renderManager.register(this._renderSubmit),this._componentBufferManager=new H(e.rctx,O())}destroy(){P(0===this._hidden.length&&0===this._visible.length,"ObjectCollection should be empty upon disposal"),this._componentBufferManager.destroy(),this._componentBufferManager=null,this._visible.forAll(e=>e.destroy()),this._visible.prune(),this._hidden.forAll(e=>e.destroy()),this._hidden.prune(),this._renderSubmit.destroy()}createObject(e){const{geometry:t}=e,i=new p(this._componentBufferManager,a(t.componentOffsets)),o=this._createRenderable(e,i),n=new d(this._viewingMode,t.positionData,i,e.elevationAlignable),r=new g(e.transform,e.toMapSpace,e.obb.clone(),i,o,n);return(r.visible?this._visible:this._hidden).push(r),r}destroyObject(e){const t=e;(t.visible?this._visible:this._hidden).removeUnordered(t),t.destroy(),this._notifyDirty()}setObjectVisibility(e,t){const i=e;t!==i.visible&&(t?(this._hidden.removeUnordered(i),this._visible.push(i)):(this._visible.removeUnordered(i),this._hidden.push(i)),i.visible=t,this._notifyDirty())}preSubmit(e){const t=e.camera.eye;this.visibleObjects.forAll(e=>e.renderable.meta.cameraDepthSquared=n(t,e.obb.center))}getMaterial(e){return e.renderable.material}updateMaterial(e,t){const i=e.renderable.material;t(i),i.dirty&&this._notifyDirty()}setAllComponentVisibilities(e,t){const i=e;i.componentData.visibility.reset(t),i.componentData.markVisibilityDirty(),this._notifyDirty()}forEachVisibleComponent(e,t){return e.componentData.visibility.forEachComponent(t)}getComponentCount(e){const t=e,i=t.componentData.visibility.componentCount;return{visible:i,invisible:t.componentData.count-i}}setComponentData(e,t){const i=e,{renderable:o,componentData:n}=i,r=o.material,s=n.materialDataBuffer,a=n.materialDataIndices,c=new _,l=s.textureBuffer,f=new Uint8Array(4),p=new Uint32Array(f.buffer);let g=0,d=0,u=0,b=0,v=0,y=n.verticalOffsets,j=1/0,w=-1/0,O=!1,P=!1,B=!1,E=0;for(let h=0;h<n.count;h++){t(h,c),g+=+(c.externalColor[3]<1),d+=+(3===c.externalColorMixMode&&1===c.externalColor[3]),b+=+(c.emissiveStrength>0),v+=+(1===c.emissiveSource),P||=1!==c.emissiveStrength,u+=+c.castShadows,m(c.externalColor,c.externalColorMixMode,f),f[2]=254&f[2]|+c.castShadows,l.setData(a[h],0,f[0],f[1],f[2],f[3]),O||=h>0&&E!==p[0],E=p[0],B||=0!==c.elevationOffset,B&&null==y&&(y=new Array(h).fill(0)),null!=y&&(y[h]=c.elevationOffset),j=Math.min(j,c.elevationOffset),w=Math.max(w,c.elevationOffset),x(c.elevationOffset,f),l.setData(a[h],1,f[0],f[1],f[2],f[3]),D(c.emissiveStrength,f),l.setData(a[h],2,f[0],f[1],f[2],0===c.emissiveSource?0:255);const e=c.olidColor;null!=e&&l.setData(a[h],3,e[0],e[1],e[2],e[3]),c.pickable!==S(n.pickability,h)&&A(n,h,c.pickable)}n.verticalOffsets=B?y:null,i.offsetObb=B?h(i.obb,j,w,this._viewingMode,i.offsetObb??i.obb.clone()):null,O||B||R()||(P||v>0)&&b>0?(r.componentParameters=new M,r.componentParameters.castShadows=G(u,n.count),r.componentParameters.transparent=G(g,n.count),r.componentParameters.opaqueOverride=G(d,n.count),r.componentParameters.emissiveOverride=G(b,n.count),r.componentParameters.emissiveSourceOverride=G(v,n.count),r.componentParameters.texture=l,l.updateTexture()):(r.componentParameters=new C,r.componentParameters.castShadows=c.castShadows?0:2,r.componentParameters.externalColor=c.externalColor,r.componentParameters.externalColorMixMode=c.externalColorMixMode,r.componentParameters.emissiveStrength=c.emissiveStrength,r.componentParameters.emissiveSource=c.emissiveSource),this._elevationRangeCacheVerticalOffset=NaN,this._notifyDirty()}getComponentAabb(e,t,i,o=!1){e.intersectionGeometry.getComponentAabb(t,i);const n=e,r=n.componentData.verticalOffsets;if(o||null==r)return i;const s=r[t];if(2===this._viewingMode||0===s)return i[2]+=s,i[5]+=s,i;const a=E(s);return a.localOrigin=n.transform.position,a.applyToAabb(i)}getComponentObb(e){return e.obb}getObjectTransform(e){return e.transform}getComponentPositions(e,t,i){return e.intersectionGeometry.getComponentPositions(t,i)}expandRangeWithComponentObjectElevationRange(e,t,i,o){Number.isNaN(this._elevationRangeCacheVerticalOffset)||this._elevationRangeCacheVerticalOffset!==t||o.expandElevationRangeValues(this._elevationRangeCacheMin,this._elevationRangeCacheMax);const n=e,r=n.componentData,s=r.count,a=r.verticalOffsets,c=n.intersectionGeometry,l=2===this._viewingMode,m=c.getComponentAabbs(),h=L;let f=1/0,p=-1/0;for(let g=0;g<s;g++){const e=6*g,r=a?.[g]??0;let s=1/0,c=-1/0;if(l)s=m[e+2]+r+t,c=m[e+5]+r+t;else{if(h[0]=m[e],h[1]=m[e+1],h[2]=m[e+2],h[3]=m[e+3],h[4]=m[e+4],h[5]=m[e+5],0!==r){const e=E(r);e.localOrigin=n.transform.position,e.applyToAabb(h)}const s=Math.max(Math.abs(h[3]),Math.abs(h[0])),a=Math.max(Math.abs(h[4]),Math.abs(h[1])),c=t+h[5]+i;o.expandElevationRangeValues(t+h[2],Math.sqrt(s*s+a*a+c*c)-i)}o.expandElevationRangeValues(s,c),f=Math.min(f,s),p=Math.max(p,c)}this._elevationRangeCacheVerticalOffset=t,this._elevationRangeCacheMin=f,this._elevationRangeCacheMax=p}intersect(e,t,i,o,n,r){const s=e,{transform:a,componentData:c,intersectionGeometry:l}=s;return null!=o&&(o.localOrigin=a.position),l.intersect(t,i,o,c.verticalOffsets,a,n,r)}addEdges(e,t,i,o,n){const r=e,{indices:s,positions:a}=r.intersectionGeometry,c=r.componentData.offsets;return t.addComponentObject(r,a,s,c,i,o,n)}async extractEdgeInformation(e,t,i){const o=e,n=o.componentData.visibility;if(n.allInvisible()){const{extractComponentsEdgeLocationsLayout:e}=await import("../../lib/edgeRendering/edgeProcessing.js");return{buffer:e.createBuffer(0),origin:[0,0,0]}}const{indices:s,positions:a}=o.intersectionGeometry,m=o.componentData.offsets,{EdgeInputBufferLayout:h}=await import("../../lib/edgeRendering/bufferLayouts.js"),f=h.createBuffer(a.length/3);l(f.position.typedBuffer,a,f.position.typedBufferStride,3),c(f.position,f.position,o.transform.rotationScale),this._setComponentIndices(f.componentIndex,s,m);const p=f.count,g=this._computeVisibilityIndices(s,n,m,p);return{origin:r(o.transform.position),buffer:await t.extractComponentsEdgeLocations({indices:g,indicesLength:g.length,skipDeduplicate:!0,data:f,writerSettings:{reducedPrecision:!1,variants:0}},i)}}_setComponentIndices(e,t,i){let o=0;for(let n=0;n<i.length-1;n++){const r=i[n],s=i[n+1];for(let i=r;i<s;i++){const n=t?t[i]:i;e.set(n,o)}o++}}_computeVisibilityIndices(e,t,i,n){if(e&&t.allVisible())return e;let r=0;t.forEachComponentRange((e,t)=>(r+=i[t]-i[e],!0));const s=o(e)?2===e?.BYTES_PER_ELEMENT||n<=65536?new Uint16Array(r):new Uint32Array(r):new Array(r);let a=0;return t.forEachComponentRange((t,o)=>{const n=i[t],r=i[o];for(let i=n;i<r;i++)s[a++]=e?e[i]:i;return!0}),s}addComponentHighlight(e,i,o){const n=e.componentData,r=t(n.componentHighlights,o,()=>new Uint32Array(n.count+1));{const e=this._activeHighlightOptions.get(o)??0;this._activeHighlightOptions.set(o,e+1)}0===r[i]++&&(n.markHighlightsDirty(),this._notifyDirty()),r[n.count]++}removeComponentHighlight(e,t,i){const{componentData:o}=e,n=o.componentHighlights.get(i);if(void 0===n)return void N().warn("Removing non-existing highlight.");const r=n[t];if(0===r)return void N().warn("Removing non-existing highlight.");this._removeActiveHighlight(i);const s=n[o.count];if(r>1)return n[t]=r-1,void(n[o.count]=s-1);n[t]=0,1===s?o.componentHighlights.delete(i):n[o.count]=s-1,o.markHighlightsDirty(),this._notifyDirty()}_removeActiveHighlight(e,t=1){const i=this._activeHighlightOptions.get(e);if(void 0===i)N().warn("Removing non-existing highlight.");else{const o=i-t;o<0&&N().warn("Removing non-existing highlight."),o<=0?this._activeHighlightOptions.delete(e):this._activeHighlightOptions.set(e,o)}}clearHighlights(e){const{componentData:t}=e,{componentHighlights:i}=t;if(i.size>0){for(const e of i)this._removeActiveHighlight(e[0],e[1][t.count]);i.clear(),t.markHighlightsDirty(),this._notifyDirty()}}hasHighlight(e){return this._activeHighlightOptions.has(e)}getObjectGPUMemoryUsage(e){return e.renderable.meta.gpuMemoryEstimate}get visibleObjects(){return this._visible}_createRenderable(e,t){const i=this._renderManager.rctx,o=e.geometry,n=o.vertices.layoutParameters,r=f(y(n)),s=new I(i,r,o.vertices.data),a=o.indices?U.createIndex(i,35044,o.indices):null,c=new Uint16Array(o.vertices.count);for(let f=0;f<t.count;f++){const e=t.offsets[f],i=t.offsets[f+1],n=t.materialDataIndices[f];if(null!=o.indices)for(let t=e;t<i;t++){c[o.indices[t]]=n}else for(let t=e;t<i;t++)c[t]=n}const l=new I(i,w,c.buffer),m=new j(e.transform,e.toMapSpace),h=new B(i,new Map([["geometry",s],["componentIndices",l]]),a),p=new b(h,V.TRIANGLES,n,null!=a),g={cameraDepthSquared:.5,gpuMemoryEstimate:s.usedMemory+l.usedMemory+(null!=a?a.usedMemory:0)};return new u(m,p,g)}_notifyDirty(){this._renderManager.notifyDirty()}}function G(e,t){return e===t?0:0===e?2:1}const L=s();export{k as ComponentObjectCollection};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{c as t,a as e}from"../../../../../chunks/vec32.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as o}from"../../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as s}from"../../../../../geometry/support/DoubleArray.js";import{ComponentObjectElevationAgnosticComponentGeometryBVH as i,intersectTriangleRangeForComponent as r}from"./ComponentObjectElevationAgnosticComponentGeometryBVH.js";import{ElevationAgnosticBVH as a}from"./ElevationAgnosticBVH.js";import{getVisibility as c}from"../../lib/ComponentUtils.js";import{MeshIntersectionOptions as l,computeInvDir as m,intersectAabbInvDir as h}from"../../lib/RayIntersections.js";import{elevationAlignVertexGlobal as p}from"../../lib/triangleIntersectionUtils.js";class b{constructor(t,e,o,s,i,r,c,l){this.vertexData=t,this.vertexStride=e,this.indexData=o,this._components=s,this._componentAabbs3D=i,this.geometryMinZ=r,this.planetCenterZ=c,this.localMode=l,this.maxBspNodeDepth=6,this.minElementCountForBVH=10,this.minBspNodeElementCount=3,this._ray0=y,this._ray1=D,this._invDir=n(),this._componentVerticalOffsets=null,this._verticalOffset=null,this._tolerance=0,this._intersectionOptions=C,this._callback=g,this.rayDirectionC=n(),this._componentIndexMap=null,this._bvh=new a(s.count,this),this.componentIntersectionData=new Array(s.count)}get numComponents(){return this._components.count}get minZGlobal(){return this.geometryMinZ-this.planetCenterZ}getAabbs2D(){return this.localMode?this.getAabbs2DLocal():this.getAabbs2DGlobal()}getAabbs2DGlobal(){const{numComponents:t,planetCenterZ:e,minZGlobal:n}=this,o=s(4*t),i=this._componentAabbs3D;for(let s=0;s<t;++s){const t=6*s,r=i[t+0],a=i[t+1],c=i[t+2],l=i[t+3],m=i[t+4],h=n/(c-e),p=n/(i[t+5]-e),b=Math.min(r*h,r*p),_=Math.min(a*h,a*p),f=Math.max(l*h,l*p),u=Math.max(m*h,m*p),y=4*s;o[y+0]=b,o[y+1]=_,o[y+2]=f,o[y+3]=u}return o}getAabbs2DLocal(){const{numComponents:t}=this,e=s(4*t),n=this._componentAabbs3D;for(let o=0;o<t;++o){const t=6*o,s=n[t+0],i=n[t+1],r=n[t+3],a=n[t+4],c=4*o;e[c+0]=s,e[c+1]=i,e[c+2]=r,e[c+3]=a}return e}intersectRay(t,e,n,o,s,i,r){const{isVerticalRay:a}=r;this._ray0=t,this._ray1=e,this._componentVerticalOffsets=n,this._verticalOffset=o,this._tolerance=i,this._intersectionOptions=r,this._componentIndexMap=this._bvh.elementIndexMap,m(t,e,this._invDir),this._callback=s,this._bvh.intersectRay(t,e,a),this._callback=g}intersectRange(t,e){const n=this._componentIndexMap,{pickability:o,visibility:s}=this._components;for(let i=t;i<e;++i){const t=n?n[i]:i;c(o,t)&&s.isVisible(t)&&this._intersectComponent(t)}}getComponentTriangleCount(t){const e=this._components.offsets,n=e[t]/3;return e[t+1]/3-n}getComponentAabb3D(t,e){const n=this._componentAabbs3D,o=6*t;return e[0]=n[o],e[1]=n[o+1],e[2]=n[o+2],e[3]=n[o+3],e[4]=n[o+4],e[5]=n[o+5],e}_intersectComponent(n){const o=this.getComponentAabb3D(n,_);let s=!1;const{localMode:a,_componentVerticalOffsets:c,_verticalOffset:l,_ray0:m,_ray1:b,_invDir:y,planetCenterZ:D,_tolerance:g,rayDirectionC:C,componentIntersectionData:x}=this,{isVerticalRay:A}=this._intersectionOptions,d=this._components.offsets,M=t(f,m),O=t(u,b),j=c?.[n]??0,V=j+(l?.offset??0);if(0!==V&&(a?(M[2]=m[2]-V,O[2]=b[2]-V,s=!0):(null!=l&&(l.componentOffset=j),A&&(p(M,-V,D,m),p(O,-V,D,b),s=!0))),null==l||s||0===V||l.applyToAabb(o),!h(o,M,y,g))return;e(C,O,M);const Z=d[n]/3,I=d[n+1]/3,R=I-Z,B=(t,e,o)=>{this._callback(t,e,n,o)},{vertexData:k,vertexStride:G,indexData:w,_intersectionOptions:E}=this,{normalRequired:H}=E;if(R>v){let t=x[n];null==t&&(t=new i(n,k,G,w,Z,I,this.geometryMinZ,D,a),x[n]=t),t.intersectRay(M,O,A,s?0:V,B,H)}else{r(M,C,Z,I,w,k,G,s?0:V,D,H,B)}}}const _=o(),f=n(),u=n(),y=n(),D=n(),g=()=>{},C=new l,v=40;export{b as ComponentObjectElevationAgnosticComponentBVH};
5
+ import{c as t,a as e}from"../../../../../chunks/vec32.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as o}from"../../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as s}from"../../../../../geometry/support/DoubleArray.js";import{ComponentObjectElevationAgnosticComponentGeometryBVH as i,intersectTriangleRangeForComponent as r}from"./ComponentObjectElevationAgnosticComponentGeometryBVH.js";import{ElevationAgnosticBVH as a}from"./ElevationAgnosticBVH.js";import{getVisibility as c}from"../../lib/ComponentUtils.js";import{MeshIntersectionOptions as l,computeInvDir as m,intersectAabbInvDir as h}from"../../lib/RayIntersections.js";import{elevationAlignVertexGlobal as p}from"../../lib/triangleIntersectionUtils.js";class b{constructor(t,e,o,s,i,r,c,l){this.vertexData=t,this.vertexStride=e,this.indexData=o,this._components=s,this._componentAabbs3D=i,this.geometryMinZ=r,this.planetCenterZ=c,this.localMode=l,this.maxBspNodeDepth=6,this.minElementCountForBVH=10,this.minBspNodeElementCount=3,this._ray0=y,this._ray1=D,this._invDir=n(),this._componentVerticalOffsets=null,this._verticalOffset=null,this._tolerance=0,this._intersectionOptions=C,this._callback=g,this.rayDirectionC=n(),this._componentIndexMap=null,this._bvh=new a(s.count,this),this.componentIntersectionData=new Array(s.count)}get numComponents(){return this._components.count}get minZGlobal(){return this.geometryMinZ-this.planetCenterZ}getAabbs2D(){return this.localMode?this.getAabbs2DLocal():this.getAabbs2DGlobal()}getAabbs2DGlobal(){const{numComponents:t,planetCenterZ:e,minZGlobal:n}=this,o=s(4*t),i=this._componentAabbs3D;for(let s=0;s<t;++s){const t=6*s,r=i[t+0],a=i[t+1],c=i[t+2],l=i[t+3],m=i[t+4],h=n/(c-e),p=n/(i[t+5]-e),b=Math.min(r*h,r*p),_=Math.min(a*h,a*p),f=Math.max(l*h,l*p),u=Math.max(m*h,m*p),y=4*s;o[y+0]=b,o[y+1]=_,o[y+2]=f,o[y+3]=u}return o}getAabbs2DLocal(){const{numComponents:t}=this,e=s(4*t),n=this._componentAabbs3D;for(let o=0;o<t;++o){const t=6*o,s=n[t+0],i=n[t+1],r=n[t+3],a=n[t+4],c=4*o;e[c+0]=s,e[c+1]=i,e[c+2]=r,e[c+3]=a}return e}intersectRay(t,e,n,o,s,i){const{isVerticalRay:r}=n;this._ray0=t,this._ray1=e,this._componentVerticalOffsets=s??null,this._verticalOffset=i??null,this._tolerance=n.tolerance,this._intersectionOptions=n,this._componentIndexMap=this._bvh.elementIndexMap,m(t,e,this._invDir),this._callback=o,this._bvh.intersectRay(t,e,r),this._callback=g}intersectRange(t,e){const n=this._componentIndexMap,{pickability:o,visibility:s}=this._components;for(let i=t;i<e;++i){const t=n?n[i]:i;c(o,t)&&s.isVisible(t)&&this._intersectComponent(t)}}getComponentTriangleCount(t){const e=this._components.offsets,n=e[t]/3;return e[t+1]/3-n}getComponentAabb3D(t,e){const n=this._componentAabbs3D,o=6*t;return e[0]=n[o],e[1]=n[o+1],e[2]=n[o+2],e[3]=n[o+3],e[4]=n[o+4],e[5]=n[o+5],e}_intersectComponent(n){const o=this.getComponentAabb3D(n,_);let s=!1;const{localMode:a,_componentVerticalOffsets:c,_verticalOffset:l,_ray0:m,_ray1:b,_invDir:y,planetCenterZ:D,_tolerance:g,rayDirectionC:C,componentIntersectionData:x}=this,{isVerticalRay:A}=this._intersectionOptions,d=this._components.offsets,M=t(f,m),O=t(u,b),j=c?.[n]??0,V=j+(l?.offset??0);if(0!==V&&(a?(M[2]=m[2]-V,O[2]=b[2]-V,s=!0):(null!=l&&(l.componentOffset=j),A&&(p(M,-V,D,m),p(O,-V,D,b),s=!0))),null==l||s||0===V||l.applyToAabb(o),!h(o,M,y,g))return;e(C,O,M);const Z=d[n]/3,I=d[n+1]/3,R=I-Z,B=(t,e,o)=>{this._callback(t,e,n,o)},{vertexData:k,vertexStride:G,indexData:w,_intersectionOptions:E}=this,{normalRequired:H}=E;if(R>v){let t=x[n];null==t&&(t=new i(n,k,G,w,Z,I,this.geometryMinZ,D,a),x[n]=t),t.intersectRay(M,O,A,s?0:V,B,H)}else{r(M,C,Z,I,w,k,G,s?0:V,D,H,B)}}}const _=o(),f=n(),u=n(),y=n(),D=n(),g=()=>{},C=new l,v=40;export{b as ComponentObjectElevationAgnosticComponentBVH};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ import{ComponentIntersectionData as t}from"./ComponentIntersectionData.js";import{Vertices as n}from"../../lib/Attribute.js";class e{constructor(e,o,r,s,c,i){this._componentOffsets=i,this._accelerationData=new t(r,s,c,new n(e,3,o))}intersectRay(t,n,e,r){const s=(t,n,e)=>{const s=o(this._componentOffsets,n);r(t,n,s,e)};this._accelerationData.intersectRay(t,n,e,s)}}function o(t,n){const{length:e}=t;if(0===e||n<t[0])return-1;if(n>t[e-1])return e;let o=0,r=e-1;for(;r-o>1;){const e=Math.round(.5*(o+r));n<=t[e]?r=e:o=e}return o}export{e as ComponentObjectFixedBVH};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{invert as t,transpose as s}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as e}from"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{a as n,o as i,u as o}from"../../../../../chunks/vec32.js";import{create as a}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as r}from"../../../../../geometry/support/aaBoundingBox.js";import{newFloatArray as h}from"../../../../../geometry/support/FloatArray.js";import{compactIndices as m,getContinuousIndexArray as p}from"../../../../../geometry/support/Indices.js";import{ComponentObjectElevationAgnosticComponentBVH as c}from"./ComponentObjectElevationAgnosticComponentBVH.js";class b{constructor(t,s,e){this.viewingMode=t,this.positionData=s,this._components=e,this.verticalOffset=null,this.componentVerticalOffsets=null,this._planetCenter=a(),this._componentBvh=null,this._aabb=r(),this._indices=s.indices?m(s.indices):p(s.positions.length/3),this._positions=s.positions}destroy(){this._positions=null,this._indices=null,this._perComponentAabbs=null,this._componentBvh=null}getComponentAabb(t,s){const e=this._ensureComponentAabbs(),n=6*t;return s[0]=e[n],s[1]=e[n+1],s[2]=e[n+2],s[3]=e[n+3],s[4]=e[n+4],s[5]=e[n+5],s}getComponentAabbs(){return this._ensureComponentAabbs()}_ensureComponentAabbs(){return this._perComponentAabbs||(this._perComponentAabbs=this._computePerComponentAabbs()),this._perComponentAabbs}getComponentPositions(t,s){s.indices=this._indices,s.data=this._positions,s.stride=3,s.startIndex=this._components.offsets[t],s.endIndex=this._components.offsets[t+1]}intersect(e,a,r,h,m,p,c,b){this.verticalOffset=h,this.componentVerticalOffsets=m;const{position:d}=p,C=n(l,e,d),M=n(_,a,d),A=t(u,p.rotationScale);i(C,C,A),i(M,M,A);const x=s(g,A);if(1===this.viewingMode){const t=this._planetCenter;o(t,d),i(t,t,A)}const v=(t,s,e,n)=>{b(e,t,n?i(f,n,x):null,s)};this._intersectComponents(C,M,m,h,v,r,c)}_computePerComponentAabbs(){const t=this._aabb,s=.5*(t[0]+t[3]),e=.5*(t[1]+t[4]),n=.5*(t[2]+t[5]),i=this._components.count,o=h(6*i),a=this._indices,r=this._positions,m=this._components.offsets;let p=0,c=1/0,b=1/0,l=1/0,_=-1/0,u=-1/0,f=-1/0;for(let h=0;h<i;h++){const t=m[h],i=m[h+1];let g=1/0,d=1/0,C=1/0,M=-1/0,A=-1/0,x=-1/0;if(t<i)for(let s=t;s<i;s++){const t=3*a[s],e=r[t],n=r[t+1],i=r[t+2];g=Math.min(g,e),d=Math.min(d,n),C=Math.min(C,i),M=Math.max(M,e),A=Math.max(A,n),x=Math.max(x,i)}else g=s,d=e,C=n,M=s,A=e,x=n;o[p++]=g,o[p++]=d,o[p++]=C,o[p++]=M,o[p++]=A,o[p++]=x,c=Math.min(c,g),b=Math.min(b,d),l=Math.min(l,C),_=Math.max(_,M),u=Math.max(u,A),f=Math.max(f,x)}return this._aabb[0]=c,this._aabb[1]=b,this._aabb[2]=l,this._aabb[3]=_,this._aabb[4]=u,this._aabb[5]=f,o}_intersectComponents(t,s,e,n,i,o,a){let r=this._componentBvh;null==r&&(r=new c(this._positions,3,this._indices,this._components,this._ensureComponentAabbs(),this.geometryMinZ,this.planetCenterZ,this.localMode),this._componentBvh=r),r.intersectRay(t,s,e,n,i,o,a)}get geometryMinZ(){return this._aabb[2]}get planetCenterZ(){return this._planetCenter[2]}get numTriangles(){return this._indices.length/3}get localMode(){return 2===this.viewingMode}get positions(){return this._positions}get indices(){return this._indices}get aabb(){return this._ensureComponentAabbs(),this._aabb}}const l=a(),_=a(),u=e(),f=a(),g=e();export{b as IntersectionGeometry};
5
+ import{invert as t,transpose as s}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as e}from"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{a as n,o as i,u as o}from"../../../../../chunks/vec32.js";import{create as a}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as r}from"../../../../../geometry/support/aaBoundingBox.js";import{newFloatArray as h}from"../../../../../geometry/support/FloatArray.js";import{compactIndices as m,getContinuousIndexArray as p}from"../../../../../geometry/support/Indices.js";import{ComponentObjectElevationAgnosticComponentBVH as c}from"./ComponentObjectElevationAgnosticBVH.js";import{ComponentObjectFixedBVH as l}from"./ComponentObjectFixedBVH.js";class _{constructor(t,s,e,n){this.viewingMode=t,this.positionData=s,this._components=e,this._needsElevationAlignment=n,this.verticalOffset=null,this.componentVerticalOffsets=null,this._planetCenter=a(),this._componentBvh=null,this._aabb=r(),this._indices=s.indices?m(s.indices):p(s.positions.length/3),this._positions=s.positions}destroy(){this._positions=null,this._indices=null,this._perComponentAabbs=null,this._componentBvh=null}getComponentAabb(t,s){const e=this._ensureComponentAabbs(),n=6*t;return s[0]=e[n],s[1]=e[n+1],s[2]=e[n+2],s[3]=e[n+3],s[4]=e[n+4],s[5]=e[n+5],s}getComponentAabbs(){return this._ensureComponentAabbs()}_ensureComponentAabbs(){return this._perComponentAabbs||(this._perComponentAabbs=this._computePerComponentAabbs()),this._perComponentAabbs}getComponentPositions(t,s){s.indices=this._indices,s.data=this._positions,s.stride=3,s.startIndex=this._components.offsets[t],s.endIndex=this._components.offsets[t+1]}intersect(e,a,r,h,m,p,c){this.verticalOffset=r,this.componentVerticalOffsets=h;const{position:l}=m,_=n(b,e,l),C=n(u,a,l),M=t(f,m.rotationScale);i(_,_,M),i(C,C,M);const A=s(g,M);if(1===this.viewingMode){const t=this._planetCenter;o(t,l),i(t,t,M)}const v=(t,s,e,n)=>{c(e,t,n?i(d,n,A):null,s)};this._intersectComponents(_,C,h,r,v,p)}_computePerComponentAabbs(){const t=this._aabb,s=.5*(t[0]+t[3]),e=.5*(t[1]+t[4]),n=.5*(t[2]+t[5]),i=this._components.count,o=h(6*i),a=this._indices,r=this._positions,m=this._components.offsets;let p=0,c=1/0,l=1/0,_=1/0,b=-1/0,u=-1/0,f=-1/0;for(let h=0;h<i;h++){const t=m[h],i=m[h+1];let d=1/0,g=1/0,C=1/0,M=-1/0,A=-1/0,v=-1/0;if(t<i)for(let s=t;s<i;s++){const t=3*a[s],e=r[t],n=r[t+1],i=r[t+2];d=Math.min(d,e),g=Math.min(g,n),C=Math.min(C,i),M=Math.max(M,e),A=Math.max(A,n),v=Math.max(v,i)}else d=s,g=e,C=n,M=s,A=e,v=n;o[p++]=d,o[p++]=g,o[p++]=C,o[p++]=M,o[p++]=A,o[p++]=v,c=Math.min(c,d),l=Math.min(l,g),_=Math.min(_,C),b=Math.max(b,M),u=Math.max(u,A),f=Math.max(f,v)}return this._aabb[0]=c,this._aabb[1]=l,this._aabb[2]=_,this._aabb[3]=b,this._aabb[4]=u,this._aabb[5]=f,o}_intersectComponents(t,s,e,n,i,o){let a=this._componentBvh;null==a&&(a=this._needsElevationAlignment?new c(this._positions,C,this._indices,this._components,this._ensureComponentAabbs(),this.geometryMinZ,this.planetCenterZ,this.localMode):new l(this._positions,C,this._indices,0,this.numTriangles,this._components.offsets),this._componentBvh=a),a.intersectRay(t,s,o,i,e??void 0,n??void 0)}get geometryMinZ(){return this._aabb[2]}get planetCenterZ(){return this._planetCenter[2]}get numTriangles(){return this._indices.length/3}get localMode(){return 2===this.viewingMode}get positions(){return this._positions}get indices(){return this._indices}get aabb(){return this._ensureComponentAabbs(),this._aabb}}const b=a(),u=a(),f=e(),d=a(),g=e(),C=3;export{_ as IntersectionGeometry};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{invert as t,transpose as s}from"../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{clone as r}from"../../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{q as o,I as i}from"../../../../../../chunks/vec32.js";import{freeze as a,ZEROS as l}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{v as n}from"../../../../../../chunks/vec42.js";import{freeze as h,fromValues as u}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ComponentTechnique as c}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as p}from"./ComponentTechniqueConfiguration.js";import{parameter as d,parameterBlock as m,MaterialBase as v,MaterialParameterBlock as g}from"../../../core/material/MaterialBase.js";import{isColorEmission as x}from"../../../core/shaderLibrary/ShaderOutput.js";import{TwoVectorPosition as f}from"../../../core/util/TwoVectorPosition.js";import{advancedMRRFactors as M}from"../../../materials/pbrUtils.js";import{defaultHighlightName as b}from"../../../../../support/HighlightDefaults.js";import{alphaCutoff as y}from"../../../../../../webscene/support/AlphaCutoff.js";class T extends v{constructor(e,o){super(),this.toMapSpace=o,this.baseColor=h(1,1,1,1),this.usePBR=!1,this.hasParametersFromSource=!1,this.sphereDepthInterpolate=!1,this.mrrFactors=M,this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.normalTexture=null,this.occlusionTexture=null,this.emissionTexture=null,this.emissiveBaseColor=a(0,0,0),this.emissiveStrength=0,this.commonMaterialParameters=new S,this.componentParameters=new w,this.objectOpacity=1,this.textureAlphaCutoff=y,this.alphaDiscardMode=1,this.isIntegratedMesh=!1,this.polygonOffsetEnabled=!1,this.ellipsoidMode=1,this.hasOccludees=!1;const i=new f(e.position),l=r(e.rotationScale);t(l,l),s(l,l),this.transformNormalGlobalFromModel=l,this.transformWorldFromModelTL=i.low,this.transformWorldFromModelTH=i.high,this.transformWorldFromModelRS=e.rotationScale}dispose(){this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null}get _hasEmissiveBase(){return null!=this.emissionTexture||!o(this.emissiveBaseColor,l)}get _hasEmissiveStrength(){return 2!==this.componentParameters.emissiveOverride}get hasEmissions(){return this._hasEmissiveStrength&&(this._hasEmissiveBase||2!==this.componentParameters.emissiveSourceOverride)}get texture(){return this.baseColorTexture?.glTexture}get textureMetallicRoughness(){return this.metallicRoughnessTexture?.glTexture}get textureEmissive(){return this.emissionTexture?.glTexture}get textureOcclusion(){return this.occlusionTexture?.glTexture}get textureNormal(){return this.normalTexture?.glTexture}acquireTechnique(e,t,s,r){const o=new p(e.context.spherical);o.renderOccluded=9===s.slot,o.hasVertexColors=r.hasVertexColors,o.hasNormals=r.hasNormals,o.textureCoordinateType=r.textureCoordinateType,o.hasMetallicRoughnessTexture=null!=this.metallicRoughnessTexture,o.hasOcclusionTexture=null!=this.occlusionTexture,o.hasNormalTexture=null!=this.normalTexture,o.sphereDepthInterpolate=this.sphereDepthInterpolate&&1===e.viewingMode,o.oitPass=0===t.identifier&&null!=s.oitPass?s.oitPass:0,o.terrainDepthTest=0===t.identifier&&s.terrainDepthTest,o.cullAboveTerrain=0===t.identifier&&s.cullAboveTerrain,o.ellipsoidMode=this.ellipsoidMode,o.componentData=this.componentParameters.type,o.cullFace=this.commonMaterialParameters.cullFace,o.doubleSidedMode=this.commonMaterialParameters.doubleSided?1:0,o.hasColorTexture=null!=this.baseColorTexture;const i=this._computeWhichMaterialPass();o.blendingEnabled=1===i||2===i,o.alphaDiscardMode=this.alphaDiscardMode,o.integratedMeshMode=this.isIntegratedMesh?D(s)?P(s)?3:2:1:0,o.hasPolygonOffset=this.polygonOffsetEnabled,o.pbrMode=3===o.integratedMeshMode?4:this.usePBR?this.hasParametersFromSource?r.shadeNormals&&this.isIntegratedMesh?0:2:1:0;const a=1===this.componentParameters.emissiveSourceOverride,l=2===this.componentParameters.emissiveSourceOverride,n=null!=this.emissionTexture;if(o.emissionSource=this.hasEmissions?this._hasEmissiveBase&&1===o.pbrMode?l?n?4:2:a?n?5:7:6:a?7:6:0,o.shadeNormals=r.shadeNormals,o.normalType=o.hasNormals?1:2,o.hasSlicePlane=null!=s.slicePlane&&this.commonMaterialParameters.hasSlicePlane,o.receiveAmbientOcclusion=o.hasOccludees=o.receiveShadows=o.screenSpaceReflections=o.cloudReflections=o.hasHighlightMixTexture=!1,1===t.identifier)o.output=4,o.vertexDiscardMode=0;else if(3===t.identifier)o.output=7,o.vertexDiscardMode=0;else if(2===t.identifier)o.output=9,o.vertexDiscardMode=0,o.hasHighlightMixTexture=null!=s.highlightMixTexture;else{switch(o.vertexDiscardMode=2===i?t.transparent?2:1:0,o.hasGlow=x(t.output),o.output=t.output,t.output){case 0:case 1:o.receiveAmbientOcclusion=r.applySSAO&&null!=s.ssao?.getTexture(),o.hasOccludees=s.hasOccludees,o.receiveShadows=s.shadowMap.ready,o.screenSpaceReflections=null!=s.ssr.lastFrameColor,o.cloudReflections=null!=s.clouds.data?.cubeMap?.colorTexture;break;case 10:o.olidColor=!0}o.snowCover=s.snowCover>0}const h=e.get(c,o);return this._setClean(),h}submit(e,t,s){if(this.objectOpacity<=0)return;const{componentData:r,renderable:o}=s,{geometry:i}=o,a=o.meta.cameraDepthSquared;r.updateHighlights(t.highlights);const{geometryRanges:l,highlightRangesMap:n,shadowmapRanges:h}=r;switch(this._computeWhichMaterialPass()){case 0:e.opaque.submitDraw(this,i,l,a);break;case 1:e.transparent.submitDraw(this,i,l,a);break;case 2:e.opaque.submitDraw(this,i,l,a),e.transparent.submitDraw(this,i,l,a);break;case 3:e.integratedMesh.submitDraw(this,i,l,a),j(t)&&e.occludedGround.submitDraw(this,i,l,a),C(t)&&e.highlightIntegratedMesh.submitDraw(this,i,l,a);break;case 4:e.transparentIntegratedMesh.submitDraw(this,i,l,a)}if(2!==this.componentParameters.castShadows){if(null!=n)for(const t of n)t[0]===b&&e.highlightShadowMap.submitDraw(this,i,t[1],a,t[0]);null!=h&&e.defaultShadowMap.submitDraw(this,i,h,a),e.shadowMap.submitDraw(this,i,l,a)}if(null!=n)for(const u of n)e.highlight.submitDraw(this,i,u[1],a,u[0]);t.viewshedEnabled&&e.viewshedShadowMap.submitDraw(this,i,l,a)}_computeWhichMaterialPass(){if(this.isIntegratedMesh&&this.objectOpacity>=1)return 3;if(this.isIntegratedMesh&&this.objectOpacity<1)return 4;if(this.objectOpacity<1)return 1;if(0===this.componentParameters.opaqueOverride)return 0;if(this.baseColor[3]<1||0===this.alphaDiscardMode||3===this.alphaDiscardMode)return 1;switch(this.componentParameters.transparent){case 2:return 0;case 0:return 1;case 1:return 2}}}e([d({vectorOps:n})],T.prototype,"baseColor",void 0),e([d()],T.prototype,"usePBR",void 0),e([d()],T.prototype,"hasParametersFromSource",void 0),e([d()],T.prototype,"sphereDepthInterpolate",void 0),e([d({vectorOps:i})],T.prototype,"mrrFactors",void 0),e([d({dispose:!0})],T.prototype,"baseColorTexture",void 0),e([d({dispose:!0})],T.prototype,"metallicRoughnessTexture",void 0),e([d({dispose:!0})],T.prototype,"normalTexture",void 0),e([d({dispose:!0})],T.prototype,"occlusionTexture",void 0),e([d({dispose:!0})],T.prototype,"emissionTexture",void 0),e([d({vectorOps:i})],T.prototype,"emissiveBaseColor",void 0),e([d()],T.prototype,"emissiveStrength",void 0),e([m()],T.prototype,"commonMaterialParameters",void 0),e([m()],T.prototype,"componentParameters",void 0),e([d()],T.prototype,"objectOpacity",void 0),e([d()],T.prototype,"textureAlphaCutoff",void 0),e([d()],T.prototype,"alphaDiscardMode",void 0),e([d()],T.prototype,"isIntegratedMesh",void 0),e([d()],T.prototype,"polygonOffsetEnabled",void 0),e([d()],T.prototype,"ellipsoidMode",void 0),e([d()],T.prototype,"hasOccludees",void 0);class S extends g{constructor(){super(...arguments),this.doubleSided=!1,this.cullFace=2,this.hasSlicePlane=!0}}e([d()],S.prototype,"doubleSided",void 0),e([d()],S.prototype,"cullFace",void 0),e([d()],S.prototype,"hasSlicePlane",void 0);class w extends g{constructor(){super(...arguments),this.externalColor=u(1,1,1,1),this.externalColorMixMode=1,this.emissiveStrength=0,this.emissiveSource=0,this.castShadows=0}get transparent(){return this.externalColor[3]<1?0:2}get opaqueOverride(){return 3===this.externalColorMixMode&&1===this.externalColor[3]?0:2}get emissiveOverride(){return this.emissiveStrength>0?0:2}get emissiveSourceOverride(){return 1===this.emissiveSource?0:2}get visible(){return this.externalColor[3]>0?0:2}get type(){return 0}}e([d({vectorOps:n})],w.prototype,"externalColor",void 0),e([d()],w.prototype,"externalColorMixMode",void 0),e([d()],w.prototype,"emissiveStrength",void 0),e([d()],w.prototype,"emissiveSource",void 0),e([d()],w.prototype,"castShadows",void 0);class O extends g{constructor(){super(...arguments),this.texture=null,this.transparent=2,this.opaqueOverride=2,this.emissiveOverride=2,this.emissiveSourceOverride=2,this.castShadows=2}get type(){return 1}}function C(e){return null!=e.overlay?.getTexture(2)}function P(e){return null!=e.overlay?.getTexture(3)}function D(e){return null!=e.overlay?.getTexture(1)}function j(e){return null!=e.overlay?.getTexture(e.overlay?.allSourcesOccluders?1:4)}e([d()],O.prototype,"texture",void 0),e([d()],O.prototype,"transparent",void 0),e([d()],O.prototype,"opaqueOverride",void 0),e([d()],O.prototype,"emissiveOverride",void 0),e([d()],O.prototype,"emissiveSourceOverride",void 0),e([d()],O.prototype,"castShadows",void 0);export{S as CommonMaterialParameters,T as ComponentMaterial,w as ComponentParametersUniform,O as ComponentParametersVarying};
5
+ import{__decorate as e}from"tslib";import{invert as t,transpose as s}from"../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{clone as r}from"../../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{q as o,I as i}from"../../../../../../chunks/vec32.js";import{freeze as a,ZEROS as l}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{v as n}from"../../../../../../chunks/vec42.js";import{freeze as h,fromValues as u}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ComponentTechnique as c}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as p}from"./ComponentTechniqueConfiguration.js";import{parameter as d,parameterBlock as m,MaterialBase as v,MaterialParameterBlock as g}from"../../../core/material/MaterialBase.js";import{TwoVectorPosition as x}from"../../../core/util/TwoVectorPosition.js";import{advancedMRRFactors as f}from"../../../materials/pbrUtils.js";import{defaultHighlightName as M}from"../../../../../support/HighlightDefaults.js";import{alphaCutoff as b}from"../../../../../../webscene/support/AlphaCutoff.js";class y extends v{constructor(e,o){super(),this.toMapSpace=o,this.baseColor=h(1,1,1,1),this.usePBR=!1,this.hasParametersFromSource=!1,this.sphereDepthInterpolate=!1,this.mrrFactors=f,this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.normalTexture=null,this.occlusionTexture=null,this.emissionTexture=null,this.emissiveBaseColor=a(0,0,0),this.emissiveStrength=0,this.commonMaterialParameters=new T,this.componentParameters=new S,this.objectOpacity=1,this.textureAlphaCutoff=b,this.alphaDiscardMode=1,this.isIntegratedMesh=!1,this.polygonOffsetEnabled=!1,this.ellipsoidMode=1,this.hasOccludees=!1;const i=new x(e.position),l=r(e.rotationScale);t(l,l),s(l,l),this.transformNormalGlobalFromModel=l,this.transformWorldFromModelTL=i.low,this.transformWorldFromModelTH=i.high,this.transformWorldFromModelRS=e.rotationScale}dispose(){this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null}get _hasEmissiveBase(){return null!=this.emissionTexture||!o(this.emissiveBaseColor,l)}get _hasEmissiveStrength(){return 2!==this.componentParameters.emissiveOverride}get hasEmissions(){return this._hasEmissiveStrength&&(this._hasEmissiveBase||2!==this.componentParameters.emissiveSourceOverride)}get texture(){return this.baseColorTexture?.glTexture}get textureMetallicRoughness(){return this.metallicRoughnessTexture?.glTexture}get textureEmissive(){return this.emissionTexture?.glTexture}get textureOcclusion(){return this.occlusionTexture?.glTexture}get textureNormal(){return this.normalTexture?.glTexture}acquireTechnique(e,t,s,r){const o=new p(e.context.spherical);o.renderOccluded=9===s.slot,o.hasVertexColors=r.hasVertexColors,o.hasNormals=r.hasNormals,o.textureCoordinateType=r.textureCoordinateType,o.hasMetallicRoughnessTexture=null!=this.metallicRoughnessTexture,o.hasOcclusionTexture=null!=this.occlusionTexture,o.hasNormalTexture=null!=this.normalTexture,o.sphereDepthInterpolate=this.sphereDepthInterpolate&&1===e.viewingMode,o.oitPass=0===t.identifier&&null!=s.oitPass?s.oitPass:0,o.terrainDepthTest=0===t.identifier&&s.terrainDepthTest,o.cullAboveTerrain=0===t.identifier&&s.cullAboveTerrain,o.ellipsoidMode=this.ellipsoidMode,o.componentData=this.componentParameters.type,o.cullFace=this.commonMaterialParameters.cullFace,o.doubleSidedMode=this.commonMaterialParameters.doubleSided?1:0,o.hasColorTexture=null!=this.baseColorTexture;const i=this._computeWhichMaterialPass();o.blendingEnabled=1===i||2===i,o.alphaDiscardMode=this.alphaDiscardMode,o.integratedMeshMode=this.isIntegratedMesh?P(s)?C(s)?3:2:1:0,o.hasPolygonOffset=this.polygonOffsetEnabled,o.pbrMode=3===o.integratedMeshMode?4:this.usePBR?this.hasParametersFromSource?r.shadeNormals&&this.isIntegratedMesh?0:2:1:0;const a=1===this.componentParameters.emissiveSourceOverride,l=2===this.componentParameters.emissiveSourceOverride,n=null!=this.emissionTexture;if(o.emissionSource=this.hasEmissions?this._hasEmissiveBase&&1===o.pbrMode?l?n?4:2:a?n?5:7:6:a?7:6:0,o.shadeNormals=r.shadeNormals,o.normalType=o.hasNormals?1:2,o.hasSlicePlane=null!=s.slicePlane&&this.commonMaterialParameters.hasSlicePlane,o.receiveAmbientOcclusion=o.hasOccludees=o.receiveShadows=o.screenSpaceReflections=o.cloudReflections=o.hasHighlightMixTexture=!1,1===t.identifier)o.output=4,o.vertexDiscardMode=0;else if(3===t.identifier)o.output=7,o.vertexDiscardMode=0;else if(2===t.identifier)o.output=9,o.vertexDiscardMode=0,o.hasHighlightMixTexture=null!=s.highlightMixTexture;else{switch(o.vertexDiscardMode=2===i?t.transparent?2:1:0,o.output=t.output,t.output){case 0:case 1:o.receiveAmbientOcclusion=r.applySSAO&&null!=s.ssao?.getTexture(),o.hasOccludees=s.hasOccludees,o.receiveShadows=s.shadowMap.ready,o.screenSpaceReflections=null!=s.ssr.lastFrameColor,o.cloudReflections=null!=s.clouds.data?.cubeMap?.colorTexture;break;case 10:o.olidColor=!0}o.snowCover=s.snowCover>0}const h=e.get(c,o);return this._setClean(),h}submit(e,t,s){if(this.objectOpacity<=0)return;const{componentData:r,renderable:o}=s,{geometry:i}=o,a=o.meta.cameraDepthSquared;r.updateHighlights(t.highlights);const{geometryRanges:l,highlightRangesMap:n,shadowmapRanges:h}=r;switch(this._computeWhichMaterialPass()){case 0:e.opaque.submitDraw(this,i,l,a);break;case 1:e.transparent.submitDraw(this,i,l,a);break;case 2:e.opaque.submitDraw(this,i,l,a),e.transparent.submitDraw(this,i,l,a);break;case 3:e.integratedMesh.submitDraw(this,i,l,a),D(t)&&e.occludedGround.submitDraw(this,i,l,a),O(t)&&e.highlightIntegratedMesh.submitDraw(this,i,l,a);break;case 4:e.transparentIntegratedMesh.submitDraw(this,i,l,a)}if(2!==this.componentParameters.castShadows){if(null!=n)for(const t of n)t[0]===M&&e.highlightShadowMap.submitDraw(this,i,t[1],a,t[0]);null!=h&&e.defaultShadowMap.submitDraw(this,i,h,a),e.shadowMap.submitDraw(this,i,l,a)}if(null!=n)for(const u of n)e.highlight.submitDraw(this,i,u[1],a,u[0]);t.viewshedEnabled&&e.viewshedShadowMap.submitDraw(this,i,l,a)}_computeWhichMaterialPass(){if(this.isIntegratedMesh&&this.objectOpacity>=1)return 3;if(this.isIntegratedMesh&&this.objectOpacity<1)return 4;if(this.objectOpacity<1)return 1;if(0===this.componentParameters.opaqueOverride)return 0;if(this.baseColor[3]<1||0===this.alphaDiscardMode||3===this.alphaDiscardMode)return 1;switch(this.componentParameters.transparent){case 2:return 0;case 0:return 1;case 1:return 2}}}e([d({vectorOps:n})],y.prototype,"baseColor",void 0),e([d()],y.prototype,"usePBR",void 0),e([d()],y.prototype,"hasParametersFromSource",void 0),e([d()],y.prototype,"sphereDepthInterpolate",void 0),e([d({vectorOps:i})],y.prototype,"mrrFactors",void 0),e([d({dispose:!0})],y.prototype,"baseColorTexture",void 0),e([d({dispose:!0})],y.prototype,"metallicRoughnessTexture",void 0),e([d({dispose:!0})],y.prototype,"normalTexture",void 0),e([d({dispose:!0})],y.prototype,"occlusionTexture",void 0),e([d({dispose:!0})],y.prototype,"emissionTexture",void 0),e([d({vectorOps:i})],y.prototype,"emissiveBaseColor",void 0),e([d()],y.prototype,"emissiveStrength",void 0),e([m()],y.prototype,"commonMaterialParameters",void 0),e([m()],y.prototype,"componentParameters",void 0),e([d()],y.prototype,"objectOpacity",void 0),e([d()],y.prototype,"textureAlphaCutoff",void 0),e([d()],y.prototype,"alphaDiscardMode",void 0),e([d()],y.prototype,"isIntegratedMesh",void 0),e([d()],y.prototype,"polygonOffsetEnabled",void 0),e([d()],y.prototype,"ellipsoidMode",void 0),e([d()],y.prototype,"hasOccludees",void 0);class T extends g{constructor(){super(...arguments),this.doubleSided=!1,this.cullFace=2,this.hasSlicePlane=!0}}e([d()],T.prototype,"doubleSided",void 0),e([d()],T.prototype,"cullFace",void 0),e([d()],T.prototype,"hasSlicePlane",void 0);class S extends g{constructor(){super(...arguments),this.externalColor=u(1,1,1,1),this.externalColorMixMode=1,this.emissiveStrength=0,this.emissiveSource=0,this.castShadows=0}get transparent(){return this.externalColor[3]<1?0:2}get opaqueOverride(){return 3===this.externalColorMixMode&&1===this.externalColor[3]?0:2}get emissiveOverride(){return this.emissiveStrength>0?0:2}get emissiveSourceOverride(){return 1===this.emissiveSource?0:2}get visible(){return this.externalColor[3]>0?0:2}get type(){return 0}}e([d({vectorOps:n})],S.prototype,"externalColor",void 0),e([d()],S.prototype,"externalColorMixMode",void 0),e([d()],S.prototype,"emissiveStrength",void 0),e([d()],S.prototype,"emissiveSource",void 0),e([d()],S.prototype,"castShadows",void 0);class w extends g{constructor(){super(...arguments),this.texture=null,this.transparent=2,this.opaqueOverride=2,this.emissiveOverride=2,this.emissiveSourceOverride=2,this.castShadows=2}get type(){return 1}}function O(e){return null!=e.overlay?.getTexture(2)}function C(e){return null!=e.overlay?.getTexture(3)}function P(e){return null!=e.overlay?.getTexture(1)}function D(e){return null!=e.overlay?.getTexture(e.overlay?.allSourcesOccluders?1:4)}e([d()],w.prototype,"texture",void 0),e([d()],w.prototype,"transparent",void 0),e([d()],w.prototype,"opaqueOverride",void 0),e([d()],w.prototype,"emissiveOverride",void 0),e([d()],w.prototype,"emissiveSourceOverride",void 0),e([d()],w.prototype,"castShadows",void 0);export{T as CommonMaterialParameters,y as ComponentMaterial,S as ComponentParametersUniform,w as ComponentParametersVarying};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as o}from"tslib";import{isColorEmissionHighlightOrOID as e}from"../../../core/shaderLibrary/ShaderOutput.js";import{parameter as t,ShaderTechniqueConfiguration as i}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class s extends i{constructor(o){super(),this.spherical=o,this.output=0,this.textureCoordinateType=0,this.componentData=0,this.cullFace=2,this.vertexDiscardMode=0,this.doubleSidedMode=2,this.alphaDiscardMode=1,this.integratedMeshMode=0,this.oitPass=0,this.ellipsoidMode=1,this.pbrMode=0,this.normalType=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasNormals=!1,this.shadeNormals=!0,this.hasSlicePlane=!1,this.hasColorTexture=!1,this.hasHighlightMixTexture=!1,this.receiveAmbientOcclusion=!0,this.receiveShadows=!0,this.blendingEnabled=!0,this.screenSpaceReflections=!1,this.hasPolygonOffset=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasNormalTextureTransform=!1,this.cloudReflections=!0,this.snowCover=!1,this.olidColor=!1,this.hasGlow=!1,this.renderOccluded=!1,this.sphereDepthInterpolate=!1,this.discardInvisibleFragments=!1,this.occlusionPass=!1,this.bindType=2,this.useCustomDTRExponentForWater=!1,this.hasVertexTangents=!1,this.highStepCount=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.useFillLights=!0,this.draped=!1}get overlayEnabled(){return(2===this.integratedMeshMode||3===this.integratedMeshMode)&&e(this.output)}}o([t({count:11})],s.prototype,"output",void 0),o([t({count:3})],s.prototype,"textureCoordinateType",void 0),o([t({count:2})],s.prototype,"componentData",void 0),o([t({count:3})],s.prototype,"cullFace",void 0),o([t({count:3})],s.prototype,"vertexDiscardMode",void 0),o([t({count:3})],s.prototype,"doubleSidedMode",void 0),o([t({count:4})],s.prototype,"alphaDiscardMode",void 0),o([t({count:4})],s.prototype,"integratedMeshMode",void 0),o([t({count:3})],s.prototype,"oitPass",void 0),o([t({count:4})],s.prototype,"ellipsoidMode",void 0),o([t({count:7})],s.prototype,"pbrMode",void 0),o([t({count:3})],s.prototype,"normalType",void 0),o([t({count:8})],s.prototype,"emissionSource",void 0),o([t()],s.prototype,"hasVertexColors",void 0),o([t()],s.prototype,"hasNormals",void 0),o([t()],s.prototype,"shadeNormals",void 0),o([t()],s.prototype,"hasSlicePlane",void 0),o([t()],s.prototype,"hasColorTexture",void 0),o([t()],s.prototype,"hasHighlightMixTexture",void 0),o([t()],s.prototype,"receiveAmbientOcclusion",void 0),o([t()],s.prototype,"receiveShadows",void 0),o([t()],s.prototype,"blendingEnabled",void 0),o([t()],s.prototype,"screenSpaceReflections",void 0),o([t()],s.prototype,"hasPolygonOffset",void 0),o([t()],s.prototype,"hasMetallicRoughnessTexture",void 0),o([t()],s.prototype,"hasOcclusionTexture",void 0),o([t()],s.prototype,"hasNormalTexture",void 0),o([t()],s.prototype,"hasOccludees",void 0),o([t()],s.prototype,"terrainDepthTest",void 0),o([t()],s.prototype,"cullAboveTerrain",void 0),o([t()],s.prototype,"hasNormalTextureTransform",void 0),o([t()],s.prototype,"cloudReflections",void 0),o([t()],s.prototype,"snowCover",void 0),o([t()],s.prototype,"olidColor",void 0),o([t()],s.prototype,"hasGlow",void 0),o([t()],s.prototype,"renderOccluded",void 0),o([t()],s.prototype,"sphereDepthInterpolate",void 0);export{s as ComponentTechniqueConfiguration};
5
+ import{__decorate as o}from"tslib";import{isColorEmissionHighlightOrOID as e}from"../../../core/shaderLibrary/ShaderOutput.js";import{parameter as t,ShaderTechniqueConfiguration as i}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class s extends i{constructor(o){super(),this.spherical=o,this.output=0,this.textureCoordinateType=0,this.componentData=0,this.cullFace=2,this.vertexDiscardMode=0,this.doubleSidedMode=2,this.alphaDiscardMode=1,this.integratedMeshMode=0,this.oitPass=0,this.ellipsoidMode=1,this.pbrMode=0,this.normalType=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasNormals=!1,this.shadeNormals=!0,this.hasSlicePlane=!1,this.hasColorTexture=!1,this.hasHighlightMixTexture=!1,this.receiveAmbientOcclusion=!0,this.receiveShadows=!0,this.blendingEnabled=!0,this.screenSpaceReflections=!1,this.hasPolygonOffset=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasNormalTextureTransform=!1,this.cloudReflections=!0,this.snowCover=!1,this.olidColor=!1,this.renderOccluded=!1,this.sphereDepthInterpolate=!1,this.discardInvisibleFragments=!1,this.occlusionPass=!1,this.bindType=2,this.useCustomDTRExponentForWater=!1,this.hasVertexTangents=!1,this.highStepCount=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.useFillLights=!0,this.draped=!1}get overlayEnabled(){return(2===this.integratedMeshMode||3===this.integratedMeshMode)&&e(this.output)}}o([t({count:11})],s.prototype,"output",void 0),o([t({count:3})],s.prototype,"textureCoordinateType",void 0),o([t({count:2})],s.prototype,"componentData",void 0),o([t({count:3})],s.prototype,"cullFace",void 0),o([t({count:3})],s.prototype,"vertexDiscardMode",void 0),o([t({count:3})],s.prototype,"doubleSidedMode",void 0),o([t({count:4})],s.prototype,"alphaDiscardMode",void 0),o([t({count:4})],s.prototype,"integratedMeshMode",void 0),o([t({count:3})],s.prototype,"oitPass",void 0),o([t({count:4})],s.prototype,"ellipsoidMode",void 0),o([t({count:7})],s.prototype,"pbrMode",void 0),o([t({count:3})],s.prototype,"normalType",void 0),o([t({count:8})],s.prototype,"emissionSource",void 0),o([t()],s.prototype,"hasVertexColors",void 0),o([t()],s.prototype,"hasNormals",void 0),o([t()],s.prototype,"shadeNormals",void 0),o([t()],s.prototype,"hasSlicePlane",void 0),o([t()],s.prototype,"hasColorTexture",void 0),o([t()],s.prototype,"hasHighlightMixTexture",void 0),o([t()],s.prototype,"receiveAmbientOcclusion",void 0),o([t()],s.prototype,"receiveShadows",void 0),o([t()],s.prototype,"blendingEnabled",void 0),o([t()],s.prototype,"screenSpaceReflections",void 0),o([t()],s.prototype,"hasPolygonOffset",void 0),o([t()],s.prototype,"hasMetallicRoughnessTexture",void 0),o([t()],s.prototype,"hasOcclusionTexture",void 0),o([t()],s.prototype,"hasNormalTexture",void 0),o([t()],s.prototype,"hasOccludees",void 0),o([t()],s.prototype,"terrainDepthTest",void 0),o([t()],s.prototype,"cullAboveTerrain",void 0),o([t()],s.prototype,"hasNormalTextureTransform",void 0),o([t()],s.prototype,"cloudReflections",void 0),o([t()],s.prototype,"snowCover",void 0),o([t()],s.prototype,"olidColor",void 0),o([t()],s.prototype,"renderOccluded",void 0),o([t()],s.prototype,"sphereDepthInterpolate",void 0);export{s as ComponentTechniqueConfiguration};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- class t{constructor(t,s,o,r){this.toMapSpace=t,this.transform=s,this.obb=o,this.geometry=r}}export{t as ObjectParameters};
5
+ class t{constructor(t,s,o,e,i){this.toMapSpace=t,this.transform=s,this.obb=o,this.geometry=e,this.elevationAlignable=i}}export{t as ObjectParameters};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{newLayout as e}from"../../../support/buffer/InterleavedLayout.js";import{NoParameters as o}from"../../../../webgl/NoParameters.js";class r extends o{constructor(e,o,r,t,s){super(),this.hasVertexColors=e,this.textureCoordinateType=o,this.hasNormals=r,this.shadeNormals=t,this.applySSAO=s}}function t(o){const r=e().vec3f("position");return o.hasNormals&&r.vec2i16("normalCompressed",{glNormalized:!0}),1===o.textureCoordinateType?r.vec2f("uv0"):2===o.textureCoordinateType&&(r.vec2f("uv0"),r.vec4u16("uvRegion",{glNormalized:!0})),o.hasVertexColors&&r.vec4u8("color",{glNormalized:!0}),r.freeze()}export{r as GeometryParameters,t as createVertexBufferLayout};
5
+ import{newLayout as e}from"../../../support/buffer/InterleavedLayout.js";import{NoParameters as o}from"../../../../webgl/NoParameters.js";class t{constructor(e,o,t,s){this.vertices=e,this.positionData=o,this.indices=t,this.componentOffsets=s}}class s extends o{constructor(e,o,t,s,r){super(),this.hasVertexColors=e,this.textureCoordinateType=o,this.hasNormals=t,this.shadeNormals=s,this.applySSAO=r}}function r(o){const t=e().vec3f("position");return o.hasNormals&&t.vec2i16("normalCompressed",{glNormalized:!0}),1===o.textureCoordinateType?t.vec2f("uv0"):2===o.textureCoordinateType&&(t.vec2f("uv0"),t.vec4u16("uvRegion",{glNormalized:!0})),o.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),t.freeze()}export{s as GeometryParameters,t as SourceGeometry,r as createVertexBufferLayout};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{watch as r}from"../../../../../core/reactiveUtils.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as t}from"../../../../../core/accessorSupport/decorators/subclass.js";import{InternalRenderCategory as o}from"../../../webgl.js";import i from"../../../webgl/RenderNode.js";import{F as a}from"../../../../../chunks/FocusAreaColor.glsl.js";import{FocusAreaColorTechnique as c}from"./FocusAreaColorTechnique.js";import{DepthStencilAttachment as n}from"../../../../webgl/enums.js";let m=class extends i{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[o.FOCUSAREA_COLOR,o.FOCUSAREA]},this.produces=o.FOCUSAREA_COLOR,this._fadeDirection=0,this._passParameters=new a}precompile(){this.techniques.precompile(c)}fadeOut(e){this.removeAllHandles(),this._startTime=null,this._fadeDirection=1,this.addHandles(r(()=>this._passParameters.fadeFactor.value,r=>{0===r&&(this.removeAllHandles(),e())})),this.requestRender(1)}render(e){const r=this.techniques.get(c),s=e.find(({name:e})=>e===this.produces);if(!r.compiled)return this.requestRender(1),s;const t=this.focusAreasView.style,i=this.bindParameters,a=i.camera,m=a.fullViewport[2],p=a.fullViewport[3];this._startTime??=this.view.stage?.renderer.renderContext.time;const h=this.view.qualitySettings.fadeDuration,u=h>0?Math.min(h,this.view.stage?.renderer.renderContext.time-this._startTime)/h:1,l=e.find(({name:e})=>e===o.FOCUSAREA),f=this.fboCache.acquire(m,p,this.produces),A=this.renderingContext;return A.bindFramebuffer(f.fbo),this._passParameters.color=s.getTexture(),this._passParameters.focusArea=l.getTexture(),this._passParameters.effect=d[t],this._passParameters.fadeFactor.value=0===this._fadeDirection?u:1-u,A.bindTechnique(r,i,this._passParameters),A.screen.draw(),f.attachDepth(s.getAttachment(n)),u<1&&this.requestRender(1),f}};e([s()],m.prototype,"consumes",void 0),e([s()],m.prototype,"produces",void 0),e([s({constructOnly:!0})],m.prototype,"focusAreasView",void 0),m=e([t("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaColorNode")],m);const d={bright:0,dark:1};export{m as FocusAreaColorNode};
5
+ import{__decorate as e}from"tslib";import{watch as r}from"../../../../../core/reactiveUtils.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as t}from"../../../../../core/accessorSupport/decorators/subclass.js";import{InternalRenderCategory as o}from"../../../webgl.js";import i from"../../../webgl/RenderNode.js";import{F as a}from"../../../../../chunks/FocusAreaColor.glsl.js";import{FocusAreaColorTechnique as c}from"./FocusAreaColorTechnique.js";import{DepthStencilAttachment as n}from"../../../../webgl/enums.js";let m=class extends i{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[o.FOCUSAREA_COLOR,o.FOCUSAREA]},this.produces=o.FOCUSAREA_COLOR,this._fadeDirection=0,this._passParameters=new a}precompile(){this.techniques.precompile(c)}fadeOut(e){this.removeAllHandles(),this._startTime=null,this._fadeDirection=1,this.addHandles(r(()=>this._passParameters.fadeFactor.value,r=>{0===r&&(this.removeAllHandles(),e())})),this.requestRender(2)}render(e){const r=this.techniques.get(c),s=e.find(({name:e})=>e===this.produces);if(!r.compiled)return this.requestRender(1),s;const t=this.focusAreasView.style,i=this.bindParameters,a=i.camera,m=a.fullViewport[2],p=a.fullViewport[3];this._startTime??=this.view.stage?.renderer.renderContext.time;const h=this.view.qualitySettings.fadeDuration,u=h>0?Math.min(h,this.view.stage?.renderer.renderContext.time-this._startTime)/h:1,l=e.find(({name:e})=>e===o.FOCUSAREA),f=this.fboCache.acquire(m,p,this.produces),A=this.renderingContext;return A.bindFramebuffer(f.fbo),this._passParameters.color=s.getTexture(),this._passParameters.focusArea=l.getTexture(),this._passParameters.effect=d[t],this._passParameters.fadeFactor.value=0===this._fadeDirection?u:1-u,A.bindTechnique(r,i,this._passParameters),A.screen.draw(),f.attachDepth(s.getAttachment(n)),u<1&&this.requestRender(2),f}};e([s()],m.prototype,"consumes",void 0),e([s()],m.prototype,"produces",void 0),e([s({constructOnly:!0})],m.prototype,"focusAreasView",void 0),m=e([t("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaColorNode")],m);const d={bright:0,dark:1};export{m 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.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{clamp as r}from"../../../../../core/mathUtils.js";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{watch as s}from"../../../../../core/reactiveUtils.js";import{Milliseconds as i}from"../../../../../core/time.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators/subclass.js";import{set as m}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{InternalRenderCategory as n}from"../../../webgl.js";import p from"../../../webgl/RenderNode.js";import{distanceFadeEnd as c,distanceFadeStart as h}from"../../core/shaderLibrary/shading/ScreenSpaceConstants.js";import{SSAOBlurTechnique as u}from"./SSAOBlurTechnique.js";import{noiseData as l}from"./SSAONoiseData.js";import{SSAOPassParameters as d,BlurDrawParameters as f}from"./SSAOParameters.js";import{SSAOTechnique as b}from"./SSAOTechnique.js";import{g as w}from"../../../../../chunks/SSAO.glsl.js";import{DepthStencilAttachment as S}from"../../../../webgl/enums.js";import{Texture as T}from"../../../../webgl/Texture.js";import{TextureDescriptor as _}from"../../../../webgl/TextureDescriptor.js";const g=2;let j=class extends p{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=n.SSAO,this.isEnabled=()=>!1,this._enableTime=i(0),this._passParameters=new d,this._drawParameters=new f}initialize(){const e=Uint8Array.from(atob(l),e=>e.charCodeAt(0)),r=new _(32);r.wrapMode=33071,r.pixelFormat=6407,r.wrapMode=10497,r.hasMipmap=!0,this._passParameters.noiseTexture=new T(this.renderingContext,r,e),this.techniques.precompile(b),this.techniques.precompile(u),this.addHandles(s(()=>this.isEnabled(),()=>this._enableTime=i(0)))}destroy(){this._passParameters.noiseTexture=t(this._passParameters.noiseTexture)}render(e){const t=e.find(({name:e})=>"normals"===e),s=t?.getTexture(),o=t?.getTexture(S);if(!s||!o)return;const a=this.techniques.get(b),p=this.techniques.get(u);if(!a.compiled||!p.compiled)return this._enableTime=i(performance.now()),void this.requestRender(1);0===this._enableTime&&(this._enableTime=i(performance.now()));const l=this.renderingContext,d=this.view.qualitySettings.fadeDuration,f=this.bindParameters,T=f.camera,_=T.relativeElevation,j=r((c-_)/(c-h),0,1),x=d>0?Math.min(d,performance.now()-this._enableTime)/d:1,q=x*j;this._passParameters.normalTexture=s,this._passParameters.depthTexture=o,this._passParameters.projScale=1/T.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*P/w(T)**6*q;const v=T.fullViewport[2],y=T.fullViewport[3],A=this.fboCache.acquire(v,y,"ssao input",2);l.bindFramebuffer(A.fbo),l.setViewport(0,0,v,y),l.bindTechnique(a,f,this._passParameters,this._drawParameters),l.screen.draw();const C=Math.round(v/g),O=Math.round(y/g),V=this.fboCache.acquire(C,O,"ssao blur",0);l.bindFramebuffer(V.fbo),this._drawParameters.colorTexture=A.getTexture(),m(this._drawParameters.blurSize,0,g/y),l.bindTechnique(p,f,this._passParameters,this._drawParameters),l.setViewport(0,0,C,O),l.screen.draw(),A.release();const M=this.fboCache.acquire(C,O,n.SSAO,0);return l.bindFramebuffer(M.fbo),l.setViewport(0,0,v,y),l.setClearColor(1,1,1,0),l.clear(16384),this._drawParameters.colorTexture=V.getTexture(),m(this._drawParameters.blurSize,g/v,0),l.bindTechnique(p,f,this._passParameters,this._drawParameters),l.setViewport(0,0,C,O),l.screen.draw(),l.setViewport4fv(T.fullViewport),V.release(),x<1&&this.requestRender(1),M}};e([o()],j.prototype,"consumes",void 0),e([o()],j.prototype,"produces",void 0),e([o({constructOnly:!0})],j.prototype,"isEnabled",void 0),j=e([a("esri.views.3d.webgl-engine.effects.ssao.SSAO")],j);const P=.5;export{j as SSAO,g as blurSizePixels};
5
+ import{__decorate as e}from"tslib";import{clamp as r}from"../../../../../core/mathUtils.js";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{watch as s}from"../../../../../core/reactiveUtils.js";import{Milliseconds as i}from"../../../../../core/time.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators/subclass.js";import{set as m}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{InternalRenderCategory as n}from"../../../webgl.js";import p from"../../../webgl/RenderNode.js";import{distanceFadeEnd as c,distanceFadeStart as h}from"../../core/shaderLibrary/shading/ScreenSpaceConstants.js";import{SSAOBlurTechnique as u}from"./SSAOBlurTechnique.js";import{noiseData as l}from"./SSAONoiseData.js";import{SSAOPassParameters as d,BlurDrawParameters as f}from"./SSAOParameters.js";import{SSAOTechnique as b}from"./SSAOTechnique.js";import{g as w}from"../../../../../chunks/SSAO.glsl.js";import{DepthStencilAttachment as S}from"../../../../webgl/enums.js";import{Texture as T}from"../../../../webgl/Texture.js";import{TextureDescriptor as _}from"../../../../webgl/TextureDescriptor.js";const g=2;let j=class extends p{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=n.SSAO,this.isEnabled=()=>!1,this._enableTime=i(0),this._passParameters=new d,this._drawParameters=new f}initialize(){const e=Uint8Array.from(atob(l),e=>e.charCodeAt(0)),r=new _(32);r.wrapMode=33071,r.pixelFormat=6407,r.wrapMode=10497,r.hasMipmap=!0,this._passParameters.noiseTexture=new T(this.renderingContext,r,e),this.techniques.precompile(b),this.techniques.precompile(u),this.addHandles(s(()=>this.isEnabled(),()=>this._enableTime=i(0)))}destroy(){this._passParameters.noiseTexture=t(this._passParameters.noiseTexture)}render(e){const t=e.find(({name:e})=>"normals"===e),s=t?.getTexture(),o=t?.getTexture(S);if(!s||!o)return;const a=this.techniques.get(b),p=this.techniques.get(u);if(!a.compiled||!p.compiled)return this._enableTime=i(performance.now()),void this.requestRender(1);0===this._enableTime&&(this._enableTime=i(performance.now()));const l=this.renderingContext,d=this.view.qualitySettings.fadeDuration,f=this.bindParameters,T=f.camera,_=T.relativeElevation,j=r((c-_)/(c-h),0,1),x=d>0?Math.min(d,performance.now()-this._enableTime)/d:1,q=x*j;this._passParameters.normalTexture=s,this._passParameters.depthTexture=o,this._passParameters.projScale=1/T.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*P/w(T)**6*q;const v=T.fullViewport[2],y=T.fullViewport[3],A=this.fboCache.acquire(v,y,"ssao input",2);l.bindFramebuffer(A.fbo),l.setViewport(0,0,v,y),l.bindTechnique(a,f,this._passParameters,this._drawParameters),l.screen.draw();const C=Math.round(v/g),O=Math.round(y/g),V=this.fboCache.acquire(C,O,"ssao blur",0);l.bindFramebuffer(V.fbo),this._drawParameters.colorTexture=A.getTexture(),m(this._drawParameters.blurSize,0,g/y),l.bindTechnique(p,f,this._passParameters,this._drawParameters),l.setViewport(0,0,C,O),l.screen.draw(),A.release();const M=this.fboCache.acquire(C,O,n.SSAO,0);return l.bindFramebuffer(M.fbo),l.setViewport(0,0,v,y),l.setClearColor(1,1,1,0),l.clear(16384),this._drawParameters.colorTexture=V.getTexture(),m(this._drawParameters.blurSize,g/v,0),l.bindTechnique(p,f,this._passParameters,this._drawParameters),l.setViewport(0,0,C,O),l.screen.draw(),l.setViewport4fv(T.fullViewport),V.release(),x<1&&this.requestRender(2),M}};e([o()],j.prototype,"consumes",void 0),e([o()],j.prototype,"produces",void 0),e([o({constructOnly:!0})],j.prototype,"isEnabled",void 0),j=e([a("esri.views.3d.webgl-engine.effects.ssao.SSAO")],j);const P=.5;export{j as SSAO,g as blurSizePixels};
@@ -12,7 +12,4 @@ smoothstep(0.0, 0.1, dot(shadingNormal, groundNormal)));
12
12
  return snow * snowCover;
13
13
  }`),e.code.add(r`vec3 applySnowToMRR(vec3 mrr, float snow) {
14
14
  return mix(mrr, vec3(0.0, 1.0, 0.04), snow);
15
- }
16
- vec4 snowCoverForEmissions(vec4 emission, float snow) {
17
- return mix(emission, vec4(0.0), snow);
18
15
  }`))}export{e as SnowCover};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{a as n,i as t,c as o,h as i,n as e}from"../../../../chunks/vec32.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{setMin as s,create as f,setMax as r}from"../../../../geometry/support/aaBoundingBox.js";import{assert as u}from"./Util.js";class a{constructor(n=!1,t=!0){this.isVerticalRay=n,this.normalRequired=t}}const l=f();function h(t,o,i,e,c,s){if(!t.visible)return;const f=n(D,e,i),r=(n,t,o)=>{s(n,o,t)},l=new a(!1,o.options.normalRequired);if(t.boundingInfo){u(0===t.type);const n=o.tolerance;m(t.boundingInfo,i,f,n,c,l,r)}else{const n=t.positionAttribute,o=n.indices;q(i,f,0,o.length/3,o,n.data,n.stride,c,l,r)}}const p=c();function m(n,t,o,i,e,c,f){if(null==n)return;const u=k(o,p);if(s(l,n.bbMin),r(l,n.bbMax),null!=e&&e.applyToAabb(l),w(l,t,u,i)){const{primitiveIndices:s,position:r}=n,u=s?s.length:r.indices.length/3;if(u>U){const s=n.getChildren();if(void 0!==s){for(const n of s)m(n,t,o,i,e,c,f);return}}y(t,o,0,u,r.indices,r.data,r.stride,s,e,c,f)}}const M=c();function d(t,o,i,e,c,s,f,r,u){const{data:a,stride:l}=s;q(t,n(D,o,t),i,e,c,a,l,f,r,u)}function b(n,t,o,i,e,c,s,f,r,u=null,a=0){const l=n[0],h=n[1],p=n[2],m=t[0],d=t[1],b=t[2];for(let x=o;x<i;++x){const n=a+(u?u[x]:x),t=3*n,o=s*e[t],i=c[o],g=c[o+1],y=c[o+2],q=s*e[t+1],T=c[q],V=c[q+1],v=c[q+2],j=s*e[t+2],I=T-i,A=V-g,B=v-y,k=c[j]-i,w=c[j+1]-g,C=c[j+2]-y,U=d*C-w*b,D=b*k-C*m,E=m*w-k*d,F=I*U+A*D+B*E;if(Math.abs(F)<=z)continue;const G=l-i,H=h-g,J=p-y,K=G*U+H*D+J*E;if(F>0){if(K<0||K>F)continue}else if(K>0||K<F)continue;const L=H*B-A*J,N=J*I-B*G,O=G*A-I*H,P=m*L+d*N+b*O;if(F>0){if(P<0||K+P>F)continue}else if(P>0||K+P<F)continue;const Q=(k*L+w*N+C*O)/F;if(Q>=0){r(Q,n,f?R(I,A,B,k,w,C,M):null)}}}function x(n,t,o,i,e,c,s,f){const r=n[0],u=n[1],a=n[2],l=t[0],h=t[1],p=t[2];for(let m=o;m<i;++m){const n=3*m,t=n+1,o=n+2,i=c*n,d=e[i],b=e[i+1],x=e[i+2],g=c*t,y=c*o,q=e[g]-d,T=e[g+1]-b,V=e[g+2]-x,v=e[y]-d,j=e[y+1]-b,I=e[y+2]-x,A=h*I-j*p,B=p*v-I*l,k=l*j-v*h,w=q*A+T*B+V*k;if(Math.abs(w)<=z)continue;const C=r-d,U=u-b,D=a-x,E=C*A+U*B+D*k;if(w>0){if(E<0||E>w)continue}else if(E>0||E<w)continue;const F=U*V-T*D,G=D*q-V*C,H=C*T-q*U,J=l*F+h*G+p*H;if(w>0){if(J<0||E+J>w)continue}else if(J>0||E+J<w)continue;const K=(v*F+j*G+I*H)/w;if(K>=0){f(K,m,s?R(q,T,V,v,j,I,M):null)}}}function g(n,t,o,i,e,c,s,f,r,u,a,l=null,h=0){const p=n[0],m=n[1],d=n[2],b=t[0],x=t[1],g=t[2];for(let y=o;y<i;++y){const n=h+(l?l[y]:y),t=3*n,o=s*e[t],i=c[o],q=c[o+1],T=c[o+2],V=s*e[t+1],v=c[V],j=c[V+1],I=c[V+2],A=s*e[t+2],B=c[A],k=c[A+1],w=c[A+2],C=T-r,U=f/Math.sqrt(i*i+q*q+C*C),D=i+i*U,E=q+q*U,F=T+C*U,G=I-r,H=f/Math.sqrt(v*v+j*j+G*G),J=v+v*H,K=j+j*H,L=I+G*H,N=w-r,O=f/Math.sqrt(B*B+k*k+N*N),P=J-D,Q=K-E,S=L-F,W=B+B*O-D,X=k+k*O-E,Y=w+N*O-F,Z=x*Y-X*g,$=g*W-Y*b,_=b*X-W*x,nn=P*Z+Q*$+S*_;if(Math.abs(nn)<=z)continue;const tn=p-D,on=m-E,en=d-F,cn=tn*Z+on*$+en*_;if(nn>0){if(cn<0||cn>nn)continue}else if(cn>0||cn<nn)continue;const sn=on*S-Q*en,fn=en*P-S*tn,rn=tn*Q-P*on,un=b*sn+x*fn+g*rn;if(nn>0){if(un<0||cn+un>nn)continue}else if(un>0||cn+un<nn)continue;const an=(W*sn+X*fn+Y*rn)/nn;if(an>=0){a(an,n,u?R(P,Q,S,W,X,Y,M):null)}}}function y(n,t,o,i,e,c,s,f,r,u,a){const l=n[0],h=n[1],p=n[2],m=t[0],d=t[1],b=t[2],{normalRequired:x}=u;for(let g=o;g<i;++g){const n=f[g],t=3*n,o=s*e[t];let i=c[o],u=c[o+1],y=c[o+2];const q=s*e[t+1];let T=c[q],V=c[q+1],v=c[q+2];const j=s*e[t+2];let I=c[j],A=c[j+1],B=c[j+2];null!=r&&([i,u,y]=r.applyToVertex(i,u,y,g),[T,V,v]=r.applyToVertex(T,V,v,g),[I,A,B]=r.applyToVertex(I,A,B,g));const k=T-i,w=V-u,C=v-y,U=I-i,D=A-u,E=B-y,F=d*E-D*b,G=b*U-E*m,H=m*D-U*d,J=k*F+w*G+C*H;if(Math.abs(J)<=z)continue;const K=l-i,L=h-u,N=p-y,O=K*F+L*G+N*H;if(J>0){if(O<0||O>J)continue}else if(O>0||O<J)continue;const P=L*C-w*N,Q=N*k-C*K,S=K*w-k*L,W=m*P+d*Q+b*S;if(J>0){if(W<0||O+W>J)continue}else if(W>0||O+W<J)continue;const X=(U*P+D*Q+E*S)/J;if(X>=0){a(X,n,x?R(k,w,C,U,D,E,M):null)}}}function q(i,e,c,s,f,r,u,a,l,h){const p=e,m=E,M=Math.abs(p[0]),d=Math.abs(p[1]),b=Math.abs(p[2]),x=M>=d?M>=b?0:2:d>=b?1:2,g=x,y=p[g]<0?2:1,q=(x+y)%3,R=(x+(3-y))%3,I=p[q]/p[g],A=p[R]/p[g],B=1/p[g],k=T,w=V,C=v,{normalRequired:U}=l;for(let T=c;T<s;++T){const e=3*T,c=u*f[e];t(m[0],r[c+0],r[c+1],r[c+2]);const s=u*f[e+1];t(m[1],r[s+0],r[s+1],r[s+2]);const l=u*f[e+2];t(m[2],r[l+0],r[l+1],r[l+2]),a&&(o(m[0],a.applyToVertex(m[0][0],m[0][1],m[0][2],T)),o(m[1],a.applyToVertex(m[1][0],m[1][1],m[1][2],T)),o(m[2],a.applyToVertex(m[2][0],m[2][1],m[2][2],T))),n(k,m[0],i),n(w,m[1],i),n(C,m[2],i);const p=k[q]-I*k[g],M=k[R]-A*k[g],d=w[q]-I*w[g],b=w[R]-A*w[g],x=C[q]-I*C[g],y=C[R]-A*C[g],V=x*b-y*d,v=p*y-M*x,z=d*M-b*p;if((V<0||v<0||z<0)&&(V>0||v>0||z>0))continue;const D=V+v+z;if(0===D)continue;const E=V*(B*k[g])+v*(B*w[g])+z*(B*C[g]);if(E*Math.sign(D)<0)continue;const F=E/D;if(F>=0){h(F,T,U?j(m):null)}}}const T=c(),V=c(),v=c();function R(n,o,c,s,f,r,u){return t(I,n,o,c),t(A,s,f,r),i(u,I,A),e(u,u),u}function j(t){return n(I,t[1],t[0]),n(A,t[2],t[0]),i(M,I,A),e(M,M),M}const I=c(),A=c();function B(n,o,i){return t(i,1/(o[0]-n[0]),1/(o[1]-n[1]),1/(o[2]-n[2]))}function k(n,o){return t(o,1/n[0],1/n[1],1/n[2])}function w(n,t,o,i){return C(n,t,o,i,1/0)}function C(n,t,o,i,e){const c=(n[0]-i-t[0])*o[0],s=(n[3]+i-t[0])*o[0];let f=Math.min(c,s),r=Math.max(c,s);const u=(n[1]-i-t[1])*o[1],a=(n[4]+i-t[1])*o[1];if(r=Math.min(r,Math.max(u,a)),r<0)return!1;if(f=Math.max(f,Math.min(u,a)),f>r)return!1;const l=(n[2]-i-t[2])*o[2],h=(n[5]+i-t[2])*o[2];return r=Math.min(r,Math.max(l,h)),!(r<0)&&(f=Math.max(f,Math.min(l,h)),!(f>r)&&f<e)}const U=1e3,z=1e-7,D=c(),E=[c(),c(),c()];export{a as MeshIntersectionOptions,B as computeInvDir,k as computeInvDirFromDirection,R as computeNormalFromBarycentric,w as intersectAabbInvDir,C as intersectAabbInvDirBefore,b as intersectRayTriangles,q as intersectRayTrianglesWithDisplacementWatertight,g as intersectRayTrianglesWithVerticalOffsetENUGlobal,x as intersectRenderGeometryTriangles,h as intersectTriangleGeometry,d as intersectTriangles,z as triangleRayParallelTolerance};
5
+ import{a as n,i as t,c as i,h as o,n as e}from"../../../../chunks/vec32.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{setMin as s,create as f,setMax as r}from"../../../../geometry/support/aaBoundingBox.js";import{assert as a}from"./Util.js";class u{constructor(n=0,t=!1,i=!0){this.tolerance=n,this.isVerticalRay=t,this.normalRequired=i}}const l=f();function h(t,i,o,e,c,s){if(!t.visible)return;const f=n(D,e,o),r=(n,t,i)=>{s(n,i,t)},{tolerance:l}=i,h=new u(l,!1,i.options.normalRequired);if(t.boundingInfo)a(0===t.type),m(t.boundingInfo,o,f,l,c,h,r);else{const n=t.positionAttribute,i=n.indices;q(o,f,0,i.length/3,i,n.data,n.stride,c,h,r)}}const p=c();function m(n,t,i,o,e,c,f){if(null==n)return;const a=k(i,p);if(s(l,n.bbMin),r(l,n.bbMax),null!=e&&e.applyToAabb(l),w(l,t,a,o)){const{primitiveIndices:s,position:r}=n,a=s?s.length:r.indices.length/3;if(a>U){const s=n.getChildren();if(void 0!==s){for(const n of s)m(n,t,i,o,e,c,f);return}}y(t,i,0,a,r.indices,r.data,r.stride,s,e,c,f)}}const M=c();function d(t,i,o,e,c,s,f,r,a){const{data:u,stride:l}=s;q(t,n(D,i,t),o,e,c,u,l,f,r,a)}function b(n,t,i,o,e,c,s,f,r,a=null,u=0){const l=n[0],h=n[1],p=n[2],m=t[0],d=t[1],b=t[2];for(let x=i;x<o;++x){const n=u+(a?a[x]:x),t=3*n,i=s*e[t],o=c[i],g=c[i+1],y=c[i+2],q=s*e[t+1],T=c[q],V=c[q+1],v=c[q+2],j=s*e[t+2],I=T-o,A=V-g,B=v-y,k=c[j]-o,w=c[j+1]-g,C=c[j+2]-y,U=d*C-w*b,D=b*k-C*m,E=m*w-k*d,F=I*U+A*D+B*E;if(Math.abs(F)<=z)continue;const G=l-o,H=h-g,J=p-y,K=G*U+H*D+J*E;if(F>0){if(K<0||K>F)continue}else if(K>0||K<F)continue;const L=H*B-A*J,N=J*I-B*G,O=G*A-I*H,P=m*L+d*N+b*O;if(F>0){if(P<0||K+P>F)continue}else if(P>0||K+P<F)continue;const Q=(k*L+w*N+C*O)/F;if(Q>=0){r(Q,n,f?R(I,A,B,k,w,C,M):null)}}}function x(n,t,i,o,e,c,s,f){const r=n[0],a=n[1],u=n[2],l=t[0],h=t[1],p=t[2];for(let m=i;m<o;++m){const n=3*m,t=n+1,i=n+2,o=c*n,d=e[o],b=e[o+1],x=e[o+2],g=c*t,y=c*i,q=e[g]-d,T=e[g+1]-b,V=e[g+2]-x,v=e[y]-d,j=e[y+1]-b,I=e[y+2]-x,A=h*I-j*p,B=p*v-I*l,k=l*j-v*h,w=q*A+T*B+V*k;if(Math.abs(w)<=z)continue;const C=r-d,U=a-b,D=u-x,E=C*A+U*B+D*k;if(w>0){if(E<0||E>w)continue}else if(E>0||E<w)continue;const F=U*V-T*D,G=D*q-V*C,H=C*T-q*U,J=l*F+h*G+p*H;if(w>0){if(J<0||E+J>w)continue}else if(J>0||E+J<w)continue;const K=(v*F+j*G+I*H)/w;if(K>=0){f(K,m,s?R(q,T,V,v,j,I,M):null)}}}function g(n,t,i,o,e,c,s,f,r,a,u,l=null,h=0){const p=n[0],m=n[1],d=n[2],b=t[0],x=t[1],g=t[2];for(let y=i;y<o;++y){const n=h+(l?l[y]:y),t=3*n,i=s*e[t],o=c[i],q=c[i+1],T=c[i+2],V=s*e[t+1],v=c[V],j=c[V+1],I=c[V+2],A=s*e[t+2],B=c[A],k=c[A+1],w=c[A+2],C=T-r,U=f/Math.sqrt(o*o+q*q+C*C),D=o+o*U,E=q+q*U,F=T+C*U,G=I-r,H=f/Math.sqrt(v*v+j*j+G*G),J=v+v*H,K=j+j*H,L=I+G*H,N=w-r,O=f/Math.sqrt(B*B+k*k+N*N),P=J-D,Q=K-E,S=L-F,W=B+B*O-D,X=k+k*O-E,Y=w+N*O-F,Z=x*Y-X*g,$=g*W-Y*b,_=b*X-W*x,nn=P*Z+Q*$+S*_;if(Math.abs(nn)<=z)continue;const tn=p-D,on=m-E,en=d-F,cn=tn*Z+on*$+en*_;if(nn>0){if(cn<0||cn>nn)continue}else if(cn>0||cn<nn)continue;const sn=on*S-Q*en,fn=en*P-S*tn,rn=tn*Q-P*on,an=b*sn+x*fn+g*rn;if(nn>0){if(an<0||cn+an>nn)continue}else if(an>0||cn+an<nn)continue;const un=(W*sn+X*fn+Y*rn)/nn;if(un>=0){u(un,n,a?R(P,Q,S,W,X,Y,M):null)}}}function y(n,t,i,o,e,c,s,f,r,a,u){const l=n[0],h=n[1],p=n[2],m=t[0],d=t[1],b=t[2],{normalRequired:x}=a;for(let g=i;g<o;++g){const n=f[g],t=3*n,i=s*e[t];let o=c[i],a=c[i+1],y=c[i+2];const q=s*e[t+1];let T=c[q],V=c[q+1],v=c[q+2];const j=s*e[t+2];let I=c[j],A=c[j+1],B=c[j+2];null!=r&&([o,a,y]=r.applyToVertex(o,a,y,g),[T,V,v]=r.applyToVertex(T,V,v,g),[I,A,B]=r.applyToVertex(I,A,B,g));const k=T-o,w=V-a,C=v-y,U=I-o,D=A-a,E=B-y,F=d*E-D*b,G=b*U-E*m,H=m*D-U*d,J=k*F+w*G+C*H;if(Math.abs(J)<=z)continue;const K=l-o,L=h-a,N=p-y,O=K*F+L*G+N*H;if(J>0){if(O<0||O>J)continue}else if(O>0||O<J)continue;const P=L*C-w*N,Q=N*k-C*K,S=K*w-k*L,W=m*P+d*Q+b*S;if(J>0){if(W<0||O+W>J)continue}else if(W>0||O+W<J)continue;const X=(U*P+D*Q+E*S)/J;if(X>=0){u(X,n,x?R(k,w,C,U,D,E,M):null)}}}function q(o,e,c,s,f,r,a,u,l,h){const p=e,m=E,M=Math.abs(p[0]),d=Math.abs(p[1]),b=Math.abs(p[2]),x=M>=d?M>=b?0:2:d>=b?1:2,g=x,y=p[g]<0?2:1,q=(x+y)%3,R=(x+(3-y))%3,I=p[q]/p[g],A=p[R]/p[g],B=1/p[g],k=T,w=V,C=v,{normalRequired:U}=l;for(let T=c;T<s;++T){const e=3*T,c=a*f[e];t(m[0],r[c+0],r[c+1],r[c+2]);const s=a*f[e+1];t(m[1],r[s+0],r[s+1],r[s+2]);const l=a*f[e+2];t(m[2],r[l+0],r[l+1],r[l+2]),u&&(i(m[0],u.applyToVertex(m[0][0],m[0][1],m[0][2],T)),i(m[1],u.applyToVertex(m[1][0],m[1][1],m[1][2],T)),i(m[2],u.applyToVertex(m[2][0],m[2][1],m[2][2],T))),n(k,m[0],o),n(w,m[1],o),n(C,m[2],o);const p=k[q]-I*k[g],M=k[R]-A*k[g],d=w[q]-I*w[g],b=w[R]-A*w[g],x=C[q]-I*C[g],y=C[R]-A*C[g],V=x*b-y*d,v=p*y-M*x,z=d*M-b*p;if((V<0||v<0||z<0)&&(V>0||v>0||z>0))continue;const D=V+v+z;if(0===D)continue;const E=V*(B*k[g])+v*(B*w[g])+z*(B*C[g]);if(E*Math.sign(D)<0)continue;const F=E/D;if(F>=0){h(F,T,U?j(m):null)}}}const T=c(),V=c(),v=c();function R(n,i,c,s,f,r,a){return t(I,n,i,c),t(A,s,f,r),o(a,I,A),e(a,a),a}function j(t){return n(I,t[1],t[0]),n(A,t[2],t[0]),o(M,I,A),e(M,M),M}const I=c(),A=c();function B(n,i,o){return t(o,1/(i[0]-n[0]),1/(i[1]-n[1]),1/(i[2]-n[2]))}function k(n,i){return t(i,1/n[0],1/n[1],1/n[2])}function w(n,t,i,o){return C(n,t,i,o,1/0)}function C(n,t,i,o,e){const c=(n[0]-o-t[0])*i[0],s=(n[3]+o-t[0])*i[0];let f=Math.min(c,s),r=Math.max(c,s);const a=(n[1]-o-t[1])*i[1],u=(n[4]+o-t[1])*i[1];if(r=Math.min(r,Math.max(a,u)),r<0)return!1;if(f=Math.max(f,Math.min(a,u)),f>r)return!1;const l=(n[2]-o-t[2])*i[2],h=(n[5]+o-t[2])*i[2];return r=Math.min(r,Math.max(l,h)),!(r<0)&&(f=Math.max(f,Math.min(l,h)),!(f>r)&&f<e)}const U=1e3,z=1e-7,D=c(),E=[c(),c(),c()];export{u as MeshIntersectionOptions,B as computeInvDir,k as computeInvDirFromDirection,R as computeNormalFromBarycentric,w as intersectAabbInvDir,C as intersectAabbInvDirBefore,b as intersectRayTriangles,q as intersectRayTrianglesWithDisplacementWatertight,g as intersectRayTrianglesWithVerticalOffsetENUGlobal,x as intersectRenderGeometryTriangles,h as intersectTriangleGeometry,d as intersectTriangles,z as triangleRayParallelTolerance};