@arcgis/core 4.23.0-next.20220105 → 4.23.0-next.20220123

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 (632) hide show
  1. package/assets/components/assets/calcite-date-picker/nls/bg.json +31 -0
  2. package/assets/components/assets/calcite-icon/centerAlign16.json +1 -0
  3. package/assets/components/assets/calcite-icon/centerAlign24.json +1 -0
  4. package/assets/components/assets/calcite-icon/centerAlign32.json +1 -0
  5. package/assets/components/assets/calcite-icon/checkSquareF16.json +1 -0
  6. package/assets/components/assets/calcite-icon/checkSquareF24.json +1 -0
  7. package/assets/components/assets/calcite-icon/checkSquareF32.json +1 -0
  8. package/assets/components/assets/calcite-icon/convert16.json +1 -0
  9. package/assets/components/assets/calcite-icon/convert24.json +1 -0
  10. package/assets/components/assets/calcite-icon/convert32.json +1 -0
  11. package/assets/components/assets/calcite-icon/explore16.json +1 -0
  12. package/assets/components/assets/calcite-icon/explore24.json +1 -0
  13. package/assets/components/assets/calcite-icon/explore32.json +1 -0
  14. package/assets/components/assets/calcite-icon/formDropdown16.json +1 -0
  15. package/assets/components/assets/calcite-icon/formDropdown24.json +1 -0
  16. package/assets/components/assets/calcite-icon/formDropdown32.json +1 -0
  17. package/assets/components/assets/calcite-icon/language16.json +1 -0
  18. package/assets/components/assets/calcite-icon/language24.json +1 -0
  19. package/assets/components/assets/calcite-icon/language32.json +1 -0
  20. package/assets/components/assets/calcite-icon/languageTranslate16.json +1 -0
  21. package/assets/components/assets/calcite-icon/languageTranslate24.json +1 -0
  22. package/assets/components/assets/calcite-icon/languageTranslate32.json +1 -0
  23. package/assets/components/assets/calcite-icon/leftAlign16.json +1 -0
  24. package/assets/components/assets/calcite-icon/leftAlign24.json +1 -0
  25. package/assets/components/assets/calcite-icon/leftAlign32.json +1 -0
  26. package/assets/components/assets/calcite-icon/lineSolid4.json +1 -0
  27. package/assets/components/assets/calcite-icon/partlyCloudy16.json +1 -0
  28. package/assets/components/assets/calcite-icon/partlyCloudy24.json +1 -0
  29. package/assets/components/assets/calcite-icon/partlyCloudy32.json +1 -0
  30. package/assets/components/assets/calcite-icon/rightAlign16.json +1 -0
  31. package/assets/components/assets/calcite-icon/rightAlign24.json +1 -0
  32. package/assets/components/assets/calcite-icon/rightAlign32.json +1 -0
  33. package/assets/components/assets/calcite-icon/screenshotMode16.json +1 -0
  34. package/assets/components/assets/calcite-icon/screenshotMode24.json +1 -0
  35. package/assets/components/assets/calcite-icon/screenshotMode32.json +1 -0
  36. package/assets/components/assets/calcite-icon/squareF16.json +1 -0
  37. package/assets/components/assets/calcite-icon/squareF24.json +1 -0
  38. package/assets/components/assets/calcite-icon/squareF32.json +1 -0
  39. package/assets/components/assets/calcite-icon/terminal16.json +1 -0
  40. package/assets/components/assets/calcite-icon/terminal24.json +1 -0
  41. package/assets/components/assets/calcite-icon/terminal32.json +1 -0
  42. package/assets/components/assets/calcite-icon/touch16.json +1 -0
  43. package/assets/components/assets/calcite-icon/touch24.json +1 -0
  44. package/assets/components/assets/calcite-icon/touch32.json +1 -0
  45. package/assets/components/assets/calcite-icon/xHexagon16.json +1 -0
  46. package/assets/components/assets/calcite-icon/xHexagon24.json +1 -0
  47. package/assets/components/assets/calcite-icon/xHexagon32.json +1 -0
  48. package/assets/components/assets/calcite-icon/xHexagonF16.json +1 -0
  49. package/assets/components/assets/calcite-icon/xHexagonF24.json +1 -0
  50. package/assets/components/assets/calcite-icon/xHexagonF32.json +1 -0
  51. package/assets/components/assets/calcite-icon/xOctagonF16.json +1 -0
  52. package/assets/components/assets/calcite-icon/xOctagonF24.json +1 -0
  53. package/assets/components/assets/calcite-icon/xOctagonF32.json +1 -0
  54. package/assets/esri/core/workers/RemoteClient.js +1 -1
  55. package/assets/esri/core/workers/chunks/09da224052976e290828.js +1 -0
  56. package/assets/esri/core/workers/chunks/0bf079e752ab79468478.js +1 -0
  57. package/assets/esri/core/workers/chunks/{ce5ca5e95b2378ec55b9.js → 1305ef8717da6e902a55.js} +1 -1
  58. package/assets/esri/core/workers/chunks/199670a3a564ebe3bd79.js +1 -0
  59. package/assets/esri/core/workers/chunks/1e4d37c2b9dc83d20a11.js +1 -0
  60. package/assets/esri/core/workers/chunks/20411bb8e04703962ce6.js +1 -0
  61. package/assets/esri/core/workers/chunks/2416f8bf8bbd2ec786ab.js +1 -0
  62. package/assets/esri/core/workers/chunks/25a3e9bc0b4c7e0d3165.js +1 -0
  63. package/assets/esri/core/workers/chunks/{99f0d896c17dd09cd285.js → 2629adf79e7fd9f25f07.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{9c417740bf3707a0d465.js → 2c607d30ff8ca1b61286.js} +1 -1
  65. package/assets/esri/core/workers/chunks/2e445a8735ea2adb641a.js +1 -0
  66. package/assets/esri/core/workers/chunks/37a7bd30352b1309b8f8.js +1 -0
  67. package/assets/esri/core/workers/chunks/390d9021169e65c10eb8.js +1 -0
  68. package/assets/esri/core/workers/chunks/{3d5169ea9810d10caf0d.js → 3a9740dccda6a733313c.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{8a250ec51097f16feb66.js → 40a1e713f63ec77110c0.js} +1 -1
  70. package/assets/esri/core/workers/chunks/43cdff2418325e163420.js +1 -0
  71. package/assets/esri/core/workers/chunks/4c9084a04948b6924749.js +1 -0
  72. package/assets/esri/core/workers/chunks/{35961690afe9ea1f91b0.js → 5383a8f3e4ec1a8a4fcd.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{4beba242e7540ee3182b.js → 5538639a49c7cc2eca63.js} +1 -1
  74. package/assets/esri/core/workers/chunks/57c67e260267a1dbc5e3.js +1 -0
  75. package/assets/esri/core/workers/chunks/5a4a5585ec8027079f32.js +1 -0
  76. package/assets/esri/core/workers/chunks/5ac4c1d54b94c7d87835.js +1 -0
  77. package/assets/esri/core/workers/chunks/60371c0f750cde87656d.js +1 -0
  78. package/assets/esri/core/workers/chunks/{ba6fdaed6c315dc13981.js → 625d2663daa8e0cf64b0.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{3a2b2dc3e938d53faa30.js → 64276aacaafa4c8a15bd.js} +1 -1
  80. package/assets/esri/core/workers/chunks/{75466e0c8c8da499b150.js → 662d13f68cf3ec92439b.js} +1 -1
  81. package/assets/esri/core/workers/chunks/663ad15b86936eb06b69.js +1 -0
  82. package/assets/esri/core/workers/chunks/67162b3e2cc1b5dc6818.js +1 -0
  83. package/assets/esri/core/workers/chunks/68a59ce98177d8513337.js +1 -0
  84. package/assets/esri/core/workers/chunks/6cdfe175c965918b741b.js +1 -0
  85. package/assets/esri/core/workers/chunks/739e579150bf466d43ae.js +1 -0
  86. package/assets/esri/core/workers/chunks/74df1f3e1e2e524a89d2.js +1 -0
  87. package/assets/esri/core/workers/chunks/76eef4799f6c5fff7e2d.js +1 -0
  88. package/assets/esri/core/workers/chunks/{ea05f870dda27bca4fe8.js → 7a8764ae8a0041e1151d.js} +2 -2
  89. package/assets/esri/core/workers/chunks/{ea05f870dda27bca4fe8.js.LICENSE.txt → 7a8764ae8a0041e1151d.js.LICENSE.txt} +1 -1
  90. package/assets/esri/core/workers/chunks/7baf6b1f3f050aa67ae4.js +1 -0
  91. package/assets/esri/core/workers/chunks/{f52b6d5037e4205b035c.js → 7bc5cc5dbf1b7b70ddac.js} +1 -1
  92. package/assets/esri/core/workers/chunks/85e27fd949475f9a6bbc.js +1 -0
  93. package/assets/esri/core/workers/chunks/8967288145f8fbd20e7d.js +1 -0
  94. package/assets/esri/core/workers/chunks/8cbb04a9065aa3756638.js +1 -0
  95. package/assets/esri/core/workers/chunks/8fa0a14165d43ffe87a5.js +1 -0
  96. package/assets/esri/core/workers/chunks/94b8dbf859df71858d1c.js +1 -0
  97. package/assets/esri/core/workers/chunks/96ab518eb6ba11333dee.js +1 -0
  98. package/assets/esri/core/workers/chunks/99a777693e4539f0b03b.js +1 -0
  99. package/assets/esri/core/workers/chunks/9cb2ae42a8e328b1d98d.js +1 -0
  100. package/assets/esri/core/workers/chunks/9d3c58a0ef634d95b7bd.js +1 -0
  101. package/assets/esri/core/workers/chunks/9d77467aa71d345fc1b6.js +1 -0
  102. package/assets/esri/core/workers/chunks/9f8b7b6b4e95f9a794fc.js +1 -0
  103. package/assets/esri/core/workers/chunks/a78757b9c7e8cbea08fa.js +1 -0
  104. package/assets/esri/core/workers/chunks/{9b7c51ff3d2b42aa62f5.js → a7b1b75643ed31489495.js} +1 -1
  105. package/assets/esri/core/workers/chunks/a8b13fb804bb775e4967.js +1 -0
  106. package/assets/esri/core/workers/chunks/a8c13529367c037cdd94.js +1 -0
  107. package/assets/esri/core/workers/chunks/a96afc176041f698c7a1.js +1 -0
  108. package/assets/esri/core/workers/chunks/aa861b8eae6c85f3dad4.js +1 -0
  109. package/assets/esri/core/workers/chunks/ac8dca61ade28c542ae2.js +1 -0
  110. package/assets/esri/core/workers/chunks/ad081d8e49e7f90c3c26.js +1 -0
  111. package/assets/esri/core/workers/chunks/afa6912454f2a5ffadce.js +1 -0
  112. package/assets/esri/core/workers/chunks/b0b036ad3ad3cd956747.js +1 -0
  113. package/assets/esri/core/workers/chunks/{2a39d520b192b8e552b5.js → b2ae5fc4f787ea568b88.js} +1 -1
  114. package/assets/esri/core/workers/chunks/b2beb6e1fd2ee6503830.js +1 -0
  115. package/assets/esri/core/workers/chunks/{b87bc1481a49b38109f4.js → b9c177524b3e7de1ffd1.js} +1 -1
  116. package/assets/esri/core/workers/chunks/ba615f118a3a8970ef25.js +1 -0
  117. package/assets/esri/core/workers/chunks/{7c1b9ae141112a63b446.js → ba6654a885be4b7a43f0.js} +1 -1
  118. package/assets/esri/core/workers/chunks/bab1cfd0a901181622af.js +1 -0
  119. package/assets/esri/core/workers/chunks/be2b7cce79fd41627931.js +1 -0
  120. package/assets/esri/core/workers/chunks/bf6dda4a2af14c4b7716.js +1 -0
  121. package/assets/esri/core/workers/chunks/{ed0297fc61014e848c18.js → c080114a69fa95b88d22.js} +1 -1
  122. package/assets/esri/core/workers/chunks/c13dfdd548dcb1bdb294.js +1 -0
  123. package/assets/esri/core/workers/chunks/c36f84daa7736878418d.js +1 -0
  124. package/assets/esri/core/workers/chunks/c6f94b92e866b881d9b9.js +1 -0
  125. package/assets/esri/core/workers/chunks/{573dc3064e84ca86844d.js → c959e0d1cf7dce0421b9.js} +1 -1
  126. package/assets/esri/core/workers/chunks/{1fd48459afb58a6cf14f.js → ca2f5faa01d99c21ec14.js} +1 -1
  127. package/assets/esri/core/workers/chunks/cbb291412fd1a5261aa9.js +1 -0
  128. package/assets/esri/core/workers/chunks/{7aa543a97f055cddea99.js → cc146c57bbdac8029fd8.js} +1 -1
  129. package/assets/esri/core/workers/chunks/cd7d83d127e085d52584.js +1 -0
  130. package/assets/esri/core/workers/chunks/cef4af64860ebbfc1c47.js +1 -0
  131. package/assets/esri/core/workers/chunks/d1454155ee1b8a421cbb.js +1 -0
  132. package/assets/esri/core/workers/chunks/{0cd583c3233573cb8468.js → d24c4fbc567486b1188f.js} +1 -1
  133. package/assets/esri/core/workers/chunks/d52108864136c5a8a618.js +1 -0
  134. package/assets/esri/core/workers/chunks/d72488db62fcf39447b6.js +1 -0
  135. package/assets/esri/core/workers/chunks/de03439ca2c9782bf325.js +1 -0
  136. package/assets/esri/core/workers/chunks/de6cff7b6cbbf99b20d1.js +981 -0
  137. package/assets/esri/core/workers/chunks/e079cb1d53aca15b7df2.js +1 -0
  138. package/assets/esri/core/workers/chunks/e59764ee8cf25d4f74e2.js +1 -0
  139. package/assets/esri/core/workers/chunks/e6df9839b551569fbc62.js +1 -0
  140. package/assets/esri/core/workers/chunks/e97e986120aaadad7d4c.js +1 -0
  141. package/assets/esri/core/workers/chunks/{2f66fcb8670b108af549.js → ed0bcc66fb1e0ee75a4b.js} +1 -1
  142. package/assets/esri/core/workers/chunks/f8e7755240a94b499e1f.js +1 -0
  143. package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
  144. package/assets/esri/themes/base/icons/fonts/CalciteWebCoreIcons.svg +1 -0
  145. package/assets/esri/themes/base/icons/fonts/CalciteWebCoreIcons.ttf +0 -0
  146. package/assets/esri/themes/base/icons/fonts/CalciteWebCoreIcons.woff +0 -0
  147. package/assets/esri/themes/base/icons/selection.json +1 -1
  148. package/assets/esri/themes/base/icons/style.css +4 -0
  149. package/assets/esri/themes/base/icons/style.scss +6 -0
  150. package/assets/esri/themes/base/icons/variables.scss +1 -0
  151. package/assets/esri/themes/base/widgets/_Weather.scss +1 -1
  152. package/assets/esri/themes/dark/main.css +1 -1
  153. package/assets/esri/themes/dark-blue/main.css +1 -1
  154. package/assets/esri/themes/dark-green/main.css +1 -1
  155. package/assets/esri/themes/dark-purple/main.css +1 -1
  156. package/assets/esri/themes/dark-red/main.css +1 -1
  157. package/assets/esri/themes/light/main.css +1 -1
  158. package/assets/esri/themes/light/view.css +1 -1
  159. package/assets/esri/themes/light-blue/main.css +1 -1
  160. package/assets/esri/themes/light-green/main.css +1 -1
  161. package/assets/esri/themes/light-purple/main.css +1 -1
  162. package/assets/esri/themes/light-red/main.css +1 -1
  163. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  164. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  165. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  166. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  167. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  168. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  169. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  170. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  171. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  172. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  173. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  174. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  175. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  176. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  177. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  178. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  179. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  180. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  181. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  182. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  183. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  184. package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
  185. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  186. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  187. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  188. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  189. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  190. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  191. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  192. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  193. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  194. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  195. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  196. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  197. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  198. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  199. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  200. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  201. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  202. package/assets/esri/widgets/ElevationProfile/t9n/ElevationProfile_ja.json +1 -1
  203. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ar.json +1 -1
  204. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_bg.json +1 -1
  205. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_bs.json +1 -1
  206. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ca.json +1 -1
  207. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_cs.json +1 -1
  208. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_da.json +1 -1
  209. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_de.json +1 -1
  210. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_el.json +1 -1
  211. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_es.json +1 -1
  212. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_et.json +1 -1
  213. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_fi.json +1 -1
  214. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_fr.json +1 -1
  215. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_he.json +1 -1
  216. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_hr.json +1 -1
  217. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_hu.json +1 -1
  218. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_id.json +1 -1
  219. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_it.json +1 -1
  220. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ja.json +1 -1
  221. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ko.json +1 -1
  222. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_lt.json +1 -1
  223. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_lv.json +1 -1
  224. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_nb.json +1 -1
  225. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_nl.json +1 -1
  226. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_pl.json +1 -1
  227. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_pt-BR.json +1 -1
  228. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_pt-PT.json +1 -1
  229. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ro.json +1 -1
  230. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ru.json +1 -1
  231. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sk.json +1 -1
  232. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sl.json +1 -1
  233. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sr.json +1 -1
  234. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sv.json +1 -1
  235. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_th.json +1 -1
  236. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_tr.json +1 -1
  237. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_uk.json +1 -1
  238. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_vi.json +1 -1
  239. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_zh-CN.json +1 -1
  240. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_zh-HK.json +1 -1
  241. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_zh-TW.json +1 -1
  242. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_cs.json +1 -1
  243. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_el.json +1 -1
  244. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fr.json +1 -1
  245. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lv.json +1 -1
  246. package/assets/esri/widgets/Weather/t9n/Weather_ar.json +1 -1
  247. package/assets/esri/widgets/Weather/t9n/Weather_bg.json +1 -1
  248. package/assets/esri/widgets/Weather/t9n/Weather_bs.json +1 -1
  249. package/assets/esri/widgets/Weather/t9n/Weather_ca.json +1 -1
  250. package/assets/esri/widgets/Weather/t9n/Weather_cs.json +1 -1
  251. package/assets/esri/widgets/Weather/t9n/Weather_da.json +1 -1
  252. package/assets/esri/widgets/Weather/t9n/Weather_de.json +1 -1
  253. package/assets/esri/widgets/Weather/t9n/Weather_el.json +1 -1
  254. package/assets/esri/widgets/Weather/t9n/Weather_es.json +1 -1
  255. package/assets/esri/widgets/Weather/t9n/Weather_et.json +1 -1
  256. package/assets/esri/widgets/Weather/t9n/Weather_fi.json +1 -1
  257. package/assets/esri/widgets/Weather/t9n/Weather_fr.json +1 -1
  258. package/assets/esri/widgets/Weather/t9n/Weather_he.json +1 -1
  259. package/assets/esri/widgets/Weather/t9n/Weather_hr.json +1 -1
  260. package/assets/esri/widgets/Weather/t9n/Weather_hu.json +1 -1
  261. package/assets/esri/widgets/Weather/t9n/Weather_id.json +1 -1
  262. package/assets/esri/widgets/Weather/t9n/Weather_it.json +1 -1
  263. package/assets/esri/widgets/Weather/t9n/Weather_ja.json +1 -1
  264. package/assets/esri/widgets/Weather/t9n/Weather_ko.json +1 -1
  265. package/assets/esri/widgets/Weather/t9n/Weather_lt.json +1 -1
  266. package/assets/esri/widgets/Weather/t9n/Weather_lv.json +1 -1
  267. package/assets/esri/widgets/Weather/t9n/Weather_nb.json +1 -1
  268. package/assets/esri/widgets/Weather/t9n/Weather_nl.json +1 -1
  269. package/assets/esri/widgets/Weather/t9n/Weather_pl.json +1 -1
  270. package/assets/esri/widgets/Weather/t9n/Weather_pt-BR.json +1 -1
  271. package/assets/esri/widgets/Weather/t9n/Weather_pt-PT.json +1 -1
  272. package/assets/esri/widgets/Weather/t9n/Weather_ro.json +1 -1
  273. package/assets/esri/widgets/Weather/t9n/Weather_ru.json +1 -1
  274. package/assets/esri/widgets/Weather/t9n/Weather_sk.json +1 -1
  275. package/assets/esri/widgets/Weather/t9n/Weather_sl.json +1 -1
  276. package/assets/esri/widgets/Weather/t9n/Weather_sr.json +1 -1
  277. package/assets/esri/widgets/Weather/t9n/Weather_sv.json +1 -1
  278. package/assets/esri/widgets/Weather/t9n/Weather_th.json +1 -1
  279. package/assets/esri/widgets/Weather/t9n/Weather_tr.json +1 -1
  280. package/assets/esri/widgets/Weather/t9n/Weather_uk.json +1 -1
  281. package/assets/esri/widgets/Weather/t9n/Weather_vi.json +1 -1
  282. package/assets/esri/widgets/Weather/t9n/Weather_zh-CN.json +1 -1
  283. package/assets/esri/widgets/Weather/t9n/Weather_zh-HK.json +1 -1
  284. package/assets/esri/widgets/Weather/t9n/Weather_zh-TW.json +1 -1
  285. package/chunks/Clouds.glsl.js +14 -14
  286. package/chunks/CloudsComposition.glsl.js +4 -4
  287. package/chunks/DefaultMaterial.glsl.js +2 -2
  288. package/chunks/HUDMaterial.glsl.js +22 -21
  289. package/chunks/RibbonLine.glsl.js +10 -14
  290. package/chunks/persistableUrlUtils.js +1 -1
  291. package/chunks/vec32.js +1 -1
  292. package/chunks/vec42.js +1 -1
  293. package/chunks/vxlLayer.js +1 -1
  294. package/core/has.js +1 -1
  295. package/core/urlUtils.js +1 -1
  296. package/core/workers/workerFactory.js +1 -1
  297. package/form/elements/FieldElement.js +1 -1
  298. package/geometry/support/buffer/math/common.js +1 -1
  299. package/geometry/support/heightModelInfoUtils.js +1 -1
  300. package/interfaces.d.ts +372 -126
  301. package/layers/FeatureLayer.js +1 -1
  302. package/layers/RouteLayer.js +1 -1
  303. package/layers/SubtypeGroupLayer.js +1 -1
  304. package/layers/VectorTileLayer.js +1 -1
  305. package/layers/VoxelLayer.js +1 -1
  306. package/layers/VoxelWasmPerScene.js +1 -1
  307. package/layers/WMSLayer.js +1 -1
  308. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  309. package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
  310. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  311. package/layers/mixins/ArcGISImageService.js +1 -1
  312. package/layers/mixins/OperationalLayer.js +1 -1
  313. package/layers/ogc/crsUtils.js +5 -0
  314. package/layers/support/RasterFunction.js +1 -1
  315. package/layers/support/RasterWorker.js +1 -1
  316. package/layers/support/capabilities.js +1 -1
  317. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  318. package/layers/support/rasterDatasets/WCSRaster.js +1 -1
  319. package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
  320. package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
  321. package/layers/support/vectorTileLayerLoader.js +1 -1
  322. package/layers/support/wmsUtils.js +1 -1
  323. package/layers/support/wmtsUtils.js +1 -1
  324. package/libs/vxl/enums.js +1 -1
  325. package/package.json +5 -5
  326. package/portal/schemas/buildingSceneLayerItem.js +1 -1
  327. package/portal/schemas/definitions.js +1 -1
  328. package/portal/schemas/integratedMeshLayerItem.js +1 -1
  329. package/portal/schemas/pointCloudLayerItem.js +1 -1
  330. package/portal/schemas/sceneLayerItem.js +1 -1
  331. package/portal/schemas/webScene.js +1 -1
  332. package/rasterRenderers.js +1 -1
  333. package/renderers/support/RasterSymbolizer.js +1 -1
  334. package/request.js +1 -1
  335. package/rest/find.js +1 -1
  336. package/rest/geometryService/generalize.js +1 -1
  337. package/rest/geometryService/lengths.js +1 -1
  338. package/rest/geometryService/offset.js +1 -1
  339. package/rest/geometryService/relation.js +1 -1
  340. package/rest/geometryService/trimExtend.js +1 -1
  341. package/rest/identify.js +1 -1
  342. package/{tasks → rest}/operations/find.js +0 -0
  343. package/{tasks → rest}/operations/generalize.js +0 -0
  344. package/rest/operations/identify.js +5 -0
  345. package/{tasks → rest}/operations/lengths.js +0 -0
  346. package/{tasks → rest}/operations/offset.js +0 -0
  347. package/{tasks → rest}/operations/relation.js +0 -0
  348. package/{tasks → rest}/operations/trimExtend.js +0 -0
  349. package/{tasks → rest}/operations/urlUtils.js +0 -0
  350. package/rest/print.js +1 -1
  351. package/rest/query/operations/query.js +1 -1
  352. package/rest/query/operations/queryAttachments.js +1 -1
  353. package/rest/query/operations/queryRelatedRecords.js +1 -1
  354. package/rest/query/operations/queryTopFeatures.js +1 -1
  355. package/rest/route/utils.js +1 -1
  356. package/rest/support/ImageIdentifyParameters.js +1 -1
  357. package/rest/support/NetworkServiceDescription.js +1 -1
  358. package/rest/support/RouteInfo.js +1 -1
  359. package/rest/support/RouteParameters.js +1 -1
  360. package/rest/support/RouteSettings.js +5 -0
  361. package/rest/support/StatisticDefinition.js +1 -1
  362. package/rest/support/Stop.js +1 -1
  363. package/rest/support/networkEnums.js +1 -1
  364. package/smartMapping/renderers/univariateColorSize.js +1 -1
  365. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  366. package/support/featureFlags.js +1 -1
  367. package/support/revision.js +1 -1
  368. package/symbols/ExtrudeSymbol3DLayer.js +1 -1
  369. package/symbols/Font.js +1 -1
  370. package/symbols/IconSymbol3DLayer.js +1 -1
  371. package/symbols/ObjectSymbol3DLayer.js +1 -1
  372. package/symbols/PathSymbol3DLayer.js +1 -1
  373. package/symbols/TextSymbol.js +1 -1
  374. package/symbols/TextSymbol3DLayer.js +1 -1
  375. package/symbols/cim/placements/PlacementAlongLineSameSize.js +1 -1
  376. package/symbols/support/Symbol3DHalo.js +1 -1
  377. package/symbols/support/Symbol3DMaterial.js +1 -1
  378. package/symbols/support/cimSymbolUtils.js +1 -1
  379. package/symbols/support/textUtils.js +5 -0
  380. package/symbols/support/utils.js +1 -1
  381. package/views/2d/engine/Stage.js +1 -1
  382. package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
  383. package/views/2d/engine/vectorTiles/shaders/VTLMaterialManager.js +1 -1
  384. package/views/2d/engine/vectorTiles/style/VectorTileSource.js +1 -1
  385. package/views/2d/engine/vectorTiles/style/VectorTilesRequestManager.js +5 -0
  386. package/views/2d/engine/webgl/BitBlitRenderer.js +1 -1
  387. package/views/2d/engine/webgl/MaterialManager.js +1 -1
  388. package/views/2d/engine/webgl/alignmentUtils.js +1 -1
  389. package/views/2d/engine/webgl/effects/BlendEffect.js +1 -1
  390. package/views/2d/engine/webgl/materialKey/MaterialKey.js +1 -1
  391. package/views/2d/engine/webgl/mesh/templates/WGLLabelTemplate.js +1 -1
  392. package/views/2d/engine/webgl/shaders/BlendPrograms.js +1 -1
  393. package/views/2d/engine/webgl/shaders/MaterialPrograms.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/GraphicsLayerView2D.js +1 -1
  397. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  398. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  399. package/views/2d/layers/LayerView2D.js +1 -1
  400. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  401. package/views/2d/layers/RouteLayerView2D.js +1 -1
  402. package/views/2d/layers/TileLayerView2D.js +1 -1
  403. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  404. package/views/2d/layers/WMSLayerView2D.js +1 -1
  405. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  406. package/views/2d/layers/features/sources/BaseFeatureSource.js +1 -1
  407. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  408. package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
  409. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  410. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  411. package/views/2d/support/engineHelpers.js +1 -1
  412. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  413. package/views/3d/environment/CloudsComposition.glsl.js +1 -1
  414. package/views/3d/environment/CloudsComposition.js +1 -1
  415. package/views/3d/environment/CloudsGenerator.js +1 -1
  416. package/views/3d/environment/CloudyWeather.js +1 -1
  417. package/views/3d/environment/Fog.js +1 -1
  418. package/views/3d/environment/FoggyWeather.js +1 -1
  419. package/views/3d/environment/NoiseTextureAtlas.js +1 -1
  420. package/views/3d/environment/RainyWeather.js +1 -1
  421. package/views/3d/environment/Stars.js +1 -1
  422. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  423. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  424. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  425. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  426. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  427. package/views/3d/layers/GraphicsView3D.js +1 -1
  428. package/views/3d/layers/I3SMeshView3D.js +1 -1
  429. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  430. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  431. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  432. package/views/3d/layers/MapImageLayerView3D.js +1 -1
  433. package/views/3d/layers/OGCFeatureLayerView3D.js +1 -1
  434. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  435. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  436. package/views/3d/layers/SceneLayerView3D.js +1 -1
  437. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  438. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  439. package/views/3d/layers/WMSLayerView3D.js +1 -1
  440. package/views/3d/layers/WMTSLayerView3D.js +1 -1
  441. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  442. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  443. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayer.js +1 -1
  444. package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
  445. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +5 -0
  446. package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
  447. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  448. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  449. package/views/3d/layers/graphics/Graphics3DPointSymbol.js +1 -1
  450. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  451. package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
  452. package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
  453. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  454. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  455. package/views/3d/layers/graphics/GraphicsProcessor.js +5 -0
  456. package/views/3d/layers/graphics/IGraphics3DFeatureProcessor.js +4 -0
  457. package/views/3d/layers/graphics/Labeler.js +1 -1
  458. package/views/3d/layers/graphics/QueryEngine.js +1 -1
  459. package/views/3d/layers/support/FeatureTileTree3DDebugger.js +1 -1
  460. package/views/3d/state/controllers/RotateController.js +1 -1
  461. package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
  462. package/views/3d/state/controllers/global/ZoomController.js +1 -1
  463. package/views/3d/state/controllers/global/ZoomStepController.js +1 -1
  464. package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
  465. package/views/3d/state/controllers/local/ZoomStepController.js +1 -1
  466. package/views/3d/support/debugFlags.js +1 -1
  467. package/views/3d/support/sunUtils.js +1 -1
  468. package/views/3d/terrain/Overlay.js +1 -1
  469. package/views/3d/terrain/OverlayManager.js +1 -1
  470. package/views/3d/terrain/TerrainSurface.js +1 -1
  471. package/views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js +7 -1
  472. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +28 -24
  473. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +19 -14
  474. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +12 -14
  475. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  476. package/views/3d/webgl-engine/lib/InstanceParameters.js +5 -0
  477. package/views/3d/webgl-engine/lib/{localOrigin.js → LocalOriginFactory.js} +0 -0
  478. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  479. package/views/3d/webgl-engine/lib/Program.js +1 -1
  480. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  481. package/views/3d/webgl-engine/lib/RenderTargetHelper.js +1 -1
  482. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  483. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  484. package/views/3d/webgl-engine/lib/SSAOHelper.js +1 -1
  485. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  486. package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
  487. package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
  488. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  489. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  490. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  491. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  492. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  493. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  494. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  495. package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
  496. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  497. package/views/LayerViewManager.js +1 -1
  498. package/views/MapView.js +1 -1
  499. package/views/SceneView.js +1 -1
  500. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  501. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  502. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  503. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
  504. package/views/layers/ImageryTileLayerView.js +1 -1
  505. package/views/layers/LayerView.js +1 -1
  506. package/views/layers/OGCFeatureLayerView.js +1 -1
  507. package/views/layers/RefreshableLayerView.js +1 -1
  508. package/views/overlay/ViewOverlay.js +1 -1
  509. package/views/support/DefaultsFromMap.js +1 -1
  510. package/views/support/WatchUpdatingTracking.js +1 -1
  511. package/views/support/imageReprojection.js +1 -1
  512. package/views/webgl/BufferObject.js +1 -1
  513. package/views/webgl/ContextState.js +1 -1
  514. package/views/webgl/FramebufferObject.js +1 -1
  515. package/views/webgl/Program.js +1 -1
  516. package/views/webgl/ProgramCache.js +1 -1
  517. package/views/webgl/ProgramTemplate.js +1 -1
  518. package/views/webgl/Renderbuffer.js +1 -1
  519. package/views/webgl/RenderingContext.js +1 -1
  520. package/views/webgl/ShaderTranspiler.js +1 -1
  521. package/views/webgl/Texture.js +1 -1
  522. package/views/webgl/UniformBufferLayout.js +5 -0
  523. package/views/webgl/UniformBufferObject.js +5 -0
  524. package/views/webgl/Util.js +1 -1
  525. package/views/webgl/enums.js +1 -1
  526. package/views/webgl/rasterUtils.js +1 -1
  527. package/views/webgl/storageLayouts.js +5 -0
  528. package/views/webgl/testDoublePrecisionArithmetic.js +1 -1
  529. package/views/webgl/testFloatBufferBlend.js +1 -1
  530. package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
  531. package/views/webgl/testSamplerPrecision.js +1 -1
  532. package/views/webgl/tests/SimpleDraw.js +1 -1
  533. package/widgets/BasemapLayerList.js +1 -1
  534. package/widgets/BuildingExplorer/BuildingDisciplinesViewModel.js +1 -1
  535. package/widgets/Editor/BatchCreateWorkflow.js +1 -1
  536. package/widgets/Editor/CreateWorkflow.js +1 -1
  537. package/widgets/Editor/UpdateWorkflow.js +1 -1
  538. package/widgets/Editor/workflowUtils.js +1 -1
  539. package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
  540. package/widgets/ElevationProfile.js +1 -1
  541. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  542. package/widgets/Feature/FeatureExpression.js +1 -1
  543. package/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js +1 -1
  544. package/widgets/Feature/FeatureMedia.js +1 -1
  545. package/widgets/Feature/FeatureViewModel.js +1 -1
  546. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  547. package/widgets/FeatureForm/InputField.js +1 -1
  548. package/widgets/FeatureForm/InputFieldGroup.js +1 -1
  549. package/widgets/FeatureForm.js +1 -1
  550. package/widgets/FeatureTemplates.js +1 -1
  551. package/widgets/FloorFilter.js +1 -1
  552. package/widgets/LayerList/LayerListViewModel.js +1 -1
  553. package/widgets/LayerList/ListItemPanel.js +1 -1
  554. package/widgets/LayerList/support/layerListUtils.js +1 -1
  555. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  556. package/widgets/Popup.js +1 -1
  557. package/widgets/Print.js +1 -1
  558. package/widgets/Search.js +1 -1
  559. package/widgets/Sketch/SketchViewModel.js +1 -1
  560. package/widgets/Weather/CoverageSlider.js +5 -0
  561. package/widgets/Weather/WeatherViewModel.js +1 -1
  562. package/widgets/Weather/css.js +1 -1
  563. package/widgets/Weather.js +1 -1
  564. package/widgets/support/geolocationUtils.js +1 -1
  565. package/assets/esri/core/workers/chunks/0881ce46b10362861f87.js +0 -1
  566. package/assets/esri/core/workers/chunks/0c0a02770eeeb3e28ea1.js +0 -1
  567. package/assets/esri/core/workers/chunks/0d2effbd84a9482eb639.js +0 -1
  568. package/assets/esri/core/workers/chunks/0f04246c1b591a3ac74d.js +0 -1
  569. package/assets/esri/core/workers/chunks/1ac6be0dc25e16c75d06.js +0 -1
  570. package/assets/esri/core/workers/chunks/1f8110ea12d65ca94b55.js +0 -1
  571. package/assets/esri/core/workers/chunks/2025d0fd61a64876c81b.js +0 -1
  572. package/assets/esri/core/workers/chunks/241859d74c0daac62e11.js +0 -1
  573. package/assets/esri/core/workers/chunks/2c9af2ebd72d9b55329b.js +0 -1
  574. package/assets/esri/core/workers/chunks/331be347c1b1ca0be2d2.js +0 -1
  575. package/assets/esri/core/workers/chunks/39af317388ecebb4387d.js +0 -1
  576. package/assets/esri/core/workers/chunks/39be2893a7dbdecfd65a.js +0 -1
  577. package/assets/esri/core/workers/chunks/3a20f66b0b7d08064e34.js +0 -1
  578. package/assets/esri/core/workers/chunks/445099d037affd139ed0.js +0 -1
  579. package/assets/esri/core/workers/chunks/45848fecec88ed2da33d.js +0 -1
  580. package/assets/esri/core/workers/chunks/48d3a3abc53abe6a4017.js +0 -1
  581. package/assets/esri/core/workers/chunks/5005b8c1fdd5cb9a4c19.js +0 -1
  582. package/assets/esri/core/workers/chunks/52e4c367c72ea7cc3457.js +0 -1
  583. package/assets/esri/core/workers/chunks/5d8170f6207dbeb4de1b.js +0 -1
  584. package/assets/esri/core/workers/chunks/615aa2d3ecafe30c80c0.js +0 -1
  585. package/assets/esri/core/workers/chunks/642c38ac00a962f35d44.js +0 -1
  586. package/assets/esri/core/workers/chunks/64459604505647e9c714.js +0 -1
  587. package/assets/esri/core/workers/chunks/653d1550dd1a4867a9fc.js +0 -1
  588. package/assets/esri/core/workers/chunks/65f73fbbc3c7c60c6d3d.js +0 -1
  589. package/assets/esri/core/workers/chunks/6db7081d344bea26ef64.js +0 -1
  590. package/assets/esri/core/workers/chunks/6deac533bb455be4004b.js +0 -1
  591. package/assets/esri/core/workers/chunks/6e13dab8ec43f7494297.js +0 -1
  592. package/assets/esri/core/workers/chunks/722a10c65456844d72b9.js +0 -1
  593. package/assets/esri/core/workers/chunks/7bd4c3ee43fb038b88d8.js +0 -1
  594. package/assets/esri/core/workers/chunks/803de5097a8a2c4b58a8.js +0 -1
  595. package/assets/esri/core/workers/chunks/8298231a0fd0129b0d5c.js +0 -1
  596. package/assets/esri/core/workers/chunks/8500c6c011400af1b7bd.js +0 -1
  597. package/assets/esri/core/workers/chunks/8b322a2a47dfdbb59b45.js +0 -1
  598. package/assets/esri/core/workers/chunks/8f83bebef9174c3f15da.js +0 -1
  599. package/assets/esri/core/workers/chunks/904332faa22bc0e876cb.js +0 -1
  600. package/assets/esri/core/workers/chunks/950565d1e682fc4072e1.js +0 -1
  601. package/assets/esri/core/workers/chunks/9846098704ee38bf6350.js +0 -1
  602. package/assets/esri/core/workers/chunks/a247ddd84245c81112c8.js +0 -1
  603. package/assets/esri/core/workers/chunks/a721342a32541717324d.js +0 -1
  604. package/assets/esri/core/workers/chunks/a9ffa806df20130ecfb6.js +0 -1
  605. package/assets/esri/core/workers/chunks/af13e534e4160636bd3d.js +0 -1
  606. package/assets/esri/core/workers/chunks/b2f62234ebb8b6158baa.js +0 -1
  607. package/assets/esri/core/workers/chunks/b51261a9a9ab62388839.js +0 -971
  608. package/assets/esri/core/workers/chunks/b58eba403bd517a7bb15.js +0 -1
  609. package/assets/esri/core/workers/chunks/b5bb7cfa26b1f0cec67a.js +0 -1
  610. package/assets/esri/core/workers/chunks/b8666d1a4e4fff7a4703.js +0 -1
  611. package/assets/esri/core/workers/chunks/bea1da9e3f878e0e2c83.js +0 -1
  612. package/assets/esri/core/workers/chunks/c1b6c31fa3ec1542f996.js +0 -1
  613. package/assets/esri/core/workers/chunks/c32a4fbdc87225f84019.js +0 -1
  614. package/assets/esri/core/workers/chunks/c67fea81f69a60c0eaef.js +0 -1
  615. package/assets/esri/core/workers/chunks/cb68db7169b9dfd1c3ff.js +0 -1
  616. package/assets/esri/core/workers/chunks/cc96608b2802fbfe7a08.js +0 -1
  617. package/assets/esri/core/workers/chunks/cd02fe27eb07681cb366.js +0 -1
  618. package/assets/esri/core/workers/chunks/d336afd5890dcdbf5341.js +0 -1
  619. package/assets/esri/core/workers/chunks/da69e3e5949fe1716e34.js +0 -1
  620. package/assets/esri/core/workers/chunks/daa9c450b2e2a5371249.js +0 -1
  621. package/assets/esri/core/workers/chunks/dd63ba77b7e4c3c9c594.js +0 -1
  622. package/assets/esri/core/workers/chunks/dfa57982d28c9aeb97b9.js +0 -1
  623. package/assets/esri/core/workers/chunks/e01812116b27874948f0.js +0 -1
  624. package/assets/esri/core/workers/chunks/e5c9d8482b913cf3580a.js +0 -1
  625. package/assets/esri/core/workers/chunks/eeadd92f0bede9fc8745.js +0 -1
  626. package/assets/esri/core/workers/chunks/fbb67cb6224aed2cce16.js +0 -1
  627. package/assets/esri/core/workers/chunks/feeaf61424336e9eac88.js +0 -1
  628. package/assets/esri/core/workers/chunks/ff02295329a8986d0568.js +0 -1
  629. package/tasks/operations/identify.js +0 -5
  630. package/views/2d/engine/webgl/mesh/templates/meshUtils.js +0 -5
  631. package/views/3d/layers/graphics/Graphics3DFeatureLikeLayerView.js +0 -5
  632. package/views/3d/layers/graphics/Graphics3DGraphicLikeLayerView.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{disposeMaybe as e,isSome as t,isNone as s}from"../../../../core/maybe.js";import{a as i}from"../../../../chunks/vec2f64.js";import{i as r}from"../../../../chunks/vec3.js";import{c as o}from"../../../../chunks/vec4f64.js";import{requestImage as h}from"../../../../support/requestImageUtils.js";import{createQuadVAO as a}from"./glUtil3D.js";import{SSAOTechniqueConfiguration as n,SSAOTechnique as u}from"./SSAOTechnique.js";import{inverseProjectionInfo as l}from"./Util.js";import{S as _}from"../../../../chunks/SSAO.glsl.js";import{PrimitiveType as m,TextureType as b,PixelFormat as d,PixelType as c,TextureSamplingMode as f,TextureWrapMode as p,TargetType as O,DepthStencilTargetType as T}from"../../../webgl/enums.js";import{FramebufferObject as x}from"../../../webgl/FramebufferObject.js";import{Texture as g}from"../../../webgl/Texture.js";import{vertexCount as F}from"../../../webgl/Util.js";class B{constructor(e,t,s){this._techniqueRep=e,this._rctx=t,this._requestRender=s,this._enabled=!1,this._ssaoTechniqueConfig=new n,this.quadVAO=null,this._blurSizePx=2,this._attenuation=.5}dispose(){this.quadVAO=e(this.quadVAO)}set enabled(e){e?this._enable():this._disable()}get enabled(){return this._enabled}get ready(){return this.enabled&&t(this._noiseTexture)&&t(this._ssaoFBO)&&t(this._blur0FBO)&&t(this._blur1FBO)}computeSSAO(e,t,i){if(!this.enabled||s(t)||s(i)||s(this._noiseTexture)||s(this._ssaoFBO)||s(this._blur0FBO)||s(this._blur1FBO))return;const o=this._rctx,h=e.fullViewport,n=h[2],u=h[3],_=n/this._blurSizePx,b=u/this._blurSizePx;this._ssaoFBO.resize(n,u),this._blur0FBO.resize(_,b),this._blur1FBO.resize(_,b);const d=1,c=1,f=n*d,p=u*c;o.bindFramebuffer(this._ssaoFBO),o.setViewport(0,0,n,u);const O=this._ssaoTechnique.program;o.useProgram(O),this._ssaoTechnique.bindPipelineState(o),O.setUniform2f("rnmScale",n/this._noiseTexture.descriptor.width,u/this._noiseTexture.descriptor.height),l(e.projectionMatrix,e.fullWidth,e.fullHeight,A,S),O.setUniform4fv("projInfo",A),O.setUniform2fv("zScale",S),O.setUniform2f("nearFar",e.near,e.far);let T=1/e.computeRenderPixelSizeAtDist(1);O.setUniform1f("projScale",T*d),O.setUniform2f("screenDimensions",f,p);const x=r(e.eye,e.center);let g=20*e.computeRenderPixelSizeAtDist(x);g=Math.max(.1,g),O.setUniform1f("radius",g),O.setUniform1f("intensity",4*this._attenuation/g**6),O.bindTexture(this._noiseTexture,"rnm"),O.bindTexture(i,"normalMap"),O.bindTexture(t,"depthMap"),s(this.quadVAO)&&(this.quadVAO=a(this._rctx)),o.bindVAO(this.quadVAO),o.drawArrays(m.TRIANGLE_STRIP,0,F(this.quadVAO,"geometry"));const B=this._blurTechnique.program;o.useProgram(B),B.bindTexture(this._ssaoFBO.colorTexture,"tex"),B.bindTexture(i,"normalMap"),B.bindTexture(t,"depthMap"),o.setViewport(0,0,f/this._blurSizePx,p/this._blurSizePx),o.bindFramebuffer(this._blur0FBO),B.setUniform2f("screenDimensions",f,p),B.setUniform2f("blurSize",0,this._blurSizePx*d/p),B.setUniform2f("nearFar",e.near,e.far),x>5e4&&(T=Math.max(0,T-(x-5e4))),B.setUniform1f("projScale",T),o.drawArrays(m.TRIANGLE_STRIP,0,F(this.quadVAO,"geometry")),B.setUniform2f("blurSize",this._blurSizePx*c/f,0),o.bindFramebuffer(this._blur1FBO),B.bindTexture(this._blur0FBO.colorTexture,"tex"),o.drawArrays(m.TRIANGLE_STRIP,0,F(this.quadVAO,"geometry")),o.setViewport(h[0],h[1],h[2],h[3])}bind(e,s){this.enabled&&t(this._blur1FBO)&&t(this._ssaoFBO)?(e.bindTexture(this._blur1FBO.colorTexture,"ssaoTex"),e.setUniform4f("viewportPixelSz",s.fullViewport[0],s.fullViewport[1],1/this._ssaoFBO.width,1/this._ssaoFBO.height)):e.setUniform4f("viewportPixelSz",-1,-1,-1,-1)}_selectPrograms(){this._ssaoTechniqueConfig.output=_.SSAO,this._ssaoTechnique=this._techniqueRep.releaseAndAcquire(u,this._ssaoTechniqueConfig,this._ssaoTechnique),this._ssaoTechniqueConfig.output=_.Blur,this._blurTechnique=this._techniqueRep.releaseAndAcquire(u,this._ssaoTechniqueConfig,this._blurTechnique)}_enable(){this.enabled||(this._enabled=!0,this._loadResources((()=>{this._enabled&&this._initialize()})))}_loadResources(e){this._data?e():import("./SSAOHelperData.js").then((t=>{this._data=t,e()}))}_initialize(){const e={target:b.TEXTURE_2D,pixelFormat:d.RGBA,dataType:c.UNSIGNED_BYTE,samplingMode:f.LINEAR,wrapMode:p.CLAMP_TO_EDGE,width:0,height:0},t={colorTarget:O.TEXTURE,depthStencilTarget:T.NONE};h(this._data.noiseTexture).then((s=>{this._enabled&&(this._ssaoFBO=new x(this._rctx,t,e),this._blur0FBO=new x(this._rctx,t,e),this._blur1FBO=new x(this._rctx,t,e),this._noiseTexture=new g(this._rctx,{target:b.TEXTURE_2D,pixelFormat:d.RGBA,dataType:c.UNSIGNED_BYTE,hasMipmap:!0,width:s.width,height:s.height},s),this._requestRender())})),this._selectPrograms()}_disable(){this._enabled=!1,this._noiseTexture=e(this._noiseTexture),this._blur1FBO=e(this._blur1FBO),this._blur0FBO=e(this._blur0FBO),this._ssaoFBO=e(this._ssaoFBO)}get gpuMemoryUsage(){return(t(this._blur0FBO)?this._blur0FBO.gpuMemoryUsage:0)+(t(this._blur1FBO)?this._blur1FBO.gpuMemoryUsage:0)+(t(this._ssaoFBO)?this._ssaoFBO.gpuMemoryUsage:0)}get test(){return{ssao:this._ssaoFBO,blur:this._blur1FBO}}}const S=i(),A=o();export{B as SSAOHelper};
5
+ import{disposeMaybe as e,applySome as t,isSome as s,isNone as i}from"../../../../core/maybe.js";import{a as r}from"../../../../chunks/vec2f64.js";import{i as h}from"../../../../chunks/vec3.js";import{c as o}from"../../../../chunks/vec4f64.js";import{requestImage as a}from"../../../../support/requestImageUtils.js";import{createQuadVAO as n}from"./glUtil3D.js";import{SSAOTechniqueConfiguration as u,SSAOTechnique as l}from"./SSAOTechnique.js";import{inverseProjectionInfo as _}from"./Util.js";import{S as b}from"../../../../chunks/SSAO.glsl.js";import{PrimitiveType as m,TextureType as f,PixelFormat as d,PixelType as c,TextureSamplingMode as p,TextureWrapMode as O,TargetType as T,DepthStencilTargetType as x}from"../../../webgl/enums.js";import{FramebufferObject as F}from"../../../webgl/FramebufferObject.js";import{Texture as B}from"../../../webgl/Texture.js";import{vertexCount as g}from"../../../webgl/Util.js";class S{constructor(e,t,s){this._techniqueRep=e,this._rctx=t,this._requestRender=s,this._enabled=!1,this._ssaoTechniqueConfig=new u,this.quadVAO=null,this._blurSizePx=2,this._attenuation=.5}dispose(){this.quadVAO=e(this.quadVAO)}disposeOffscreenBuffers(){t(this._ssaoFBO,(e=>e.resize(0,0))),t(this._blur0FBO,(e=>e.resize(0,0))),t(this._blur1FBO,(e=>e.resize(0,0)))}set enabled(e){e?this._enable():this._disable()}get enabled(){return this._enabled}get ready(){return this.enabled&&s(this._noiseTexture)&&s(this._ssaoFBO)&&s(this._blur0FBO)&&s(this._blur1FBO)}computeSSAO(e,t,s){if(!this.enabled||i(t)||i(s)||i(this._noiseTexture)||i(this._ssaoFBO)||i(this._blur0FBO)||i(this._blur1FBO))return;const r=this._rctx,o=e.fullViewport,a=o[2],u=o[3],l=a/this._blurSizePx,b=u/this._blurSizePx;this._ssaoFBO.resize(a,u),this._blur0FBO.resize(l,b),this._blur1FBO.resize(l,b);const f=1,d=1,c=a*f,p=u*d;r.bindFramebuffer(this._ssaoFBO),r.setViewport(0,0,a,u);const O=this._ssaoTechnique.program;r.useProgram(O),this._ssaoTechnique.bindPipelineState(r),O.setUniform2f("rnmScale",a/this._noiseTexture.descriptor.width,u/this._noiseTexture.descriptor.height),_(e.projectionMatrix,e.fullWidth,e.fullHeight,q,A),O.setUniform4fv("projInfo",q),O.setUniform2fv("zScale",A),O.setUniform2f("nearFar",e.near,e.far);let T=1/e.computeRenderPixelSizeAtDist(1);O.setUniform1f("projScale",T*f),O.setUniform2f("screenDimensions",c,p);const x=h(e.eye,e.center);let F=20*e.computeRenderPixelSizeAtDist(x);F=Math.max(.1,F),O.setUniform1f("radius",F),O.setUniform1f("intensity",4*this._attenuation/F**6),O.bindTexture(this._noiseTexture,"rnm"),O.bindTexture(s,"normalMap"),O.bindTexture(t,"depthMap"),i(this.quadVAO)&&(this.quadVAO=n(this._rctx)),r.bindVAO(this.quadVAO),r.drawArrays(m.TRIANGLE_STRIP,0,g(this.quadVAO,"geometry"));const B=this._blurTechnique.program;r.useProgram(B),B.bindTexture(this._ssaoFBO.colorTexture,"tex"),B.bindTexture(s,"normalMap"),B.bindTexture(t,"depthMap"),r.setViewport(0,0,c/this._blurSizePx,p/this._blurSizePx),r.bindFramebuffer(this._blur0FBO),B.setUniform2f("screenDimensions",c,p),B.setUniform2f("blurSize",0,this._blurSizePx*f/p),B.setUniform2f("nearFar",e.near,e.far),x>5e4&&(T=Math.max(0,T-(x-5e4))),B.setUniform1f("projScale",T),r.drawArrays(m.TRIANGLE_STRIP,0,g(this.quadVAO,"geometry")),B.setUniform2f("blurSize",this._blurSizePx*d/c,0),r.bindFramebuffer(this._blur1FBO),B.bindTexture(this._blur0FBO.colorTexture,"tex"),r.drawArrays(m.TRIANGLE_STRIP,0,g(this.quadVAO,"geometry")),r.setViewport(o[0],o[1],o[2],o[3])}bind(e,t){this.enabled&&s(this._blur1FBO)&&s(this._ssaoFBO)?(e.bindTexture(this._blur1FBO.colorTexture,"ssaoTex"),e.setUniform4f("viewportPixelSz",t.fullViewport[0],t.fullViewport[1],1/this._ssaoFBO.width,1/this._ssaoFBO.height)):e.setUniform4f("viewportPixelSz",-1,-1,-1,-1)}_selectPrograms(){this._ssaoTechniqueConfig.output=b.SSAO,this._ssaoTechnique=this._techniqueRep.releaseAndAcquire(l,this._ssaoTechniqueConfig,this._ssaoTechnique),this._ssaoTechniqueConfig.output=b.Blur,this._blurTechnique=this._techniqueRep.releaseAndAcquire(l,this._ssaoTechniqueConfig,this._blurTechnique)}_enable(){this.enabled||(this._enabled=!0,this._loadResources((()=>{this._enabled&&this._initialize()})))}_loadResources(e){this._data?e():import("./SSAOHelperData.js").then((t=>{this._data=t,e()}))}_initialize(){const e={target:f.TEXTURE_2D,pixelFormat:d.RGBA,dataType:c.UNSIGNED_BYTE,samplingMode:p.LINEAR,wrapMode:O.CLAMP_TO_EDGE,width:0,height:0},t={colorTarget:T.TEXTURE,depthStencilTarget:x.NONE};a(this._data.noiseTexture).then((s=>{this._enabled&&(this._ssaoFBO=new F(this._rctx,t,e),this._blur0FBO=new F(this._rctx,t,e),this._blur1FBO=new F(this._rctx,t,e),this._noiseTexture=new B(this._rctx,{target:f.TEXTURE_2D,pixelFormat:d.RGBA,dataType:c.UNSIGNED_BYTE,hasMipmap:!0,width:s.width,height:s.height},s),this._requestRender())})),this._selectPrograms()}_disable(){this._enabled=!1,this._noiseTexture=e(this._noiseTexture),this._blur1FBO=e(this._blur1FBO),this._blur0FBO=e(this._blur0FBO),this._ssaoFBO=e(this._ssaoFBO)}get gpuMemoryUsage(){return(s(this._blur0FBO)?this._blur0FBO.gpuMemoryUsage:0)+(s(this._blur1FBO)?this._blur1FBO.gpuMemoryUsage:0)+(s(this._ssaoFBO)?this._ssaoFBO.gpuMemoryUsage:0)}get test(){return{ssao:this._ssaoFBO,blur:this._blur1FBO}}}const A=r(),q=o();export{S as SSAOHelper};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import o from"../../../../Color.js";import{get as t,isSome as r}from"../../../../core/maybe.js";import{pt2px as i}from"../../../../core/screenUtils.js";import{Z as l}from"../../../../chunks/vec4f64.js";class s{constructor(o){this.definition=o,this.key=JSON.stringify(o),this.haloSize=Math.round(o.halo.size),this.fillStyle=this._colorToRGBA(o.color),this.haloStyle=this._colorToRGB(o.halo.color)}_colorToRGB(o){return`rgb(${o.slice(0,3).map((o=>Math.floor(255*o))).toString()})`}_colorToRGBA(o){return`rgba(${o.slice(0,3).map((o=>Math.floor(255*o))).toString()},${o[3]})`}static fromSymbol(e,n=1){const a=t(e,"material","color"),f=r(a)?o.toUnitRGBA(a):l,c=e.halo,h=null!=e.size?i(e.size):12,m={family:e.font&&e.font.family?e.font.family:"sans-serif",weight:e.font&&e.font.weight?e.font.weight:"normal",style:e.font&&e.font.style?e.font.style:"normal"},y=r(c)&&r(c.color)&&c.size>0?{size:i(c.size),color:o.toUnitRGBA(c.color)}:{size:0,color:l};return new s({size:h,color:f,font:m,halo:y,pixelRatio:n})}}export{s as TextRenderParameters};
5
+ import o from"../../../../Color.js";import t from"../../../../core/Logger.js";import{get as r,mapOr as e,isSome as i}from"../../../../core/maybe.js";import{pt2px as s}from"../../../../core/screenUtils.js";import{Z as l}from"../../../../chunks/vec4f64.js";const n=t.getLogger("esri.views.3d.webgl-engine.lib.TextRenderParameters");class a{constructor(o){this.definition=o,this.key=JSON.stringify(o),this.haloSize=Math.round(o.halo.size),this.fillStyle=this._colorToRGBA(o.color),this.haloStyle=this._colorToRGB(o.halo.color)}fontString(o){const t=this.definition.font;return`${t.style} ${t.weight} ${o}px ${t.family}, sans-serif`}_colorToRGB(o){return`rgb(${o.slice(0,3).map((o=>Math.floor(255*o))).toString()})`}_colorToRGBA(o){return`rgba(${o.slice(0,3).map((o=>Math.floor(255*o))).toString()},${o[3]})`}static async fromSymbol(t,c=1){const f=r(t,"material","color"),m=e(f,l,o.toUnitRGBA),h=e(t.size,12,s),g=t.lineHeight,y={family:e(t.font,"sans-serif",(o=>o.family)),weight:e(t.font,"normal",(o=>o.weight)),style:e(t.font,"normal",(o=>o.style))},d=t.halo,p=i(d)&&i(d.color)&&d.size>0?{size:s(d.size),color:o.toUnitRGBA(d.color)}:{size:0,color:l},S=new a({color:m,size:h,lineSpacingFactor:g,font:y,halo:p,pixelRatio:c}),u=S.fontString(h);try{await document.fonts.load(u)}catch(b){n.warnOnce(`Failed to preload font '${u}'. Some text symbology may be rendered using the default browser font.`)}return S}}export{a as TextRenderParameters};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{isNone as e,isSome as t}from"../../../../core/maybe.js";class i{constructor(e,t,i=2048){this.text=e,this._parameters=t,this.maxSize=i,this._lineWidths=new Array,this._renderPixelRatio=null,this._displayWidth=null,this.key=`${this._parameters.key}--${e}`,this._lines=e.split(/\r?\n/),this._lineHeight=this._computeLineHeight()}get displayWidth(){return this._ensureTextWidth()}get displayHeight(){return this._lineHeight*this._lines.length}get renderedWidth(){return Math.round(this.displayWidth*this.renderPixelRatio)}get renderedHeight(){return Math.round(this.displayHeight*this.renderPixelRatio)}get renderedLineHeight(){return Math.round(this._lineHeight*this.renderPixelRatio)}get renderedFontSize(){return this._parameters.definition.size*this.renderPixelRatio}get renderedHaloSize(){return this._parameters.haloSize*this.renderPixelRatio}get renderPixelRatio(){if(e(this._renderPixelRatio)){const e=this._parameters.definition.pixelRatio;this.maxSize>0?this._renderPixelRatio=Math.min(e,Math.min(this.maxSize/(this.displayWidth*e),this.maxSize/(this.displayHeight*e))):this._renderPixelRatio=e}return this._renderPixelRatio}_getLineXOffset(e){return Math.round((this.renderedWidth-this._lineWidths[e]*this.renderPixelRatio)/2)}render(e,t=0,i=0){const n=this.renderedLineHeight,h=this.renderedHaloSize,a=s(e.textAlign,this.renderedWidth)+h,l=h+r;e.save(),h>0&&this._renderHalo(e,a,l,t,i),this._setFontProperties(e,this.renderedFontSize),i+=l,t+=a;for(let s=0;s<this._lines.length;++s){e.globalCompositeOperation="destination-out",e.fillStyle="rgb(0, 0, 0)";const r=this._lines[s],h=this._getLineXOffset(s);e.fillText(r,t+h,i),e.globalCompositeOperation="source-over",e.fillStyle=this._parameters.fillStyle,e.fillText(r,t+this._getLineXOffset(s),i),i+=n}e.restore()}_renderHalo(e,t,i,s,r){const n=this.renderedWidth,o=this.renderedHeight,d=h(a,Math.max(n,l),Math.max(o,l)),_=d.getContext("2d");_.clearRect(0,0,n,o),this._setFontProperties(_,this.renderedFontSize),_.fillStyle=this._parameters.haloStyle,_.strokeStyle=this._parameters.haloStyle;const g=this.renderedHaloSize<3;_.lineJoin=g?"miter":"round",g?this._renderHaloEmulated(_,t,i):this._renderHaloNative(_,t,i),e.globalAlpha=this._parameters.definition.halo.color[3],e.drawImage(d,0,0,n,o,s,r,n,o),e.globalAlpha=1}_renderHaloEmulated(e,t,i){const s=this.renderedLineHeight,r=this.renderedHaloSize;for(let h=0;h<this._lines.length;++h){const a=this._lines[h],l=this._getLineXOffset(h);for(const[s,h]of n)e.fillText(a,t+l+r*s,i+r*h);i+=s}}_renderHaloNative(e,t,i){const s=this.renderedLineHeight,r=this.renderedHaloSize;for(let n=0;n<this._lines.length;++n){const h=2*r,a=this._lines[n],l=this._getLineXOffset(n),o=5,d=.1;for(let s=0;s<o;s++){const r=1-(o-1)*d+s*d;e.lineWidth=r*h,e.strokeText(a,t+l,i)}i+=s}}_setFontProperties(e,t){const i=this._parameters.definition.font,s=`${i.style} ${i.weight} ${t}px ${i.family}, sans-serif`;e.font=s,e.textAlign="left",e.textBaseline="top"}_ensureTextWidth(){if(t(this._displayWidth))return this._displayWidth;const e=h(a,l,l).getContext("2d");this._setFontProperties(e,this._parameters.definition.size);let i=0,s=2*this._parameters.haloSize;this._lineWidths.length=0;const r=this._parameters.definition.font;("italic"===r.style||"oblique"===r.style||"string"==typeof r.weight&&("bold"===r.weight||"bolder"===r.weight)||"number"==typeof r.weight&&r.weight>600)&&(s+=.3*e.measureText("A").width);for(const t of this._lines){const r=Math.round(e.measureText(t).width+s);this._lineWidths.push(r),i=Math.max(i,r)}return this._displayWidth=i,this._displayWidth}_computeLineHeight(){const e=1.275*this._parameters.definition.size;return Math.ceil(e+2*this._parameters.haloSize)+r}}function s(e,t){return"center"===e?.5*t:"right"===e?t:0}const r=1,n=[];{const e=16;for(let t=0;t<360;t+=360/e)n.push([Math.cos(Math.PI*t/180),Math.sin(Math.PI*t/180)])}function h(e,t,i){return e.canvas||(e.canvas=document.createElement("canvas")),e.canvas.width=t,e.canvas.height=i,e.canvas}const a={canvas:null},l=512;export{i as TextRenderer,i as default,h as getTextHelperCanvas};
5
+ import{isNone as e,isSome as t}from"../../../../core/maybe.js";import i from"../../support/debugFlags.js";class s{constructor(e,t,i=2048){this.text=e,this._parameters=t,this.maxSize=i,this._lineWidths=new Array,this._renderPixelRatio=null,this._displayWidth=null,this._textHeight=null,this._baselinePosition=null,this.key=`${this._parameters.key}--${e}`,this._lines=e.split(/\r?\n/)}get displayWidth(){return Math.ceil(this._ensureTextWidth())}get displayHeight(){const e=this.lineSpacing*(this._lines.length-1),t=this.textHeight;return Math.ceil(e+t+2*this._parameters.haloSize)}get renderedWidth(){return Math.ceil(this.displayWidth*this.renderPixelRatio)}get renderedHeight(){return Math.ceil(this.displayHeight*this.renderPixelRatio)}get renderedLineSpacing(){return this.lineSpacing*this.renderPixelRatio}get lineSpacing(){return(this.textHeight+this.linePadding)*this._parameters.definition.lineSpacingFactor}get textHeight(){return this._ensureHeightMetrics().textHeight}get linePadding(){return this.textHeight*d}get renderedBaselinePosition(){return this.baselinePosition*this.renderPixelRatio}get baselinePosition(){return this._ensureHeightMetrics().baselinePosition}get renderedFontSize(){return this._parameters.definition.size*this.renderPixelRatio}get renderedHaloSize(){return this._parameters.haloSize*this.renderPixelRatio}get renderPixelRatio(){if(e(this._renderPixelRatio)){const e=this._parameters.definition.pixelRatio;this.maxSize>0?this._renderPixelRatio=Math.min(e,Math.min(this.maxSize/(this.displayWidth*e),this.maxSize/(this.displayHeight*e))):this._renderPixelRatio=e}return this._renderPixelRatio}_getLineXOffset(e){return Math.round((this.renderedWidth-this._lineWidths[e]*this.renderPixelRatio)/2)}render(e,t=0,s=0){const r=this.renderedLineSpacing,o=this.renderedHaloSize,a=t,l=s,d=n(e.textAlign,this.renderedWidth)+o,g=o;e.save(),o>0&&this._renderHalo(e,d,g,t,s),this._setFontProperties(e,this.renderedFontSize),s+=g+this.renderedBaselinePosition,t+=d;for(let i=0;i<this._lines.length;++i){e.globalCompositeOperation="destination-out",e.fillStyle="rgb(0, 0, 0)";const n=this._lines[i];h(e,n,t+this._getLineXOffset(i),s),e.globalCompositeOperation="source-over",e.fillStyle=this._parameters.fillStyle,h(e,n,t+this._getLineXOffset(i),s),s+=r}if(i.TEXT_SHOW_BASELINE){e.strokeStyle=_,e.setLineDash([2,2]),e.lineWidth=1;let t=l+g;const i=this.renderedBaselinePosition;for(let s=0;s<this._lines.length;++s){const s=Math.round(t+i)+.5;e.beginPath(),e.moveTo(a,s),e.lineTo(a+this.renderedWidth,s),e.stroke(),t+=r}}i.TEXT_SHOW_BORDER&&(e.strokeStyle=_,e.setLineDash([]),e.lineWidth=1,e.beginPath(),e.moveTo(a+.5,l+.5),e.lineTo(a+this.renderedWidth-.5,l+.5),e.lineTo(a+this.renderedWidth-.5,l+this.renderedHeight-.5),e.lineTo(a+.5,l+this.renderedHeight-.5),e.lineTo(a+.5,l+.5),e.stroke()),e.restore()}_renderHalo(e,t,i,s,n){const r=this.renderedWidth,h=this.renderedHeight,o=a(l,Math.max(r,g),Math.max(h,g)),d=o.getContext("2d");d.clearRect(0,0,r,h),this._setFontProperties(d,this.renderedFontSize),d.fillStyle=this._parameters.haloStyle,d.strokeStyle=this._parameters.haloStyle;const _=this.renderedHaloSize<3;d.lineJoin=_?"miter":"round",_?this._renderHaloEmulated(d,t,i):this._renderHaloNative(d,t,i),e.globalAlpha=this._parameters.definition.halo.color[3],e.drawImage(o,0,0,r,h,s,n,r,h),e.globalAlpha=1}_renderHaloEmulated(e,t,i){const s=this.renderedLineSpacing,n=this.renderedHaloSize,o=this.renderedBaselinePosition;for(let a=0;a<this._lines.length;++a){const l=this._lines[a],d=this._getLineXOffset(a);for(const[s,a]of r)h(e,l,t+d+n*s,i+o+n*a);i+=s}}_renderHaloNative(e,t,i){const s=this.renderedLineSpacing,n=this.renderedHaloSize,r=this.renderedBaselinePosition;for(let h=0;h<this._lines.length;++h){const a=2*n,l=this._lines[h],d=this._getLineXOffset(h),g=5,_=.1;for(let s=0;s<g;s++){const n=1-(g-1)*_+s*_;e.lineWidth=n*a,o(e,l,t+d,i+r)}i+=s}}_setFontProperties(e,t){e.font=this._parameters.fontString(t),e.textAlign="left",e.textBaseline="alphabetic"}_ensureTextWidth(){if(t(this._displayWidth))return this._displayWidth;const e=a(l,g,g).getContext("2d");this._setFontProperties(e,this._parameters.definition.size);let i=0,s=2*this._parameters.haloSize;this._lineWidths.length=0;const n=this._parameters.definition.font;("italic"===n.style||"oblique"===n.style||"string"==typeof n.weight&&("bold"===n.weight||"bolder"===n.weight)||"number"==typeof n.weight&&n.weight>600)&&(s+=.3*e.measureText("A").width);for(const t of this._lines){const n=e.measureText(t).width+s;this._lineWidths.push(n),i=Math.max(i,n)}return this._displayWidth=i,this._displayWidth}_ensureHeightMetrics(){if(e(this._textHeight)||e(this._baselinePosition)){const e=this.text+c,t=a(l,g,g).getContext("2d");this._setFontProperties(t,this._parameters.definition.size);const i=t.measureText(e),s=i.actualBoundingBoxAscent+i.actualBoundingBoxDescent;this._textHeight=s,this._baselinePosition=i.actualBoundingBoxAscent}return{textHeight:this._textHeight,baselinePosition:this._baselinePosition}}}function n(e,t){return"center"===e?.5*t:"right"===e?t:0}const r=[];{const e=16;for(let t=0;t<360;t+=360/e)r.push([Math.cos(Math.PI*t/180),Math.sin(Math.PI*t/180)])}function h(e,t,i,s){e.fillText(t,Math.round(i),Math.round(s))}function o(e,t,i,s){e.strokeText(t,Math.round(i),Math.round(s))}function a(e,t,i){return e.canvas||(e.canvas=document.createElement("canvas")),e.canvas.width=t,e.canvas.height=i,e.canvas}const l={canvas:null},d=.2,g=512,_="rgb(255, 0, 255, 0.5)",c=(()=>{let e="";for(let t=32;t<127;t++)e+=String.fromCharCode(t);return e})();export{s as TextRenderer,s as default,a as getTextHelperCanvas};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{isNone as r,isSome as e}from"../../../../core/maybe.js";import{isPclIntersectorResult as t,isI3sIntersectorResult as i}from"../../layers/i3s/Intersector.js";import{isTerrainIntersectorResult as a,isOverlayIntersectorResult as n}from"../../terrain/Intersector.js";import{isObjectIntersectorResult as c,isHudIntersectorResult as o}from"./intersectorUtils.js";import{isLodIntersectorResult as l}from"./lodRendering/Intersector.js";function s(r,e){return c(r)||o(r)?g(r.target.object.metadata,e):a(r)?null==(l=e.map)?void 0:l.ground:t(r)||i(r)||n(r)?g(r.target,e):null;var l}function p(r,e){return c(r)||o(r)?u(r.target.object.metadata,e):t(r)?r.target.createGraphic():n(r)||l(r)?u(r.target,e):i(r)?d(r.target,e):null}function u(t,i){if(r(t)||r(t.graphicUid))return null;const a=g(t,i);if(r(a))return null;if(a===i.graphics)return e(i.graphicsView)?i.graphicsView.getGraphicFromGraphicUid(t.graphicUid):null;const n=i.allLayerViews.find((r=>r.layer===a));return n&&!n.suspended&&"getGraphicFromGraphicUid"in n&&e(t.graphicUid)?n.getGraphicFromGraphicUid(t.graphicUid):null}function d(e,t){const i=g(e,t);if(r(i))return null;const a=t.allLayerViews.find((r=>r.layer===i));return a&&!a.suspended&&"getGraphicFromIntersectorTarget"in a?a.getGraphicFromIntersectorTarget(e):null}function g(t,i){return r(t.layerUid)?null:e(i.graphicsView)&&t.layerUid===i.graphicsView.graphics3d.layer.id?i.graphics:i.map.findLayerByUid(t.layerUid)}export{p as toGraphic,s as toOwner};
5
+ import{isNone as r,isSome as e}from"../../../../core/maybe.js";import{isPclIntersectorResult as t,isI3sIntersectorResult as i}from"../../layers/i3s/Intersector.js";import{isTerrainIntersectorResult as a,isOverlayIntersectorResult as n}from"../../terrain/Intersector.js";import{isObjectIntersectorResult as c,isHudIntersectorResult as o}from"./intersectorUtils.js";import{isLodIntersectorResult as l}from"./lodRendering/Intersector.js";function s(r,e){return c(r)||o(r)?g(r.target.object.metadata,e):a(r)?null==(l=e.map)?void 0:l.ground:t(r)||i(r)||n(r)?g(r.target,e):null;var l}function p(r,e){return c(r)||o(r)?u(r.target.object.metadata,e):t(r)?r.target.createGraphic():n(r)||l(r)?u(r.target,e):i(r)?d(r.target,e):null}function u(t,i){if(r(t)||r(t.graphicUid))return null;const a=g(t,i);if(r(a))return null;if(a===i.graphics)return e(i.graphicsView)?i.graphicsView.getGraphicFromGraphicUid(t.graphicUid):null;const n=i.allLayerViews.find((r=>r.layer===a));return n&&!n.suspended&&"getGraphicFromGraphicUid"in n&&e(t.graphicUid)?n.getGraphicFromGraphicUid(t.graphicUid):null}function d(e,t){const i=g(e,t);if(r(i))return null;const a=t.allLayerViews.find((r=>r.layer===i));return a&&!a.suspended&&"getGraphicFromIntersectorTarget"in a?a.getGraphicFromIntersectorTarget(e):null}function g(t,i){return r(t.layerUid)?null:e(i.graphicsView)&&t.layerUid===i.graphicsView.processor.layer.id?i.graphics:i.map.findLayerByUid(t.layerUid)}export{p as toGraphic,s as toOwner};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{isNone as e}from"../../../../../core/maybe.js";import{isAborted as t,throwIfAborted as s}from"../../../../../core/promiseUtils.js";import{I as a,c as n}from"../../../../../chunks/mat4f64.js";import{a as i}from"../../../../../chunks/vec2f64.js";import{f as r,d as l,m as o}from"../../../../../chunks/vec3.js";import{c}from"../../../../../chunks/vec3f64.js";import{c as h}from"../../../../../chunks/vec4f64.js";import d from"../../../support/debugFlags.js";import{glLayout as u}from"../../../support/buffer/glUtil.js";import{bindOutputHighlight as _}from"../../core/shaderLibrary/output/OutputHighlight.glsl.js";import p from"../Camera.js";import{Default3D as m}from"../DefaultVertexAttributeLocations.js";import{IntersectorType as f}from"../IntersectorInterfaces.js";import{DepthOrder as g}from"../Octree.js";import{RenderPass as I}from"../RenderPass.js";import{RenderSlot as D}from"../RenderSlot.js";import{assert as y}from"../Util.js";import{InstanceData as E,StateFlags as T}from"./InstanceData.js";import{InstanceOctree as v}from"./InstanceOctree.js";import{LevelSelector as R}from"./LevelSelector.js";import{LodLevel as A}from"./LodLevel.js";import{RenderInstanceData as b}from"./RenderInstanceData.js";import{getInstanceBufferLayout as C}from"../../materials/DefaultMaterial.js";import{colorMixModes as L}from"../../materials/internal/MaterialUtil.js";import{encodeDoubleVec3 as S}from"../../materials/renderers/utils.js";import{bindVertexBufferLayout as U,unbindVertexBufferLayout as x}from"../../../../webgl/Util.js";let P=function(e){const t=e.baseBoundingSphere.radius,s=e.levels.map((e=>e.minScreenSpaceRadius));return new R(t,s)};function O(e){P=e}class H{constructor(e,t,s,a){this.type=f.LOD,this.isGround=!1,this._inverseViewport=i(),this._levels=[],this._defaultRenderInstanceData=[],this._highlightRenderInstanceData=[],this._instanceIndex=0,this._slicePlane=!1,this._enableLevelSelection=!0,this._lastCamera=new p,this._updateCyclesWithStaticCamera=-1,this._needFullCycle=!1,this.slots=[D.OPAQUE_PLUGIN,D.TRANSPARENT_PLUGIN],this.canRender=!0,this._symbol=e,this._optionalFields=t,this._metadata=s,this._instanceBufferLayout=C({instancedDoublePrecision:!0,instanced:t}),this._glInstanceBufferLayout=u(this._instanceBufferLayout,1),this._instanceData=new E(this._optionalFields,a),this._instanceData.on("instance-added",(()=>this._requestUpdateCycle())),this._instanceData.on("instance-removed",(()=>this._requestUpdateCycle())),this._instanceData.on("instance-transform-changed",(e=>{this._requestUpdateCycle(),this._metadata.notifyGraphicGeometryChanged(e.index)})),this._instanceData.on("instance-visibility-changed",(e=>{this._requestUpdateCycle(!0),this._metadata.notifyGraphicVisibilityChanged(e.index)})),this._instanceData.on("instance-highlight-changed",(()=>this._requestUpdateCycle(!0))),this._enableLevelSelection=this._symbol.levels.length>1}get levels(){return this._levels}get baseBoundingBox(){return this._levels[this._levels.length-1].boundingBox}get baseBoundingSphere(){return this._levels[this._levels.length-1].boundingSphere}get baseMaterial(){return this._levels[this._levels.length-1].components[0].material}get slicePlaneEnabled(){return this._slicePlane}set slicePlaneEnabled(e){this._slicePlane=e}get layerUid(){return this._metadata.layerUid}get instanceData(){return this._instanceData}get memoryUsage(){const e={cpu:0,gpu:0};return this._defaultRenderInstanceData.forEach((t=>{const s=t.memoryUsage;e.cpu+=s.cpu,e.gpu+=s.gpu})),this._highlightRenderInstanceData.forEach((t=>{const s=t.memoryUsage;e.cpu+=s.cpu,e.gpu+=s.gpu})),e}get renderStats(){const e=this._instanceData.size,t=[];return this._levels.forEach(((e,s)=>{const a=this._defaultRenderInstanceData[s],n=this._highlightRenderInstanceData[s],i=a.size+n.size,r=e.triangleCount;t.push({renderedInstances:i,renderedTriangles:i*r,trianglesPerInstance:r})})),{totalInstances:e,renderedInstances:t.reduce(((e,t)=>e+t.renderedInstances),0),renderedTriangles:t.reduce(((e,t)=>e+t.renderedTriangles),0),levels:t}}async initializeRenderContext(e,a){this._context=e;const n=e.renderContext.rctx,i=await Promise.allSettled(this._symbol.levels.map((t=>(this._defaultRenderInstanceData.push(new b(n,this._instanceBufferLayout)),this._highlightRenderInstanceData.push(new b(n,this._instanceBufferLayout)),A.create(e,t,a))))),r=i.map((e=>"fulfilled"===e.status?e.value:null)).filter((e=>e));if(t(a)||r.length!==i.length){r.forEach((e=>e.destroy())),s(a);for(const e of i)if("rejected"===e.status)throw e.reason}this._levels=r,this._levelSelector=P(this)}uninitializeRenderContext(){this._invalidateOctree(),this._levels.forEach((e=>e.destroy())),this._defaultRenderInstanceData.forEach((e=>e.destroy())),this._highlightRenderInstanceData.forEach((e=>e.destroy()))}get needsTransparentPass(){return this._levels.some((e=>e.components.some((e=>e.material.requiresSlot(D.TRANSPARENT_MATERIAL)))))}get needsHighlight(){return this._highlightRenderInstanceData.some((e=>e.size>0))}prepareRender(e,t){if(d.LOD_INSTANCE_RENDERER_DISABLE_UPDATES)return;if(this._enableLevelSelection){const e=t.equals(this._lastCamera);this._lastCamera.copyFrom(t),e||this._requestUpdateCycle()}const s=this._needFullCycle?this._instanceData.size:2e3;this._needFullCycle=!1,this._updateInstances(t,s),this.needsUpdates&&this._context.requestRender()}render(e){var t,s;const n=e.slot===D.OPAQUE_PLUGIN?D.OPAQUE_MATERIAL:e.slot===D.TRANSPARENT_PLUGIN?D.TRANSPARENT_MATERIAL:null;if(!n||!this.baseMaterial.isVisible()||!this.baseMaterial.isVisibleInPass(e.pass))return;const i=e.camera;this._inverseViewport[0]=1/i.fullViewport[2],this._inverseViewport[1]=1/i.fullViewport[3];const r={slot:n,origin:[0,0,0],camera:i,inverseViewport:this._inverseViewport,shadowMap:e.shadowMap,shadowMappingEnabled:e.shadowMap.enabled,ssaoHelper:e.ssaoHelper,ssaoEnabled:e.ssaoHelper.enabled,screenToWorldRatio:null,screenToPCSRatio:null,slicePlane:e.sliceHelper&&e.sliceHelper.plane,hudVisibilityTexture:e.offscreenRenderingHelper?e.offscreenRenderingHelper.hudVisibilityTexture:null,highlightDepthTexture:null!=(t=null==(s=e.offscreenRenderingHelper)?void 0:s.depthTexture)?t:null,hasOccludees:!1,linearDepthTexture:null,lastFrameColorTexture:null,reprojectionMatrix:a,ssrEnabled:!1,lighting:e.scenelightingData,transparencyPassType:e.transparencyPassType,terrainLinearDepthTexture:e.multipassTerrainParams.terrainLinearDepthTexture,geometryLinearDepthTexture:e.multipassGeometryParams.geometryLinearDepthTexture,multipassTerrainEnabled:e.multipassTerrainParams.multipassTerrainEnabled,cullAboveGround:e.multipassTerrainParams.cullAboveGround,multipassGeometryEnabled:e.multipassGeometryParams.multipassGeometryEnabled,highlightColorTexture:null};e.rctx.bindVAO();const l=e.pass!==I.MATERIAL_HIGHLIGHT&&e.pass!==I.MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT,o=e.pass!==I.MATERIAL_DEPTH_SHADOWMAP_DEFAULT;l&&this._renderComponents(e,n,r,this._defaultRenderInstanceData),o&&this._renderComponents(e,n,r,this._highlightRenderInstanceData)}intersect(e,t,s,a){if(!this.baseMaterial.isVisible())return;const n=c();r(n,a,s);const i=n=>{this._instanceData.getCombinedModelTransform(n,N),e.transform.set(N),o(G,s,e.transform.inverse),o(F,a,e.transform.inverse);const i=this._instanceData.getState(n),r=this._instanceData.getLodLevel(n);y(i&T.ACTIVE,"invalid instance state"),y(r>=0&&r<this._levels.length,"invaid lod level"),this._levels[r].intersect(e,t,G,F,n,this._metadata)};this.baseMaterial.parameters.verticalOffset?this.octree.forEach(i):this.octree.forEachAlongRay(s,n,i)}queryDepthRange(e){return this._queryDepthRangeOctree(e)}notifyShaderTransformationChanged(){this._invalidateOctree()}_requestUpdateCycle(e=!1){this._updateCyclesWithStaticCamera=-1,e&&(this._needFullCycle=!0),this.needsUpdates&&this._context.requestRender()}get needsUpdates(){return this._instanceData.size>0&&this._updateCyclesWithStaticCamera<1}get octree(){return this._octree||(this._octree=this._buildOctree()),this._octree}_invalidateOctree(){this._octree&&(this._octree.destroy(),this._octree=null)}_buildOctree(){const e=new v(this._instanceData,this.baseBoundingSphere),t=this._instanceData,s=t.view?t.view.state:null;for(let a=0;a<this._instanceData.capacity;++a){s.get(a)&T.ACTIVE&&e.addInstance(a)}return e}_queryDepthRangeOctree(e){const t=e.eye,s=e.viewForward,a=this.octree.findClosest(s,g.FRONT_TO_BACK,e.frustum),n=this.octree.findClosest(s,g.BACK_TO_FRONT,e.frustum);if(null!=a&&null!=n){this._instanceData.view.boundingSphere.getVec(a,j),r(j,j,t);const i=l(j,s)-j[3];this._instanceData.view.boundingSphere.getVec(n,j),r(j,j,t);const o=l(j,s)+j[3];return{near:Math.max(e.near,i),far:Math.min(e.far,o)}}return{near:1/0,far:-1/0}}_startUpdateCycle(){this._updateCyclesWithStaticCamera++,this._defaultRenderInstanceData.forEach((e=>{e.startUpdateCylce()})),this._highlightRenderInstanceData.forEach((e=>{e.startUpdateCylce()})),this.needsUpdates&&this._context.requestRender()}_updateInstances(e,t){const s=this._enableLevelSelection,a=this._levelSelector;a.updateCamera(e),this._defaultRenderInstanceData.forEach((e=>{e.beginUpdate()})),this._highlightRenderInstanceData.forEach((e=>{e.beginUpdate()}));const n=this._instanceData,i=this._instanceData.view,r=n.size,l=n.capacity;let o=this._instanceIndex;t=Math.min(r,t);for(let c=0;c<t;++c){0===o&&this._startUpdateCycle();const e=i.state.get(o);let r=0;if(!(e&T.ALLOCATED)){o=(o+1)%l,t++;continue}const c=i.lodLevel.get(o);if(e&T.DEFAULT_ACTIVE&&this._defaultRenderInstanceData[c].freeTail(),e&T.HIGHLIGHT_ACTIVE&&this._highlightRenderInstanceData[c].freeTail(),e&T.REMOVE)n.freeInstance(o);else if(e&T.VISIBLE){let t=0;s&&(i.modelOrigin.getVec(o,w),t=a.selectLevel(w,n.getCombinedMedianScaleFactor(o))),r=e&~(T.ACTIVE|T.TRANSFORM_CHANGED),t>=0&&(e&T.HIGHLIGHT?(M(this._highlightRenderInstanceData[t],i,o),r|=T.HIGHLIGHT_ACTIVE):(M(this._defaultRenderInstanceData[t],i,o),r|=T.DEFAULT_ACTIVE)),i.state.set(o,r),i.lodLevel.set(o,t)}else r=e&~(T.ACTIVE|T.TRANSFORM_CHANGED),i.state.set(o,r);if(this._octree){const t=!!(e&T.ACTIVE),s=!!(r&T.ACTIVE);!t&&s?this._octree.addInstance(o):t&&!s?this._octree.removeInstance(o):t&&s&&e&T.TRANSFORM_CHANGED&&(this._octree.removeInstance(o),this._octree.addInstance(o))}o=(o+1)%l}this._instanceIndex=o,this._defaultRenderInstanceData.forEach((e=>{e.endUpdate()})),this._highlightRenderInstanceData.forEach((e=>{e.endUpdate()}))}_renderComponents(e,t,s,a){this.levels.forEach(((n,i)=>{n.components.forEach((n=>{this._renderComponent(e,t,s,a[i],n,i)}))}))}_renderComponent(t,s,a,n,i,r){if(0===n.size||!i.material.requiresSlot(s))return;const{rctx:l,pass:o}=t,c=i.glMaterials.load(l,o);if(e(c))return;const h=l.capabilities.instancing,u=c.beginSlot(a),p=u.program;u.bindPipelineState(l,s),l.useProgram(p),c.bind(a,u),l.bindVAO(i.vao),u.ensureAttributeLocations(i.vao),t.isHighlightPass&&_(p,a),u.bindDraw(a),d.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL&&t.pass===I.MATERIAL&&(p.setUniform4fv("externalColor",B[Math.min(r,B.length-1)]),p.setUniform1i("colorMixMode",L.replace));const f=n.capacity,g=n.headIndex,D=n.tailIndex,E=n.firstIndex,T=this._glInstanceBufferLayout,v=(e,t)=>{U(l,m,n.buffer,T,e),h.drawArraysInstanced(u.primitiveType,0,i.vertexCount,t-e),x(l,m,n.buffer,T)};i.material.parameters.transparent&&null!=E?g>D?(y(E>=D&&E<=g,"invalid firstIndex"),v(E,g),v(D,E)):g<D&&(E<=g?(y(E>=0&&E<=g,"invalid firstIndex"),v(E,g),v(D,f),v(0,E)):(y(E>=D&&E<=f,"invalid firstIndex"),v(E,f),v(0,g),v(D,E))):g>D?v(D,g):g<D&&(v(0,g),v(D,f)),l.bindVAO(null)}}function M(e,t,s){const a=e.allocateHead();V(t,s,e.view,a)}function V(e,t,s,a){S(e.modelOrigin,t,s.modelOriginHi,s.modelOriginLo,a),s.model.copyFrom(a,e.model,t),s.modelNormal.copyFrom(a,e.modelNormal,t),e.color&&s.color&&s.color.copyFrom(a,e.color,t),e.featureAttribute&&s.featureAttribute&&s.featureAttribute.copyFrom(a,e.featureAttribute,t)}const w=c(),j=h(),N=n(),G=c(),F=c(),B=[[1,0,1,1],[0,0,1,1],[0,1,0,1],[1,1,0,1],[1,0,0,1]];export{H as LodRenderer,O as setLevelSelectorFactory};
5
+ import{isNone as e}from"../../../../../core/maybe.js";import{isAborted as t,throwIfAborted as s}from"../../../../../core/promiseUtils.js";import{I as a,c as n}from"../../../../../chunks/mat4f64.js";import{a as i}from"../../../../../chunks/vec2f64.js";import{f as r,d as l,m as o}from"../../../../../chunks/vec3.js";import{c}from"../../../../../chunks/vec3f64.js";import{c as h}from"../../../../../chunks/vec4f64.js";import d from"../../../support/debugFlags.js";import{glLayout as u}from"../../../support/buffer/glUtil.js";import{bindOutputHighlight as _}from"../../core/shaderLibrary/output/OutputHighlight.glsl.js";import p from"../Camera.js";import{Default3D as m}from"../DefaultVertexAttributeLocations.js";import{IntersectorType as f}from"../IntersectorInterfaces.js";import{DepthOrder as g}from"../Octree.js";import{RenderPass as I}from"../RenderPass.js";import{RenderSlot as D}from"../RenderSlot.js";import{assert as v}from"../Util.js";import{InstanceData as y,StateFlags as E}from"./InstanceData.js";import{InstanceOctree as T}from"./InstanceOctree.js";import{LevelSelector as R}from"./LevelSelector.js";import{LodLevel as A}from"./LodLevel.js";import{RenderInstanceData as b}from"./RenderInstanceData.js";import{getInstanceBufferLayout as C}from"../../materials/DefaultMaterial.js";import{colorMixModes as L}from"../../materials/internal/MaterialUtil.js";import{encodeDoubleVec3 as S}from"../../materials/renderers/utils.js";import{bindVertexBufferLayout as U,unbindVertexBufferLayout as x}from"../../../../webgl/Util.js";let P=function(e){const t=e.baseBoundingSphere.radius,s=e.levels.map((e=>e.minScreenSpaceRadius));return new R(t,s)};function O(e){P=e}class H{constructor(e,t,s,a){this.type=f.LOD,this.isGround=!1,this._inverseViewport=i(),this._levels=[],this._defaultRenderInstanceData=[],this._highlightRenderInstanceData=[],this._instanceIndex=0,this._slicePlane=!1,this._enableLevelSelection=!0,this._lastCamera=new p,this._updateCyclesWithStaticCamera=-1,this._needFullCycle=!1,this.slots=[D.OPAQUE_PLUGIN,D.TRANSPARENT_PLUGIN],this.canRender=!0,this._symbol=e,this._optionalFields=t,this._metadata=s,this._instanceBufferLayout=C({instancedDoublePrecision:!0,instanced:t}),this._glInstanceBufferLayout=u(this._instanceBufferLayout,1),this._instanceData=new y(this._optionalFields,a),this._instanceData.on("instance-added",(()=>this._requestUpdateCycle())),this._instanceData.on("instance-removed",(()=>this._requestUpdateCycle())),this._instanceData.on("instance-transform-changed",(e=>{this._requestUpdateCycle(),this._metadata.notifyGraphicGeometryChanged(e.index)})),this._instanceData.on("instance-visibility-changed",(e=>{this._requestUpdateCycle(!0),this._metadata.notifyGraphicVisibilityChanged(e.index)})),this._instanceData.on("instance-highlight-changed",(()=>this._requestUpdateCycle(!0))),this._enableLevelSelection=this._symbol.levels.length>1}get levels(){return this._levels}get baseBoundingBox(){return this._levels[this._levels.length-1].boundingBox}get baseBoundingSphere(){return this._levels[this._levels.length-1].boundingSphere}get baseMaterial(){return this._levels[this._levels.length-1].components[0].material}get slicePlaneEnabled(){return this._slicePlane}set slicePlaneEnabled(e){this._slicePlane=e}get layerUid(){return this._metadata.layerUid}get instanceData(){return this._instanceData}get memoryUsage(){const e={cpu:0,gpu:0};return this._defaultRenderInstanceData.forEach((t=>{const s=t.memoryUsage;e.cpu+=s.cpu,e.gpu+=s.gpu})),this._highlightRenderInstanceData.forEach((t=>{const s=t.memoryUsage;e.cpu+=s.cpu,e.gpu+=s.gpu})),e}get renderStats(){const e=this._instanceData.size,t=[];return this._levels.forEach(((e,s)=>{const a=this._defaultRenderInstanceData[s],n=this._highlightRenderInstanceData[s],i=a.size+n.size,r=e.triangleCount;t.push({renderedInstances:i,renderedTriangles:i*r,trianglesPerInstance:r})})),{totalInstances:e,renderedInstances:t.reduce(((e,t)=>e+t.renderedInstances),0),renderedTriangles:t.reduce(((e,t)=>e+t.renderedTriangles),0),levels:t}}async initializeRenderContext(e,a){this._context=e;const n=e.renderContext.rctx,i=await Promise.allSettled(this._symbol.levels.map((t=>(this._defaultRenderInstanceData.push(new b(n,this._instanceBufferLayout)),this._highlightRenderInstanceData.push(new b(n,this._instanceBufferLayout)),A.create(e,t,a))))),r=i.map((e=>"fulfilled"===e.status?e.value:null)).filter((e=>e));if(t(a)||r.length!==i.length){r.forEach((e=>e.destroy())),s(a);for(const e of i)if("rejected"===e.status)throw e.reason}this._levels=r,this._levelSelector=P(this)}uninitializeRenderContext(){this._invalidateOctree(),this._levels.forEach((e=>e.destroy())),this._defaultRenderInstanceData.forEach((e=>e.destroy())),this._highlightRenderInstanceData.forEach((e=>e.destroy()))}get needsTransparentPass(){return this._levels.some((e=>e.components.some((e=>e.material.requiresSlot(D.TRANSPARENT_MATERIAL)))))}get needsHighlight(){return this._highlightRenderInstanceData.some((e=>e.size>0))}prepareRender(e,t){if(d.LOD_INSTANCE_RENDERER_DISABLE_UPDATES)return;if(this._enableLevelSelection){const e=t.equals(this._lastCamera);this._lastCamera.copyFrom(t),e||this._requestUpdateCycle()}const s=this._needFullCycle?this._instanceData.size:2e3;this._needFullCycle=!1,this._updateInstances(t,s),this.needsUpdates&&this._context.requestRender()}render(e){var t,s,n,i;const r=e.slot===D.OPAQUE_PLUGIN?D.OPAQUE_MATERIAL:e.slot===D.TRANSPARENT_PLUGIN?D.TRANSPARENT_MATERIAL:null;if(!r||!this.baseMaterial.isVisible()||!this.baseMaterial.isVisibleInPass(e.pass))return;const l=e.camera;this._inverseViewport[0]=1/l.fullViewport[2],this._inverseViewport[1]=1/l.fullViewport[3];const o={slot:r,origin:[0,0,0],camera:l,inverseViewport:this._inverseViewport,shadowMap:e.shadowMap,shadowMappingEnabled:e.shadowMap.enabled,ssaoHelper:e.ssaoHelper,ssaoEnabled:e.ssaoHelper.enabled,screenToWorldRatio:null,screenToPCSRatio:null,slicePlane:e.sliceHelper&&e.sliceHelper.plane,hudVisibilityTexture:null!=(t=null==(s=e.offscreenRenderingHelper)?void 0:s.hudVisibilityTexture)?t:null,highlightDepthTexture:null!=(n=null==(i=e.offscreenRenderingHelper)?void 0:i.depthTexture)?n:null,hasOccludees:!1,linearDepthTexture:null,lastFrameColorTexture:null,reprojectionMatrix:a,ssrEnabled:!1,lighting:e.scenelightingData,transparencyPassType:e.transparencyPassType,terrainLinearDepthTexture:e.multipassTerrainParams.terrainLinearDepthTexture,geometryLinearDepthTexture:e.multipassGeometryParams.geometryLinearDepthTexture,multipassTerrainEnabled:e.multipassTerrainParams.multipassTerrainEnabled,cullAboveGround:e.multipassTerrainParams.cullAboveGround,multipassGeometryEnabled:e.multipassGeometryParams.multipassGeometryEnabled,highlightColorTexture:null};e.rctx.bindVAO();const c=e.pass!==I.MATERIAL_HIGHLIGHT&&e.pass!==I.MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT,h=e.pass!==I.MATERIAL_DEPTH_SHADOWMAP_DEFAULT;c&&this._renderComponents(e,r,o,this._defaultRenderInstanceData),h&&this._renderComponents(e,r,o,this._highlightRenderInstanceData)}intersect(e,t,s,a){if(!this.baseMaterial.isVisible())return;const n=c();r(n,a,s);const i=n=>{this._instanceData.getCombinedModelTransform(n,N),e.transform.set(N),o(G,s,e.transform.inverse),o(F,a,e.transform.inverse);const i=this._instanceData.getState(n),r=this._instanceData.getLodLevel(n);v(i&E.ACTIVE,"invalid instance state"),v(r>=0&&r<this._levels.length,"invaid lod level"),this._levels[r].intersect(e,t,G,F,n,this._metadata)};this.baseMaterial.parameters.verticalOffset?this.octree.forEach(i):this.octree.forEachAlongRay(s,n,i)}queryDepthRange(e){return this._queryDepthRangeOctree(e)}notifyShaderTransformationChanged(){this._invalidateOctree()}_requestUpdateCycle(e=!1){this._updateCyclesWithStaticCamera=-1,e&&(this._needFullCycle=!0),this.needsUpdates&&this._context.requestRender()}get needsUpdates(){return this._instanceData.size>0&&this._updateCyclesWithStaticCamera<1}get octree(){return this._octree||(this._octree=this._buildOctree()),this._octree}_invalidateOctree(){this._octree&&(this._octree.destroy(),this._octree=null)}_buildOctree(){const e=new T(this._instanceData,this.baseBoundingSphere),t=this._instanceData,s=t.view?t.view.state:null;for(let a=0;a<this._instanceData.capacity;++a){s.get(a)&E.ACTIVE&&e.addInstance(a)}return e}_queryDepthRangeOctree(e){const t=e.eye,s=e.viewForward,a=this.octree.findClosest(s,g.FRONT_TO_BACK,e.frustum),n=this.octree.findClosest(s,g.BACK_TO_FRONT,e.frustum);if(null!=a&&null!=n){this._instanceData.view.boundingSphere.getVec(a,j),r(j,j,t);const i=l(j,s)-j[3];this._instanceData.view.boundingSphere.getVec(n,j),r(j,j,t);const o=l(j,s)+j[3];return{near:Math.max(e.near,i),far:Math.min(e.far,o)}}return{near:1/0,far:-1/0}}_startUpdateCycle(){this._updateCyclesWithStaticCamera++,this._defaultRenderInstanceData.forEach((e=>{e.startUpdateCylce()})),this._highlightRenderInstanceData.forEach((e=>{e.startUpdateCylce()})),this.needsUpdates&&this._context.requestRender()}_updateInstances(e,t){const s=this._enableLevelSelection,a=this._levelSelector;a.updateCamera(e),this._defaultRenderInstanceData.forEach((e=>{e.beginUpdate()})),this._highlightRenderInstanceData.forEach((e=>{e.beginUpdate()}));const n=this._instanceData,i=this._instanceData.view,r=n.size,l=n.capacity;let o=this._instanceIndex;t=Math.min(r,t);for(let c=0;c<t;++c){0===o&&this._startUpdateCycle();const e=i.state.get(o);let r=0;if(!(e&E.ALLOCATED)){o=(o+1)%l,t++;continue}const c=i.lodLevel.get(o);if(e&E.DEFAULT_ACTIVE&&this._defaultRenderInstanceData[c].freeTail(),e&E.HIGHLIGHT_ACTIVE&&this._highlightRenderInstanceData[c].freeTail(),e&E.REMOVE)n.freeInstance(o);else if(e&E.VISIBLE){let t=0;s&&(i.modelOrigin.getVec(o,w),t=a.selectLevel(w,n.getCombinedMedianScaleFactor(o))),r=e&~(E.ACTIVE|E.TRANSFORM_CHANGED),t>=0&&(e&E.HIGHLIGHT?(M(this._highlightRenderInstanceData[t],i,o),r|=E.HIGHLIGHT_ACTIVE):(M(this._defaultRenderInstanceData[t],i,o),r|=E.DEFAULT_ACTIVE)),i.state.set(o,r),i.lodLevel.set(o,t)}else r=e&~(E.ACTIVE|E.TRANSFORM_CHANGED),i.state.set(o,r);if(this._octree){const t=!!(e&E.ACTIVE),s=!!(r&E.ACTIVE);!t&&s?this._octree.addInstance(o):t&&!s?this._octree.removeInstance(o):t&&s&&e&E.TRANSFORM_CHANGED&&(this._octree.removeInstance(o),this._octree.addInstance(o))}o=(o+1)%l}this._instanceIndex=o,this._defaultRenderInstanceData.forEach((e=>{e.endUpdate()})),this._highlightRenderInstanceData.forEach((e=>{e.endUpdate()}))}_renderComponents(e,t,s,a){this.levels.forEach(((n,i)=>{n.components.forEach((n=>{this._renderComponent(e,t,s,a[i],n,i)}))}))}_renderComponent(t,s,a,n,i,r){if(0===n.size||!i.material.requiresSlot(s))return;const{rctx:l,pass:o}=t,c=i.glMaterials.load(l,o);if(e(c))return;const h=l.capabilities.instancing,u=c.beginSlot(a),p=u.program;u.bindPipelineState(l,s),l.useProgram(p),c.bind(a,u),l.bindVAO(i.vao),u.ensureAttributeLocations(i.vao),t.isHighlightPass&&_(p,a),u.bindDraw(a),d.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL&&t.pass===I.MATERIAL&&(p.setUniform4fv("externalColor",B[Math.min(r,B.length-1)]),p.setUniform1i("colorMixMode",L.replace));const f=n.capacity,g=n.headIndex,D=n.tailIndex,y=n.firstIndex,E=this._glInstanceBufferLayout,T=(e,t)=>{U(l,m,n.buffer,E,e),h.drawArraysInstanced(u.primitiveType,0,i.vertexCount,t-e),x(l,m,n.buffer,E)};i.material.parameters.transparent&&null!=y?g>D?(v(y>=D&&y<=g,"invalid firstIndex"),T(y,g),T(D,y)):g<D&&(y<=g?(v(y>=0&&y<=g,"invalid firstIndex"),T(y,g),T(D,f),T(0,y)):(v(y>=D&&y<=f,"invalid firstIndex"),T(y,f),T(0,g),T(D,y))):g>D?T(D,g):g<D&&(T(0,g),T(D,f)),l.bindVAO(null)}}function M(e,t,s){const a=e.allocateHead();V(t,s,e.view,a)}function V(e,t,s,a){S(e.modelOrigin,t,s.modelOriginHi,s.modelOriginLo,a),s.model.copyFrom(a,e.model,t),s.modelNormal.copyFrom(a,e.modelNormal,t),e.color&&s.color&&s.color.copyFrom(a,e.color,t),e.featureAttribute&&s.featureAttribute&&s.featureAttribute.copyFrom(a,e.featureAttribute,t)}const w=c(),j=h(),N=n(),G=c(),F=c(),B=[[1,0,1,1],[0,0,1,1],[0,1,0,1],[1,1,0,1],[1,0,0,1]];export{H as LodRenderer,O as setLevelSelectorFactory};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{c as e}from"../../../../chunks/mat3f64.js";import{s as t,g as i,n as s,f as r,l as a,a as n,d as o,t as l}from"../../../../chunks/vec3.js";import{c,f as u}from"../../../../chunks/vec3f64.js";import{ViewingMode as h}from"../../../ViewingMode.js";import{newLayout as d}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as p}from"../core/shaderLibrary/ShaderOutputOptions.js";import{Normals as m}from"../core/shaderLibrary/shading/Normals.glsl.js";import{defaultMaskAlphaCutoff as f}from"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import{CullFaceOptions as v,AlphaDiscardMode as g,VertexAttribute as b}from"../lib/basicInterfaces.js";import T from"../lib/GLMaterialTexture.js";import{materialParametersDefaults as C,Material as S}from"../lib/Material.js";import{OITPolygonOffsetLimit as O}from"../lib/OrderIndependentTransparency.js";import{RenderPass as x}from"../lib/RenderPass.js";import{RenderSlot as A}from"../lib/RenderSlot.js";import{getVerticalOffsetObject3D as E}from"../lib/verticalOffsetUtils.js";import{writeDefaultAttributes as M}from"./internal/bufferWriterUtils.js";import{verticalOffsetAtDistance as q,intersectTriangleGeometry as I}from"./internal/MaterialUtil.js";import{DefaultMaterialTechniqueConfiguration as P,DefaultMaterialTechnique as L}from"../shaders/DefaultMaterialTechnique.js";import{RealisticTreeTechnique as D}from"../shaders/RealisticTreeTechnique.js";class R extends S{constructor(e){super(e,_),this.supportsEdges=!0,this.techniqueConfig=new P,this.vertexBufferLayout=B(this.parameters),this.instanceBufferLayout=e.instanced?N(this.parameters):null}isVisibleInPass(e){return e!==x.MATERIAL_DEPTH_SHADOWMAP_ALL&&e!==x.MATERIAL_DEPTH_SHADOWMAP_DEFAULT&&e!==x.MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT||this.parameters.castShadows}isVisible(){const e=this.parameters;if(!super.isVisible()||0===e.layerOpacity)return!1;const t=e.instanced,i=e.vertexColors,s=e.symbolColors,r=!!t&&t.indexOf("color")>-1,a=e.vvColorEnabled,n="replace"===e.colorMixMode,o=e.opacity>0,l=e.externalColor&&e.externalColor[3]>0;return i&&(r||a||s)?!!n||o:i?n?l:o:r||a||s?!!n||o:n?l:o}getTechniqueConfig(e,t){return this.techniqueConfig.output=e,this.techniqueConfig.hasNormalTexture=!!this.parameters.normalTextureId,this.techniqueConfig.hasColorTexture=!!this.parameters.textureId,this.techniqueConfig.vertexTangents=this.parameters.vertexTangents,this.techniqueConfig.instanced=!!this.parameters.instanced,this.techniqueConfig.instancedDoublePrecision=this.parameters.instancedDoublePrecision,this.techniqueConfig.vvSize=this.parameters.vvSizeEnabled,this.techniqueConfig.verticalOffset=null!==this.parameters.verticalOffset,this.techniqueConfig.screenSizePerspective=null!==this.parameters.screenSizePerspective,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.sliceHighlightDisabled=this.parameters.sliceHighlightDisabled,this.techniqueConfig.alphaDiscardMode=this.parameters.textureAlphaMode,this.techniqueConfig.normalsTypeDerivate="screenDerivative"===this.parameters.normals,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.writeDepth=this.parameters.writeDepth,this.techniqueConfig.sceneHasOcludees=this.parameters.sceneHasOcludees,this.techniqueConfig.cullFace=this.parameters.slicePlaneEnabled?v.None:this.parameters.cullFace,this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,e!==p.Color&&e!==p.Alpha||(this.techniqueConfig.vertexColors=this.parameters.vertexColors,this.techniqueConfig.symbolColors=this.parameters.symbolColors,this.parameters.treeRendering?this.techniqueConfig.doubleSidedMode=m.DoubleSidedMode.WindingOrder:this.techniqueConfig.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?m.DoubleSidedMode.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?m.DoubleSidedMode.WindingOrder:m.DoubleSidedMode.None,this.techniqueConfig.instancedColor=!!this.parameters.instanced&&this.parameters.instanced.indexOf("color")>-1,this.techniqueConfig.receiveShadows=this.parameters.receiveShadows&&this.parameters.shadowMappingEnabled,this.techniqueConfig.receiveAmbientOcclusion=!!t.ssaoEnabled&&this.parameters.receiveSSAO,this.techniqueConfig.vvColor=this.parameters.vvColorEnabled,this.techniqueConfig.textureAlphaPremultiplied=!!this.parameters.textureAlphaPremultiplied,this.techniqueConfig.usePBR=this.parameters.usePBR,this.techniqueConfig.hasMetalnessAndRoughnessTexture=!!this.parameters.metallicRoughnessTextureId,this.techniqueConfig.hasEmissionTexture=!!this.parameters.emissiveTextureId,this.techniqueConfig.hasOcclusionTexture=!!this.parameters.occlusionTextureId,this.techniqueConfig.offsetBackfaces=!(!this.parameters.transparent||!this.parameters.offsetTransparentBackfaces),this.techniqueConfig.isSchematic=this.parameters.usePBR&&this.parameters.isSchematic,this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.enableOffset=t.camera.relativeElevation<O),this.techniqueConfig}intersect(e,c,u,d,p,m,f){if(null!==this.parameters.verticalOffset){const e=d.camera;t(F,u[12],u[13],u[14]);let c=null;switch(d.viewingMode){case h.Global:c=s(G,F);break;case h.Local:c=i(G,z)}let f=0;if(null!==this.parameters.verticalOffset){const t=r(U,F,e.eye),i=a(t),s=n(t,t,1/i);let l=null;this.parameters.screenSizePerspective&&(l=o(c,s)),f+=q(e,i,this.parameters.verticalOffset,l,this.parameters.screenSizePerspective)}n(c,c,f),l(k,c,d.transform.inverseRotation),p=r(H,p,k),m=r(j,m,k)}I(e,c,d,p,m,E(d.verticalOffset),f)}requiresSlot(e){return e===(this.parameters.transparent?this.parameters.writeDepth?A.TRANSPARENT_MATERIAL:A.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL:A.OPAQUE_MATERIAL)||e===A.DRAPED_MATERIAL}createGLMaterial(e){return e.output===p.Color||e.output===p.Alpha||e.output===p.Depth||e.output===p.Normal||e.output===p.Shadow||e.output===p.Highlight?new y(e):null}createBufferWriter(){return new w(this.vertexBufferLayout,this.instanceBufferLayout)}}class y extends T{constructor(e){super({...e,...e.material.parameters})}updateParameters(e){const t=this._material.parameters;return this.updateTexture(t.textureId),this.ensureTechnique(t.treeRendering?D:L,e)}_updateShadowState(e){e.shadowMappingEnabled!==this._material.parameters.shadowMappingEnabled&&this._material.setParameters({shadowMappingEnabled:e.shadowMappingEnabled})}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&this._material.setParameters({sceneHasOcludees:e.hasOccludees})}beginSlot(e){return this._output!==p.Color&&this._output!==p.Alpha||(this._updateShadowState(e),this._updateOccludeeState(e)),this.updateParameters(e)}bind(e,t){t.bindPass(this._material.parameters,e),this.bindTextures(t.program)}}const _={textureId:void 0,initTextureTransparent:!1,isSchematic:!1,usePBR:!1,normalTextureId:void 0,vertexTangents:!1,occlusionTextureId:void 0,emissiveTextureId:void 0,metallicRoughnessTextureId:void 0,emissiveFactor:[0,0,0],mrrFactors:[0,1,.5],ambient:[.2,.2,.2],diffuse:[.8,.8,.8],externalColor:[1,1,1,1],colorMixMode:"multiply",opacity:1,layerOpacity:1,vertexColors:!1,symbolColors:!1,doubleSided:!1,doubleSidedType:"normal",cullFace:v.Back,instanced:void 0,instancedDoublePrecision:!1,normals:"default",receiveSSAO:!0,receiveShadows:!0,castShadows:!0,shadowMappingEnabled:!1,verticalOffset:null,screenSizePerspective:null,slicePlaneEnabled:!1,sliceHighlightDisabled:!1,offsetTransparentBackfaces:!1,vvSizeEnabled:!1,vvSizeMinSize:[1,1,1],vvSizeMaxSize:[100,100,100],vvSizeOffset:[0,0,0],vvSizeFactor:[1,1,1],vvSizeValue:[1,1,1],vvColorEnabled:!1,vvColorValues:[0,0,0,0,0,0,0,0],vvColorColors:[1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0],vvSymbolAnchor:[0,0,0],vvSymbolRotationMatrix:e(),transparent:!1,writeDepth:!0,textureAlphaMode:g.Blend,textureAlphaCutoff:f,textureAlphaPremultiplied:!1,sceneHasOcludees:!1,...C};class w{constructor(e,t){this.vertexBufferLayout=e,this.instanceBufferLayout=t}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return e.indices.get(b.POSITION).length}write(e,t,i,s){M(t,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,i,s)}}function B(e){const t=e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId,i=d().vec3f(b.POSITION).vec3f(b.NORMAL);return e.vertexTangents&&i.vec4f(b.TANGENT),t&&i.vec2f(b.UV0),e.vertexColors&&i.vec4u8(b.COLOR),e.symbolColors&&i.vec4u8(b.SYMBOLCOLOR),i}function N(e){let t=d();return t=e.instancedDoublePrecision?t.vec3f(b.MODELORIGINHI).vec3f(b.MODELORIGINLO).mat3f(b.MODEL).mat3f(b.MODELNORMAL):t.mat4f(b.MODEL).mat4f(b.MODELNORMAL),e.instanced&&e.instanced.indexOf("color")>-1&&(t=t.vec4f(b.INSTANCECOLOR)),e.instanced&&e.instanced.indexOf("featureAttribute")>-1&&(t=t.vec4f(b.INSTANCEFEATUREATTRIBUTE)),t}const H=c(),j=c(),z=u(0,0,1),G=c(),k=c(),F=c(),U=c();export{R as DefaultMaterial,N as getInstanceBufferLayout};
5
+ import{isSome as e}from"../../../../core/maybe.js";import{c as t}from"../../../../chunks/mat3f64.js";import{s as i,g as s,n as r,f as a,l as n,a as o,d as l,t as c}from"../../../../chunks/vec3.js";import{c as u,f as h}from"../../../../chunks/vec3f64.js";import{ViewingMode as d}from"../../../ViewingMode.js";import{newLayout as p}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as m}from"../core/shaderLibrary/ShaderOutputOptions.js";import{Normals as f}from"../core/shaderLibrary/shading/Normals.glsl.js";import{defaultMaskAlphaCutoff as v}from"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import{CullFaceOptions as g,AlphaDiscardMode as T,VertexAttribute as b}from"../lib/basicInterfaces.js";import C from"../lib/GLMaterialTexture.js";import{materialParametersDefaults as S,Material as O}from"../lib/Material.js";import{OITPolygonOffsetLimit as x}from"../lib/OrderIndependentTransparency.js";import{RenderPass as A}from"../lib/RenderPass.js";import{RenderSlot as E}from"../lib/RenderSlot.js";import{getVerticalOffsetObject3D as M}from"../lib/verticalOffsetUtils.js";import{writeDefaultAttributes as q}from"./internal/bufferWriterUtils.js";import{verticalOffsetAtDistance as I,intersectTriangleGeometry as P}from"./internal/MaterialUtil.js";import{DefaultMaterialTechniqueConfiguration as L,DefaultMaterialTechnique as D}from"../shaders/DefaultMaterialTechnique.js";import{RealisticTreeTechnique as R}from"../shaders/RealisticTreeTechnique.js";class y extends O{constructor(e){super(e,w),this.supportsEdges=!0,this.techniqueConfig=new L,this.vertexBufferLayout=N(this.parameters),this.instanceBufferLayout=e.instanced?j(this.parameters):null}isVisibleInPass(e){return e!==A.MATERIAL_DEPTH_SHADOWMAP_ALL&&e!==A.MATERIAL_DEPTH_SHADOWMAP_DEFAULT&&e!==A.MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT||this.parameters.castShadows}isVisible(){const e=this.parameters;if(!super.isVisible()||0===e.layerOpacity)return!1;const t=e.instanced,i=e.vertexColors,s=e.symbolColors,r=!!t&&t.indexOf("color")>-1,a=e.vvColorEnabled,n="replace"===e.colorMixMode,o=e.opacity>0,l=e.externalColor&&e.externalColor[3]>0;return i&&(r||a||s)?!!n||o:i?n?l:o:r||a||s?!!n||o:n?l:o}getTechniqueConfig(t,i){return this.techniqueConfig.output=t,this.techniqueConfig.hasNormalTexture=!!this.parameters.normalTextureId,this.techniqueConfig.hasColorTexture=!!this.parameters.textureId,this.techniqueConfig.vertexTangents=this.parameters.vertexTangents,this.techniqueConfig.instanced=!!this.parameters.instanced,this.techniqueConfig.instancedDoublePrecision=this.parameters.instancedDoublePrecision,this.techniqueConfig.vvSize=this.parameters.vvSizeEnabled,this.techniqueConfig.verticalOffset=null!==this.parameters.verticalOffset,this.techniqueConfig.screenSizePerspective=null!==this.parameters.screenSizePerspective,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.sliceHighlightDisabled=this.parameters.sliceHighlightDisabled,this.techniqueConfig.alphaDiscardMode=this.parameters.textureAlphaMode,this.techniqueConfig.normalsTypeDerivate="screenDerivative"===this.parameters.normals,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.writeDepth=this.parameters.writeDepth,this.techniqueConfig.sceneHasOcludees=this.parameters.sceneHasOcludees,this.techniqueConfig.cullFace=this.parameters.slicePlaneEnabled?g.None:this.parameters.cullFace,this.techniqueConfig.multipassTerrainEnabled=i.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=i.cullAboveGround,this.techniqueConfig.hasModelTransformation=e(this.parameters.modelTransformation),t!==m.Color&&t!==m.Alpha||(this.techniqueConfig.vertexColors=this.parameters.vertexColors,this.techniqueConfig.symbolColors=this.parameters.symbolColors,this.parameters.treeRendering?this.techniqueConfig.doubleSidedMode=f.DoubleSidedMode.WindingOrder:this.techniqueConfig.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?f.DoubleSidedMode.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?f.DoubleSidedMode.WindingOrder:f.DoubleSidedMode.None,this.techniqueConfig.instancedColor=!!this.parameters.instanced&&this.parameters.instanced.indexOf("color")>-1,this.techniqueConfig.receiveShadows=this.parameters.receiveShadows&&this.parameters.shadowMappingEnabled,this.techniqueConfig.receiveAmbientOcclusion=!!i.ssaoEnabled&&this.parameters.receiveSSAO,this.techniqueConfig.vvColor=this.parameters.vvColorEnabled,this.techniqueConfig.textureAlphaPremultiplied=!!this.parameters.textureAlphaPremultiplied,this.techniqueConfig.usePBR=this.parameters.usePBR,this.techniqueConfig.hasMetalnessAndRoughnessTexture=!!this.parameters.metallicRoughnessTextureId,this.techniqueConfig.hasEmissionTexture=!!this.parameters.emissiveTextureId,this.techniqueConfig.hasOcclusionTexture=!!this.parameters.occlusionTextureId,this.techniqueConfig.offsetBackfaces=!(!this.parameters.transparent||!this.parameters.offsetTransparentBackfaces),this.techniqueConfig.isSchematic=this.parameters.usePBR&&this.parameters.isSchematic,this.techniqueConfig.transparencyPassType=i.transparencyPassType,this.techniqueConfig.enableOffset=i.camera.relativeElevation<x),this.techniqueConfig}intersect(e,t,u,h,p,m,f){if(null!==this.parameters.verticalOffset){const e=h.camera;i(U,u[12],u[13],u[14]);let t=null;switch(h.viewingMode){case d.Global:t=r(k,U);break;case d.Local:t=s(k,G)}let f=0;if(null!==this.parameters.verticalOffset){const i=a(V,U,e.eye),s=n(i),r=o(i,i,1/s);let c=null;this.parameters.screenSizePerspective&&(c=l(t,r)),f+=I(e,s,this.parameters.verticalOffset,c,this.parameters.screenSizePerspective)}o(t,t,f),c(F,t,h.transform.inverseRotation),p=a(H,p,F),m=a(z,m,F)}P(e,t,h,p,m,M(h.verticalOffset),f)}requiresSlot(e){return e===(this.parameters.transparent?this.parameters.writeDepth?E.TRANSPARENT_MATERIAL:E.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL:E.OPAQUE_MATERIAL)||e===E.DRAPED_MATERIAL}createGLMaterial(e){return e.output===m.Color||e.output===m.Alpha||e.output===m.Depth||e.output===m.Normal||e.output===m.Shadow||e.output===m.Highlight?new _(e):null}createBufferWriter(){return new B(this.vertexBufferLayout,this.instanceBufferLayout)}}class _ extends C{constructor(e){super({...e,...e.material.parameters})}updateParameters(e){const t=this._material.parameters;return this.updateTexture(t.textureId),this.ensureTechnique(t.treeRendering?R:D,e)}_updateShadowState(e){e.shadowMappingEnabled!==this._material.parameters.shadowMappingEnabled&&this._material.setParameters({shadowMappingEnabled:e.shadowMappingEnabled})}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&this._material.setParameters({sceneHasOcludees:e.hasOccludees})}beginSlot(e){return this._output!==m.Color&&this._output!==m.Alpha||(this._updateShadowState(e),this._updateOccludeeState(e)),this.updateParameters(e)}bind(e,t){t.bindPass(this._material.parameters,e),this.bindTextures(t.program)}}const w={textureId:void 0,initTextureTransparent:!1,isSchematic:!1,usePBR:!1,normalTextureId:void 0,vertexTangents:!1,occlusionTextureId:void 0,emissiveTextureId:void 0,metallicRoughnessTextureId:void 0,emissiveFactor:[0,0,0],mrrFactors:[0,1,.5],ambient:[.2,.2,.2],diffuse:[.8,.8,.8],externalColor:[1,1,1,1],colorMixMode:"multiply",opacity:1,layerOpacity:1,vertexColors:!1,symbolColors:!1,doubleSided:!1,doubleSidedType:"normal",cullFace:g.Back,instanced:void 0,instancedDoublePrecision:!1,normals:"default",receiveSSAO:!0,receiveShadows:!0,castShadows:!0,shadowMappingEnabled:!1,verticalOffset:null,screenSizePerspective:null,slicePlaneEnabled:!1,sliceHighlightDisabled:!1,offsetTransparentBackfaces:!1,vvSizeEnabled:!1,vvSizeMinSize:[1,1,1],vvSizeMaxSize:[100,100,100],vvSizeOffset:[0,0,0],vvSizeFactor:[1,1,1],vvSizeValue:[1,1,1],vvColorEnabled:!1,vvColorValues:[0,0,0,0,0,0,0,0],vvColorColors:[1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0],vvSymbolAnchor:[0,0,0],vvSymbolRotationMatrix:t(),modelTransformation:null,transparent:!1,writeDepth:!0,textureAlphaMode:T.Blend,textureAlphaCutoff:v,textureAlphaPremultiplied:!1,sceneHasOcludees:!1,...S};class B{constructor(e,t){this.vertexBufferLayout=e,this.instanceBufferLayout=t}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return e.indices.get(b.POSITION).length}write(e,t,i,s){q(t,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,i,s)}}function N(e){const t=e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId,i=p().vec3f(b.POSITION).vec3f(b.NORMAL);return e.vertexTangents&&i.vec4f(b.TANGENT),t&&i.vec2f(b.UV0),e.vertexColors&&i.vec4u8(b.COLOR),e.symbolColors&&i.vec4u8(b.SYMBOLCOLOR),i}function j(e){let t=p();return t=e.instancedDoublePrecision?t.vec3f(b.MODELORIGINHI).vec3f(b.MODELORIGINLO).mat3f(b.MODEL).mat3f(b.MODELNORMAL):t.mat4f(b.MODEL).mat4f(b.MODELNORMAL),e.instanced&&e.instanced.indexOf("color")>-1&&(t=t.vec4f(b.INSTANCECOLOR)),e.instanced&&e.instanced.indexOf("featureAttribute")>-1&&(t=t.vec4f(b.INSTANCEFEATUREATTRIBUTE)),t}const H=u(),z=u(),G=h(0,0,1),k=u(),F=u(),U=u(),V=u();export{y as DefaultMaterial,j as getInstanceBufferLayout};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{clamp as e}from"../../../../core/mathUtils.js";import{isSome as t}from"../../../../core/maybe.js";import{createRenderScreenPointArray3 as r}from"../../../../core/screenUtils.js";import{f as s}from"../../../../chunks/mat3.js";import{c as i}from"../../../../chunks/mat3f64.js";import{a as n}from"../../../../chunks/mat4.js";import{c as a}from"../../../../chunks/mat4f64.js";import{c as o}from"../../../../chunks/vec2.js";import{a as c,f as l}from"../../../../chunks/vec2f64.js";import{s as f,m as u,n as p,f as m,a as h,g as d,l as g,i as S,t as O,d as v,b as A}from"../../../../chunks/vec3.js";import{c as b,f as P}from"../../../../chunks/vec3f64.js";import{isMat4 as x}from"../../../../core/libs/gl-matrix-2/types/mat4.js";import{create as C}from"../../../../geometry/support/aaBoundingRect.js";import{newLayout as y}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as I}from"../core/shaderLibrary/ShaderOutputOptions.js";import{HUDSpace as T}from"../core/shaderLibrary/hud/HUD.glsl.js";import{VertexAttribute as z}from"../lib/basicInterfaces.js";import{computeAttachmentOriginPoints as _}from"../lib/geometryDataUtils.js";import{outputFromPass as E}from"../lib/GLMaterials.js";import M from"../lib/GLMaterialTexture.js";import{Material as U,materialParametersDefaults as j}from"../lib/Material.js";import{RenderSlot as q}from"../lib/RenderSlot.js";import{applyScaleFactor as L,applyPrecomputedScaleFactor as w,precomputeScaleFactor as D}from"../lib/screenSizePerspectiveUtils.js";import{assert as R}from"../lib/Util.js";import{writePosition as V,writeNormal as N,writeColor as G,writeBufferVec4 as B}from"./internal/bufferWriterUtils.js";import{verticalOffsetAtDistance as H}from"./internal/MaterialUtil.js";import{isInstanceHidden as X}from"./renderers/utils.js";import{c as k}from"../../../../chunks/HUDMaterial.glsl.js";import{HUDMaterialTechniqueConfiguration as F,HUDMaterialTechnique as W}from"../shaders/HUDMaterialTechnique.js";class Z extends U{constructor(e){super(e,Se),this.techniqueConfig=new F}getTechniqueConfig(e,t){return this.techniqueConfig.output=e,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.verticalOffset=!!this.parameters.verticalOffset,this.techniqueConfig.screenSizePerspective=!!this.parameters.screenSizePerspective,this.techniqueConfig.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits?T.Screen:T.World,this.techniqueConfig.polygonOffsetEnabled=this.parameters.polygonOffset,this.techniqueConfig.isDraped=this.parameters.isDraped,this.techniqueConfig.occlusionTestEnabled=this.parameters.occlusionTest,this.techniqueConfig.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this.techniqueConfig.sdf=this.parameters.textureIsSignedDistanceField,this.techniqueConfig.vvSize=!!this.parameters.vvSizeEnabled,this.techniqueConfig.vvColor=!!this.parameters.vvColorEnabled,e===I.Color&&(this.techniqueConfig.debugDrawBorder=!!this.parameters.debugDrawBorder),e===I.Highlight&&(this.techniqueConfig.binaryHighlightOcclusion=this.parameters.binaryHighlightOcclusion),this.techniqueConfig.depthEnabled=this.parameters.depthEnabled,this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.multipassGeometryEnabled=t.multipassGeometryEnabled,this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig}intersect(e,r,s,i,n,a,o,c,l){t(l)?this._intersectDrapedHudGeometry(e,a,o,c,l):this._intersectHudGeometry(e,r,s,i,o,c)}_intersectDrapedHudGeometry(e,r,s,i,n){const a=e.vertexAttributes.get(z.POSITION),o=e.vertexAttributes.get(z.SIZE),c=this.parameters,l=k(c);let f=1,u=1;if(t(i)){const e=i(pe);f=e[0],u=e[5]}f*=e.screenToWorldRatio,u*=e.screenToWorldRatio;const p=he*e.screenToWorldRatio;for(let t=0;t<a.data.length/a.size;t++){const i=t*a.size,m=a.data[i],h=a.data[i+1],d=t*o.size;let g;de[0]=o.data[d]*f,de[1]=o.data[d+1]*u,c.textureIsSignedDistanceField&&(g=c.outlineSize*e.screenToWorldRatio/2),$(r,m,h,de,p,g,c,l)&&s(n.dist,n.normal,-1,!0)}}_intersectHudGeometry(e,r,i,a,o,c){if(!a.options.selectionMode||!a.options.hud||X(r))return;const l=this.parameters;let O=1,v=1;if(s(oe,i),t(c)){const e=c(pe);O=e[0],v=e[5],Y(oe)}const A=e.vertexAttributes.get(z.POSITION),P=e.vertexAttributes.get(z.SIZE),x=e.vertexAttributes.get(z.NORMAL),C=e.vertexAttributes.get(z.AUXPOS1);R(A.size>=3);const y=a.point,I=a.camera,T=k(l);O*=I.pixelRatio,v*=I.pixelRatio;const _="screen"===this.parameters.centerOffsetUnits;for(let t=0;t<A.data.length/A.size;t++){const e=t*A.size;f(re,A.data[e],A.data[e+1],A.data[e+2]),u(re,re,i);const r=t*P.size;de[0]=P.data[r]*O,de[1]=P.data[r+1]*v,u(re,re,I.viewMatrix);const s=t*C.size;if(f(fe,C.data[s+0],C.data[s+1],C.data[s+2]),!_&&(re[0]+=fe[0],re[1]+=fe[1],0!==fe[2])){const e=fe[2];p(fe,re),m(re,re,h(fe,fe,e))}const c=t*x.size;if(f(se,x.data[c],x.data[c+1],x.data[c+2]),this._normalAndViewAngle(se,oe,I,ue),this._applyVerticalOffsetTransformationView(re,ue,I,ee),I.applyProjection(re,ie),ie[0]>-1){let e=Math.floor(ie[0])+this.parameters.screenOffset[0],t=Math.floor(ie[1])+this.parameters.screenOffset[1];_&&(e+=fe[0],0!==fe[1]&&(t+=L(fe[1],ee.factorAlignment))),w(de,ee.factor,de);const r=me*I.pixelRatio;let s;if(l.textureIsSignedDistanceField&&(s=l.outlineSize*I.pixelRatio/2),$(y,e,t,de,r,s,l,T)){const e=a.ray;if(u(ae,re,n(le,I.viewMatrix)),ie[0]=y[0],ie[1]=y[1],I.unprojectFromRenderScreen(ie,re)){const t=b();d(t,e.direction);const r=1/g(t);h(t,t,r);o(S(e.origin,re)*r,t,-1,!0,1,ae)}}}}}computeAttachmentOrigin(e,t){const r=e.vertexAttributes;if(!r)return!1;const s=r.get(z.POSITION),i=e.indices.get(z.POSITION);return _(s,i,t)}createBufferWriter(){return new ve(this)}_normalAndViewAngle(e,t,r,i){return x(t)&&(t=s(ce,t)),O(i.normal,e,t),u(i.normal,i.normal,r.viewInverseTransposeMatrix),i.cosAngle=v(ne,ge),i}_updateScaleInfo(e,t,r){const s=this.parameters;s.screenSizePerspective?D(r,t,s.screenSizePerspective,e.factor):(e.factor.scale=1,e.factor.factor=0,e.factor.minPixelSize=0,e.factor.paddingPixels=0),s.screenSizePerspectiveAlignment?D(r,t,s.screenSizePerspectiveAlignment,e.factorAlignment):(e.factorAlignment.factor=e.factor.factor,e.factorAlignment.scale=e.factor.scale,e.factorAlignment.minPixelSize=e.factor.minPixelSize,e.factorAlignment.paddingPixels=e.factor.paddingPixels)}applyShaderOffsetsView(e,t,r,s,i,n,a){const o=this._normalAndViewAngle(t,r,i,ue);return this._applyVerticalGroundOffsetView(e,o,i,a),this._applyVerticalOffsetTransformationView(a,o,i,n),this._applyPolygonOffsetView(a,o,s[3],i,a),this._applyCenterOffsetView(a,s,a),a}applyShaderOffsetsNDC(e,r,s,i,n){return this._applyCenterOffsetNDC(e,r,s,i),t(n)&&d(n,i),this._applyPolygonOffsetNDC(i,r,s,i),i}_applyPolygonOffsetView(t,r,s,i,n){const a=i.aboveGround?1:-1;let o=Math.sign(s);0===o&&(o=a);const c=a*o;if(this.parameters.shaderPolygonOffset<=0)return d(n,t);const l=e(Math.abs(r.cosAngle),.01,1),f=1-Math.sqrt(1-l*l)/l/i.viewport[2];return h(n,t,c>0?f:1/f),n}_applyVerticalGroundOffsetView(e,t,r,s){const i=g(e),n=r.aboveGround?1:-1,a=.5*r.computeRenderPixelSizeAtDist(i),o=h(re,t.normal,n*a);return A(s,e,o),s}_applyVerticalOffsetTransformationView(e,t,r,s){const i=this.parameters;if(!i.verticalOffset||!i.verticalOffset.screenLength){if(i.screenSizePerspective||i.screenSizePerspectiveAlignment){const r=g(e);this._updateScaleInfo(s,r,t.cosAngle)}else s.factor.scale=1,s.factorAlignment.scale=1;return e}const n=g(e),a=i.screenSizePerspectiveAlignment||i.screenSizePerspective,o=H(r,n,i.verticalOffset,t.cosAngle,a);return this._updateScaleInfo(s,n,t.cosAngle),h(t.normal,t.normal,o),A(e,e,t.normal)}_applyCenterOffsetView(e,t,r){const s="screen"!==this.parameters.centerOffsetUnits;return r!==e&&d(r,e),s&&(r[0]+=t[0],r[1]+=t[1],t[2]&&(p(se,r),A(r,r,h(se,se,t[2])))),r}_applyCenterOffsetNDC(e,t,r,s){const i="screen"!==this.parameters.centerOffsetUnits;return s!==e&&d(s,e),i||(s[0]+=t[0]/r.fullWidth*2,s[1]+=t[1]/r.fullHeight*2),s}_applyPolygonOffsetNDC(e,t,r,s){const i=this.parameters.shaderPolygonOffset;if(e!==s&&d(s,e),i){const e=r.aboveGround?1:-1,n=e*Math.sign(t[3]);s[2]-=(n||e)*i}return s}requiresSlot(e,t){const r=E(t);if(r===I.Color||r===I.Alpha){if(e===q.DRAPED_MATERIAL)return!0;const t=this.parameters.drawInSecondSlot?q.LABEL_MATERIAL:q.HUD_MATERIAL;return this.parameters.occlusionTest&&e===q.OCCLUSION_PIXELS||e===t}return e===(this.parameters.drawInSecondSlot?q.LABEL_MATERIAL:q.HUD_MATERIAL)||e===q.DRAPED_MATERIAL}createGLMaterial(e){return e.output===I.Color||e.output===I.Alpha?new K(e):e.output===I.Highlight?new J(e):null}calculateRelativeScreenBounds(e,t,r=C()){return Q(this.parameters,e,t,r),r[2]=r[0]+e[0],r[3]=r[1]+e[1],r}}class J extends M{constructor(e){super({...e,...e.material.parameters})}updateParameters(e){return this.updateTexture(this._material.parameters.textureId),this.selectProgram(e)}selectProgram(e){return this.ensureTechnique(W,e)}beginSlot(e){return this.updateParameters(e)}bind(e,t){this.bindTextures(t.program),this.bindTextureScale(t.program),t.bindPass(this._material.parameters,e)}}class K extends J{_isOcclusionSlot(e){return e.slot===q.OCCLUSION_PIXELS&&this._material.parameters.occlusionTest&&(this._output===I.Color||this._output===I.Alpha)}selectProgram(e){return this.ensureTechnique(W,e,this._isOcclusionSlot(e)?I.Occlusion:this._output)}bind(e,t){this._isOcclusionSlot(e)||(this.bindTextures(t.program),this.bindTextureScale(t.program)),t.bindPass(this._material.parameters,e)}}function Q(e,t,r,s=te){return o(s,e.anchorPos),s[0]*=-t[0],s[1]*=-t[1],s[0]+=e.screenOffset[0]*r,s[1]+=e.screenOffset[1]*r,s}function Y(e){const t=e[0],r=e[1],s=e[2],i=e[3],n=e[4],a=e[5],o=e[6],c=e[7],l=e[8],f=1/Math.sqrt(t*t+r*r+s*s),u=1/Math.sqrt(i*i+n*n+a*a),p=1/Math.sqrt(o*o+c*c+l*l);return e[0]=t*f,e[1]=r*f,e[2]=s*f,e[3]=i*u,e[4]=n*u,e[5]=a*u,e[6]=o*p,e[7]=c*p,e[8]=l*p,e}function $(e,t,r,s,i,n,a,o){let c=t-i-(o[0]>0?s[0]*o[0]:0),l=c+s[0]+2*i,f=r-i-(o[1]>0?s[1]*o[1]:0),u=f+s[1]+2*i;if(a.textureIsSignedDistanceField){const e=a.distanceFieldBoundingBox;c+=s[0]*e[0],f+=s[1]*e[1],l-=s[0]*(1-e[2]),u-=s[1]*(1-e[3]),c-=n,l+=n,f-=n,u+=n}return e[0]>c&&e[0]<l&&e[1]>f&&e[1]<u}const ee={factor:{scale:0,factor:0,minPixelSize:0,paddingPixels:0},factorAlignment:{scale:0,factor:0,minPixelSize:0,paddingPixels:0}},te=c(),re=b(),se=b(),ie=r(),ne=b(),ae=b(),oe=i(),ce=i(),le=a(),fe=b(),ue={normal:ne,cosAngle:0},pe=a(),me=1,he=2,de=[0,0],ge=P(0,0,1),Se={texCoordScale:[1,1],occlusionTest:!0,binaryHighlightOcclusion:!0,drawInSecondSlot:!1,color:[1,1,1,1],outlineColor:[1,1,1,1],outlineSize:0,textureIsSignedDistanceField:!1,distanceFieldBoundingBox:null,vvSizeEnabled:!1,vvSizeMinSize:[1,1,1],vvSizeMaxSize:[100,100,100],vvSizeOffset:[0,0,0],vvSizeFactor:[1,1,1],vvColorEnabled:!1,vvColorValues:[0,0,0,0,0,0,0,0],vvColorColors:[1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0],screenOffset:[0,0],verticalOffset:null,screenSizePerspective:null,screenSizePerspectiveAlignment:null,slicePlaneEnabled:!1,anchorPos:l(.5,.5),shaderPolygonOffset:1e-5,polygonOffset:!1,textureId:null,centerOffsetUnits:"world",depthEnabled:!0,pixelSnappingEnabled:!0,debugDrawBorder:!1,isDraped:!1,...j},Oe=y().vec3f(z.POSITION).vec3f(z.NORMAL).vec2f(z.UV0).vec4u8(z.COLOR).vec2f(z.SIZE).vec4f(z.AUXPOS1).vec4f(z.AUXPOS2);class ve{constructor(e){this.material=e,this.vertexBufferLayout=Oe}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return 6*e.indices.get(z.POSITION).length}write(e,t,r,s){V(t.indices.get(z.POSITION),t.vertexAttributes.get(z.POSITION).data,e.transformation,r.position,s,6),N(t.indices.get(z.NORMAL),t.vertexAttributes.get(z.NORMAL).data,e.invTranspTransformation,r.normal,s,6);{const e=t.vertexAttributes.get(z.UV0).data;let i,n,a,o;if(null==e||e.length<4){const e=this.material.parameters;i=0,n=0,a=e.texCoordScale[0],o=e.texCoordScale[1]}else i=e[0],n=e[1],a=e[2],o=e[3];a=Math.min(1.99999,a+1),o=Math.min(1.99999,o+1);const c=t.indices.get(z.POSITION).length,l=r.uv0;let f=s;for(let t=0;t<c;++t)l.set(f,0,i),l.set(f,1,n),f+=1,l.set(f,0,a),l.set(f,1,n),f+=1,l.set(f,0,a),l.set(f,1,o),f+=1,l.set(f,0,a),l.set(f,1,o),f+=1,l.set(f,0,i),l.set(f,1,o),f+=1,l.set(f,0,i),l.set(f,1,n),f+=1}G(t.indices.get(z.COLOR),t.vertexAttributes.get(z.COLOR).data,4,r.color,s,6);{const e=t.indices.get(z.SIZE),i=t.vertexAttributes.get(z.SIZE).data,n=e.length,a=r.size;let o=s;for(let t=0;t<n;++t){const r=i[2*e[t]],s=i[2*e[t]+1];for(let e=0;e<6;++e)a.set(o,0,r),a.set(o,1,s),o+=1}}t.indices.get(z.AUXPOS1)&&t.vertexAttributes.get(z.AUXPOS1)&&B(t.indices.get(z.AUXPOS1),t.vertexAttributes.get(z.AUXPOS1).data,r.auxpos1,s,6),t.indices.get(z.AUXPOS2)&&t.vertexAttributes.get(z.AUXPOS2)&&B(t.indices.get(z.AUXPOS2),t.vertexAttributes.get(z.AUXPOS2).data,r.auxpos2,s,6)}}export{Z as HUDMaterial};
5
+ import{clamp as e}from"../../../../core/mathUtils.js";import{isSome as t}from"../../../../core/maybe.js";import{createRenderScreenPointArray3 as r}from"../../../../core/screenUtils.js";import{f as s}from"../../../../chunks/mat3.js";import{c as i}from"../../../../chunks/mat3f64.js";import{a as n}from"../../../../chunks/mat4.js";import{c as a}from"../../../../chunks/mat4f64.js";import{c as o}from"../../../../chunks/vec2.js";import{a as c,f as l}from"../../../../chunks/vec2f64.js";import{s as f,m as u,n as p,f as m,a as h,g as d,l as g,i as O,t as S,d as v,b}from"../../../../chunks/vec3.js";import{c as A,f as P}from"../../../../chunks/vec3f64.js";import{isMat4 as x}from"../../../../core/libs/gl-matrix-2/types/mat4.js";import{create as C}from"../../../../geometry/support/aaBoundingRect.js";import{newLayout as y}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as I}from"../core/shaderLibrary/ShaderOutputOptions.js";import{HUDSpace as z}from"../core/shaderLibrary/hud/HUD.glsl.js";import{VertexAttribute as T}from"../lib/basicInterfaces.js";import{computeAttachmentOriginPoints as _}from"../lib/geometryDataUtils.js";import E from"../lib/GLMaterialTexture.js";import{Material as U,materialParametersDefaults as j}from"../lib/Material.js";import{RenderSlot as q}from"../lib/RenderSlot.js";import{applyScaleFactor as M,applyPrecomputedScaleFactor as w,precomputeScaleFactor as L}from"../lib/screenSizePerspectiveUtils.js";import{assert as D}from"../lib/Util.js";import{writePosition as R,writeNormal as V,writeColor as N,writeBufferVec4 as G}from"./internal/bufferWriterUtils.js";import{verticalOffsetAtDistance as B}from"./internal/MaterialUtil.js";import{isInstanceHidden as H}from"./renderers/utils.js";import{c as X}from"../../../../chunks/HUDMaterial.glsl.js";import{HUDMaterialTechniqueConfiguration as k,HUDMaterialTechnique as F}from"../shaders/HUDMaterialTechnique.js";class W extends U{constructor(e){super(e,ge),this.techniqueConfig=new k}getTechniqueConfig(e,t){return this.techniqueConfig.output=e,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.verticalOffset=!!this.parameters.verticalOffset,this.techniqueConfig.screenSizePerspective=!!this.parameters.screenSizePerspective,this.techniqueConfig.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits?z.Screen:z.World,this.techniqueConfig.polygonOffsetEnabled=this.parameters.polygonOffset,this.techniqueConfig.isDraped=this.parameters.isDraped,this.techniqueConfig.occlusionTestEnabled=this.parameters.occlusionTest,this.techniqueConfig.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this.techniqueConfig.sdf=this.parameters.textureIsSignedDistanceField,this.techniqueConfig.vvSize=!!this.parameters.vvSizeEnabled,this.techniqueConfig.vvColor=!!this.parameters.vvColorEnabled,e===I.Color&&(this.techniqueConfig.debugDrawLabelBorder=!!this.parameters.debugDrawLabelBorder),e===I.Highlight&&(this.techniqueConfig.binaryHighlightOcclusion=this.parameters.binaryHighlightOcclusion),this.techniqueConfig.depthEnabled=this.parameters.depthEnabled,this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.multipassGeometryEnabled=t.multipassGeometryEnabled,this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig}intersect(e,r,s,i,n,a,o,c,l){t(l)?this._intersectDrapedHudGeometry(e,a,o,c,l):this._intersectHudGeometry(e,r,s,i,o,c)}_intersectDrapedHudGeometry(e,r,s,i,n){const a=e.vertexAttributes.get(T.POSITION),o=e.vertexAttributes.get(T.SIZE),c=this.parameters,l=X(c);let f=1,u=1;if(t(i)){const e=i(ue);f=e[0],u=e[5]}f*=e.screenToWorldRatio,u*=e.screenToWorldRatio;const p=me*e.screenToWorldRatio;for(let t=0;t<a.data.length/a.size;t++){const i=t*a.size,m=a.data[i],h=a.data[i+1],d=t*o.size;let g;he[0]=o.data[d]*f,he[1]=o.data[d+1]*u,c.textureIsSignedDistanceField&&(g=c.outlineSize*e.screenToWorldRatio/2),Y(r,m,h,he,p,g,c,l)&&s(n.dist,n.normal,-1,!0)}}_intersectHudGeometry(e,r,i,a,o,c){if(!a.options.selectionMode||!a.options.hud||H(r))return;const l=this.parameters;let S=1,v=1;if(s(ae,i),t(c)){const e=c(ue);S=e[0],v=e[5],Q(ae)}const b=e.vertexAttributes.get(T.POSITION),P=e.vertexAttributes.get(T.SIZE),x=e.vertexAttributes.get(T.NORMAL),C=e.vertexAttributes.get(T.AUXPOS1);D(b.size>=3);const y=a.point,I=a.camera,z=X(l);S*=I.pixelRatio,v*=I.pixelRatio;const _="screen"===this.parameters.centerOffsetUnits;for(let t=0;t<b.data.length/b.size;t++){const e=t*b.size;f(te,b.data[e],b.data[e+1],b.data[e+2]),u(te,te,i);const r=t*P.size;he[0]=P.data[r]*S,he[1]=P.data[r+1]*v,u(te,te,I.viewMatrix);const s=t*C.size;if(f(le,C.data[s+0],C.data[s+1],C.data[s+2]),!_&&(te[0]+=le[0],te[1]+=le[1],0!==le[2])){const e=le[2];p(le,te),m(te,te,h(le,le,e))}const c=t*x.size;if(f(re,x.data[c],x.data[c+1],x.data[c+2]),this._normalAndViewAngle(re,ae,I,fe),this._applyVerticalOffsetTransformationView(te,fe,I,$),I.applyProjection(te,se),se[0]>-1){let e=Math.floor(se[0])+this.parameters.screenOffset[0],t=Math.floor(se[1])+this.parameters.screenOffset[1];_&&(e+=le[0],0!==le[1]&&(t+=M(le[1],$.factorAlignment))),w(he,$.factor,he);const r=pe*I.pixelRatio;let s;if(l.textureIsSignedDistanceField&&(s=l.outlineSize*I.pixelRatio/2),Y(y,e,t,he,r,s,l,z)){const e=a.ray;if(u(ne,te,n(ce,I.viewMatrix)),se[0]=y[0],se[1]=y[1],I.unprojectFromRenderScreen(se,te)){const t=A();d(t,e.direction);const r=1/g(t);h(t,t,r);o(O(e.origin,te)*r,t,-1,!0,1,ne)}}}}}computeAttachmentOrigin(e,t){const r=e.vertexAttributes;if(!r)return!1;const s=r.get(T.POSITION),i=e.indices.get(T.POSITION);return _(s,i,t)}createBufferWriter(){return new Se(this)}_normalAndViewAngle(e,t,r,i){return x(t)&&(t=s(oe,t)),S(i.normal,e,t),u(i.normal,i.normal,r.viewInverseTransposeMatrix),i.cosAngle=v(ie,de),i}_updateScaleInfo(e,t,r){const s=this.parameters;s.screenSizePerspective?L(r,t,s.screenSizePerspective,e.factor):(e.factor.scale=1,e.factor.factor=0,e.factor.minPixelSize=0,e.factor.paddingPixels=0),s.screenSizePerspectiveAlignment?L(r,t,s.screenSizePerspectiveAlignment,e.factorAlignment):(e.factorAlignment.factor=e.factor.factor,e.factorAlignment.scale=e.factor.scale,e.factorAlignment.minPixelSize=e.factor.minPixelSize,e.factorAlignment.paddingPixels=e.factor.paddingPixels)}applyShaderOffsetsView(e,t,r,s,i,n,a){const o=this._normalAndViewAngle(t,r,i,fe);return this._applyVerticalGroundOffsetView(e,o,i,a),this._applyVerticalOffsetTransformationView(a,o,i,n),this._applyPolygonOffsetView(a,o,s[3],i,a),this._applyCenterOffsetView(a,s,a),a}applyShaderOffsetsNDC(e,r,s,i,n){return this._applyCenterOffsetNDC(e,r,s,i),t(n)&&d(n,i),this._applyPolygonOffsetNDC(i,r,s,i),i}_applyPolygonOffsetView(t,r,s,i,n){const a=i.aboveGround?1:-1;let o=Math.sign(s);0===o&&(o=a);const c=a*o;if(this.parameters.shaderPolygonOffset<=0)return d(n,t);const l=e(Math.abs(r.cosAngle),.01,1),f=1-Math.sqrt(1-l*l)/l/i.viewport[2];return h(n,t,c>0?f:1/f),n}_applyVerticalGroundOffsetView(e,t,r,s){const i=g(e),n=r.aboveGround?1:-1,a=.5*r.computeRenderPixelSizeAtDist(i),o=h(te,t.normal,n*a);return b(s,e,o),s}_applyVerticalOffsetTransformationView(e,t,r,s){const i=this.parameters;if(!i.verticalOffset||!i.verticalOffset.screenLength){if(i.screenSizePerspective||i.screenSizePerspectiveAlignment){const r=g(e);this._updateScaleInfo(s,r,t.cosAngle)}else s.factor.scale=1,s.factorAlignment.scale=1;return e}const n=g(e),a=i.screenSizePerspectiveAlignment||i.screenSizePerspective,o=B(r,n,i.verticalOffset,t.cosAngle,a);return this._updateScaleInfo(s,n,t.cosAngle),h(t.normal,t.normal,o),b(e,e,t.normal)}_applyCenterOffsetView(e,t,r){const s="screen"!==this.parameters.centerOffsetUnits;return r!==e&&d(r,e),s&&(r[0]+=t[0],r[1]+=t[1],t[2]&&(p(re,r),b(r,r,h(re,re,t[2])))),r}_applyCenterOffsetNDC(e,t,r,s){const i="screen"!==this.parameters.centerOffsetUnits;return s!==e&&d(s,e),i||(s[0]+=t[0]/r.fullWidth*2,s[1]+=t[1]/r.fullHeight*2),s}_applyPolygonOffsetNDC(e,t,r,s){const i=this.parameters.shaderPolygonOffset;if(e!==s&&d(s,e),i){const e=r.aboveGround?1:-1,n=e*Math.sign(t[3]);s[2]-=(n||e)*i}return s}requiresSlot(e){if(e===q.DRAPED_MATERIAL)return!0;const{drawInSecondSlot:t,occlusionTest:r}=this.parameters;return e===(t?q.LABEL_MATERIAL:q.HUD_MATERIAL)||r&&e===q.OCCLUSION_PIXELS}createGLMaterial(e){return e.output===I.Color||e.output===I.Alpha?new J(e):e.output===I.Highlight?new Z(e):null}calculateRelativeScreenBounds(e,t,r=C()){return K(this.parameters,e,t,r),r[2]=r[0]+e[0],r[3]=r[1]+e[1],r}}class Z extends E{constructor(e){super({...e,...e.material.parameters})}updateParameters(e){return this.updateTexture(this._material.parameters.textureId),this.selectProgram(e)}selectProgram(e){return this.ensureTechnique(F,e)}beginSlot(e){return this.updateParameters(e)}bind(e,t){this.bindTextures(t.program),this.bindTextureScale(t.program),t.bindPass(this._material.parameters,e)}}class J extends Z{_isOcclusionSlot(e){return e.slot===q.OCCLUSION_PIXELS&&this._material.parameters.occlusionTest&&(this._output===I.Color||this._output===I.Alpha)}selectProgram(e){return this.ensureTechnique(F,e,this._isOcclusionSlot(e)?I.Occlusion:this._output)}bind(e,t){this._isOcclusionSlot(e)||(this.bindTextures(t.program),this.bindTextureScale(t.program)),t.bindPass(this._material.parameters,e)}}function K(e,t,r,s=ee){return o(s,e.anchorPos),s[0]*=-t[0],s[1]*=-t[1],s[0]+=e.screenOffset[0]*r,s[1]+=e.screenOffset[1]*r,s}function Q(e){const t=e[0],r=e[1],s=e[2],i=e[3],n=e[4],a=e[5],o=e[6],c=e[7],l=e[8],f=1/Math.sqrt(t*t+r*r+s*s),u=1/Math.sqrt(i*i+n*n+a*a),p=1/Math.sqrt(o*o+c*c+l*l);return e[0]=t*f,e[1]=r*f,e[2]=s*f,e[3]=i*u,e[4]=n*u,e[5]=a*u,e[6]=o*p,e[7]=c*p,e[8]=l*p,e}function Y(e,t,r,s,i,n,a,o){let c=t-i-(o[0]>0?s[0]*o[0]:0),l=c+s[0]+2*i,f=r-i-(o[1]>0?s[1]*o[1]:0),u=f+s[1]+2*i;if(a.textureIsSignedDistanceField){const e=a.distanceFieldBoundingBox;c+=s[0]*e[0],f+=s[1]*e[1],l-=s[0]*(1-e[2]),u-=s[1]*(1-e[3]),c-=n,l+=n,f-=n,u+=n}return e[0]>c&&e[0]<l&&e[1]>f&&e[1]<u}const $={factor:{scale:0,factor:0,minPixelSize:0,paddingPixels:0},factorAlignment:{scale:0,factor:0,minPixelSize:0,paddingPixels:0}},ee=c(),te=A(),re=A(),se=r(),ie=A(),ne=A(),ae=i(),oe=i(),ce=a(),le=A(),fe={normal:ie,cosAngle:0},ue=a(),pe=1,me=2,he=[0,0],de=P(0,0,1),ge={texCoordScale:[1,1],occlusionTest:!0,binaryHighlightOcclusion:!0,drawInSecondSlot:!1,color:[1,1,1,1],outlineColor:[1,1,1,1],outlineSize:0,textureIsSignedDistanceField:!1,distanceFieldBoundingBox:null,vvSizeEnabled:!1,vvSizeMinSize:[1,1,1],vvSizeMaxSize:[100,100,100],vvSizeOffset:[0,0,0],vvSizeFactor:[1,1,1],vvColorEnabled:!1,vvColorValues:[0,0,0,0,0,0,0,0],vvColorColors:[1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0],screenOffset:[0,0],verticalOffset:null,screenSizePerspective:null,screenSizePerspectiveAlignment:null,slicePlaneEnabled:!1,anchorPos:l(.5,.5),shaderPolygonOffset:1e-5,polygonOffset:!1,textureId:null,centerOffsetUnits:"world",depthEnabled:!0,pixelSnappingEnabled:!0,debugDrawLabelBorder:!1,isDraped:!1,...j},Oe=y().vec3f(T.POSITION).vec3f(T.NORMAL).vec2f(T.UV0).vec4u8(T.COLOR).vec2f(T.SIZE).vec4f(T.AUXPOS1).vec4f(T.AUXPOS2);class Se{constructor(e){this.material=e,this.vertexBufferLayout=Oe}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return 6*e.indices.get(T.POSITION).length}write(e,t,r,s){R(t.indices.get(T.POSITION),t.vertexAttributes.get(T.POSITION).data,e.transformation,r.position,s,6),V(t.indices.get(T.NORMAL),t.vertexAttributes.get(T.NORMAL).data,e.invTranspTransformation,r.normal,s,6);{const e=t.vertexAttributes.get(T.UV0).data;let i,n,a,o;if(null==e||e.length<4){const e=this.material.parameters;i=0,n=0,a=e.texCoordScale[0],o=e.texCoordScale[1]}else i=e[0],n=e[1],a=e[2],o=e[3];a=Math.min(1.99999,a+1),o=Math.min(1.99999,o+1);const c=t.indices.get(T.POSITION).length,l=r.uv0;let f=s;for(let t=0;t<c;++t)l.set(f,0,i),l.set(f,1,n),f+=1,l.set(f,0,a),l.set(f,1,n),f+=1,l.set(f,0,a),l.set(f,1,o),f+=1,l.set(f,0,a),l.set(f,1,o),f+=1,l.set(f,0,i),l.set(f,1,o),f+=1,l.set(f,0,i),l.set(f,1,n),f+=1}N(t.indices.get(T.COLOR),t.vertexAttributes.get(T.COLOR).data,4,r.color,s,6);{const e=t.indices.get(T.SIZE),i=t.vertexAttributes.get(T.SIZE).data,n=e.length,a=r.size;let o=s;for(let t=0;t<n;++t){const r=i[2*e[t]],s=i[2*e[t]+1];for(let e=0;e<6;++e)a.set(o,0,r),a.set(o,1,s),o+=1}}t.indices.get(T.AUXPOS1)&&t.vertexAttributes.get(T.AUXPOS1)&&G(t.indices.get(T.AUXPOS1),t.vertexAttributes.get(T.AUXPOS1).data,r.auxpos1,s,6),t.indices.get(T.AUXPOS2)&&t.vertexAttributes.get(T.AUXPOS2)&&G(t.indices.get(T.AUXPOS2),t.vertexAttributes.get(T.AUXPOS2).data,r.auxpos2,s,6)}}export{W as HUDMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import r from"../../../../core/Evented.js";import i from"../../../../core/has.js";import s from"../../../../core/Logger.js";import{removeMaybe as o,disposeMaybe as n,isSome as a,isNone as p}from"../../../../core/maybe.js";import{addFrameTask as h}from"../../../../core/scheduling.js";import{Milliseconds as d}from"../../../../core/time.js";import{init as c}from"../../../../core/watchUtils.js";import{property as l}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{ComponentObjectCollection as u}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueRepository as _}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{autoDispose as f,AutoDisposableMixin as g}from"../lib/AutoDisposable.js";import{RenderRequestType as y,Decorations as R}from"../lib/basicInterfaces.js";import x from"../lib/CompositingHelper.js";import{textureToDepth as b}from"../lib/depthRangeUtils.js";import{GLMaterialRepository as v}from"../lib/GLMaterialRepository.js";import{MagnifierHelper as w}from"../lib/MagnifierHelper.js";import{Renderer as C}from"../lib/Renderer.js";import{RenderingContext as T}from"../lib/RenderingContext.js";import{TextureRepository as U}from"../lib/TextureRepository.js";import{StippleTextureRepository as j}from"../materials/StippleTextureRepository.js";import{WaterTextureRepository as A}from"../materials/internal/WaterTextureRepository.js";import{removeLoadedShaderModules as S}from"./requireUtils.js";import{ScreenshotManager as q}from"./ScreenshotManager.js";import{createContextOrErrorHTML as M}from"../../../webgl/context-util.js";const D=s.getLogger("esri.views.3d.webgl-engine.parts.View");let O=class extends(g(t)){constructor(e){super({}),this.events=new r,this.waterTextureRepository=new A,this._magnifierHelper=new w,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this._container=e.container,this._initializeContext(e),c(this.waterTextureRepository,"loadingState",(()=>this.requestRender())),this._magnifierHelper.events.on("request-render",(()=>this.requestRender())),this._stippleTextureRepository=new j(this._rctx),this._shaderTechniqueRepository=new _({rctx:this._rctx,viewingMode:e.viewingMode,stippleTextureRepository:this._stippleTextureRepository,waterTextureRepository:this.waterTextureRepository}),this._textureRepository=new U(e,this._shaderTechniqueRepository,this._rctx),this._textureRepository.events.on("changed",(e=>this.requestRender(e))),this._materialRepository=new v(this._textureRepository,this._shaderTechniqueRepository,(()=>this.requestRender()),(()=>this.requestRender())),this._compositingHelper=new x(this._rctx,this._shaderTechniqueRepository),this._renderer=new C(this._materialRepository,this._textureRepository,this._shaderTechniqueRepository,this._rctx,this._compositingHelper,this._magnifierHelper,(e=>this.requestRender(e)),((t,r)=>e.schedule(t,r)),e),this._screenshotManager=new q(this._rctx,((e,t,r)=>this._renderer.render(e,t,t,r)),(e=>this.requestRender(e)),e.options.screenshot.renderOverlay,(e=>this.events.emit("force-camera-for-screenshot",e))),this._registerFrameTask(e)}normalizeCtorArgs(){return{}}dispose(){this._container.contains(this._canvas)&&this._container.removeChild(this._canvas),this._frameTask=o(this._frameTask),this._shaderTechniqueRepository=n(this._shaderTechniqueRepository),super.dispose(),this._tmpDepthBuffer=null,this._rctx=null}get performanceInfo(){const e=this._rctx.gl;return{renderer:this._renderer.performanceInfo,textureMemory:void 0!==e.getUsedTextureMemory?e.getUsedTextureMemory():void 0,renderbufferMemory:void 0!==e.getUsedRenderbufferMemory?e.getUsedRenderbufferMemory():void 0,VBOMemory:void 0!==e.getUsedVBOMemory?e.getUsedVBOMemory():void 0}}requestRender(e=y.UPDATE){e===y.UPDATE?this._needsUpdate=!0:this._needsRender=!0}get updating(){return this._needsUpdate||this._needsWaterReflectionUpdate||this._renderer.updating||this._textureRepository.updating||this.waterTextureRepository.updating||this._magnifierHelper.updating}ensureEdgeView(){return this._renderer.ensureEdgeView()}get edgeView(){return this._renderer.edgeView}get textureRepository(){return this._textureRepository}get compositingHelper(){return this._compositingHelper}set magnifier(e){this._magnifierHelper.magnifier=e}updateLightSources(e,t,r){this._renderer.updateLightSources(e,t,r),this.requestRender()}setRenderParameters(e){void 0!==e.idleSuspend&&this._idleSuspend!==!!e.idleSuspend&&(this._idleSuspend=!!e.idleSuspend,this.requestRender()),this._renderer.setRenderParameters(e)}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}modify(e){this._renderer.modify(e),e.clear()}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(e)}get hasShadowsEnabled(){return this._renderer.hasShadowsEnabled}readAccumulatedShadow(e){return this._renderer.readAccumulatedShadow(e[0],e[1])}getMinimalDepthForArea(e,t,r,i,s,o=s){const n=i.constrainWindowSize(t,r,s*i.pixelRatio,o*i.pixelRatio),p=this._ensureDepthBuffer(n);this._renderer.readDepthPixels(i,n[0],n[1],n[2],n[3],p);let h=Number.MAX_VALUE;for(let a=0;a<n[2]*n[3];a++){const e=b(4*a,p,i.nearFar);h>e&&e!==i.nearFar[0]&&e!==i.nearFar[1]&&(h=e)}if(a(e)){const s=e.pickDepth(t*i.pixelRatio,r*i.pixelRatio,i);a(s)&&h>s&&s!==i.nearFar[0]&&s!==i.nearFar[1]&&(h=s)}return h===Number.MAX_VALUE?void 0:h}_ensureDepthBuffer(e){const t=4*e[2]*e[3];return(p(this._tmpDepthBuffer)||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}get renderPlugins(){return this._renderer.renderPlugins}get test(){return{renderer:this._renderer}}get gpuMemoryUsage(){return this._renderer.gpuMemoryUsage}async reloadShaders(){S(),await this._shaderTechniqueRepository.reloadAll(),this.requestRender()}get animationTimestep(){return this._renderer.animationTimestep}_registerFrameTask(e){const t=e.state,r={viewCamera:t.camera,frameHasDecorations:!1};let i=!1,s=y.BACKGROUND,o=!1;const n={preRender:r=>{i=this.updating,s=this._needsUpdate?y.UPDATE:y.BACKGROUND,e.processSyncLayers();const o=d(r.time-this._lastAnimationUpdate);(o>this.animationTimestep||a(this.forcedAnimationTime)||i||this._needsRender)&&(this._renderer.updateAnimation({camera:t.camera,dt:o,forcedTime:this.forcedAnimationTime})&&this.requestRender(y.BACKGROUND),this._lastAnimationUpdate=r.time)},render:()=>{if((this._needsUpdate||this._needsRender||!this._idleSuspend||!this._renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const e=this._needsUpdate&&this._idleSuspend&&this._renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,this._renderer.render(null,t.camera,t.contentCamera,R.ON),o=!0,e&&this._renderer.hasWaterReflection&&(this.requestRender(y.BACKGROUND),this._needsWaterReflectionUpdate=!0)}},update:()=>{r.viewCamera=t.camera,r.frameHasDecorations=this._renderer.hasSlicePlane||this._magnifierHelper.enabled,this._textureRepository.update(),this._screenshotManager.update(r)},finish:()=>{o&&(this._renderer.finish(s),o=!1)}};this._frameTask=h(n)}_initializeContext(e){const t=e.options;this._canvas=t.canvas,this._canvas||(this._canvas=document.createElement("canvas")),this._canvas.setAttribute("style","width: 100%; height:100%; display:block;");const r={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:null==t.stencil||t.stencil,powerPreference:"high-performance"},s=M("3d",this._canvas,r);if(p(s)){const e=i("esri-force-webgl");D.error(e)}else this._rctx=this._newRenderingContext(s,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&D.error("WebGL context has alpha channel even though no alpha channel was requested"),!this._rctx.contextAttributes.alpha&&i("safari")>=11&&(this._container.style.backgroundColor="black"),this._container.appendChild(this._canvas)}_newRenderingContext(e,t){const r={disabledExtensions:t.options.deactivatedWebGLExtensions||{},debugWebGLExtensions:t.options.debugWebGLExtensions||{},maxAnisotropy:8},i=(e,r)=>t.resourceController.memoryController.newCache(e,r);if(E.enableContextCache){let t=H.get(e);return t?(t.configure(r),t.newCache=i,t.ref(),t):(t=new T(e,r,i),H.set(e,t),t.ref(),t)}return new T(e,r,i)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("standardDerivatives"),this._rctx.capabilities.enable("shaderTextureLOD"),this._rctx.capabilities.enable("textureFloat")}get componentObjectCollection(){return p(this._componentObjectCollection)&&(this._componentObjectCollection=new u(this._renderer.renderPassManager)),this._componentObjectCollection}set componentObjectCollection(e){this._componentObjectCollection=e}};e([l({type:Boolean,readOnly:!0})],O.prototype,"updating",null),e([f()],O.prototype,"_rctx",void 0),e([f()],O.prototype,"_container",void 0),e([f()],O.prototype,"_canvas",void 0),e([f()],O.prototype,"_stippleTextureRepository",void 0),e([f(),l()],O.prototype,"waterTextureRepository",void 0),e([f(),l()],O.prototype,"_magnifierHelper",void 0),e([f(),l()],O.prototype,"_textureRepository",void 0),e([f()],O.prototype,"_compositingHelper",void 0),e([f()],O.prototype,"_renderer",void 0),e([f()],O.prototype,"_screenshotManager",void 0),e([f()],O.prototype,"componentObjectCollection",null),e([f()],O.prototype,"_componentObjectCollection",void 0),e([l()],O.prototype,"_needsUpdate",void 0),e([l()],O.prototype,"_needsWaterReflectionUpdate",void 0),O=e([m("esri.views.3d.webgl-engine.parts.RenderView")],O);const E={enableContextCache:!1,disposeContextCache:()=>{H.forEach((e=>e.dispose())),H.clear()}},H=new Map;export{O as RenderView,E as test};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import r from"../../../../core/Evented.js";import i from"../../../../core/has.js";import s from"../../../../core/Logger.js";import{removeMaybe as o,disposeMaybe as n,isSome as a,isNone as p}from"../../../../core/maybe.js";import{addFrameTask as h}from"../../../../core/scheduling.js";import{Milliseconds as d}from"../../../../core/time.js";import{init as c}from"../../../../core/watchUtils.js";import{property as l}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{ComponentObjectCollection as u}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueRepository as _}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{autoDispose as f,AutoDisposableMixin as g}from"../lib/AutoDisposable.js";import{RenderRequestType as y,Decorations as R}from"../lib/basicInterfaces.js";import x from"../lib/CompositingHelper.js";import{textureToDepth as b}from"../lib/depthRangeUtils.js";import{GLMaterialRepository as v}from"../lib/GLMaterialRepository.js";import{MagnifierHelper as w}from"../lib/MagnifierHelper.js";import{Renderer as C}from"../lib/Renderer.js";import{RenderingContext as T}from"../lib/RenderingContext.js";import{TextureRepository as U}from"../lib/TextureRepository.js";import{StippleTextureRepository as j}from"../materials/StippleTextureRepository.js";import{WaterTextureRepository as A}from"../materials/internal/WaterTextureRepository.js";import{removeLoadedShaderModules as S}from"./requireUtils.js";import{ScreenshotManager as q}from"./ScreenshotManager.js";import{createContextOrErrorHTML as M}from"../../../webgl/context-util.js";const O=s.getLogger("esri.views.3d.webgl-engine.parts.View");let D=class extends(g(t)){constructor(e){super({}),this.events=new r,this.waterTextureRepository=new A,this._magnifierHelper=new w,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this._container=e.container,this._initializeContext(e),c(this.waterTextureRepository,"loadingState",(()=>this.requestRender())),this._magnifierHelper.events.on("request-render",(()=>this.requestRender())),this._stippleTextureRepository=new j(this._rctx),this._shaderTechniqueRepository=new _({rctx:this._rctx,viewingMode:e.viewingMode,stippleTextureRepository:this._stippleTextureRepository,waterTextureRepository:this.waterTextureRepository}),this._textureRepository=new U(e,this._shaderTechniqueRepository,this._rctx),this._textureRepository.events.on("changed",(e=>this.requestRender(e))),this._materialRepository=new v(this._textureRepository,this._shaderTechniqueRepository,(()=>this.requestRender()),(()=>this.requestRender())),this._compositingHelper=new x(this._rctx,this._shaderTechniqueRepository),this._renderer=new C(this._materialRepository,this._textureRepository,this._shaderTechniqueRepository,this._rctx,this._compositingHelper,this._magnifierHelper,(e=>this.requestRender(e)),((t,r)=>e.schedule(t,r)),e),this._screenshotManager=new q(this._rctx,((e,t,r)=>this._renderer.render(e,t,t,r)),(e=>this.requestRender(e)),e.options.screenshot.renderOverlay,(e=>this.events.emit("force-camera-for-screenshot",e)),(()=>this._renderer.disposeOffscreenBuffers())),this._registerFrameTask(e)}normalizeCtorArgs(){return{}}dispose(){this._container.contains(this._canvas)&&this._container.removeChild(this._canvas),this._frameTask=o(this._frameTask),this._shaderTechniqueRepository=n(this._shaderTechniqueRepository),super.dispose(),this._tmpDepthBuffer=null,this._rctx=null}get performanceInfo(){const e=this._rctx.gl;return{renderer:this._renderer.performanceInfo,textureMemory:void 0!==e.getUsedTextureMemory?e.getUsedTextureMemory():void 0,renderbufferMemory:void 0!==e.getUsedRenderbufferMemory?e.getUsedRenderbufferMemory():void 0,VBOMemory:void 0!==e.getUsedVBOMemory?e.getUsedVBOMemory():void 0}}requestRender(e=y.UPDATE){e===y.UPDATE?this._needsUpdate=!0:this._needsRender=!0}get updating(){return this._needsUpdate||this._needsWaterReflectionUpdate||this._renderer.updating||this._textureRepository.updating||this.waterTextureRepository.updating||this._magnifierHelper.updating}ensureEdgeView(){return this._renderer.ensureEdgeView()}get edgeView(){return this._renderer.edgeView}get textureRepository(){return this._textureRepository}get compositingHelper(){return this._compositingHelper}set magnifier(e){this._magnifierHelper.magnifier=e}updateLightSources(e,t,r){this._renderer.updateLightSources(e,t,r),this.requestRender()}setRenderParameters(e){void 0!==e.idleSuspend&&this._idleSuspend!==!!e.idleSuspend&&(this._idleSuspend=!!e.idleSuspend,this.requestRender()),this._renderer.setRenderParameters(e)}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}modify(e){this._renderer.modify(e),e.clear()}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(e)}get hasShadowsEnabled(){return this._renderer.hasShadowsEnabled}readAccumulatedShadow(e){return this._renderer.readAccumulatedShadow(e[0],e[1])}getMinimalDepthForArea(e,t,r,i,s,o=s){const n=i.constrainWindowSize(t,r,s*i.pixelRatio,o*i.pixelRatio),p=this._ensureDepthBuffer(n);this._renderer.readDepthPixels(i,n[0],n[1],n[2],n[3],p);let h=Number.MAX_VALUE;for(let a=0;a<n[2]*n[3];a++){const e=b(4*a,p,i.nearFar);h>e&&e!==i.nearFar[0]&&e!==i.nearFar[1]&&(h=e)}if(a(e)){const s=e.pickDepth(t*i.pixelRatio,r*i.pixelRatio,i);a(s)&&h>s&&s!==i.nearFar[0]&&s!==i.nearFar[1]&&(h=s)}return h===Number.MAX_VALUE?void 0:h}_ensureDepthBuffer(e){const t=4*e[2]*e[3];return(p(this._tmpDepthBuffer)||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}get renderPlugins(){return this._renderer.renderPlugins}get test(){return{renderer:this._renderer}}get gpuMemoryUsage(){return this._renderer.gpuMemoryUsage}async reloadShaders(){S(),await this._shaderTechniqueRepository.reloadAll(),this.requestRender()}get animationTimestep(){return this._renderer.animationTimestep}_registerFrameTask(e){const t=e.state,r={viewCamera:t.camera,frameHasDecorations:!1};let i=!1,s=y.BACKGROUND,o=!1;const n={preRender:r=>{i=this.updating,s=this._needsUpdate?y.UPDATE:y.BACKGROUND,e.processSyncLayers();const o=d(r.time-this._lastAnimationUpdate);(o>this.animationTimestep||a(this.forcedAnimationTime)||i||this._needsRender)&&(this._renderer.updateAnimation({camera:t.camera,dt:o,forcedTime:this.forcedAnimationTime})&&this.requestRender(y.BACKGROUND),this._lastAnimationUpdate=r.time)},render:()=>{if((this._needsUpdate||this._needsRender||!this._idleSuspend||!this._renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const e=this._needsUpdate&&this._idleSuspend&&this._renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,this._renderer.render(null,t.camera,t.contentCamera,R.ON),o=!0,e&&this._renderer.hasWaterReflection&&(this.requestRender(y.BACKGROUND),this._needsWaterReflectionUpdate=!0)}},update:()=>{r.viewCamera=t.camera,r.frameHasDecorations=this._renderer.hasSlicePlane||this._magnifierHelper.enabled,this._textureRepository.update(),this._screenshotManager.update(r)},finish:()=>{o&&(this._renderer.finish(s),o=!1)}};this._frameTask=h(n)}_initializeContext(e){const t=e.options;this._canvas=t.canvas,this._canvas||(this._canvas=document.createElement("canvas")),this._canvas.setAttribute("style","width: 100%; height:100%; display:block;");const r={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:null==t.stencil||t.stencil,powerPreference:"high-performance"},s=M("3d",this._canvas,r);if(p(s)){const e=i("esri-force-webgl");O.error(e)}else this._rctx=this._newRenderingContext(s,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&O.error("WebGL context has alpha channel even though no alpha channel was requested"),!this._rctx.contextAttributes.alpha&&i("safari")>=11&&(this._container.style.backgroundColor="black"),this._container.appendChild(this._canvas)}_newRenderingContext(e,t){const r={disabledExtensions:t.options.deactivatedWebGLExtensions||{},debugWebGLExtensions:t.options.debugWebGLExtensions||{},maxAnisotropy:8},i=(e,r)=>t.resourceController.memoryController.newCache(e,r);if(E.enableContextCache){let t=H.get(e);return t?(t.configure(r),t.newCache=i,t.ref(),t):(t=new T(e,r,i),H.set(e,t),t.ref(),t)}return new T(e,r,i)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("standardDerivatives"),this._rctx.capabilities.enable("shaderTextureLOD"),this._rctx.capabilities.enable("textureFloat")}get componentObjectCollection(){return p(this._componentObjectCollection)&&(this._componentObjectCollection=new u(this._renderer.renderPassManager)),this._componentObjectCollection}set componentObjectCollection(e){this._componentObjectCollection=e}};e([l({type:Boolean,readOnly:!0})],D.prototype,"updating",null),e([f()],D.prototype,"_rctx",void 0),e([f()],D.prototype,"_container",void 0),e([f()],D.prototype,"_canvas",void 0),e([f()],D.prototype,"_stippleTextureRepository",void 0),e([f(),l()],D.prototype,"waterTextureRepository",void 0),e([f(),l()],D.prototype,"_magnifierHelper",void 0),e([f(),l()],D.prototype,"_textureRepository",void 0),e([f()],D.prototype,"_compositingHelper",void 0),e([f()],D.prototype,"_renderer",void 0),e([f()],D.prototype,"_screenshotManager",void 0),e([f()],D.prototype,"componentObjectCollection",null),e([f()],D.prototype,"_componentObjectCollection",void 0),e([l()],D.prototype,"_needsUpdate",void 0),e([l()],D.prototype,"_needsWaterReflectionUpdate",void 0),D=e([m("esri.views.3d.webgl-engine.parts.RenderView")],D);const E={enableContextCache:!1,disposeContextCache:()=>{H.forEach((e=>e.dispose())),H.clear()}},H=new Map;export{D as RenderView,E as test};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{isNone as e}from"../../../../core/maybe.js";import{createResolver as t}from"../../../../core/promiseUtils.js";import{b as r}from"../../../../chunks/vec4f64.js";import{AutoDisposable as s}from"../lib/AutoDisposable.js";import{RenderRequestType as i,Decorations as n}from"../lib/basicInterfaces.js";import{encodeResult as o,createEmptyImageData as a,resampleHermite as h}from"../../../support/screenshotUtils.js";import{PixelFormat as c,DataType as l,TargetType as d,DepthStencilTargetType as f}from"../../../webgl/enums.js";import{FramebufferObject as u}from"../../../webgl/FramebufferObject.js";class g extends s{constructor(e,t,r,s=null,i,n=!0){super(),this._rctx=e,this._renderScene=t,this._requestRenderScene=r,this._renderOverlay=s,this.forceCameraHook=i,this.supersample=n,this._screenshotQueue=new Array}dispose(){this._rctx=null}takeScreenshot(e){this._requestRenderScene(i.BACKGROUND);const r=t();return this._screenshotQueue.push({settings:e,resolver:r}),r.promise}update(e){for(const t of this._screenshotQueue){if(this.isDisposed){t.resolver.reject();continue}const r={...t.settings,pixelRatio:t.settings.pixelRatio*e.viewCamera.pixelRatio},s=this._ensureScreenshotEncodeCanvas(),i=this._renderScreenshot(e,r),n=o(i,r,s,{flipY:!0,premultipliedAlpha:!0});t.resolver(n)}this._screenshotQueue.length=0}_renderScreenshotOverlay(t,r,s){if(e(this._renderOverlay))return r;t.width=r.width,t.height=r.height;const i=t.getContext("2d"),n=s.pixelRatio;return i.save(),i.translate(0,r.height),i.scale(1,-1),s.region&&i.translate(-s.region.x,-s.region.y),i.scale(n,n),r=this._renderOverlay(t,r),i.restore(),r}_readbackScreenshot(e){return e.resample?this._readbackScreenshotResampled(e):this._readbackScreenshotImmediate(e)}_readbackScreenshotResampled(e){const{framebufferWidth:t,framebufferHeight:r,region:s,resample:i}=e,n=this._ensureScreenshotEncodeCanvas();let o=a(t,r,n);this._rctx.gl.readPixels(0,0,t,r,c.RGBA,l.UNSIGNED_BYTE,new Uint8Array(o.data.buffer)),o=this._renderScreenshotOverlay(n,o,{...e,region:null});const d=a(s.width,s.height,n);return h(o,d,!0,i.region.x,r-(i.region.y+i.region.height),i.region.width,i.region.height)}_readbackScreenshotImmediate(e){const{framebufferHeight:t,region:r}=e,s=this._ensureScreenshotEncodeCanvas(),i=a(r.width,r.height,s);return this._rctx.gl.readPixels(r.x,t-(r.y+r.height),r.width,r.height,c.RGBA,l.UNSIGNED_BYTE,new Uint8Array(i.data.buffer)),this._renderScreenshotOverlay(s,i,e)}_renderScreenshot(e,t){let s=null;const i=e.viewCamera,{framebufferWidth:o,framebufferHeight:a}=t;let h=!1;const c=t.disableDecorations&&e.frameHasDecorations,l=o!==i.fullWidth||a!==i.fullHeight,g=t.ignorePadding&&i.pixelRatio!==t.pixelRatio,m=l||c||g;if(m){const e=i.clone();if(t.ignorePadding){const s=r(e.padding);for(let r=0;r<4;r++)s[r]=Math.round(s[r]/e.pixelRatio*t.pixelRatio);e.padding=s}e.fullWidth=o,e.fullHeight=a,e.pixelRatio=t.pixelRatio;const c=i.fovX-e.fovX,l=i.fovY-e.fovY;c<0&&c<l?e.fovX=i.fovX:l<0&&l<c&&(e.fovY=i.fovY),this.forceCameraHook(e),h=!0,s=new u(this._rctx,{width:e.fullWidth,height:e.fullHeight,colorTarget:d.TEXTURE,depthStencilTarget:f.DEPTH_STENCIL_RENDER_BUFFER}),this._renderScene(s,e,t.disableDecorations?n.OFF:n.ON),!0===t.renderScreenshotTwice&&this._renderScene(s,e,t.disableDecorations?n.OFF:n.ON)}const p=this._readbackScreenshot(t);if(m&&!this._rctx.contextAttributes.alpha)for(let r=3;r<p.data.length;r+=4)p.data[r]=255;return s&&s.dispose(),this._rctx.bindFramebuffer(null),h&&this.forceCameraHook(i),p}_ensureScreenshotEncodeCanvas(){return this._screenshotEncodeCanvas||(this._screenshotEncodeCanvas=document.createElement("canvas")),this._screenshotEncodeCanvas}}export{g as ScreenshotManager};
5
+ import{isNone as e,disposeMaybe as t}from"../../../../core/maybe.js";import{createResolver as r}from"../../../../core/promiseUtils.js";import{b as s}from"../../../../chunks/vec4f64.js";import{AutoDisposable as i}from"../lib/AutoDisposable.js";import{RenderRequestType as o,Decorations as n}from"../lib/basicInterfaces.js";import{encodeResult as a,createEmptyImageData as h,resampleHermite as c}from"../../../support/screenshotUtils.js";import{PixelFormat as l,DataType as d,TargetType as f,DepthStencilTargetType as u}from"../../../webgl/enums.js";import{FramebufferObject as _}from"../../../webgl/FramebufferObject.js";class g extends i{constructor(e,t,r,s,i,o){super(),this._rctx=e,this._renderScene=t,this._requestRenderScene=r,this._renderOverlay=s,this._forceCameraHook=i,this._disposeOffscreenBuffers=o,this.supersample=!0,this._screenshotQueue=new Array}dispose(){this._rctx=null}takeScreenshot(e){this._requestRenderScene(o.BACKGROUND);const t=r();return this._screenshotQueue.push({settings:e,resolver:t}),t.promise}update(e){for(const t of this._screenshotQueue){if(this.isDisposed){t.resolver.reject();continue}const r={...t.settings,pixelRatio:t.settings.pixelRatio*e.viewCamera.pixelRatio},s=this._ensureScreenshotEncodeCanvas(),i=this._renderScreenshot(e,r),o=a(i,r,s,{flipY:!0,premultipliedAlpha:!0});t.resolver(o)}this._screenshotQueue.length=0}_renderScreenshotOverlay(t,r,s){if(e(this._renderOverlay))return r;t.width=r.width,t.height=r.height;const i=t.getContext("2d"),o=s.pixelRatio;return i.save(),i.translate(0,r.height),i.scale(1,-1),s.region&&i.translate(-s.region.x,-s.region.y),i.scale(o,o),r=this._renderOverlay(t,r),i.restore(),r}_readbackScreenshot(e,t){return e.resample?this._readbackScreenshotResampled(e,t):this._readbackScreenshotImmediate(e,t)}_readbackScreenshotResampled(e,t){const{framebufferWidth:r,framebufferHeight:s,region:i,resample:o}=e,n=this._ensureScreenshotEncodeCanvas();let a=h(r,s,n);this._rctx.gl.readPixels(0,0,r,s,l.RGBA,d.UNSIGNED_BYTE,new Uint8Array(a.data.buffer)),t(),a=this._renderScreenshotOverlay(n,a,{...e,region:null});const f=h(i.width,i.height,n);return c(a,f,!0,o.region.x,s-(o.region.y+o.region.height),o.region.width,o.region.height)}_readbackScreenshotImmediate(e,t){const{framebufferHeight:r,region:s}=e,i=this._ensureScreenshotEncodeCanvas(),o=h(s.width,s.height,i);return this._rctx.gl.readPixels(s.x,r-(s.y+s.height),s.width,s.height,l.RGBA,d.UNSIGNED_BYTE,new Uint8Array(o.data.buffer)),t(),this._renderScreenshotOverlay(i,o,e)}_renderScreenshot(e,r){let i=null;const o=e.viewCamera,{framebufferWidth:a,framebufferHeight:h}=r;let c=!1;const l=r.disableDecorations&&e.frameHasDecorations,d=a!==o.fullWidth||h!==o.fullHeight,g=r.ignorePadding&&o.pixelRatio!==r.pixelRatio,m=d||l||g;if(m){const e=o.clone();if(r.ignorePadding){const t=s(e.padding);for(let s=0;s<4;s++)t[s]=Math.round(t[s]/e.pixelRatio*r.pixelRatio);e.padding=t}e.fullWidth=a,e.fullHeight=h,e.pixelRatio=r.pixelRatio;const t=o.fovX-e.fovX,l=o.fovY-e.fovY;t<0&&t<l?e.fovX=o.fovX:l<0&&l<t&&(e.fovY=o.fovY),this._forceCameraHook(e),c=!0,i=new _(this._rctx,{width:e.fullWidth,height:e.fullHeight,colorTarget:f.TEXTURE,depthStencilTarget:u.DEPTH_STENCIL_RENDER_BUFFER}),this._renderScene(i,e,r.disableDecorations?n.OFF:n.ON),this._disposeOffscreenBuffers()}const p=()=>{this._rctx.bindFramebuffer(null),t(i)},v=this._readbackScreenshot(r,p);if(p(),m&&!this._rctx.contextAttributes.alpha)for(let t=3;t<v.data.length;t+=4)v.data[t]=255;return c&&this._forceCameraHook(o),v}_ensureScreenshotEncodeCanvas(){return this._screenshotEncodeCanvas||(this._screenshotEncodeCanvas=document.createElement("canvas")),this._screenshotEncodeCanvas}}export{g as ScreenshotManager};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import{f as t}from"../../../../chunks/vec3f64.js";import{ShaderOutput as r}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniforms as i}from"../core/shaderLibrary/Slice.glsl.js";import{bindCustomOrigin as o}from"../core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as s}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as a}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{bindVerticalOffsetUniforms as n}from"../core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{bindOutputHighlight as l}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassTerrainTexture as p}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{Normals as c}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as u,bindPBRUniforms as h}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{bindReadShadowMapViewCustomOrigin as d}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{bindVisualVariablesUniformsForSymbols as m}from"../core/shaderLibrary/shading/VisualVariables.glsl.js";import{doublePrecisionRequiresObfuscation as f}from"../core/shaderLibrary/util/DoublePrecision.glsl.js";import{bindProjectionMatrix as v,bindViewCustomOrigin as g,bindCameraPosition as b}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as y}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as T}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as x,ShaderTechniqueConfiguration as P}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{AlphaDiscardMode as M,CullFaceOptions as S,TransparencyPassType as C}from"../lib/basicInterfaces.js";import{Default3D as O}from"../lib/DefaultVertexAttributeLocations.js";import{blendingDefault as D,oitBlending as A,oitDepthTest as j,getOITPolygonOffset as w}from"../lib/OrderIndependentTransparency.js";import{Program as N}from"../lib/Program.js";import{stencilWriteMaskOn as E,stencilToolMaskBaseParams as U,stencilBaseAllZerosParams as z}from"../lib/StencilUtils.js";import{colorMixModes as L,bindScreenSizePerspective as R}from"../materials/internal/MaterialUtil.js";import{D as H}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as F,cullingParams as B,defaultDepthWriteParams as I,defaultColorWriteParams as k}from"../../../webgl/renderState.js";class V extends T{initializeProgram(e){const t=V.shader.get(),r=this.configuration,i=t.build({OITEnabled:r.transparencyPassType===C.Color,output:r.output,viewingMode:e.viewingMode,receiveShadows:r.receiveShadows,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:r.sliceHighlightDisabled,sliceEnabledForVertexPrograms:!1,symbolColor:r.symbolColors,vvSize:r.vvSize,vvColor:r.vvColor,vvInstancingEnabled:!0,instanced:r.instanced,instancedColor:r.instancedColor,instancedDoublePrecision:r.instancedDoublePrecision,pbrMode:r.usePBR?r.isSchematic?u.Schematic:u.Normal:u.Disabled,hasMetalnessAndRoughnessTexture:r.hasMetalnessAndRoughnessTexture,hasEmissionTexture:r.hasEmissionTexture,hasOcclusionTexture:r.hasOcclusionTexture,hasNormalTexture:r.hasNormalTexture,hasColorTexture:r.hasColorTexture,receiveAmbientOcclusion:r.receiveAmbientOcclusion,useCustomDTRExponentForWater:!1,normalType:r.normalsTypeDerivate?s.Type.ScreenDerivative:s.Type.Attribute,doubleSidedMode:r.doubleSidedMode,vertexTangents:r.vertexTangents,attributeTextureCoordinates:r.hasMetalnessAndRoughnessTexture||r.hasEmissionTexture||r.hasOcclusionTexture||r.hasNormalTexture||r.hasColorTexture?a.AttributeType.Default:a.AttributeType.None,textureAlphaPremultiplied:r.textureAlphaPremultiplied,attributeColor:r.vertexColors,screenSizePerspectiveEnabled:r.screenSizePerspective,verticalOffsetEnabled:r.verticalOffset,offsetBackfaces:r.offsetBackfaces,doublePrecisionRequiresObfuscation:f(e.rctx),alphaDiscardMode:r.alphaDiscardMode,supportsTextureAtlas:!1,multipassTerrainEnabled:r.multipassTerrainEnabled,cullAboveGround:r.cullAboveGround});return new N(e.rctx,i,O)}bindPass(e,t){var i,o;v(this.program,t.camera.projectionMatrix);const s=this.configuration.output;(this.configuration.output===r.Depth||t.multipassTerrainEnabled||s===r.Shadow)&&this.program.setUniform2fv("cameraNearFar",t.camera.nearFar),t.multipassTerrainEnabled&&(this.program.setUniform2fv("inverseViewport",t.inverseViewport),p(this.program,t)),s===r.Alpha&&(this.program.setUniform1f("opacity",e.opacity),this.program.setUniform1f("layerOpacity",e.layerOpacity),this.program.setUniform4fv("externalColor",e.externalColor),this.program.setUniform1i("colorMixMode",L[e.colorMixMode])),s===r.Color?(t.lighting.setUniforms(this.program,!1),this.program.setUniform3fv("ambient",e.ambient),this.program.setUniform3fv("diffuse",e.diffuse),this.program.setUniform4fv("externalColor",e.externalColor),this.program.setUniform1i("colorMixMode",L[e.colorMixMode]),this.program.setUniform1f("opacity",e.opacity),this.program.setUniform1f("layerOpacity",e.layerOpacity),this.configuration.usePBR&&h(this.program,e,this.configuration.isSchematic)):s===r.Highlight&&l(this.program,t),m(this.program,e),n(this.program,e,t),R(e.screenSizePerspective,this.program,"screenSizePerspectiveAlignment"),e.textureAlphaMode!==M.Mask&&e.textureAlphaMode!==M.MaskBlend||this.program.setUniform1f("textureAlphaCutoff",e.textureAlphaCutoff),null==(i=t.shadowMap)||i.bind(this.program),null==(o=t.ssaoHelper)||o.bind(this.program,t.camera)}bindDraw(e){const s=this.configuration.instancedDoublePrecision?t(e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]):e.origin;g(this.program,s,e.camera.viewMatrix),this.program.rebindTextures(),(this.configuration.output===r.Color||this.configuration.output===r.Alpha||this.configuration.output===r.Depth&&this.configuration.screenSizePerspective||this.configuration.output===r.Normal&&this.configuration.screenSizePerspective||this.configuration.output===r.Highlight&&this.configuration.screenSizePerspective)&&b(this.program,s,e.camera.viewInverseTransposeMatrix),this.configuration.output===r.Normal&&this.program.setUniformMatrix4fv("viewNormal",e.camera.viewInverseTransposeMatrix),this.configuration.instancedDoublePrecision&&o(this.program,s),i(this.program,this.configuration,e.slicePlane,s),this.configuration.output===r.Color&&d(this.program,e,s)}_setPipeline(e,t){const i=this.configuration,o=e===C.NONE,s=e===C.FrontFace;return F({blending:i.output!==r.Color&&i.output!==r.Alpha||!i.transparent?null:o?D:A(e),culling:q(i)&&B(i.cullFace),depthTest:{func:j(e)},depthWrite:o||s?i.writeDepth&&I:null,colorWrite:k,stencilWrite:i.sceneHasOcludees?E:null,stencilTest:i.sceneHasOcludees?t?U:z:null,polygonOffset:o||s?null:w(i.enableOffset)})}initializePipeline(){return this._occludeePipelineState=this._setPipeline(this.configuration.transparencyPassType,!0),this._setPipeline(this.configuration.transparencyPassType,!1)}getPipelineState(e,t){return t?this._occludeePipelineState:super.getPipelineState(e,t)}}function q(e){return e.cullFace?e.cullFace!==S.None:!e.slicePlaneEnabled&&(!e.transparent&&!e.doubleSidedMode)}V.shader=new y(H,(()=>import("./DefaultMaterial.glsl.js")));class _ extends P{constructor(){super(...arguments),this.output=r.Color,this.alphaDiscardMode=M.Opaque,this.doubleSidedMode=c.DoubleSidedMode.None,this.isSchematic=!1,this.vertexColors=!1,this.offsetBackfaces=!1,this.symbolColors=!1,this.vvSize=!1,this.vvColor=!1,this.verticalOffset=!1,this.receiveShadows=!1,this.slicePlaneEnabled=!1,this.sliceHighlightDisabled=!1,this.receiveAmbientOcclusion=!1,this.screenSizePerspective=!1,this.textureAlphaPremultiplied=!1,this.hasColorTexture=!1,this.usePBR=!1,this.hasMetalnessAndRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.instanced=!1,this.instancedColor=!1,this.instancedDoublePrecision=!1,this.vertexTangents=!1,this.normalsTypeDerivate=!1,this.writeDepth=!0,this.sceneHasOcludees=!1,this.transparent=!1,this.enableOffset=!0,this.cullFace=S.None,this.transparencyPassType=C.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}e([x({count:r.COUNT})],_.prototype,"output",void 0),e([x({count:M.COUNT})],_.prototype,"alphaDiscardMode",void 0),e([x({count:c.DoubleSidedMode.COUNT})],_.prototype,"doubleSidedMode",void 0),e([x()],_.prototype,"isSchematic",void 0),e([x()],_.prototype,"vertexColors",void 0),e([x()],_.prototype,"offsetBackfaces",void 0),e([x()],_.prototype,"symbolColors",void 0),e([x()],_.prototype,"vvSize",void 0),e([x()],_.prototype,"vvColor",void 0),e([x()],_.prototype,"verticalOffset",void 0),e([x()],_.prototype,"receiveShadows",void 0),e([x()],_.prototype,"slicePlaneEnabled",void 0),e([x()],_.prototype,"sliceHighlightDisabled",void 0),e([x()],_.prototype,"receiveAmbientOcclusion",void 0),e([x()],_.prototype,"screenSizePerspective",void 0),e([x()],_.prototype,"textureAlphaPremultiplied",void 0),e([x()],_.prototype,"hasColorTexture",void 0),e([x()],_.prototype,"usePBR",void 0),e([x()],_.prototype,"hasMetalnessAndRoughnessTexture",void 0),e([x()],_.prototype,"hasEmissionTexture",void 0),e([x()],_.prototype,"hasOcclusionTexture",void 0),e([x()],_.prototype,"hasNormalTexture",void 0),e([x()],_.prototype,"instanced",void 0),e([x()],_.prototype,"instancedColor",void 0),e([x()],_.prototype,"instancedDoublePrecision",void 0),e([x()],_.prototype,"vertexTangents",void 0),e([x()],_.prototype,"normalsTypeDerivate",void 0),e([x()],_.prototype,"writeDepth",void 0),e([x()],_.prototype,"sceneHasOcludees",void 0),e([x()],_.prototype,"transparent",void 0),e([x()],_.prototype,"enableOffset",void 0),e([x({count:S.COUNT})],_.prototype,"cullFace",void 0),e([x({count:C.COUNT})],_.prototype,"transparencyPassType",void 0),e([x()],_.prototype,"multipassTerrainEnabled",void 0),e([x()],_.prototype,"cullAboveGround",void 0);export{V as DefaultMaterialTechnique,_ as DefaultMaterialTechniqueConfiguration};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Logger.js";import{isSome as t}from"../../../../core/maybe.js";import{f as o}from"../../../../chunks/vec3f64.js";import{ShaderOutput as i}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniforms as s}from"../core/shaderLibrary/Slice.glsl.js";import{bindCustomOrigin as a}from"../core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as n}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as l}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{bindVerticalOffsetUniforms as p}from"../core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{bindOutputHighlight as c}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassTerrainTexture as u}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{Normals as h}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as d,bindPBRUniforms as m}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{bindReadShadowMapViewCustomOrigin as f}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{bindVisualVariablesUniformsForSymbols as g}from"../core/shaderLibrary/shading/VisualVariables.glsl.js";import{doublePrecisionRequiresObfuscation as v}from"../core/shaderLibrary/util/DoublePrecision.glsl.js";import{bindProjectionMatrix as b,bindViewCustomOrigin as y,bindCameraPosition as T}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as x}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as M}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as P,ShaderTechniqueConfiguration as S}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{AlphaDiscardMode as C,CullFaceOptions as O,TransparencyPassType as D}from"../lib/basicInterfaces.js";import{Default3D as A}from"../lib/DefaultVertexAttributeLocations.js";import{blendingDefault as j,oitBlending as w,oitDepthTest as N,getOITPolygonOffset as E}from"../lib/OrderIndependentTransparency.js";import{Program as U}from"../lib/Program.js";import{stencilWriteMaskOn as L,stencilToolMaskBaseParams as z,stencilBaseAllZerosParams as R}from"../lib/StencilUtils.js";import{colorMixModes as H,bindScreenSizePerspective as F}from"../materials/internal/MaterialUtil.js";import{D as B}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as I,cullingParams as k,defaultDepthWriteParams as q,defaultColorWriteParams as V}from"../../../webgl/renderState.js";const _=r.getLogger("esri.views.3d.webgl-engine.shaders.DefaultTechnique");class G extends M{initializeProgram(e){const r=G.shader.get(),t=this.configuration,o=r.build({OITEnabled:t.transparencyPassType===D.Color,output:t.output,viewingMode:e.viewingMode,receiveShadows:t.receiveShadows,slicePlaneEnabled:t.slicePlaneEnabled,sliceHighlightDisabled:t.sliceHighlightDisabled,sliceEnabledForVertexPrograms:!1,symbolColor:t.symbolColors,vvSize:t.vvSize,vvColor:t.vvColor,vvInstancingEnabled:!0,instanced:t.instanced,instancedColor:t.instancedColor,instancedDoublePrecision:t.instancedDoublePrecision,pbrMode:t.usePBR?t.isSchematic?d.Schematic:d.Normal:d.Disabled,hasMetalnessAndRoughnessTexture:t.hasMetalnessAndRoughnessTexture,hasEmissionTexture:t.hasEmissionTexture,hasOcclusionTexture:t.hasOcclusionTexture,hasNormalTexture:t.hasNormalTexture,hasColorTexture:t.hasColorTexture,hasModelTransformation:t.hasModelTransformation,receiveAmbientOcclusion:t.receiveAmbientOcclusion,useCustomDTRExponentForWater:!1,normalType:t.normalsTypeDerivate?n.Type.ScreenDerivative:n.Type.Attribute,doubleSidedMode:t.doubleSidedMode,vertexTangents:t.vertexTangents,attributeTextureCoordinates:t.hasMetalnessAndRoughnessTexture||t.hasEmissionTexture||t.hasOcclusionTexture||t.hasNormalTexture||t.hasColorTexture?l.AttributeType.Default:l.AttributeType.None,textureAlphaPremultiplied:t.textureAlphaPremultiplied,attributeColor:t.vertexColors,screenSizePerspectiveEnabled:t.screenSizePerspective,verticalOffsetEnabled:t.verticalOffset,offsetBackfaces:t.offsetBackfaces,doublePrecisionRequiresObfuscation:v(e.rctx),alphaDiscardMode:t.alphaDiscardMode,supportsTextureAtlas:!1,multipassTerrainEnabled:t.multipassTerrainEnabled,cullAboveGround:t.cullAboveGround});return new U(e.rctx,o,A)}bindPass(e,r){var o,s;b(this.program,r.camera.projectionMatrix);const a=this.configuration.output;this.configuration.hasModelTransformation&&(t(e.modelTransformation)?this.program.setUniformMatrix4fv("model",e.modelTransformation):_.warnOnce("hasModelTransformation true, but no modelTransformation found.")),(this.configuration.output===i.Depth||r.multipassTerrainEnabled||a===i.Shadow)&&this.program.setUniform2fv("cameraNearFar",r.camera.nearFar),r.multipassTerrainEnabled&&(this.program.setUniform2fv("inverseViewport",r.inverseViewport),u(this.program,r)),a===i.Alpha&&(this.program.setUniform1f("opacity",e.opacity),this.program.setUniform1f("layerOpacity",e.layerOpacity),this.program.setUniform4fv("externalColor",e.externalColor),this.program.setUniform1i("colorMixMode",H[e.colorMixMode])),a===i.Color?(r.lighting.setUniforms(this.program,!1),this.program.setUniform3fv("ambient",e.ambient),this.program.setUniform3fv("diffuse",e.diffuse),this.program.setUniform4fv("externalColor",e.externalColor),this.program.setUniform1i("colorMixMode",H[e.colorMixMode]),this.program.setUniform1f("opacity",e.opacity),this.program.setUniform1f("layerOpacity",e.layerOpacity),this.configuration.usePBR&&m(this.program,e,this.configuration.isSchematic)):a===i.Highlight&&c(this.program,r),g(this.program,e),p(this.program,e,r),F(e.screenSizePerspective,this.program,"screenSizePerspectiveAlignment"),e.textureAlphaMode!==C.Mask&&e.textureAlphaMode!==C.MaskBlend||this.program.setUniform1f("textureAlphaCutoff",e.textureAlphaCutoff),null==(o=r.shadowMap)||o.bind(this.program),null==(s=r.ssaoHelper)||s.bind(this.program,r.camera)}bindDraw(e){const r=this.configuration.instancedDoublePrecision?o(e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]):e.origin;y(this.program,r,e.camera.viewMatrix),this.program.rebindTextures(),(this.configuration.output===i.Color||this.configuration.output===i.Alpha||this.configuration.output===i.Depth&&this.configuration.screenSizePerspective||this.configuration.output===i.Normal&&this.configuration.screenSizePerspective||this.configuration.output===i.Highlight&&this.configuration.screenSizePerspective)&&T(this.program,r,e.camera.viewInverseTransposeMatrix),this.configuration.output===i.Normal&&this.program.setUniformMatrix4fv("viewNormal",e.camera.viewInverseTransposeMatrix),this.configuration.instancedDoublePrecision&&a(this.program,r),s(this.program,this.configuration,e.slicePlane,r),this.configuration.output===i.Color&&f(this.program,e,r)}_setPipeline(e,r){const t=this.configuration,o=e===D.NONE,s=e===D.FrontFace;return I({blending:t.output!==i.Color&&t.output!==i.Alpha||!t.transparent?null:o?j:w(e),culling:W(t)&&k(t.cullFace),depthTest:{func:N(e)},depthWrite:o||s?t.writeDepth&&q:null,colorWrite:V,stencilWrite:t.sceneHasOcludees?L:null,stencilTest:t.sceneHasOcludees?r?z:R:null,polygonOffset:o||s?null:E(t.enableOffset)})}initializePipeline(){return this._occludeePipelineState=this._setPipeline(this.configuration.transparencyPassType,!0),this._setPipeline(this.configuration.transparencyPassType,!1)}getPipelineState(e,r){return r?this._occludeePipelineState:super.getPipelineState(e,r)}}function W(e){return e.cullFace?e.cullFace!==O.None:!e.slicePlaneEnabled&&(!e.transparent&&!e.doubleSidedMode)}G.shader=new x(B,(()=>import("./DefaultMaterial.glsl.js")));class J extends S{constructor(){super(...arguments),this.output=i.Color,this.alphaDiscardMode=C.Opaque,this.doubleSidedMode=h.DoubleSidedMode.None,this.isSchematic=!1,this.vertexColors=!1,this.offsetBackfaces=!1,this.symbolColors=!1,this.vvSize=!1,this.vvColor=!1,this.verticalOffset=!1,this.receiveShadows=!1,this.slicePlaneEnabled=!1,this.sliceHighlightDisabled=!1,this.receiveAmbientOcclusion=!1,this.screenSizePerspective=!1,this.textureAlphaPremultiplied=!1,this.hasColorTexture=!1,this.usePBR=!1,this.hasMetalnessAndRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.instanced=!1,this.instancedColor=!1,this.instancedDoublePrecision=!1,this.vertexTangents=!1,this.normalsTypeDerivate=!1,this.writeDepth=!0,this.sceneHasOcludees=!1,this.transparent=!1,this.enableOffset=!0,this.cullFace=O.None,this.transparencyPassType=D.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1,this.hasModelTransformation=!1}}e([P({count:i.COUNT})],J.prototype,"output",void 0),e([P({count:C.COUNT})],J.prototype,"alphaDiscardMode",void 0),e([P({count:h.DoubleSidedMode.COUNT})],J.prototype,"doubleSidedMode",void 0),e([P()],J.prototype,"isSchematic",void 0),e([P()],J.prototype,"vertexColors",void 0),e([P()],J.prototype,"offsetBackfaces",void 0),e([P()],J.prototype,"symbolColors",void 0),e([P()],J.prototype,"vvSize",void 0),e([P()],J.prototype,"vvColor",void 0),e([P()],J.prototype,"verticalOffset",void 0),e([P()],J.prototype,"receiveShadows",void 0),e([P()],J.prototype,"slicePlaneEnabled",void 0),e([P()],J.prototype,"sliceHighlightDisabled",void 0),e([P()],J.prototype,"receiveAmbientOcclusion",void 0),e([P()],J.prototype,"screenSizePerspective",void 0),e([P()],J.prototype,"textureAlphaPremultiplied",void 0),e([P()],J.prototype,"hasColorTexture",void 0),e([P()],J.prototype,"usePBR",void 0),e([P()],J.prototype,"hasMetalnessAndRoughnessTexture",void 0),e([P()],J.prototype,"hasEmissionTexture",void 0),e([P()],J.prototype,"hasOcclusionTexture",void 0),e([P()],J.prototype,"hasNormalTexture",void 0),e([P()],J.prototype,"instanced",void 0),e([P()],J.prototype,"instancedColor",void 0),e([P()],J.prototype,"instancedDoublePrecision",void 0),e([P()],J.prototype,"vertexTangents",void 0),e([P()],J.prototype,"normalsTypeDerivate",void 0),e([P()],J.prototype,"writeDepth",void 0),e([P()],J.prototype,"sceneHasOcludees",void 0),e([P()],J.prototype,"transparent",void 0),e([P()],J.prototype,"enableOffset",void 0),e([P({count:O.COUNT})],J.prototype,"cullFace",void 0),e([P({count:D.COUNT})],J.prototype,"transparencyPassType",void 0),e([P()],J.prototype,"multipassTerrainEnabled",void 0),e([P()],J.prototype,"cullAboveGround",void 0),e([P()],J.prototype,"hasModelTransformation",void 0);export{G as DefaultMaterialTechnique,J as DefaultMaterialTechniqueConfiguration};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import{ShaderOutput as r}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniformsWithOrigin as i}from"../core/shaderLibrary/Slice.glsl.js";import{bindVerticalOffsetUniforms as t}from"../core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{HUDSpace as o,bindHUDUniforms as s}from"../core/shaderLibrary/hud/HUD.glsl.js";import{bindOutputHighlight as a}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassGeometryTexture as n}from"../core/shaderLibrary/shading/MultipassGeometryTest.glsl.js";import{bindMultipassTerrainTexture as l}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{bindVisualVariablesUniforms as p}from"../core/shaderLibrary/shading/VisualVariables.glsl.js";import{bindScreenSizePerspectiveUniforms as d}from"../core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import{bindProjectionMatrix as c,bindViewport as u,bindView as h,bindCameraPosition as m}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as g}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as f}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as b,ShaderTechniqueConfiguration as v}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TransparencyPassType as y}from"../lib/basicInterfaces.js";import{Default3D as E}from"../lib/DefaultVertexAttributeLocations.js";import{oitBlending as T}from"../lib/OrderIndependentTransparency.js";import{Program as O}from"../lib/Program.js";import{b as S,H as P}from"../../../../chunks/HUDMaterial.glsl.js";import{BlendFactor as j,CompareFunction as x,PrimitiveType as U}from"../../../webgl/enums.js";import{simpleBlendingParams as w,defaultDepthWriteParams as D,makePipelineState as C,defaultColorWriteParams as L}from"../../../webgl/renderState.js";class H extends f{initializeProgram(e){const r=H.shader.get(),i=this.configuration,t=r.build({output:i.output,FrontFacePass:i.transparencyPassType===y.FrontFace,viewingMode:e.viewingMode,occlusionTestEnabled:i.occlusionTestEnabled,signedDistanceFieldEnabled:i.sdf,slicePlaneEnabled:i.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!0,debugDrawBorder:i.debugDrawBorder,binaryHighlightOcclusionEnabled:i.binaryHighlightOcclusion,screenCenterOffsetUnitsEnabled:i.screenCenterOffsetUnitsEnabled,screenSizePerspectiveEnabled:i.screenSizePerspective,verticalOffsetEnabled:i.verticalOffset,pixelSnappingEnabled:i.pixelSnappingEnabled,vvSize:i.vvSize,vvColor:i.vvColor,vvInstancingEnabled:!1,isDraped:i.isDraped,multipassGeometryEnabled:i.multipassGeometryEnabled,multipassTerrainEnabled:i.multipassTerrainEnabled,cullAboveGround:i.cullAboveGround});return new O(e.rctx,t,E)}bindPass(e,i){c(this.program,i.camera.projectionMatrix),this.program.setUniform1f("cameraGroundRelative",i.camera.aboveGround?1:-1),this.program.setUniform1f("perDistancePixelRatio",Math.tan(i.camera.fovY/2)/(i.camera.fullViewport[2]/2)),this.program.setUniformMatrix4fv("viewNormal",i.camera.viewInverseTransposeMatrix),this.program.setUniform1f("polygonOffset",e.shaderPolygonOffset),t(this.program,e,i),d(this.program,e),this.program.setUniform1f("pixelRatio",i.camera.pixelRatio||1),u(this.program,i),this.configuration.output===r.Occlusion?(this.program.setUniform2fv("cameraNearFar",i.camera.nearFar),this.program.setUniform2fv("inverseViewport",i.inverseViewport),n(this.program,i),l(this.program,i)):(s(this.program,i),S(this.program,e,i.camera.pixelRatio||1),p(this.program,e),this.configuration.occlusionTestEnabled&&this.program.bindTexture(i.hudVisibilityTexture,"hudVisibilityTexture")),this.configuration.output===r.Highlight&&a(this.program,i)}bindDraw(e){h(this.program,e),m(this.program,e.origin,e.camera.viewInverseTransposeMatrix),i(this.program,this.configuration,e),this.program.rebindTextures()}_setPipelineState(e){const i=this.configuration,t=e===y.NONE,o=e===y.FrontFace,s=x.LEQUAL,a=this.configuration.polygonOffsetEnabled&&N,n=(t||o)&&i.output!==r.Highlight?(i.depthEnabled||i.output===r.Occlusion)&&D:null;return C({blending:i.output===r.Color||i.output===r.Alpha||i.output===r.Highlight?t?M:T(e):null,depthTest:{func:s},depthWrite:n,colorWrite:L,polygonOffset:a})}initializePipeline(){return this._setPipelineState(this.configuration.transparencyPassType)}get primitiveType(){return this.configuration.output===r.Occlusion?U.POINTS:U.TRIANGLES}}H.shader=new g(P,(()=>import("./HUDMaterial.glsl.js")));const N={factor:0,units:-4},M=w(j.ONE,j.ONE_MINUS_SRC_ALPHA);class G extends v{constructor(){super(...arguments),this.output=r.Color,this.occlusionTestEnabled=!0,this.sdf=!1,this.vvSize=!1,this.vvColor=!1,this.verticalOffset=!1,this.screenSizePerspective=!1,this.screenCenterOffsetUnitsEnabled=o.World,this.debugDrawBorder=!1,this.binaryHighlightOcclusion=!0,this.slicePlaneEnabled=!1,this.polygonOffsetEnabled=!1,this.depthEnabled=!0,this.transparencyPassType=y.NONE,this.pixelSnappingEnabled=!0,this.isDraped=!1,this.multipassGeometryEnabled=!1,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}e([b({count:r.COUNT})],G.prototype,"output",void 0),e([b()],G.prototype,"occlusionTestEnabled",void 0),e([b()],G.prototype,"sdf",void 0),e([b()],G.prototype,"vvSize",void 0),e([b()],G.prototype,"vvColor",void 0),e([b()],G.prototype,"verticalOffset",void 0),e([b()],G.prototype,"screenSizePerspective",void 0),e([b({count:o.COUNT})],G.prototype,"screenCenterOffsetUnitsEnabled",void 0),e([b()],G.prototype,"debugDrawBorder",void 0),e([b()],G.prototype,"binaryHighlightOcclusion",void 0),e([b()],G.prototype,"slicePlaneEnabled",void 0),e([b()],G.prototype,"polygonOffsetEnabled",void 0),e([b()],G.prototype,"depthEnabled",void 0),e([b({count:y.COUNT})],G.prototype,"transparencyPassType",void 0),e([b()],G.prototype,"pixelSnappingEnabled",void 0),e([b()],G.prototype,"isDraped",void 0),e([b()],G.prototype,"multipassGeometryEnabled",void 0),e([b()],G.prototype,"multipassTerrainEnabled",void 0),e([b()],G.prototype,"cullAboveGround",void 0);export{H as HUDMaterialTechnique,G as HUDMaterialTechniqueConfiguration};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import{ShaderOutput as r}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniformsWithOrigin as i}from"../core/shaderLibrary/Slice.glsl.js";import{bindVerticalOffsetUniforms as t}from"../core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{HUDSpace as o,bindHUDUniforms as s}from"../core/shaderLibrary/hud/HUD.glsl.js";import{bindOutputHighlight as a}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassGeometryTexture as n}from"../core/shaderLibrary/shading/MultipassGeometryTest.glsl.js";import{bindMultipassTerrainTexture as l}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{bindVisualVariablesUniforms as p}from"../core/shaderLibrary/shading/VisualVariables.glsl.js";import{bindScreenSizePerspectiveUniforms as d}from"../core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import{bindProjectionMatrix as c,bindViewport as u,bindView as h,bindCameraPosition as m}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as g}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as b}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as f,ShaderTechniqueConfiguration as v}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TransparencyPassType as y}from"../lib/basicInterfaces.js";import{Default3D as E}from"../lib/DefaultVertexAttributeLocations.js";import{oitBlending as T}from"../lib/OrderIndependentTransparency.js";import{Program as O}from"../lib/Program.js";import{b as S,H as P}from"../../../../chunks/HUDMaterial.glsl.js";import{BlendFactor as j,CompareFunction as x,PrimitiveType as L}from"../../../webgl/enums.js";import{simpleBlendingParams as U,defaultDepthWriteParams as w,makePipelineState as D,defaultColorWriteParams as C}from"../../../webgl/renderState.js";class H extends b{initializeProgram(e){const r=H.shader.get(),i=this.configuration,t=r.build({output:i.output,FrontFacePass:i.transparencyPassType===y.FrontFace,viewingMode:e.viewingMode,occlusionTestEnabled:i.occlusionTestEnabled,signedDistanceFieldEnabled:i.sdf,slicePlaneEnabled:i.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!0,debugDrawLabelBorder:i.debugDrawLabelBorder,binaryHighlightOcclusionEnabled:i.binaryHighlightOcclusion,screenCenterOffsetUnitsEnabled:i.screenCenterOffsetUnitsEnabled,screenSizePerspectiveEnabled:i.screenSizePerspective,verticalOffsetEnabled:i.verticalOffset,pixelSnappingEnabled:i.pixelSnappingEnabled,vvSize:i.vvSize,vvColor:i.vvColor,vvInstancingEnabled:!1,isDraped:i.isDraped,multipassGeometryEnabled:i.multipassGeometryEnabled,multipassTerrainEnabled:i.multipassTerrainEnabled,cullAboveGround:i.cullAboveGround});return new O(e.rctx,t,E)}bindPass(e,i){c(this.program,i.camera.projectionMatrix),this.program.setUniform1f("cameraGroundRelative",i.camera.aboveGround?1:-1),this.program.setUniform1f("perDistancePixelRatio",Math.tan(i.camera.fovY/2)/(i.camera.fullViewport[2]/2)),this.program.setUniformMatrix4fv("viewNormal",i.camera.viewInverseTransposeMatrix),this.program.setUniform1f("polygonOffset",e.shaderPolygonOffset),t(this.program,e,i),d(this.program,e),this.program.setUniform1f("pixelRatio",i.camera.pixelRatio||1),u(this.program,i),this.configuration.output===r.Occlusion?(this.program.setUniform2fv("cameraNearFar",i.camera.nearFar),this.program.setUniform2fv("inverseViewport",i.inverseViewport),n(this.program,i),l(this.program,i)):(s(this.program,i),S(this.program,e,i.camera.pixelRatio||1),p(this.program,e),this.configuration.occlusionTestEnabled&&this.program.bindTexture(i.hudVisibilityTexture,"hudVisibilityTexture")),this.configuration.output===r.Highlight&&a(this.program,i)}bindDraw(e){h(this.program,e),m(this.program,e.origin,e.camera.viewInverseTransposeMatrix),i(this.program,this.configuration,e),this.program.rebindTextures()}_setPipelineState(e){const i=this.configuration,t=e===y.NONE,o=e===y.FrontFace,s=x.LEQUAL,a=this.configuration.polygonOffsetEnabled&&N,n=(t||o)&&i.output!==r.Highlight?(i.depthEnabled||i.output===r.Occlusion)&&w:null;return D({blending:i.output===r.Color||i.output===r.Alpha||i.output===r.Highlight?t?M:T(e):null,depthTest:{func:s},depthWrite:n,colorWrite:C,polygonOffset:a})}initializePipeline(){return this._setPipelineState(this.configuration.transparencyPassType)}get primitiveType(){return this.configuration.output===r.Occlusion?L.POINTS:L.TRIANGLES}}H.shader=new g(P,(()=>import("./HUDMaterial.glsl.js")));const N={factor:0,units:-4},M=U(j.ONE,j.ONE_MINUS_SRC_ALPHA);class G extends v{constructor(){super(...arguments),this.output=r.Color,this.occlusionTestEnabled=!0,this.sdf=!1,this.vvSize=!1,this.vvColor=!1,this.verticalOffset=!1,this.screenSizePerspective=!1,this.screenCenterOffsetUnitsEnabled=o.World,this.debugDrawLabelBorder=!1,this.binaryHighlightOcclusion=!0,this.slicePlaneEnabled=!1,this.polygonOffsetEnabled=!1,this.depthEnabled=!0,this.transparencyPassType=y.NONE,this.pixelSnappingEnabled=!0,this.isDraped=!1,this.multipassGeometryEnabled=!1,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}e([f({count:r.COUNT})],G.prototype,"output",void 0),e([f()],G.prototype,"occlusionTestEnabled",void 0),e([f()],G.prototype,"sdf",void 0),e([f()],G.prototype,"vvSize",void 0),e([f()],G.prototype,"vvColor",void 0),e([f()],G.prototype,"verticalOffset",void 0),e([f()],G.prototype,"screenSizePerspective",void 0),e([f({count:o.COUNT})],G.prototype,"screenCenterOffsetUnitsEnabled",void 0),e([f()],G.prototype,"debugDrawLabelBorder",void 0),e([f()],G.prototype,"binaryHighlightOcclusion",void 0),e([f()],G.prototype,"slicePlaneEnabled",void 0),e([f()],G.prototype,"polygonOffsetEnabled",void 0),e([f()],G.prototype,"depthEnabled",void 0),e([f({count:y.COUNT})],G.prototype,"transparencyPassType",void 0),e([f()],G.prototype,"pixelSnappingEnabled",void 0),e([f()],G.prototype,"isDraped",void 0),e([f()],G.prototype,"multipassGeometryEnabled",void 0),e([f()],G.prototype,"multipassTerrainEnabled",void 0),e([f()],G.prototype,"cullAboveGround",void 0);export{H as HUDMaterialTechnique,G as HUDMaterialTechniqueConfiguration};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{NormalAttribute as e}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as r}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{R as i}from"../../../../chunks/RealisticTree.glsl.js";import{Normals as s}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as t}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{doublePrecisionRequiresObfuscation as o}from"../core/shaderLibrary/util/DoublePrecision.glsl.js";import{ReloadableShaderModule as a}from"../core/shaderTechnique/ReloadableShaderModule.js";import{TransparencyPassType as l}from"../lib/basicInterfaces.js";import{Default3D as n}from"../lib/DefaultVertexAttributeLocations.js";import{Program as c}from"../lib/Program.js";import{DefaultMaterialTechnique as d}from"./DefaultMaterialTechnique.js";class u extends d{initializeProgram(i){const a=u.shader.get(),d=this.configuration,b=a.build({OITEnabled:d.transparencyPassType===l.Color,output:d.output,viewingMode:i.viewingMode,receiveShadows:d.receiveShadows,slicePlaneEnabled:d.slicePlaneEnabled,sliceHighlightDisabled:d.sliceHighlightDisabled,sliceEnabledForVertexPrograms:!1,symbolColor:d.symbolColors,vvSize:d.vvSize,vvColor:d.vvColor,vvInstancingEnabled:!0,instanced:d.instanced,instancedColor:d.instancedColor,instancedDoublePrecision:d.instancedDoublePrecision,pbrMode:d.usePBR?t.Normal:t.Disabled,hasMetalnessAndRoughnessTexture:!1,hasEmissionTexture:!1,hasOcclusionTexture:!1,hasNormalTexture:!1,hasColorTexture:d.hasColorTexture,receiveAmbientOcclusion:d.receiveAmbientOcclusion,useCustomDTRExponentForWater:!1,normalType:e.Type.Attribute,doubleSidedMode:s.DoubleSidedMode.WindingOrder,vertexTangents:!1,attributeTextureCoordinates:d.hasColorTexture?r.AttributeType.Default:r.AttributeType.None,textureAlphaPremultiplied:d.textureAlphaPremultiplied,attributeColor:d.vertexColors,screenSizePerspectiveEnabled:d.screenSizePerspective,verticalOffsetEnabled:d.verticalOffset,offsetBackfaces:d.offsetBackfaces,doublePrecisionRequiresObfuscation:o(i.rctx),alphaDiscardMode:d.alphaDiscardMode,supportsTextureAtlas:!1,multipassTerrainEnabled:d.multipassTerrainEnabled,cullAboveGround:d.cullAboveGround});return new c(i.rctx,b,n)}}u.shader=new a(i,(()=>import("../core/shaderLibrary/default/RealisticTree.glsl.js")));export{u as RealisticTreeTechnique};
5
+ import{NormalAttribute as e}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as r}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{R as i}from"../../../../chunks/RealisticTree.glsl.js";import{Normals as s}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as t}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{doublePrecisionRequiresObfuscation as o}from"../core/shaderLibrary/util/DoublePrecision.glsl.js";import{ReloadableShaderModule as a}from"../core/shaderTechnique/ReloadableShaderModule.js";import{TransparencyPassType as l}from"../lib/basicInterfaces.js";import{Default3D as n}from"../lib/DefaultVertexAttributeLocations.js";import{Program as d}from"../lib/Program.js";import{DefaultMaterialTechnique as c}from"./DefaultMaterialTechnique.js";class u extends c{initializeProgram(i){const a=u.shader.get(),c=this.configuration,b=a.build({OITEnabled:c.transparencyPassType===l.Color,output:c.output,viewingMode:i.viewingMode,receiveShadows:c.receiveShadows,slicePlaneEnabled:c.slicePlaneEnabled,sliceHighlightDisabled:c.sliceHighlightDisabled,sliceEnabledForVertexPrograms:!1,symbolColor:c.symbolColors,vvSize:c.vvSize,vvColor:c.vvColor,vvInstancingEnabled:!0,instanced:c.instanced,instancedColor:c.instancedColor,instancedDoublePrecision:c.instancedDoublePrecision,pbrMode:c.usePBR?t.Normal:t.Disabled,hasMetalnessAndRoughnessTexture:!1,hasEmissionTexture:!1,hasOcclusionTexture:!1,hasNormalTexture:!1,hasColorTexture:c.hasColorTexture,hasModelTransformation:!1,receiveAmbientOcclusion:c.receiveAmbientOcclusion,useCustomDTRExponentForWater:!1,normalType:e.Type.Attribute,doubleSidedMode:s.DoubleSidedMode.WindingOrder,vertexTangents:!1,attributeTextureCoordinates:c.hasColorTexture?r.AttributeType.Default:r.AttributeType.None,textureAlphaPremultiplied:c.textureAlphaPremultiplied,attributeColor:c.vertexColors,screenSizePerspectiveEnabled:c.screenSizePerspective,verticalOffsetEnabled:c.verticalOffset,offsetBackfaces:c.offsetBackfaces,doublePrecisionRequiresObfuscation:o(i.rctx),alphaDiscardMode:c.alphaDiscardMode,supportsTextureAtlas:!1,multipassTerrainEnabled:c.multipassTerrainEnabled,cullAboveGround:c.cullAboveGround});return new d(i.rctx,b,n)}}u.shader=new a(i,(()=>import("../core/shaderLibrary/default/RealisticTree.glsl.js")));export{u as RealisticTreeTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import{isSome as i,unwrap as t,unwrapOr as r}from"../../../../core/maybe.js";import{ShaderOutput as o}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniformsWithOrigin as s}from"../core/shaderLibrary/Slice.glsl.js";import{bindOutputHighlight as n}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassTerrainTexture as p}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{bindVisualVariablesUniformsWithOpacity as l}from"../core/shaderLibrary/shading/VisualVariables.glsl.js";import{bindProjectionMatrix as a,bindView as d,bindCameraPosition as c}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as h}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as f}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as u,ShaderTechniqueConfiguration as m}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{VertexAttribute as g,TransparencyPassType as T}from"../lib/basicInterfaces.js";import{blendingDefault as b,oitBlending as v,oitDepthTest as y,oitDepthWrite as E,OITPolygonOffset as P}from"../lib/OrderIndependentTransparency.js";import{Program as O}from"../lib/Program.js";import{RenderSlot as S}from"../lib/RenderSlot.js";import{stencilWriteMaskOn as C,stencilToolMaskBaseParams as R,stencilBaseAllZerosParams as U,depthCompareAlways as x,stencilToolTransparentOccluderParams as W,stencilWriteMaskOff as w,stencilToolMaskOccluderParams as j,depthCompareLess as A}from"../lib/StencilUtils.js";import{C as I,R as L}from"../../../../chunks/RibbonLine.glsl.js";import{PrimitiveType as N}from"../../../webgl/enums.js";import{makePipelineState as _,defaultDepthWriteParams as z,defaultColorWriteParams as D}from"../../../webgl/renderState.js";const F=new Map([[g.POSITION,0],[g.SUBDIVISIONFACTOR,1],[g.UV0,2],[g.AUXPOS1,3],[g.AUXPOS2,4],[g.SIZE,6],[g.SIZEFEATUREATTRIBUTE,6],[g.COLOR,5],[g.COLORFEATUREATTRIBUTE,5],[g.OPACITYFEATUREATTRIBUTE,7]]);class V extends f{constructor(e,i,t){super(e,i,t),this.stippleTextureRepository=e.stippleTextureRepository}get stippleEnabled(){return this.configuration.stippleEnabled&&this.configuration.output!==o.Highlight}initializeProgram(e){const i=V.shader.get(),t=this.configuration,r=i.build({OITEnabled:t.transparencyPassType===T.Color,output:t.output,slicePlaneEnabled:t.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,draped:t.draped,stippleEnabled:this.stippleEnabled,stippleOffColorEnabled:t.stippleOffColorEnabled,stippleRequiresClamp:!0,stippleScaleWithLineWidth:t.stippleScaleWithLineWidth,stipplePreferContinuous:t.stipplePreferContinuous,capType:t.capType,roundJoins:t.roundJoins,vvColor:t.vvColor,vvSize:t.vvSize,vvInstancingEnabled:!0,vvOpacity:t.vvOpacity,falloffEnabled:t.falloffEnabled,innerColorEnabled:t.innerColorEnabled,multipassTerrainEnabled:t.multipassTerrainEnabled,cullAboveGround:t.cullAboveGround,wireframe:t.wireframe});return new O(e.rctx,r,F)}dispose(){super.dispose(),this.stippleTextureRepository.release(this.stipplePattern),this.stipplePattern=null,this.stippleTextureBind=null}bindPass(e,s){if(a(this.program,s.camera.projectionMatrix),this.configuration.output===o.Highlight&&n(this.program,s),s.multipassTerrainEnabled&&(this.program.setUniform2fv("inverseViewport",s.inverseViewport),p(this.program,s)),this.program.setUniform1f("intrinsicWidth",e.width),this.program.setUniform4fv("intrinsicColor",e.color),this.program.setUniform1f("miterLimit","miter"!==e.join?0:e.miterLimit),this.program.setUniform2fv("cameraNearFar",s.camera.nearFar),this.program.setUniform1f("pixelRatio",s.camera.pixelRatio),this.program.setUniform2f("screenSize",s.camera.fullViewport[2],s.camera.fullViewport[3]),l(this.program,e),this.stipplePattern!==e.stipplePattern){const i=e.stipplePattern;this.stippleTextureBind=this.stippleTextureRepository.swap(this.stipplePattern,i),this.stipplePattern=i}if(this.stippleEnabled){const{pixelSize:r,sdfNormalizer:o,pixels:n}=i(this.stippleTextureBind)?this.stippleTextureBind(this.program):{pixelSize:1,sdfNormalizer:1,pixels:1};if(this.program.setUniform1f("stipplePatternSDFNormalizer",o),this.program.setUniform1f("stipplePatternTextureSize",n),this.program.setUniform1f("stipplePatternPixelSize",r),this.program.setUniform1f("stipplePatternPixelSizeInv",1/r),this.configuration.draped?this.program.setUniform1f("worldToScreenRatio",1/s.screenToPCSRatio):this.program.setUniform1f("worldToScreenPerDistanceRatio",1/s.camera.perScreenPixelRatio),this.configuration.stippleOffColorEnabled){const i=t(e.stippleOffColor);this.program.setUniform4f("stippleOffColor",i[0],i[1],i[2],i.length>3?i[3]:1)}}this.configuration.falloffEnabled&&this.program.setUniform1f("falloff",e.falloff),this.configuration.innerColorEnabled&&(this.program.setUniform4fv("innerColor",r(e.innerColor,e.color)),this.program.setUniform1f("innerWidth",e.innerWidth*s.camera.pixelRatio))}bindDraw(e){d(this.program,e),this.stippleEnabled&&!this.configuration.draped&&c(this.program,e.origin,e.camera.viewInverseTransposeMatrix),s(this.program,this.configuration,e),this.program.rebindTextures()}_makePipelineState(e,i){const t=this.configuration,r=e===T.NONE,s=e===T.FrontFace;return _({blending:t.output===o.Color||t.output===o.Alpha?r?b:v(e):null,depthTest:{func:y(e)},depthWrite:r?!t.transparent&&t.writeDepth&&z:E(e),colorWrite:D,stencilWrite:t.sceneHasOcludees?C:null,stencilTest:t.sceneHasOcludees?i?R:U:null,polygonOffset:r||s?t.polygonOffset&&B:P})}initializePipeline(){const e=this.configuration,i=e.polygonOffset&&B;return e.occluder&&(this._occluderPipelineTransparent=_({blending:b,polygonOffset:i,depthTest:x,depthWrite:null,colorWrite:D,stencilWrite:null,stencilTest:W}),this._occluderPipelineOpaque=_({blending:b,polygonOffset:i,depthTest:x,depthWrite:null,colorWrite:D,stencilWrite:w,stencilTest:j}),this._occluderPipelineMaskWrite=_({blending:null,polygonOffset:i,depthTest:A,depthWrite:null,colorWrite:null,stencilWrite:C,stencilTest:R})),this._occludeePipelineState=this._makePipelineState(this.configuration.transparencyPassType,!0),this._makePipelineState(this.configuration.transparencyPassType,!1)}get primitiveType(){return this.configuration.wireframe?N.LINES:N.TRIANGLE_STRIP}getPipelineState(e,i){return i?this._occludeePipelineState:this.configuration.occluder?e===S.TRANSPARENT_OCCLUDER_MATERIAL?this._occluderPipelineTransparent:e===S.OCCLUDER_MATERIAL?this._occluderPipelineOpaque:this._occluderPipelineMaskWrite:super.getPipelineState(e,i)}}V.shader=new h(L,(()=>import("./RibbonLine.glsl.js")));const B={factor:0,units:-4};class M extends m{constructor(){super(...arguments),this.output=o.Color,this.occluder=!1,this.slicePlaneEnabled=!1,this.transparent=!1,this.polygonOffset=!1,this.writeDepth=!1,this.draped=!1,this.stippleEnabled=!1,this.stippleOffColorEnabled=!1,this.stippleScaleWithLineWidth=!1,this.stipplePreferContinuous=!0,this.capType=I.BUTT,this.roundJoins=!1,this.vvSize=!1,this.vvColor=!1,this.vvOpacity=!1,this.falloffEnabled=!1,this.innerColorEnabled=!1,this.sceneHasOcludees=!1,this.transparencyPassType=T.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1,this.wireframe=!1}}e([u({count:o.COUNT})],M.prototype,"output",void 0),e([u()],M.prototype,"occluder",void 0),e([u()],M.prototype,"slicePlaneEnabled",void 0),e([u()],M.prototype,"transparent",void 0),e([u()],M.prototype,"polygonOffset",void 0),e([u()],M.prototype,"writeDepth",void 0),e([u()],M.prototype,"draped",void 0),e([u()],M.prototype,"stippleEnabled",void 0),e([u()],M.prototype,"stippleOffColorEnabled",void 0),e([u()],M.prototype,"stippleScaleWithLineWidth",void 0),e([u()],M.prototype,"stipplePreferContinuous",void 0),e([u({count:I.COUNT})],M.prototype,"capType",void 0),e([u()],M.prototype,"roundJoins",void 0),e([u()],M.prototype,"vvSize",void 0),e([u()],M.prototype,"vvColor",void 0),e([u()],M.prototype,"vvOpacity",void 0),e([u()],M.prototype,"falloffEnabled",void 0),e([u()],M.prototype,"innerColorEnabled",void 0),e([u()],M.prototype,"sceneHasOcludees",void 0),e([u({count:T.COUNT})],M.prototype,"transparencyPassType",void 0),e([u()],M.prototype,"multipassTerrainEnabled",void 0),e([u()],M.prototype,"cullAboveGround",void 0),e([u()],M.prototype,"wireframe",void 0);export{V as RibbonLineTechnique,M as RibbonLineTechniqueConfiguration,F as ribbonVertexAttributeLocations};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import{isSome as i,unwrap as t,unwrapOr as r}from"../../../../core/maybe.js";import{ShaderOutput as o}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniformsWithOrigin as s}from"../core/shaderLibrary/Slice.glsl.js";import{bindOutputHighlight as n}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassTerrainTexture as p}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{bindVisualVariablesUniformsWithOpacity as l}from"../core/shaderLibrary/shading/VisualVariables.glsl.js";import{bindProjectionMatrix as a,bindView as d,bindCameraPosition as c}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as h}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as f}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as u,ShaderTechniqueConfiguration as m}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{VertexAttribute as g,TransparencyPassType as T}from"../lib/basicInterfaces.js";import{blendingDefault as b,oitBlending as v,oitDepthTest as y,oitDepthWrite as E,OITPolygonOffset as P}from"../lib/OrderIndependentTransparency.js";import{Program as O}from"../lib/Program.js";import{RenderSlot as S}from"../lib/RenderSlot.js";import{stencilWriteMaskOn as C,stencilToolMaskBaseParams as R,stencilBaseAllZerosParams as U,depthCompareAlways as x,stencilToolTransparentOccluderParams as W,stencilWriteMaskOff as w,stencilToolMaskOccluderParams as j,depthCompareLess as A}from"../lib/StencilUtils.js";import{C as I,R as L}from"../../../../chunks/RibbonLine.glsl.js";import{PrimitiveType as N}from"../../../webgl/enums.js";import{makePipelineState as _,defaultDepthWriteParams as z,defaultColorWriteParams as D}from"../../../webgl/renderState.js";const F=new Map([[g.POSITION,0],[g.SUBDIVISIONFACTOR,1],[g.UV0,2],[g.AUXPOS1,3],[g.AUXPOS2,4],[g.SIZE,6],[g.SIZEFEATUREATTRIBUTE,6],[g.COLOR,5],[g.COLORFEATUREATTRIBUTE,5],[g.OPACITYFEATUREATTRIBUTE,7]]);class V extends f{constructor(e,i,t){super(e,i,t),this.stippleTextureRepository=e.stippleTextureRepository}get stippleEnabled(){return this.configuration.stippleEnabled&&this.configuration.output!==o.Highlight}initializeProgram(e){const i=V.shader.get(),t=this.configuration,r=i.build({OITEnabled:t.transparencyPassType===T.Color,output:t.output,slicePlaneEnabled:t.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,draped:t.draped,stippleEnabled:this.stippleEnabled,stippleOffColorEnabled:t.stippleOffColorEnabled,stippleRequiresClamp:!0,stippleScaleWithLineWidth:t.stippleScaleWithLineWidth,stipplePreferContinuous:t.stipplePreferContinuous,capType:t.capType,roundJoins:t.roundJoins,vvColor:t.vvColor,vvSize:t.vvSize,vvInstancingEnabled:!0,vvOpacity:t.vvOpacity,falloffEnabled:t.falloffEnabled,innerColorEnabled:t.innerColorEnabled,multipassTerrainEnabled:t.multipassTerrainEnabled,cullAboveGround:t.cullAboveGround,wireframe:t.wireframe});return new O(e.rctx,r,F)}dispose(){super.dispose(),this.stippleTextureRepository.release(this.stipplePattern),this.stipplePattern=null,this.stippleTextureBind=null}bindPass(e,s){if(a(this.program,s.camera.projectionMatrix),this.configuration.output===o.Highlight&&n(this.program,s),s.multipassTerrainEnabled&&(this.program.setUniform2fv("inverseViewport",s.inverseViewport),p(this.program,s)),this.program.setUniform1f("intrinsicWidth",e.width),this.program.setUniform4fv("intrinsicColor",e.color),this.program.setUniform1f("miterLimit","miter"!==e.join?0:e.miterLimit),this.program.setUniform2fv("cameraNearFar",s.camera.nearFar),this.program.setUniform1f("pixelRatio",s.camera.pixelRatio),this.program.setUniform2f("screenSize",s.camera.fullViewport[2],s.camera.fullViewport[3]),l(this.program,e),this.stipplePattern!==e.stipplePattern){const i=e.stipplePattern;this.stippleTextureBind=this.stippleTextureRepository.swap(this.stipplePattern,i),this.stipplePattern=i}if(this.stippleEnabled){const{pixelSize:r,sdfNormalizer:o,pixels:n}=i(this.stippleTextureBind)?this.stippleTextureBind(this.program):{pixelSize:1,sdfNormalizer:1,pixels:1};if(this.program.setUniform1f("stipplePatternSDFNormalizer",o),this.program.setUniform1f("stipplePatternTextureSize",n),this.program.setUniform1f("stipplePatternPixelSize",r),this.program.setUniform1f("stipplePatternPixelSizeInv",1/r),this.configuration.draped?this.program.setUniform1f("worldToScreenRatio",1/s.screenToPCSRatio):this.program.setUniform1f("worldToScreenPerDistanceRatio",1/s.camera.perScreenPixelRatio),this.configuration.stippleOffColorEnabled){const i=t(e.stippleOffColor);this.program.setUniform4f("stippleOffColor",i[0],i[1],i[2],i.length>3?i[3]:1)}}this.configuration.falloffEnabled&&this.program.setUniform1f("falloff",e.falloff),this.configuration.innerColorEnabled&&(this.program.setUniform4fv("innerColor",r(e.innerColor,e.color)),this.program.setUniform1f("innerWidth",e.innerWidth*s.camera.pixelRatio))}bindDraw(e){d(this.program,e),this.stippleEnabled&&!this.configuration.draped&&c(this.program,e.origin,e.camera.viewInverseTransposeMatrix),s(this.program,this.configuration,e),this.program.rebindTextures()}_makePipelineState(e,i){const t=this.configuration,r=e===T.NONE,s=e===T.FrontFace;return _({blending:t.output===o.Color||t.output===o.Alpha?r?b:v(e):null,depthTest:{func:y(e)},depthWrite:r?t.writeDepth&&z:E(e),colorWrite:D,stencilWrite:t.sceneHasOcludees?C:null,stencilTest:t.sceneHasOcludees?i?R:U:null,polygonOffset:r||s?t.polygonOffset&&B:P})}initializePipeline(){const e=this.configuration,i=e.polygonOffset&&B;return e.occluder&&(this._occluderPipelineTransparent=_({blending:b,polygonOffset:i,depthTest:x,depthWrite:null,colorWrite:D,stencilWrite:null,stencilTest:W}),this._occluderPipelineOpaque=_({blending:b,polygonOffset:i,depthTest:x,depthWrite:null,colorWrite:D,stencilWrite:w,stencilTest:j}),this._occluderPipelineMaskWrite=_({blending:null,polygonOffset:i,depthTest:A,depthWrite:null,colorWrite:null,stencilWrite:C,stencilTest:R})),this._occludeePipelineState=this._makePipelineState(this.configuration.transparencyPassType,!0),this._makePipelineState(this.configuration.transparencyPassType,!1)}get primitiveType(){return this.configuration.wireframe?N.LINES:N.TRIANGLE_STRIP}getPipelineState(e,i){return i?this._occludeePipelineState:this.configuration.occluder?e===S.TRANSPARENT_OCCLUDER_MATERIAL?this._occluderPipelineTransparent:e===S.OCCLUDER_MATERIAL?this._occluderPipelineOpaque:this._occluderPipelineMaskWrite:super.getPipelineState(e,i)}}V.shader=new h(L,(()=>import("./RibbonLine.glsl.js")));const B={factor:0,units:-4};class M extends m{constructor(){super(...arguments),this.output=o.Color,this.occluder=!1,this.slicePlaneEnabled=!1,this.transparent=!1,this.polygonOffset=!1,this.writeDepth=!1,this.draped=!1,this.stippleEnabled=!1,this.stippleOffColorEnabled=!1,this.stippleScaleWithLineWidth=!1,this.stipplePreferContinuous=!0,this.capType=I.BUTT,this.roundJoins=!1,this.vvSize=!1,this.vvColor=!1,this.vvOpacity=!1,this.falloffEnabled=!1,this.innerColorEnabled=!1,this.sceneHasOcludees=!1,this.transparencyPassType=T.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1,this.wireframe=!1}}e([u({count:o.COUNT})],M.prototype,"output",void 0),e([u()],M.prototype,"occluder",void 0),e([u()],M.prototype,"slicePlaneEnabled",void 0),e([u()],M.prototype,"transparent",void 0),e([u()],M.prototype,"polygonOffset",void 0),e([u()],M.prototype,"writeDepth",void 0),e([u()],M.prototype,"draped",void 0),e([u()],M.prototype,"stippleEnabled",void 0),e([u()],M.prototype,"stippleOffColorEnabled",void 0),e([u()],M.prototype,"stippleScaleWithLineWidth",void 0),e([u()],M.prototype,"stipplePreferContinuous",void 0),e([u({count:I.COUNT})],M.prototype,"capType",void 0),e([u()],M.prototype,"roundJoins",void 0),e([u()],M.prototype,"vvSize",void 0),e([u()],M.prototype,"vvColor",void 0),e([u()],M.prototype,"vvOpacity",void 0),e([u()],M.prototype,"falloffEnabled",void 0),e([u()],M.prototype,"innerColorEnabled",void 0),e([u()],M.prototype,"sceneHasOcludees",void 0),e([u({count:T.COUNT})],M.prototype,"transparencyPassType",void 0),e([u()],M.prototype,"multipassTerrainEnabled",void 0),e([u()],M.prototype,"cullAboveGround",void 0),e([u()],M.prototype,"wireframe",void 0);export{V as RibbonLineTechnique,M as RibbonLineTechniqueConfiguration,F as ribbonVertexAttributeLocations};