@arcgis/core 5.1.0-next.65 → 5.1.0-next.66

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 (481) hide show
  1. package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +11 -1
  2. package/applications/KnowledgeStudio/generalSdkInternalAccess.js +1 -1
  3. package/applications/WebEditor/drawToolZSnapping.d.ts +17 -0
  4. package/applications/WebEditor/drawToolZSnapping.js +2 -0
  5. package/arcade/Dictionary.js +1 -1
  6. package/arcade/Feature.js +1 -1
  7. package/arcade/Pixel.js +1 -1
  8. package/arcade/Voxel.js +1 -1
  9. package/assets/esri/core/workers/RemoteClient.js +1 -1
  10. package/assets/esri/core/workers/chunks/01be1315c60810651783.js +1 -0
  11. package/assets/esri/core/workers/chunks/02e8fc598ee09cf1b678.js +1 -0
  12. package/assets/esri/core/workers/chunks/0d650b0d090a425c9c18.js +1 -0
  13. package/assets/esri/core/workers/chunks/0e90e9ea1ad587eb3495.js +1 -0
  14. package/assets/esri/core/workers/chunks/0f196ec93925dfefc69a.js +1 -0
  15. package/assets/esri/core/workers/chunks/12294f8c32c34788b6de.js +1 -0
  16. package/assets/esri/core/workers/chunks/13a8346abe5509167578.js +1 -0
  17. package/assets/esri/core/workers/chunks/1515824f11ef5ab95378.js +1 -0
  18. package/assets/esri/core/workers/chunks/151c2766a4cacc6adbd6.js +1 -0
  19. package/assets/esri/core/workers/chunks/155f57fe9886ef322e2a.js +1 -0
  20. package/assets/esri/core/workers/chunks/170f4d83555d238e365b.js +1 -0
  21. package/assets/esri/core/workers/chunks/171cca726a763c770469.js +1 -0
  22. package/assets/esri/core/workers/chunks/17445fd8048966617d49.js +1 -0
  23. package/assets/esri/core/workers/chunks/1761dc5799850ca7b66c.js +1 -0
  24. package/assets/esri/core/workers/chunks/17d54e77001ccb48a258.js +1 -0
  25. package/assets/esri/core/workers/chunks/19afacc9a741038e4bfb.js +1 -0
  26. package/assets/esri/core/workers/chunks/1d8777266fb1c5cfca55.js +1 -0
  27. package/assets/esri/core/workers/chunks/1f16bc8c02d8c4b2f693.js +1 -0
  28. package/assets/esri/core/workers/chunks/1f76c06af4682c85bc21.js +1 -0
  29. package/assets/esri/core/workers/chunks/{9eef3cd5f519c8ae88c0.js → 205e957ffd7e95f530f7.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{fa6e1ad099b43a6f5501.js → 21a8e2a11ffacc226e2b.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{811b378fa5bf8a4d3d66.js → 224461c1d9755966d0b6.js} +1 -1
  32. package/assets/esri/core/workers/chunks/27262083d37fe623ca9c.js +1 -0
  33. package/assets/esri/core/workers/chunks/2a3145a595d19391bb8a.js +1 -0
  34. package/assets/esri/core/workers/chunks/2a65bbe6c63c384cbf5f.js +1 -0
  35. package/assets/esri/core/workers/chunks/2fa69ca3ba8c442dd7d6.js +1 -0
  36. package/assets/esri/core/workers/chunks/314140e2e9b813191907.js +1 -0
  37. package/assets/esri/core/workers/chunks/32e22d6eee9fed1f70b0.js +1 -0
  38. package/assets/esri/core/workers/chunks/{af40e2e6eaf3d2226812.js → 3464a38e758c687a28d4.js} +1 -1
  39. package/assets/esri/core/workers/chunks/38816f95e801f1c5bbad.js +1 -0
  40. package/assets/esri/core/workers/chunks/3f8e8f83ebda07d29ca8.js +1 -0
  41. package/assets/esri/core/workers/chunks/41396724040180d2537f.js +1 -0
  42. package/assets/esri/core/workers/chunks/{66baacbef23291eab853.js → 413d2fa54508e6f42c74.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{32e9e92bbbd000fbbaf7.js → 4141a3a93732996601e8.js} +2 -2
  44. package/assets/esri/core/workers/chunks/41e59d75ccb51a238739.js +1 -0
  45. package/assets/esri/core/workers/chunks/44016e1176629c36bc11.js +1 -0
  46. package/assets/esri/core/workers/chunks/468c70e5fdb61dfaad80.js +1 -0
  47. package/assets/esri/core/workers/chunks/4d069a0ebadb9c53b550.js +1 -0
  48. package/assets/esri/core/workers/chunks/4e7b084f7104deea1ddb.js +1 -0
  49. package/assets/esri/core/workers/chunks/{9c72127de7afcbaafbaf.js → 51852ef71ac04954fdae.js} +1 -1
  50. package/assets/esri/core/workers/chunks/549a51dedcc49f366e53.js +1 -0
  51. package/assets/esri/core/workers/chunks/{42e084704dea6e4135b6.js → 54c0306082d30d59cba2.js} +1 -1
  52. package/assets/esri/core/workers/chunks/56036327e721f9c42b33.js +1 -0
  53. package/assets/esri/core/workers/chunks/57cdd5d4ae073d5ca725.js +1 -0
  54. package/assets/esri/core/workers/chunks/5b9257c5359fa05f4f28.js +1 -0
  55. package/assets/esri/core/workers/chunks/5d574079f0e96e883aab.js +1 -0
  56. package/assets/esri/core/workers/chunks/5d967bcf71c05ddb1ab6.js +1 -0
  57. package/assets/esri/core/workers/chunks/5fccb372b4d5ee2f64cc.js +1 -0
  58. package/assets/esri/core/workers/chunks/61778185d702da468b00.js +1 -0
  59. package/assets/esri/core/workers/chunks/61794a861a9209b72622.js +1 -0
  60. package/assets/esri/core/workers/chunks/61b49cdaf288f36f9288.js +1 -0
  61. package/assets/esri/core/workers/chunks/{8ea67b502f9355dab7e9.js → 621ea864e2774f160d1c.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{9d289cee96e7c7fe1029.js → 62a2da0ffc67f98445c1.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{254898b41cabe313b6ce.js → 62d96b012c2d6f601863.js} +1 -1
  64. package/assets/esri/core/workers/chunks/644dd906bee3ef465ec0.js +1 -0
  65. package/assets/esri/core/workers/chunks/66692d6edc1bd96645e2.js +1 -0
  66. package/assets/esri/core/workers/chunks/679086351352756b33c9.js +1 -0
  67. package/assets/esri/core/workers/chunks/681e97ebbf9c69c410c6.js +1 -0
  68. package/assets/esri/core/workers/chunks/69520cad347947b09f21.js +1 -0
  69. package/assets/esri/core/workers/chunks/{c86b15f6a18880f921cd.js → 6a567755b67c06d16f21.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{fdf4c1f202cfddf0f226.js → 6d11ec355e5474b2968b.js} +1 -1
  71. package/assets/esri/core/workers/chunks/6e7bb6d3e739527116a4.js +1 -0
  72. package/assets/esri/core/workers/chunks/751f3cfb000045ac78bb.js +1 -0
  73. package/assets/esri/core/workers/chunks/{64ad6130de549083caba.js → 789357e0f79823f145dd.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{b6d94cbd1c5adad2f247.js → 78fbfc03d9b827c3f767.js} +1 -1
  75. package/assets/esri/core/workers/chunks/79df97e3f5975b42dc4d.js +1 -0
  76. package/assets/esri/core/workers/chunks/{25e4568a3ff76f48ac5e.js → 7a56c836c89a8b978800.js} +1 -1
  77. package/assets/esri/core/workers/chunks/7e9b790fe01b89acdf6d.js +1 -0
  78. package/assets/esri/core/workers/chunks/7fb9a5bc22d7581f1d20.js +1 -0
  79. package/assets/esri/core/workers/chunks/{5c1abb46b9937a050c32.js → 7ffcd308087c35adda04.js} +1 -1
  80. package/assets/esri/core/workers/chunks/84eb889b9cce35dac2e5.js +1 -0
  81. package/assets/esri/core/workers/chunks/891d97d0da6361d63679.js +1 -0
  82. package/assets/esri/core/workers/chunks/8a0f254d45d00b293479.js +1 -0
  83. package/assets/esri/core/workers/chunks/8ede12f54b215c52cf3c.js +1 -0
  84. package/assets/esri/core/workers/chunks/8fed6becd107d2ed9bbd.js +1 -0
  85. package/assets/esri/core/workers/chunks/90cef6f96df7dc27db39.js +1 -0
  86. package/assets/esri/core/workers/chunks/921c30b7f4dfc3e018d9.js +1 -0
  87. package/assets/esri/core/workers/chunks/927773ed23b1fc245bf7.js +1 -0
  88. package/assets/esri/core/workers/chunks/{b056b4c79bcd542dd1d2.js → 9622a83b29acb768fcb5.js} +1 -1
  89. package/assets/esri/core/workers/chunks/97062996e1e4196cfa7c.js +1 -0
  90. package/assets/esri/core/workers/chunks/97210bcb5e3cf3ac961b.js +1 -0
  91. package/assets/esri/core/workers/chunks/{f550fc8c078ebd47d7a3.js → 97e15e66e55d9149fd48.js} +1 -1
  92. package/assets/esri/core/workers/chunks/9c819ebdc98ed8b6afcf.js +1 -0
  93. package/assets/esri/core/workers/chunks/9dfd00972c12a4adc15d.js +1 -0
  94. package/assets/esri/core/workers/chunks/9fab410b9fa668dc498b.js +1 -0
  95. package/assets/esri/core/workers/chunks/a118de5a163ae42bee60.js +1 -0
  96. package/assets/esri/core/workers/chunks/a4b6fdbc995be03d2afb.js +1 -0
  97. package/assets/esri/core/workers/chunks/a59db907ec1e31002100.js +1 -0
  98. package/assets/esri/core/workers/chunks/a5b395e518e4c5fc95d0.js +1414 -0
  99. package/assets/esri/core/workers/chunks/a5d9dbb1fef8c4465943.js +1 -0
  100. package/assets/esri/core/workers/chunks/{62c2757f5dc4aaca2df8.js → a73e8b80760dc88f926f.js} +1 -1
  101. package/assets/esri/core/workers/chunks/a96692514dcaa50340dd.js +1 -0
  102. package/assets/esri/core/workers/chunks/b4fb4484fa39eede1f62.js +1 -0
  103. package/assets/esri/core/workers/chunks/b50a42a9f96515beb929.js +1 -0
  104. package/assets/esri/core/workers/chunks/b8bf3e8b8b870f69f231.js +1 -0
  105. package/assets/esri/core/workers/chunks/b8e85b7d5eed6e7c79b5.js +1 -0
  106. package/assets/esri/core/workers/chunks/{fd629a3ab558adf52617.js → bc2c7cb99e227ddbd3a6.js} +1 -1
  107. package/assets/esri/core/workers/chunks/bc85bb82cfcbc216fa31.js +1 -0
  108. package/assets/esri/core/workers/chunks/{4eca871ca51a59f6540a.js → bcb8a25438c66815e37a.js} +1 -1
  109. package/assets/esri/core/workers/chunks/be1e4c3ec53fc92a26f1.js +1 -0
  110. package/assets/esri/core/workers/chunks/be4d13088a557b7de4b1.js +1 -0
  111. package/assets/esri/core/workers/chunks/bf758d57091fa534c1f8.js +1 -0
  112. package/assets/esri/core/workers/chunks/bfd516c37fb717e14d71.js +1 -0
  113. package/assets/esri/core/workers/chunks/c22945637a40355fbe61.js +1 -0
  114. package/assets/esri/core/workers/chunks/c25a58d9f94aaa96957d.js +1 -0
  115. package/assets/esri/core/workers/chunks/c4e936879c6cb25cf586.js +1 -0
  116. package/assets/esri/core/workers/chunks/c6a43f748dbf8bac4bb5.js +1 -0
  117. package/assets/esri/core/workers/chunks/cb9185ed31109781fe59.js +1 -0
  118. package/assets/esri/core/workers/chunks/d21fdd67477800101f3b.js +1 -0
  119. package/assets/esri/core/workers/chunks/d264aed5dbe09e34040f.js +1 -0
  120. package/assets/esri/core/workers/chunks/d315098b038a96084ff5.js +1 -0
  121. package/assets/esri/core/workers/chunks/d4465fd3319d0b6a26cc.js +1 -0
  122. package/assets/esri/core/workers/chunks/{13eb0162d95b4d27389c.js → d598d08dbf2796742e8c.js} +1 -1
  123. package/assets/esri/core/workers/chunks/d5c7ebfd5c2ca635a7a8.js +1 -0
  124. package/assets/esri/core/workers/chunks/{d4368e281c12fa7c17c5.js → d635f97b7b82a37482d6.js} +1 -1
  125. package/assets/esri/core/workers/chunks/d7b92bd9198dd3b27eb5.js +1 -0
  126. package/assets/esri/core/workers/chunks/d83ac66478a419e08af6.js +1 -0
  127. package/assets/esri/core/workers/chunks/d8dde0d1759e009b8373.js +1 -0
  128. package/assets/esri/core/workers/chunks/d94dfb2ce31e59b3306b.js +1 -0
  129. package/assets/esri/core/workers/chunks/{0f3b8a08f843a080af0d.js → deddf6ae4498a3d0d0e5.js} +1 -1
  130. package/assets/esri/core/workers/chunks/{45f1e682668cffc00b44.js → e0df7554b1679168663d.js} +1 -1
  131. package/assets/esri/core/workers/chunks/e0fcb5fa0e9f21fde2b6.js +1 -0
  132. package/assets/esri/core/workers/chunks/e305ced975d885c28e7e.js +1 -0
  133. package/assets/esri/core/workers/chunks/e3c60b7df2740e600066.js +1 -0
  134. package/assets/esri/core/workers/chunks/e611cd03eee4fae7c413.js +1 -0
  135. package/assets/esri/core/workers/chunks/e64a92b6f4075616f40f.js +1 -0
  136. package/assets/esri/core/workers/chunks/e78b442417f6a903b9b1.js +1 -0
  137. package/assets/esri/core/workers/chunks/{ba72989749543122a6fe.js → e9f2b573f482718306e6.js} +1 -1
  138. package/assets/esri/core/workers/chunks/ea6d3b7c7d720aa7bc94.js +1 -0
  139. package/assets/esri/core/workers/chunks/eab1b45ab5a802e29f8c.js +1 -0
  140. package/assets/esri/core/workers/chunks/eb7392799a01c2a8497a.js +1 -0
  141. package/assets/esri/core/workers/chunks/{c17c3453d014dc73fe0b.js → ef013a77950c1902de11.js} +1 -1
  142. package/assets/esri/core/workers/chunks/ef0fe4e1a9e960a74c60.js +1 -0
  143. package/assets/esri/core/workers/chunks/efbbcf467b2a27a92b85.js +1 -0
  144. package/assets/esri/core/workers/chunks/f201edf9b68717a6106d.js +1 -0
  145. package/assets/esri/core/workers/chunks/f43a63094190d2074cd0.js +1 -0
  146. package/assets/esri/core/workers/chunks/f59f1db572be1f19887f.js +1 -0
  147. package/assets/esri/core/workers/chunks/{dc07dc1cd30edc0c4193.js → f62e42659b406435573d.js} +1 -1
  148. package/assets/esri/core/workers/chunks/fa160a2a5dc9f5a7c34b.js +1 -0
  149. package/assets/esri/core/workers/chunks/fa7ae035472540999721.js +1 -0
  150. package/assets/esri/core/workers/chunks/fe3b42eadcdd9ba54f05.js +1 -0
  151. package/assets/esri/core/workers/chunks/fee31d9297648219375d.js +1 -0
  152. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ar.json +1 -1
  153. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_bg.json +1 -1
  154. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_bs.json +1 -1
  155. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ca.json +1 -1
  156. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_cs.json +1 -1
  157. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_da.json +1 -1
  158. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_de.json +1 -1
  159. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_el.json +1 -1
  160. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_es.json +1 -1
  161. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_et.json +1 -1
  162. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_fi.json +1 -1
  163. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_fr.json +1 -1
  164. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_he.json +1 -1
  165. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_hr.json +1 -1
  166. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_hu.json +1 -1
  167. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_id.json +1 -1
  168. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_it.json +1 -1
  169. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ja.json +1 -1
  170. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ko.json +1 -1
  171. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_lt.json +1 -1
  172. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_lv.json +1 -1
  173. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_nl.json +1 -1
  174. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_no.json +1 -1
  175. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pl.json +1 -1
  176. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pt-BR.json +1 -1
  177. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pt-PT.json +1 -1
  178. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ro.json +1 -1
  179. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ru.json +1 -1
  180. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sk.json +1 -1
  181. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sl.json +1 -1
  182. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sr.json +1 -1
  183. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sv.json +1 -1
  184. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_th.json +1 -1
  185. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_tr.json +1 -1
  186. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_uk.json +1 -1
  187. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_vi.json +1 -1
  188. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-CN.json +1 -1
  189. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-HK.json +1 -1
  190. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-TW.json +1 -1
  191. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  192. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  193. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  194. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  195. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  196. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  197. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  198. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  199. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  200. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  201. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  202. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  203. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  204. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  205. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  206. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  207. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  208. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  209. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  210. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  211. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  212. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  213. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
  214. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  215. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  216. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  217. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  218. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  219. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  220. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  221. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  222. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  223. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  224. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  225. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  226. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  227. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  228. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  229. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  230. package/chunks/ComponentShader.glsl.js +1 -1
  231. package/chunks/DefaultMaterial.glsl.js +1 -1
  232. package/chunks/GaussianSplat.glsl.js +14 -2
  233. package/chunks/OITDim.glsl.js +3 -2
  234. package/chunks/Path.glsl.js +1 -1
  235. package/chunks/RealisticTree.glsl.js +1 -1
  236. package/chunks/ShadowCastAccumulate.glsl.js +2 -2
  237. package/chunks/ShadowHighlight.glsl.js +3 -3
  238. package/chunks/ShadowHighlightBuffer.glsl.js +1 -1
  239. package/chunks/Terrain.glsl.js +1 -1
  240. package/chunks/Water.glsl.js +1 -1
  241. package/config.js +1 -1
  242. package/core/timeUtils.js +1 -1
  243. package/core/workers/Connection.js +1 -1
  244. package/form/elements/FieldElement.d.ts +2 -2
  245. package/form/elements/inputs/DateTimeOffsetPickerInput.d.ts +1 -1
  246. package/form/elements/inputs/DateTimeOffsetPickerInput.js +1 -1
  247. package/form/elements/inputs/Input.d.ts +1 -1
  248. package/form/elements/inputs/inputUtils.js +1 -1
  249. package/form/elements/inputs.js +1 -1
  250. package/geometry/support/spatialReferenceUtils.js +1 -1
  251. package/interfaces.d.ts +4 -2
  252. package/intl.js +1 -1
  253. package/kernel.js +1 -1
  254. package/layers/FeatureLayer.d.ts +7 -0
  255. package/layers/FeatureLayer.js +1 -1
  256. package/layers/SubtypeGroupLayer.js +1 -1
  257. package/layers/VoxelWasmPerSceneView.js +1 -1
  258. package/layers/graphics/data/AttributesBuilder.js +1 -1
  259. package/layers/support/SymbolLayerDrawing.d.ts +15 -0
  260. package/layers/support/SymbolLayerDrawing.js +2 -0
  261. package/networks/support/jsonTypes.d.ts +36 -11
  262. package/package.json +4 -4
  263. package/popup/Feature.d.ts +14 -4
  264. package/popup/Features.d.ts +81 -215
  265. package/popup/Features.js +1 -1
  266. package/popup/support/FeatureAbilities.d.ts +45 -9
  267. package/popup/types.d.ts +0 -67
  268. package/smartMapping/statistics/support/utils.js +1 -1
  269. package/smartMapping/support/adapters/support/utils.js +1 -1
  270. package/support/basemapDefinitions.js +1 -1
  271. package/support/revision.js +1 -1
  272. package/symbols/cim/cimAnalyzer.js +1 -1
  273. package/symbols/cim/types.d.ts +6 -0
  274. package/views/2d/engine/Stage.js +1 -1
  275. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  276. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  277. package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
  278. package/views/2d/engine/webgl/Painter.js +1 -1
  279. package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
  280. package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
  281. package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
  282. package/views/2d/engine/webgl/effects/highlight/HighlightSurfaces.js +1 -1
  283. package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
  284. package/views/2d/engine/webgl/shaderGraph/techniques/GraphicInstanceStore.js +1 -1
  285. package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
  286. package/views/2d/engine/webgl/shaderGraph/techniques/blend/BlendTechnique.js +1 -1
  287. package/views/2d/engine/webgl/shaderGraph/techniques/bloom/BloomTechnique.js +1 -1
  288. package/views/2d/engine/webgl/shaderGraph/techniques/blur/BlurTechnique.js +1 -1
  289. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityResources.js +1 -1
  290. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
  291. package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +1 -1
  292. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapResources.js +1 -1
  293. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
  294. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  295. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
  296. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BaseRasterProcessorTechnique.js +1 -1
  297. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/textureUtils.js +1 -1
  298. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  299. package/views/2d/layers/BaseLayerViewGL2D.d.ts +1 -1
  300. package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
  301. package/views/2d/layers/features/FeatureContainer.js +1 -1
  302. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  303. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  304. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  305. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  306. package/views/2d/layers/support/DisplayGL.js +1 -1
  307. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  308. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  309. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  310. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  311. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  312. package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
  313. package/views/3d/terrain/support/MultiSizeFramebuffer.js +1 -1
  314. package/views/3d/webgl/ManagedFBO.js +1 -1
  315. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  316. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  317. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +18 -5
  318. package/views/3d/webgl-engine/core/shaderLibrary/shading/ShadowmapFiltering.glsl.js +2 -2
  319. package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.glsl.js +2 -2
  320. package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js +1 -1
  321. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  322. package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
  323. package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +1 -1
  324. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  325. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  326. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  327. package/views/3d/webgl-engine/effects/transparency/OITDim.glsl.js +1 -1
  328. package/views/3d/webgl-engine/effects/transparency/OITDimTechniqueConfiguration.js +2 -0
  329. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  330. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  331. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  332. package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
  333. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  334. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  335. package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
  336. package/views/draw/DrawTool.js +1 -1
  337. package/views/draw/support/InteractiveHandle.js +1 -1
  338. package/views/draw/support/Reshape.js +1 -1
  339. package/views/draw/support/drawUtils.js +1 -1
  340. package/views/draw/support/reshapeTooltipUtils.js +1 -1
  341. package/views/draw/support/types.d.ts +9 -1
  342. package/views/layers/FeatureLikeLayerView.js +1 -1
  343. package/views/support/imageReprojection.js +1 -1
  344. package/views/webgl/FramebufferObject.js +1 -1
  345. package/views/webgl/RenderingContext.js +1 -1
  346. package/views/webgl/Texture.js +1 -1
  347. package/views/webgl/testFloatBufferBlend.js +1 -1
  348. package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
  349. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  350. package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
  351. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  352. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  353. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  354. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  355. package/widgets/Editor/UpdateWorkflow.js +1 -1
  356. package/widgets/Editor/Workflow.js +1 -1
  357. package/widgets/Feature/FeatureViewModel.d.ts +14 -4
  358. package/widgets/Feature/FeatureViewModel.js +1 -1
  359. package/widgets/FeatureForm/FieldInput.js +1 -1
  360. package/widgets/Features/FeaturesViewModel.d.ts +16 -5
  361. package/widgets/Features/FeaturesViewModel.js +1 -1
  362. package/widgets/Features.js +1 -1
  363. package/widgets/Popup/PopupViewModel.d.ts +2 -1
  364. package/widgets/Popup/PopupViewModel.js +1 -1
  365. package/widgets/Popup.d.ts +13 -4
  366. package/widgets/Popup.js +1 -1
  367. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
  368. package/assets/esri/core/workers/chunks/02aaeaa988e9e7d65a7f.js +0 -1
  369. package/assets/esri/core/workers/chunks/05c8d2c0362af4511d86.js +0 -1
  370. package/assets/esri/core/workers/chunks/06868e4f52de9d918255.js +0 -1
  371. package/assets/esri/core/workers/chunks/06c0b93e276cfc1fb7ac.js +0 -1
  372. package/assets/esri/core/workers/chunks/0888baa99c9007ad63bc.js +0 -1
  373. package/assets/esri/core/workers/chunks/0de66f13e84830a654fb.js +0 -1
  374. package/assets/esri/core/workers/chunks/0f597c690e5c60fe944b.js +0 -1
  375. package/assets/esri/core/workers/chunks/0f8736242544f9e9a57a.js +0 -1
  376. package/assets/esri/core/workers/chunks/0ff12fe9e358100668d9.js +0 -1
  377. package/assets/esri/core/workers/chunks/11a8541f3909f9ffb000.js +0 -1
  378. package/assets/esri/core/workers/chunks/13a009229c96ecb7b04f.js +0 -1
  379. package/assets/esri/core/workers/chunks/185f59f90070d5d6ac94.js +0 -1
  380. package/assets/esri/core/workers/chunks/190bc75254bc0542a6be.js +0 -1
  381. package/assets/esri/core/workers/chunks/1af247c86d1c4ae8fef3.js +0 -1
  382. package/assets/esri/core/workers/chunks/2339465190c9d5ede25f.js +0 -1
  383. package/assets/esri/core/workers/chunks/23eb204d3cb818adea32.js +0 -1
  384. package/assets/esri/core/workers/chunks/241ef4a1bea20b49d812.js +0 -1
  385. package/assets/esri/core/workers/chunks/2669a7195f1de21a9cf3.js +0 -1
  386. package/assets/esri/core/workers/chunks/2a2d5f9ea42cb2eee9c6.js +0 -1
  387. package/assets/esri/core/workers/chunks/2a7e7a497823e9f05aa3.js +0 -1
  388. package/assets/esri/core/workers/chunks/31e0bfc2cab055aebf9a.js +0 -1
  389. package/assets/esri/core/workers/chunks/32360a55d1836b2a737e.js +0 -1
  390. package/assets/esri/core/workers/chunks/330da3828eefd8d72d3f.js +0 -1
  391. package/assets/esri/core/workers/chunks/34acecd7a314fed12335.js +0 -1
  392. package/assets/esri/core/workers/chunks/34fe4570eef9e73839b8.js +0 -1
  393. package/assets/esri/core/workers/chunks/368b4c0a5eecbb06feac.js +0 -1
  394. package/assets/esri/core/workers/chunks/37729578a7c4cf15eded.js +0 -1
  395. package/assets/esri/core/workers/chunks/3af1e2f0b3d30c58d0c2.js +0 -1
  396. package/assets/esri/core/workers/chunks/3c155efd5768003a91eb.js +0 -1
  397. package/assets/esri/core/workers/chunks/3d4bb59ab2f644f4d675.js +0 -1
  398. package/assets/esri/core/workers/chunks/3f0d9fdd8c37605dd85d.js +0 -1
  399. package/assets/esri/core/workers/chunks/48eca6f51112ba80bd3b.js +0 -1
  400. package/assets/esri/core/workers/chunks/4b5737021a149aa786af.js +0 -1
  401. package/assets/esri/core/workers/chunks/55214e1d9f3d98fa7ed9.js +0 -1
  402. package/assets/esri/core/workers/chunks/55a0b69cf034ac32fc25.js +0 -1
  403. package/assets/esri/core/workers/chunks/576a1784e93c5406e657.js +0 -1
  404. package/assets/esri/core/workers/chunks/59289867cce97da74e39.js +0 -1
  405. package/assets/esri/core/workers/chunks/5a6d6082c5bcb1a80eda.js +0 -1
  406. package/assets/esri/core/workers/chunks/5a9620cb66c8e64e4668.js +0 -1
  407. package/assets/esri/core/workers/chunks/5eeb6d3a7b815d41621e.js +0 -1
  408. package/assets/esri/core/workers/chunks/5f06a57b4f7d7de16bbf.js +0 -1
  409. package/assets/esri/core/workers/chunks/5f2e246ffcbdedea4de5.js +0 -1
  410. package/assets/esri/core/workers/chunks/5ff41f43e57be0557541.js +0 -1414
  411. package/assets/esri/core/workers/chunks/6b32b3f98872771ff81e.js +0 -1
  412. package/assets/esri/core/workers/chunks/6be9d00839002f24fafd.js +0 -1
  413. package/assets/esri/core/workers/chunks/6c886f19875291d02407.js +0 -1
  414. package/assets/esri/core/workers/chunks/77f6659e400064d38130.js +0 -1
  415. package/assets/esri/core/workers/chunks/78c7eace6ec3fa5c7413.js +0 -1
  416. package/assets/esri/core/workers/chunks/7cee28575fd57430cf02.js +0 -1
  417. package/assets/esri/core/workers/chunks/82e0691995d821137d5f.js +0 -1
  418. package/assets/esri/core/workers/chunks/8435b6bf356959009b76.js +0 -1
  419. package/assets/esri/core/workers/chunks/8677865189081e0b83bc.js +0 -1
  420. package/assets/esri/core/workers/chunks/86f1aa2c108f5224d8b5.js +0 -1
  421. package/assets/esri/core/workers/chunks/86f70bd786d6d57fde69.js +0 -1
  422. package/assets/esri/core/workers/chunks/8878ab87ef7961fafae8.js +0 -1
  423. package/assets/esri/core/workers/chunks/8a893f23827769d42092.js +0 -1
  424. package/assets/esri/core/workers/chunks/8d1d0c3f0532aa98487d.js +0 -1
  425. package/assets/esri/core/workers/chunks/8e68b4628e9616356c34.js +0 -1
  426. package/assets/esri/core/workers/chunks/8edae79554843dd77ada.js +0 -1
  427. package/assets/esri/core/workers/chunks/9032c040b214b5af775b.js +0 -1
  428. package/assets/esri/core/workers/chunks/909ef35fa33be2b6da41.js +0 -1
  429. package/assets/esri/core/workers/chunks/90b7acc70adba193b215.js +0 -1
  430. package/assets/esri/core/workers/chunks/91718795fc4ca6516ac7.js +0 -1
  431. package/assets/esri/core/workers/chunks/92d4e962284e13ba2fc5.js +0 -1
  432. package/assets/esri/core/workers/chunks/94f80c46ccf5e19038b8.js +0 -1
  433. package/assets/esri/core/workers/chunks/979c2f52b6d6e1e8241b.js +0 -1
  434. package/assets/esri/core/workers/chunks/97f10efb0fe05bedcebd.js +0 -1
  435. package/assets/esri/core/workers/chunks/98f5bf1b91f3696b2fce.js +0 -1
  436. package/assets/esri/core/workers/chunks/9c52d4b54dfdb69dee29.js +0 -1
  437. package/assets/esri/core/workers/chunks/9de8149ae0a0726a4ab2.js +0 -1
  438. package/assets/esri/core/workers/chunks/9def5d17b94e5db71883.js +0 -1
  439. package/assets/esri/core/workers/chunks/9f272445c285ee9abb7b.js +0 -1
  440. package/assets/esri/core/workers/chunks/a10be7eb05a007fff1ed.js +0 -1
  441. package/assets/esri/core/workers/chunks/a32c87b89567a9fd1efc.js +0 -1
  442. package/assets/esri/core/workers/chunks/a3b29eca5807978fb2a3.js +0 -1
  443. package/assets/esri/core/workers/chunks/a446dff865332268625a.js +0 -1
  444. package/assets/esri/core/workers/chunks/a5bf2718c02a0e645013.js +0 -1
  445. package/assets/esri/core/workers/chunks/a6d166058e3025bb280e.js +0 -1
  446. package/assets/esri/core/workers/chunks/a8e111a5cfd6151d5dbb.js +0 -1
  447. package/assets/esri/core/workers/chunks/aed45f7e7eee154a21b8.js +0 -1
  448. package/assets/esri/core/workers/chunks/af3bd661b355eed3da21.js +0 -1
  449. package/assets/esri/core/workers/chunks/b0f2ce61d3cad413898e.js +0 -1
  450. package/assets/esri/core/workers/chunks/b2b77598048818c957b7.js +0 -1
  451. package/assets/esri/core/workers/chunks/b744b950999b92393e37.js +0 -1
  452. package/assets/esri/core/workers/chunks/b75165880704efccc47c.js +0 -1
  453. package/assets/esri/core/workers/chunks/ba9e107edc2027238be3.js +0 -1
  454. package/assets/esri/core/workers/chunks/bc3b22dc08c147b8d425.js +0 -1
  455. package/assets/esri/core/workers/chunks/c08e9914deb1dc62bc0f.js +0 -1
  456. package/assets/esri/core/workers/chunks/c0bb53d8d58ad18334d3.js +0 -1
  457. package/assets/esri/core/workers/chunks/c0d453f93af2d4a6ce64.js +0 -1
  458. package/assets/esri/core/workers/chunks/c9a42d86185a0ad35dd1.js +0 -1
  459. package/assets/esri/core/workers/chunks/cbb50415f7de8746ee1a.js +0 -1
  460. package/assets/esri/core/workers/chunks/d23dd7da45a7aa341540.js +0 -1
  461. package/assets/esri/core/workers/chunks/d2801df3fa44dee15ec8.js +0 -1
  462. package/assets/esri/core/workers/chunks/d53b31c9056f82831bc0.js +0 -1
  463. package/assets/esri/core/workers/chunks/d626e08d23330d84413b.js +0 -1
  464. package/assets/esri/core/workers/chunks/d9d69cf2496ebe76eade.js +0 -1
  465. package/assets/esri/core/workers/chunks/db6e03fe8dd316f5005f.js +0 -1
  466. package/assets/esri/core/workers/chunks/de79645e559a2d1ffa67.js +0 -1
  467. package/assets/esri/core/workers/chunks/e2779965db231fb666a5.js +0 -1
  468. package/assets/esri/core/workers/chunks/e4e2f059c52674dcae5b.js +0 -1
  469. package/assets/esri/core/workers/chunks/e622a23034f055de8b55.js +0 -1
  470. package/assets/esri/core/workers/chunks/ec21311584e4fb13e510.js +0 -1
  471. package/assets/esri/core/workers/chunks/ec9d5dcf2a0a11c85341.js +0 -1
  472. package/assets/esri/core/workers/chunks/eca45cd479f7fd28ca6e.js +0 -1
  473. package/assets/esri/core/workers/chunks/efdd75896ca53eb6242f.js +0 -1
  474. package/assets/esri/core/workers/chunks/f1c348cf2a1e35da9b20.js +0 -1
  475. package/assets/esri/core/workers/chunks/f4053e4e2d6e678db48a.js +0 -1
  476. package/assets/esri/core/workers/chunks/f4d577ff61da7964e08a.js +0 -1
  477. package/assets/esri/core/workers/chunks/f7da652f8dab57677cc3.js +0 -1
  478. package/assets/esri/core/workers/chunks/fe92f54e45fd21ccd75f.js +0 -1
  479. package/assets/esri/core/workers/chunks/fee1d873127dca02459f.js +0 -1
  480. package/assets/esri/core/workers/chunks/ff31936236dd9b1acb24.js +0 -1
  481. /package/assets/esri/core/workers/chunks/{32e9e92bbbd000fbbaf7.js.LICENSE.txt → 4141a3a93732996601e8.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../../core/Error.js";import has from"../../../core/has.js";import{removeMaybe as t}from"../../../core/maybe.js";import{addFrameTask as r}from"../../../core/scheduling.js";import{signal as s}from"../../../core/signal.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{CIMAnalyzer as n}from"../../../symbols/cim/cimAnalyzer.js";import{Container as a}from"./Container.js";import{MAX_TILE_RESHUFFLES_PER_FRAME as o}from"./webgl/definitions.js";import h from"./webgl/Painter.js";import{ArrayBufferPool as d}from"./webgl/PooledUint32Array.js";import{Profiler as l}from"./webgl/Profiler.js";import{TileReshuffleManager as m}from"./webgl/TileReshuffleManager.js";import{startup as u,shutdown as c}from"./webgl/shaderGraph/techniques/TechniqueRegistry.js";import{MeshWriterRegistry as p}from"./webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js";import{Timeline as g}from"../support/Timeline.js";import{SizedPixelFormat as f,SizedDepthStencilFormat as _,PixelType as b}from"../../webgl/enums.js";import{FramebufferObject as w}from"../../webgl/FramebufferObject.js";import{RenderbufferDescriptor as R}from"../../webgl/RenderbufferDescriptor.js";import{RenderingContext as y}from"../../webgl/RenderingContext.js";import{RenderingContextOptions as x}from"../../webgl/RenderingContextOptions.js";import{TextureDescriptor as C}from"../../webgl/TextureDescriptor.js";const P=2e3;class j extends a{constructor(t,i,a){super(),this.meshWriterRegistry=new p,this._trash=new Set,this._renderRemainingTime=0,this._lastFrameRenderTime=0,this._renderRequested=s(!1),this.stage=this,this._stationary=!0,this._animationsEnabled=!0,this._reshuffleManager=new m,this._managedCanvas=a,this.context=new y(this._managedCanvas.gl,i.contextOptions??new x),this.painter=new h(this.context,this),this._cimAnalyzer=new n(this.painter.textureManager.resourceManager),has("esri-2d-profiler")&&null!=t&&(this._debugOutput=document.createElement("div"),this._debugOutput.setAttribute("style","margin: 24px 64px; position: absolute; color: red;"),t.appendChild(this._debugOutput));const o=()=>this.highlightGradient;this._renderParameters={drawPhase:0,state:this.state,pixelRatio:window.devicePixelRatio,stationary:!1,globalOpacity:1,blendMode:null,deltaTime:-1,time:0,inFadeTransition:!1,effects:null,context:this.context,painter:this.painter,timeline:i.timeline||new g,renderingOptions:i.renderingOptions,requestRender:()=>this.requestRender(),allowDelayedRender:!1,requireFBO:!1,profiler:new l(this.context,this._debugOutput),dataUploadCounter:0,get highlightGradient(){return o()},reshuffleManager:this._reshuffleManager,backgroundColor:i.backgroundColor,animationsEnabled:!0};let c=e=>this.renderFrame(e);null!=i.renderFrame&&(c=i.renderFrame),this._taskHandle=r({render:e=>c(e)}),this._taskHandle.pause(),this._lostWebGLContextHandle=this._managedCanvas.events.on("webgl-context-lost",t=>this.emit("webgl-error",{error:new e("webgl-context-lost",t.statusMessage||"WebGL context lost")})),this._bufferPool=new d,u()}destroy(){super.destroy(),c(this.context),this.removeAllChildren(),this._emptyTrash(),this._taskHandle=t(this._taskHandle),this._lostWebGLContextHandle=t(this._lostWebGLContextHandle),this._managedCanvas.destroy(),this._debugOutput?.parentNode?.removeChild(this._debugOutput),this._bufferPool.destroy(),this.painter.dispose(),this.context.dispose(),this._managedCanvas=null}get textureManager(){return this.painter.textureManager}get profiler(){return this._renderParameters.profiler}get backgroundColor(){return this._renderParameters.backgroundColor}set backgroundColor(e){this._renderParameters.backgroundColor=e,this.requestRender()}get canvas(){return this._managedCanvas.canvas}get bufferPool(){return this._bufferPool}get cimAnalyzer(){return this._cimAnalyzer}get effectiveVisible(){return this.visible}get renderingOptions(){return this._renderingOptions}set renderingOptions(e){this._renderingOptions=e,this.requestRender()}get renderRequested(){return this._renderRequested.value}get state(){return this._state}set state(e){this._state=e,this.requestRender()}get stationary(){return this._stationary}set stationary(e){this._stationary!==e&&(this._stationary=e,this.requestRender())}get animationsEnabled(){return this._animationsEnabled}set animationsEnabled(e){this._animationsEnabled!==e&&(this._animationsEnabled=e,this._animationsEnabled&&this.requestRender())}trashDisplayObject(e){this._trash.add(e),this.requestRender()}untrashDisplayObject(e){return this._trash.delete(e)}requestRender(){this._renderRemainingTime=P,this.renderRequested||(this._renderRequested.value=!0,this._taskHandle.resume())}renderFrame(e){const t=this._lastFrameRenderTime?e.time-this._lastFrameRenderTime:0;this._renderRemainingTime-=t,this._renderRemainingTime<=0&&this._taskHandle.pause(),this._lastFrameRenderTime=e.time,this._renderRequested.value=!1,this._renderParameters.state=this._state,this._renderParameters.stationary=this.stationary,this._renderParameters.pixelRatio=window.devicePixelRatio,this._renderParameters.globalOpacity=1,this._renderParameters.time=e.time,this._renderParameters.deltaTime=e.deltaTime,this._renderParameters.effects=null,this._renderParameters.animationsEnabled=this._animationsEnabled,this.processRender(this._renderParameters),this._emptyTrash()}_createTransforms(){return{displayViewScreenMat3:i()}}renderChildren(e){this._reshuffleManager.reshuffle(o),this._managedCanvas.render(e,()=>this._renderChildren(this.children,e))}_renderChildren(e,t){for(const s of e)s.beforeRender(t);const r=this.context;this.painter.textureUploadManager.upload(),r.resetInfo(),t.profiler.recordStart("drawLayers"),t.dataUploadCounter=0,this.painter.beforeRenderPhases(t,t.backgroundColor,this.state.padding),t.drawPhase=1;for(const s of e)s.processRender(t);if(this.children.some(e=>e.hasHighlight)){t.drawPhase=16;for(const r of e)r.processRender(t)}if(this.children.some(e=>e.hasLabels)){t.drawPhase=2;for(const r of e)r.processRender(t)}if(has("esri-tiles-debug")){t.drawPhase=64;for(const r of e)r.processRender(t)}t.drawPhase=128;for(const s of e)s.processRender(t);this.painter.afterRenderPhases(t),t.profiler.recordEnd("drawLayers"),r.logInfo();for(const s of e)s.afterRender(t)}doRender(e){const t=this.context,{state:r,pixelRatio:s}=e;this._managedCanvas.resize(e),t.setViewport(0,0,s*r.size[0],s*r.size[1]),t.setDepthWriteEnabled(!0),t.setStencilWriteMask(255),this.renderChildren(e)}async takeScreenshot(e,t,r,s){const i=Math.round(this.state.size[0]*e.resolutionScale),n=Math.round(this.state.size[1]*e.resolutionScale),a=e.resolutionScale,o=this.context,h=this._state.clone();if(null!=s){const e=h.viewpoint;h.viewpoint.rotation=s,h.viewpoint=e}const d={...this._renderParameters,drawPhase:null,globalOpacity:1,stationary:!0,state:h,pixelRatio:a,time:performance.now(),deltaTime:0,blendMode:null,effects:null,inFadeTransition:!1,backgroundColor:r},l=new C(i,n);l.wrapMode=33071,l.internalFormat=f.RGBA8,l.isImmutable=!0;const m=new w(o,l,new R(_.DEPTH24_STENCIL8,i,n)),u=o.getBoundFramebufferObject(),c=o.getViewport();o.bindFramebuffer(m),o.setViewport(0,0,i,n),this._renderChildren(t??this.children,d);const p=this._readbackScreenshot(m,{...e.cropArea,y:n-(e.cropArea.y+e.cropArea.height)});o.bindFramebuffer(u),o.setViewport(c.x,c.y,c.width,c.height),this.requestRender();const g=await p;let b;return 1===e.outputScale?b=g:(b=new ImageData(Math.round(g.width*e.outputScale),Math.round(g.height*e.outputScale)),(await import("../../support/screenshotUtils.js")).resampleHermite(g,b,!0)),m.dispose(),b}async _readbackScreenshot(e,t){const r=(await import("../../support/screenshotUtils.js")).createEmptyImageData(t.width,t.height,document.createElement("canvas"));return await e.readPixelsAsync(t.x,t.y,t.width,t.height,6408,b.UNSIGNED_BYTE,new Uint8Array(r.data.buffer)),r}_emptyTrash(){for(;this._trash.size>0;){const e=Array.from(this._trash);this._trash.clear();for(const t of e)t.processDetach()}}}export{j as Stage,P as extraRenderTime};
2
+ import e from"../../../core/Error.js";import has from"../../../core/has.js";import{removeMaybe as t}from"../../../core/maybe.js";import{addFrameTask as r}from"../../../core/scheduling.js";import{signal as s}from"../../../core/signal.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{CIMAnalyzer as n}from"../../../symbols/cim/cimAnalyzer.js";import{Container as a}from"./Container.js";import{MAX_TILE_RESHUFFLES_PER_FRAME as o}from"./webgl/definitions.js";import h from"./webgl/Painter.js";import{ArrayBufferPool as d}from"./webgl/PooledUint32Array.js";import{Profiler as l}from"./webgl/Profiler.js";import{TileReshuffleManager as m}from"./webgl/TileReshuffleManager.js";import{startup as u,shutdown as c}from"./webgl/shaderGraph/techniques/TechniqueRegistry.js";import{MeshWriterRegistry as p}from"./webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js";import{Timeline as g}from"../support/Timeline.js";import{SizedPixelFormat as f,SizedDepthStencilFormat as _,PixelType as b}from"../../webgl/enums.js";import{DisposableFramebufferObject as w}from"../../webgl/FramebufferObject.js";import{RenderbufferDescriptor as R}from"../../webgl/RenderbufferDescriptor.js";import{RenderingContext as y}from"../../webgl/RenderingContext.js";import{RenderingContextOptions as x}from"../../webgl/RenderingContextOptions.js";import{TextureDescriptor as C}from"../../webgl/TextureDescriptor.js";const P=2e3;class j extends a{constructor(t,i,a){super(),this.meshWriterRegistry=new p,this._trash=new Set,this._renderRemainingTime=0,this._lastFrameRenderTime=0,this._renderRequested=s(!1),this.stage=this,this._stationary=!0,this._animationsEnabled=!0,this._reshuffleManager=new m,this._managedCanvas=a,this.context=new y(this._managedCanvas.gl,i.contextOptions??new x),this.painter=new h(this.context,this),this._cimAnalyzer=new n(this.painter.textureManager.resourceManager),has("esri-2d-profiler")&&null!=t&&(this._debugOutput=document.createElement("div"),this._debugOutput.setAttribute("style","margin: 24px 64px; position: absolute; color: red;"),t.appendChild(this._debugOutput));const o=()=>this.highlightGradient;this._renderParameters={drawPhase:0,state:this.state,pixelRatio:window.devicePixelRatio,stationary:!1,globalOpacity:1,blendMode:null,deltaTime:-1,time:0,inFadeTransition:!1,effects:null,context:this.context,painter:this.painter,timeline:i.timeline||new g,renderingOptions:i.renderingOptions,requestRender:()=>this.requestRender(),allowDelayedRender:!1,requireFBO:!1,profiler:new l(this.context,this._debugOutput),dataUploadCounter:0,get highlightGradient(){return o()},reshuffleManager:this._reshuffleManager,backgroundColor:i.backgroundColor,animationsEnabled:!0};let c=e=>this.renderFrame(e);null!=i.renderFrame&&(c=i.renderFrame),this._taskHandle=r({render:e=>c(e)}),this._taskHandle.pause(),this._lostWebGLContextHandle=this._managedCanvas.events.on("webgl-context-lost",t=>this.emit("webgl-error",{error:new e("webgl-context-lost",t.statusMessage||"WebGL context lost")})),this._bufferPool=new d,u()}destroy(){super.destroy(),c(this.context),this.removeAllChildren(),this._emptyTrash(),this._taskHandle=t(this._taskHandle),this._lostWebGLContextHandle=t(this._lostWebGLContextHandle),this._managedCanvas.destroy(),this._debugOutput?.parentNode?.removeChild(this._debugOutput),this._bufferPool.destroy(),this.painter.dispose(),this.context.dispose(),this._managedCanvas=null}get textureManager(){return this.painter.textureManager}get profiler(){return this._renderParameters.profiler}get backgroundColor(){return this._renderParameters.backgroundColor}set backgroundColor(e){this._renderParameters.backgroundColor=e,this.requestRender()}get canvas(){return this._managedCanvas.canvas}get bufferPool(){return this._bufferPool}get cimAnalyzer(){return this._cimAnalyzer}get effectiveVisible(){return this.visible}get renderingOptions(){return this._renderingOptions}set renderingOptions(e){this._renderingOptions=e,this.requestRender()}get renderRequested(){return this._renderRequested.value}get state(){return this._state}set state(e){this._state=e,this.requestRender()}get stationary(){return this._stationary}set stationary(e){this._stationary!==e&&(this._stationary=e,this.requestRender())}get animationsEnabled(){return this._animationsEnabled}set animationsEnabled(e){this._animationsEnabled!==e&&(this._animationsEnabled=e,this._animationsEnabled&&this.requestRender())}trashDisplayObject(e){this._trash.add(e),this.requestRender()}untrashDisplayObject(e){return this._trash.delete(e)}requestRender(){this._renderRemainingTime=P,this.renderRequested||(this._renderRequested.value=!0,this._taskHandle.resume())}renderFrame(e){const t=this._lastFrameRenderTime?e.time-this._lastFrameRenderTime:0;this._renderRemainingTime-=t,this._renderRemainingTime<=0&&this._taskHandle.pause(),this._lastFrameRenderTime=e.time,this._renderRequested.value=!1,this._renderParameters.state=this._state,this._renderParameters.stationary=this.stationary,this._renderParameters.pixelRatio=window.devicePixelRatio,this._renderParameters.globalOpacity=1,this._renderParameters.time=e.time,this._renderParameters.deltaTime=e.deltaTime,this._renderParameters.effects=null,this._renderParameters.animationsEnabled=this._animationsEnabled,this.processRender(this._renderParameters),this._emptyTrash()}_createTransforms(){return{displayViewScreenMat3:i()}}renderChildren(e){this._reshuffleManager.reshuffle(o),this._managedCanvas.render(e,()=>this._renderChildren(this.children,e))}_renderChildren(e,t){for(const s of e)s.beforeRender(t);const r=this.context;this.painter.textureUploadManager.upload(),r.resetInfo(),t.profiler.recordStart("drawLayers"),t.dataUploadCounter=0,this.painter.beforeRenderPhases(t,t.backgroundColor,this.state.padding),t.drawPhase=1;for(const s of e)s.processRender(t);if(this.children.some(e=>e.hasHighlight)){t.drawPhase=16;for(const r of e)r.processRender(t)}if(this.children.some(e=>e.hasLabels)){t.drawPhase=2;for(const r of e)r.processRender(t)}if(has("esri-tiles-debug")){t.drawPhase=64;for(const r of e)r.processRender(t)}t.drawPhase=128;for(const s of e)s.processRender(t);this.painter.afterRenderPhases(t),t.profiler.recordEnd("drawLayers"),r.logInfo();for(const s of e)s.afterRender(t)}doRender(e){const t=this.context,{state:r,pixelRatio:s}=e;this._managedCanvas.resize(e),t.setViewport(0,0,s*r.size[0],s*r.size[1]),t.setDepthWriteEnabled(!0),t.setStencilWriteMask(255),this.renderChildren(e)}async takeScreenshot(e,t,r,s){const i=Math.round(this.state.size[0]*e.resolutionScale),n=Math.round(this.state.size[1]*e.resolutionScale),a=e.resolutionScale,o=this.context,h=this._state.clone();if(null!=s){const e=h.viewpoint;h.viewpoint.rotation=s,h.viewpoint=e}const d={...this._renderParameters,drawPhase:null,globalOpacity:1,stationary:!0,state:h,pixelRatio:a,time:performance.now(),deltaTime:0,blendMode:null,effects:null,inFadeTransition:!1,backgroundColor:r},l=new C(i,n);l.wrapMode=33071,l.internalFormat=f.RGBA8,l.isImmutable=!0;const m=new w(o,l,new R(_.DEPTH24_STENCIL8,i,n)),u=o.boundFramebuffer,c=o.getViewport();o.bindFramebuffer(m),o.setViewport(0,0,i,n),this._renderChildren(t??this.children,d);const p=this._readbackScreenshot(m,{...e.cropArea,y:n-(e.cropArea.y+e.cropArea.height)});o.bindFramebuffer(u),o.setViewport(c.x,c.y,c.width,c.height),this.requestRender();const g=await p;let b;return 1===e.outputScale?b=g:(b=new ImageData(Math.round(g.width*e.outputScale),Math.round(g.height*e.outputScale)),(await import("../../support/screenshotUtils.js")).resampleHermite(g,b,!0)),m.dispose(),b}async _readbackScreenshot(e,t){const r=(await import("../../support/screenshotUtils.js")).createEmptyImageData(t.width,t.height,document.createElement("canvas"));return await e.readPixelsAsync(t.x,t.y,t.width,t.height,6408,b.UNSIGNED_BYTE,new Uint8Array(r.data.buffer)),r}_emptyTrash(){for(;this._trash.size>0;){const e=Array.from(this._trash);this._trash.clear();for(const t of e)t.processDetach()}}}export{j as Stage,P as extraRenderTime};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{RenderingDevice as e}from"../webgl/RenderingDevice.js";import{simplePipelineState as t}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as i}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";const r=1e-6;class n{constructor(t,r){this.spriteMosaic=t,this.glyphMosaic=r,this._vtlTechniques=new i,this._context=null,this._vtlTechniques.startup(),this._renderingDevice=new e}dispose(){this._vtlTechniques&&this._vtlTechniques.shutdown(this._context),this.spriteMosaic.dispose(),this.glyphMosaic.dispose(),this._renderingDevice.dispose(),this._context=null}drawSymbols(e,t,i){const n=i.layers;e.renderPass="translucent";const o=this._vtlTechniques.getTechnique(3);s[0]=t;for(let l=0;l<n.length;l++){const t=n[l];if(3!==t.type)continue;const i=t.getLayoutProperty("visibility");if(i&&1===i.getValue())continue;const a=e.displayLevel;void 0!==t.minzoom&&t.minzoom>a+r||void 0!==t.maxzoom&&t.maxzoom<=a-r||(e.styleLayerUID=t.uid,e.styleLayer=t,o.render(e,{tiles:s}))}s[0]=null}drawBackground(e,t,i){if(0===i.backgroundBucketIds.length)return;const{displayLevel:n,requiredLevel:o}=e;t.key.level=o,this._renderingDevice.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:!1,depth:{write:!1,test:519}}),e.renderPass="background";const l=this._vtlTechniques.getTechnique(0);s[0]=t,i.backgroundBucketIds.forEach(t=>{const o=i.getLayerById(t);if(0!==o.type)return;const a=o.getLayoutProperty("visibility");a&&1===a.getValue()||void 0!==o.minzoom&&o.minzoom>n+r||void 0!==o.maxzoom&&o.maxzoom<=n-r||(e.styleLayerUID=o.uid,e.styleLayer=o,l.render(e,{tiles:s}))}),s[0]=null}drawTile(e,i,r,n){const s=r.layers.filter(e=>{if(null!=n&&n!==e.type||!i.layerData.has(e.uid))return!1;const t=e.getLayoutProperty("visibility");return 1!==t?.getValue()}),{context:o}=e,l=o.getPipelineState(),{depthWrite:a}=l;let c=0,u=1;void 0!==a?.zNear&&void 0!==a.zFar&&(c=a.zNear,u=a.zFar),this._renderingDevice.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"none"},stencil:!1,depth:{write:{zNear:c,zFar:u},test:515}}),e.renderPass="opaque";for(let t=s.length-1;t>=0;--t)this._renderStyleLayer(s[t],e,i);this._renderingDevice.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:!1,depth:{write:!1,test:515}}),e.renderPass="translucent",s.forEach(t=>this._renderStyleLayer(t,e,i)),this._renderingDevice.setPipelineState(t),this._context||(this._context=e.context)}setShader(e){return this._renderingDevice.setShader(e)}setPipelineState(e){return this._renderingDevice.setPipelineState(e)}getPipelineState(){return this._renderingDevice.getPipelineState()}submitDraw(e,t,i){return this._renderingDevice.submitDraw(e,t,i)}submitDrawMesh(e,t,i,r){this._renderingDevice.submitDrawMesh(e,t,i,r)}submitDrawMeshUntyped(e,t,i,r){this._renderingDevice.submitDrawMeshUntyped(e,t,i,r)}updatePipelineState(e){return this._renderingDevice.updatePipelineState(e)}setStencilRef(e,t){return this._renderingDevice.setStencilRef(e,t)}_renderStyleLayer(e,t,i){const{renderPass:n}=t;let o;switch(e.type){case 0:if("background"!==n)return;o=this._vtlTechniques.getTechnique(0);break;case 1:if("opaque"!==n&&"translucent"!==n)return;o=this._vtlTechniques.getTechnique(1);break;case 2:if("translucent"!==n)return;o=this._vtlTechniques.getTechnique(2);break;case 4:if("translucent"!==n)return;o=this._vtlTechniques.getTechnique(4);break;case 3:if("translucent"!==n)return;o=this._vtlTechniques.getTechnique(3)}const{displayLevel:l}=t,{minzoom:a,maxzoom:c}=e;void 0!==a&&a>l+r||void 0!==c&&c<=l-r||!o||(3===e.type&&this._renderingDevice.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:!1,depth:!1}),t.styleLayerUID=e.uid,t.styleLayer=e,s[0]=i,o.render(t,{tiles:s}),s[0]=null)}}const s=[null];export{n as default};
2
+ import{RenderingDevice as e}from"../webgl/RenderingDevice.js";import{simplePipelineState as t}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as i}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";const r=1e-6;class n{constructor(t,r){this.spriteMosaic=t,this.glyphMosaic=r,this._vtlTechniques=new i,this._context=null,this._vtlTechniques.startup(),this._renderingDevice=new e}dispose(){this._vtlTechniques&&this._vtlTechniques.shutdown(this._context),this.spriteMosaic.dispose(),this.glyphMosaic.dispose(),this._renderingDevice.dispose(),this._context=null}drawSymbols(e,t,i){const n=i.layers;e.renderPass="translucent";const l=this._vtlTechniques.getTechnique(3);s[0]=t;for(let o=0;o<n.length;o++){const t=n[o];if(3!==t.type)continue;const i=t.getLayoutProperty("visibility");if(i&&1===i.getValue())continue;const a=e.displayLevel;void 0!==t.minzoom&&t.minzoom>a+r||void 0!==t.maxzoom&&t.maxzoom<=a-r||(e.styleLayerUID=t.uid,e.styleLayer=t,l.render(e,{tiles:s}))}s[0]=null}drawBackground(e,t,i){if(0===i.backgroundBucketIds.length)return;const{displayLevel:n,requiredLevel:l}=e;t.key.level=l,this._renderingDevice.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:!1,depth:{write:!1,test:519}}),e.renderPass="background";const o=this._vtlTechniques.getTechnique(0);s[0]=t,i.backgroundBucketIds.forEach(t=>{const l=i.getLayerById(t);if(0!==l.type)return;const a=l.getLayoutProperty("visibility");a&&1===a.getValue()||void 0!==l.minzoom&&l.minzoom>n+r||void 0!==l.maxzoom&&l.maxzoom<=n-r||(e.styleLayerUID=l.uid,e.styleLayer=l,o.render(e,{tiles:s}))}),s[0]=null}drawTile(e,i,r,n){const s=r.layers.filter(e=>{if(null!=n&&n!==e.type||!i.layerData.has(e.uid))return!1;const t=e.getLayoutProperty("visibility");return 1!==t?.getValue()}),{context:l}=e,o=l.getPipelineState(),{depthWrite:a}=o;let c=0,h=1;void 0!==a?.zNear&&void 0!==a.zFar&&(c=a.zNear,h=a.zFar),this._renderingDevice.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"none"},stencil:!1,depth:{write:{zNear:c,zFar:h},test:515}}),e.renderPass="opaque";for(let t=s.length-1;t>=0;--t)this._renderStyleLayer(s[t],e,i);this._renderingDevice.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:!1,depth:{write:!1,test:515}}),e.renderPass="translucent",s.forEach(t=>this._renderStyleLayer(t,e,i)),this._renderingDevice.setPipelineState(t),l.setPipelineState(o),this._context||(this._context=e.context)}setShader(e){return this._renderingDevice.setShader(e)}setPipelineState(e){return this._renderingDevice.setPipelineState(e)}getPipelineState(){return this._renderingDevice.getPipelineState()}submitDraw(e,t,i){return this._renderingDevice.submitDraw(e,t,i)}submitDrawMesh(e,t,i,r){this._renderingDevice.submitDrawMesh(e,t,i,r)}submitDrawMeshUntyped(e,t,i,r){this._renderingDevice.submitDrawMeshUntyped(e,t,i,r)}updatePipelineState(e){return this._renderingDevice.updatePipelineState(e)}setStencilRef(e,t){return this._renderingDevice.setStencilRef(e,t)}_renderStyleLayer(e,t,i){const{renderPass:n}=t;let l;switch(e.type){case 0:if("background"!==n)return;l=this._vtlTechniques.getTechnique(0);break;case 1:if("opaque"!==n&&"translucent"!==n)return;l=this._vtlTechniques.getTechnique(1);break;case 2:if("translucent"!==n)return;l=this._vtlTechniques.getTechnique(2);break;case 4:if("translucent"!==n)return;l=this._vtlTechniques.getTechnique(4);break;case 3:if("translucent"!==n)return;l=this._vtlTechniques.getTechnique(3)}const{displayLevel:o}=t,{minzoom:a,maxzoom:c}=e;if(void 0!==a&&a>o+r||void 0!==c&&c<=o-r||!l)return;const h=this._renderingDevice.getPipelineState();3===e.type&&this._renderingDevice.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:!1,depth:!1}),t.styleLayerUID=e.uid,t.styleLayer=e,s[0]=i,l.render(t,{tiles:s}),s[0]=null,3===e.type&&this._renderingDevice.setPipelineState(h)}}const s=[null];export{n as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import t from"../../../../core/Error.js";import has from"../../../../core/has.js";import e from"../../../../core/Logger.js";import{estimateNumberArrayMemory as i}from"../../../../core/memoryEstimations.js";import{dataDrivenUnit2 as s,dataDrivenUnit1 as r,dataDrivenUnit0 as a,visualVariableUnit as n,localTimeOriginUnit as u,gpgpuUnit as h,animationUnit as o,filterFlagsUnit as d}from"./definitions.js";import{getDisplayIdTexel as l}from"./DisplayId.js";import{getPixelArrayCtor as p,getPixelBytes as g}from"./Utils.js";import{FramebufferObject as _}from"../../../webgl/FramebufferObject.js";import c from"../../../webgl/Texture.js";import{TextureDescriptor as x}from"../../../webgl/TextureDescriptor.js";const f=()=>e.getLogger("esri.views.2d.engine.webgl.AttributeStoreView");class b{constructor(t,e,i){this._texture=null,this._lastTexture=null,this._fbos={},this.texelSize=4;const{buffer:s,pixelType:r,textureOnly:a}=t,n=p(r);this.blockIndex=i,this.pixelType=r,this.size=e,this.textureOnly=a,a||(this.data=new n(s)),this._resetRange()}destroy(){this._texture?.dispose();for(const t in this._fbos){const e=this._fbos[t];e&&("0"===t&&e.detachColorTexture(),e.dispose()),this._fbos[t]=null}this._texture=null}get _textureDesc(){const t=new x(this.size);return t.wrapMode=33071,t.samplingMode=9728,t.dataType=this.pixelType,t}get usedMemory(){return null!=this.data?i(this.data):0}setData(t,e,i){const s=l(t),r=this.data,a=s*this.texelSize+e;!r||a>=r.length||(r[a]=i,this.dirtyStart=Math.min(this.dirtyStart,s),this.dirtyEnd=Math.max(this.dirtyEnd,s))}getData(t,e){if(null==this.data)return null;const i=l(t)*this.texelSize+e;return!this.data||i>=this.data.length?null:this.data[i]}getTexture(t){return this._texture??this._initTexture(t)}getFBO(t,e=0){if(!this._fbos[e]){const i=0===e?this.getTexture(t):this._textureDesc;this._fbos[e]=new _(t,i)}return this._fbos[e]}get hasDirty(){const t=this.dirtyStart;return this.dirtyEnd>=t}updateTexture(e,i){try{const s=this.dirtyStart,r=this.dirtyEnd;if(!this.hasDirty)return;has("esri-2d-update-debug")&&console.debug(`Version[${i}] AttributeStoreView.updateTexture`,{start:s,end:r,firstBytes:new Uint8Array(this.data.buffer.slice(0,16)),block:this}),this._resetRange();const a=this.data.buffer,n=this.getTexture(e),u=4,h=(s-s%this.size)/this.size,o=(r-r%this.size)/this.size,d=h,l=this.size,g=o,_=h*this.size*u,c=(l+g*this.size)*u-_,x=p(this.pixelType),b=new x(a,_*x.BYTES_PER_ELEMENT,c),m=this.size,T=g-d+1;if(T>this.size)return void f().error(new t("mapview-webgl","Out-of-bounds index when updating AttributeData"));n.updateData(0,0,d,m,T,b)}catch(s){}}update(t){const{data:e,start:i,end:s}=t;if(null!=e&&null!=this.data){const s=this.data,r=i*this.texelSize;for(let i=0;i<e.length;i++){const a=1<<i%this.texelSize;t.layout&a&&(s[r+i]=e[i])}}this.dirtyStart=Math.min(this.dirtyStart,i),this.dirtyEnd=Math.max(this.dirtyEnd,s)}resize(t,e){const i=this.size;if(this.size=e,this.textureOnly)return void(i!==this.size&&(this._lastTexture=this._texture,this._texture=null));const s=p(this.pixelType);this.destroy(),this.data=new s(t.buffer)}_resetRange(){this.dirtyStart=2147483647,this.dirtyEnd=0}_initTexture(t){const e=new c(t,this._textureDesc,this.data??void 0);if(null!=this._lastTexture&&this._fbos[0]){const i=this._lastTexture.descriptor.width,s=this._lastTexture.descriptor.height,r=this._lastTexture.descriptor.dataType,a=this._lastTexture.descriptor.pixelFormat,n=this.getFBO(t),u=g(r),h=new(p(r))(new ArrayBuffer(i*s*u*this.texelSize)),o=t.getBoundFramebufferObject(),{x:d,y:l,width:_,height:c}=t.getViewport();t.bindFramebuffer(n),n.readPixels(0,0,i,s,a,r,h),e.updateData(0,0,0,2*i,s/2,h),t.setViewport(d,l,_,c),t.bindFramebuffer(o)}return this.destroy(),this._texture=e,this._texture}}class m{constructor(){this.size=0,this._pendingAttributeUpdates=[],this._version=0,this._epoch=0,this._locked=!1}get locked(){return this._locked}get usedMemory(){let t=0;for(const e of this._data??[])null!=e&&(t+=e.usedMemory);return t}_initialize(t){if(!t)throw new Error("InternalError: initArgs must be defined");const e=t.blockDescriptors;if(this.size=t.blockSize,has("esri-2d-update-debug")&&console.debug("AttributeStoreView.initialize",{message:t}),null==this._data)this._data=e.map((t,e)=>null!=t?new b(t,this.size,e):null);else for(let i=0;i<this._data.length;i++){const t=this._data[i],s=e[i];null!=s&&(null==t?this._data[i]=new b(s,this.size,i):t.resize(s,this.size))}}destroy(){for(const t of this._data??[])t?.destroy();this._defaultTexture?.dispose(),this._defaultTexture=null,this._pendingAttributeUpdates=[]}isEmpty(){return null==this._data}getBlock(t){if(null==this._data)return null;return this._data[t]}setLabelMinZoom(t,e){this.setData(t,0,1,e)}setLocalTimeOrigin(t,e){this.setData(t,7,0,e)}getLabelMinZoom(t){return this.getData(t,0,1,255)}getFilterFlags(t){return this.getData(t,0,0,0)}getVisualVariableData(t,e){return this.getData(t,3,e,0)}getData(t,e,i,s){if(!this._data)return 0;const r=this._data[e];if(null==r)return 0;const a=r.getData(t,i);return null!=a?a:s}setData(t,e,i,s){this._data[e].setData(t,i,s)}lockTextureUploads(){this._locked=!0}unlockTextureUploads(){this._locked=!1,this.update()}requestUpdate(t){this._version=t.version,this._pendingAttributeUpdates.push(t),has("esri-2d-update-debug")&&console.debug(`Version[${this._version}] AttributeStoreView.requestUpdate`,{message:t})}get currentEpoch(){return this._epoch}get hasPendingUpdates(){return this._pendingAttributeUpdates.length>0}update(){if(this._locked)return;const t=this._pendingAttributeUpdates;this._pendingAttributeUpdates=[];for(const e of t){const{blockData:t,initArgs:i,sendUpdateEpoch:s,version:r}=e;has("esri-2d-update-debug")&&console.debug(`Version[${this._version}] Epoch[${s}] AttributeStoreView.applyUpdate`),this._version=r,this._epoch=s,null!=i&&this._initialize(i);const a=this._data;for(let e=0;e<t.length;e++){const i=t[e],s=a[e];null!=s&&null!=i&&(has("esri-2d-update-debug")&&console.debug(`Version[${this._version}] CpuBlock[${e}] AttributeStoreView.update`,{block:i}),s.update(i))}}}getUniforms(t){return{filterFlags:{texture:this._getTexture(t,0),unit:d},animation:{texture:this._getTexture(t,1),unit:o},gpgpu:{texture:this._getTexture(t,2),unit:h},localTimeOrigin:{texture:this._getTexture(t,7),unit:u},visualVariableData:{texture:this._getTexture(t,3),unit:n},dataDriven0:{texture:this._getTexture(t,4),unit:a},dataDriven1:{texture:this._getTexture(t,5),unit:r},dataDriven2:{texture:this._getTexture(t,6),unit:s},size:this.size}}_getTexture(t,e){const i=this._data?.[e];return i?(i.updateTexture(t,this._version),i.getTexture(t)):this._getDefaultTexture(t)}_getDefaultTexture(t){if(null==this._defaultTexture){const e=new x(1);e.wrapMode=33071,e.samplingMode=9728,this._defaultTexture=new c(t,e,new Uint8Array(4))}return this._defaultTexture}}export{m as AttributeStoreView};
2
+ import t from"../../../../core/Error.js";import has from"../../../../core/has.js";import e from"../../../../core/Logger.js";import{estimateNumberArrayMemory as i}from"../../../../core/memoryEstimations.js";import{dataDrivenUnit2 as s,dataDrivenUnit1 as r,dataDrivenUnit0 as a,visualVariableUnit as n,localTimeOriginUnit as u,gpgpuUnit as h,animationUnit as o,filterFlagsUnit as d}from"./definitions.js";import{getDisplayIdTexel as l}from"./DisplayId.js";import{getPixelArrayCtor as p,getPixelBytes as g}from"./Utils.js";import{DisposableFramebufferObject as _}from"../../../webgl/FramebufferObject.js";import c from"../../../webgl/Texture.js";import{TextureDescriptor as x}from"../../../webgl/TextureDescriptor.js";const f=()=>e.getLogger("esri.views.2d.engine.webgl.AttributeStoreView");class b{constructor(t,e,i){this._texture=null,this._lastTexture=null,this._fbos={},this.texelSize=4;const{buffer:s,pixelType:r,textureOnly:a}=t,n=p(r);this.blockIndex=i,this.pixelType=r,this.size=e,this.textureOnly=a,a||(this.data=new n(s)),this._resetRange()}destroy(){this._texture?.dispose();for(const t in this._fbos){const e=this._fbos[t];e&&("0"===t&&e.detachColorTexture(),e.dispose()),this._fbos[t]=null}this._texture=null}get _textureDesc(){const t=new x(this.size);return t.wrapMode=33071,t.samplingMode=9728,t.dataType=this.pixelType,t}get usedMemory(){return null!=this.data?i(this.data):0}setData(t,e,i){const s=l(t),r=this.data,a=s*this.texelSize+e;!r||a>=r.length||(r[a]=i,this.dirtyStart=Math.min(this.dirtyStart,s),this.dirtyEnd=Math.max(this.dirtyEnd,s))}getData(t,e){if(null==this.data)return null;const i=l(t)*this.texelSize+e;return!this.data||i>=this.data.length?null:this.data[i]}getTexture(t){return this._texture??this._initTexture(t)}getFBO(t,e=0){if(!this._fbos[e]){const i=0===e?this.getTexture(t):this._textureDesc;this._fbos[e]=new _(t,i)}return this._fbos[e]}get hasDirty(){const t=this.dirtyStart;return this.dirtyEnd>=t}updateTexture(e,i){try{const s=this.dirtyStart,r=this.dirtyEnd;if(!this.hasDirty)return;has("esri-2d-update-debug")&&console.debug(`Version[${i}] AttributeStoreView.updateTexture`,{start:s,end:r,firstBytes:new Uint8Array(this.data.buffer.slice(0,16)),block:this}),this._resetRange();const a=this.data.buffer,n=this.getTexture(e),u=4,h=(s-s%this.size)/this.size,o=(r-r%this.size)/this.size,d=h,l=this.size,g=o,_=h*this.size*u,c=(l+g*this.size)*u-_,x=p(this.pixelType),b=new x(a,_*x.BYTES_PER_ELEMENT,c),m=this.size,T=g-d+1;if(T>this.size)return void f().error(new t("mapview-webgl","Out-of-bounds index when updating AttributeData"));n.updateData(0,0,d,m,T,b)}catch(s){}}update(t){const{data:e,start:i,end:s}=t;if(null!=e&&null!=this.data){const s=this.data,r=i*this.texelSize;for(let i=0;i<e.length;i++){const a=1<<i%this.texelSize;t.layout&a&&(s[r+i]=e[i])}}this.dirtyStart=Math.min(this.dirtyStart,i),this.dirtyEnd=Math.max(this.dirtyEnd,s)}resize(t,e){const i=this.size;if(this.size=e,this.textureOnly)return void(i!==this.size&&(this._lastTexture=this._texture,this._texture=null));const s=p(this.pixelType);this.destroy(),this.data=new s(t.buffer)}_resetRange(){this.dirtyStart=2147483647,this.dirtyEnd=0}_initTexture(t){const e=new c(t,this._textureDesc,this.data??void 0);if(null!=this._lastTexture&&this._fbos[0]){const i=this._lastTexture.descriptor.width,s=this._lastTexture.descriptor.height,r=this._lastTexture.descriptor.dataType,a=this._lastTexture.descriptor.pixelFormat,n=this.getFBO(t),u=g(r),h=new(p(r))(new ArrayBuffer(i*s*u*this.texelSize)),o=t.boundFramebuffer,{x:d,y:l,width:_,height:c}=t.getViewport();t.bindFramebuffer(n),n.readPixels(0,0,i,s,a,r,h),e.updateData(0,0,0,2*i,s/2,h),t.setViewport(d,l,_,c),t.bindFramebuffer(o)}return this.destroy(),this._texture=e,this._texture}}class m{constructor(){this.size=0,this._pendingAttributeUpdates=[],this._version=0,this._epoch=0,this._locked=!1}get locked(){return this._locked}get usedMemory(){let t=0;for(const e of this._data??[])null!=e&&(t+=e.usedMemory);return t}_initialize(t){if(!t)throw new Error("InternalError: initArgs must be defined");const e=t.blockDescriptors;if(this.size=t.blockSize,has("esri-2d-update-debug")&&console.debug("AttributeStoreView.initialize",{message:t}),null==this._data)this._data=e.map((t,e)=>null!=t?new b(t,this.size,e):null);else for(let i=0;i<this._data.length;i++){const t=this._data[i],s=e[i];null!=s&&(null==t?this._data[i]=new b(s,this.size,i):t.resize(s,this.size))}}destroy(){for(const t of this._data??[])t?.destroy();this._defaultTexture?.dispose(),this._defaultTexture=null,this._pendingAttributeUpdates=[]}isEmpty(){return null==this._data}getBlock(t){if(null==this._data)return null;return this._data[t]}setLabelMinZoom(t,e){this.setData(t,0,1,e)}setLocalTimeOrigin(t,e){this.setData(t,7,0,e)}getLabelMinZoom(t){return this.getData(t,0,1,255)}getFilterFlags(t){return this.getData(t,0,0,0)}getVisualVariableData(t,e){return this.getData(t,3,e,0)}getData(t,e,i,s){if(!this._data)return 0;const r=this._data[e];if(null==r)return 0;const a=r.getData(t,i);return null!=a?a:s}setData(t,e,i,s){this._data[e].setData(t,i,s)}lockTextureUploads(){this._locked=!0}unlockTextureUploads(){this._locked=!1,this.update()}requestUpdate(t){this._version=t.version,this._pendingAttributeUpdates.push(t),has("esri-2d-update-debug")&&console.debug(`Version[${this._version}] AttributeStoreView.requestUpdate`,{message:t})}get currentEpoch(){return this._epoch}get hasPendingUpdates(){return this._pendingAttributeUpdates.length>0}update(){if(this._locked)return;const t=this._pendingAttributeUpdates;this._pendingAttributeUpdates=[];for(const e of t){const{blockData:t,initArgs:i,sendUpdateEpoch:s,version:r}=e;has("esri-2d-update-debug")&&console.debug(`Version[${this._version}] Epoch[${s}] AttributeStoreView.applyUpdate`),this._version=r,this._epoch=s,null!=i&&this._initialize(i);const a=this._data;for(let e=0;e<t.length;e++){const i=t[e],s=a[e];null!=s&&null!=i&&(has("esri-2d-update-debug")&&console.debug(`Version[${this._version}] CpuBlock[${e}] AttributeStoreView.update`,{block:i}),s.update(i))}}}getUniforms(t){return{filterFlags:{texture:this._getTexture(t,0),unit:d},animation:{texture:this._getTexture(t,1),unit:o},gpgpu:{texture:this._getTexture(t,2),unit:h},localTimeOrigin:{texture:this._getTexture(t,7),unit:u},visualVariableData:{texture:this._getTexture(t,3),unit:n},dataDriven0:{texture:this._getTexture(t,4),unit:a},dataDriven1:{texture:this._getTexture(t,5),unit:r},dataDriven2:{texture:this._getTexture(t,6),unit:s},size:this.size}}_getTexture(t,e){const i=this._data?.[e];return i?(i.updateTexture(t,this._version),i.getTexture(t)):this._getDefaultTexture(t)}_getDefaultTexture(t){if(null==this._defaultTexture){const e=new x(1);e.wrapMode=33071,e.samplingMode=9728,this._defaultTexture=new c(t,e,new Uint8Array(4))}return this._defaultTexture}}export{m as AttributeStoreView};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import"../../../../core/has.js";import{estimateNumberMemory as t}from"../../../../core/memoryEstimations.js";import{List as e}from"./cpuMapped/FreeList.js";import{isHittest as n}from"./shaderGraph/techniques/featureTechniqueUtils.js";import{PrimitiveType as i,DataType as s}from"../../../webgl/enums.js";function a(t,e){return t<<16|255&e}function r(t){return 255&t}class d{constructor(t,e,n,i,s){this.instance=t,this.materialKey=e,this.target=n,this.start=i,this.count=s}get textureKey(){return r(this.materialKey)}get indexEnd(){return this.start+this.count}extend(t){this.count+=t}render(t){this.instance.techniqueRef.render(t,this)}getStencilReference(){return this.target.stencilRef}getAttributePrecisionPackFactors(){const t=this.instance.instanceId;return this.target.getMesh(t).getAttributePrecisionPackFactors()}draw(t,e){n(t)?this.drawCompute(t.context,e):this.drawGeometry(t.context,e)}drawCompute(t,e){const n=this.instance.instanceId,a=this.target.getMesh(n).getComputeVAO(t,e),r=this.start*Uint32Array.BYTES_PER_ELEMENT/3;t.bindVAO(a,e.locations),t.drawElements(i.POINTS,this.count/3,s.UNSIGNED_INT,r),t.bindVAO(null)}drawGeometry(t,e){const n=this.instance.instanceId,a=this.target.getMesh(n).getGeometryVAO(t,e),r=this.start*Uint32Array.BYTES_PER_ELEMENT;t.bindVAO(a,e.locations),t.drawElements(i.TRIANGLES,this.count,s.UNSIGNED_INT,r),t.bindVAO(null)}}class h{constructor(){this._length=0,this._minOrderedLength=0,this._materialKeys=new Set}static fromDisplayEntities(t,e,n,i){const s=new h;for(const r of t.values())for(const t of r.records){const r=n.getInstance(t.instanceId),d=a(r.instanceId,t.textureKey);s.addRecord(r,d,t.indexStart,t.indexCount,t.vertexStart,t.vertexCount,e,i)}return s}get length(){return this._length}get minOrderedLength(){return this._minOrderedLength}get minUnorderedLength(){return this._materialKeys.size}get usedMemory(){return this._length?5*this._length*t:0}render(t,e){const{drawPhase:n}=t;for(const i of this.infos()){const s=i.instance.techniqueRef;s.drawPhase&n&&(null==e||s.type===e)&&i.render(t)}}addRecord(t,n,i,s,a,r,h,o){let l=i,c=s;if(c||(l=a,c=r),!c)return;if(null==this._head){const i=new d(t,n,h,l,c);return this._head=new e(i),this._tail=this._head,this._length++,void this._minOrderedLength++}if(1===o)return this._insert(t,n,h,l,c,this._tail,null);let u=null,_=this._head;const g=t.instanceId,m=t.techniqueRef.symbologyPlane;if(2===o&&(2===m||3===m))return this._insert(t,n,h,l,c,this._tail,null);for(;_;){const e=_.data.instance,i=e.instanceId,s=e.techniqueRef.symbologyPlane,a=u?.data.instance.instanceId;if(m<s||g===a&&g!==i)return this._insert(t,n,h,l,c,u,_);u=_,_=_.next}this._insert(t,n,h,l,c,u,null)}*infos(){if(null!=this._head)for(const t of this._head.values())yield t}_insert(t,n,i,s,a,r,h){if(null==r&&null==h){const r=new d(t,n,i,s,a);return this._head=new e(r),this._tail=this._head,this._length++,void this._minOrderedLength++}return n!==this._tail.data.materialKey&&this._minOrderedLength++,this._materialKeys.add(n),null==r&&null!=h?this._insertAtHead(t,n,i,s,a,h):null!=r&&null==h?this._insertAtEnd(t,n,i,s,a,r):null!=r&&null!=h?this._insertAtMiddle(t,n,i,s,a,r,h):void 0}_insertAtHead(t,n,i,s,a,r){const h=s+a;if(n===r.data.materialKey&&i===r.data.target&&h===r.data.start)r.data.start=s,r.data.count+=a;else{const h=new d(t,n,i,s,a);this._head=new e(h),this._head.next=r,this._length++}}_insertAtEnd(t,n,i,s,a,r){if(r.data.materialKey===n&&r.data.indexEnd===s)r.data.count+=a;else{const h=new d(t,n,i,s,a);this._tail=new e(h),r.next=this._tail,this._length++}}_insertAtMiddle(t,n,i,s,a,r,h){const o=s+a;if(r.data.materialKey===n&&r.data.target===i&&r.data.indexEnd===s)r.data.count+=a,r.data.materialKey===h.data.materialKey&&r.data.target===h.data.target&&r.data.indexEnd===h.data.start&&(r.data.count+=h.data.count,r.next=h.next,this._length--);else if(n===h.data.materialKey&&i===h.data.target&&o===h.data.start)h.data.start=s,h.data.count+=a;else{const o=new d(t,n,i,s,a),l=new e(o);r.next=l,l.next=h,this._length++}}}export{h as DisplayList,d as DisplayListInfo};
2
+ import"../../../../core/has.js";import{estimateNumberMemory as t}from"../../../../core/memoryEstimations.js";import{List as e}from"./cpuMapped/FreeList.js";import{isHittest as n}from"./shaderGraph/techniques/featureTechniqueUtils.js";import{PrimitiveType as i,DataType as s}from"../../../webgl/enums.js";function a(t,e){return t<<16|255&e}function r(t){return 255&t}function d(t,e){return e?e.get(t.instanceId)??t.techniqueRef.symbologyPlane:t.techniqueRef.symbologyPlane}class h{constructor(t,e,n,i,s){this.instance=t,this.materialKey=e,this.target=n,this.start=i,this.count=s}get textureKey(){return r(this.materialKey)}get indexEnd(){return this.start+this.count}extend(t){this.count+=t}render(t){this.instance.techniqueRef.render(t,this)}getStencilReference(){return this.target.stencilRef}getAttributePrecisionPackFactors(){const t=this.instance.instanceId;return this.target.getMesh(t).getAttributePrecisionPackFactors()}draw(t,e){n(t)?this.drawCompute(t.context,e):this.drawGeometry(t.context,e)}drawCompute(t,e){const n=this.instance.instanceId,a=this.target.getMesh(n).getComputeVAO(t,e),r=this.start*Uint32Array.BYTES_PER_ELEMENT/3;t.bindVAO(a,e.locations),t.drawElements(i.POINTS,this.count/3,s.UNSIGNED_INT,r),t.bindVAO(null)}drawGeometry(t,e){const n=this.instance.instanceId,a=this.target.getMesh(n).getGeometryVAO(t,e),r=this.start*Uint32Array.BYTES_PER_ELEMENT;t.bindVAO(a,e.locations),t.drawElements(i.TRIANGLES,this.count,s.UNSIGNED_INT,r),t.bindVAO(null)}}class o{constructor(){this._length=0,this._minOrderedLength=0,this._materialKeys=new Set}static fromDisplayEntities(t,e,n,i){const s=new o,r=n.getInstanceOrder();for(const d of t.values())for(const t of d.records){const d=n.getInstance(t.instanceId),h=a(d.instanceId,t.textureKey);s.addRecord(d,h,t.indexStart,t.indexCount,t.vertexStart,t.vertexCount,e,i,r)}return s}get length(){return this._length}get minOrderedLength(){return this._minOrderedLength}get minUnorderedLength(){return this._materialKeys.size}get usedMemory(){return this._length?5*this._length*t:0}render(t,e){const{drawPhase:n}=t;for(const i of this.infos()){const s=i.instance.techniqueRef;s.drawPhase&n&&(null==e||s.type===e)&&i.render(t)}}addRecord(t,n,i,s,a,r,o,l,c){let u=i,_=s;if(_||(u=a,_=r),!_)return;if(null==this._head){const i=new h(t,n,o,u,_);return this._head=new e(i),this._tail=this._head,this._length++,void this._minOrderedLength++}if(1===l)return this._insert(t,n,o,u,_,this._tail,null);let g=null,m=this._head;const f=t.instanceId,y=d(t,c);if(2===l&&(2===y||3===y))return this._insert(t,n,o,u,_,this._tail,null);for(;m;){const e=m.data.instance,i=e.instanceId,s=d(e,c),a=g?.data.instance.instanceId;if(y<s||f===a&&f!==i)return this._insert(t,n,o,u,_,g,m);g=m,m=m.next}this._insert(t,n,o,u,_,g,null)}*infos(){if(null!=this._head)for(const t of this._head.values())yield t}_insert(t,n,i,s,a,r,d){if(null==r&&null==d){const r=new h(t,n,i,s,a);return this._head=new e(r),this._tail=this._head,this._length++,void this._minOrderedLength++}return n!==this._tail.data.materialKey&&this._minOrderedLength++,this._materialKeys.add(n),null==r&&null!=d?this._insertAtHead(t,n,i,s,a,d):null!=r&&null==d?this._insertAtEnd(t,n,i,s,a,r):null!=r&&null!=d?this._insertAtMiddle(t,n,i,s,a,r,d):void 0}_insertAtHead(t,n,i,s,a,r){const d=s+a;if(n===r.data.materialKey&&i===r.data.target&&d===r.data.start)r.data.start=s,r.data.count+=a;else{const d=new h(t,n,i,s,a);this._head=new e(d),this._head.next=r,this._length++}}_insertAtEnd(t,n,i,s,a,r){if(r.data.materialKey===n&&r.data.indexEnd===s)r.data.count+=a;else{const d=new h(t,n,i,s,a);this._tail=new e(d),r.next=this._tail,this._length++}}_insertAtMiddle(t,n,i,s,a,r,d){const o=s+a;if(r.data.materialKey===n&&r.data.target===i&&r.data.indexEnd===s)r.data.count+=a,r.data.materialKey===d.data.materialKey&&r.data.target===d.data.target&&r.data.indexEnd===d.data.start&&(r.data.count+=d.data.count,r.next=d.next,this._length--);else if(n===d.data.materialKey&&i===d.data.target&&o===d.data.start)d.data.start=s,d.data.count+=a;else{const o=new h(t,n,i,s,a),l=new e(o);r.next=l,l.next=d,this._length++}}}export{o as DisplayList,h as DisplayListInfo};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import"../../../../core/has.js";import{disposeMaybe as e,destroyMaybe as t}from"../../../../core/maybe.js";import{BitBlitRenderer as s}from"./BitBlitRenderer.js";import{backbufferStencilVisible as r}from"./definitions.js";import i from"./MaterialManager.js";import{RenderingDevice as n}from"./RenderingDevice.js";import o from"./TextureManager.js";import{TextureUploadManager as a}from"./TextureUploadManager.js";import{WorldExtentRenderer as f}from"./WorldExtentClipRenderer.js";import{BlendEffect as h}from"./effects/BlendEffect.js";import{FeatureEffect as l}from"./effects/FeatureEffect.js";import c from"./effects/HighlightEffect.js";import{HittestEffect as d}from"./effects/HittestEffect.js";import{EffectManager as u}from"./effects/post-processing/EffectManager.js";import{SimpleMesh as p}from"./meshing/SimpleMesh.js";import{SizedDepthStencilFormat as b}from"../../../webgl/enums.js";import{FramebufferObject as g}from"../../../webgl/FramebufferObject.js";import{Renderbuffer as _}from"../../../webgl/Renderbuffer.js";import{RenderbufferDescriptor as m}from"../../../webgl/RenderbufferDescriptor.js";import{TextureDescriptor as w}from"../../../webgl/TextureDescriptor.js";class M{constructor(e,t){this.context=e,this._blitRenderer=new s,this._worldExtentRenderer=new f,this._lastWidth=null,this._lastHeight=null,this._blendEffect=new h,this._stencilBuf=null,this._prevBeforeLayerFBOStack=[],this._fboPool=[],this.effects={highlight:new c,hittest:new d,insideEffect:new l("inside"),outsideEffect:new l("outside")},this.materialManager=new i(e),this.textureManager=new o(t),this.textureUploadManager=new a(t),this._effectsManager=new u,this._quadMesh=p.fromVertexStream(e,[0,0,1,0,0,1,1,1]),this._renderingDevice=new n}dispose(){if(this.materialManager.dispose(),this.textureManager.dispose(),this.textureUploadManager.destroy(),this._blitRenderer=e(this._blitRenderer),this._worldExtentRenderer=e(this._worldExtentRenderer),this._quadMesh=t(this._quadMesh),this._fbos){let e;for(e in this._fbos)this._fbos[e]&&this._fbos[e].dispose()}for(const e of this._fboPool)e.dispose();if(this._fboPool.length=0,this.effects){let e;for(e in this.effects)this.effects[e]&&this.effects[e].dispose()}this._effectsManager.dispose(),this._blendEffect.dispose(this.context),this._renderingDevice.dispose()}get blitRenderer(){return this._blitRenderer}get quadMesh(){return this._quadMesh}getFbos(){if(!this._fbos)throw new Error("InternalError: Painter FBOs not initialized");return this._fbos}acquireFbo(e,t){let s;if(this._fboPool.length>0)s=this._fboPool.pop();else{const r=new w(e,t);r.samplingMode=9728,r.wrapMode=33071,s=new g(this.context,r,this._stencilBuf)}return s.width===e&&s.height===t||s.resize(e,t),s}releaseFbo(e){this._fboPool.push(e)}getSharedStencilBuffer(){return this._stencilBuf}beforeRenderPhases(e,t,s){const{context:r}=e;this._worldExtentRenderer.render(e,t,s);const{width:i,height:n}=r.getViewport();if(this.updateFBOs(i,n),this._prevFBO=r.getBoundFramebufferObject(),r.bindFramebuffer(this.getFbos().output),r.setColorMask(!0,!0,!0,!0),null!=t){const{r:e,g:s,b:i,a:n}=t;r.setClearColor(n*e/255,n*s/255,n*i/255,n)}else r.setClearColor(0,0,0,0);r.setDepthWriteEnabled(!0),r.setClearDepth(1),r.clear(16640),r.setDepthWriteEnabled(!1)}afterRenderPhases(e){const{context:t}=e;t.bindFramebuffer(this._prevFBO),t.setStencilFunction(514,r,255),t.setStencilTestEnabled(!0),t.setDepthTestEnabled(!1),this.blitTexture(t,this.getFbos().output.colorTexture,9728)}beforeRenderLayer(e,t,s){const{context:r,blendMode:i,effects:n,drawPhase:o,requireFBO:a}=e;if(r.setClearColor(0,0,0,0),a||E(o,i,n,s)){const e=r.getBoundFramebufferObject();this._prevBeforeLayerFBOStack.push(e);const{width:t,height:s}=r.getViewport(),i=this.acquireFbo(t,s);r.bindFramebuffer(i),r.setColorMask(!0,!0,!0,!0),r.setClearColor(0,0,0,0),r.setDepthWriteEnabled(!0),r.setClearDepth(1),r.clear(16640),r.setDepthWriteEnabled(!1)}r.setDepthWriteEnabled(!1),r.setDepthTestEnabled(!1),r.setStencilTestEnabled(!0),r.setClearStencil(t),r.setStencilWriteMask(255),r.clear(1024)}afterRenderLayer(e,t){const{context:s,blendMode:r,effects:i,requireFBO:n,drawPhase:o}=e;if(n||E(o,r,i,t)){const n=s.getBoundFramebufferObject();null!=i&&i.length>0&&1===o&&(s.setColorMask(!0,!0,!0,!0),this._applyEffects(e,i,n)),s.bindFramebuffer(this._prevBeforeLayerFBOStack.pop()),s.setStencilTestEnabled(!1),s.setStencilWriteMask(0),s.setBlendingEnabled(!0),s.setBlendFunctionSeparate(1,771,1,771),s.setColorMask(!0,!0,!0,!0);const a=null==r||16===o||2===o||128===o?"normal":r;this._blendEffect.draw(e,n.colorTexture,9728,a,t),this.releaseFbo(n)}}blitTexture(e,t,s,r=1){e.setBlendingEnabled(!0),e.setBlendFunctionSeparate(1,771,1,771),e.setColorMask(!0,!0,!0,!0),this._blitRenderer.render(e,t,s,r),this._renderingDevice.setPipelineStateNeedsUpdate(!0)}getPostProcessingEffects(e){return this._effectsManager.getPostProcessingEffects(e)}updateFBOs(e,t){if(e!==this._lastWidth||t!==this._lastHeight){if(this._lastWidth=e,this._lastHeight=t,this._fbos){let s;for(s in this._fbos)this._fbos[s].resize(e,t);return}const s=new w(e,t);s.samplingMode=9728,s.wrapMode=33071;const r=new m(b.DEPTH24_STENCIL8,e,t);this._stencilBuf=new _(this.context,r),this._fbos={output:new g(this.context,s,this._stencilBuf),effect0:new g(this.context,s,this._stencilBuf)}}}_applyEffects(e,t,s){const{context:r}=e,i=this._effectsManager.getPostProcessingEffects(t);for(const{postProcessingTechnique:n,effect:o}of i)r.bindFramebuffer(s),n.render(e,{layerFBO:s,effect:o});this._renderingDevice.setPipelineStateNeedsUpdate(!0)}setShader(e){return this._renderingDevice.setShader(e)}clearShaderCache(){this._renderingDevice.clearShaderCache()}getProgramCache(){return this._renderingDevice.getProgramCache()}setPipelineState(e){return this._renderingDevice.setPipelineState(e)}getPipelineState(){return this._renderingDevice.getPipelineState()}submitDraw(e,t,s){return this._renderingDevice.submitDraw(e,t,s)}submitDrawMesh(e,t,s,r){this._renderingDevice.submitDrawMesh(e,t,s,r)}submitDrawMeshUntyped(e,t,s,r){this._renderingDevice.submitDrawMeshUntyped(e,t,s,r)}updatePipelineState(e){return this._renderingDevice.updatePipelineState(e)}setStencilRef(e,t){return this._renderingDevice.setStencilRef(e,t)}}function E(e,t,s,r){return 4!==e&&2!==e&&16!==e&&128!==e&&(1!==r||null!=t&&"normal"!==t||null!=s&&s.length>0)}export{M as default};
2
+ import"../../../../core/has.js";import{disposeMaybe as e,destroyMaybe as t}from"../../../../core/maybe.js";import{BitBlitRenderer as s}from"./BitBlitRenderer.js";import{backbufferStencilVisible as r}from"./definitions.js";import i from"./MaterialManager.js";import{RenderingDevice as n}from"./RenderingDevice.js";import o from"./TextureManager.js";import{TextureUploadManager as a}from"./TextureUploadManager.js";import{WorldExtentRenderer as f}from"./WorldExtentClipRenderer.js";import{BlendEffect as h}from"./effects/BlendEffect.js";import{FeatureEffect as l}from"./effects/FeatureEffect.js";import c from"./effects/HighlightEffect.js";import{HittestEffect as d}from"./effects/HittestEffect.js";import{EffectManager as u}from"./effects/post-processing/EffectManager.js";import{SimpleMesh as p}from"./meshing/SimpleMesh.js";import{SizedDepthStencilFormat as b}from"../../../webgl/enums.js";import{DisposableFramebufferObject as g}from"../../../webgl/FramebufferObject.js";import{Renderbuffer as _}from"../../../webgl/Renderbuffer.js";import{RenderbufferDescriptor as m}from"../../../webgl/RenderbufferDescriptor.js";import{TextureDescriptor as w}from"../../../webgl/TextureDescriptor.js";class M{constructor(e,t){this.context=e,this._blitRenderer=new s,this._worldExtentRenderer=new f,this._lastWidth=null,this._lastHeight=null,this._blendEffect=new h,this._stencilBuf=null,this._prevBeforeLayerFBOStack=[],this._fboPool=[],this.effects={highlight:new c,hittest:new d,insideEffect:new l("inside"),outsideEffect:new l("outside")},this.materialManager=new i(e),this.textureManager=new o(t),this.textureUploadManager=new a(t),this._effectsManager=new u,this._quadMesh=p.fromVertexStream(e,[0,0,1,0,0,1,1,1]),this._renderingDevice=new n}dispose(){if(this.materialManager.dispose(),this.textureManager.dispose(),this.textureUploadManager.destroy(),this._blitRenderer=e(this._blitRenderer),this._worldExtentRenderer=e(this._worldExtentRenderer),this._quadMesh=t(this._quadMesh),this._fbos){let e;for(e in this._fbos)this._fbos[e]&&this._fbos[e].dispose()}for(const e of this._fboPool)e.dispose();if(this._fboPool.length=0,this.effects){let e;for(e in this.effects)this.effects[e]&&this.effects[e].dispose()}this._effectsManager.dispose(),this._blendEffect.dispose(this.context),this._renderingDevice.dispose()}get blitRenderer(){return this._blitRenderer}get quadMesh(){return this._quadMesh}getFbos(){if(!this._fbos)throw new Error("InternalError: Painter FBOs not initialized");return this._fbos}acquireFbo(e,t){let s;if(this._fboPool.length>0)s=this._fboPool.pop();else{const r=new w(e,t);r.samplingMode=9728,r.wrapMode=33071,s=new g(this.context,r,this._stencilBuf)}return s.width===e&&s.height===t||s.resize(e,t),s}releaseFbo(e){this._fboPool.push(e)}getSharedStencilBuffer(){return this._stencilBuf}beforeRenderPhases(e,t,s){const{context:r}=e;this._worldExtentRenderer.render(e,t,s);const{width:i,height:n}=r.getViewport();if(this.updateFBOs(i,n),this._prevFBO=r.boundFramebuffer,r.bindFramebuffer(this.getFbos().output),r.setColorMask(!0,!0,!0,!0),null!=t){const{r:e,g:s,b:i,a:n}=t;r.setClearColor(n*e/255,n*s/255,n*i/255,n)}else r.setClearColor(0,0,0,0);r.setDepthWriteEnabled(!0),r.setClearDepth(1),r.clear(16640),r.setDepthWriteEnabled(!1)}afterRenderPhases(e){const{context:t}=e;t.bindFramebuffer(this._prevFBO),t.setStencilFunction(514,r,255),t.setStencilTestEnabled(!0),t.setDepthTestEnabled(!1),this.blitTexture(t,this.getFbos().output.colorTexture,9728)}beforeRenderLayer(e,t,s){const{context:r,blendMode:i,effects:n,drawPhase:o,requireFBO:a}=e;if(r.setClearColor(0,0,0,0),a||E(o,i,n,s)){const e=r.boundFramebuffer;this._prevBeforeLayerFBOStack.push(e);const{width:t,height:s}=r.getViewport(),i=this.acquireFbo(t,s);r.bindFramebuffer(i),r.setColorMask(!0,!0,!0,!0),r.setClearColor(0,0,0,0),r.setDepthWriteEnabled(!0),r.setClearDepth(1),r.clear(16640),r.setDepthWriteEnabled(!1)}r.setDepthWriteEnabled(!1),r.setDepthTestEnabled(!1),r.setStencilTestEnabled(!0),r.setClearStencil(t),r.setStencilWriteMask(255),r.clear(1024)}afterRenderLayer(e,t){const{context:s,blendMode:r,effects:i,requireFBO:n,drawPhase:o}=e;if(n||E(o,r,i,t)){const n=s.boundFramebuffer;if(null==n)return;null!=i&&i.length>0&&1===o&&(s.setColorMask(!0,!0,!0,!0),this._applyEffects(e,i,n)),s.bindFramebuffer(this._prevBeforeLayerFBOStack.pop()),s.setStencilTestEnabled(!1),s.setStencilWriteMask(0),s.setBlendingEnabled(!0),s.setBlendFunctionSeparate(1,771,1,771),s.setColorMask(!0,!0,!0,!0);const a=null==r||16===o||2===o||128===o?"normal":r;this._blendEffect.draw(e,n.colorTexture,9728,a,t),this.releaseFbo(n)}}blitTexture(e,t,s,r=1){e.setBlendingEnabled(!0),e.setBlendFunctionSeparate(1,771,1,771),e.setColorMask(!0,!0,!0,!0),this._blitRenderer.render(e,t,s,r),this._renderingDevice.setPipelineStateNeedsUpdate(!0)}getPostProcessingEffects(e){return this._effectsManager.getPostProcessingEffects(e)}updateFBOs(e,t){if(e!==this._lastWidth||t!==this._lastHeight){if(this._lastWidth=e,this._lastHeight=t,this._fbos){let s;for(s in this._fbos)this._fbos[s].resize(e,t);return}const s=new w(e,t);s.samplingMode=9728,s.wrapMode=33071;const r=new m(b.DEPTH24_STENCIL8,e,t);this._stencilBuf=new _(this.context,r),this._fbos={output:new g(this.context,s,this._stencilBuf),effect0:new g(this.context,s,this._stencilBuf)}}}_applyEffects(e,t,s){const{context:r}=e,i=this._effectsManager.getPostProcessingEffects(t);for(const{postProcessingTechnique:n,effect:o}of i)r.bindFramebuffer(s),n.render(e,{layerFBO:s,effect:o});this._renderingDevice.setPipelineStateNeedsUpdate(!0)}setShader(e){return this._renderingDevice.setShader(e)}clearShaderCache(){this._renderingDevice.clearShaderCache()}getProgramCache(){return this._renderingDevice.getProgramCache()}setPipelineState(e){return this._renderingDevice.setPipelineState(e)}getPipelineState(){return this._renderingDevice.getPipelineState()}submitDraw(e,t,s){return this._renderingDevice.submitDraw(e,t,s)}submitDrawMesh(e,t,s,r){this._renderingDevice.submitDrawMesh(e,t,s,r)}submitDrawMeshUntyped(e,t,s,r){this._renderingDevice.submitDrawMeshUntyped(e,t,s,r)}updatePipelineState(e){return this._renderingDevice.updatePipelineState(e)}setStencilRef(e,t){return this._renderingDevice.setStencilRef(e,t)}}function E(e,t,s,r){return 4!==e&&2!==e&&16!==e&&128!==e&&(1!==r||null!=t&&"normal"!==t||null!=s&&s.length>0)}export{M as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{disposeMaybe as e}from"../../../../core/maybe.js";import{create as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import o from"../../../../geometry/Point.js";import{load as s,execute as i}from"../../../../geometry/operators/projectOperator.js";import{DisplayObject as a}from"../DisplayObject.js";import{VideoScreenTechnique as n}from"./shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js";import{ColorAttachment0 as c,SizedPixelFormat as d}from"../../../webgl/enums.js";import{FramebufferObject as h}from"../../../webgl/FramebufferObject.js";import u from"../../../webgl/Texture.js";import{TextureDescriptor as l}from"../../../webgl/TextureDescriptor.js";class m extends a{constructor(e,t){super(),this._controlPointsOwner=t,this.readbackScreenCoords=r(),this.videoTextureCoords=new Array(36),this.overlayTextureCoords=new Array(36),this._prevFBO=null,this._acquiredFBO=null,this._isBound=!1,this._hasCoordinates=!1,this._geIsLoaded=!1,this._ndcRect=[0,0,2,2],this._technique=new n,this.visible=!1,this.stage=e;for(let r=0;r<6;r++){const e=r/5;for(let t=0;t<6;t++){const o=t/5;this.videoTextureCoords[6*r+t]={u:o,v:e}}}}getMesh(e){throw new Error("Method not implemented.")}destroy(){super.destroy(),e(this._readbackTexture)}bind(e){const{context:t,pixelRatio:r,state:o}=e;if(this._update(e),!this.ready||0===this.readbackScreenCoords[2]||0===this.readbackScreenCoords[3])return this.requestRender(),!1;const{size:s}=o,i=Math.round(r*s[0]),a=Math.round(r*s[1]),n=new l(i,a);return n.samplingMode=9729,n.wrapMode=33071,this._acquiredFBO||(this._acquiredFBO=new h(t,n)),this._acquiredFBO.resize(i,a),t.bindFramebuffer(this._acquiredFBO),this._isBound=!0,!0}unbind(e){if(!this._isBound)return;const{context:t,pixelRatio:r,state:o}=e,{size:s}=o,i=this._acquiredFBO;if(!i.getColorTexture(c))throw new Error("Failed to get color texture from FBO.");const a=this._getReadbackTexture(e),n=this.readbackScreenCoords,d=Math.round(r*n[0]),h=Math.round(r*(s[1]-n[1]))-a.descriptor.height,u=d+a.descriptor.width,l=h+a.descriptor.height,m=Math.max(d,0),_=Math.max(h,0),b=Math.min(u,i.width)-m,f=Math.min(l,i.height)-_;b>0&&f>0&&i.copyToTexture(m,_,b,f,m-d,_-h,a),t.bindFramebuffer(this._prevFBO)}_update(e){const{state:r}=e,a=this._controlPointsOwner,n=a.groundControlPoints(),c=a.getSize(),d=r.size,h=n?.length;if(!h)return;if(s().then(()=>{this._geIsLoaded=!0}),!this._geIsLoaded)return void this.requestRender();const u=c[0],l=c[1],m=d[0],_=l/d[1],b=u/m;if(_>b){const e=b/_*2,t=(2-e)/2;this._ndcRect[0]=-1+t,this._ndcRect[1]=1,this._ndcRect[2]=e,this._ndcRect[3]=2}else{const e=_/b*2,t=(2-e)/2;this._ndcRect[0]=-1,this._ndcRect[1]=1-t,this._ndcRect[2]=2,this._ndcRect[3]=e}const f=new Array(h),x=r.spatialReference;for(let t=0;t<h;t++){const{lat:e,lon:r}=n[t],s=new o(r,e);f[t]=i(s,x)}const p=[];let M=1/0,g=1/0,w=-1/0,C=-1/0;for(const o of f){const e=t();r.toScreen(e,o.x,o.y),p.push({x:e[0],y:e[1]}),M=Math.min(M,e[0]),g=Math.min(g,e[1]),w=Math.max(w,e[0]),C=Math.max(C,e[1])}const R=[M,C],k=[w,g];this.readbackScreenCoords[0]=Math.max(Math.floor(R[0]),0),this.readbackScreenCoords[1]=Math.max(Math.floor(k[1]),0),this.readbackScreenCoords[2]=Math.ceil(k[0]),this.readbackScreenCoords[3]=Math.ceil(R[1]);for(let t=0;t<p.length;t++){const e=p[t],r=(e.x-M)/(w-M),o=(C-e.y)/(C-g);this.overlayTextureCoords[t]={u:r,v:o}}this._hasCoordinates=!0}_createTransforms(){return null}doRender(e){this._readbackTexture&&this._hasCoordinates?this._technique.render(e,{texture:this._readbackTexture,textureCoords:this.overlayTextureCoords,opacity:1,ndcRect:this._ndcRect}):this.requestRender()}_getReadbackTexture(e){const{context:t,pixelRatio:r}=e,o=Math.round(r*Math.abs(this.readbackScreenCoords[2]-this.readbackScreenCoords[0])),s=Math.round(r*Math.abs(this.readbackScreenCoords[3]-this.readbackScreenCoords[1]));if(this._readbackTexture)this._readbackTexture.resize(o,s);else{const e=new l(o,s);e.wrapMode=33071,e.internalFormat=d.RGBA8,this._readbackTexture=new u(t,e)}return this._readbackTexture}}export{m as default};
2
+ import{disposeMaybe as e}from"../../../../core/maybe.js";import{create as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import o from"../../../../geometry/Point.js";import{load as s,execute as i}from"../../../../geometry/operators/projectOperator.js";import{DisplayObject as a}from"../DisplayObject.js";import{VideoScreenTechnique as n}from"./shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js";import{ColorAttachment0 as c,SizedPixelFormat as d}from"../../../webgl/enums.js";import{DisposableFramebufferObject as h}from"../../../webgl/FramebufferObject.js";import u from"../../../webgl/Texture.js";import{TextureDescriptor as l}from"../../../webgl/TextureDescriptor.js";class m extends a{constructor(e,t){super(),this._controlPointsOwner=t,this.readbackScreenCoords=r(),this.videoTextureCoords=new Array(36),this.overlayTextureCoords=new Array(36),this._prevFBO=null,this._acquiredFBO=null,this._isBound=!1,this._hasCoordinates=!1,this._geIsLoaded=!1,this._ndcRect=[0,0,2,2],this._technique=new n,this.visible=!1,this.stage=e;for(let r=0;r<6;r++){const e=r/5;for(let t=0;t<6;t++){const o=t/5;this.videoTextureCoords[6*r+t]={u:o,v:e}}}}getMesh(e){throw new Error("Method not implemented.")}destroy(){super.destroy(),e(this._readbackTexture)}bind(e){const{context:t,pixelRatio:r,state:o}=e;if(this._update(e),!this.ready||0===this.readbackScreenCoords[2]||0===this.readbackScreenCoords[3])return this.requestRender(),!1;const{size:s}=o,i=Math.round(r*s[0]),a=Math.round(r*s[1]),n=new l(i,a);return n.samplingMode=9729,n.wrapMode=33071,this._acquiredFBO??=new h(t,n),this._acquiredFBO.resize(i,a),t.bindFramebuffer(this._acquiredFBO),this._isBound=!0,!0}unbind(e){if(!this._isBound)return;const{context:t,pixelRatio:r,state:o}=e,{size:s}=o,i=this._acquiredFBO;if(!i.getColorTexture(c))throw new Error("Failed to get color texture from FBO.");const a=this._getReadbackTexture(e),n=this.readbackScreenCoords,d=Math.round(r*n[0]),h=Math.round(r*(s[1]-n[1]))-a.descriptor.height,u=d+a.descriptor.width,l=h+a.descriptor.height,m=Math.max(d,0),_=Math.max(h,0),b=Math.min(u,i.width)-m,f=Math.min(l,i.height)-_;b>0&&f>0&&i.copyToTexture(m,_,b,f,m-d,_-h,a),t.bindFramebuffer(this._prevFBO)}_update(e){const{state:r}=e,a=this._controlPointsOwner,n=a.groundControlPoints(),c=a.getSize(),d=r.size,h=n?.length;if(!h)return;if(s().then(()=>{this._geIsLoaded=!0}),!this._geIsLoaded)return void this.requestRender();const u=c[0],l=c[1],m=d[0],_=l/d[1],b=u/m;if(_>b){const e=b/_*2,t=(2-e)/2;this._ndcRect[0]=-1+t,this._ndcRect[1]=1,this._ndcRect[2]=e,this._ndcRect[3]=2}else{const e=_/b*2,t=(2-e)/2;this._ndcRect[0]=-1,this._ndcRect[1]=1-t,this._ndcRect[2]=2,this._ndcRect[3]=e}const f=new Array(h),x=r.spatialReference;for(let t=0;t<h;t++){const{lat:e,lon:r}=n[t],s=new o(r,e);f[t]=i(s,x)}const p=[];let M=1/0,g=1/0,w=-1/0,C=-1/0;for(const o of f){const e=t();r.toScreen(e,o.x,o.y),p.push({x:e[0],y:e[1]}),M=Math.min(M,e[0]),g=Math.min(g,e[1]),w=Math.max(w,e[0]),C=Math.max(C,e[1])}const R=[M,C],k=[w,g];this.readbackScreenCoords[0]=Math.max(Math.floor(R[0]),0),this.readbackScreenCoords[1]=Math.max(Math.floor(k[1]),0),this.readbackScreenCoords[2]=Math.ceil(k[0]),this.readbackScreenCoords[3]=Math.ceil(R[1]);for(let t=0;t<p.length;t++){const e=p[t],r=(e.x-M)/(w-M),o=(C-e.y)/(C-g);this.overlayTextureCoords[t]={u:r,v:o}}this._hasCoordinates=!0}_createTransforms(){return null}doRender(e){this._readbackTexture&&this._hasCoordinates?this._technique.render(e,{texture:this._readbackTexture,textureCoords:this.overlayTextureCoords,opacity:1,ndcRect:this._ndcRect}):this.requestRender()}_getReadbackTexture(e){const{context:t,pixelRatio:r}=e,o=Math.round(r*Math.abs(this.readbackScreenCoords[2]-this.readbackScreenCoords[0])),s=Math.round(r*Math.abs(this.readbackScreenCoords[3]-this.readbackScreenCoords[1]));if(this._readbackTexture)this._readbackTexture.resize(o,s);else{const e=new l(o,s);e.wrapMode=33071,e.internalFormat=d.RGBA8,this._readbackTexture=new u(t,e)}return this._readbackTexture}}export{m as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{Effect as e}from"./Effect.js";class t extends e{constructor(e){super(),this.name=this.constructor.name,this.defines=[e]}dispose(){}bind({context:e,painter:t}){this._prev=e.getBoundFramebufferObject();const r=t.getFbos().effect0;e.bindFramebuffer(r),e.setColorMask(!0,!0,!0,!0),e.setClearColor(0,0,0,0),e.clear(16384)}unbind(){}draw(e,t){const{context:r,painter:s}=e,n=s.getPostProcessingEffects(t),o=r.getBoundFramebufferObject();for(const{postProcessingTechnique:c,effect:f}of n)c.render(e,{layerFBO:o,effect:f});r.bindFramebuffer(this._prev),r.setStencilTestEnabled(!1),s.blitTexture(r,o.colorTexture,9728),r.setStencilTestEnabled(!0)}}export{t as FeatureEffect};
2
+ import{Effect as e}from"./Effect.js";class t extends e{constructor(e){super(),this.name=this.constructor.name,this.defines=[e]}dispose(){}bind({context:e,painter:t}){this._prev=e.boundFramebuffer;const r=t.getFbos().effect0;e.bindFramebuffer(r),e.setColorMask(!0,!0,!0,!0),e.setClearColor(0,0,0,0),e.clear(16384)}unbind(){}draw(e,t){const{context:r,painter:s}=e,n=s.getPostProcessingEffects(t),o=r.boundFramebuffer;if(o){for(const{postProcessingTechnique:t,effect:r}of n)t.render(e,{layerFBO:o,effect:r});r.bindFramebuffer(this._prev),r.setStencilTestEnabled(!1),s.blitTexture(r,o.colorTexture,9728),r.setStencilTestEnabled(!0)}}}export{t as FeatureEffect};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import"../../../../../core/has.js";import{BitBlitRenderer as e}from"../BitBlitRenderer.js";import{Effect as t}from"./Effect.js";import s from"./highlight/HighlightRenderer.js";import r from"./highlight/HighlightSurfaces.js";const i=4,h=4/i;class d extends t{constructor(){super(...arguments),this.defines=["highlight"],this._hlRenderer=new s,this._width=void 0,this._height=void 0,this._boundFBO=null,this._hlSurfaces=new r,this._adjustedWidth=void 0,this._adjustedHeight=void 0,this._blitRenderer=new e}dispose(){this._hlSurfaces?.dispose(),this._hlRenderer?.dispose(),this._boundFBO=null}bind(e){const{context:t,painter:s}=e,{width:r,height:i}=t.getViewport(),h=s.getFbos().effect0;this.setup(e,r,i),t.bindFramebuffer(h),t.setColorMask(!0,!0,!0,!0),t.setClearColor(0,0,0,0),t.clear(16384)}unbind(){}setup({context:e},t,s){this._width=t,this._height=s;const r=t%i,d=s%i;t+=r<i/2?-r:i-r,s+=d<i/2?-d:i-d,this._adjustedWidth=t,this._adjustedHeight=s,this._boundFBO=e.getBoundFramebufferObject();const l=Math.round(t*h),o=Math.round(s*h);this._hlRenderer.setup(e,l,o),this._hlSurfaces.setup(e,l,o)}draw(e){const{context:t,passOptions:s}=e,r=s.activeGradient,i=t.getBoundFramebufferObject();t.setViewport(0,0,this._adjustedWidth*h,this._adjustedHeight*h),t.bindFramebuffer(this._hlSurfaces.sharedBlur1Fbo),t.setStencilTestEnabled(!1),t.setClearColor(0,0,0,0),t.clear(16384),this._blitRenderer.render(t,i.colorTexture,9728,1),t.setStencilTestEnabled(!1),t.setBlendingEnabled(!1),t.setColorMask(!1,!1,!1,!0),t.bindFramebuffer(this._hlSurfaces.sharedBlur2Fbo),t.setClearColor(0,0,0,0),t.clear(16384),this._hlRenderer.preBlur(t,this._hlSurfaces.sharedBlur1Tex),t.bindFramebuffer(this._hlSurfaces.sharedBlur1Fbo),t.setClearColor(0,0,0,0),t.clear(16384),this._hlRenderer.finalBlur(t,this._hlSurfaces.sharedBlur2Tex),t.bindFramebuffer(this._boundFBO),t.setBlendingEnabled(!0),t.setColorMask(!0,!0,!0,!0),t.setViewport(0,0,this._width,this._height),this._hlRenderer.renderHighlight(t,this._hlSurfaces.sharedBlur1Tex,r),this._boundFBO=null}}export{d as default};
2
+ import"../../../../../core/has.js";import{BitBlitRenderer as e}from"../BitBlitRenderer.js";import{Effect as t}from"./Effect.js";import s from"./highlight/HighlightRenderer.js";import r from"./highlight/HighlightSurfaces.js";const i=4,h=4/i;class d extends t{constructor(){super(...arguments),this.defines=["highlight"],this._hlRenderer=new s,this._width=void 0,this._height=void 0,this._hlSurfaces=new r,this._adjustedWidth=void 0,this._adjustedHeight=void 0,this._blitRenderer=new e}dispose(){this._hlSurfaces?.dispose(),this._hlRenderer?.dispose(),this._boundFBO=null}bind(e){const{context:t,painter:s}=e,{width:r,height:i}=t.getViewport(),h=s.getFbos().effect0;this.setup(e,r,i),t.bindFramebuffer(h),t.setColorMask(!0,!0,!0,!0),t.setClearColor(0,0,0,0),t.clear(16384)}unbind(){}setup({context:e},t,s){this._width=t,this._height=s;const r=t%i,d=s%i;t+=r<i/2?-r:i-r,s+=d<i/2?-d:i-d,this._adjustedWidth=t,this._adjustedHeight=s,this._boundFBO=e.boundFramebuffer;const l=Math.round(t*h),o=Math.round(s*h);this._hlRenderer.setup(e,l,o),this._hlSurfaces.setup(e,l,o)}draw(e){const{context:t,passOptions:s}=e,r=s.activeGradient,i=t.boundFramebuffer;t.setViewport(0,0,this._adjustedWidth*h,this._adjustedHeight*h),t.bindFramebuffer(this._hlSurfaces.sharedBlur1Fbo),t.setStencilTestEnabled(!1),t.setClearColor(0,0,0,0),t.clear(16384),this._blitRenderer.render(t,i?.colorTexture,9728,1),t.setStencilTestEnabled(!1),t.setBlendingEnabled(!1),t.setColorMask(!1,!1,!1,!0),t.bindFramebuffer(this._hlSurfaces.sharedBlur2Fbo),t.setClearColor(0,0,0,0),t.clear(16384),this._hlRenderer.preBlur(t,this._hlSurfaces.sharedBlur1Tex),t.bindFramebuffer(this._hlSurfaces.sharedBlur1Fbo),t.setClearColor(0,0,0,0),t.clear(16384),this._hlRenderer.finalBlur(t,this._hlSurfaces.sharedBlur2Tex),t.bindFramebuffer(this._boundFBO),t.setBlendingEnabled(!0),t.setColorMask(!0,!0,!0,!0),t.setViewport(0,0,this._width,this._height),this._hlRenderer.renderHighlight(t,this._hlSurfaces.sharedBlur1Tex,r),this._boundFBO=null}}export{d as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{FramebufferObject as r}from"../../../../../webgl/FramebufferObject.js";import{RenderbufferDescriptor as e}from"../../../../../webgl/RenderbufferDescriptor.js";import{TextureDescriptor as s}from"../../../../../webgl/TextureDescriptor.js";function t(t,o,i){const h=new s(o,i);return h.wrapMode=33071,new r(t,h,new e(36168,o,i))}class o{constructor(){this._width=void 0,this._height=void 0,this._resources=null}dispose(){this._resources&&(this._resources.sharedBlur1Fbo.dispose(),this._resources.sharedBlur2Fbo.dispose(),this._resources=null)}_initialize(r,e,s){this._width=e,this._height=s;const o=t(r,e,s),i=t(r,e,s);this._resources={sharedBlur1Fbo:o,sharedBlur2Fbo:i}}setup(r,e,s){!this._resources||this._width===e&&this._height===s||this.dispose(),this._resources||this._initialize(r,e,s)}get sharedBlur1Tex(){return this._resources.sharedBlur1Fbo.colorTexture}get sharedBlur1Fbo(){return this._resources.sharedBlur1Fbo}get sharedBlur2Tex(){return this._resources.sharedBlur2Fbo.colorTexture}get sharedBlur2Fbo(){return this._resources.sharedBlur2Fbo}}export{o as default};
2
+ import{DisposableFramebufferObject as r}from"../../../../../webgl/FramebufferObject.js";import{RenderbufferDescriptor as e}from"../../../../../webgl/RenderbufferDescriptor.js";import{TextureDescriptor as s}from"../../../../../webgl/TextureDescriptor.js";function t(t,o,i){const h=new s(o,i);return h.wrapMode=33071,new r(t,h,new e(36168,o,i))}class o{constructor(){this._width=void 0,this._height=void 0,this._resources=null}dispose(){this._resources&&(this._resources.sharedBlur1Fbo.dispose(),this._resources.sharedBlur2Fbo.dispose(),this._resources=null)}_initialize(r,e,s){this._width=e,this._height=s;const o=t(r,e,s),i=t(r,e,s);this._resources={sharedBlur1Fbo:o,sharedBlur2Fbo:i}}setup(r,e,s){!this._resources||this._width===e&&this._height===s||this.dispose(),this._resources||this._initialize(r,e,s)}get sharedBlur1Tex(){return this._resources.sharedBlur1Fbo.colorTexture}get sharedBlur1Fbo(){return this._resources.sharedBlur1Fbo}get sharedBlur2Tex(){return this._resources.sharedBlur2Fbo.colorTexture}get sharedBlur2Fbo(){return this._resources.sharedBlur2Fbo}}export{o as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{numericHash as t}from"../../../../../../core/string.js";import{FeatureTechniqueInstance as e}from"./TechniqueInstance.js";import{castInstanceId as s}from"./mesh/instanceIdUtils.js";class n{constructor(){this._instanceById=new Map}destroy(){this._instanceById.clear()}get size(){return this._instanceById.size}entries(){return this._instanceById.entries()}find(t){for(const e of this.values())if(e.techniqueRef.type===t)return e;return null}updateStart(t){t&&(this._instanceByIdNext=new Map,this._shaderCountByMesh=new Map,this._shaderIndices=new Map)}updateEnd(t){if(t){if(!this._instanceByIdNext)throw new Error("InternalError: Found updateEnd call without corresponding updateStart");for(const t of this._instanceById.keys())this._instanceByIdNext.has(t)||this._instanceById.delete(t);for(const[t,e]of this._instanceByIdNext.entries()){const s=this._instanceById.get(t);s?s.setInput(e.getInput()):this._instanceById.set(t,e)}this._instanceByIdNext=null,this._shaderCountByMesh=null,this._shaderIndices=null}}values(){return this._instanceById.values()}ensureInstance(n,i){let r;if("object"==typeof i&&"optionalAttributes"in i&&"uniforms"in i){const t=`${n.type}.${JSON.stringify(i.optionalAttributes)}`,e=t+`.${JSON.stringify(i.uniforms)}`;let s=0;null!=this._instanceByIdNext&&(this._shaderIndices.has(e)?s=this._shaderIndices.get(e):(s=this._shaderCountByMesh.get(t)??0,this._shaderCountByMesh.set(t,s+1),this._shaderIndices.set(e,s))),r=t+`.${s}`}else r=`${n.type}.${JSON.stringify(i)}`;const a=t(r);if(this._instanceByIdNext){const t=new e(s(a),n,i);return this._instanceByIdNext.set(a,t),t}if(!this._instanceById.has(a)){const t=new e(s(a),n,i);this._instanceById.set(a,t)}return this._instanceById.get(a)}getInstance(t){const e=this._instanceById.get(t);if(null==e)throw new Error(`InternalError: Unable to get instance for ${t}`);return e}}export{n as default};
2
+ import{numericHash as t}from"../../../../../../core/string.js";import{FeatureTechniqueInstance as e}from"./TechniqueInstance.js";import{castInstanceId as n}from"./mesh/instanceIdUtils.js";class s{constructor(){this._instanceById=new Map}destroy(){this._instanceById.clear()}get size(){return this._instanceById.size}entries(){return this._instanceById.entries()}find(t){for(const e of this.values())if(e.techniqueRef.type===t)return e;return null}updateStart(t){t&&(this._instanceByIdNext=new Map,this._shaderCountByMesh=new Map,this._shaderIndices=new Map,this._instanceIdToOrder=null)}updateEnd(t){if(t){if(!this._instanceByIdNext)throw new Error("InternalError: Found updateEnd call without corresponding updateStart");for(const t of this._instanceById.keys())this._instanceByIdNext.has(t)||this._instanceById.delete(t);for(const[t,e]of this._instanceByIdNext.entries()){const n=this._instanceById.get(t);n?n.setInput(e.getInput()):this._instanceById.set(t,e)}this._instanceByIdNext=null,this._shaderCountByMesh=null,this._shaderIndices=null}}values(){return this._instanceById.values()}ensureInstance(s,i,r){let a;if("object"==typeof i&&"optionalAttributes"in i&&"uniforms"in i&&null===r){const t=`${s.type}.${JSON.stringify(i.optionalAttributes)}`,e=t+`.${JSON.stringify(i.uniforms)}`;let n=0;null!=this._instanceByIdNext&&(this._shaderIndices.has(e)?n=this._shaderIndices.get(e):(n=this._shaderCountByMesh.get(t)??0,this._shaderCountByMesh.set(t,n+1),this._shaderIndices.set(e,n))),a=t+`.${n}`}else{const t=r?`${r.name}.${r.index}`:"";a=`${s.type}.${JSON.stringify(i)}.${t}`}const d=t(a);if(null!=r&&this._ensureInstanceIdToOrder(d,r),this._instanceByIdNext){const t=new e(n(d),s,i);return this._instanceByIdNext.set(d,t),t}if(!this._instanceById.has(d)){const t=new e(n(d),s,i);this._instanceById.set(d,t)}return this._instanceById.get(d)}getInstance(t){const e=this._instanceById.get(t);if(null==e)throw new Error(`InternalError: Unable to get instance for ${t}`);return e}getInstanceOrder(){return this._instanceIdToOrder}_ensureInstanceIdToOrder(t,e){null==this._instanceIdToOrder&&(this._instanceIdToOrder=new Map),this._instanceIdToOrder.set(t,e.index)}}export{s as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{FeatureTechniqueInstance as e}from"./TechniqueInstance.js";import{Techniques as i}from"./TechniqueRegistry.js";import{castInstanceId as t}from"./mesh/instanceIdUtils.js";let n=0;function a(i,a){return new e(t(n++),i,a)}const o={visualVariableColor:null,visualVariableOpacity:null,visualVariableSizeMinMaxValue:null,visualVariableSizeScaleStops:null,visualVariableSizeStops:null,visualVariableSizeUnitValue:null,visualVariableRotation:null,visualVariableSizeOutlineScaleStops:null};class l{constructor(){this.instances={fill:a(i.fill,{uniforms:o,optionalAttributes:{zoomRange:!0}}),marker:a(i.marker,{uniforms:o,optionalAttributes:{zoomRange:!0}}),line:a(i.line,{uniforms:o,optionalAttributes:{zoomRange:!0}}),text:a(i.text,{uniforms:o,optionalAttributes:{zoomRange:!0,referenceSymbol:!1,clipAngle:!1,visibility:!1}}),outlineFill:a(i.outlineFill,{uniforms:o,optionalAttributes:{zoomRange:!0}}),complexFill:a(i.complexFill,{uniforms:o,optionalAttributes:{zoomRange:!0}}),gradientFill:a(i.gradientFill,{uniforms:o,optionalAttributes:{zoomRange:!0}}),texturedLine:a(i.texturedLine,{uniforms:o,optionalAttributes:{zoomRange:!0}}),gradientStroke:a(i.gradientStroke,{uniforms:o,optionalAttributes:{zoomRange:!0}}),animatedMarker:a(i.animatedMarker,{uniforms:o,optionalAttributes:{zoomRange:!0,value1Position2Value2:!1,lineLength:!1}}),animatedMarkerShift:a(i.animatedMarkerShift,{uniforms:o,optionalAttributes:{zoomRange:!0,value1Position2Value2:!0,lineLength:!0}}),animatedPolygon:a(i.animatedFill,{uniforms:o,optionalAttributes:{zoomRange:!0,value1Position2Value2:!1,lineLength:!1,angle:!0}}),animatedPolyline:a(i.animatedLine,{uniforms:o,optionalAttributes:{zoomRange:!0,value1Position2Value2:!1,accumulatedDistance:!0,segmentDirection:!0,normal:!0,lineLength:!1,angle:!1}}),animatedPolylineShift:a(i.animatedLine,{uniforms:o,optionalAttributes:{zoomRange:!0,value1Position2Value2:!1,accumulatedDistance:!0,segmentDirection:!0,normal:!0,lineLength:!0,angle:!1}})},this._instancesById=Object.values(this.instances).reduce((e,i)=>(e.set(i.instanceId,i),e),new Map)}getInstance(e){return this._instancesById.get(e)}}export{l as GraphicInstanceStore};
2
+ import{FeatureTechniqueInstance as e}from"./TechniqueInstance.js";import{Techniques as i}from"./TechniqueRegistry.js";import{castInstanceId as t}from"./mesh/instanceIdUtils.js";let n=0;function a(i,a){return new e(t(n++),i,a)}const o={visualVariableColor:null,visualVariableOpacity:null,visualVariableSizeMinMaxValue:null,visualVariableSizeScaleStops:null,visualVariableSizeStops:null,visualVariableSizeUnitValue:null,visualVariableRotation:null,visualVariableSizeOutlineScaleStops:null};class l{constructor(){this.instances={fill:a(i.fill,{uniforms:o,optionalAttributes:{zoomRange:!0}}),marker:a(i.marker,{uniforms:o,optionalAttributes:{zoomRange:!0}}),line:a(i.line,{uniforms:o,optionalAttributes:{zoomRange:!0}}),text:a(i.text,{uniforms:o,optionalAttributes:{zoomRange:!0,referenceSymbol:!1,clipAngle:!1,visibility:!1}}),outlineFill:a(i.outlineFill,{uniforms:o,optionalAttributes:{zoomRange:!0}}),complexFill:a(i.complexFill,{uniforms:o,optionalAttributes:{zoomRange:!0}}),gradientFill:a(i.gradientFill,{uniforms:o,optionalAttributes:{zoomRange:!0}}),texturedLine:a(i.texturedLine,{uniforms:o,optionalAttributes:{zoomRange:!0}}),gradientStroke:a(i.gradientStroke,{uniforms:o,optionalAttributes:{zoomRange:!0}}),animatedMarker:a(i.animatedMarker,{uniforms:o,optionalAttributes:{zoomRange:!0,value1Position2Value2:!1,lineLength:!1}}),animatedMarkerShift:a(i.animatedMarkerShift,{uniforms:o,optionalAttributes:{zoomRange:!0,value1Position2Value2:!0,lineLength:!0}}),animatedPolygon:a(i.animatedFill,{uniforms:o,optionalAttributes:{zoomRange:!0,value1Position2Value2:!1,lineLength:!1,angle:!0}}),animatedPolyline:a(i.animatedLine,{uniforms:o,optionalAttributes:{zoomRange:!0,value1Position2Value2:!1,accumulatedDistance:!0,segmentDirection:!0,normal:!0,lineLength:!1,angle:!1}}),animatedPolylineShift:a(i.animatedLine,{uniforms:o,optionalAttributes:{zoomRange:!0,value1Position2Value2:!1,accumulatedDistance:!0,segmentDirection:!0,normal:!0,lineLength:!0,angle:!1}})},this._instancesById=Object.values(this.instances).reduce((e,i)=>(e.set(i.instanceId,i),e),new Map)}getInstance(e){return this._instancesById.get(e)}getInstanceOrder(){}}export{l as GraphicInstanceStore};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import"../../../../../../core/has.js";import{isPowerOfTwo as e,nextPowerOfTwo as t}from"../../../../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../../../../core/maybe.js";import{simplePipelineState as s}from"../utils.js";import{Technique as u}from"./Technique.js";import{TextureStatisticsDiffShader as o}from"./shaders/TextureStatisticsDiffShader.js";import{TextureStatisticsMinMaxSumShader as i}from"./shaders/TextureStatisticsMinMaxSumShader.js";import{TextureStatisticsStdDevShader as a}from"./shaders/TextureStatisticsStdDevShader.js";import{TextureStatisticsSumOfSquaredDiffShader as n}from"./shaders/TextureStatisticsSumOfSquaredDiffShader.js";import{getWebGLCapabilities as f}from"../../../../../webgl/capabilities.js";import{ColorAttachment2 as l,ColorAttachment3 as h,ColorAttachment0 as m,ColorAttachment1 as x,SizedPixelFormat as c,PixelType as T}from"../../../../../webgl/enums.js";import{FramebufferObject as d}from"../../../../../webgl/FramebufferObject.js";import p from"../../../../../webgl/Texture.js";import{TextureDescriptor as b}from"../../../../../webgl/TextureDescriptor.js";const _=1048576;class F extends u{constructor(){super(...arguments),this.type=36,this._width=0,this._height=0,this._framebuffers=null,this._minTexture=null,this._maxTexture=null,this._sumTexture=null,this._numOfNoDataTexture=null,this._resultsFramebuffer=null,this._startFramebuffer=null,this._diffFramebuffer=null,this._scaleFbo=null,this.shaders={textureStatisticsMinMaxSum:new i,textureStatisticsSum:new n,textureStatisticsDiff:new o,textureStatisticsStdDev:new a}}dispose(){this.shaders.textureStatisticsMinMaxSum=null,this._framebuffers&&(this._framebuffers.forEach(e=>r(e)),this._framebuffers=null),r(this._resultsFramebuffer),r(this._startFramebuffer),r(this._diffFramebuffer),r(this._scaleFbo),r(this._minTexture),r(this._maxTexture),r(this._sumTexture),r(this._numOfNoDataTexture)}get minValuesTexture(){return this._minTexture||null}get maxValuesTexture(){return this._maxTexture||null}get meanValuesTexture(){return this._resultsFramebuffer?.getColorTexture(l)||null}get stdDevValuesTexture(){return this._resultsFramebuffer?.getColorTexture(h)||null}get statsFbo(){return this._resultsFramebuffer}render(t,r){const{context:u,painter:o}=t;let i=r.fbo.width,a=r.fbo.height,n=r.fbo;const f=u.gl,l=u.getBoundFramebufferObject();if(i*a>_||!e(i)||!e(a)){const t=i/a;if(i*a>_){const e=Math.max(Math.floor(Math.sqrt(_/t)),1);i=Math.max(Math.floor(t*e),1),a=e}if(e(i)||(i=S(i)),e(a)||(a=S(a)),this._scaleFbo)this._scaleFbo.resize(i,a);else{const{dataType:e,internalFormat:t}=r.fbo.getColorTexture(m).descriptor,s=t??c.RGBA8;this._scaleFbo=w(u,i,a,e,s)}u.bindFramebuffer(this._scaleFbo),u.setViewport(0,0,i,a),o.blitTexture(u,n.getColorTexture(m),9728),n=this._scaleFbo}this._updateResources(t,n),o.setPipelineState({...s,color:{write:[!0,!0,!0,!0],blendMode:"none"}});const h=this._applyReductionPass(t);f.readBuffer(f.COLOR_ATTACHMENT3),h.copyToTexture(0,0,1,1,0,0,this._numOfNoDataTexture),f.readBuffer(f.COLOR_ATTACHMENT2),h.copyToTexture(0,0,1,1,0,0,this._sumTexture),f.readBuffer(f.COLOR_ATTACHMENT1),h.copyToTexture(0,0,1,1,0,0,this._maxTexture),f.readBuffer(f.COLOR_ATTACHMENT0),h.copyToTexture(0,0,1,1,0,0,this._minTexture);const x=r.fbo.getColorTexture(m);if(!x)throw new Error("Start buffer color texture is not available, cannot compute diff.");this._computeDiff(t,x,this._sumTexture,this._numOfNoDataTexture,i,a);const T=this._applySecondReductionPass(t,i,a).getColorTexture(m);this._computeSdtDev(t,this._minTexture,this._maxTexture,this._sumTexture,this._numOfNoDataTexture,T,i,a),u.bindFramebuffer(l),u.setViewport(0,0,r.fbo.width,r.fbo.height),o.setPipelineState(s)}_applyReductionPass(e){const{context:t,painter:r}=e,s=this.shaders.textureStatisticsMinMaxSum,u=this._framebuffers;if(null===u)throw new Error("Framebuffers are not initialized, cannot apply reduction pass.");const o=this._startFramebuffer;let i=o.getColorTexture(m),a=o.getColorTexture(x),n=o.getColorTexture(l),f=o.getColorTexture(h);const c=u;let T=0;for(const d of c){t.setViewport(0,0,d.width,d.height),t.bindFramebuffer(d),t.setClearColor(0,0,0,0),t.clear(16384);const e={shader:s,uniforms:{config:{minTexture:{texture:i,unit:1},maxTexture:{texture:a,unit:2},sumTexture:{texture:n,unit:3},numOfNoDataTexture:{texture:f,unit:4},width:d.width,height:d.height,isFirstPass:0===T?1:0}},defines:null,optionalAttributes:null,useComputeBuffer:!1};r.submitDrawMesh(t,e,r.quadMesh),i=d.getColorTexture(m),a=d.getColorTexture(x),n=d.getColorTexture(l),f=d.getColorTexture(h),T++}return u.at(-1)}_applySecondReductionPass(e,t,r){const{context:s,painter:u}=e,o=this.shaders.textureStatisticsSum,i=this._framebuffers;if(null===i||null==this._diffFramebuffer)throw new Error("Framebuffers are not initialized, cannot apply reduction pass.");let a=this._diffFramebuffer.getColorTexture(m);const n=i;for(const f of n){s.setViewport(0,0,f.width,f.height),s.bindFramebuffer(f),s.setClearColor(0,0,0,0),s.clear(16384);const e={shader:o,uniforms:{config:{sumTexture:{texture:a,unit:2},width:f.width,height:f.height}},defines:null,optionalAttributes:null,useComputeBuffer:!1};u.submitDrawMesh(s,e,u.quadMesh),a=f.getColorTexture(m)}return i.at(-1)}_updateResources(e,t){const{context:r}=e,s=t.width,u=t.height;if(null===this._startFramebuffer){if(!f().supportsColorBufferFloat)throw new Error("WebGL does not support color buffer float, cannot compute texture statistics.");const e=t.getColorTexture(m);if(!e)throw new Error("Input FBO does not have a color attachment 0, cannot compute texture statistics.");const o=e.descriptor,{dataType:i,internalFormat:a}=o,n=w(r,s,u,i,a??c.RGBA8,4),d=n.getColorTexture(m),p=n.getColorTexture(x),b=n.getColorTexture(l),_=n.getColorTexture(h);t.copyToTexture(0,0,s,u,0,0,d),t.copyToTexture(0,0,s,u,0,0,p),t.copyToTexture(0,0,s,u,0,0,b),t.copyToTexture(0,0,s,u,0,0,_),this._startFramebuffer=n,this._diffFramebuffer=w(r,s,u,T.FLOAT,c.RGBA32F),this._resultsFramebuffer=w(r,1,1,T.FLOAT,c.RGBA32F,4),this._minTexture=C(r,1,1,T.FLOAT,c.RGBA32F),this._maxTexture=C(r,1,1,T.FLOAT,c.RGBA32F),this._sumTexture=C(r,1,1,T.FLOAT,c.RGBA32F),this._numOfNoDataTexture=C(r,1,1,T.FLOAT,c.R32F)}else{const e=this._startFramebuffer;e.resize(s,u);const r=e.getColorTexture(m),o=e.getColorTexture(x),i=e.getColorTexture(l),a=e.getColorTexture(h);t.copyToTexture(0,0,s,u,0,0,r),t.copyToTexture(0,0,s,u,0,0,o),t.copyToTexture(0,0,s,u,0,0,i),t.copyToTexture(0,0,s,u,0,0,a),this._diffFramebuffer.resize(s,u)}if(this._width===s&&this._height===u&&null!==this._framebuffers)return;const o=(this._framebuffers||[]).reverse();this._framebuffers=null,this._width=s,this._height=u,this._framebuffers=this._updateFramebuffers(r,s,u,o,4)}_updateFramebuffers(e,t,s,u,o=1){const i=[];let a=t,n=s;for(;a>1||n>1;){const t=Math.max(1,Math.floor(a/2)),r=Math.max(1,Math.floor(n/2)),s=g(e,t,r,u,o);i.push(s),a=t,n=r}return i.at(-1),u.forEach(e=>r(e)),u.length=0,i}_computeDiff(e,t,r,s,u,o){const{context:i,painter:a}=e;i.bindFramebuffer(this._diffFramebuffer),i.setViewport(0,0,u,o),i.setClearColor(0,0,0,0),i.clear(16384);const n={shader:this.shaders.textureStatisticsDiff,uniforms:{config:{inputTexture:{texture:t,unit:1},sumTexture:{texture:r,unit:2},numOfNoDataTexture:{texture:s,unit:3},numTexels:u*o}},defines:null,optionalAttributes:null,useComputeBuffer:!1};a.submitDrawMesh(i,n,a.quadMesh)}_computeSdtDev(e,t,r,s,u,o,i,a){const{context:n,painter:f}=e;n.bindFramebuffer(this._resultsFramebuffer),n.setViewport(0,0,1,1),n.setClearColor(0,0,0,0),n.clear(16384);const l={shader:this.shaders.textureStatisticsStdDev,uniforms:{config:{minTexture:{texture:t,unit:1},maxTexture:{texture:r,unit:2},sumTexture:{texture:s,unit:3},numOfNoDataTexture:{texture:u,unit:4},diffSqTexture:{texture:o,unit:5},numTexels:i*a}},defines:null,optionalAttributes:null,useComputeBuffer:!1};f.submitDrawMesh(n,l,f.quadMesh)}}function g(e,t,r,s,u=1){let o=s.pop();return void 0!==o?o.resize(t,r):o=w(e,t,r,T.FLOAT,c.RGBA32F,u),o}function w(e,t,r,s,u,o=1){if(o<1||o>4)throw new Error("Number of color attachments must be between 1 and 4.");const i=new d(e,C(e,t,r,s,u));for(let a=1;a<o;a++){const o=C(e,t,r,s,u);i.attachColorTexture(o,m+a)}return i}function C(e,t,r,s,u){const o=new b(t,r);return o.samplingMode=9728,o.wrapMode=33071,o.pixelFormat=6408,o.dataType=s,o.internalFormat=u,new p(e,o)}function S(e){const r=t(e),s=r/2;return Math.abs(r-e)<Math.abs(s-e)?r:s}export{F as TextureStatisticsTechnique};
2
+ import"../../../../../../core/has.js";import{isPowerOfTwo as e,nextPowerOfTwo as t}from"../../../../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../../../../core/maybe.js";import{simplePipelineState as s}from"../utils.js";import{Technique as u}from"./Technique.js";import{TextureStatisticsDiffShader as o}from"./shaders/TextureStatisticsDiffShader.js";import{TextureStatisticsMinMaxSumShader as i}from"./shaders/TextureStatisticsMinMaxSumShader.js";import{TextureStatisticsStdDevShader as a}from"./shaders/TextureStatisticsStdDevShader.js";import{TextureStatisticsSumOfSquaredDiffShader as n}from"./shaders/TextureStatisticsSumOfSquaredDiffShader.js";import{getWebGLCapabilities as f}from"../../../../../webgl/capabilities.js";import{ColorAttachment2 as l,ColorAttachment3 as h,ColorAttachment0 as m,ColorAttachment1 as x,SizedPixelFormat as c,PixelType as T}from"../../../../../webgl/enums.js";import{DisposableFramebufferObject as d}from"../../../../../webgl/FramebufferObject.js";import p from"../../../../../webgl/Texture.js";import{TextureDescriptor as b}from"../../../../../webgl/TextureDescriptor.js";const _=1048576;class F extends u{constructor(){super(...arguments),this.type=36,this._width=0,this._height=0,this._framebuffers=null,this._minTexture=null,this._maxTexture=null,this._sumTexture=null,this._numOfNoDataTexture=null,this._resultsFramebuffer=null,this._startFramebuffer=null,this._diffFramebuffer=null,this._scaleFbo=null,this.shaders={textureStatisticsMinMaxSum:new i,textureStatisticsSum:new n,textureStatisticsDiff:new o,textureStatisticsStdDev:new a}}dispose(){this.shaders.textureStatisticsMinMaxSum=null,this._framebuffers&&(this._framebuffers.forEach(e=>r(e)),this._framebuffers=null),r(this._resultsFramebuffer),r(this._startFramebuffer),r(this._diffFramebuffer),r(this._scaleFbo),r(this._minTexture),r(this._maxTexture),r(this._sumTexture),r(this._numOfNoDataTexture)}get minValuesTexture(){return this._minTexture||null}get maxValuesTexture(){return this._maxTexture||null}get meanValuesTexture(){return this._resultsFramebuffer?.getColorTexture(l)||null}get stdDevValuesTexture(){return this._resultsFramebuffer?.getColorTexture(h)||null}get statsFbo(){return this._resultsFramebuffer}render(t,r){const{context:u,painter:o}=t;let i=r.fbo.width,a=r.fbo.height,n=r.fbo;const f=u.gl,l=u.boundFramebuffer;if(i*a>_||!e(i)||!e(a)){const t=i/a;if(i*a>_){const e=Math.max(Math.floor(Math.sqrt(_/t)),1);i=Math.max(Math.floor(t*e),1),a=e}if(e(i)||(i=S(i)),e(a)||(a=S(a)),this._scaleFbo)this._scaleFbo.resize(i,a);else{const{dataType:e,internalFormat:t}=r.fbo.getColorTexture(m).descriptor,s=t??c.RGBA8;this._scaleFbo=w(u,i,a,e,s)}u.bindFramebuffer(this._scaleFbo),u.setViewport(0,0,i,a),o.blitTexture(u,n.getColorTexture(m),9728),n=this._scaleFbo}this._updateResources(t,n),o.setPipelineState({...s,color:{write:[!0,!0,!0,!0],blendMode:"none"}});const h=this._applyReductionPass(t);f.readBuffer(f.COLOR_ATTACHMENT3),h.copyToTexture(0,0,1,1,0,0,this._numOfNoDataTexture),f.readBuffer(f.COLOR_ATTACHMENT2),h.copyToTexture(0,0,1,1,0,0,this._sumTexture),f.readBuffer(f.COLOR_ATTACHMENT1),h.copyToTexture(0,0,1,1,0,0,this._maxTexture),f.readBuffer(f.COLOR_ATTACHMENT0),h.copyToTexture(0,0,1,1,0,0,this._minTexture);const x=r.fbo.getColorTexture(m);if(!x)throw new Error("Start buffer color texture is not available, cannot compute diff.");this._computeDiff(t,x,this._sumTexture,this._numOfNoDataTexture,i,a);const T=this._applySecondReductionPass(t,i,a).getColorTexture(m);this._computeSdtDev(t,this._minTexture,this._maxTexture,this._sumTexture,this._numOfNoDataTexture,T,i,a),u.bindFramebuffer(l),u.setViewport(0,0,r.fbo.width,r.fbo.height),o.setPipelineState(s)}_applyReductionPass(e){const{context:t,painter:r}=e,s=this.shaders.textureStatisticsMinMaxSum,u=this._framebuffers;if(null===u)throw new Error("Framebuffers are not initialized, cannot apply reduction pass.");const o=this._startFramebuffer;let i=o.getColorTexture(m),a=o.getColorTexture(x),n=o.getColorTexture(l),f=o.getColorTexture(h);const c=u;let T=0;for(const d of c){t.setViewport(0,0,d.width,d.height),t.bindFramebuffer(d),t.setClearColor(0,0,0,0),t.clear(16384);const e={shader:s,uniforms:{config:{minTexture:{texture:i,unit:1},maxTexture:{texture:a,unit:2},sumTexture:{texture:n,unit:3},numOfNoDataTexture:{texture:f,unit:4},width:d.width,height:d.height,isFirstPass:0===T?1:0}},defines:null,optionalAttributes:null,useComputeBuffer:!1};r.submitDrawMesh(t,e,r.quadMesh),i=d.getColorTexture(m),a=d.getColorTexture(x),n=d.getColorTexture(l),f=d.getColorTexture(h),T++}return u.at(-1)}_applySecondReductionPass(e,t,r){const{context:s,painter:u}=e,o=this.shaders.textureStatisticsSum,i=this._framebuffers;if(null===i||null==this._diffFramebuffer)throw new Error("Framebuffers are not initialized, cannot apply reduction pass.");let a=this._diffFramebuffer.getColorTexture(m);const n=i;for(const f of n){s.setViewport(0,0,f.width,f.height),s.bindFramebuffer(f),s.setClearColor(0,0,0,0),s.clear(16384);const e={shader:o,uniforms:{config:{sumTexture:{texture:a,unit:2},width:f.width,height:f.height}},defines:null,optionalAttributes:null,useComputeBuffer:!1};u.submitDrawMesh(s,e,u.quadMesh),a=f.getColorTexture(m)}return i.at(-1)}_updateResources(e,t){const{context:r}=e,s=t.width,u=t.height;if(null===this._startFramebuffer){if(!f().supportsColorBufferFloat)throw new Error("WebGL does not support color buffer float, cannot compute texture statistics.");const e=t.getColorTexture(m);if(!e)throw new Error("Input FBO does not have a color attachment 0, cannot compute texture statistics.");const o=e.descriptor,{dataType:i,internalFormat:a}=o,n=w(r,s,u,i,a??c.RGBA8,4),d=n.getColorTexture(m),p=n.getColorTexture(x),b=n.getColorTexture(l),_=n.getColorTexture(h);t.copyToTexture(0,0,s,u,0,0,d),t.copyToTexture(0,0,s,u,0,0,p),t.copyToTexture(0,0,s,u,0,0,b),t.copyToTexture(0,0,s,u,0,0,_),this._startFramebuffer=n,this._diffFramebuffer=w(r,s,u,T.FLOAT,c.RGBA32F),this._resultsFramebuffer=w(r,1,1,T.FLOAT,c.RGBA32F,4),this._minTexture=C(r,1,1,T.FLOAT,c.RGBA32F),this._maxTexture=C(r,1,1,T.FLOAT,c.RGBA32F),this._sumTexture=C(r,1,1,T.FLOAT,c.RGBA32F),this._numOfNoDataTexture=C(r,1,1,T.FLOAT,c.R32F)}else{const e=this._startFramebuffer;e.resize(s,u);const r=e.getColorTexture(m),o=e.getColorTexture(x),i=e.getColorTexture(l),a=e.getColorTexture(h);t.copyToTexture(0,0,s,u,0,0,r),t.copyToTexture(0,0,s,u,0,0,o),t.copyToTexture(0,0,s,u,0,0,i),t.copyToTexture(0,0,s,u,0,0,a),this._diffFramebuffer.resize(s,u)}if(this._width===s&&this._height===u&&null!==this._framebuffers)return;const o=(this._framebuffers||[]).reverse();this._framebuffers=null,this._width=s,this._height=u,this._framebuffers=this._updateFramebuffers(r,s,u,o,4)}_updateFramebuffers(e,t,s,u,o=1){const i=[];let a=t,n=s;for(;a>1||n>1;){const t=Math.max(1,Math.floor(a/2)),r=Math.max(1,Math.floor(n/2)),s=g(e,t,r,u,o);i.push(s),a=t,n=r}return i.at(-1),u.forEach(e=>r(e)),u.length=0,i}_computeDiff(e,t,r,s,u,o){const{context:i,painter:a}=e;i.bindFramebuffer(this._diffFramebuffer),i.setViewport(0,0,u,o),i.setClearColor(0,0,0,0),i.clear(16384);const n={shader:this.shaders.textureStatisticsDiff,uniforms:{config:{inputTexture:{texture:t,unit:1},sumTexture:{texture:r,unit:2},numOfNoDataTexture:{texture:s,unit:3},numTexels:u*o}},defines:null,optionalAttributes:null,useComputeBuffer:!1};a.submitDrawMesh(i,n,a.quadMesh)}_computeSdtDev(e,t,r,s,u,o,i,a){const{context:n,painter:f}=e;n.bindFramebuffer(this._resultsFramebuffer),n.setViewport(0,0,1,1),n.setClearColor(0,0,0,0),n.clear(16384);const l={shader:this.shaders.textureStatisticsStdDev,uniforms:{config:{minTexture:{texture:t,unit:1},maxTexture:{texture:r,unit:2},sumTexture:{texture:s,unit:3},numOfNoDataTexture:{texture:u,unit:4},diffSqTexture:{texture:o,unit:5},numTexels:i*a}},defines:null,optionalAttributes:null,useComputeBuffer:!1};f.submitDrawMesh(n,l,f.quadMesh)}}function g(e,t,r,s,u=1){let o=s.pop();return void 0!==o?o.resize(t,r):o=w(e,t,r,T.FLOAT,c.RGBA32F,u),o}function w(e,t,r,s,u,o=1){if(o<1||o>4)throw new Error("Number of color attachments must be between 1 and 4.");const i=new d(e,C(e,t,r,s,u));for(let a=1;a<o;a++){const o=C(e,t,r,s,u);i.attachColorTexture(o,m+a)}return i}function C(e,t,r,s,u){const o=new b(t,r);return o.samplingMode=9728,o.wrapMode=33071,o.pixelFormat=6408,o.dataType=s,o.internalFormat=u,new p(e,o)}function S(e){const r=t(e),s=r/2;return Math.abs(r-e)<Math.abs(s-e)?r:s}export{F as TextureStatisticsTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{simplePipelineState as e}from"../../utils.js";import{Technique as t}from"../Technique.js";import{BlendShader as r}from"../shaders/BlendShader.js";import{OpacityShader as s}from"../shaders/OpacityShader.js";import u from"../../../../../../webgl/Texture.js";import{TextureDescriptor as i}from"../../../../../../webgl/TextureDescriptor.js";class o extends t{constructor(){super(...arguments),this.type=5,this._backBufferTexture=null,this.shaders={blend:new r,opacity:new s}}shutdown(){super.shutdown(),null!==this._backBufferTexture&&(this._backBufferTexture.dispose(),this._backBufferTexture=null)}render(t,r){const{context:s,state:u,pixelRatio:i,inFadeTransition:o,painter:n}=t,{size:a}=u,c=s.getBoundFramebufferObject();let f,l;null!=c?(f=c.width,l=c.height):(f=Math.round(i*a[0]),l=Math.round(i*a[1]));const{blendMode:h}=r;if("normal"===h){const t={shader:this.shaders.opacity,uniforms:{config:{layerTexture:{texture:r.colorTexture,unit:0},opacity:r.config.opacity}},defines:null,optionalAttributes:null,useComputeBuffer:!1};return n.setPipelineState(e),void n.submitDrawMesh(s,t,n.quadMesh)}const d=this._createOrResizeTexture(t,f,l);c.copyToTexture(0,0,f,l,0,0,d);const p={color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:0,srcAlpha:1,dstAlpha:0}},depth:!1,stencil:!1};n.setPipelineState(p);const x={backbufferTexture:{texture:d,unit:0},layerTexture:{texture:r.colorTexture,unit:1},inFadeOpacity:o?1:0,...r.config},b={shader:this.shaders.blend,uniforms:{config:x},defines:{blendMode:h},optionalAttributes:null,useComputeBuffer:!1};n.submitDrawMesh(s,b,n.quadMesh)}_createOrResizeTexture(e,t,r){const{context:s}=e;if(null!==this._backBufferTexture&&this._backBufferTexture.descriptor?.width===t&&this._backBufferTexture.descriptor?.height===r)return this._backBufferTexture;if(null===this._backBufferTexture){const e=new i(t,r);e.internalFormat=6408,e.wrapMode=33071,this._backBufferTexture=new u(s,e)}else this._backBufferTexture.resize(t,r);return this._backBufferTexture}}export{o as BlendTechnique};
2
+ import{simplePipelineState as e}from"../../utils.js";import{Technique as t}from"../Technique.js";import{BlendShader as r}from"../shaders/BlendShader.js";import{OpacityShader as s}from"../shaders/OpacityShader.js";import u from"../../../../../../webgl/Texture.js";import{TextureDescriptor as i}from"../../../../../../webgl/TextureDescriptor.js";class o extends t{constructor(){super(...arguments),this.type=5,this._backBufferTexture=null,this.shaders={blend:new r,opacity:new s}}shutdown(){super.shutdown(),null!==this._backBufferTexture&&(this._backBufferTexture.dispose(),this._backBufferTexture=null)}render(t,r){const{context:s,state:u,pixelRatio:i,inFadeTransition:o,painter:n}=t,{size:a}=u,c=s.boundFramebuffer;let f,l;null!=c?(f=c.width,l=c.height):(f=Math.round(i*a[0]),l=Math.round(i*a[1]));const{blendMode:h}=r;if("normal"===h){const t={shader:this.shaders.opacity,uniforms:{config:{layerTexture:{texture:r.colorTexture,unit:0},opacity:r.config.opacity}},defines:null,optionalAttributes:null,useComputeBuffer:!1};return n.setPipelineState(e),void n.submitDrawMesh(s,t,n.quadMesh)}const d=this._createOrResizeTexture(t,f,l);c?.copyToTexture(0,0,f,l,0,0,d);const p={color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:0,srcAlpha:1,dstAlpha:0}},depth:!1,stencil:!1};n.setPipelineState(p);const x={backbufferTexture:{texture:d,unit:0},layerTexture:{texture:r.colorTexture,unit:1},inFadeOpacity:o?1:0,...r.config},b={shader:this.shaders.blend,uniforms:{config:x},defines:{blendMode:h},optionalAttributes:null,useComputeBuffer:!1};n.submitDrawMesh(s,b,n.quadMesh)}_createOrResizeTexture(e,t,r){const{context:s}=e;if(null!==this._backBufferTexture&&this._backBufferTexture.descriptor?.width===t&&this._backBufferTexture.descriptor?.height===r)return this._backBufferTexture;if(null===this._backBufferTexture){const e=new i(t,r);e.internalFormat=6408,e.wrapMode=33071,this._backBufferTexture=new u(s,e)}else this._backBufferTexture.resize(t,r);return this._backBufferTexture}}export{o as BlendTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{simplePipelineState as t}from"../../utils.js";import{Technique as s}from"../Technique.js";import{BlitShader as i}from"../shaders/BlitShader.js";import{BloomCompositeShader as r,LuminosityHighPassShader as o}from"../shaders/BloomShader.js";import{GaussianBlurShader as n}from"../shaders/BlurShader.js";import{FramebufferObject as u}from"../../../../../../webgl/FramebufferObject.js";import{TextureDescriptor as h}from"../../../../../../webgl/TextureDescriptor.js";const a=5,l=[1,0],m=[0,1],d=[1,.8,.6,.4,.2],c=[1,1,1];class p extends s{constructor(){super(...arguments),this.type=6,this._intensityFBO=null,this._compositeFBO=null,this._mipsFBOs=new Array(a),this._nMips=a,this._kernelSizeArray=[3,5,7,9,11],this._size=[0,0],this.shaders={luminosityPass:new o,gaussianBlur:new n,composite:new r,blit:new i}}shutdown(){if(super.shutdown(),this._intensityFBO=e(this._intensityFBO),this._compositeFBO=e(this._compositeFBO),this._mipsFBOs){for(let e=0;e<this._nMips;e++)this._mipsFBOs[e]&&(this._mipsFBOs[e].horizontal.dispose(),this._mipsFBOs[e].vertical.dispose());this._mipsFBOs=null}}render(e,t){const{layerFBO:s}=t,{width:i,height:r}=s,{strength:o,radius:n,threshold:u}=t.effect;this._createOrResizeResources(e,i,r),this._renderLuminosityHighPass(e,s,u),this._renderGaussianBlur(e,s),this._renderComposite(e,s,o,n),this._renderBlit(e,s)}_renderLuminosityHighPass(e,s,i){const{context:r,painter:o}=e,{width:n,height:u}=s,h={...t,color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:771,srcAlpha:1,dstAlpha:771}},stencil:{write:{mask:0},test:!1}};o.setPipelineState(h),r.bindFramebuffer(this._intensityFBO);const a=[Math.round(n/2),Math.round(u/2)];r.setViewport(0,0,a[0],a[1]),r.setClearColor(0,0,0,0),r.clear(16384),o.submitDrawMesh(r,{shader:this.shaders.luminosityPass,uniforms:{luminosityHighPassConfig:{luminosityTexture:{texture:s.colorTexture,unit:0},defaultColor:[0,0,0],defaultOpacity:0,luminosityThreshold:i,smoothWidth:.01}},defines:null,optionalAttributes:null,useComputeBuffer:!1},o.quadMesh)}_renderGaussianBlur(e,s){const{context:i,painter:r}=e,{width:o,height:n}=s,u={...t,color:{write:[!0,!0,!0,!0],blendMode:"none"}};r.setPipelineState(u);let h=this._intensityFBO.colorTexture;const a=[Math.round(o/2),Math.round(n/2)];for(let t=0;t<this._nMips;t++){i.setViewport(0,0,a[0],a[1]);const e=this._mipsFBOs[t];i.bindFramebuffer(e.horizontal),r.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texture:{texture:h,unit:t+1},texSize:a,direction:l,sigma:this._kernelSizeArray[t]}},defines:{kernelRadius:this._kernelSizeArray[t]},optionalAttributes:null,useComputeBuffer:!1},r.quadMesh),h=e.horizontal.colorTexture,i.bindFramebuffer(e.vertical),r.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texture:{texture:h,unit:t+1},texSize:a,direction:m,sigma:this._kernelSizeArray[t]}},defines:{kernelRadius:this._kernelSizeArray[t]},optionalAttributes:null,useComputeBuffer:!1},r.quadMesh),h=e.vertical.colorTexture,a[0]=Math.round(a[0]/2),a[1]=Math.round(a[1]/2)}}_renderComposite(e,t,s,i){const{context:r,painter:o}=e,{width:n,height:u}=t;r.setViewport(0,0,n,u),r.bindFramebuffer(this._compositeFBO),o.submitDrawMesh(r,{shader:this.shaders.composite,uniforms:{compositeConfig:{blurTexture1:{texture:this._mipsFBOs[0].vertical.colorTexture,unit:1},blurTexture2:{texture:this._mipsFBOs[1].vertical.colorTexture,unit:2},blurTexture3:{texture:this._mipsFBOs[2].vertical.colorTexture,unit:3},blurTexture4:{texture:this._mipsFBOs[3].vertical.colorTexture,unit:4},blurTexture5:{texture:this._mipsFBOs[4].vertical.colorTexture,unit:5},bloomStrength:s,bloomRadius:i,bloomFactors:d,bloomTintColor:c}},defines:{numMips:this._nMips},optionalAttributes:null,useComputeBuffer:!1},o.quadMesh)}_renderBlit(e,s){const{context:i,painter:r}=e;i.bindFramebuffer(s);const o={blitTexture:{texture:this._compositeFBO.colorTexture,unit:6}},n={...t,color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:1,srcAlpha:1,dstAlpha:1}}};r.setPipelineState(n),r.submitDrawMesh(i,{shader:this.shaders.blit,uniforms:{blitConfig:o},defines:null,optionalAttributes:null,useComputeBuffer:!1},r.quadMesh)}_createOrResizeResources(e,t,s){const{context:i}=e;if(this._compositeFBO&&this._size[0]===t&&this._size[1]===s)return;this._size[0]=t,this._size[1]=s;const r=[Math.round(t/2),Math.round(s/2)];if(this._compositeFBO)this._compositeFBO.resize(t,s);else{const e=new h(t,s);e.internalFormat=6408,e.wrapMode=33071,this._compositeFBO=new u(i,e)}if(this._intensityFBO)this._intensityFBO.resize(r[0],r[1]);else{const e=new h(r[0],r[1]);e.internalFormat=6408,e.wrapMode=33071,this._intensityFBO=new u(i,e)}for(let o=0;o<this._nMips;o++){if(this._mipsFBOs[o])this._mipsFBOs[o].horizontal.resize(r[0],r[1]),this._mipsFBOs[o].vertical.resize(r[0],r[1]);else{const e=new h(r[0],r[1]);e.internalFormat=6408,e.wrapMode=33071,this._mipsFBOs[o]={horizontal:new u(i,e),vertical:new u(i,e)}}r[0]=Math.round(r[0]/2),r[1]=Math.round(r[1]/2)}}}export{p as BloomTechnique};
2
+ import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{simplePipelineState as t}from"../../utils.js";import{Technique as s}from"../Technique.js";import{BlitShader as i}from"../shaders/BlitShader.js";import{BloomCompositeShader as r,LuminosityHighPassShader as o}from"../shaders/BloomShader.js";import{GaussianBlurShader as n}from"../shaders/BlurShader.js";import{DisposableFramebufferObject as u}from"../../../../../../webgl/FramebufferObject.js";import{TextureDescriptor as h}from"../../../../../../webgl/TextureDescriptor.js";const a=5,l=[1,0],m=[0,1],d=[1,.8,.6,.4,.2],c=[1,1,1];class p extends s{constructor(){super(...arguments),this.type=6,this._intensityFBO=null,this._compositeFBO=null,this._mipsFBOs=new Array(a),this._nMips=a,this._kernelSizeArray=[3,5,7,9,11],this._size=[0,0],this.shaders={luminosityPass:new o,gaussianBlur:new n,composite:new r,blit:new i}}shutdown(){if(super.shutdown(),this._intensityFBO=e(this._intensityFBO),this._compositeFBO=e(this._compositeFBO),this._mipsFBOs){for(let e=0;e<this._nMips;e++)this._mipsFBOs[e]&&(this._mipsFBOs[e].horizontal.dispose(),this._mipsFBOs[e].vertical.dispose());this._mipsFBOs=null}}render(e,t){const{layerFBO:s}=t,{width:i,height:r}=s,{strength:o,radius:n,threshold:u}=t.effect;this._createOrResizeResources(e,i,r),this._renderLuminosityHighPass(e,s,u),this._renderGaussianBlur(e,s),this._renderComposite(e,s,o,n),this._renderBlit(e,s)}_renderLuminosityHighPass(e,s,i){const{context:r,painter:o}=e,{width:n,height:u}=s,h={...t,color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:771,srcAlpha:1,dstAlpha:771}},stencil:{write:{mask:0},test:!1}};o.setPipelineState(h),r.bindFramebuffer(this._intensityFBO);const a=[Math.round(n/2),Math.round(u/2)];r.setViewport(0,0,a[0],a[1]),r.setClearColor(0,0,0,0),r.clear(16384),o.submitDrawMesh(r,{shader:this.shaders.luminosityPass,uniforms:{luminosityHighPassConfig:{luminosityTexture:{texture:s.colorTexture,unit:0},defaultColor:[0,0,0],defaultOpacity:0,luminosityThreshold:i,smoothWidth:.01}},defines:null,optionalAttributes:null,useComputeBuffer:!1},o.quadMesh)}_renderGaussianBlur(e,s){const{context:i,painter:r}=e,{width:o,height:n}=s,u={...t,color:{write:[!0,!0,!0,!0],blendMode:"none"}};r.setPipelineState(u);let h=this._intensityFBO.colorTexture;const a=[Math.round(o/2),Math.round(n/2)];for(let t=0;t<this._nMips;t++){i.setViewport(0,0,a[0],a[1]);const e=this._mipsFBOs[t];i.bindFramebuffer(e.horizontal),r.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texture:{texture:h,unit:t+1},texSize:a,direction:l,sigma:this._kernelSizeArray[t]}},defines:{kernelRadius:this._kernelSizeArray[t]},optionalAttributes:null,useComputeBuffer:!1},r.quadMesh),h=e.horizontal.colorTexture,i.bindFramebuffer(e.vertical),r.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texture:{texture:h,unit:t+1},texSize:a,direction:m,sigma:this._kernelSizeArray[t]}},defines:{kernelRadius:this._kernelSizeArray[t]},optionalAttributes:null,useComputeBuffer:!1},r.quadMesh),h=e.vertical.colorTexture,a[0]=Math.round(a[0]/2),a[1]=Math.round(a[1]/2)}}_renderComposite(e,t,s,i){const{context:r,painter:o}=e,{width:n,height:u}=t;r.setViewport(0,0,n,u),r.bindFramebuffer(this._compositeFBO),o.submitDrawMesh(r,{shader:this.shaders.composite,uniforms:{compositeConfig:{blurTexture1:{texture:this._mipsFBOs[0].vertical.colorTexture,unit:1},blurTexture2:{texture:this._mipsFBOs[1].vertical.colorTexture,unit:2},blurTexture3:{texture:this._mipsFBOs[2].vertical.colorTexture,unit:3},blurTexture4:{texture:this._mipsFBOs[3].vertical.colorTexture,unit:4},blurTexture5:{texture:this._mipsFBOs[4].vertical.colorTexture,unit:5},bloomStrength:s,bloomRadius:i,bloomFactors:d,bloomTintColor:c}},defines:{numMips:this._nMips},optionalAttributes:null,useComputeBuffer:!1},o.quadMesh)}_renderBlit(e,s){const{context:i,painter:r}=e;i.bindFramebuffer(s);const o={blitTexture:{texture:this._compositeFBO.colorTexture,unit:6}},n={...t,color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:1,srcAlpha:1,dstAlpha:1}}};r.setPipelineState(n),r.submitDrawMesh(i,{shader:this.shaders.blit,uniforms:{blitConfig:o},defines:null,optionalAttributes:null,useComputeBuffer:!1},r.quadMesh)}_createOrResizeResources(e,t,s){const{context:i}=e;if(this._compositeFBO&&this._size[0]===t&&this._size[1]===s)return;this._size[0]=t,this._size[1]=s;const r=[Math.round(t/2),Math.round(s/2)];if(this._compositeFBO)this._compositeFBO.resize(t,s);else{const e=new h(t,s);e.internalFormat=6408,e.wrapMode=33071,this._compositeFBO=new u(i,e)}if(this._intensityFBO)this._intensityFBO.resize(r[0],r[1]);else{const e=new h(r[0],r[1]);e.internalFormat=6408,e.wrapMode=33071,this._intensityFBO=new u(i,e)}for(let o=0;o<this._nMips;o++){if(this._mipsFBOs[o])this._mipsFBOs[o].horizontal.resize(r[0],r[1]),this._mipsFBOs[o].vertical.resize(r[0],r[1]);else{const e=new h(r[0],r[1]);e.internalFormat=6408,e.wrapMode=33071,this._mipsFBOs[o]={horizontal:new u(i,e),vertical:new u(i,e)}}r[0]=Math.round(r[0]/2),r[1]=Math.round(r[1]/2)}}}export{p as BloomTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{simplePipelineState as t}from"../../utils.js";import{Technique as s}from"../Technique.js";import{BlitShader as r}from"../shaders/BlitShader.js";import{RadialBlurShader as i,GaussianBlurShader as u}from"../shaders/BlurShader.js";import{FramebufferObject as a}from"../../../../../../webgl/FramebufferObject.js";import{TextureDescriptor as n}from"../../../../../../webgl/TextureDescriptor.js";const o=[1,0],l=[0,1];class d extends s{constructor(){super(...arguments),this.type=7,this._blurFBO=null,this._size=[0,0],this.shaders={gaussianBlur:new u,radialBlur:new i,blit:new r}}shutdown(){super.shutdown(),this._blurFBO=e(this._blurFBO)}render(e,t){const{type:s,radius:r}=t.effect,{layerFBO:i}=t;0!==r&&(this._createOrResizeResources(e),"blur"===s?this._gaussianBlur(e,i,t.effect.radius):this._radialBlur(e,t.layerFBO))}_gaussianBlur(e,s,r){const{context:i,state:u,painter:a,pixelRatio:n}=e,{size:d}=u,h=[Math.round(n*d[0]),Math.round(n*d[1])],f=this._blurFBO,c={...t,color:{write:[!0,!0,!0,!0],blendMode:"none"}};a.setPipelineState(c),i.bindFramebuffer(f),a.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texture:{texture:s.colorTexture,unit:4},texSize:h,direction:o,sigma:r}},defines:{kernelRadius:Math.ceil(r)},optionalAttributes:null,useComputeBuffer:!1},a.quadMesh),i.bindFramebuffer(s);const b={color:{write:[!0,!0,!0,!0],blendMode:"none"},depth:{write:!1,test:!1},stencil:{write:{mask:0},test:!1}};a.setPipelineState(b),a.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texture:{texture:f?.colorTexture,unit:5},texSize:h,direction:l,sigma:r}},defines:{kernelRadius:Math.ceil(r)},optionalAttributes:null,useComputeBuffer:!1},a.quadMesh),a.setPipelineState({...t,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"additive"}})}_radialBlur(e,s){const{context:r,painter:i}=e,u=this._blurFBO;r.bindFramebuffer(u);const a={...t,color:{write:[!0,!0,!0,!0],blendMode:"none"}};i.setPipelineState(a),i.submitDrawMeshUntyped(r,{shader:this.shaders.radialBlur,uniforms:{radialBlurConfig:{texture:{texture:s.colorTexture,unit:4}}},defines:null,optionalAttributes:null,useComputeBuffer:!1},i.quadMesh),r.bindFramebuffer(s),i.setPipelineState({...t,color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:771,srcAlpha:1,dstAlpha:771}}}),i.submitDrawMeshUntyped(r,{shader:this.shaders.blit,uniforms:{blitConfig:{blitTexture:{texture:u?.colorTexture,unit:5}}},defines:null,optionalAttributes:null,useComputeBuffer:!1},i.quadMesh)}_createOrResizeResources(e){const{context:t,state:s,pixelRatio:r}=e,{size:i}=s,u=Math.round(r*i[0]),o=Math.round(r*i[1]);if(!this._blurFBO||this._size[0]!==u||this._size[1]!==o)if(this._size[0]=u,this._size[1]=o,this._blurFBO)this._blurFBO.resize(u,o);else{const e=new n(u,o);e.internalFormat=6408,e.wrapMode=33071,this._blurFBO=new a(t,e)}}}export{d as BlurTechnique};
2
+ import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{simplePipelineState as t}from"../../utils.js";import{Technique as s}from"../Technique.js";import{BlitShader as r}from"../shaders/BlitShader.js";import{RadialBlurShader as i,GaussianBlurShader as u}from"../shaders/BlurShader.js";import{DisposableFramebufferObject as a}from"../../../../../../webgl/FramebufferObject.js";import{TextureDescriptor as n}from"../../../../../../webgl/TextureDescriptor.js";const o=[1,0],l=[0,1];class d extends s{constructor(){super(...arguments),this.type=7,this._blurFBO=null,this._size=[0,0],this.shaders={gaussianBlur:new u,radialBlur:new i,blit:new r}}shutdown(){super.shutdown(),this._blurFBO=e(this._blurFBO)}render(e,t){const{type:s,radius:r}=t.effect,{layerFBO:i}=t;0!==r&&(this._createOrResizeResources(e),"blur"===s?this._gaussianBlur(e,i,t.effect.radius):this._radialBlur(e,i))}_gaussianBlur(e,s,r){const{context:i,state:u,painter:a,pixelRatio:n}=e,{size:d}=u,h=[Math.round(n*d[0]),Math.round(n*d[1])],f=this._blurFBO,c={...t,color:{write:[!0,!0,!0,!0],blendMode:"none"}};a.setPipelineState(c),i.bindFramebuffer(f),a.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texture:{texture:s.colorTexture,unit:4},texSize:h,direction:o,sigma:r}},defines:{kernelRadius:Math.ceil(r)},optionalAttributes:null,useComputeBuffer:!1},a.quadMesh),i.bindFramebuffer(s);const b={color:{write:[!0,!0,!0,!0],blendMode:"none"},depth:{write:!1,test:!1},stencil:{write:{mask:0},test:!1}};a.setPipelineState(b),a.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texture:{texture:f?.colorTexture,unit:5},texSize:h,direction:l,sigma:r}},defines:{kernelRadius:Math.ceil(r)},optionalAttributes:null,useComputeBuffer:!1},a.quadMesh),a.setPipelineState({...t,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"additive"}})}_radialBlur(e,s){const{context:r,painter:i}=e,u=this._blurFBO;r.bindFramebuffer(u);const a={...t,color:{write:[!0,!0,!0,!0],blendMode:"none"}};i.setPipelineState(a),i.submitDrawMeshUntyped(r,{shader:this.shaders.radialBlur,uniforms:{radialBlurConfig:{texture:{texture:s.colorTexture,unit:4}}},defines:null,optionalAttributes:null,useComputeBuffer:!1},i.quadMesh),r.bindFramebuffer(s),i.setPipelineState({...t,color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:771,srcAlpha:1,dstAlpha:771}}}),i.submitDrawMeshUntyped(r,{shader:this.shaders.blit,uniforms:{blitConfig:{blitTexture:{texture:u?.colorTexture,unit:5}}},defines:null,optionalAttributes:null,useComputeBuffer:!1},i.quadMesh)}_createOrResizeResources(e){const{context:t,state:s,pixelRatio:r}=e,{size:i}=s,u=Math.round(r*i[0]),o=Math.round(r*i[1]);if(!this._blurFBO||this._size[0]!==u||this._size[1]!==o)if(this._size[0]=u,this._size[1]=o,this._blurFBO)this._blurFBO.resize(u,o);else{const e=new n(u,o);e.internalFormat=6408,e.wrapMode=33071,this._blurFBO=new a(t,e)}}}export{d as BlurTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import t from"../../../../../../../core/RandomLCG.js";import{tileSize as e}from"../../../definitions.js";import{SimpleMesh as s}from"../../../meshing/SimpleMesh.js";import{SizedDepthStencilFormat as o,DataType as r,PrimitiveType as i,PixelType as n}from"../../../../../../webgl/enums.js";import{FramebufferObject as d}from"../../../../../../webgl/FramebufferObject.js";import{Renderbuffer as h}from"../../../../../../webgl/Renderbuffer.js";import{RenderbufferDescriptor as u}from"../../../../../../webgl/RenderbufferDescriptor.js";import l from"../../../../../../webgl/Texture.js";import{TextureDescriptor as _}from"../../../../../../webgl/TextureDescriptor.js";const m={pos:{count:2,type:r.UNSIGNED_SHORT}};class T{constructor(){this._dotTextureSize=0,this._dotTextures=null,this._dotMesh=null}destroy(){this._disposeTextures(),this._dotFBO&&this._dotFBO.dispose(),this._dotMesh&&this._dotMesh.destroy()}getFBO(t){if(null==this._dotFBO){const s=e,r=e,i=new _(s,r);i.samplingMode=9728,i.wrapMode=33071;const n=new h(t,new u(o.DEPTH24_STENCIL8,s,r));this._dotFBO=new d(t,i,n)}return this._dotFBO}getDotDensityMesh(t){if(null==this._dotMesh){const o=e,r=o*o,n=2,d=new Int16Array(r*n);for(let t=0;t<o;t++)for(let e=0;e<o;e++)d[n*(e+t*o)]=e,d[n*(e+t*o)+1]=t;this._dotMesh=s.create(t,{primitive:i.POINTS,vertex:d,count:r,layout:m})}return this._dotMesh}getDotDensityTextures(e,s,o){if(this._dotTextureSize===s&&this._seed===o||(this._disposeTextures(),this._dotTextureSize=s,this._seed=o),null===this._dotTextures){const r=new t(o);this._dotTextures=[this._allocDotDensityTexture(e,s,r),this._allocDotDensityTexture(e,s,r)]}return this._dotTextures}_disposeTextures(){if(this._dotTextures){for(let t=0;t<this._dotTextures.length;t++)this._dotTextures[t].dispose();this._dotTextures=null}}_allocDotDensityTexture(t,e,s){const o=new Float32Array(e*e*4);for(let i=0;i<o.length;i++)o[i]=s.getFloat();const r=new _(e);return r.dataType=n.FLOAT,r.samplingMode=9728,new l(t,r,o)}}export{T as DotDensityResources};
2
+ import t from"../../../../../../../core/RandomLCG.js";import{tileSize as e}from"../../../definitions.js";import{SimpleMesh as s}from"../../../meshing/SimpleMesh.js";import{SizedDepthStencilFormat as o,DataType as r,PrimitiveType as i,PixelType as n}from"../../../../../../webgl/enums.js";import{DisposableFramebufferObject as u}from"../../../../../../webgl/FramebufferObject.js";import{Renderbuffer as d}from"../../../../../../webgl/Renderbuffer.js";import{RenderbufferDescriptor as l}from"../../../../../../webgl/RenderbufferDescriptor.js";import h from"../../../../../../webgl/Texture.js";import{TextureDescriptor as _}from"../../../../../../webgl/TextureDescriptor.js";const m={pos:{count:2,type:r.UNSIGNED_SHORT}};class T{constructor(){this._dotTextureSize=0,this._dotTextures=null,this._dotMesh=null}destroy(){this._disposeTextures(),this._dotFBO?.dispose(),this._dotMesh?.destroy()}getFBO(t){if(null==this._dotFBO){const s=e,r=e,i=new _(s,r);i.samplingMode=9728,i.wrapMode=33071;const n=new d(t,new l(o.DEPTH24_STENCIL8,s,r));this._dotFBO=new u(t,i,n)}return this._dotFBO}getDotDensityMesh(t){if(null==this._dotMesh){const o=e,r=o*o,n=2,u=new Int16Array(r*n);for(let t=0;t<o;t++)for(let e=0;e<o;e++)u[n*(e+t*o)]=e,u[n*(e+t*o)+1]=t;this._dotMesh=s.create(t,{primitive:i.POINTS,vertex:u,count:r,layout:m})}return this._dotMesh}getDotDensityTextures(e,s,o){if(this._dotTextureSize===s&&this._seed===o||(this._disposeTextures(),this._dotTextureSize=s,this._seed=o),null===this._dotTextures){const r=new t(o);this._dotTextures=[this._allocDotDensityTexture(e,s,r),this._allocDotDensityTexture(e,s,r)]}return this._dotTextures}_disposeTextures(){if(this._dotTextures){for(let t=0;t<this._dotTextures.length;t++)this._dotTextures[t].dispose();this._dotTextures=null}}_allocDotDensityTexture(t,e,s){const o=new Float32Array(e*e*4);for(let i=0;i<o.length;i++)o[i]=s.getFloat();const r=new _(e);return r.dataType=n.FLOAT,r.samplingMode=9728,new h(t,r,o)}}export{T as DotDensityResources};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{tileSize as e,textureBindingRenderer1 as t,textureBindingRenderer0 as i}from"../../../definitions.js";import{FeatureTechnique as o}from"../FeatureTechnique.js";import{isHighlight as r,isHittest as s,getSelectionDefines as n,getFeatureUniforms as a,getFeaturePipelineState as l,getViewUniforms as d}from"../featureTechniqueUtils.js";import{DotDensityPointShader as u}from"./DotDensityPointShader.js";import{DotDensityPolygonShader as c}from"./DotDensityPolygonShader.js";import{DotDensityResources as p}from"./DotDensityResources.js";import{FillShader as h}from"../shaders/FillShader.js";class f extends o{constructor(){super(...arguments),this.type=12,this.shaders={polygon:new c,point:new u,fill:new h},this._resources=new Map}render(e,t){r(e)||s(e)?this._renderPolygons(e,t):this._renderDotDensity(e,t)}_renderPolygons(e,t){const{painter:i}=e;i.setShader({shader:this.shaders.fill,uniforms:{...a(e,t.target),visualVariableColor:null,visualVariableOpacity:null},defines:{...n(e)},optionalAttributes:{zoomRange:!1},useComputeBuffer:s(e)}),i.setPipelineState(l(e)),i.submitDraw(e,t)}_renderDotDensity(o,r){const{context:s,painter:u,requiredLevel:c}=o,p=r.instance.getInput().uniforms,h=this._getOrCreateResourcesRecord(s),f=h.getDotDensityTextures(s,e,p.seed),m=1/2**(c-r.target.key.level),w=e,g=w*window.devicePixelRatio*w*window.devicePixelRatio,x=1/m*(1/m),D=p.dotScale?o.state.scale/p.dotScale:1,b=p.dotValue*D*x;u.setShader({shader:this.shaders.polygon,uniforms:{...a(o,r.target),instance:{isActive:p.isActive,colors:p.colors,dotValue:Math.max(1,b)},draw:{dotTexture0:{unit:i,texture:f[0]},dotTexture1:{unit:t,texture:f[1]},tileZoomFactor:m,pixelRatio:window.devicePixelRatio,tileDotsOverArea:g/(e*window.devicePixelRatio*e*window.devicePixelRatio)}},defines:{...n(o),blending:p.blending},optionalAttributes:{},useComputeBuffer:!1});const y=s.getViewport();s.setViewport(0,0,e,e);const R=s.getBoundFramebufferObject(),v=h.getFBO(s);s.bindFramebuffer(v),s.setClearColor(0,0,0,0),s.clear(16384),u.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1}),u.updatePipelineState(s),u.submitDraw(o,r),s.bindFramebuffer(R),s.setViewport(y.x,y.y,y.width,y.height);const P=h.getFBO(s).colorTexture,S={shader:this.shaders.point,uniforms:{view:d(o,r.target),instance:{dotSize:p.dotSize},draw:{locations:{unit:i,texture:P},tileZoomFactor:1,pixelRatio:window.devicePixelRatio}},defines:{...n(o)},optionalAttributes:{},useComputeBuffer:!1};u.setPipelineState(l(o)),u.submitDrawMesh(s,S,h.getDotDensityMesh(s),{stencilRef:r.getStencilReference()})}shutdown(e){super.shutdown(e),this._resources.get(e)?.destroy(),this._resources.delete(e)}_getOrCreateResourcesRecord(e){let t=this._resources.get(e);return null==t&&(t=new p,this._resources.set(e,t)),t}}export{f as DotDensityTechnique};
2
+ import{tileSize as e,textureBindingRenderer1 as t,textureBindingRenderer0 as i}from"../../../definitions.js";import{FeatureTechnique as o}from"../FeatureTechnique.js";import{isHighlight as r,isHittest as s,getSelectionDefines as n,getFeatureUniforms as a,getFeaturePipelineState as l,getViewUniforms as d}from"../featureTechniqueUtils.js";import{DotDensityPointShader as u}from"./DotDensityPointShader.js";import{DotDensityPolygonShader as c}from"./DotDensityPolygonShader.js";import{DotDensityResources as p}from"./DotDensityResources.js";import{FillShader as h}from"../shaders/FillShader.js";class f extends o{constructor(){super(...arguments),this.type=12,this.shaders={polygon:new c,point:new u,fill:new h},this._resources=new Map}render(e,t){r(e)||s(e)?this._renderPolygons(e,t):this._renderDotDensity(e,t)}_renderPolygons(e,t){const{painter:i}=e;i.setShader({shader:this.shaders.fill,uniforms:{...a(e,t.target),visualVariableColor:null,visualVariableOpacity:null},defines:{...n(e)},optionalAttributes:{zoomRange:!1},useComputeBuffer:s(e)}),i.setPipelineState(l(e)),i.submitDraw(e,t)}_renderDotDensity(o,r){const{context:s,painter:u,requiredLevel:c}=o,p=r.instance.getInput().uniforms,h=this._getOrCreateResourcesRecord(s),f=h.getDotDensityTextures(s,e,p.seed),m=1/2**(c-r.target.key.level),w=e,g=w*window.devicePixelRatio*w*window.devicePixelRatio,x=1/m*(1/m),D=p.dotScale?o.state.scale/p.dotScale:1,b=p.dotValue*D*x;u.setShader({shader:this.shaders.polygon,uniforms:{...a(o,r.target),instance:{isActive:p.isActive,colors:p.colors,dotValue:Math.max(1,b)},draw:{dotTexture0:{unit:i,texture:f[0]},dotTexture1:{unit:t,texture:f[1]},tileZoomFactor:m,pixelRatio:window.devicePixelRatio,tileDotsOverArea:g/(e*window.devicePixelRatio*e*window.devicePixelRatio)}},defines:{...n(o),blending:p.blending},optionalAttributes:{},useComputeBuffer:!1});const y=s.getViewport();s.setViewport(0,0,e,e);const R=s.boundFramebuffer,v=h.getFBO(s);s.bindFramebuffer(v),s.setClearColor(0,0,0,0),s.clear(16384),u.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1}),u.updatePipelineState(s),u.submitDraw(o,r),s.bindFramebuffer(R),s.setViewport(y.x,y.y,y.width,y.height);const P=h.getFBO(s).colorTexture,S={shader:this.shaders.point,uniforms:{view:d(o,r.target),instance:{dotSize:p.dotSize},draw:{locations:{unit:i,texture:P},tileZoomFactor:1,pixelRatio:window.devicePixelRatio}},defines:{...n(o)},optionalAttributes:{},useComputeBuffer:!1};u.setPipelineState(l(o)),u.submitDrawMesh(s,S,h.getDotDensityMesh(s),{stencilRef:r.getStencilReference()})}shutdown(e){super.shutdown(e),this._resources.get(e)?.destroy(),this._resources.delete(e)}_getOrCreateResourcesRecord(e){let t=this._resources.get(e);return null==t&&(t=new p,this._resources.set(e,t)),t}}export{f as DotDensityTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{simplePipelineState as r}from"../../utils.js";import{Technique as s}from"../Technique.js";import{BlitShader as i}from"../shaders/BlitShader.js";import{GaussianBlurShader as o}from"../shaders/BlurShader.js";import{DropShadowCompositeShader as a}from"../shaders/DropShadowShader.js";import{FramebufferObject as u}from"../../../../../../webgl/FramebufferObject.js";import l from"../../../../../../webgl/Texture.js";import{TextureDescriptor as n}from"../../../../../../webgl/TextureDescriptor.js";const h=[1,0],B=[0,1];class c extends s{constructor(){super(...arguments),this.type=13,this._layerFBOTexture=null,this._horizontalBlurFBO=null,this._verticalBlurFBO=null,this._size=[0,0],this.shaders={gaussianBlur:new o,composite:new a,blit:new i}}shutdown(){super.shutdown(),this._horizontalBlurFBO=e(this._horizontalBlurFBO),this._verticalBlurFBO=e(this._verticalBlurFBO),this._layerFBOTexture=e(this._layerFBOTexture)}render(e,s){const{context:i,state:o,painter:a}=e,{layerFBO:u}=s,l=u.width,n=u.height,c=[Math.round(l),Math.round(n)],{blurRadius:f,offsetX:d,offsetY:m,color:p}=s.effect,F=[t(d),t(m)];this._createOrResizeResources(e,l,n,c);const w=this._horizontalBlurFBO,_=this._verticalBlurFBO,O={color:{write:[!0,!0,!0,!0],blendMode:"none"},depth:{write:!1,test:!1},stencil:{write:{mask:0},test:!1}};a.setPipelineState(O);const x=this._layerFBOTexture;u.copyToTexture(0,0,l,n,0,0,x),i.setViewport(0,0,c[0],c[1]),i.bindFramebuffer(w),a.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texture:{texture:u.colorTexture,unit:4},texSize:c,direction:h,sigma:f}},defines:{kernelRadius:Math.ceil(f)},optionalAttributes:null,useComputeBuffer:!1},a.quadMesh),i.bindFramebuffer(_),a.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texture:{texture:w?.colorTexture,unit:5},texSize:c,direction:B,sigma:f}},defines:{kernelRadius:Math.ceil(f)},optionalAttributes:null,useComputeBuffer:!1},a.quadMesh),i.bindFramebuffer(u),i.setViewport(0,0,l,n),a.submitDrawMesh(i,{shader:this.shaders.composite,uniforms:{compositeConfig:{blurTexture:{texture:_?.colorTexture,unit:2},layerFBOTexture:{texture:x,unit:3},shadowColor:[p[3]*(p[0]/255),p[3]*(p[1]/255),p[3]*(p[2]/255),p[3]],displayViewMat3:o.displayMat3,shadowOffset:F}},defines:null,optionalAttributes:null,useComputeBuffer:!1},a.quadMesh),a.setPipelineState({...r,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1}})}_createOrResizeResources(e,t,r,s){const{context:i}=e;if(!this._horizontalBlurFBO||this._size[0]!==t||this._size[1]!==r){if(this._size[0]=t,this._size[1]=r,this._horizontalBlurFBO)this._horizontalBlurFBO.resize(s[0],s[1]);else{const e=new n(s[0],s[1]);e.internalFormat=6408,e.wrapMode=33071,this._horizontalBlurFBO=new u(i,e)}if(this._verticalBlurFBO)this._verticalBlurFBO.resize(s[0],s[1]);else{const e=new n(s[0],s[1]);e.internalFormat=6408,e.wrapMode=33071,this._verticalBlurFBO=new u(i,e)}if(this._layerFBOTexture)this._layerFBOTexture.resize(t,r);else{const e=new n(t,r);e.internalFormat=6408,e.wrapMode=33071,this._layerFBOTexture=new l(i,e)}}}}export{c as DropShadowTechnique};
2
+ import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{simplePipelineState as r}from"../../utils.js";import{Technique as s}from"../Technique.js";import{BlitShader as i}from"../shaders/BlitShader.js";import{GaussianBlurShader as o}from"../shaders/BlurShader.js";import{DropShadowCompositeShader as a}from"../shaders/DropShadowShader.js";import{DisposableFramebufferObject as u}from"../../../../../../webgl/FramebufferObject.js";import l from"../../../../../../webgl/Texture.js";import{TextureDescriptor as n}from"../../../../../../webgl/TextureDescriptor.js";const h=[1,0],B=[0,1];class c extends s{constructor(){super(...arguments),this.type=13,this._layerFBOTexture=null,this._horizontalBlurFBO=null,this._verticalBlurFBO=null,this._size=[0,0],this.shaders={gaussianBlur:new o,composite:new a,blit:new i}}shutdown(){super.shutdown(),this._horizontalBlurFBO=e(this._horizontalBlurFBO),this._verticalBlurFBO=e(this._verticalBlurFBO),this._layerFBOTexture=e(this._layerFBOTexture)}render(e,s){const{context:i,state:o,painter:a}=e,{layerFBO:u}=s,l=u.width,n=u.height,c=[Math.round(l),Math.round(n)],{blurRadius:f,offsetX:d,offsetY:m,color:p}=s.effect,F=[t(d),t(m)];this._createOrResizeResources(e,l,n,c);const w=this._horizontalBlurFBO,_=this._verticalBlurFBO,O={color:{write:[!0,!0,!0,!0],blendMode:"none"},depth:{write:!1,test:!1},stencil:{write:{mask:0},test:!1}};a.setPipelineState(O);const x=this._layerFBOTexture;u.copyToTexture(0,0,l,n,0,0,x),i.setViewport(0,0,c[0],c[1]),i.bindFramebuffer(w),a.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texture:{texture:u.colorTexture,unit:4},texSize:c,direction:h,sigma:f}},defines:{kernelRadius:Math.ceil(f)},optionalAttributes:null,useComputeBuffer:!1},a.quadMesh),i.bindFramebuffer(_),a.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texture:{texture:w?.colorTexture,unit:5},texSize:c,direction:B,sigma:f}},defines:{kernelRadius:Math.ceil(f)},optionalAttributes:null,useComputeBuffer:!1},a.quadMesh),i.bindFramebuffer(u),i.setViewport(0,0,l,n),a.submitDrawMesh(i,{shader:this.shaders.composite,uniforms:{compositeConfig:{blurTexture:{texture:_?.colorTexture,unit:2},layerFBOTexture:{texture:x,unit:3},shadowColor:[p[3]*(p[0]/255),p[3]*(p[1]/255),p[3]*(p[2]/255),p[3]],displayViewMat3:o.displayMat3,shadowOffset:F}},defines:null,optionalAttributes:null,useComputeBuffer:!1},a.quadMesh),a.setPipelineState({...r,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1}})}_createOrResizeResources(e,t,r,s){const{context:i}=e;if(!this._horizontalBlurFBO||this._size[0]!==t||this._size[1]!==r){if(this._size[0]=t,this._size[1]=r,this._horizontalBlurFBO)this._horizontalBlurFBO.resize(s[0],s[1]);else{const e=new n(s[0],s[1]);e.internalFormat=6408,e.wrapMode=33071,this._horizontalBlurFBO=new u(i,e)}if(this._verticalBlurFBO)this._verticalBlurFBO.resize(s[0],s[1]);else{const e=new n(s[0],s[1]);e.internalFormat=6408,e.wrapMode=33071,this._verticalBlurFBO=new u(i,e)}if(this._layerFBOTexture)this._layerFBOTexture.resize(t,r);else{const e=new n(t,r);e.internalFormat=6408,e.wrapMode=33071,this._layerFBOTexture=new l(i,e)}}}}export{c as DropShadowTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../../../../../../core/Logger.js";import{disposeMaybe as r}from"../../../../../../../core/maybe.js";import{PixelType as t,SizedDepthStencilFormat as a}from"../../../../../../webgl/enums.js";import{FramebufferObject as i}from"../../../../../../webgl/FramebufferObject.js";import{loadHeatmapTextureConfiguration as s}from"../../../../../../webgl/heatmapTextureUtils.js";import{RenderbufferDescriptor as u}from"../../../../../../webgl/RenderbufferDescriptor.js";import l from"../../../../../../webgl/Texture.js";import{TextureDescriptor as o}from"../../../../../../webgl/TextureDescriptor.js";const n=()=>e.getLogger("esri.views.2d.engine.webgl.shaderGraph.techniques.heatmap.HeatmapResources");class m{destroy(){this._accumulateFramebuffer=r(this._accumulateFramebuffer),this._resolveGradientTexture=r(this._resolveGradientTexture),this._prevGradientHash=null,this._qualityProfile=null}get initialized(){return null!=this._accumulateFramebuffer&&null!=this._resolveGradientTexture}get accumulateFramebuffer(){return this._accumulateFramebuffer}get resolveGradientTexture(){return this._resolveGradientTexture}loadQualityProfile(e){if(null==this._qualityProfile){const r=s(e,n());this._qualityProfile={...r,defines:{usesHalfFloatPrecision:r.dataType!==t.FLOAT}}}return this._qualityProfile}ensureAccumulateFBO(e,r,t){if(null==this._accumulateFramebuffer){const{dataType:s,samplingMode:l,pixelFormat:n,internalFormat:m}=this.loadQualityProfile(e),f=new o(r,t);f.pixelFormat=n,f.internalFormat=m,f.dataType=s,f.samplingMode=l,f.wrapMode=33071;const h=new u(a.DEPTH24_STENCIL8,r,t);this._accumulateFramebuffer=new i(e,f,h)}else{const{width:e,height:a}=this._accumulateFramebuffer;e===r&&a===t||this._accumulateFramebuffer.resize(r,t)}return this._accumulateFramebuffer}ensureResolveGradientTexture(e,r,t){if(null==this._resolveGradientTexture){const r=new o;r.wrapMode=33071,this._resolveGradientTexture=new l(e,r),this._prevGradientHash=null}return this._prevGradientHash!==r&&(this._resolveGradientTexture.resize(t.length/4,1),this._resolveGradientTexture.setData(t),this._prevGradientHash=r),this._resolveGradientTexture}}export{m as HeatmapResources};
2
+ import e from"../../../../../../../core/Logger.js";import{disposeMaybe as r}from"../../../../../../../core/maybe.js";import{PixelType as t,SizedDepthStencilFormat as a}from"../../../../../../webgl/enums.js";import{DisposableFramebufferObject as i}from"../../../../../../webgl/FramebufferObject.js";import{loadHeatmapTextureConfiguration as s}from"../../../../../../webgl/heatmapTextureUtils.js";import{RenderbufferDescriptor as u}from"../../../../../../webgl/RenderbufferDescriptor.js";import l from"../../../../../../webgl/Texture.js";import{TextureDescriptor as o}from"../../../../../../webgl/TextureDescriptor.js";const n=()=>e.getLogger("esri.views.2d.engine.webgl.shaderGraph.techniques.heatmap.HeatmapResources");class m{destroy(){this._accumulateFramebuffer=r(this._accumulateFramebuffer),this._resolveGradientTexture=r(this._resolveGradientTexture),this._prevGradientHash=null,this._qualityProfile=null}get initialized(){return null!=this._accumulateFramebuffer&&null!=this._resolveGradientTexture}get accumulateFramebuffer(){return this._accumulateFramebuffer}get resolveGradientTexture(){return this._resolveGradientTexture}loadQualityProfile(e){if(null==this._qualityProfile){const r=s(e,n());this._qualityProfile={...r,defines:{usesHalfFloatPrecision:r.dataType!==t.FLOAT}}}return this._qualityProfile}ensureAccumulateFBO(e,r,t){if(null==this._accumulateFramebuffer){const{dataType:s,samplingMode:l,pixelFormat:n,internalFormat:m}=this.loadQualityProfile(e),f=new o(r,t);f.pixelFormat=n,f.internalFormat=m,f.dataType=s,f.samplingMode=l,f.wrapMode=33071;const h=new u(a.DEPTH24_STENCIL8,r,t);this._accumulateFramebuffer=new i(e,f,h)}else{const{width:e,height:a}=this._accumulateFramebuffer;e===r&&a===t||this._accumulateFramebuffer.resize(r,t)}return this._accumulateFramebuffer}ensureResolveGradientTexture(e,r,t){if(null==this._resolveGradientTexture){const r=new o;r.wrapMode=33071,this._resolveGradientTexture=new l(e,r),this._prevGradientHash=null}return this._prevGradientHash!==r&&(this._resolveGradientTexture.resize(t.length/4,1),this._resolveGradientTexture.setData(t),this._prevGradientHash=r),this._resolveGradientTexture}}export{m as HeatmapResources};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureUniforms as s}from"../featureTechniqueUtils.js";import{HeatmapResources as i}from"./HeatmapResources.js";import{HeatmapAccumulateShader as n}from"../shaders/HeatmapAccumulateShader.js";import{HeatmapResolveShader as o}from"../shaders/HeatmapResolveShader.js";class u extends e{constructor(){super(...arguments),this.type=19,this.drawPhase=73,this.shaders={accumulate:new n,resolve:new o},this._isBound=!1,this._resources=new Map}shutdown(e){super.shutdown(e),this._resources.get(e)?.destroy(),this._resources.delete(e),this._prevFBO=null,this._unbind()}render(e,i){const{context:n,painter:o,state:u}=e,a=i.instance.getInput(),{isFieldActive:l}=a.uniforms,h=this._getOrCreateResourcesRecord(n),f=h.loadQualityProfile(n);t(e)||this._bind(e,h,a),o.setShader({shader:this.shaders.accumulate,uniforms:{...s(e,i.target),kernelControls:{radius:p(a,u),isFieldActive:l?1:0}},defines:{...r(e),...f.defines},optionalAttributes:{},useComputeBuffer:t(e)});const m=t(e)?c:d;o.setPipelineState(m),o.submitDraw(e,i)}getStencilReference(e){return l(e)}renderResolvePass(e,r){if(t(e))return;const{context:s,painter:i}=e,n=this._resources.get(s);if(null==this._prevFBO||null==this._prevViewport||!n?.initialized)return;const{defines:o}=n.loadQualityProfile(s),{minDensity:u,maxDensity:a,radius:l}=r.getInput().uniforms,d=8,c=9,p=n.accumulateFramebuffer,f=n.resolveGradientTexture,m={shader:this.shaders.resolve,uniforms:{accumulatedDensity:{texture:{unit:d,texture:p.colorTexture},minAndInvRange:[u,1/(a-u)],normalization:3/(l*l*Math.PI)},gradient:{texture:{unit:c,texture:f}}},defines:o,optionalAttributes:{},useComputeBuffer:!1};s.bindFramebuffer(this._prevFBO),s.setViewport(0,0,this._prevViewport.width,this._prevViewport.height),s.bindTexture(p.colorTexture,d),s.bindTexture(f,c),i.setPipelineState(h),i.submitDrawMesh(s,m,i.quadMesh),this._unbind()}_getOrCreateResourcesRecord(e){let t=this._resources.get(e);return null==t&&(t=new i,this._resources.set(e,t)),t}_unbind(){this._prevFBO=null,this._prevViewport=null,this._isBound=!1}_bind(e,t,r){if(this._isBound)return;const{context:s,state:i,pixelRatio:n}=e,o=s.getBoundFramebufferObject(),u=s.getViewport();this._prevFBO=o,this._prevViewport=u;const{gradient:l,gradientHash:d}=r.uniforms;t.ensureResolveGradientTexture(s,d,l);const{width:c,height:h}=u,f=a(p(r,i),n),m=c*f,_=h*f,w=t.ensureAccumulateFBO(s,m,_);s.blitFramebuffer(o,w,1024),s.bindFramebuffer(w),s.setViewport(0,0,w.width,w.height),s.setColorMask(!0,!0,!0,!0),s.setClearColor(0,0,0,0),s.clear(16384),this._isBound=!0}}function a(e,t){const r=t>1.5?.25:.5;return e<1/(2*r)?1:r}function l(e){return e.key.level+1}const d={color:{write:[!0,!0,!0,!0],blendMode:"additive"},depth:!1,stencil:{write:!1,test:{compare:518,mask:255,op:{fail:7680,zFail:7680,zPass:7681}}}},c={...d,stencil:!1},h={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1};function p(e,t){const{referenceScale:r,radius:s}=e.uniforms;return s*(0!==r?r/t.scale:1)}export{u as HeatmapTechnique};
2
+ import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureUniforms as s}from"../featureTechniqueUtils.js";import{HeatmapResources as i}from"./HeatmapResources.js";import{HeatmapAccumulateShader as n}from"../shaders/HeatmapAccumulateShader.js";import{HeatmapResolveShader as o}from"../shaders/HeatmapResolveShader.js";class u extends e{constructor(){super(...arguments),this.type=19,this.drawPhase=73,this.shaders={accumulate:new n,resolve:new o},this._isBound=!1,this._resources=new Map}shutdown(e){super.shutdown(e),this._resources.get(e)?.destroy(),this._resources.delete(e),this._prevFBO=null,this._unbind()}render(e,i){const{context:n,painter:o,state:u}=e,a=i.instance.getInput(),{isFieldActive:l}=a.uniforms,h=this._getOrCreateResourcesRecord(n),f=h.loadQualityProfile(n);t(e)||this._bind(e,h,a),o.setShader({shader:this.shaders.accumulate,uniforms:{...s(e,i.target),kernelControls:{radius:p(a,u),isFieldActive:l?1:0}},defines:{...r(e),...f.defines},optionalAttributes:{},useComputeBuffer:t(e)});const m=t(e)?c:d;o.setPipelineState(m),o.submitDraw(e,i)}getStencilReference(e){return l(e)}renderResolvePass(e,r){if(t(e))return;const{context:s,painter:i}=e,n=this._resources.get(s);if(null==this._prevFBO||null==this._prevViewport||!n?.initialized)return;const{defines:o}=n.loadQualityProfile(s),{minDensity:u,maxDensity:a,radius:l}=r.getInput().uniforms,d=8,c=9,p=n.accumulateFramebuffer,f=n.resolveGradientTexture,m={shader:this.shaders.resolve,uniforms:{accumulatedDensity:{texture:{unit:d,texture:p.colorTexture},minAndInvRange:[u,1/(a-u)],normalization:3/(l*l*Math.PI)},gradient:{texture:{unit:c,texture:f}}},defines:o,optionalAttributes:{},useComputeBuffer:!1};s.bindFramebuffer(this._prevFBO),s.setViewport(0,0,this._prevViewport.width,this._prevViewport.height),s.bindTexture(p.colorTexture,d),s.bindTexture(f,c),i.setPipelineState(h),i.submitDrawMesh(s,m,i.quadMesh),this._unbind()}_getOrCreateResourcesRecord(e){let t=this._resources.get(e);return null==t&&(t=new i,this._resources.set(e,t)),t}_unbind(){this._prevFBO=null,this._prevViewport=null,this._isBound=!1}_bind(e,t,r){const{context:s,state:i,pixelRatio:n}=e,o=s.boundFramebuffer;if(this._isBound||null==o)return;const u=s.getViewport();this._prevFBO=o,this._prevViewport=u;const{gradient:l,gradientHash:d}=r.uniforms;t.ensureResolveGradientTexture(s,d,l);const{width:c,height:h}=u,f=a(p(r,i),n),m=c*f,_=h*f,w=t.ensureAccumulateFBO(s,m,_);s.blitFramebuffer(o,w,1024),s.bindFramebuffer(w),s.setViewport(0,0,w.width,w.height),s.setColorMask(!0,!0,!0,!0),s.setClearColor(0,0,0,0),s.clear(16384),this._isBound=!0}}function a(e,t){const r=t>1.5?.25:.5;return e<1/(2*r)?1:r}function l(e){return e.key.level+1}const d={color:{write:[!0,!0,!0,!0],blendMode:"additive"},depth:!1,stencil:{write:!1,test:{compare:518,mask:255,op:{fail:7680,zFail:7680,zPass:7681}}}},c={...d,stencil:!1},h={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1};function p(e,t){const{referenceScale:r,radius:s}=e.uniforms;return s*(0!==r?r/t.scale:1)}export{u as HeatmapTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import has from"../../../../../../../core/has.js";import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{Technique as t}from"../Technique.js";import{TextureStatisticsTechnique as i}from"../TextureStatisticsTechnique.js";import{getInterpolationDefines as s}from"./processor/textureUtils.js";import{RasterColorizerLUTShader as o}from"../shaders/raster/RasterColorizerLUTShader.js";import{RasterColorizerShadedReliefShader as r}from"../shaders/raster/RasterColorizerShadedReliefShader.js";import{RasterColorizerStretchShader as n}from"../shaders/raster/RasterColorizerStretchShader.js";import{SizedPixelFormat as a,PixelType as u}from"../../../../../../webgl/enums.js";import{FramebufferObject as c}from"../../../../../../webgl/FramebufferObject.js";import m from"../../../../../../webgl/Texture.js";import{TextureDescriptor as l}from"../../../../../../webgl/TextureDescriptor.js";const h=160,p=new Set(["f32","f64","u16","s16","u32","s32"]);class f extends t{constructor(){super(...arguments),this.name="BrushRasterColorizer",this.type=0,this.shaders={lut:new o,stretch:new n,shadedRelief:new r},this._mosaicFbo=null,this._statisticsTechnique=null,this._draTimer=0}shutdown(t){super.shutdown(t),this._mosaicFbo=e(this._mosaicFbo),this._statisticsTechnique=e(this._statisticsTechnique)}render(t,i){const s=i.bitmaps.some(g);s||(this._mosaicFbo=e(this._mosaicFbo),this._statisticsTechnique=e(this._statisticsTechnique));const o=s?this._computeStatisticsTextures(t,i):void 0;for(const e of i.bitmaps){if(!e.source||e.suspended)continue;t.timeline.begin(this.name);const{painter:i}=t;i.setPipelineState({depth:!1,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"composite"}}),e.updateTexture(t),e.updateProcessedTexture();const{type:s}=e.symbolizerParameters,r="stretch"===s?this._getStretchOptions(e,o):"lut"===s?this._getLutOptions(e):this._getShadedReliefOptions(e);"bilinear"!==e.interpolation||t.context.capabilities.textureFloatLinear||(r.defines.bilinear=!0),i.submitDrawMesh(t.context,r,i.quadMesh,e),t.timeline.end(this.name)}}_computeStatisticsTextures(e,t){this._statisticsTechnique??=new i;const s=this._statisticsTechnique;let o=has("esri-2d-dra-delay");if(null==o){const e=t.bitmaps.find(g),{stretchType:i,bandCount:s}=e.symbolizerParameters,{pixelType:r}=e.source;"minMax"===i&&s>=3&&p.has(r)&&(o=h)}if(o){const i=performance.now();(i-this._draTimer>=o||e.stationary||!s.minValuesTexture)&&(this._mosaic(e,t),s.render(e,{fbo:this._mosaicFbo}),this._draTimer=i)}else this._mosaic(e,t),s.render(e,{fbo:this._mosaicFbo});return{minTexture:s.minValuesTexture,maxTexture:s.maxValuesTexture,meanTexture:s.meanValuesTexture,stddevTexture:s.stdDevValuesTexture}}_mosaic(e,t){const{context:i,painter:s}=e,o=i.getBoundFramebufferObject();if(this._mosaicFbo)this._mosaicFbo.resize(o.width,o.height);else{const e=d(i,o.width,o.height);this._mosaicFbo=new c(i,e)}i.bindFramebuffer(this._mosaicFbo);const r="RasterColorizerMosaic";for(const n of t.bitmaps){if(!g(n))continue;e.timeline.begin(r),s.setPipelineState({depth:!1,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"composite"}});const t=n.interpolation;n.interpolation="nearest",n.updateTexture(e),n.updateProcessedTexture();const i=this._getStretchOptions(n);i.defines.noOp=!0,s.submitDrawMesh(e.context,i,s.quadMesh,n),n.interpolation=t,e.timeline.end(r)}i.bindFramebuffer(o)}_getLutOptions(e){const{config:t,projectionConfig:i,colormapConfig:o,pixelMaskConfig:r,highlightConfig:n,projectionDefines:a}=this._getCommonConfig(e),u=s(e);return{shader:this.shaders.lut,uniforms:{projectionConfig:i,config:t,colormapConfig:o,pixelMaskConfig:r,highlightConfig:n},defines:{...a,...u,applyPixelMask:!!r,applyPixelHighlights:!!n},optionalAttributes:null,useComputeBuffer:!1}}_getStretchOptions(e,t){const i=e.symbolizerParameters,{config:o,projectionConfig:r,colormapConfig:n,pixelMaskConfig:a,highlightConfig:u,projectionDefines:c,textureUnit:m}=this._getCommonConfig(e),l=s(e),h=t?{minTexture:{texture:t.minTexture,unit:m},maxTexture:{texture:t.maxTexture,unit:m+1},meanTexture:{texture:t.meanTexture,unit:m+2},stddevTexture:{texture:t.stddevTexture,unit:m+3},numberOfStandardDeviations:i.numberOfStandardDeviations||2}:void 0,p=t?"standardDeviation"===i.stretchType?2:1:0;return{shader:this.shaders.stretch,uniforms:{projectionConfig:r,config:o,stretchConfig:i,colormapConfig:n,pixelMaskConfig:a,highlightConfig:u,statisticsConfig:h},defines:{...c,...l,isMultiband:i.bandCount>1,applyColormap:!!n,useGamma:i.useGamma,noOp:e.isRenderedSource&&!e.processed,applyPixelMask:!!a,applyPixelHighlights:!!u,draStretchType:p},optionalAttributes:null,useComputeBuffer:!1}}_getShadedReliefOptions(e){const t=e.symbolizerParameters,{config:i,projectionConfig:o,colormapConfig:r,pixelMaskConfig:n,highlightConfig:a,projectionDefines:u}=this._getCommonConfig(e),c=s(e);return{shader:this.shaders.shadedRelief,uniforms:{projectionConfig:o,config:i,hillshadeConfig:t,colormapConfig:r,pixelMaskConfig:n,highlightConfig:a},defines:{...u,...c,isMultidirectional:t.hillshadeType>0,applyColormap:!!r,applyPixelMask:!!n,applyPixelHighlights:!!a},optionalAttributes:null,useComputeBuffer:!1}}_getCommonConfig(e){const{coordScale:t,computedOpacity:i,transforms:s}=e,{names:o,textures:r}=e.getTextures({useProcessedTexture:e.processed}),n=r[o.indexOf("u_image")],a=e.getRasterTextureSize();let u=0;const c={texture:{texture:n,unit:u++},dvsMat3:s.displayViewScreenMat3,coordScale:t,srcImageSize:a,opacity:i},m=r[o.indexOf("u_transformGrid")],{transformGrid:l}=e,h=!(!m||!l),p=h?{transformTexture:{texture:m,unit:u++},targetImageSize:[e.width,e.height],transformSpacing:l.spacing,transformGridSize:l.size}:void 0,f=r[o.indexOf("u_colormap")],{colormap:d,colormapOffset:g}=e.symbolizerParameters,x=f&&d?{colormapTexture:{texture:f,unit:u++},colormapOffset:g??0,colormapMaxIndex:d.length/4-1}:void 0,b=r[o.indexOf("u_mask")],T=b?{maskTexture:{texture:b,unit:u++}}:void 0,{highlightTexture:C}=e;return{config:c,projectionConfig:p,colormapConfig:x,pixelMaskConfig:T,highlightConfig:C?{highlightTexture:{texture:C,unit:u++}}:void 0,projectionDefines:{applyProjection:h,lookupProjection:h&&1===l.spacing[0]},textureUnit:u}}}function d(e,t,i){const s=new l(t,i);return s.internalFormat=a.RGBA32F,s.samplingMode=9728,s.dataType=u.FLOAT,s.wrapMode=33071,new m(e,s)}function g(e){return!e.suspended&&null!=e.source&&!e.isRenderedSource&&"stretch"===e.symbolizerParameters.type&&!!e.symbolizerParameters.dynamicRangeAdjustment}export{f as RasterColorizerTechnique};
2
+ import has from"../../../../../../../core/has.js";import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{Technique as t}from"../Technique.js";import{TextureStatisticsTechnique as i}from"../TextureStatisticsTechnique.js";import{getInterpolationDefines as s}from"./processor/textureUtils.js";import{RasterColorizerLUTShader as o}from"../shaders/raster/RasterColorizerLUTShader.js";import{RasterColorizerShadedReliefShader as r}from"../shaders/raster/RasterColorizerShadedReliefShader.js";import{RasterColorizerStretchShader as n}from"../shaders/raster/RasterColorizerStretchShader.js";import{SizedPixelFormat as a,PixelType as u}from"../../../../../../webgl/enums.js";import{DisposableFramebufferObject as c}from"../../../../../../webgl/FramebufferObject.js";import m from"../../../../../../webgl/Texture.js";import{TextureDescriptor as l}from"../../../../../../webgl/TextureDescriptor.js";const h=160,p=new Set(["f32","f64","u16","s16","u32","s32"]);class f extends t{constructor(){super(...arguments),this.name="BrushRasterColorizer",this.type=0,this.shaders={lut:new o,stretch:new n,shadedRelief:new r},this._mosaicFbo=null,this._statisticsTechnique=null,this._draTimer=0}shutdown(t){super.shutdown(t),this._mosaicFbo=e(this._mosaicFbo),this._statisticsTechnique=e(this._statisticsTechnique)}render(t,i){const s=i.bitmaps.some(g);s||(this._mosaicFbo=e(this._mosaicFbo),this._statisticsTechnique=e(this._statisticsTechnique));const o=s?this._computeStatisticsTextures(t,i):void 0;for(const e of i.bitmaps){if(!e.source||e.suspended)continue;t.timeline.begin(this.name);const{painter:i}=t;i.setPipelineState({depth:!1,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"composite"}}),e.updateTexture(t),e.updateProcessedTexture();const{type:s}=e.symbolizerParameters,r="stretch"===s?this._getStretchOptions(e,o):"lut"===s?this._getLutOptions(e):this._getShadedReliefOptions(e);"bilinear"!==e.interpolation||t.context.capabilities.textureFloatLinear||(r.defines.bilinear=!0),i.submitDrawMesh(t.context,r,i.quadMesh,e),t.timeline.end(this.name)}}_computeStatisticsTextures(e,t){this._statisticsTechnique??=new i;const s=this._statisticsTechnique;let o=has("esri-2d-dra-delay");if(null==o){const e=t.bitmaps.find(g),{stretchType:i,bandCount:s}=e.symbolizerParameters,{pixelType:r}=e.source;"minMax"===i&&s>=3&&p.has(r)&&(o=h)}if(o){const i=performance.now();(i-this._draTimer>=o||e.stationary||!s.minValuesTexture)&&(this._mosaic(e,t),s.render(e,{fbo:this._mosaicFbo}),this._draTimer=i)}else this._mosaic(e,t),s.render(e,{fbo:this._mosaicFbo});return{minTexture:s.minValuesTexture,maxTexture:s.maxValuesTexture,meanTexture:s.meanValuesTexture,stddevTexture:s.stdDevValuesTexture}}_mosaic(e,t){const{context:i,painter:s}=e,o=i.boundFramebuffer;if(null==o)return;if(this._mosaicFbo)this._mosaicFbo.resize(o.width,o.height);else{const e=d(i,o.width,o.height);this._mosaicFbo=new c(i,e)}i.bindFramebuffer(this._mosaicFbo);const r="RasterColorizerMosaic";for(const n of t.bitmaps){if(!g(n))continue;e.timeline.begin(r),s.setPipelineState({depth:!1,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"composite"}});const t=n.interpolation;n.interpolation="nearest",n.updateTexture(e),n.updateProcessedTexture();const i=this._getStretchOptions(n);i.defines.noOp=!0,s.submitDrawMesh(e.context,i,s.quadMesh,n),n.interpolation=t,e.timeline.end(r)}i.bindFramebuffer(o)}_getLutOptions(e){const{config:t,projectionConfig:i,colormapConfig:o,pixelMaskConfig:r,highlightConfig:n,projectionDefines:a}=this._getCommonConfig(e),u=s(e);return{shader:this.shaders.lut,uniforms:{projectionConfig:i,config:t,colormapConfig:o,pixelMaskConfig:r,highlightConfig:n},defines:{...a,...u,applyPixelMask:!!r,applyPixelHighlights:!!n},optionalAttributes:null,useComputeBuffer:!1}}_getStretchOptions(e,t){const i=e.symbolizerParameters,{config:o,projectionConfig:r,colormapConfig:n,pixelMaskConfig:a,highlightConfig:u,projectionDefines:c,textureUnit:m}=this._getCommonConfig(e),l=s(e),h=t?{minTexture:{texture:t.minTexture,unit:m},maxTexture:{texture:t.maxTexture,unit:m+1},meanTexture:{texture:t.meanTexture,unit:m+2},stddevTexture:{texture:t.stddevTexture,unit:m+3},numberOfStandardDeviations:i.numberOfStandardDeviations||2}:void 0,p=t?"standardDeviation"===i.stretchType?2:1:0;return{shader:this.shaders.stretch,uniforms:{projectionConfig:r,config:o,stretchConfig:i,colormapConfig:n,pixelMaskConfig:a,highlightConfig:u,statisticsConfig:h},defines:{...c,...l,isMultiband:i.bandCount>1,applyColormap:!!n,useGamma:i.useGamma,noOp:e.isRenderedSource&&!e.processed,applyPixelMask:!!a,applyPixelHighlights:!!u,draStretchType:p},optionalAttributes:null,useComputeBuffer:!1}}_getShadedReliefOptions(e){const t=e.symbolizerParameters,{config:i,projectionConfig:o,colormapConfig:r,pixelMaskConfig:n,highlightConfig:a,projectionDefines:u}=this._getCommonConfig(e),c=s(e);return{shader:this.shaders.shadedRelief,uniforms:{projectionConfig:o,config:i,hillshadeConfig:t,colormapConfig:r,pixelMaskConfig:n,highlightConfig:a},defines:{...u,...c,isMultidirectional:t.hillshadeType>0,applyColormap:!!r,applyPixelMask:!!n,applyPixelHighlights:!!a},optionalAttributes:null,useComputeBuffer:!1}}_getCommonConfig(e){const{coordScale:t,computedOpacity:i,transforms:s}=e,{names:o,textures:r}=e.getTextures({useProcessedTexture:e.processed}),n=r[o.indexOf("u_image")],a=e.getRasterTextureSize();let u=0;const c={texture:{texture:n,unit:u++},dvsMat3:s.displayViewScreenMat3,coordScale:t,srcImageSize:a,opacity:i},m=r[o.indexOf("u_transformGrid")],{transformGrid:l}=e,h=!(!m||!l),p=h?{transformTexture:{texture:m,unit:u++},targetImageSize:[e.width,e.height],transformSpacing:l.spacing,transformGridSize:l.size}:void 0,f=r[o.indexOf("u_colormap")],{colormap:d,colormapOffset:g}=e.symbolizerParameters,x=f&&d?{colormapTexture:{texture:f,unit:u++},colormapOffset:g??0,colormapMaxIndex:d.length/4-1}:void 0,b=r[o.indexOf("u_mask")],T=b?{maskTexture:{texture:b,unit:u++}}:void 0,{highlightTexture:C}=e;return{config:c,projectionConfig:p,colormapConfig:x,pixelMaskConfig:T,highlightConfig:C?{highlightTexture:{texture:C,unit:u++}}:void 0,projectionDefines:{applyProjection:h,lookupProjection:h&&1===l.spacing[0]},textureUnit:u}}}function d(e,t,i){const s=new l(t,i);return s.internalFormat=a.RGBA32F,s.samplingMode=9728,s.dataType=u.FLOAT,s.wrapMode=33071,new m(e,s)}function g(e){return!e.suspended&&null!=e.source&&!e.isRenderedSource&&"stretch"===e.symbolizerParameters.type&&!!e.symbolizerParameters.dynamicRangeAdjustment}export{f as RasterColorizerTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{tileSize as e}from"../../../definitions.js";import{Technique as t}from"../Technique.js";import{getInterpolationDefines as i}from"./processor/textureUtils.js";import{RasterRangeHighlightShader as n}from"../shaders/raster/RasterRangeHighlightShader.js";import{RasterXYBandHighlightShader as o}from"../shaders/raster/RasterXYBandHighlightShader.js";import{SizedPixelFormat as r,PixelType as s}from"../../../../../../webgl/enums.js";import{FramebufferObject as a}from"../../../../../../webgl/FramebufferObject.js";import g from"../../../../../../webgl/Texture.js";import{TextureDescriptor as h}from"../../../../../../webgl/TextureDescriptor.js";class d extends t{constructor(){super(...arguments),this.name="BrushRasterHighlight",this.type=2,this.shaders={range:new n,xyBand:new o}}shutdown(e){super.shutdown(e),this._fbo?.dispose(),this._fbo=void 0}_getBandIds(e,t){const{type:i}=e,n="xy-band"===i?e.bandIds:[e.bandId];return t?.length?n.map(e=>t.indexOf(e)):"xy-band"===i?[0,1]:[0]}_getSingleBandShaderOptions(e,t,n,o){const{config:r,projectionConfig:s,highlightConfig:a,projectionDefines:g}=this._getCommonConfig(t),h=i(t,o),d={bandSwap:n,ranges:e.ranges,color:e.color};return{shader:this.shaders.range,uniforms:{projectionConfig:s,config:r,rangeHighlightConfig:d,highlightConfig:a},defines:{...g,...h,applyPixelMask:!1,applyPixelHighlights:!1,hasExistingHighlights:!!a},optionalAttributes:null,useComputeBuffer:!1}}_getXYBandShaderOptions(e,t,n,o,r){const{config:s,projectionConfig:a,highlightConfig:g,projectionDefines:h}=this._getCommonConfig(t),d=i(t,o),u={bandSwap:n,xRange:e.xRange,yRange:e.yRange,color:e.color},p=r?{maskTexture:{texture:r,unit:4}}:void 0;return{shader:this.shaders.xyBand,uniforms:{projectionConfig:a,config:s,xyRangeHighlightConfig:u,xyMaskHighlightConfig:p,highlightConfig:g},defines:{...h,...d,applyPixelMask:!1,applyPixelHighlights:!1,hasExistingHighlights:!!g,useMask:!!p},optionalAttributes:null,useComputeBuffer:!1}}render(t,i){const{pixelHighlightOptions:n}=t;if(!n)return;const{context:o}=t;if(!this._fbo){const i=u(t.context,e,e);this._fbo=new a(o,i)}const{type:r}=n,s="xy-band"===r?p(t.context,n):void 0,g=o.getBoundFramebufferObject(),h=o.getViewport();for(const a of i.bitmaps){if(!a.source||a.highlighted||a.suspended||a.isRenderedSource)continue;const i=this._getBandIds(n,a.bandIds);if(i.some(e=>e<0||e>2))continue;t.timeline.begin(this.name);const{painter:g}=t;g.setPipelineState({depth:!1,stencil:{test:!1,write:!1},color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:0,srcAlpha:1,dstAlpha:0}}}),a.updateTexture(t),a.updateProcessedTexture(!1);const h=new Float32Array(9);h[3*i[0]]=1,h[3*i[1]+1]="xy-band"===r?1:0;const d="single-band"===r?this._getSingleBandShaderOptions(n,a,h,o):this._getXYBandShaderOptions(n,a,h,o,s);o.bindFramebuffer(this._fbo),o.setViewport(0,0,e,e),g.submitDrawMesh(t.context,d,g.quadMesh);const p=u(t.context,e,e);this._fbo.copyToTexture(0,0,e,e,0,0,p),a.highlightTexture=p,t.timeline.end(this.name)}s?.dispose(),o.bindFramebuffer(g),o.setViewport(h.x,h.y,h.width,h.height)}_getCommonConfig(e){const{names:t,textures:i}=e.getTextures({forProcessing:!0,useProcessedTexture:e.processed}),n=i[t.indexOf("u_image")],o=e.getRasterTextureSize(),r={texture:{texture:n,unit:0},dvsMat3:new Float32Array([2,0,0,0,2,0,-1,-1,0]),coordScale:[1,1],srcImageSize:o,opacity:1},s=i[t.indexOf("u_transformGrid")],{transformGrid:a}=e,g=!(!s||!a),h=g?{transformTexture:{texture:s,unit:1},targetImageSize:[e.width,e.height],transformSpacing:a.spacing,transformGridSize:a.size}:void 0,{highlightTexture:d}=e;return{config:r,projectionConfig:h,highlightConfig:d?{highlightTexture:{texture:d,unit:2}}:void 0,projectionDefines:{applyProjection:g,lookupProjection:g&&1===a.spacing[0]}}}}function u(e,t,i){const n=new h(t,i);return n.internalFormat=r.RGBA8,n.samplingMode=9728,n.dataType=s.UNSIGNED_BYTE,n.isImmutable=!0,n.wrapMode=33071,new g(e,n)}function p(e,t){const{mask:i,maskSize:n}=t;if(!i?.length||!n?.length)return;const o=new h(n[0],n[1]);return o.internalFormat=r.R8,o.samplingMode=9728,o.dataType=s.UNSIGNED_BYTE,o.isImmutable=!0,o.wrapMode=33071,new g(e,o,i)}export{d as RasterHighlightTechnique};
2
+ import{tileSize as e}from"../../../definitions.js";import{Technique as t}from"../Technique.js";import{getInterpolationDefines as i}from"./processor/textureUtils.js";import{RasterRangeHighlightShader as n}from"../shaders/raster/RasterRangeHighlightShader.js";import{RasterXYBandHighlightShader as o}from"../shaders/raster/RasterXYBandHighlightShader.js";import{SizedPixelFormat as r,PixelType as s}from"../../../../../../webgl/enums.js";import{DisposableFramebufferObject as a}from"../../../../../../webgl/FramebufferObject.js";import g from"../../../../../../webgl/Texture.js";import{TextureDescriptor as h}from"../../../../../../webgl/TextureDescriptor.js";class d extends t{constructor(){super(...arguments),this.name="BrushRasterHighlight",this.type=2,this.shaders={range:new n,xyBand:new o}}shutdown(e){super.shutdown(e),this._fbo?.dispose(),this._fbo=void 0}_getBandIds(e,t){const{type:i}=e,n="xy-band"===i?e.bandIds:[e.bandId];return t?.length?n.map(e=>t.indexOf(e)):"xy-band"===i?[0,1]:[0]}_getSingleBandShaderOptions(e,t,n,o){const{config:r,projectionConfig:s,highlightConfig:a,projectionDefines:g}=this._getCommonConfig(t),h=i(t,o),d={bandSwap:n,ranges:e.ranges,color:e.color};return{shader:this.shaders.range,uniforms:{projectionConfig:s,config:r,rangeHighlightConfig:d,highlightConfig:a},defines:{...g,...h,applyPixelMask:!1,applyPixelHighlights:!1,hasExistingHighlights:!!a},optionalAttributes:null,useComputeBuffer:!1}}_getXYBandShaderOptions(e,t,n,o,r){const{config:s,projectionConfig:a,highlightConfig:g,projectionDefines:h}=this._getCommonConfig(t),d=i(t,o),u={bandSwap:n,xRange:e.xRange,yRange:e.yRange,color:e.color},p=r?{maskTexture:{texture:r,unit:4}}:void 0;return{shader:this.shaders.xyBand,uniforms:{projectionConfig:a,config:s,xyRangeHighlightConfig:u,xyMaskHighlightConfig:p,highlightConfig:g},defines:{...h,...d,applyPixelMask:!1,applyPixelHighlights:!1,hasExistingHighlights:!!g,useMask:!!p},optionalAttributes:null,useComputeBuffer:!1}}render(t,i){const{pixelHighlightOptions:n}=t;if(!n)return;const{context:o}=t;if(!this._fbo){const i=u(t.context,e,e);this._fbo=new a(o,i)}const{type:r}=n,s="xy-band"===r?p(t.context,n):void 0,g=o.boundFramebuffer,h=o.getViewport();for(const a of i.bitmaps){if(!a.source||a.highlighted||a.suspended||a.isRenderedSource)continue;const i=this._getBandIds(n,a.bandIds);if(i.some(e=>e<0||e>2))continue;t.timeline.begin(this.name);const{painter:g}=t;g.setPipelineState({depth:!1,stencil:{test:!1,write:!1},color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:0,srcAlpha:1,dstAlpha:0}}}),a.updateTexture(t),a.updateProcessedTexture(!1);const h=new Float32Array(9);h[3*i[0]]=1,h[3*i[1]+1]="xy-band"===r?1:0;const d="single-band"===r?this._getSingleBandShaderOptions(n,a,h,o):this._getXYBandShaderOptions(n,a,h,o,s);o.bindFramebuffer(this._fbo),o.setViewport(0,0,e,e),g.submitDrawMesh(t.context,d,g.quadMesh);const p=u(t.context,e,e);this._fbo.copyToTexture(0,0,e,e,0,0,p),a.highlightTexture=p,t.timeline.end(this.name)}s?.dispose(),o.bindFramebuffer(g),o.setViewport(h.x,h.y,h.width,h.height)}_getCommonConfig(e){const{names:t,textures:i}=e.getTextures({forProcessing:!0,useProcessedTexture:e.processed}),n=i[t.indexOf("u_image")],o=e.getRasterTextureSize(),r={texture:{texture:n,unit:0},dvsMat3:new Float32Array([2,0,0,0,2,0,-1,-1,0]),coordScale:[1,1],srcImageSize:o,opacity:1},s=i[t.indexOf("u_transformGrid")],{transformGrid:a}=e,g=!(!s||!a),h=g?{transformTexture:{texture:s,unit:1},targetImageSize:[e.width,e.height],transformSpacing:a.spacing,transformGridSize:a.size}:void 0,{highlightTexture:d}=e;return{config:r,projectionConfig:h,highlightConfig:d?{highlightTexture:{texture:d,unit:2}}:void 0,projectionDefines:{applyProjection:g,lookupProjection:g&&1===a.spacing[0]}}}}function u(e,t,i){const n=new h(t,i);return n.internalFormat=r.RGBA8,n.samplingMode=9728,n.dataType=s.UNSIGNED_BYTE,n.isImmutable=!0,n.wrapMode=33071,new g(e,n)}function p(e,t){const{mask:i,maskSize:n}=t;if(!i?.length||!n?.length)return;const o=new h(n[0],n[1]);return o.internalFormat=r.R8,o.samplingMode=9728,o.dataType=s.UNSIGNED_BYTE,o.isImmutable=!0,o.wrapMode=33071,new g(e,o,i)}export{d as RasterHighlightTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{disposeMaybe as e}from"../../../../../../../../core/maybe.js";import{tileSize as t}from"../../../../definitions.js";import{Technique as r}from"../../Technique.js";import{createNewFBO as n,createProcessedTexture as s}from"./textureUtils.js";import{createColormapTexture as o}from"../../../../../../../webgl/rasterUtils.js";class i extends r{shutdown(e){super.shutdown(e),this._fbo?.dispose(),this._fbo=void 0}render(r,i){const{rasterFunction:a}=r;if(!a)return;const{context:u}=r,m="indexedColormap"in a.parameters?o(u,a.parameters.indexedColormap):void 0,p="Reproject"===a.name,d=u.getBoundFramebufferObject(),c=u.getViewport();for(const o of i.bitmaps){const d=p?!(o.rasterTexture&&o.projected):!o.processed;if(!o.source||!d||o.suspended)continue;r.timeline.begin(this.name);const{painter:c}=r;c.setPipelineState({depth:!1,stencil:{test:!1,write:!1},color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:0,srcAlpha:1,dstAlpha:0}}}),p||(o.processedTexture=e(o.processedTexture)),o.updateTexture(r);const[l,g]=o.getRasterTextureSize(p),f=l===t&&g===t,h=f?i.processorFbo:n(u,l,g);u.bindFramebuffer(h),u.setViewport(0,0,h.width,h.height),this._process(r,o,m);const x=s(r.context,l,g);if(h.copyToTexture(0,0,l,g,0,0,x),p)o.rasterTexture=x;else{const e=r.hasBranches?a.id:0;o.functionTextures[e]?.dispose(),o.functionTextures[e]=x}f||h.dispose(),r.timeline.end(this.name)}m?.dispose(),u.bindFramebuffer(d),u.setViewport(c.x,c.y,c.width,c.height)}_getCommonConfig(e,t){const{rasterFunction:r,hasBranches:n}=e,{raster:s,rasters:o}=r.parameters,i=n?s?.id??o?.find(e=>"Constant"!==e.name)?.id??-1:0,a=t.functionTextures[i]??t.rasterTexture,u="Reproject"===r.name;return{texture:{texture:a,unit:0},srcImageSize:t.getRasterTextureSize(u)}}_getMultipleInputConfig(e,t){return t?.length?2===t.length?{twoRasterConfig:this._getTwoInputConfig(t,e)}:3===t.length?{threeRasterConfig:this._getThreeInputConfig(t,e)}:{}:{}}_getConstantCount(e){return e?.filter(e=>"Constant"===e.name).length??0}_getTextures(e,t){return e.filter(e=>"Constant"!==e.name).map(e=>null!=e.id&&"Identity"!==e.name?t.functionTextures[e.id]:t.rasterTexture)}_getTwoInputConfig(e,t){const r=this._getTextures(e,t),n=r[1]?{texture:r[1],unit:1}:void 0,s=e.findIndex(e=>"Constant"===e.name),o=0===s?new Float32Array([0,1,0,1,0,0,0,0,0]):new Float32Array([1,0,0,0,1,0,0,0,0]);return{image1:n,image1Const:s>-1?e[s].parameters.value:0,imageSwap:o}}_getThreeInputConfig(e,t){const r=this._getTextures(e,t);let n=0,s=0,o=new Float32Array([1,0,0,0,1,0,0,0,1]);const i=r[1]?{texture:r[1],unit:1}:void 0,a=r[2]?{texture:r[2],unit:2}:void 0,u=[];if(e.forEach((e,t)=>"Constant"===e.name&&u.push(t)),1===u.length)n=e[u[0]].parameters.value,o=0===u[0]?new Float32Array([0,1,0,0,0,1,1,0,0]):1===u[0]?new Float32Array([1,0,0,0,0,1,0,1,0]):new Float32Array([1,0,0,0,1,0,0,0,1]);else if(2===u.length){n=e[u[0]].parameters.value,s=e[u[1]].parameters.value;const t=e.findIndex(e=>"Constant"!==e.name);o=0===t?new Float32Array([1,0,0,0,1,0,0,0,1]):1===t?new Float32Array([0,1,0,1,0,0,0,0,1]):new Float32Array([0,0,1,1,0,0,0,1,0])}return{image1:i,image2:a,image1Const:n,image2Const:s,imageSwap:o}}}export{i as BaseRasterProcessorTechnique};
2
+ import{disposeMaybe as e}from"../../../../../../../../core/maybe.js";import{tileSize as t}from"../../../../definitions.js";import{Technique as r}from"../../Technique.js";import{createNewFBO as n,createProcessedTexture as s}from"./textureUtils.js";import{createColormapTexture as o}from"../../../../../../../webgl/rasterUtils.js";class i extends r{shutdown(e){super.shutdown(e),this._fbo?.dispose(),this._fbo=void 0}render(r,i){const{rasterFunction:a}=r;if(!a)return;const{context:u}=r,m="indexedColormap"in a.parameters?o(u,a.parameters.indexedColormap):void 0,p="Reproject"===a.name,d=u.boundFramebuffer,c=u.getViewport();for(const o of i.bitmaps){const d=p?!(o.rasterTexture&&o.projected):!o.processed;if(!o.source||!d||o.suspended)continue;r.timeline.begin(this.name);const{painter:c}=r;c.setPipelineState({depth:!1,stencil:{test:!1,write:!1},color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:0,srcAlpha:1,dstAlpha:0}}}),p||(o.processedTexture=e(o.processedTexture)),o.updateTexture(r);const[l,g]=o.getRasterTextureSize(p),f=l===t&&g===t,h=f?i.processorFbo:n(u,l,g);u.bindFramebuffer(h),u.setViewport(0,0,h.width,h.height),this._process(r,o,m);const x=s(r.context,l,g);if(h.copyToTexture(0,0,l,g,0,0,x),p)o.rasterTexture=x;else{const e=r.hasBranches?a.id:0;o.functionTextures[e]?.dispose(),o.functionTextures[e]=x}f||h.dispose(),r.timeline.end(this.name)}m?.dispose(),u.bindFramebuffer(d),u.setViewport(c.x,c.y,c.width,c.height)}_getCommonConfig(e,t){const{rasterFunction:r,hasBranches:n}=e,{raster:s,rasters:o}=r.parameters,i=n?s?.id??o?.find(e=>"Constant"!==e.name)?.id??-1:0,a=t.functionTextures[i]??t.rasterTexture,u="Reproject"===r.name;return{texture:{texture:a,unit:0},srcImageSize:t.getRasterTextureSize(u)}}_getMultipleInputConfig(e,t){return t?.length?2===t.length?{twoRasterConfig:this._getTwoInputConfig(t,e)}:3===t.length?{threeRasterConfig:this._getThreeInputConfig(t,e)}:{}:{}}_getConstantCount(e){return e?.filter(e=>"Constant"===e.name).length??0}_getTextures(e,t){return e.filter(e=>"Constant"!==e.name).map(e=>null!=e.id&&"Identity"!==e.name?t.functionTextures[e.id]:t.rasterTexture)}_getTwoInputConfig(e,t){const r=this._getTextures(e,t),n=r[1]?{texture:r[1],unit:1}:void 0,s=e.findIndex(e=>"Constant"===e.name),o=0===s?new Float32Array([0,1,0,1,0,0,0,0,0]):new Float32Array([1,0,0,0,1,0,0,0,0]);return{image1:n,image1Const:s>-1?e[s].parameters.value:0,imageSwap:o}}_getThreeInputConfig(e,t){const r=this._getTextures(e,t);let n=0,s=0,o=new Float32Array([1,0,0,0,1,0,0,0,1]);const i=r[1]?{texture:r[1],unit:1}:void 0,a=r[2]?{texture:r[2],unit:2}:void 0,u=[];if(e.forEach((e,t)=>"Constant"===e.name&&u.push(t)),1===u.length)n=e[u[0]].parameters.value,o=0===u[0]?new Float32Array([0,1,0,0,0,1,1,0,0]):1===u[0]?new Float32Array([1,0,0,0,0,1,0,1,0]):new Float32Array([1,0,0,0,1,0,0,0,1]);else if(2===u.length){n=e[u[0]].parameters.value,s=e[u[1]].parameters.value;const t=e.findIndex(e=>"Constant"!==e.name);o=0===t?new Float32Array([1,0,0,0,1,0,0,0,1]):1===t?new Float32Array([0,1,0,1,0,0,0,0,1]):new Float32Array([0,0,1,1,0,0,0,1,0])}return{image1:i,image2:a,image1Const:n,image2Const:s,imageSwap:o}}}export{i as BaseRasterProcessorTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{SizedPixelFormat as e,PixelType as t}from"../../../../../../../webgl/enums.js";import{FramebufferObject as r}from"../../../../../../../webgl/FramebufferObject.js";import n from"../../../../../../../webgl/Texture.js";import{TextureDescriptor as i}from"../../../../../../../webgl/TextureDescriptor.js";function o(r,n){const o=new i(r,n);return o.internalFormat=e.RGBA32F,o.samplingMode=9728,o.dataType=t.FLOAT,o.isImmutable=!0,o.wrapMode=33071,o}function a(e,t,r){const i=o(t,r);return new n(e,i)}function u(e,t,n){const i=o(t,n);return new r(e,i)}function l(e,t){const{symbolizerParameters:r}=e,{type:n}=r,i="lut"===n?"nearest":e.interpolation,o="bilinear"===i&&("lut"!==n&&("stretch"!==n||1===r.bandCount)),a="cubic"===i;return{bilinear:o||"bilinear"===i&&null!=t&&!t.capabilities.textureFloatLinear,bicubic:a,nearestOnEdge:o}}export{u as createNewFBO,a as createProcessedTexture,l as getInterpolationDefines};
2
+ import{SizedPixelFormat as e,PixelType as t}from"../../../../../../../webgl/enums.js";import{DisposableFramebufferObject as r}from"../../../../../../../webgl/FramebufferObject.js";import n from"../../../../../../../webgl/Texture.js";import{TextureDescriptor as i}from"../../../../../../../webgl/TextureDescriptor.js";function o(r,n){const o=new i(r,n);return o.internalFormat=e.RGBA32F,o.samplingMode=9728,o.dataType=t.FLOAT,o.isImmutable=!0,o.wrapMode=33071,o}function a(e,t,r){const i=o(t,r);return new n(e,i)}function u(e,t,n){const i=o(t,n);return new r(e,i)}function l(e,t){const{symbolizerParameters:r}=e,{type:n}=r,i="lut"===n?"nearest":e.interpolation,o="bilinear"===i&&("lut"!==n&&("stretch"!==n||1===r.bandCount)),a="cubic"===i;return{bilinear:o||"bilinear"===i&&null!=t&&!t.capabilities.textureFloatLinear,bicubic:a,nearestOnEdge:o}}export{u as createNewFBO,a as createProcessedTexture,l as getInterpolationDefines};