@arcgis/core 5.2.0-next.136 → 5.2.0-next.138

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 (507) hide show
  1. package/analysis/LineOfSightAnalysisObserver.d.ts +12 -0
  2. package/analysis/LineOfSightAnalysisObserver.js +1 -1
  3. package/analysis/LineOfSightAnalysisTarget.d.ts +12 -0
  4. package/analysis/LineOfSightAnalysisTarget.js +1 -1
  5. package/arcade/featureset/sources/FeatureLayerParquet.js +1 -1
  6. package/arcgisGlobal.d.ts +4 -0
  7. package/assets/components/assets/icon/blockHeightMedium16.json +1 -0
  8. package/assets/components/assets/icon/blockHeightMedium24.json +1 -0
  9. package/assets/components/assets/icon/blockHeightMedium32.json +1 -0
  10. package/assets/components/assets/icon/blockHeightShort16.json +1 -0
  11. package/assets/components/assets/icon/blockHeightShort24.json +1 -0
  12. package/assets/components/assets/icon/blockHeightShort32.json +1 -0
  13. package/assets/components/assets/icon/blockHeightTall16.json +1 -0
  14. package/assets/components/assets/icon/blockHeightTall24.json +1 -0
  15. package/assets/components/assets/icon/blockHeightTall32.json +1 -0
  16. package/assets/components/assets/icon/cursorCircle16.json +1 -0
  17. package/assets/components/assets/icon/cursorCircle24.json +1 -0
  18. package/assets/components/assets/icon/cursorCircle32.json +1 -0
  19. package/assets/components/assets/icon/dictionary16.json +1 -0
  20. package/assets/components/assets/icon/dictionary24.json +1 -0
  21. package/assets/components/assets/icon/dictionary32.json +1 -0
  22. package/assets/components/assets/icon/jobDependency16.json +1 -0
  23. package/assets/components/assets/icon/jobDependency24.json +1 -0
  24. package/assets/components/assets/icon/jobDependency32.json +1 -0
  25. package/assets/components/assets/icon/referenceChip16.json +1 -0
  26. package/assets/components/assets/icon/referenceChip24.json +1 -0
  27. package/assets/components/assets/icon/referenceChip32.json +1 -0
  28. package/assets/esri/core/workers/RemoteClient.js +1 -1
  29. package/assets/esri/core/workers/chunks/{4e6f95d8c624d513849a.js → 05963f57cbe5a5249496.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{0b8681ca4a83e97f1f71.js → 067de1910190da228291.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{3c0fd1c6cda44e9f40ab.js → 070684943698fa43c2b4.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{bc1cb4b9a02e6c78deb7.js → 076e8d2e08ff2a013736.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{c10e040368065411506a.js → 10445313d0d57b34511b.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{d537c59b46cdaaf66034.js → 1188d0a136fffc009643.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{20af3f085f60c32c6c53.js → 178083d8ed7707b45ca2.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{f5efe3e800c6e23efcf3.js → 1819c45655c836b9a8d7.js} +1 -1
  37. package/assets/esri/core/workers/chunks/1b946714ca4a1a7359d4.js +2 -0
  38. package/assets/esri/core/workers/chunks/{d8d8b38ac8a91d9e45fc.js → 1cc744ab5eee5ee3bed8.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{05e39b4de7f62c5b22cc.js → 20f75cc777af13fa249b.js} +1 -1
  40. package/assets/esri/core/workers/chunks/2a1ec30f9ad305763f81.js +2 -0
  41. package/assets/esri/core/workers/chunks/34570e6bbf559f18c1a5.js +1 -0
  42. package/assets/esri/core/workers/chunks/{60f6d5da9480dd36e877.js → 3dddae78286d05eb10fc.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{9efd30bbd02ec0d1031b.js → 3ec3589f6e74d7cb87cf.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{0bec054fca104f3bf141.js → 3f776d9fd2ab68b21fca.js} +1 -1
  45. package/assets/esri/core/workers/chunks/402a82c77420254831bc.js +1 -0
  46. package/assets/esri/core/workers/chunks/{e2ebf0ea3af2e6907987.js → 406f24ec13eb30d43405.js} +1 -1
  47. package/assets/esri/core/workers/chunks/43fc42405167a5537039.js +1 -0
  48. package/assets/esri/core/workers/chunks/{ddedc414bb478b376221.js → 46b2d4addfc73f9183a4.js} +1 -1
  49. package/assets/esri/core/workers/chunks/498d6dfd3bb0d3490548.js +1 -0
  50. package/assets/esri/core/workers/chunks/{36ef86701883a20dd6f6.js → 4a640548032355e57acd.js} +1 -1
  51. package/assets/esri/core/workers/chunks/5566f14afb63065e438f.js +1 -0
  52. package/assets/esri/core/workers/chunks/{c3b96d1d43afccd23e45.js → 590e6c70206122e4cc3c.js} +2 -2
  53. package/assets/esri/core/workers/chunks/{54860dd53a46cf4c47f3.js → 59295b99bdff4045a0e7.js} +1 -1
  54. package/assets/esri/core/workers/chunks/5aeb5e18514644fe2cf9.js +1 -0
  55. package/assets/esri/core/workers/chunks/{5da86409d70098fc6a10.js → 5b3cfe95314a75a735c1.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{a54678bfa0f1807b61cd.js → 5c855af73ee3c3e764fb.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{06da3409992bb1fa85b0.js → 5e90c1b49f2b7e21d05a.js} +39 -31
  58. package/assets/esri/core/workers/chunks/5fd099ca1024707387b2.js +1 -0
  59. package/assets/esri/core/workers/chunks/{30f808cac8a34f95ea6e.js → 6079d27f4ab319fb8f0c.js} +1 -1
  60. package/assets/esri/core/workers/chunks/66c2a28a851130b87c04.js +1 -0
  61. package/assets/esri/core/workers/chunks/{dac90b3631f7f7158f68.js → 67f15538c51838201fc7.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{cfaba0470619786e1ef8.js → 68d8ae42ab71d01a70a5.js} +2 -2
  63. package/assets/esri/core/workers/chunks/6aebf7cfd294e88bf926.js +1 -0
  64. package/assets/esri/core/workers/chunks/{864e7030c4ddbfcf0114.js → 6ccf9535013fe672c93b.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{ba7f0cf7e495d3ec2d55.js → 6e62581d933e7298d1f6.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{83b5dd4029e00abd80bf.js → 700b1d5bc67b7e1b3ff3.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{f9fea72cc222a30ef2f9.js → 72399062767abdfb0bee.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{2a7fbfd77002a24bf737.js → 747461bb6a1bc2f0a64d.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{c333f6ed42985bb2b11f.js → 7851aef196eea5d6c94e.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{f0b6bd6fab5320c3082f.js → 7a05b18f655c1167ce0a.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{04296b75d0f81fbd1bb5.js → 864194927d05ebc4cc31.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{3c4a13a9f0b305394a26.js → 876f7633c15f1e31078d.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{62298dba3f6cbdc3f4ae.js → 879b2f0ff1977bca9376.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{b547b3bce729c9dac90d.js → 898359be6996fd9763b8.js} +1 -1
  75. package/assets/esri/core/workers/chunks/8cb716f110d164030309.js +1 -0
  76. package/assets/esri/core/workers/chunks/8dc1c3042267618fd710.js +2 -0
  77. package/assets/esri/core/workers/chunks/{625f02db93d7fbf175ca.js → 9001e9a1e81bce175ddd.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{9ffa6c8d93d3443834c6.js → 912080c90b5cc2e817cf.js} +1 -1
  79. package/assets/esri/core/workers/chunks/96c50a0dda0f1503ef92.js +2 -0
  80. package/assets/esri/core/workers/chunks/{13e4379441499599c3b5.js → 9cbde13e536676767900.js} +1 -1
  81. package/assets/esri/core/workers/chunks/{408db4f32850b77264ae.js → 9cd3fcb5fca6f9dbbcd8.js} +1 -1
  82. package/assets/esri/core/workers/chunks/a054da6cbd8ee4774a57.js +1 -0
  83. package/assets/esri/core/workers/chunks/a05790444115e4cf1bcc.js +1 -0
  84. package/assets/esri/core/workers/chunks/{d1f2685782b423ef87a6.js → a556dd4e9e6d35e33a2c.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{00d576d355599c88931e.js → bc38def1983089514e4b.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{0725e515f3004bdd5c56.js → ca2adcbcf44454484fd5.js} +1 -1
  87. package/assets/esri/core/workers/chunks/{f3507b9e831ffd7a6bf8.js → cca8bd07bcd1d267a2e8.js} +1 -1
  88. package/assets/esri/core/workers/chunks/cfae60b9d2f2939e9c16.js +1 -0
  89. package/assets/esri/core/workers/chunks/{1d6b2a64f4e40e5cc13d.js → d201fbf3ceff946d2bd6.js} +1 -1
  90. package/assets/esri/core/workers/chunks/{4439078780d9ba49fd26.js → d51bb11baadc741c46bc.js} +1 -1
  91. package/assets/esri/core/workers/chunks/db1ab9b9c8bf5c7635d3.js +1 -0
  92. package/assets/esri/core/workers/chunks/de02a6a1f4810f99e9bb.js +1 -0
  93. package/assets/esri/core/workers/chunks/e630f3c56c077cb2bd8e.js +1 -0
  94. package/assets/esri/core/workers/chunks/e81173724e8de8c1e65b.js +1 -0
  95. package/assets/esri/core/workers/chunks/{2025288bed125594ceda.js → f6e62d2d279a328cbed7.js} +1 -1
  96. package/assets/esri/core/workers/chunks/{47c19778fcee7154ca38.js → f8bc474434fd365ab174.js} +1 -1
  97. package/assets/esri/core/workers/chunks/{9a20dc26cb9c7b2087cf.js → f95a1f878c9c1146180e.js} +1 -1
  98. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ar.json +1 -1
  99. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.bg.json +1 -1
  100. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.bs.json +1 -1
  101. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ca.json +1 -1
  102. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.cs.json +1 -1
  103. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.da.json +1 -1
  104. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.de.json +1 -1
  105. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.el.json +1 -1
  106. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.en.json +1 -1
  107. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.es.json +1 -1
  108. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.et.json +1 -1
  109. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.fi.json +1 -1
  110. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.fr.json +1 -1
  111. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.he.json +1 -1
  112. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.hr.json +1 -1
  113. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.hu.json +1 -1
  114. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.id.json +1 -1
  115. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.it.json +1 -1
  116. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ja.json +1 -1
  117. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ko.json +1 -1
  118. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.lt.json +1 -1
  119. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.lv.json +1 -1
  120. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.nl.json +1 -1
  121. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.no.json +1 -1
  122. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pl.json +1 -1
  123. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pt-BR.json +1 -1
  124. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pt-PT.json +1 -1
  125. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ro.json +1 -1
  126. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ru.json +1 -1
  127. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sk.json +1 -1
  128. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sl.json +1 -1
  129. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sr.json +1 -1
  130. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sv.json +1 -1
  131. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.th.json +1 -1
  132. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.tr.json +1 -1
  133. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.uk.json +1 -1
  134. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.vi.json +1 -1
  135. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-CN.json +1 -1
  136. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-HK.json +1 -1
  137. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-TW.json +1 -1
  138. package/assets/esri/widgets/FeatureForm/t9n/messages.ar.json +1 -1
  139. package/assets/esri/widgets/FeatureForm/t9n/messages.bg.json +1 -1
  140. package/assets/esri/widgets/FeatureForm/t9n/messages.bs.json +1 -1
  141. package/assets/esri/widgets/FeatureForm/t9n/messages.ca.json +1 -1
  142. package/assets/esri/widgets/FeatureForm/t9n/messages.cs.json +1 -1
  143. package/assets/esri/widgets/FeatureForm/t9n/messages.da.json +1 -1
  144. package/assets/esri/widgets/FeatureForm/t9n/messages.de.json +1 -1
  145. package/assets/esri/widgets/FeatureForm/t9n/messages.el.json +1 -1
  146. package/assets/esri/widgets/FeatureForm/t9n/messages.es.json +1 -1
  147. package/assets/esri/widgets/FeatureForm/t9n/messages.et.json +1 -1
  148. package/assets/esri/widgets/FeatureForm/t9n/messages.fi.json +1 -1
  149. package/assets/esri/widgets/FeatureForm/t9n/messages.fr.json +1 -1
  150. package/assets/esri/widgets/FeatureForm/t9n/messages.he.json +1 -1
  151. package/assets/esri/widgets/FeatureForm/t9n/messages.hr.json +1 -1
  152. package/assets/esri/widgets/FeatureForm/t9n/messages.hu.json +1 -1
  153. package/assets/esri/widgets/FeatureForm/t9n/messages.id.json +1 -1
  154. package/assets/esri/widgets/FeatureForm/t9n/messages.it.json +1 -1
  155. package/assets/esri/widgets/FeatureForm/t9n/messages.ja.json +1 -1
  156. package/assets/esri/widgets/FeatureForm/t9n/messages.ko.json +1 -1
  157. package/assets/esri/widgets/FeatureForm/t9n/messages.lt.json +1 -1
  158. package/assets/esri/widgets/FeatureForm/t9n/messages.lv.json +1 -1
  159. package/assets/esri/widgets/FeatureForm/t9n/messages.nl.json +1 -1
  160. package/assets/esri/widgets/FeatureForm/t9n/messages.no.json +1 -1
  161. package/assets/esri/widgets/FeatureForm/t9n/messages.pl.json +1 -1
  162. package/assets/esri/widgets/FeatureForm/t9n/messages.pt-BR.json +1 -1
  163. package/assets/esri/widgets/FeatureForm/t9n/messages.pt-PT.json +1 -1
  164. package/assets/esri/widgets/FeatureForm/t9n/messages.ro.json +1 -1
  165. package/assets/esri/widgets/FeatureForm/t9n/messages.ru.json +1 -1
  166. package/assets/esri/widgets/FeatureForm/t9n/messages.sk.json +1 -1
  167. package/assets/esri/widgets/FeatureForm/t9n/messages.sl.json +1 -1
  168. package/assets/esri/widgets/FeatureForm/t9n/messages.sr.json +1 -1
  169. package/assets/esri/widgets/FeatureForm/t9n/messages.sv.json +1 -1
  170. package/assets/esri/widgets/FeatureForm/t9n/messages.th.json +1 -1
  171. package/assets/esri/widgets/FeatureForm/t9n/messages.tr.json +1 -1
  172. package/assets/esri/widgets/FeatureForm/t9n/messages.uk.json +1 -1
  173. package/assets/esri/widgets/FeatureForm/t9n/messages.vi.json +1 -1
  174. package/assets/esri/widgets/FeatureForm/t9n/messages.zh-CN.json +1 -1
  175. package/assets/esri/widgets/FeatureForm/t9n/messages.zh-HK.json +1 -1
  176. package/assets/esri/widgets/FeatureForm/t9n/messages.zh-TW.json +1 -1
  177. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ar.json +1 -1
  178. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.bg.json +1 -1
  179. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.bs.json +1 -1
  180. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ca.json +1 -1
  181. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.cs.json +1 -1
  182. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.da.json +1 -1
  183. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.de.json +1 -1
  184. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.el.json +1 -1
  185. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.en.json +1 -1
  186. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.es.json +1 -1
  187. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.et.json +1 -1
  188. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.fi.json +1 -1
  189. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.fr.json +1 -1
  190. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.he.json +1 -1
  191. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.hr.json +1 -1
  192. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.hu.json +1 -1
  193. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.id.json +1 -1
  194. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.it.json +1 -1
  195. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ja.json +1 -1
  196. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ko.json +1 -1
  197. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.lt.json +1 -1
  198. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.lv.json +1 -1
  199. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.nl.json +1 -1
  200. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.no.json +1 -1
  201. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.pl.json +1 -1
  202. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.pt-BR.json +1 -1
  203. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.pt-PT.json +1 -1
  204. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ro.json +1 -1
  205. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ru.json +1 -1
  206. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.sk.json +1 -1
  207. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.sl.json +1 -1
  208. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.sr.json +1 -1
  209. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.sv.json +1 -1
  210. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.th.json +1 -1
  211. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.tr.json +1 -1
  212. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.uk.json +1 -1
  213. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.vi.json +1 -1
  214. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.zh-CN.json +1 -1
  215. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.zh-HK.json +1 -1
  216. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.zh-TW.json +1 -1
  217. package/chunks/Bufferer-CclWhXVb.js +1 -1
  218. package/chunks/Component.glsl.js +3 -3
  219. package/chunks/DefaultMaterial.glsl.js +2 -2
  220. package/chunks/Distance2DCalculator-DjIp2uQi.js +1 -1
  221. package/chunks/Envelope.js +1 -1
  222. package/chunks/Envelope2D.js +1 -1
  223. package/chunks/FocusArea.glsl.js +8 -10
  224. package/chunks/GaussianSplat.glsl.js +2 -2
  225. package/chunks/GeodeticDistanceCalculator-zRp89-dW.js +1 -1
  226. package/chunks/GeodeticUtils.js +1 -1
  227. package/chunks/Geometry.js +1 -1
  228. package/chunks/GeometryCleaner-CIE8Wfmb.js +1 -1
  229. package/chunks/GlobalIllumination.glsl.js +3 -3
  230. package/chunks/LineMarker.glsl.js +35 -42
  231. package/chunks/MultiPathImpl.js +1 -1
  232. package/chunks/OperatorAffineTransform.js +1 -1
  233. package/chunks/OperatorClip.js +1 -1
  234. package/chunks/OperatorDensify.js +1 -1
  235. package/chunks/OperatorDistance.js +1 -1
  236. package/chunks/OperatorGeneralize.js +1 -1
  237. package/chunks/OperatorGeodesicBuffer.js +1 -1
  238. package/chunks/OperatorGeodeticArea.js +1 -1
  239. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  240. package/chunks/OperatorGeodeticDistance.js +1 -1
  241. package/chunks/OperatorGeodeticLength.js +1 -1
  242. package/chunks/OperatorGraphicBuffer.js +1 -1
  243. package/chunks/OperatorIntegrate.js +1 -1
  244. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  245. package/chunks/OperatorProximity.js +1 -1
  246. package/chunks/OperatorProximityGeodesic.js +1 -1
  247. package/chunks/OperatorShapePreservingLength.js +1 -1
  248. package/chunks/OperatorShapePreservingProject.js +1 -1
  249. package/chunks/OperatorSimplifyOGC.js +1 -1
  250. package/chunks/Path.glsl.js +2 -2
  251. package/chunks/Point2D.js +1 -1
  252. package/chunks/RealisticTree.glsl.js +2 -2
  253. package/chunks/RibbonLine.glsl.js +51 -57
  254. package/chunks/SideCalculator2D-DX0718xq.js +1 -1
  255. package/chunks/Terrain.glsl.js +2 -2
  256. package/chunks/Transformation2D.js +1 -1
  257. package/chunks/UnitFactory.js +1 -1
  258. package/config.js +1 -1
  259. package/core/workers/RemoteClient.js +1 -1
  260. package/core/workers/workerFactory.js +1 -1
  261. package/editing/fieldUtils.d.ts +12 -0
  262. package/editing/sharedTemplates/templateDefinitions/TemplateDefinitionBase.js +1 -1
  263. package/geometry/operators/extendOperator.js +1 -1
  264. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  265. package/geometry/operators/gx/operatorBoundary.js +1 -1
  266. package/geometry/operators/gx/operatorBuffer.js +1 -1
  267. package/geometry/operators/gx/operatorConvexHull.js +1 -1
  268. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  269. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  270. package/geometry/operators/gx/operatorLocateBetween.js +1 -1
  271. package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
  272. package/geometry/operators/gx/operatorOffset.js +1 -1
  273. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  274. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  275. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  276. package/geometry/operators/isNearOperator.js +1 -1
  277. package/geometry/operators/reshapeOperator.js +1 -1
  278. package/geometry/operators/support/jsonConverter.js +1 -1
  279. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  280. package/geometry/support/ellipseUtils.js +2 -0
  281. package/interfaces.d.ts +15 -18
  282. package/kernel.js +1 -1
  283. package/layers/LinkChartLayer.js +1 -1
  284. package/layers/ParquetLayer.js +1 -1
  285. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  286. package/layers/list/LayerItemCollection.d.ts +1 -0
  287. package/layers/list/types.d.ts +5 -1
  288. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  289. package/layers/orientedImagery/queries.js +1 -1
  290. package/layers/support/TimeSeriesCalculation.d.ts +1 -1
  291. package/layers/support/TimeSeriesCalculation.js +1 -1
  292. package/layers/support/dataSeriesUtils.d.ts +10 -0
  293. package/layers/support/timeSeriesUtils.js +17 -6
  294. package/libs/lyr3d/Lyr3DModule.js +1 -1
  295. package/networks/UtilityNetwork.d.ts +15 -0
  296. package/networks/UtilityNetwork.js +1 -1
  297. package/package.json +4 -4
  298. package/popup/FeatureContent.d.ts +14 -1
  299. package/popup/FeatureContent.js +1 -1
  300. package/popup/FeatureContentCollection.d.ts +4 -10
  301. package/popup/FeatureContentCollection.js +1 -1
  302. package/popup/actions.js +1 -1
  303. package/popup/support/featureUtils.js +1 -1
  304. package/renderers/support/RenderingInfo.js +1 -1
  305. package/renderers/support/renderingInfoUtils.js +1 -1
  306. package/renderers/visualVariables/SizeVariable.d.ts +16 -20
  307. package/renderers/visualVariables/support/SizeStop.d.ts +6 -2
  308. package/rest/networks/support/TraceLocation.js +1 -1
  309. package/rest/networks/support/TraceResult.d.ts +7 -0
  310. package/rest/networks/support/TraceResult.js +1 -1
  311. package/smartMapping/renderers/color.js +1 -1
  312. package/smartMapping/renderers/opacity.js +1 -1
  313. package/smartMapping/renderers/size.js +1 -1
  314. package/smartMapping/renderers/support/timeSeriesUtils.js +1 -1
  315. package/smartMapping/statistics/histogramForTimeSeries.d.ts +11 -0
  316. package/smartMapping/statistics/histogramForTimeSeries.js +2 -0
  317. package/smartMapping/statistics/summaryStatisticsForTimeSeries.d.ts +11 -0
  318. package/smartMapping/statistics/summaryStatisticsForTimeSeries.js +2 -0
  319. package/smartMapping/statistics/support/timeSeriesUtils.js +24 -0
  320. package/smartMapping/statistics/types.d.ts +50 -0
  321. package/support/tests/serviceMockDependencies.js +1 -1
  322. package/support/tests/setupServiceMocksMesh.js +1 -1
  323. package/symbols/cim/CIMPlacements.js +1 -1
  324. package/symbols/cim/callouts/calloutAnalysisUtils.js +1 -1
  325. package/symbols/cim/callouts/effects/BackgroundCallout.js +1 -1
  326. package/symbols/cim/callouts/effects/BalloonCallout.js +1 -1
  327. package/symbols/cim/callouts/effects/PointSymbolCallout.js +1 -1
  328. package/symbols/cim/callouts/effects/calloutUtils.js +1 -1
  329. package/symbols/cim/cimAnalyzer.js +1 -1
  330. package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
  331. package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
  332. package/views/2d/engine/vectorTiles/decluttering/CollisionJob.js +1 -1
  333. package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
  334. package/views/2d/engine/vectorTiles/decluttering/jobsUtil.js +1 -1
  335. package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
  336. package/views/2d/engine/webgl/definitions.js +1 -1
  337. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  338. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
  339. package/views/2d/engine/webgl/shaderGraph/techniques/animated/ComputedAnimatedParams.js +1 -1
  340. package/views/2d/engine/webgl/shaderGraph/techniques/markers/ComputedMarkerParams.js +1 -1
  341. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/CalloutMeshWriterPolicy.js +1 -1
  342. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
  343. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextParams.js +1 -1
  344. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  345. package/views/2d/layers/SketchLayerView2D.js +1 -1
  346. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  347. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  348. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
  349. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  350. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  351. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  352. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  353. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  354. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  355. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
  356. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  357. package/views/2d/layers/features/layerAdapters/labelingUtils.js +1 -1
  358. package/views/2d/layers/features/schema/ExceedsLimitCache.js +1 -1
  359. package/views/2d/layers/features/schema/TimeSchema.js +2 -0
  360. package/views/2d/layers/features/schema/processor/LabelMatcherSchema.js +1 -1
  361. package/views/2d/layers/features/schema/processor/MatcherSchema.js +1 -1
  362. package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
  363. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  364. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  365. package/views/2d/layers/support/annodime/cimAnnotations.js +1 -1
  366. package/views/2d/layers/support/vectorTileDebugUtils.js +1 -1
  367. package/views/2d/layers/support/visualVariableSimpleUtils.js +1 -1
  368. package/views/2d/types.d.ts +2 -1
  369. package/views/3d/analysis/LineOfSight/LineOfSightEditTool.js +1 -1
  370. package/views/3d/analysis/LineOfSight/LineOfSightItemManipulatedObject3D.js +1 -1
  371. package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
  372. package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +24 -0
  373. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  374. package/views/3d/analysis/Viewshed/ViewshedObserverManipulatedObject3D.js +1 -1
  375. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  376. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  377. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  378. package/views/3d/camera/constraintUtils.js +1 -1
  379. package/views/3d/input/handlers/ground/GroundDoubleClickMove.js +1 -1
  380. package/views/3d/input/handlers/ground/GroundNavigation.js +1 -1
  381. package/views/3d/interactive/editingTools/tooltipUtils3D.js +1 -1
  382. package/views/3d/interactive/placementTools/GroundNavigationPlacementTool3D.js +1 -1
  383. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  384. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  385. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  386. package/views/3d/state/controllers/GroundNavigationController.js +1 -1
  387. package/views/3d/state/controllers/momentum/GroundNavigationMomentumController.js +1 -1
  388. package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
  389. package/views/3d/state/utils/groundNavigationUtils.js +1 -1
  390. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  391. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  392. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +16 -8
  393. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +5 -1
  394. package/views/3d/webgl-engine/core/shaderLibrary/shading/evaluateSceneLightingFragment.glsl.js +12 -0
  395. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +2 -2
  396. package/views/3d/webgl-engine/effects/focusArea/FocusArea.glsl.js +1 -1
  397. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  398. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  399. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  400. package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
  401. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  402. package/views/SelectionManager.d.ts +3 -3
  403. package/views/draw/support/Reshape.js +1 -1
  404. package/views/interactive/options/bindViewToolOptions.js +1 -1
  405. package/views/interactive/sketch/SketchLabelOptions.d.ts +3 -0
  406. package/views/interactive/sketch/SketchLabelOptions.js +1 -1
  407. package/views/interactive/sketch/SketchTooltipOptions.d.ts +3 -0
  408. package/views/interactive/sketch/SketchTooltipOptions.js +1 -1
  409. package/views/interactive/sketch/SketchValueOptions.d.ts +3 -0
  410. package/views/interactive/sketch/SketchValueOptions.js +1 -1
  411. package/views/interactive/snapping/SnappingOptions.d.ts +3 -0
  412. package/views/interactive/snapping/SnappingOptions.js +1 -1
  413. package/views/interactive/snapping/snappingUtils.js +1 -1
  414. package/views/interactive/tooltip/fields/parsingAndFormattingUtils.js +1 -1
  415. package/views/layers/SketchLayerView.d.ts +34 -0
  416. package/views/layers/SketchLayerView.js +2 -0
  417. package/views/layers/types.d.ts +3 -2
  418. package/views/selection/types.d.ts +15 -4
  419. package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
  420. package/widgets/BasemapGallery.js +1 -1
  421. package/widgets/Bookmarks/BookmarksViewModel.d.ts +4 -0
  422. package/widgets/Bookmarks/BookmarksVisibleElements.d.ts +5 -1
  423. package/widgets/Bookmarks/types.d.ts +2 -0
  424. package/widgets/Editor/EditorViewModel.d.ts +31 -30
  425. package/widgets/Editor/EditorViewModel.js +1 -1
  426. package/widgets/Editor/components/Settings.js +1 -1
  427. package/widgets/Editor/types.d.ts +44 -0
  428. package/widgets/Editor.d.ts +30 -27
  429. package/widgets/Editor.js +1 -1
  430. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +1 -1
  431. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  432. package/widgets/FeatureTable/support/FeatureStore.d.ts +1 -1
  433. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  434. package/widgets/FeatureTable.d.ts +6 -0
  435. package/widgets/FeatureTable.js +1 -1
  436. package/widgets/Histogram/types.d.ts +10 -2
  437. package/widgets/HistogramRangeSlider/types.d.ts +4 -1
  438. package/widgets/LayerList/LayerListViewModel.d.ts +2 -1
  439. package/widgets/Legend/LegendViewModel.d.ts +2 -0
  440. package/widgets/Legend/styles/card/CardView.d.ts +2 -0
  441. package/widgets/Legend/styles/classic/ClassicView.d.ts +4 -1
  442. package/widgets/Legend.d.ts +3 -0
  443. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.d.ts +7 -0
  444. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  445. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  446. package/widgets/OrientedImageryViewer/support/VideoFeatureCache.js +2 -0
  447. package/widgets/OrientedImageryViewer/types.d.ts +9 -0
  448. package/widgets/OrientedImageryViewer.d.ts +7 -0
  449. package/widgets/OrientedImageryViewer.js +2 -2
  450. package/widgets/PanoramicVideoViewer.js +1 -1
  451. package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
  452. package/widgets/ScaleRangeSlider/types.d.ts +9 -2
  453. package/widgets/Sketch/SketchViewModel.d.ts +32 -1
  454. package/widgets/Sketch/SketchViewModel.js +1 -1
  455. package/widgets/Sketch.d.ts +27 -1
  456. package/widgets/Sketch.js +1 -1
  457. package/widgets/Slider/types.d.ts +58 -13
  458. package/widgets/Slider.d.ts +6 -0
  459. package/widgets/smartMapping/BinaryColorSizeSlider/BinaryColorSizeSliderViewModel.d.ts +2 -0
  460. package/widgets/smartMapping/ClassedColorSlider/ClassedColorSliderViewModel.d.ts +2 -0
  461. package/widgets/smartMapping/ClassedSizeSlider/ClassedSizeSliderViewModel.d.ts +2 -0
  462. package/widgets/smartMapping/ColorSizeSlider/ColorSizeSliderViewModel.d.ts +2 -0
  463. package/widgets/smartMapping/ColorSlider/ColorSliderViewModel.d.ts +2 -0
  464. package/widgets/smartMapping/HeatmapSlider/HeatmapSliderViewModel.d.ts +2 -0
  465. package/widgets/smartMapping/OpacitySlider/OpacitySliderViewModel.d.ts +2 -0
  466. package/widgets/smartMapping/SizeSlider/SizeSliderViewModel.d.ts +3 -0
  467. package/widgets/smartMapping/SmartMappingPrimaryHandleSliderViewModel.d.ts +2 -0
  468. package/widgets/smartMapping/SmartMappingSliderViewModel.d.ts +2 -0
  469. package/widgets/smartMapping/types.d.ts +30 -7
  470. package/widgets/support/FilterBuilder/FilterBuilderViewModel.d.ts +21 -11
  471. package/widgets/support/FilterBuilder/FilterBuilderViewModel.js +1 -1
  472. package/widgets/support/FilterBuilder/types.d.ts +28 -0
  473. package/widgets/support/FilterBuilder.js +1 -1
  474. package/widgets/support/FilterCondition/FilterConditionViewModel.d.ts +24 -0
  475. package/widgets/support/FilterCondition/FilterConditionViewModel.js +1 -1
  476. package/widgets/support/FilterCondition/types.d.ts +16 -1
  477. package/widgets/support/FilterCondition.js +1 -1
  478. package/widgets/support/SnappingControls/snappingLayerListUtils.js +1 -1
  479. package/widgets/support/iconUtils.js +1 -1
  480. package/assets/esri/core/workers/chunks/0606ab6fdfc1dfea3856.js +0 -1
  481. package/assets/esri/core/workers/chunks/078dcd17f46403d44b24.js +0 -1
  482. package/assets/esri/core/workers/chunks/1289204f8ca96032c17a.js +0 -1
  483. package/assets/esri/core/workers/chunks/12b5a645c0987a0efe54.js +0 -2
  484. package/assets/esri/core/workers/chunks/152fe3d6ad7aebbd23d1.js +0 -1
  485. package/assets/esri/core/workers/chunks/17b938ba49fb1e7ab8c4.js +0 -1
  486. package/assets/esri/core/workers/chunks/1dbb3e25e005a8220779.js +0 -2
  487. package/assets/esri/core/workers/chunks/3d6fef25af7e1a51e1bd.js +0 -1
  488. package/assets/esri/core/workers/chunks/3ef367c9b7bf1588307d.js +0 -1
  489. package/assets/esri/core/workers/chunks/5f4feca26102088ea565.js +0 -1
  490. package/assets/esri/core/workers/chunks/74211d096cc3296e0968.js +0 -1
  491. package/assets/esri/core/workers/chunks/7926faab76a721a2e1c4.js +0 -1
  492. package/assets/esri/core/workers/chunks/ad28486bc6afaa346de5.js +0 -1
  493. package/assets/esri/core/workers/chunks/ad29c729e90b5866713c.js +0 -1
  494. package/assets/esri/core/workers/chunks/b72a2514aa4cc4ae7d1b.js +0 -1
  495. package/assets/esri/core/workers/chunks/bb51cf52b8ea8283f4f8.js +0 -1
  496. package/assets/esri/core/workers/chunks/be761749f8d77fbd9df5.js +0 -1
  497. package/assets/esri/core/workers/chunks/dbfd25aa0d19aed5890c.js +0 -1
  498. package/assets/esri/core/workers/chunks/de28a86775235bd5d3c4.js +0 -2
  499. package/assets/esri/core/workers/chunks/f6cfc901267a229de7a1.js +0 -2
  500. package/assets/esri/core/workers/chunks/fb147097149a89e671ff.js +0 -1
  501. package/support/revision.js +0 -2
  502. /package/assets/esri/core/workers/chunks/{1dbb3e25e005a8220779.js.LICENSE.txt → 1b946714ca4a1a7359d4.js.LICENSE.txt} +0 -0
  503. /package/assets/esri/core/workers/chunks/{f6cfc901267a229de7a1.js.LICENSE.txt → 2a1ec30f9ad305763f81.js.LICENSE.txt} +0 -0
  504. /package/assets/esri/core/workers/chunks/{c3b96d1d43afccd23e45.js.LICENSE.txt → 590e6c70206122e4cc3c.js.LICENSE.txt} +0 -0
  505. /package/assets/esri/core/workers/chunks/{cfaba0470619786e1ef8.js.LICENSE.txt → 68d8ae42ab71d01a70a5.js.LICENSE.txt} +0 -0
  506. /package/assets/esri/core/workers/chunks/{de28a86775235bd5d3c4.js.LICENSE.txt → 8dc1c3042267618fd710.js.LICENSE.txt} +0 -0
  507. /package/assets/esri/core/workers/chunks/{12b5a645c0987a0efe54.js.LICENSE.txt → 96c50a0dda0f1503ef92.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../../../core/Error.js";import has from"../../../../core/has.js";import{px2pt as t,pt2px as n}from"../../../../core/screenUtils.js";import{fromValues as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as i}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{ZEROS as a,clone as o,ones as s}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as c,fromBuffer as l,intersectsClippingArea as u,empty as d,expandWithAABB as f,expandWithBuffer as p}from"../../../../geometry/support/aaBoundingBox.js";import{getDriverAxisSizeValueAny as m}from"../../../../renderers/support/renderingInfoUtils.js";import{sharedGeometryElevationAligner as h}from"./ElevationAligners.js";import{elevationModeChangeUpdateType as g,needsElevationUpdates2D as _}from"./elevationAlignmentUtils.js";import{Graphics3DDrapedGraphicLayer as v}from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as y}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as b,nanFallbackColor as x}from"./Graphics3DSymbolLayer.js";import{parseCapType as S,computeSymbolLayerIndex as C,parseLineMarkerStyle as w}from"./lineUtils.js";import{initFastSymbolUpdatesState as T,updateFastSymbolUpdatesState as E,getAttributeValue as D,getSizeAttributeValue as O,ConvertOptions as k}from"../support/FastSymbolUpdates.js";import{debugFlags as A}from"../../support/debugFlags.js";import{createGeometry as j}from"../../support/engineContent/line.js";import{geometryToRenderInfo as M,geometryToRenderInfoDraped as N}from"../../support/renderInfoUtils/line.js";import{Object3D as P}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as F}from"../../webgl-engine/lib/RenderGeometry.js";import{LineMarkerMaterial as I}from"../../webgl-engine/materials/LineMarkerMaterial.js";import{getStipplePatternForLinePattern as L,patternHidesLine as R}from"../../webgl-engine/materials/lineStippleUtils.js";import{RibbonLineMaterial as z}from"../../webgl-engine/materials/RibbonLineMaterial.js";const B=[`polyline`];class V extends b{static{this.elevationModeChangeTypes={definedChanged:2,staysOnTheGround:0,onTheGroundChanged:2}}constructor(e,t,n,r){super(e,t,n,r,W(t))}async doLoad(){if(this._fastUpdates=T(this._context.renderer,this._fastVisualVariableConvertOptions()),this._fastMarkerUpdates=T(this._context.renderer,this._fastVisualVariableConvertOptions(!0)),!this._drivenProperties.size&&(this.symbolLayer.size==null?t(1):this.symbolLayer.size)<0)throw new e(`graphics3dlinesymbollayer:invalid-size`,`Symbol sizes may not be negative values`)}_getMaterialParameters(e,t){let n=this._screenSizePerspective,r=!!has(`enable-feature:emissive-on-non-volumetric`)&&!this.draped,{symbolLayer:i}=this,a=this._worldSizedEnabled,o={...this._getMaterialColorParameters(t),shadingEnabled:r,width:this._computeMaterialWidth(i?.size,a),worldSized:a,polygonOffset:3,polygonOffsetIndex:C(this._renderPriority,this._renderPriorityStep),join:i.join||`miter`,cap:S(i.cap||`butt`),hasSlicePlane:this._context.slicePlaneEnabled,isClosed:e,stipplePattern:L(i.pattern??i.imagePattern),emissiveStrength:this._emissiveStrength,screenSizePerspective:n};if(t===2){if(this._fastMarkerUpdates?.visualVariables)return{...o,...this._fastMarkerUpdates.materialParameters}}else if(this._fastUpdates?.visualVariables)return{...o,...this._fastUpdates.materialParameters};return o}_getMaterialColorParameters(e){let t=e===2,n=this._getCombinedOpacityAndColor(t&&this._markerColor||this._materialColor);return this._patternHidesLine&&!t&&(n[3]=0),{color:n}}get _materialColor(){return this.symbolLayer.material?.color}get _emissiveStrength(){let e=this.symbolLayer.material?.emissive;return(e?.source===`color`?e?.strength:void 0)??0}get _markerColor(){return this.symbolLayer.marker?.color}get _lineMaterial(){return this._materials[0]??=new z(this._getMaterialParameters(!1,0),this.view.state.isGlobal),this._materials[0]}get _wireframeLineMaterial(){return this._materials[1]??=new z({...this._getMaterialParameters(!1,1),wireframe:!0},this.view.state.isGlobal),this._materials[1]}get _markerMaterial(){return this._materials[2]==null&&this.symbolLayer.marker!=null&&(this._materials[2]=new I({...this._getMaterialParameters(!1,2),placement:this.symbolLayer.marker.placement,markerPrimitive:w(this.symbolLayer.marker.style)},this.view.state.isGlobal)),this._materials[2]}_getDrivenSize(e){if(this._drivenProperties.size){let t=e.size;if(t==null)return this._getFallbackSize();let n=m(t.output);return this._getWorldOrScreenSize(n)}return 1}_getDrivenColor({color:e,opacity:t}){let n=s();return this._drivenProperties.color&&(i(n,e?.output??this._getFallbackOpacityAndColor(a)),t==null)||this._drivenProperties.opacity&&(e||this._materialColor)&&(n[3]=t?.output??this._getFallbackOpacity()),n}_getDrivenMarkerColor({color:e,opacity:t}){let n=s();return this._drivenProperties.color&&(i(n,e?.output??this._getFallbackMarkerOpacityAndColor(a)),t==null)||this._drivenProperties.opacity&&(e||this._markerColor||this._materialColor)&&(n[3]=t?.output??this._getFallbackMarkerOpacity()),n}createGraphics3DGraphic(e){let t=e.graphic;if(!this._validatePolylineContext(e))return null;let n=this.createElevationContextForGraphic(t),r=n.mode===`on-the-ground`;return this.ensureDrapedStatus(r),this.draped?this._createAsOverlay(e):this._createAs3DShape(e,n,t.uid)}_validatePolylineContext(e){let t=e.graphic.geometry;return this._validateGeometry(t,B,this.symbolLayer.type)&&t.type===`polyline`}applyRendererDiff(e,t){for(let n in e.diff)switch(n){case`visualVariables`:{let e=this._fastUpdates;if(E(e,t,this._fastVisualVariableConvertOptions()))for(let t of this._materials)t instanceof z&&t.setParameters(e.materialParameters);else return 0;let n=this._fastMarkerUpdates;if(E(n,t,this._fastVisualVariableConvertOptions(!0)))for(let e of this._materials)e instanceof I&&e.setParameters(n.materialParameters);else return 0}break;default:return 0}return 2}prepareSymbolLayerPatch(e){if(e.diff.type!==`partial`)return;let t=e.diff.diff,n={};t.size?.type===`complete`&&(n.width=this._computeMaterialWidth(t.size.newValue,this._worldSizedEnabled),delete t.size),t.cap?.type===`complete`&&(n.cap=S(t.cap.newValue??`butt`),delete t.cap);let r=this._prepareMarkerPatch(e,t);this._prepareMaterialPatch(e,t,r),e.symbolLayerStatePatches.push(()=>{for(let e of this._materials)e?.setParameters(n)})}layerOpacityChanged(){for(let e=0;e<3;e++)this._materials[e]?.setParameters(this._getMaterialColorParameters(e))}get _screenSizePerspective(){return!this.draped&&this._context.screenSizePerspectiveEnabled?this.view.screenSizePerspective.parameters:null}layerScreenSizePerspectiveChanged(){let e=this._screenSizePerspective;for(let t of this._materials)t?.setParameters({screenSizePerspective:e})}layerElevationInfoChanged(e,t,n){let r=this._elevationContext.mode,i=g(V.elevationModeChangeTypes,n,r);if(i!==1)return i;let a=_(r);return this.updateGraphics3DGraphicElevationInfo(e,t,()=>a)}slicePlaneEnabledChanged(){let e={hasSlicePlane:this._context.slicePlaneEnabled};for(let t of this._materials)t?.setParameters(e);return!0}physicalBasedRenderingChanged(){return!0}_createAs3DShape(e,t,n){let r=e.graphic,i=H(r.geometry);if(i==null)return null;let a=[],o=c(),s=M(i,this._context.elevationProvider,this._context.renderCoordsHelper,t);this._logGeometryCreationWarnings(s,i.paths,`paths`,`LineSymbol3DLayer`);for(let t=0;t<s.lines.length;t++){let r=s.lines[t],c=r.position,d=r.mapPositions;if(this._context.clippingExtent!=null&&(l(d,o),!u(o,this._context.clippingExtent)))continue;let f=this._createGeometry(this._lineMaterial,e,c,d,i.type,1,n);if(a.push(f),A.LINE_WIREFRAMES&&a.push(f.instantiate({material:this._wireframeLineMaterial})),this._markerMaterial!=null){let t=f.instantiate({material:this._markerMaterial});t.attributes.has(`color`)&&t.setAttributeData(`color`,this._getDrivenMarkerColor(e.renderingInfo)),a.push(t)}}if(a.length===0)return null;let d=this._context.layerViewUid,f=new P({geometries:a,castShadow:!1,layerViewUid:d,graphicUid:n}),p=new y(this,f,null,h,t);return p.alignedSampledElevation=s.sampledElevation,p.needsElevationUpdates=_(t.mode),p}_createGeometry(e,t,n,r,i,a,o){let s=a===0?{spatialReference:this._context.overlaySR,renderCoordsHelper:this._context.renderCoordsHelper}:null,c=i===`polygon`,l=this._fastUpdates?.visualVariables.color,u=this._fastUpdates?.visualVariables.size,d=this._fastUpdates?.visualVariables.opacity,f=this._context.layerViewUid,p=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:o,layerViewUid:f}),{renderingInfo:m}=t,h={position:n,size:u?null:this._getDrivenSize(m),color:l?null:this._getDrivenColor(m),sizeFeature:u?O(u,m.size):null,colorFeature:l?D(l,m.color):null,opacityFeature:d?D(d,m.opacity):null};return j(e,{overlayInfo:s,removeDuplicateStartEnd:c,mapPositions:r,attributeData:h},p)}_createAsOverlay(e){let t=e.graphic,{geometry:n}=t;this._lineMaterial.renderPriority=this._renderPriority;let r=A.LINE_WIREFRAMES?this._wireframeLineMaterial:null,i=this._markerMaterial;r!=null&&(r.renderPriority=this._renderPriority-.001),i!=null&&(i.renderPriority=this._renderPriority-.002);let a=[],o=c(),s=d(),m=N(n,this._context.overlaySR);this._logGeometryCreationWarnings(m,n.paths,`paths`,`LineSymbol3DLayer`);for(let c of m.lines){if(l(c.position,o),!u(o,this._context.clippingExtent))continue;f(s,o);let d=this._createGeometry(this._lineMaterial,e,c.position,void 0,n.type,0,t.uid),m=e=>{let n=this._context.layerViewUid,r=new F(e,{layerViewUid:n,graphicUid:t.uid});a.push(r)};if(i!=null){let t=d.instantiate({material:i});t.attributes.has(`color`)&&t.setAttributeData(`color`,this._getDrivenMarkerColor(e.renderingInfo)),m(t);let n=this.symbolLayer.marker.placement;(n===`begin`||n===`begin-end`)&&p(o,c.position,0,1),(n===`end`||n===`begin-end`)&&p(o,c.position,c.position.length-3,1)}m(d),A.LINE_WIREFRAMES&&m(d.instantiate({material:r}))}return new v(this,a,s,this._context.drapeSourceRenderer)}get _patternHidesLine(){return R(this.symbolLayer.pattern)}_computeMaterialWidth(e,r){return r?e??1:(e??=t(1),this._drivenProperties.size?this._fastUpdates?.visualVariables.size?n(1):1:n(e))}_prepareMaterialPatch(e,t,n){let r=t.material;if(r==null){n.changed&&n.useMaterialColor&&U(this._getCombinedOpacityAndColor(this._materialColor),this._materials[2],e);return}if(r.type===`collection`)return;let i=r.type===`complete`?r.newValue?.color:r.diff.color?.type===`complete`?r.diff.color.newValue:null,a=this._getCombinedOpacityAndColor(i);n.useMaterialColor&&U(o(a),this._materials[2],e),this._patternHidesLine&&(a[3]=0),U(a,this._materials[0],e),delete t.material}_prepareMarkerPatch(e,t){let n=t.marker,r=this._markerMaterial;if(n==null||n.type!==`partial`||n.diff==null||n.diff.placement!=null||n.diff.style!=null&&n.diff.style.type!==`complete`||n.diff.color!=null&&n.diff.color.type!==`complete`||r==null)return{changed:!1,useMaterialColor:this._markerColor==null};let i=n.diff.color,a=i!=null,o=a?i.newValue:null,s=o==null&&this._markerColor==null;o&&U(this._getCombinedOpacityAndColor(o),r,e);let c=n.diff.style?.newValue;return c&&e.symbolLayerStatePatches.push(()=>r.setParameters({markerPrimitive:w(c)})),delete t.marker,{changed:a,useMaterialColor:s}}_fastVisualVariableConvertOptions(e=!1){let t=this._getFallbackSize();return new k({supports:{size:!0,color:!0,rotation:!1,opacity:!0},fallbackColor:e?this._getFallbackMarkerOpacityAndColor(x):this._getFallbackOpacityAndColor(x),fallbackSize:r(t,t,t)})}_getFallbackOpacityAndColor(e){return this._materialColor?.toUnitRGBA()??e}_getFallbackOpacity(){return this._materialColor?.a??0}_getFallbackMarkerOpacityAndColor(e){return this.symbolLayer?.marker?.color?.toUnitRGBA()??this._getFallbackOpacityAndColor(e)}_getFallbackMarkerOpacity(){return this.symbolLayer?.marker?.color?.a??this._getFallbackOpacity()}get _worldSizedEnabled(){return this.symbol.type===`line-3d`&&this.symbol.worldSized}_getWorldOrScreenSize(e){return this._worldSizedEnabled?e:n(e)}_getFallbackSize(){let e=this.symbolLayer?.size;return e==null?1:this._getWorldOrScreenSize(e)}}function H(e){return e.type===`polyline`?e:null}function U(e,t,n){t!=null&&n.symbolLayerStatePatches.push(()=>t.setParameters({color:e}))}function W(e){return(e.material?.color?.a??1)===1&&(e.marker?.color?.a??1)===1}export{V as Graphics3DLineSymbolLayer};
2
+ import e from"../../../../core/Error.js";import has from"../../../../core/has.js";import{pt2px as t,px2pt as n}from"../../../../core/screenUtils.js";import{fromValues as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as i}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{ZEROS as a,clone as o,ones as s}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as c,fromBuffer as l,intersectsClippingArea as u,empty as d,expandWithAABB as f,expandWithBuffer as p}from"../../../../geometry/support/aaBoundingBox.js";import{getDriverAxisSizeValueAny as m}from"../../../../renderers/support/renderingInfoUtils.js";import{getTransformationType as h}from"../../../../renderers/visualVariables/support/sizeVariableUtils.js";import{sharedGeometryElevationAligner as g}from"./ElevationAligners.js";import{elevationModeChangeUpdateType as _,needsElevationUpdates2D as v}from"./elevationAlignmentUtils.js";import{Graphics3DDrapedGraphicLayer as y}from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as b}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as x,nanFallbackColor as S}from"./Graphics3DSymbolLayer.js";import{parseCapType as C,computeSymbolLayerIndex as w,parseLineMarkerStyle as T}from"./lineUtils.js";import{initFastSymbolUpdatesState as E,updateFastSymbolUpdatesState as D,getAttributeValue as O,getSizeAttributeValue as k,ConvertOptions as A}from"../support/FastSymbolUpdates.js";import{debugFlags as j}from"../../support/debugFlags.js";import{createGeometry as M}from"../../support/engineContent/line.js";import{geometryToRenderInfo as N,geometryToRenderInfoDraped as P}from"../../support/renderInfoUtils/line.js";import{Object3D as F}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as I}from"../../webgl-engine/lib/RenderGeometry.js";import{LineMarkerMaterial as L}from"../../webgl-engine/materials/LineMarkerMaterial.js";import{getStipplePatternForLinePattern as R,patternHidesLine as z}from"../../webgl-engine/materials/lineStippleUtils.js";import{RibbonLineMaterial as B}from"../../webgl-engine/materials/RibbonLineMaterial.js";const V=[`polyline`],H=n(1);class U extends x{static{this.elevationModeChangeTypes={definedChanged:2,staysOnTheGround:0,onTheGroundChanged:2}}constructor(e,t,n,r){super(e,t,n,r,K(t))}async doLoad(){if(this._fastUpdates=E(this._context.renderer,this._fastVisualVariableConvertOptions()),this._fastMarkerUpdates=E(this._context.renderer,this._fastVisualVariableConvertOptions(!0)),!this._drivenProperties.size&&(this.symbolLayer.size==null?H:this.symbolLayer.size)<0)throw new e(`graphics3dlinesymbollayer:invalid-size`,`Symbol sizes may not be negative values`)}_getMaterialParameters(e,t){let n=this._screenSizePerspective,r=!!has(`enable-feature:emissive-on-non-volumetric`)&&!this.draped,{symbolLayer:i}=this,{worldSized:a}=this.symbol,o={...this._getMaterialColorParameters(t),shadingEnabled:r,width:this._computeMaterialWidth(i.size,a),worldSized:a,polygonOffset:3,polygonOffsetIndex:w(this._renderPriority,this._renderPriorityStep),join:i.join||`miter`,cap:C(i.cap||`butt`),hasSlicePlane:this._context.slicePlaneEnabled,isClosed:e,stipplePattern:R(i.pattern??i.imagePattern),emissiveStrength:this._emissiveStrength,screenSizePerspective:n};if(t===2){if(this._fastMarkerUpdates?.visualVariables)return{...o,...this._fastMarkerUpdates.materialParameters}}else if(this._fastUpdates?.visualVariables)return{...o,...this._fastUpdates.materialParameters};return o}_getMaterialColorParameters(e){let t=e===2,n=this._getCombinedOpacityAndColor(t&&this._markerColor||this._materialColor);return this._patternHidesLine&&!t&&(n[3]=0),{color:n}}get _materialColor(){return this.symbolLayer.material?.color}get _emissiveStrength(){let e=this.symbolLayer.material?.emissive;return(e?.source===`color`?e?.strength:void 0)??0}get _markerColor(){return this.symbolLayer.marker?.color}get _lineMaterial(){return this._materials[0]??=new B(this._getMaterialParameters(!1,0),this.view.state.isGlobal),this._materials[0]}get _wireframeLineMaterial(){return this._materials[1]??=new B({...this._getMaterialParameters(!1,1),wireframe:!0},this.view.state.isGlobal),this._materials[1]}get _markerMaterial(){return this._materials[2]==null&&this.symbolLayer.marker!=null&&(this._materials[2]=new L({...this._getMaterialParameters(!1,2),placement:this.symbolLayer.marker.placement,markerPrimitive:T(this.symbolLayer.marker.style)},this.view.state.isGlobal)),this._materials[2]}_getDrivenSize(e){if(this._drivenProperties.size){let t=e.size;if(t==null)return this._getFallbackSize();let n=m(t.output);return this._getWorldOrScreenSize(n)}return 1}_getDrivenColor({color:e,opacity:t}){let n=s();return this._drivenProperties.color&&(i(n,e?.output??this._getFallbackOpacityAndColor(a)),t==null)||this._drivenProperties.opacity&&(e||this._materialColor)&&(n[3]=t?.output??this._getFallbackOpacity()),n}_getDrivenMarkerColor({color:e,opacity:t}){let n=s();return this._drivenProperties.color&&(i(n,e?.output??this._getFallbackMarkerOpacityAndColor(a)),t==null)||this._drivenProperties.opacity&&(e||this._markerColor||this._materialColor)&&(n[3]=t?.output??this._getFallbackMarkerOpacity()),n}createGraphics3DGraphic(e){let t=e.graphic;if(!this._validatePolylineContext(e))return null;this._warnIfVVRequiresWorldSized(e.renderingInfo);let n=this.createElevationContextForGraphic(t),r=n.mode===`on-the-ground`;return this.ensureDrapedStatus(r),this.draped?this._createAsOverlay(e):this._createAs3DShape(e,n,t.uid)}_validatePolylineContext(e){let t=e.graphic.geometry;return this._validateGeometry(t,V,this.symbolLayer.type)&&t.type===`polyline`}applyRendererDiff(e,t){for(let n in e.diff)switch(n){case`visualVariables`:{let e=this._fastUpdates;if(D(e,t,this._fastVisualVariableConvertOptions()))for(let t of this._materials)t instanceof B&&t.setParameters(e.materialParameters);else return 0;let n=this._fastMarkerUpdates;if(D(n,t,this._fastVisualVariableConvertOptions(!0)))for(let e of this._materials)e instanceof L&&e.setParameters(n.materialParameters);else return 0}break;default:return 0}return`visualVariables`in e.diff&&this._warnIfVVRequiresWorldSized(),2}_warnIfVVRequiresWorldSized(e){if(this.symbol.worldSized||this.ignoreDrivers)return;let t=this._getSizeVariable(e);t==null||t.useSymbolValue||t.target===`outline`||h(t)===`real-world-size`&&this.logger.warnOnce(`SizeVariable uses real-world units, but LineSymbol3D.worldSized is false. Set LineSymbol3D.worldSized to true to render real-world line widths.`)}_getSizeVariable(e){let t=this._fastUpdates?.visualVariables.size;if(t)return t.variables[0];let n=e?.size,r=n?.output.findIndex(e=>typeof e==`number`);return r==null?null:n?.variables[r]}prepareSymbolLayerPatch(e){if(e.diff.type!==`partial`)return;let t=e.diff.diff,n={};t.size?.type===`complete`&&(n.width=this._computeMaterialWidth(t.size.newValue,this.symbol.worldSized),delete t.size),t.cap?.type===`complete`&&(n.cap=C(t.cap.newValue??`butt`),delete t.cap);let r=this._prepareMarkerPatch(e,t);this._prepareMaterialPatch(e,t,r),e.symbolLayerStatePatches.push(()=>{for(let e of this._materials)e?.setParameters(n)})}layerOpacityChanged(){for(let e=0;e<3;e++)this._materials[e]?.setParameters(this._getMaterialColorParameters(e))}get _screenSizePerspective(){return!this.draped&&this._context.screenSizePerspectiveEnabled?this.view.screenSizePerspective.parameters:null}layerScreenSizePerspectiveChanged(){let e=this._screenSizePerspective;for(let t of this._materials)t?.setParameters({screenSizePerspective:e})}layerElevationInfoChanged(e,t,n){let r=this._elevationContext.mode,i=_(U.elevationModeChangeTypes,n,r);if(i!==1)return i;let a=v(r);return this.updateGraphics3DGraphicElevationInfo(e,t,()=>a)}slicePlaneEnabledChanged(){let e={hasSlicePlane:this._context.slicePlaneEnabled};for(let t of this._materials)t?.setParameters(e);return!0}physicalBasedRenderingChanged(){return!0}_createAs3DShape(e,t,n){let r=e.graphic,i=W(r.geometry);if(i==null)return null;let a=[],o=c(),s=N(i,this._context.elevationProvider,this._context.renderCoordsHelper,t);this._logGeometryCreationWarnings(s,i.paths,`paths`,`LineSymbol3DLayer`);for(let t=0;t<s.lines.length;t++){let r=s.lines[t],c=r.position,d=r.mapPositions;if(this._context.clippingExtent!=null&&(l(d,o),!u(o,this._context.clippingExtent)))continue;let f=this._createGeometry(this._lineMaterial,e,c,d,i.type,1,n);if(a.push(f),j.LINE_WIREFRAMES&&a.push(f.instantiate({material:this._wireframeLineMaterial})),this._markerMaterial!=null){let t=f.instantiate({material:this._markerMaterial});t.attributes.has(`color`)&&t.setAttributeData(`color`,this._getDrivenMarkerColor(e.renderingInfo)),a.push(t)}}if(a.length===0)return null;let d=this._context.layerViewUid,f=new F({geometries:a,castShadow:!1,layerViewUid:d,graphicUid:n}),p=new b(this,f,null,g,t);return p.alignedSampledElevation=s.sampledElevation,p.needsElevationUpdates=v(t.mode),p}_createGeometry(e,t,n,r,i,a,o){let s=a===0?{spatialReference:this._context.overlaySR,renderCoordsHelper:this._context.renderCoordsHelper}:null,c=i===`polygon`,l=this._fastUpdates?.visualVariables.color,u=this._fastUpdates?.visualVariables.size,d=this._fastUpdates?.visualVariables.opacity,f=this._context.layerViewUid,p=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:o,layerViewUid:f}),{renderingInfo:m}=t,h={position:n,size:u?null:this._getDrivenSize(m),color:l?null:this._getDrivenColor(m),sizeFeature:u?k(u,m.size):null,colorFeature:l?O(l,m.color):null,opacityFeature:d?O(d,m.opacity):null};return M(e,{overlayInfo:s,removeDuplicateStartEnd:c,mapPositions:r,attributeData:h},p)}_createAsOverlay(e){let t=e.graphic,{geometry:n}=t;this._lineMaterial.renderPriority=this._renderPriority;let r=j.LINE_WIREFRAMES?this._wireframeLineMaterial:null,i=this._markerMaterial;r!=null&&(r.renderPriority=this._renderPriority-.001),i!=null&&(i.renderPriority=this._renderPriority-.002);let a=[],o=c(),s=d(),m=P(n,this._context.overlaySR);this._logGeometryCreationWarnings(m,n.paths,`paths`,`LineSymbol3DLayer`);for(let c of m.lines){if(l(c.position,o),!u(o,this._context.clippingExtent))continue;f(s,o);let d=this._createGeometry(this._lineMaterial,e,c.position,void 0,n.type,0,t.uid),m=e=>{let n=this._context.layerViewUid,r=new I(e,{layerViewUid:n,graphicUid:t.uid});a.push(r)};if(i!=null){let t=d.instantiate({material:i});t.attributes.has(`color`)&&t.setAttributeData(`color`,this._getDrivenMarkerColor(e.renderingInfo)),m(t);let n=this.symbolLayer.marker.placement;(n===`begin`||n===`begin-end`)&&p(o,c.position,0,1),(n===`end`||n===`begin-end`)&&p(o,c.position,c.position.length-3,1)}m(d),j.LINE_WIREFRAMES&&m(d.instantiate({material:r}))}return new y(this,a,s,this._context.drapeSourceRenderer)}get _patternHidesLine(){return z(this.symbolLayer.pattern)}_computeMaterialWidth(e,n){return n?this._drivenProperties.size?1:e??1:(e??=H,this._drivenProperties.size?this._fastUpdates?.visualVariables.size?t(1):1:t(e))}_prepareMaterialPatch(e,t,n){let r=t.material;if(r==null){n.changed&&n.useMaterialColor&&G(this._getCombinedOpacityAndColor(this._materialColor),this._materials[2],e);return}if(r.type===`collection`)return;let i=r.type===`complete`?r.newValue?.color:r.diff.color?.type===`complete`?r.diff.color.newValue:null,a=this._getCombinedOpacityAndColor(i);n.useMaterialColor&&G(o(a),this._materials[2],e),this._patternHidesLine&&(a[3]=0),G(a,this._materials[0],e),delete t.material}_prepareMarkerPatch(e,t){let n=t.marker,r=this._markerMaterial;if(n==null||n.type!==`partial`||n.diff==null||n.diff.placement!=null||n.diff.style!=null&&n.diff.style.type!==`complete`||n.diff.color!=null&&n.diff.color.type!==`complete`||r==null)return{changed:!1,useMaterialColor:this._markerColor==null};let i=n.diff.color,a=i!=null,o=a?i.newValue:null,s=o==null&&this._markerColor==null;o&&G(this._getCombinedOpacityAndColor(o),r,e);let c=n.diff.style?.newValue;return c&&e.symbolLayerStatePatches.push(()=>r.setParameters({markerPrimitive:T(c)})),delete t.marker,{changed:a,useMaterialColor:s}}_fastVisualVariableConvertOptions(e=!1){let t=this._getFallbackSize(),{size:n}=this.symbolLayer;return new A({supports:{size:!0,color:!0,rotation:!1,opacity:!0},symbolSize:r(n,n,n),fallbackColor:e?this._getFallbackMarkerOpacityAndColor(S):this._getFallbackOpacityAndColor(S),fallbackSize:r(t,t,t)})}_getFallbackOpacityAndColor(e){return this._materialColor?.toUnitRGBA()??e}_getFallbackOpacity(){return this._materialColor?.a??0}_getFallbackMarkerOpacityAndColor(e){return this.symbolLayer.marker?.color?.toUnitRGBA()??this._getFallbackOpacityAndColor(e)}_getFallbackMarkerOpacity(){return this.symbolLayer.marker?.color?.a??this._getFallbackOpacity()}_getWorldOrScreenSize(e){return this.symbol.worldSized?e:t(e)}_getFallbackSize(){return this._getWorldOrScreenSize(this.symbolLayer.size)}}function W(e){return e.type===`polyline`?e:null}function G(e,t,n){t!=null&&n.symbolLayerStatePatches.push(()=>t.setParameters({color:e}))}function K(e){return(e.material?.color?.a??1)===1&&(e.marker?.color?.a??1)===1}export{U as Graphics3DLineSymbolLayer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{splitIntoChunks as n}from"../../../../core/arrayUtils.js";import{createTask as r,resultOrAbort as i}from"../../../../core/asyncUtils.js";import a from"../../../../core/Collection.js";import{makeHandle as o}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import s from"../../../../core/Logger.js";import{abortMaybe as c,destroyMaybe as l}from"../../../../core/maybe.js";import{estimateNumberMemory as u,estimateStringMemory as d}from"../../../../core/memoryEstimations.js";import{whenOrAbort as f,throwIfAborted as p}from"../../../../core/promiseUtils.js";import m from"../../../../core/ReactiveSet.js";import{watch as h,sync as g}from"../../../../core/reactiveUtils.js";import{property as _,subclass as v}from"../../../../core/accessorSupport/decorators.js";import{equals as y}from"../../../../geometry/support/spatialReferenceUtils.js";import{formatNumber as b}from"../../../../intl/number.js";import{getMaximumQuerySize as x,queryAllJSON as S}from"../../../../layers/support/featureQueryAll.js";let C=class extends t{constructor(e){super(e),this._warnMaximumChangedObjectsExceeded=!1,this._maximumNumberOfEditOVerrides=D,this._definitionExpressionDirty=!0,this._interactiveEditingSessions=new a,this.geometryOverrides=new a,this._clientGeometryCache=new Map,this._attributeChangedObjectIds=new m,this._geometryChangedObjectIds=new m,this._pendingFetchChangedObjectIds=null,this._pendingFetchAbortController=new AbortController,this._applyGeometryOverridesTask=null,this._featureIdLocks=new Map}initialize(){this._memCache=new T(this.memoryController.newCache(`i3s-attribute-overrides-${this.layer.uid}`)),this.addHandles(h(()=>this.layer.definitionExpression,async()=>{this._definitionExpressionDirty=!0,!this._pendingFetchChangedObjectIds&&(this._applyGeometryOverridesTask=c(this._applyGeometryOverridesTask),this._applyGeometryOverridesTask=r(e=>this._queryAndAddGeometryOverrides(e)),await this._applyGeometryOverridesTask.promise.catch(()=>{}))},g)),this._pendingFetchChangedObjectIds=this._fetchChangedObjectIds(this._pendingFetchAbortController?.signal),this._pendingFetchChangedObjectIds.finally(()=>{this._pendingFetchAbortController=null,this._pendingFetchChangedObjectIds=null}).catch(()=>{})}destroy(){this._set(`layer`,null),this._memCache=l(this._memCache),this._pendingFetchAbortController=c(this._pendingFetchAbortController),this._pendingFetchChangedObjectIds=null,this._featureIdLocks.clear()}get is3DOFL(){return this._associatedLayer?.infoFor3D!=null}get sortedGeometryChangedObjectIds(){return this.is3DOFL?[...this._geometryChangedObjectIds].sort((e,t)=>e-t):[]}get _associatedLayer(){return this.layer==null?null:this.layer.associatedLayer}get hasGeometryChanges(){return this._geometryChangedObjectIds.size>0}get updating(){return this.is3DOFL?!!(this._pendingFetchChangedObjectIds||this._applyGeometryOverridesTask&&!this._applyGeometryOverridesTask.finished):!1}get isEmpty(){return this._pendingFetchChangedObjectIds==null&&this._attributeChangedObjectIds.size===0&&this._geometryChangedObjectIds.size===0}featureHasGeometryChanges(e){return this._geometryChangedObjectIds.has(e)}featureHasAttributeChanges(e){return this._attributeChangedObjectIds.has(e)}createInteractiveEditSession(e){this._attributeChangedObjectIds.add(e);let t=this._interactiveEditingSessions,n=new w(e,()=>{t.remove(n)});return t.unshift(n),n}async applyAttributeOverrides(e,t,n,r=[]){if(this._pendingFetchChangedObjectIds&&await f(this._pendingFetchChangedObjectIds,n),t==null)return;let{attributeData:i,loadedAttributes:a}=t;if(a==null||i==null||this._attributeChangedObjectIds.size===0)return;let o=new Set;for(let e of a)o.add(e.index);for(let t of r)o.has(t.index)||(a.push(t),i[t.name]=Array(e.length));let s=await this._lockFeatureIds(e);try{let t={attributeData:i,loadedAttributes:a},{objectIds:r,fieldNames:o}=this._getOverridesFromCache(e,t,this._attributeChangedObjectIds);if(r.length===0||o.length===0)return;let s=await this._queryAttributeOverridesFromAssociatedLayer(r,o,n);if(s==null)return;this._processOverridesFromAssociatedLayer(e,s,o,t)}finally{s.remove()}}updateGeometry(e,t){this._geometryChangedObjectIds.add(e);let n=this._clientGeometryCache.get(e);if(n!=null&&(this.geometryOverrides.remove(n),this._clientGeometryCache.delete(e)),t!=null){let n={oid:e,mesh:t};this.geometryOverrides.add(n),this._clientGeometryCache.set(e,n)}}updateAttributeValue(e,t,n){this._attributeChangedObjectIds.add(e),this._cacheAttributeValue(e,t,n)}featureAdded(e){this.is3DOFL&&this._geometryChangedObjectIds.add(e),this._attributeChangedObjectIds.add(e)}_cacheAttributeValue(e,t,n){this._memCache.put(e,t,n)}_getOverridesFromCache(e,{loadedAttributes:t,attributeData:n},r){let i=[];for(let e of t)i[e.index]=n[e.name];let a=new Set,o=new Set;for(let n=0;n<e.length;n++){let s=e[n];if(r.has(s))for(let e of t){let t=this._attributeFromCache(s,e.index);if(t!==void 0){i[e.index][n]=t;continue}a.add(s),o.add(e.name)}}return{objectIds:Array.from(a),fieldNames:Array.from(o)}}_attributeFromCache(e,t){let n=this._fromInteractiveEditingSession(e,t);return n===void 0?this._memCache.get(e,t):n}_fromInteractiveEditingSession(e,t){if(this._interactiveEditingSessions!=null)for(let n of this._interactiveEditingSessions){if(n.objectId!==e)continue;let r=n.getAttribute(t);if(r!==void 0)return r}}async _queryAttributeOverridesFromAssociatedLayer(e,t,n){if(e.length===0)return null;this._logWarningIfMaximumObjectsExceeded();let{associatedLayer:r}=this.layer;if(r==null)return null;let i=r.createQuery(),{objectIdField:a}=r,o=[a,...t];i.where=this.layer.definitionExpression||`1=1`,i.returnGeometry=!1,i.outFields=o,i.cacheHint=!0;let s=await this._executeBatchQuery(r,e,i,n),c=[];for(let e of s)if(e.ok)for(let t of e.value.features)c.push(t);return c}async _queryGeometryOverridesFromAssociatedLayer(e,t){if(e.length===0||!this.is3DOFL)return null;let n=this.layer.associatedLayer,r=n.infoFor3D,{spatialReference:i}=n;if(this.view){let{state:{viewingMode:e},spatialReference:t}=this.view,n=e===1,r=i.isGeographic;if(n&&!r)return s.getLogger(this).warn(`unsupported-pcs-edits-in-global-view`,this.layer.title,O(i,t,this.view.viewingMode,0)),null;if(!n&&r)return s.getLogger(this).warn(`unsupported-gcs-edits-in-local-view`,this.layer.title,O(i,t,this.view.viewingMode,0)),null;if(!(y(i,t)||n&&t.isWebMercator&&i.isWGS84))return s.getLogger(this).warn(`unsupported-mismatched-spatial-reference-edits`,this.layer.title,O(i,t,this.view.viewingMode,1)),null}this._logWarningIfMaximumObjectsExceeded();let{objectIdField:a,globalIdField:o}=n,c=[a,...o==null?[]:[o]],l=n.createQuery();l.where=this.layer.definitionExpression||`1=1`,l.returnGeometry=!0,l.outFields=c,l.cacheHint=!0,l.returnZ=n.hasZ,l.returnM=n.hasM;let{assetMapFromAssetMapsJSON:u,extractMesh:d}=await import(`../../../../rest/support/meshFeatureSet.js`),f=await this._executeBatchQuery(n,e,l,t),p=[];for(let e of f){if(!e.ok)continue;let{assetMaps:t,features:n,globalIdFieldName:a}=e.value;if(t==null)continue;let o=u(r,t);for(let e of n){let t=d(e,a,i,r,o),n=e;if(t==null){n.geometry=null;continue}n.geometry=t,p.push(n)}}return p}_logWarningIfMaximumObjectsExceeded(){if(!this._warnMaximumChangedObjectsExceeded)return;this._warnMaximumChangedObjectsExceeded=!1;let e=`The number of edited objects that are not yet cached in the scene service exceeds the maximum limit. Attribute changes will only be available for the first ${b(this._maximumNumberOfEditOVerrides)} objects. Please consider re-caching the scene service`,t=this.layer.portalItem;t?.loaded?e+=` (${t.portal.url}/home/item.html?id=${t.id}#settings)`:e+=` (${this.layer.parsedUrl.path})`,s.getLogger(this).warn(`#queryOverrides()`,this.layer.title,`${e}.`)}async _executeBatchQuery(e,t,r,a){if(t.length===0)return[];let o=x(e);t=[...t].sort((e,t)=>e-t);let s=n(t,o).map(t=>{let n=r.clone();return n.objectIds=t,i(S(e,n,{signal:a}))});return Promise.all(s)}_processOverridesFromAssociatedLayer(e,t,n,{loadedAttributes:r,attributeData:i}){let a=this._associatedLayer;if(a==null)return;let o=a.objectIdField,s=n.map(t=>(t in i||(i[t]=Array(e.length)),i[t])),c=new Map(r.map(e=>[e.name,e.index])),l=n.map(e=>c.get(e)),u=new Map(Array.from(e,(e,t)=>[e,t]));for(let e of t){let t=e.attributes[o];for(let r=0;r<n.length;r++){let i=l[r],a=u.get(t),o=e.attributes[n[r]];s[r][a]=o,this._cacheAttributeValue(t,i,o)}}}async _fetchChangedObjectIds(e){let t=this.layer;await t.load({signal:e}),this._geometryChangedObjectIds.clear(),this._attributeChangedObjectIds.clear();let{associatedLayer:n}=t;if(n==null||(await n.load({signal:e}),!n.capabilities?.operations?.supportsChangeTracking))return;let r=this._getFetchChangedObjectIdsServerGen();if(r==null)return;let i=await this.extractChanges.fetch(n,{serverGen:r,returnGeometryChanges:this.is3DOFL,signal:e});if(p(e),i!=null)for(this._setChangedObjectIds(i);this._definitionExpressionDirty;)await this._queryAndAddGeometryOverrides(e)}_setChangedObjectIds(e){let{attributeChangedObjectIds:t,geometryChangedObjectIds:n}=e,r=Math.min(this._maximumNumberOfEditOVerrides,t.length);r<t.length&&(this._warnMaximumChangedObjectsExceeded=!0);let i=t.sort((e,t)=>e-t);for(let e=0;e<r;++e){let t=i[e];this._attributeChangedObjectIds.add(t)}for(let e of n)this._geometryChangedObjectIds.add(e)}async _queryAndAddGeometryOverrides(e){this._definitionExpressionDirty=!1;let{associatedLayer:t}=this.layer;if(t!=null&&t.capabilities?.operations?.supportsChangeTracking&&this.is3DOFL&&this._geometryChangedObjectIds.size>0){let n=await this._queryGeometryOverridesFromAssociatedLayer(Array.from(this._geometryChangedObjectIds),e);if(n!=null)for(let e of n)e.geometry!=null&&this.updateGeometry(e.attributes[t.objectIdField],e.geometry)}}_getFetchChangedObjectIdsServerGen(){let e=this.layer;if(e.serviceUpdateTimeStamp?.lastUpdate!=null)return e.serviceUpdateTimeStamp.lastUpdate;let t=e.associatedLayer;return t?.serverGens?.minServerGen==null?null:t.serverGens.minServerGen}async _lockFeatureIds(e){let t=this._featureIdLocks,n=!0;for(;n;){let r=[];for(let n of e){let e=t.get(n);e&&r.push(e)}r.length===0?n=!1:await Promise.all(r)}let r=Promise.withResolvers(),i=r.promise;for(let n of e)t.set(n,i);return o(()=>{for(let n of e)t.delete(n);r.resolve()})}get test(){}};e([_({constructOnly:!0})],C.prototype,`view`,void 0),e([_({constructOnly:!0})],C.prototype,`layer`,void 0),e([_({constructOnly:!0})],C.prototype,`extractChanges`,void 0),e([_({readOnly:!0})],C.prototype,`is3DOFL`,null),e([_()],C.prototype,`_interactiveEditingSessions`,void 0),e([_({readOnly:!0})],C.prototype,`sortedGeometryChangedObjectIds`,null),e([_({readOnly:!0})],C.prototype,`geometryOverrides`,void 0),e([_()],C.prototype,`_clientGeometryCache`,void 0),e([_()],C.prototype,`_associatedLayer`,null),e([_({constructOnly:!0})],C.prototype,`memoryController`,void 0),e([_()],C.prototype,`_attributeChangedObjectIds`,void 0),e([_()],C.prototype,`_geometryChangedObjectIds`,void 0),e([_()],C.prototype,`hasGeometryChanges`,null),e([_()],C.prototype,`_pendingFetchChangedObjectIds`,void 0),e([_()],C.prototype,`_pendingFetchAbortController`,void 0),e([_()],C.prototype,`_applyGeometryOverridesTask`,void 0),e([_()],C.prototype,`updating`,null),e([_()],C.prototype,`isEmpty`,null),C=e([v(`esri.views.3d.layers.i3s.I3SOverrides`)],C);class w{constructor(e,t){this.objectId=e,this._remove=t,this._updates=new Map,this._isActive=!0}getAttribute(e){return this._updates.get(e)}setAttribute(e,t){this.isActive&&this._updates.set(e,t)}remove(){this.isActive&&(this._isActive=!1,this._remove())}get isActive(){return this._isActive}}class T{constructor(e){this._cache=e}destroy(){this._cache.destroy()}put(e,t,n){this._cache.put(this._getKey(e,t),new E(n))}get(e,t){return this._cache.get(this._getKey(e,t))?.value}_getKey(e,t){return`${e}-${t}`}}class E{constructor(e){this.value=e,this.usedMemory=typeof e==`string`?d(e):u}}const D=5e4;function O(e,t,n,r){return`Displaying the edits of a SceneLayer with a${r===0?e.isGeographic?` geographic `:` projected `:` `}spatial reference (wkid:${e.wkid}) in ${n} viewing mode${r===1?` with spatial reference (wkid:${t.wkid}) `:` `}is not supported. No geometry edits will be displayed for this layer.\nPlease consider re-caching the scene service or changing the ${r===0?`viewing mode`:`view spatial reference`} to display edits.`}export{C as I3SOverrides};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{splitIntoChunks as n}from"../../../../core/arrayUtils.js";import{createTask as r,resultOrAbort as i}from"../../../../core/asyncUtils.js";import a from"../../../../core/Collection.js";import{makeHandle as o}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import s from"../../../../core/Logger.js";import{abortMaybe as c,destroyMaybe as l}from"../../../../core/maybe.js";import{estimateNumberMemory as u,estimateStringMemory as d}from"../../../../core/memoryEstimations.js";import{whenOrAbort as f,throwIfAborted as p}from"../../../../core/promiseUtils.js";import m from"../../../../core/ReactiveSet.js";import{watch as h,sync as g}from"../../../../core/reactiveUtils.js";import{property as _,subclass as v}from"../../../../core/accessorSupport/decorators.js";import{equals as y}from"../../../../geometry/support/spatialReferenceUtils.js";import{formatNumber as b}from"../../../../intl/number.js";import{getMaximumQuerySize as x,queryAllJSON as S}from"../../../../layers/support/featureQueryAll.js";let C=class extends t{constructor(e){super(e),this._warnMaximumChangedObjectsExceeded=!1,this._maximumNumberOfEditOVerrides=D,this._definitionExpressionDirty=!0,this._interactiveEditingSessions=new a,this.geometryOverrides=new a,this._clientGeometryCache=new Map,this._attributeChangedObjectIds=new m,this._geometryChangedObjectIds=new m,this._pendingFetchChangedObjectIds=null,this._pendingFetchAbortController=new AbortController,this._applyGeometryOverridesTask=null,this._featureIdLocks=new Map}initialize(){this._memCache=new T(this.memoryController.newCache(`i3s-attribute-overrides-${this.layer.uid}`)),this.addHandles(h(()=>this.layer.definitionExpression,async()=>{this._definitionExpressionDirty=!0,!this._pendingFetchChangedObjectIds&&(this._applyGeometryOverridesTask=c(this._applyGeometryOverridesTask),this._applyGeometryOverridesTask=r(e=>this._queryAndAddGeometryOverrides(e)),await this._applyGeometryOverridesTask.promise.catch(()=>{}))},g)),this._pendingFetchChangedObjectIds=this._fetchChangedObjectIds(this._pendingFetchAbortController?.signal),this._pendingFetchChangedObjectIds.finally(()=>{this._pendingFetchAbortController=null,this._pendingFetchChangedObjectIds=null}).catch(()=>{})}destroy(){this._set(`layer`,null),this._memCache=l(this._memCache),this._pendingFetchAbortController=c(this._pendingFetchAbortController),this._pendingFetchChangedObjectIds=null,this._featureIdLocks.clear()}get is3DOFL(){return this._associatedLayer?.infoFor3D!=null}get sortedGeometryChangedObjectIds(){return this.is3DOFL?[...this._geometryChangedObjectIds].sort((e,t)=>e-t):[]}get _associatedLayer(){return this.layer==null?null:this.layer.associatedLayer}get hasGeometryChanges(){return this._geometryChangedObjectIds.size>0}get updating(){return this.is3DOFL?!!(this._pendingFetchChangedObjectIds||this._applyGeometryOverridesTask&&!this._applyGeometryOverridesTask.finished):!1}get isEmpty(){return this._pendingFetchChangedObjectIds==null&&this._attributeChangedObjectIds.size===0&&this._geometryChangedObjectIds.size===0}featureHasGeometryChanges(e){return this._geometryChangedObjectIds.has(e)}featureHasAttributeChanges(e){return this._attributeChangedObjectIds.has(e)}createInteractiveEditSession(e){this._attributeChangedObjectIds.add(e);let t=this._interactiveEditingSessions,n=new w(e,()=>{t.remove(n)});return t.unshift(n),n}async applyAttributeOverrides(e,t,n,r=[]){if(this._pendingFetchChangedObjectIds&&await f(this._pendingFetchChangedObjectIds,n),t==null)return;let{attributeData:i,loadedAttributes:a}=t;if(a==null||i==null||this._attributeChangedObjectIds.size===0)return;let o=new Set;for(let e of a)o.add(e.index);for(let t of r)o.has(t.index)||(a.push(t),i[t.name]=Array(e.length));let s=await this._lockFeatureIds(e);try{let t={attributeData:i,loadedAttributes:a},{objectIds:r,fieldNames:o}=this._getOverridesFromCache(e,t,this._attributeChangedObjectIds);if(r.length===0||o.length===0)return;let s=await this._queryAttributeOverridesFromAssociatedLayer(r,o,n);if(s==null)return;this._processOverridesFromAssociatedLayer(e,s,o,t)}finally{s.remove()}}updateGeometry(e,t){this._geometryChangedObjectIds.add(e);let n=this._clientGeometryCache.get(e);if(n!=null&&(this.geometryOverrides.remove(n),this._clientGeometryCache.delete(e)),t!=null){let n={oid:e,mesh:t};this.geometryOverrides.add(n),this._clientGeometryCache.set(e,n)}}updateAttributeValue(e,t,n){this._attributeChangedObjectIds.add(e),this._cacheAttributeValue(e,t,n)}featureAdded(e){this.is3DOFL&&this._geometryChangedObjectIds.add(e),this._attributeChangedObjectIds.add(e)}_cacheAttributeValue(e,t,n){this._memCache.put(e,t,n)}_getOverridesFromCache(e,{loadedAttributes:t,attributeData:n},r){let i=[];for(let e of t)i[e.index]=n[e.name];let a=new Set,o=new Set;for(let n=0;n<e.length;n++){let s=e[n];if(r.has(s))for(let e of t){let t=this._attributeFromCache(s,e.index);if(t!==void 0){i[e.index][n]=t;continue}a.add(s),o.add(e.name)}}return{objectIds:Array.from(a),fieldNames:Array.from(o)}}_attributeFromCache(e,t){let n=this._fromInteractiveEditingSession(e,t);return n===void 0?this._memCache.get(e,t):n}_fromInteractiveEditingSession(e,t){if(this._interactiveEditingSessions!=null)for(let n of this._interactiveEditingSessions){if(n.objectId!==e)continue;let r=n.getAttribute(t);if(r!==void 0)return r}}async _queryAttributeOverridesFromAssociatedLayer(e,t,n){if(e.length===0)return null;this._logWarningIfMaximumObjectsExceeded();let{associatedLayer:r}=this.layer;if(r==null)return null;let i=r.createQuery(),{objectIdField:a}=r,o=[a,...t];i.where=this.layer.definitionExpression||`1=1`,i.returnGeometry=!1,i.outFields=o,r.capabilities.query.supportsCacheHint&&(i.cacheHint=!0);let s=await this._executeBatchQuery(r,e,i,n),c=[];for(let e of s)if(e.ok)for(let t of e.value.features)c.push(t);return c}async _queryGeometryOverridesFromAssociatedLayer(e,t){if(e.length===0||!this.is3DOFL)return null;let n=this.layer.associatedLayer,r=n.infoFor3D,{spatialReference:i}=n;if(this.view){let{state:{viewingMode:e},spatialReference:t}=this.view,n=e===1,r=i.isGeographic;if(n&&!r)return s.getLogger(this).warn(`unsupported-pcs-edits-in-global-view`,this.layer.title,O(i,t,this.view.viewingMode,0)),null;if(!n&&r)return s.getLogger(this).warn(`unsupported-gcs-edits-in-local-view`,this.layer.title,O(i,t,this.view.viewingMode,0)),null;if(!(y(i,t)||n&&t.isWebMercator&&i.isWGS84))return s.getLogger(this).warn(`unsupported-mismatched-spatial-reference-edits`,this.layer.title,O(i,t,this.view.viewingMode,1)),null}this._logWarningIfMaximumObjectsExceeded();let{objectIdField:a,globalIdField:o}=n,c=[a,...o==null?[]:[o]],l=n.createQuery();l.where=this.layer.definitionExpression||`1=1`,l.returnGeometry=!0,l.outFields=c,l.returnZ=n.hasZ,l.returnM=n.hasM,n.capabilities.query.supportsCacheHint&&(l.cacheHint=!0);let{assetMapFromAssetMapsJSON:u,extractMesh:d}=await import(`../../../../rest/support/meshFeatureSet.js`),f=await this._executeBatchQuery(n,e,l,t),p=[];for(let e of f){if(!e.ok)continue;let{assetMaps:t,features:n,globalIdFieldName:a}=e.value;if(t==null)continue;let o=u(r,t);for(let e of n){let t=d(e,a,i,r,o),n=e;if(t==null){n.geometry=null;continue}n.geometry=t,p.push(n)}}return p}_logWarningIfMaximumObjectsExceeded(){if(!this._warnMaximumChangedObjectsExceeded)return;this._warnMaximumChangedObjectsExceeded=!1;let e=`The number of edited objects that are not yet cached in the scene service exceeds the maximum limit. Attribute changes will only be available for the first ${b(this._maximumNumberOfEditOVerrides)} objects. Please consider re-caching the scene service`,t=this.layer.portalItem;t?.loaded?e+=` (${t.portal.url}/home/item.html?id=${t.id}#settings)`:e+=` (${this.layer.parsedUrl.path})`,s.getLogger(this).warn(`#queryOverrides()`,this.layer.title,`${e}.`)}async _executeBatchQuery(e,t,r,a){if(t.length===0)return[];let o=x(e);t=[...t].sort((e,t)=>e-t);let s=n(t,o).map(t=>{let n=r.clone();return n.objectIds=t,i(S(e,n,{signal:a}))});return Promise.all(s)}_processOverridesFromAssociatedLayer(e,t,n,{loadedAttributes:r,attributeData:i}){let a=this._associatedLayer;if(a==null)return;let o=a.objectIdField,s=n.map(t=>(t in i||(i[t]=Array(e.length)),i[t])),c=new Map(r.map(e=>[e.name,e.index])),l=n.map(e=>c.get(e)),u=new Map(Array.from(e,(e,t)=>[e,t]));for(let e of t){let t=e.attributes[o];for(let r=0;r<n.length;r++){let i=l[r],a=u.get(t),o=e.attributes[n[r]];s[r][a]=o,this._cacheAttributeValue(t,i,o)}}}async _fetchChangedObjectIds(e){let t=this.layer;await t.load({signal:e}),this._geometryChangedObjectIds.clear(),this._attributeChangedObjectIds.clear();let{associatedLayer:n}=t;if(n==null||(await n.load({signal:e}),!n.capabilities?.operations?.supportsChangeTracking))return;let r=this._getFetchChangedObjectIdsServerGen();if(r==null)return;let i=await this.extractChanges.fetch(n,{serverGen:r,returnGeometryChanges:this.is3DOFL,signal:e});if(p(e),i!=null)for(this._setChangedObjectIds(i);this._definitionExpressionDirty;)await this._queryAndAddGeometryOverrides(e)}_setChangedObjectIds(e){let{attributeChangedObjectIds:t,geometryChangedObjectIds:n}=e,r=Math.min(this._maximumNumberOfEditOVerrides,t.length);r<t.length&&(this._warnMaximumChangedObjectsExceeded=!0);let i=t.sort((e,t)=>e-t);for(let e=0;e<r;++e){let t=i[e];this._attributeChangedObjectIds.add(t)}for(let e of n)this._geometryChangedObjectIds.add(e)}async _queryAndAddGeometryOverrides(e){this._definitionExpressionDirty=!1;let{associatedLayer:t}=this.layer;if(t!=null&&t.capabilities?.operations?.supportsChangeTracking&&this.is3DOFL&&this._geometryChangedObjectIds.size>0){let n=await this._queryGeometryOverridesFromAssociatedLayer(Array.from(this._geometryChangedObjectIds),e);if(n!=null)for(let e of n)e.geometry!=null&&this.updateGeometry(e.attributes[t.objectIdField],e.geometry)}}_getFetchChangedObjectIdsServerGen(){let e=this.layer;if(e.serviceUpdateTimeStamp?.lastUpdate!=null)return e.serviceUpdateTimeStamp.lastUpdate;let t=e.associatedLayer;return t?.serverGens?.minServerGen==null?null:t.serverGens.minServerGen}async _lockFeatureIds(e){let t=this._featureIdLocks,n=!0;for(;n;){let r=[];for(let n of e){let e=t.get(n);e&&r.push(e)}r.length===0?n=!1:await Promise.all(r)}let r=Promise.withResolvers(),i=r.promise;for(let n of e)t.set(n,i);return o(()=>{for(let n of e)t.delete(n);r.resolve()})}get test(){}};e([_({constructOnly:!0})],C.prototype,`view`,void 0),e([_({constructOnly:!0})],C.prototype,`layer`,void 0),e([_({constructOnly:!0})],C.prototype,`extractChanges`,void 0),e([_({readOnly:!0})],C.prototype,`is3DOFL`,null),e([_()],C.prototype,`_interactiveEditingSessions`,void 0),e([_({readOnly:!0})],C.prototype,`sortedGeometryChangedObjectIds`,null),e([_({readOnly:!0})],C.prototype,`geometryOverrides`,void 0),e([_()],C.prototype,`_clientGeometryCache`,void 0),e([_()],C.prototype,`_associatedLayer`,null),e([_({constructOnly:!0})],C.prototype,`memoryController`,void 0),e([_()],C.prototype,`_attributeChangedObjectIds`,void 0),e([_()],C.prototype,`_geometryChangedObjectIds`,void 0),e([_()],C.prototype,`hasGeometryChanges`,null),e([_()],C.prototype,`_pendingFetchChangedObjectIds`,void 0),e([_()],C.prototype,`_pendingFetchAbortController`,void 0),e([_()],C.prototype,`_applyGeometryOverridesTask`,void 0),e([_()],C.prototype,`updating`,null),e([_()],C.prototype,`isEmpty`,null),C=e([v(`esri.views.3d.layers.i3s.I3SOverrides`)],C);class w{constructor(e,t){this.objectId=e,this._remove=t,this._updates=new Map,this._isActive=!0}getAttribute(e){return this._updates.get(e)}setAttribute(e,t){this.isActive&&this._updates.set(e,t)}remove(){this.isActive&&(this._isActive=!1,this._remove())}get isActive(){return this._isActive}}class T{constructor(e){this._cache=e}destroy(){this._cache.destroy()}put(e,t,n){this._cache.put(this._getKey(e,t),new E(n))}get(e,t){return this._cache.get(this._getKey(e,t))?.value}_getKey(e,t){return`${e}-${t}`}}class E{constructor(e){this.value=e,this.usedMemory=typeof e==`string`?d(e):u}}const D=5e4;function O(e,t,n,r){return`Displaying the edits of a SceneLayer with a${r===0?e.isGeographic?` geographic `:` projected `:` `}spatial reference (wkid:${e.wkid}) in ${n} viewing mode${r===1?` with spatial reference (wkid:${t.wkid}) `:` `}is not supported. No geometry edits will be displayed for this layer.\nPlease consider re-caching the scene service or changing the ${r===0?`viewing mode`:`view spatial reference`} to display edits.`}export{C as I3SOverrides};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{clamp as e}from"../../../../core/mathUtils.js";import{fromMat4 as t}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{identity as r,copy as i,set as a,multiply as o,scale as s,translate as c,rotateZ as l,rotateX as ee,rotateY as u}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as f,copy as p}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{ones as m,zeros as h,create as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as _}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{ones as v}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{meterIn as y}from"../../../../renderers/support/lengthUtils.js";import{isStringOrNull as b,isNumber as x}from"../../../../support/guards.js";import{debugFlags as S}from"../../support/debugFlags.js";import{olidEnabled as C}from"../../webgl-engine/effects/geometry/olidUtils.js";import{NoParameters as w}from"../../../webgl/NoParameters.js";class T{constructor(e){this.source=e}}class E extends T{constructor(e){super(e),this.minSize=[0,0,0],this.maxSize=[0,0,0],this.offset=[0,0,0],this.factor=[0,0,0],this.type=[0,0,0],this.fallback=[0,0,0],this.symbolRotationMatrix=n(),this.symbolAnchor=g()}}class D extends T{constructor(e){super(e),this.colors=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.values=[0,0,0,0,0,0,0,0],this.fallback=[0,0,0,0]}}class O extends T{constructor(e,t=0){super(e),this.fallback=t,this.values=[0,0,0,0,0,0,0,0],this.opacityValues=[0,0,0,0,0,0,0,0]}}class k extends T{constructor(e){super(e),this.offset=[0,0,0],this.factor=[1,1,1],this.type=[0,0,0]}}class A{}function j(e){return e!=null}function M(e,t){e&&e.push(t)}function N(e,t,n,r=d()){let i=e||0,a=t||0,o=n||0;return i!==0&&l(r,r,-i/180*Math.PI),a!==0&&ee(r,r,a/180*Math.PI),o!==0&&u(r,r,o/180*Math.PI),r}function P(e,t,n,r,i){let a=e.minSize,o=e.maxSize;if(e.useSymbolValue){let e=r.symbolSize[n];return t.minSize[n]=e,t.maxSize[n]=e,t.offset[n]=t.minSize[n],t.factor[n]=0,t.type[n]=1,!0}return j(e.field)||j(e.valueExpression)?j(e.stops)?e.stops.length===2&&x(e.stops[0].size)&&x(e.stops[1].size)?(F(e.stops[0].size,e.stops[1].size,e.stops[0].value,e.stops[1].value,t,n),t.type[n]=1,!0):(M(i,`Could not convert size info: stops only supported with 2 elements`),!1):x(a)&&x(o)&&j(e.minDataValue)&&j(e.maxDataValue)?(F(a,o,e.minDataValue,e.maxDataValue,t,n),t.type[n]=1,!0):e.valueUnit===`unknown`?(M(i,`Could not convert size info: proportional size not supported`),!1):y[e.valueUnit]==null?(M(i,`Could not convert size info: scale-dependent size not supported`),!1):(t.minSize[n]=-1/0,t.maxSize[n]=1/0,t.offset[n]=0,t.factor[n]=1/y[e.valueUnit],t.type[n]=1,!0):e.stops?.[0]&&x(e.stops[0].size)?(t.minSize[n]=e.stops[0].size,t.maxSize[n]=e.stops[0].size,t.offset[n]=t.minSize[n],t.factor[n]=0,t.type[n]=1,!0):x(a)?(t.minSize[n]=a,t.maxSize[n]=a,t.offset[n]=a,t.factor[n]=0,t.type[n]=1,!0):(M(i,`Could not convert size info: unsupported variant of sizeInfo`),!1)}function F(e,t,n,r,i,a){let o=Math.abs(r-n)>0?(t-e)/(r-n):0;i.minSize[a]=o>0?e:t,i.maxSize[a]=o>0?t:e,i.offset[a]=e-n*o,i.factor[a]=o}function te(e,t,n,r){if(e.normalizationField||e.valueRepresentation)return M(r,`Could not convert size info: unsupported property`),null;if(!b(e.field)&&!b(e.valueExpression))return M(r,`Could not convert size info: field is not a string`),null;let i=R(e);if(!t.size)t.size=new E(i),p(t.size.fallback,n.fallbackSize);else if(i){if(!t.size.source)t.size.source=i;else if(i!==t.size.source)return M(r,`Could not convert size info: multiple fields in use`),null}let a;switch(e.axis){case`width`:return a=P(e,t.size,0,n,r),a?t:null;case`height`:return a=P(e,t.size,2,n,r),a?t:null;case`depth`:return a=P(e,t.size,1,n,r),a?t:null;case`width-and-depth`:return a=P(e,t.size,0,n,r),a&&P(e,t.size,1,n,r),a?t:null;case null:case void 0:case`all`:return a=P(e,t.size,0,n,r),a&&=P(e,t.size,1,n,r),a&&=P(e,t.size,2,n,r),a?t:null;default:return M(r,`Could not convert size info: unknown axis "${e.axis}""`),null}}function ne(e,t,n){for(let n=0;n<3;++n){let r=t.unitInMeters;e.type[n]===1&&(r*=t.modelSize[n],e.type[n]=2),e.minSize[n]=e.minSize[n]/r,e.maxSize[n]=e.maxSize[n]/r,e.offset[n]=e.offset[n]/r,e.factor[n]=e.factor[n]/r}let r;if(e.type[0]!==0)r=0;else if(e.type[1]!==0)r=1;else if(e.type[2]!==0)r=2;else return M(n,`No size axis contains a valid size or scale`),!1;for(let t=0;t<3;++t)e.type[t]===0&&(e.minSize[t]=e.minSize[r],e.maxSize[t]=e.maxSize[r],e.offset[t]=e.offset[r],e.factor[t]=e.factor[r],e.type[t]=e.type[r]);return!0}function I(e,t,n){e[4*t]=n.r/255,e[4*t+1]=n.g/255,e[4*t+2]=n.b/255,e[4*t+3]=n.a}function re(e,t,n,r){if(e.normalizationField)return M(r,`Could not convert color info: unsupported property`),null;let i=R(e);if(i){if(e.stops){if(e.stops.length>8)return M(r,`Could not convert color info: too many color stops`),null;t.color=new D(i);let a=e.stops;for(let e=0;e<8;++e){let n=a[Math.min(e,a.length-1)];t.color.values[e]=n.value,I(t.color.colors,e,n.color)}_(t.color.fallback,n.fallbackColor)}else return M(r,`Could not convert color info: missing stops or colors`),null}else if(e.stops&&e.stops.length>=0){let r=e.stops&&e.stops.length>=0&&e.stops[0].color;t.color=new D(null);for(let e=0;e<8;e++)t.color.values[e]=1/0,I(t.color.colors,e,r);_(t.color.fallback,n.fallbackColor)}else return M(r,`Could not convert color info: no field and no colors/stops`),null;return t}function ie(e,t,n,r){if(e.normalizationField)return M(r,`Could not convert opacity info: unsupported property`),null;let i=R(e);if(i){if(e.stops){if(e.stops.length>8)return M(r,`Could not convert opacity info: too many opacity stops`),null;t.opacity=new O(i,n.fallbackColor[3]);let a=e.stops;for(let e=0;e<8;++e){let n=a[Math.min(e,a.length-1)];t.opacity.values[e]=n.value,t.opacity.opacityValues[e]=n.opacity}}else return M(r,`Could not convert opacity info: missing stops or opacities`),null}else if(e.stops&&e.stops.length>=0){let r=e.stops&&e.stops.length>=0?e.stops[0].opacity:0;t.opacity={source:``,values:[0,0,0,0,0,0,0,0],opacityValues:[0,0,0,0,0,0,0,0],fallback:n.fallbackColor[3]};for(let e=0;e<8;e++)t.opacity.values[e]=1/0,t.opacity.opacityValues[e]=r}else return M(r,`Could not convert opacity info: no field and no opacities/stops`),null;return t}function L(e,t,n){let r=n===2&&e.rotationType===`arithmetic`;t.offset[n]=r?90:0,t.factor[n]=r?-1:1,t.type[n]=1}function R(e){return(e.cache.hasExpression?e.valueExpression:e.field)||``}function z(e,t,n){let r=R(e);if(!t.rotation)t.rotation={source:r,offset:[0,0,0],factor:[1,1,1],type:[0,0,0]};else if(r){if(!t.rotation.source)t.rotation.source=r;else if(r!==t.rotation.source)return M(n,`Could not convert rotation info: multiple fields in use`),null}switch(e.axis){case`tilt`:return L(e,t.rotation,0),t;case`roll`:return L(e,t.rotation,1),t;case null:case void 0:case`heading`:return L(e,t.rotation,2),t;default:return M(n,`Could not convert rotation info: unknown axis "${e.axis}""`),null}}class B{constructor({supports:e,modelSize:t,symbolSize:n,unitInMeters:r,anchor:i,scale:a,rotation:o,fallbackColor:s,fallbackSize:c}){this.supports=e,this.modelSize=t??m(),this.symbolSize=n??m(),this.unitInMeters=r??1,this.anchor=i??h(),this.scale=a??m(),this.rotation=o??h(),this.fallbackColor=s??v(),this.fallbackSize=c??m()}}function V(e,t,n){if(!e)return null;let r=e.reduce((e,r)=>{if(!e)return e;switch(r.type){case`size`:return t.supports.size?te(r,e,t,n):e;case`color`:return t.supports.color?re(r,e,t,n):e;case`opacity`:return t.supports.opacity?ie(r,e,t,n):null;case`rotation`:return t.supports.rotation?z(r,e,n):e;default:return null}},new A);return e.length>0&&r&&!r.size&&!r.color&&!r.opacity&&!r.rotation||r?.size&&!ne(r.size,t,n)?null:r}class H{constructor(e,t,n){this.visualVariables=e,this.materialParameters=t,this.requiresShaderTransformation=n}}function U(e,t){if(!e||C()||S.TESTS_DISABLE_FAST_UPDATES)return null;let n=V(e.visualVariables,t);return n?new H(n,q(n,t),!!n.size):null}function W(e,t,n){if(!t||!e)return!1;let r=e.visualVariables,i=V(t.visualVariables,n);return!i||!G(r.size,i.size,`size`)||!G(r.color,i.color,`color`)||!G(r.rotation,i.rotation,`rotation`)||!G(r.opacity,i.opacity,`opacity`)?!1:(e.visualVariables=i,e.materialParameters=q(i,n),e.requiresShaderTransformation=!!i.size,!0)}function G(e,t,n){if(!!e!=!!t||e&&e.source!==t?.source)return!1;if(e&&n===`rotation`){let n=e,r=t;for(let e=0;e<3;e++)if(n.type[e]!==r.type[e]||n.offset[e]!==r.offset[e]||n.factor[e]!==r.factor[e])return!1}return!0}class K extends w{constructor(e){super(),this.vvSize=e?.size??null,this.vvColor=e?.color??null,this.vvOpacity=e?.opacity??null}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}function q(e,n){let i=new K(e);return i.vvSize&&(p(i.vvSize.symbolAnchor,n.anchor),r($),N(n.rotation[2],n.rotation[0],n.rotation[1],$),t(i.vvSize.symbolRotationMatrix,$)),i}function J(e,t,n){if(!e.vvSize)return n;i(Z,n);let r=e.vvSize.symbolRotationMatrix;return a($,r[0],r[1],r[2],0,r[3],r[4],r[5],0,r[6],r[7],r[8],0,0,0,0,1),o(Z,Z,$),Y(Q,e,t),s(Z,Z,Q),c(Z,Z,e.vvSize.symbolAnchor),Z}function Y(t,n,r){if(!n.vvSize)return f(t,1,1,1),t;if(Number.isNaN(r[0]))return p(t,n.vvSize.fallback);for(let i=0;i<3;++i){let a=n.vvSize.offset[i]+r[0]*n.vvSize.factor[i];t[i]=e(a,n.vvSize.minSize[i],n.vvSize.maxSize[i])}return t}function ae(e,t){return e?.source?X(t?.input):0}function oe(e,t){if(!e?.source)return 0;for(let e=0;e<3;e++)if(t?.input[e]!=null)return X(t.input[e]);return X(void 0)}function X(e){return typeof e!=`number`||!isFinite(e)?NaN:e}const Z=d(),Q=g(),$=d();export{B as ConvertOptions,D as FastColorInfo,O as FastOpacityInfo,k as FastRotationInfo,E as FastSizeInfo,H as FastSymbolUpdatesState,A as FastVisualVariables,K as VisualVariablesParameters,V as convertVisualVariables,J as evaluateModelTransform,Y as evaluateModelTransformScale,ae as getAttributeValue,q as getMaterialParameters,oe as getSizeAttributeValue,U as initFastSymbolUpdatesState,W as updateFastSymbolUpdatesState};
2
+ import{clamp as e}from"../../../../core/mathUtils.js";import{fromMat4 as t}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{identity as r,copy as i,set as a,multiply as o,scale as s,translate as c,rotateZ as l,rotateX as ee,rotateY as u}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as f,copy as p}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{ones as m,zeros as h,create as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as _}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{ones as v}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{meterIn as y}from"../../../../renderers/support/lengthUtils.js";import{isStringOrNull as b,isNumber as x}from"../../../../support/guards.js";import{debugFlags as S}from"../../support/debugFlags.js";import{olidEnabled as C}from"../../webgl-engine/effects/geometry/olidUtils.js";import{NoParameters as w}from"../../../webgl/NoParameters.js";class T{constructor(e){this.source=e}}class E extends T{constructor(e){super(e),this.minSize=[0,0,0],this.maxSize=[0,0,0],this.offset=[0,0,0],this.factor=[0,0,0],this.variables=[null,null,null],this.type=[0,0,0],this.fallback=[0,0,0],this.symbolRotationMatrix=n(),this.symbolAnchor=g()}}class D extends T{constructor(e){super(e),this.colors=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.values=[0,0,0,0,0,0,0,0],this.fallback=[0,0,0,0]}}class O extends T{constructor(e,t=0){super(e),this.fallback=t,this.values=[0,0,0,0,0,0,0,0],this.opacityValues=[0,0,0,0,0,0,0,0]}}class k extends T{constructor(e){super(e),this.offset=[0,0,0],this.factor=[1,1,1],this.type=[0,0,0]}}class A{}function j(e){return e!=null}function M(e,t){e&&e.push(t)}function N(e,t,n,r=d()){let i=e||0,a=t||0,o=n||0;return i!==0&&l(r,r,-i/180*Math.PI),a!==0&&ee(r,r,a/180*Math.PI),o!==0&&u(r,r,o/180*Math.PI),r}function P(e,t,n,r,i){let a=e.minSize,o=e.maxSize;if(t.variables[n]=e,e.useSymbolValue){let e=r.symbolSize[n];return t.minSize[n]=e,t.maxSize[n]=e,t.offset[n]=t.minSize[n],t.factor[n]=0,t.type[n]=1,!0}return j(e.field)||j(e.valueExpression)?j(e.stops)?e.stops.length===2&&x(e.stops[0].size)&&x(e.stops[1].size)?(F(e.stops[0].size,e.stops[1].size,e.stops[0].value,e.stops[1].value,t,n),t.type[n]=1,!0):(M(i,`Could not convert size info: stops only supported with 2 elements`),!1):x(a)&&x(o)&&j(e.minDataValue)&&j(e.maxDataValue)?(F(a,o,e.minDataValue,e.maxDataValue,t,n),t.type[n]=1,!0):e.valueUnit===`unknown`?(M(i,`Could not convert size info: proportional size not supported`),!1):y[e.valueUnit]==null?(M(i,`Could not convert size info: scale-dependent size not supported`),!1):(t.minSize[n]=-1/0,t.maxSize[n]=1/0,t.offset[n]=0,t.factor[n]=1/y[e.valueUnit],t.type[n]=1,!0):e.stops?.[0]&&x(e.stops[0].size)?(t.minSize[n]=e.stops[0].size,t.maxSize[n]=e.stops[0].size,t.offset[n]=t.minSize[n],t.factor[n]=0,t.type[n]=1,!0):x(a)?(t.minSize[n]=a,t.maxSize[n]=a,t.offset[n]=a,t.factor[n]=0,t.type[n]=1,!0):(M(i,`Could not convert size info: unsupported variant of sizeInfo`),!1)}function F(e,t,n,r,i,a){let o=Math.abs(r-n)>0?(t-e)/(r-n):0;i.minSize[a]=o>0?e:t,i.maxSize[a]=o>0?t:e,i.offset[a]=e-n*o,i.factor[a]=o}function te(e,t,n,r){if(e.normalizationField||e.valueRepresentation)return M(r,`Could not convert size info: unsupported property`),null;if(!b(e.field)&&!b(e.valueExpression))return M(r,`Could not convert size info: field is not a string`),null;let i=R(e);if(!t.size)t.size=new E(i),p(t.size.fallback,n.fallbackSize);else if(i){if(!t.size.source)t.size.source=i;else if(i!==t.size.source)return M(r,`Could not convert size info: multiple fields in use`),null}let a;switch(e.axis){case`width`:return a=P(e,t.size,0,n,r),a?t:null;case`height`:return a=P(e,t.size,2,n,r),a?t:null;case`depth`:return a=P(e,t.size,1,n,r),a?t:null;case`width-and-depth`:return a=P(e,t.size,0,n,r),a&&P(e,t.size,1,n,r),a?t:null;case null:case void 0:case`all`:return a=P(e,t.size,0,n,r),a&&=P(e,t.size,1,n,r),a&&=P(e,t.size,2,n,r),a?t:null;default:return M(r,`Could not convert size info: unknown axis "${e.axis}""`),null}}function ne(e,t,n){for(let n=0;n<3;++n){let r=t.unitInMeters;e.type[n]===1&&(r*=t.modelSize[n],e.type[n]=2),e.minSize[n]=e.minSize[n]/r,e.maxSize[n]=e.maxSize[n]/r,e.offset[n]=e.offset[n]/r,e.factor[n]=e.factor[n]/r}let r;if(e.type[0]!==0)r=0;else if(e.type[1]!==0)r=1;else if(e.type[2]!==0)r=2;else return M(n,`No size axis contains a valid size or scale`),!1;for(let t=0;t<3;++t)e.type[t]===0&&(e.minSize[t]=e.minSize[r],e.maxSize[t]=e.maxSize[r],e.offset[t]=e.offset[r],e.factor[t]=e.factor[r],e.type[t]=e.type[r],e.variables[t]=e.variables[r]);return!0}function I(e,t,n){e[4*t]=n.r/255,e[4*t+1]=n.g/255,e[4*t+2]=n.b/255,e[4*t+3]=n.a}function re(e,t,n,r){if(e.normalizationField)return M(r,`Could not convert color info: unsupported property`),null;let i=R(e);if(i){if(e.stops){if(e.stops.length>8)return M(r,`Could not convert color info: too many color stops`),null;t.color=new D(i);let a=e.stops;for(let e=0;e<8;++e){let n=a[Math.min(e,a.length-1)];t.color.values[e]=n.value,I(t.color.colors,e,n.color)}_(t.color.fallback,n.fallbackColor)}else return M(r,`Could not convert color info: missing stops or colors`),null}else if(e.stops&&e.stops.length>=0){let r=e.stops&&e.stops.length>=0&&e.stops[0].color;t.color=new D(null);for(let e=0;e<8;e++)t.color.values[e]=1/0,I(t.color.colors,e,r);_(t.color.fallback,n.fallbackColor)}else return M(r,`Could not convert color info: no field and no colors/stops`),null;return t}function ie(e,t,n,r){if(e.normalizationField)return M(r,`Could not convert opacity info: unsupported property`),null;let i=R(e);if(i){if(e.stops){if(e.stops.length>8)return M(r,`Could not convert opacity info: too many opacity stops`),null;t.opacity=new O(i,n.fallbackColor[3]);let a=e.stops;for(let e=0;e<8;++e){let n=a[Math.min(e,a.length-1)];t.opacity.values[e]=n.value,t.opacity.opacityValues[e]=n.opacity}}else return M(r,`Could not convert opacity info: missing stops or opacities`),null}else if(e.stops&&e.stops.length>=0){let r=e.stops&&e.stops.length>=0?e.stops[0].opacity:0;t.opacity={source:``,values:[0,0,0,0,0,0,0,0],opacityValues:[0,0,0,0,0,0,0,0],fallback:n.fallbackColor[3]};for(let e=0;e<8;e++)t.opacity.values[e]=1/0,t.opacity.opacityValues[e]=r}else return M(r,`Could not convert opacity info: no field and no opacities/stops`),null;return t}function L(e,t,n){let r=n===2&&e.rotationType===`arithmetic`;t.offset[n]=r?90:0,t.factor[n]=r?-1:1,t.type[n]=1}function R(e){return(e.cache.hasExpression?e.valueExpression:e.field)||``}function z(e,t,n){let r=R(e);if(!t.rotation)t.rotation={source:r,offset:[0,0,0],factor:[1,1,1],type:[0,0,0]};else if(r){if(!t.rotation.source)t.rotation.source=r;else if(r!==t.rotation.source)return M(n,`Could not convert rotation info: multiple fields in use`),null}switch(e.axis){case`tilt`:return L(e,t.rotation,0),t;case`roll`:return L(e,t.rotation,1),t;case null:case void 0:case`heading`:return L(e,t.rotation,2),t;default:return M(n,`Could not convert rotation info: unknown axis "${e.axis}""`),null}}class B{constructor({supports:e,modelSize:t,symbolSize:n,unitInMeters:r,anchor:i,scale:a,rotation:o,fallbackColor:s,fallbackSize:c}){this.supports=e,this.modelSize=t??m(),this.symbolSize=n??m(),this.unitInMeters=r??1,this.anchor=i??h(),this.scale=a??m(),this.rotation=o??h(),this.fallbackColor=s??v(),this.fallbackSize=c??m()}}function V(e,t,n){if(!e)return null;let r=e.reduce((e,r)=>{if(!e)return e;switch(r.type){case`size`:return t.supports.size?te(r,e,t,n):e;case`color`:return t.supports.color?re(r,e,t,n):e;case`opacity`:return t.supports.opacity?ie(r,e,t,n):null;case`rotation`:return t.supports.rotation?z(r,e,n):e;default:return null}},new A);return e.length>0&&r&&!r.size&&!r.color&&!r.opacity&&!r.rotation||r?.size&&!ne(r.size,t,n)?null:r}class H{constructor(e,t,n){this.visualVariables=e,this.materialParameters=t,this.requiresShaderTransformation=n}}function U(e,t){if(!e||C()||S.TESTS_DISABLE_FAST_UPDATES)return null;let n=V(e.visualVariables,t);return n?new H(n,q(n,t),!!n.size):null}function W(e,t,n){if(!t||!e)return!1;let r=e.visualVariables,i=V(t.visualVariables,n);return!i||!G(r.size,i.size,`size`)||!G(r.color,i.color,`color`)||!G(r.rotation,i.rotation,`rotation`)||!G(r.opacity,i.opacity,`opacity`)?!1:(e.visualVariables=i,e.materialParameters=q(i,n),e.requiresShaderTransformation=!!i.size,!0)}function G(e,t,n){if(!!e!=!!t||e&&e.source!==t?.source)return!1;if(e&&n===`rotation`){let n=e,r=t;for(let e=0;e<3;e++)if(n.type[e]!==r.type[e]||n.offset[e]!==r.offset[e]||n.factor[e]!==r.factor[e])return!1}return!0}class K extends w{constructor(e){super(),this.vvSize=e?.size??null,this.vvColor=e?.color??null,this.vvOpacity=e?.opacity??null}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}function q(e,n){let i=new K(e);return i.vvSize&&(p(i.vvSize.symbolAnchor,n.anchor),r($),N(n.rotation[2],n.rotation[0],n.rotation[1],$),t(i.vvSize.symbolRotationMatrix,$)),i}function J(e,t,n){if(!e.vvSize)return n;i(Z,n);let r=e.vvSize.symbolRotationMatrix;return a($,r[0],r[1],r[2],0,r[3],r[4],r[5],0,r[6],r[7],r[8],0,0,0,0,1),o(Z,Z,$),Y(Q,e,t),s(Z,Z,Q),c(Z,Z,e.vvSize.symbolAnchor),Z}function Y(t,n,r){if(!n.vvSize)return f(t,1,1,1),t;if(Number.isNaN(r[0]))return p(t,n.vvSize.fallback);for(let i=0;i<3;++i){let a=n.vvSize.offset[i]+r[0]*n.vvSize.factor[i];t[i]=e(a,n.vvSize.minSize[i],n.vvSize.maxSize[i])}return t}function ae(e,t){return e?.source?X(t?.input):0}function oe(e,t){if(!e?.source)return 0;for(let e=0;e<3;e++)if(t?.input[e]!=null)return X(t.input[e]);return X(void 0)}function X(e){return typeof e!=`number`||!isFinite(e)?NaN:e}const Z=d(),Q=g(),$=d();export{B as ConvertOptions,D as FastColorInfo,O as FastOpacityInfo,k as FastRotationInfo,E as FastSizeInfo,H as FastSymbolUpdatesState,A as FastVisualVariables,K as VisualVariablesParameters,V as convertVisualVariables,J as evaluateModelTransform,Y as evaluateModelTransformScale,ae as getAttributeValue,q as getMaterialParameters,oe as getSizeAttributeValue,U as initFastSymbolUpdatesState,W as updateFastSymbolUpdatesState};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{prefersReducedMotion as t}from"../../../../core/a11yUtils.js";import{createScreenPointArray as n,screenPointObjectToArray as r}from"../../../../core/screenUtils.js";import{subclass as i}from"../../../../core/accessorSupport/decorators.js";import{copy as a,distance as o}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{scaleAndAdd as s,dot as c,crossAndNormalize as l,scale as u,add as d}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as p}from"../../../../geometry/ellipsoidUtils.js";import{create as m,fromPositionAndNormal as h}from"../../../../geometry/support/plane.js";import{Sphere as g}from"../../../../geometry/support/sphere.js";import{pixelDistanceToInteractionFactor as _}from"../../camera/constraintUtils.js";import{ConstraintOptions as v}from"../../camera/constraintUtils/ConstraintOptions.js";import{InteractiveController as y}from"./InteractiveController.js";import{GroundNavigationMomentumController as b}from"./momentum/GroundNavigationMomentumController.js";import{groundNavigationConstants as x,findSphereHorizonY as S,computeHorizonPaddingLimits as C,findPlaneHorizonY as w,findGroundNavigationGrabLocation as T}from"../utils/groundNavigationUtils.js";import{OffsetCorrectionController as E}from"../utils/OffsetCorrectionController.js";import D from"../../webgl/RenderCamera.js";import{GroundNavigationMomentumEstimator as O}from"../../../navigation/GroundNavigationMomentumEstimator.js";let k=class extends y{constructor(e){super(e),this._drag=null,this._validState=!0,this._adjustedScenePoint=f(),this._momentumEstimator=new O,this._referenceSphere=new g,this._referencePlane=m(),this._tmp3d=f(),this._screenPointArray=n(),this._forwardRopeComponent=f(),this._sidewaysRopeComponent=f(),this._ropeTranslation=f(),this._beginScreenPoint=n(),this._screenPickPoint=n(),this._horizonY=null,this._horizonPadding=null,this._ropeScreenHeight=1,this._ropePlane=m(),this._pointerOverHorizonVelocityAdjustment=1,this._beginCamera=new D,this._constraintOptions=new v(15,6,0,this._beginCamera)}initialize(){this._offsetCorrectionController=new E(this.view)}stepController(e,t){this._drag&&=(this.currentCamera.copyFrom(this.startCamera),this._panningRopePull(this._drag,e),t.copyFrom(this.currentCamera),null)}get isGlobalMode(){return this.view.state.viewingMode===1}get momentumEnabled(){return this.view.navigation.momentumEnabled&&this.view.animationsEnabled&&!t()}begin(e){if(this.running){if(r(e.center,this._screenPickPoint),Math.abs(this._screenPickPoint[0]-this.view.width/2)<.1&&(this._screenPickPoint[0]+=1),a(this._beginScreenPoint,this._screenPickPoint),this.startCamera.relativeElevation>x.maxElevation){this._validState=!1;return}this._prepareGroundNavigation(),this._beginCamera.copyFrom(this.startCamera)}}update(e){this.running&&this._validState&&(this._drag=e,this.updateInteractive())}end(e){return this.finishController(),this.createMomentum()}_initHorizonValues(){this.isGlobalMode?this._globalInitHorizonValues():this._localInitHorizonValues()}_globalInitHorizonValues(){this._referenceSphere.radius=p(this.view.spatialReference).radius,this._horizonY=S(this.startCamera,this._referenceSphere,this._screenPickPoint),this._horizonPadding=this._horizonY==null?null:C(this.startCamera,this._horizonY)}_localInitHorizonValues(){let e=f();this.view.renderCoordsHelper.worldUpAtPosition(this.startCamera.eye,e);let t=f();s(t,this.startCamera.eye,e,-this.startCamera.relativeElevation),h(t,e,this._referencePlane),this._horizonY=w(this.startCamera,this._referencePlane),this._horizonPadding=C(this.startCamera,this._horizonY)}_prepareGroundNavigation(){if(this._initHorizonValues(),!this._horizonY||!this._horizonPadding)return;if(this._momentumEstimator.reset(),this._ropeScreenHeight=this.startCamera.fullHeight/this.startCamera.pixelRatio,!T({view:this.view,originalScreenPoint:this._beginScreenPoint,horizonY:this._horizonY,horizonPadding:this._horizonPadding,outTranslation:this._ropeTranslation,outGrabLocation:this._adjustedScenePoint})){this._validState=!1;return}let e=f();this.view.renderCoordsHelper.worldUpAtPosition(this.startCamera.eye,e);let t=this.startCamera.viewRight,n=c(this._ropeTranslation,t),r=l(f(),e,t),i=c(this._ropeTranslation,r);u(this._forwardRopeComponent,r,i),u(this._sidewaysRopeComponent,t,n),h(this._adjustedScenePoint,e,this._ropePlane);let a=this._ropeScreenHeight-this._beginScreenPoint[1],o=this._ropeScreenHeight-this._horizonPadding[0];this._pointerOverHorizonVelocityAdjustment=o===0?1:Math.max(a/o,1)}_panningRopePull(e,t){if(!this._horizonY||!this._horizonPadding)return;let n=r(e.center,this._screenPointArray),i=this.startCamera.fullWidth/this.startCamera.pixelRatio*.5,a=(this._ropeScreenHeight-n[1])/(this._ropeScreenHeight-this._beginScreenPoint[1]),c=1-a,l=(n[0]-i)/(this._beginScreenPoint[0]-i),f=c*x.ySpeedMultiplier*this._pointerOverHorizonVelocityAdjustment,p=(c*x.xSpeedMultiplier+a*((1-l)*x.xSpeedMultiplier))*this._pointerOverHorizonVelocityAdjustment;u(this._ropeTranslation,this._forwardRopeComponent,f),s(this._ropeTranslation,this._ropeTranslation,this._sidewaysRopeComponent,p),this.currentCamera.eye=d(this._tmp3d,this.startCamera.eye,this._ropeTranslation),this.currentCamera.center=d(this._tmp3d,this.startCamera.center,this._ropeTranslation),this.momentumEnabled&&this._momentumEstimator.update(n,this._ropeTranslation,e.timestamp*.001),this._constraintOptions.interactionFactor=_(o(this._beginScreenPoint,n)),this._constraintOptions.interactionDirection=this._ropeTranslation,this._offsetCorrectionController.smoothlyCorrectGroundElevation(this.currentCamera,t,this._constraintOptions),this._constraintOptions.interactionDirection=null}createMomentum(){let e=this.momentumEnabled&&this._momentumEstimator.createMomentum();return e?new b({view:this.view,momentum:e}):null}};k=e([i(`esri.views.3d.state.controllers.GroundNavigationController`)],k);export{k as GroundNavigationController};
2
+ import{__decorate as e}from"tslib";import{prefersReducedMotion as t}from"../../../../core/a11yUtils.js";import{createScreenPointArray as n,screenPointObjectToArray as r}from"../../../../core/screenUtils.js";import{subclass as i}from"../../../../core/accessorSupport/decorators.js";import{copy as a,distance as o}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{scaleAndAdd as s,dot as c,crossAndNormalize as l,scale as u,add as d}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as p}from"../../../../geometry/ellipsoidUtils.js";import{create as m,fromPositionAndNormal as h}from"../../../../geometry/support/plane.js";import{Sphere as g}from"../../../../geometry/support/sphere.js";import{pixelDistanceToInteractionFactor as _}from"../../camera/constraintUtils.js";import{ConstraintOptions as v}from"../../camera/constraintUtils/ConstraintOptions.js";import{InteractiveController as y}from"./InteractiveController.js";import{GroundNavigationMomentumController as b}from"./momentum/GroundNavigationMomentumController.js";import{findSphereHorizonY as x,computeHorizonPaddingLimits as S,findPlaneHorizonY as C,findGroundNavigationGrabLocation as w,groundNavigationConstants as T}from"../utils/groundNavigationUtils.js";import{OffsetCorrectionController as E}from"../utils/OffsetCorrectionController.js";import D from"../../webgl/RenderCamera.js";import{GroundNavigationMomentumEstimator as O}from"../../../navigation/GroundNavigationMomentumEstimator.js";let k=class extends y{constructor(e){super(e),this._drag=null,this._validState=!0,this._adjustedScenePoint=f(),this._momentumEstimator=new O,this._referenceSphere=new g,this._referencePlane=m(),this._tmp3d=f(),this._screenPointArray=n(),this._forwardRopeComponent=f(),this._sidewaysRopeComponent=f(),this._ropeTranslation=f(),this._beginScreenPoint=n(),this._screenPickPoint=n(),this._horizonY=null,this._horizonPadding=null,this._ropeScreenHeight=1,this._ropePlane=m(),this._pointerOverHorizonVelocityAdjustment=1,this._forceStayAboveGround=!1,this._beginCamera=new D,this._constraintOptions=new v(15,6,0,this._beginCamera)}initialize(){this._offsetCorrectionController=new E(this.view)}stepController(e,t){this._drag&&=(this.currentCamera.copyFrom(this.startCamera),this._panningRopePull(this._drag,e),t.copyFrom(this.currentCamera),null)}get isGlobalMode(){return this.view.state.viewingMode===1}get momentumEnabled(){return this.view.navigation.momentumEnabled&&this.view.animationsEnabled&&!t()}begin(e){this.running&&(r(e.center,this._screenPickPoint),Math.abs(this._screenPickPoint[0]-this.view.width/2)<.1&&(this._screenPickPoint[0]+=1),a(this._beginScreenPoint,this._screenPickPoint),this._prepareGroundNavigation(),this._beginCamera.copyFrom(this.startCamera))}update(e){this.running&&this._validState&&(this._drag=e,this.updateInteractive())}end(e){return this.finishController(),this.createMomentum()}_initHorizonValues(){this.isGlobalMode?this._globalInitHorizonValues():this._localInitHorizonValues()}_globalInitHorizonValues(){this._referenceSphere.radius=p(this.view.spatialReference).radius,this._horizonY=x(this.startCamera,this._referenceSphere,this._screenPickPoint),this._horizonPadding=this._horizonY==null?null:S(this.startCamera,this._horizonY)}_localInitHorizonValues(){let e=f();this.view.renderCoordsHelper.worldUpAtPosition(this.startCamera.eye,e);let t=f();s(t,this.startCamera.eye,e,-this.startCamera.relativeElevation),h(t,e,this._referencePlane),this._horizonY=C(this.startCamera,this._referencePlane),this._horizonPadding=S(this.startCamera,this._horizonY)}_prepareGroundNavigation(){if(this._initHorizonValues(),!this._horizonY||!this._horizonPadding)return;if(this._momentumEstimator.reset(),this._ropeScreenHeight=this.startCamera.fullHeight/this.startCamera.pixelRatio,!w({view:this.view,originalScreenPoint:this._beginScreenPoint,horizonY:this._horizonY,horizonPadding:this._horizonPadding,outTranslation:this._ropeTranslation,outGrabLocation:this._adjustedScenePoint})){this._validState=!1;return}let e=f();this.view.renderCoordsHelper.worldUpAtPosition(this.startCamera.eye,e);let t=this.startCamera.viewRight,n=c(this._ropeTranslation,t),r=l(f(),e,t),i=c(this._ropeTranslation,r);u(this._forwardRopeComponent,r,i),u(this._sidewaysRopeComponent,t,n),h(this._adjustedScenePoint,e,this._ropePlane);let a=this._ropeScreenHeight-this._beginScreenPoint[1],o=this._ropeScreenHeight-this._horizonPadding[0];this._pointerOverHorizonVelocityAdjustment=o===0?1:Math.max(a/o,1),this._forceStayAboveGround=this.view.groundView.baseOpacity>0&&this.view.state.camera.relativeElevation>=0&&this.view.navigation.mode.offset!=null}_panningRopePull(e,t){if(!this._horizonY||!this._horizonPadding)return;let n=r(e.center,this._screenPointArray),i=this.startCamera.fullWidth/this.startCamera.pixelRatio*.5,a=(this._ropeScreenHeight-n[1])/(this._ropeScreenHeight-this._beginScreenPoint[1]),c=1-a,l=(n[0]-i)/(this._beginScreenPoint[0]-i),f=c*T.ySpeedMultiplier*this._pointerOverHorizonVelocityAdjustment,p=(c*T.xSpeedMultiplier+a*((1-l)*T.xSpeedMultiplier))*this._pointerOverHorizonVelocityAdjustment;u(this._ropeTranslation,this._forwardRopeComponent,f),s(this._ropeTranslation,this._ropeTranslation,this._sidewaysRopeComponent,p),this.currentCamera.eye=d(this._tmp3d,this.startCamera.eye,this._ropeTranslation),this.currentCamera.center=d(this._tmp3d,this.startCamera.center,this._ropeTranslation),this.momentumEnabled&&this._momentumEstimator.update(n,this._ropeTranslation,e.timestamp*.001),this._constraintOptions.interactionFactor=_(o(this._beginScreenPoint,n)),this._constraintOptions.interactionDirection=this._ropeTranslation,this._offsetCorrectionController.smoothlyCorrectGroundElevation({camera:this.currentCamera,deltaTime:t,constraintOptions:this._constraintOptions,forceStayAboveGround:this._forceStayAboveGround}),this._constraintOptions.interactionDirection=null}createMomentum(){let e=this.momentumEnabled&&this._momentumEstimator.createMomentum();return e?new b({view:this.view,momentum:e,forceStayAboveGround:this._forceStayAboveGround}):null}};k=e([i(`esri.views.3d.state.controllers.GroundNavigationController`)],k);export{k as GroundNavigationController};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{Seconds as t}from"../../../../../core/time.js";import{property as n,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{scale as i,add as a}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{MomentumController as s}from"./MomentumController.js";import{OffsetCorrectionController as c}from"../../utils/OffsetCorrectionController.js";let l=class extends s{constructor(e){super(e),this.interactionType=6,this._tmpPan=o(),this._lastUpdateTime=0,this._remainingGroundCorrection=0}initialize(){this._offsetCorrectionController=new c(this.view)}momentumStep(e,n){let r=this.momentum.value(e);i(this._tmpPan,this.momentum.direction,r),n.eye=a(u,n.eye,this._tmpPan),n.center=a(u,n.center,this._tmpPan);let o=t(e-this._lastUpdateTime);this.constraintOptions.interactionDirection=this._tmpPan,this._remainingGroundCorrection=this._offsetCorrectionController.smoothlyCorrectGroundElevation(n,o),this._lastUpdateTime=e}get finished(){return super.finished&&this._remainingGroundCorrection<=.01}};e([n({constructOnly:!0})],l.prototype,`momentum`,void 0),l=e([r(`esri.views.3d.state.controllers.momentum.GroundNavigationMomentumController`)],l);const u=o();export{l as GroundNavigationMomentumController};
2
+ import{__decorate as e}from"tslib";import{Seconds as t}from"../../../../../core/time.js";import{property as n,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{scale as i,add as a}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{MomentumController as s}from"./MomentumController.js";import{OffsetCorrectionController as c}from"../../utils/OffsetCorrectionController.js";let l=class extends s{constructor(e){super(e),this.forceStayAboveGround=!1,this.interactionType=6,this._tmpPan=o(),this._lastUpdateTime=0,this._remainingGroundCorrection=0}initialize(){this._offsetCorrectionController=new c(this.view)}momentumStep(e,n){let r=this.momentum.value(e);i(this._tmpPan,this.momentum.direction,r),n.eye=a(u,n.eye,this._tmpPan),n.center=a(u,n.center,this._tmpPan);let o=t(e-this._lastUpdateTime);this.constraintOptions.interactionDirection=this._tmpPan,this._remainingGroundCorrection=this._offsetCorrectionController.smoothlyCorrectGroundElevation({camera:n,deltaTime:o,forceStayAboveGround:this.forceStayAboveGround}),this._lastUpdateTime=e}get finished(){return super.finished&&this._remainingGroundCorrection<=.01}};e([n({constructOnly:!0})],l.prototype,`momentum`,void 0),e([n()],l.prototype,`forceStayAboveGround`,void 0),l=e([r(`esri.views.3d.state.controllers.momentum.GroundNavigationMomentumController`)],l);const u=o();export{l as GroundNavigationMomentumController};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{clamp as e}from"../../../../core/mathUtils.js";import{dot as t,distance as n,subtract as r,scale as i,add as a,copy as o,normalize as s,cross as c,scaleAndAdd as l}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as u,clone as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as f}from"../../../../geometry/support/ray.js";import{applyConstraintsAndUpdateCenterRenderCamera as p}from"../../camera/constraintUtils.js";import{Intersector as m}from"../../webgl-engine/lib/Intersector.js";const h=.5,g=new Set([0,2,8]),_=new Set(g).add(7);class v{constructor(e){this._view=e,this._tmpRay=f(),this._tmpWorldUp=u(),this._tmpScaledUp=u(),this._tmpCorrectionOffset=u(),this._tmpUpdatedCameraPos=u(),this._tmpCenterDiff=u(),this._tmpMovementDelta=u(),this._tmpPerpendicularMovementDelta=u(),this._tmpGroundIntersections=[u(),u(),u()],this._tmpGroundIntersectionHits=[!1,!1,!1],this._tmpRayOrigins=[u(),u(),u()],this._tmpRayDirection=u(),this._previousCameraPosition=null,this._intersector=new m(this._view.state.viewingMode),this._intersector.options.invisibleTerrain=!0}smoothlyCorrectGroundElevation(e,n,r,i){let a=this._prepareMode(i);if(!a)return 0;let o=this._view.renderCoordsHelper.worldUpAtPosition(e.eye,this._tmpWorldUp),s=this._prepareCameraAndPreviousIterationPosition(e,o,this._previousCameraPosition),c=this._prepareRays(e,o,s),l=this._intersectRays(a,o,c);if(!l.hasIntersection){let t=this._adjustCameraElevation(e,o,0,r);return this._previousCameraPosition=d(t),0}let u=this._filterRayResults(o,s,l),f=this._getSmoothedElevationCorrection(a,u,e,o,s,n),p=this._adjustCameraElevation(e,o,f,r);return this._previousCameraPosition=d(p),Math.abs(u-t(p,o))}immediatelyCorrectGroundElevation(e,i=1/0,a,o){let s=this._prepareMode(o);if(!s)return;let c=this._view.renderCoordsHelper.worldUpAtPosition(e.eye,this._tmpWorldUp),l=this._prepareRays(e,c),u=this._intersectRays(s,c,l),d=u.intersections[0];if(!u.hasIntersection||n(e.eye,d)>i){this._adjustCameraElevation(e,c,0,a);return}this._adjustCameraElevation(e,c,t(c,r(this._tmpCorrectionOffset,d,e.eye)),a)}_prepareMode(e){let t=e??this._view.navigation.mode;return t.type!==`ground`||!t.offset?null:t}_prepareCameraAndPreviousIterationPosition(e,n,r){if(r){let o=t(n,e.eye),s=t(n,r);return i(this._tmpCorrectionOffset,n,s-o),e.eye=a(this._tmpUpdatedCameraPos,e.eye,this._tmpCorrectionOffset),e.center=a(this._tmpUpdatedCameraPos,e.center,this._tmpCorrectionOffset),r}return e.eye}_prepareRays(e,t,n){let r=i(this._tmpRayDirection,t,-1e5);if(o(this._tmpRayOrigins[0],e.eye),!n)return{origins:this._tmpRayOrigins,direction:r,count:1};let{forwardMovementDirection:a,rightMovementDirection:s}=this._getMovementDirections(e.eye,n,t);return this._getLeftRayOrigin(e.eye,a,s,this._tmpRayOrigins[1]),this._getRightRayOrigin(e.eye,a,s,this._tmpRayOrigins[2]),{origins:this._tmpRayOrigins,direction:r,count:this._tmpRayOrigins.length}}_getMovementDirections(e,n,a){let o=r(this._tmpMovementDelta,e,n);return r(o,o,i(this._tmpScaledUp,a,t(a,o))),s(o,o),{forwardMovementDirection:o,rightMovementDirection:c(this._tmpPerpendicularMovementDelta,o,a)}}_getLeftRayOrigin(e,t,n,r){return l(r,e,t,h),l(r,r,n,-.5),r}_getRightRayOrigin(e,t,n,r){return l(r,e,t,h),l(r,r,n,h),r}_intersectRays(e,t,r){let i=e.offset,a=this._view.sceneIntersectionHelper,s=y(e,this._view.groundView.baseOpacity===0);o(this._tmpRay.direction,r.direction);for(let e=0;e<r.count;e++)o(this._tmpRay.origin,r.origins[e]),this._tmpGroundIntersectionHits[e]=a.intersectRay(this._tmpRay,this._intersector,this._tmpGroundIntersections[e],s),this._tmpGroundIntersectionHits[e]&&n(this._tmpGroundIntersections[e],this._tmpRay.origin)>1e5&&(this._tmpGroundIntersectionHits[e]=!1),this._tmpGroundIntersectionHits[e]&&l(this._tmpGroundIntersections[e],this._tmpGroundIntersections[e],t,i);let c=this._tmpGroundIntersectionHits.some((e,t)=>t<r.count&&e);return{intersections:this._tmpGroundIntersections,hits:this._tmpGroundIntersectionHits,count:r.count,hasIntersection:c}}_filterRayResults(e,n,r){let i=t(n,e),a=null;for(let n=0;n<r.count;n++){if(!r.hits[n])continue;let o=r.intersections[n],s=t(o,e);(a==null||Math.abs(s-i)<Math.abs(a-i))&&(a=s)}return a}_getSmoothedElevationCorrection(r,i,a,o,s,c){let l=n(a.eye,s)/c,u=1+Math.max(0,(l-5)*.03),d=(u*1e-5)**c,f=t(s,o)*d+i*(1-d),p=t(a.eye,o),m=u*5*c*(r.offset??0),h=f-p;return e(h,-m,m)}_adjustCameraElevation(e,t,n,i){return n!==0&&(l(this._tmpUpdatedCameraPos,e.eye,t,n),r(this._tmpCenterDiff,e.center,e.eye),e.eye=this._tmpUpdatedCameraPos,e.center=a(this._tmpUpdatedCameraPos,this._tmpUpdatedCameraPos,this._tmpCenterDiff)),p(this._view,e,i),e.eye}}function y(e,t){return b(e.include)?{include:e.include,exclude:e.exclude}:{exclude:e.exclude,objectFilter:e=>!!e.lastValidElevationBB,allowedIntersectorTypes:t?g:_}}function b(e){return e!=null&&e.size>0}export{v as OffsetCorrectionController};
2
+ import{clamp as e}from"../../../../core/mathUtils.js";import{dot as t,distance as n,subtract as r,scale as i,add as a,copy as o,normalize as s,cross as c,scaleAndAdd as l}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as u,clone as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as f}from"../../../../geometry/support/ray.js";import p from"../../../../ground/NavigationConstraint.js";import{applyConstraintsAndUpdateCenterRenderCamera as m}from"../../camera/constraintUtils.js";import{Intersector as h}from"../../webgl-engine/lib/Intersector.js";const g=.5,_=new Set([0,2,8]),v=new Set(_).add(7);class y{constructor(e){this._view=e,this._tmpRay=f(),this._tmpWorldUp=u(),this._tmpScaledUp=u(),this._tmpCorrectionOffset=u(),this._tmpUpdatedCameraPos=u(),this._tmpCenterDiff=u(),this._tmpMovementDelta=u(),this._tmpPerpendicularMovementDelta=u(),this._tmpGroundIntersections=[u(),u(),u()],this._tmpGroundIntersectionHits=[!1,!1,!1],this._tmpRayOrigins=[u(),u(),u()],this._tmpRayDirection=u(),this._previousCameraPosition=null,this._intersector=new h(this._view.state.viewingMode),this._intersector.options.invisibleTerrain=!0}smoothlyCorrectGroundElevation(e){let{camera:n,deltaTime:r,constraintOptions:i,navigationModeOverride:a,forceStayAboveGround:o}=e,s=this._prepareMode(a);if(!s||!r)return 0;let c=this._view.renderCoordsHelper.worldUpAtPosition(n.eye,this._tmpWorldUp),l=this._prepareCameraAndPreviousIterationPosition(n,c,this._previousCameraPosition),u=this._prepareRays(n,c,l),f=this._intersectRays(s,c,u);if(!f.hasIntersection){let e=this._adjustCameraElevation(n,c,0,o,i);return this._previousCameraPosition=d(e),0}let p=this._filterRayResults(c,l,f),m=this._getSmoothedElevationCorrection(s,p,n,c,l,r),h=this._adjustCameraElevation(n,c,m,o,i);return this._previousCameraPosition=d(h),Math.abs(p-t(h,c))}immediatelyCorrectGroundElevation(e){let{camera:i,constraintOptions:a,navigationModeOverride:o,correctionLimit:s}=e,c=this._prepareMode(o);if(!c)return;let l=this._view.renderCoordsHelper.worldUpAtPosition(i.eye,this._tmpWorldUp),u=this._prepareRays(i,l),d=this._intersectRays(c,l,u),f=d.intersections[0];if(!d.hasIntersection||n(i.eye,f)>(s??1/0)){this._adjustCameraElevation(i,l,0,!1,a);return}this._adjustCameraElevation(i,l,t(l,r(this._tmpCorrectionOffset,f,i.eye)),!1,a)}_prepareMode(e){let t=e??this._view.navigation.mode;return t.type!==`ground`||!t.offset?null:t}_prepareCameraAndPreviousIterationPosition(e,n,r){if(r){let o=t(n,e.eye),s=t(n,r);return i(this._tmpCorrectionOffset,n,s-o),e.eye=a(this._tmpUpdatedCameraPos,e.eye,this._tmpCorrectionOffset),e.center=a(this._tmpUpdatedCameraPos,e.center,this._tmpCorrectionOffset),r}return e.eye}_prepareRays(e,t,n){let r=i(this._tmpRayDirection,t,-1e5);if(o(this._tmpRayOrigins[0],e.eye),!n)return{origins:this._tmpRayOrigins,direction:r,count:1};let{forwardMovementDirection:a,rightMovementDirection:s}=this._getMovementDirections(e.eye,n,t);return this._getLeftRayOrigin(e.eye,a,s,this._tmpRayOrigins[1]),this._getRightRayOrigin(e.eye,a,s,this._tmpRayOrigins[2]),{origins:this._tmpRayOrigins,direction:r,count:this._tmpRayOrigins.length}}_getMovementDirections(e,n,a){let o=r(this._tmpMovementDelta,e,n);return r(o,o,i(this._tmpScaledUp,a,t(a,o))),s(o,o),{forwardMovementDirection:o,rightMovementDirection:c(this._tmpPerpendicularMovementDelta,o,a)}}_getLeftRayOrigin(e,t,n,r){return l(r,e,t,g),l(r,r,n,-.5),r}_getRightRayOrigin(e,t,n,r){return l(r,e,t,g),l(r,r,n,g),r}_intersectRays(e,t,r){let i=e.offset,a=this._view.sceneIntersectionHelper,s=b(e,this._view.groundView.baseOpacity===0);o(this._tmpRay.direction,r.direction);for(let e=0;e<r.count;e++)o(this._tmpRay.origin,r.origins[e]),this._tmpGroundIntersectionHits[e]=a.intersectRay(this._tmpRay,this._intersector,this._tmpGroundIntersections[e],s),this._tmpGroundIntersectionHits[e]&&n(this._tmpGroundIntersections[e],this._tmpRay.origin)>1e5&&(this._tmpGroundIntersectionHits[e]=!1),this._tmpGroundIntersectionHits[e]&&l(this._tmpGroundIntersections[e],this._tmpGroundIntersections[e],t,i);let c=this._tmpGroundIntersectionHits.some((e,t)=>t<r.count&&e);return{intersections:this._tmpGroundIntersections,hits:this._tmpGroundIntersectionHits,count:r.count,hasIntersection:c}}_filterRayResults(e,n,r){let i=t(n,e),a=null;for(let n=0;n<r.count;n++){if(!r.hits[n])continue;let o=r.intersections[n],s=t(o,e);(a==null||Math.abs(s-i)<Math.abs(a-i))&&(a=s)}return a}_getSmoothedElevationCorrection(r,i,a,o,s,c){let l=n(a.eye,s)/c,u=1+Math.max(0,(l-5)*.03),d=(u*1e-5)**c,f=t(s,o)*d+i*(1-d),p=t(a.eye,o),m=u*5*c*(r.offset??0),h=f-p;return e(h,-m,m)}_adjustCameraElevation(e,t,n,i,o){n!==0&&(l(this._tmpUpdatedCameraPos,e.eye,t,n),r(this._tmpCenterDiff,e.center,e.eye),e.eye=this._tmpUpdatedCameraPos,e.center=a(this._tmpUpdatedCameraPos,this._tmpUpdatedCameraPos,this._tmpCenterDiff));let s=this._view.map.ground.navigationConstraint;return i&&s?.type!==`stay-above`?(this._view.map.ground.navigationConstraint=new p({type:`stay-above`}),m(this._view,e,o),this._view.map.ground.navigationConstraint=s):m(this._view,e,o),e.eye}}function b(e,t){return x(e.include)?{include:e.include,exclude:e.exclude}:{exclude:e.exclude,objectFilter:e=>!!e.lastValidElevationBB,allowedIntersectorTypes:t?_:v}}function x(e){return e!=null&&e.size>0}export{y as OffsetCorrectionController};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../../../core/Logger.js";import{createScreenPointArray as t}from"../../../../core/screenUtils.js";import{distance as n,normalize as r,cross as i,add as a,crossAndNormalize as o,subtract as s,dot as c,scaleAndAdd as l,scale as u,copy as d,length as f}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as m}from"../../../../geometry/ellipsoidUtils.js";import{fromValues as h}from"../../../../geometry/support/lineSegment.js";import{create as g,fromPositionAndNormal as _,distance as v,projectPoint as y,projectVector as b,intersectLineSegment as x}from"../../../../geometry/support/plane.js";import{create as S}from"../../../../geometry/support/ray.js";import{Sphere as C}from"../../../../geometry/support/sphere.js";import{fromRenderCamera as w}from"../../webgl.js";import{getVoxelWasm as T}from"../../layers/VoxelWasm.js";import{pickPointAndInitSphere as E,sphereOrPlanePointFromScreenPoint as D,intersectPlaneFromScreenPoint as O,searchAreaSize as k}from"./navigationUtils.js";import{OffsetCorrectionController as ee}from"./OffsetCorrectionController.js";import{fromScreenAtEye as te}from"../../support/geometryUtils/ray.js";import ne from"../../webgl/RenderCamera.js";import{Intersector as A}from"../../webgl-engine/lib/Intersector.js";const j=1.5,M={xSpeedMultiplier:j,ySpeedMultiplier:j,maxElevation:1e4,relativeHorizonPadding:.1,minimumHorizonPadding:12},N=p(),P=p(),re=t(),F=p(),I=g(),L=p(),R=p(),z=p(),B=p(),V=p(),ie=p(),H=p(),U=p(),W=p(),G=p(),K=t(),q=S(),J=new C,Y=p(),ae=g(),X=p(),oe=p();function se(e,t){return b(t,e.viewForward,N),a(P,e.eye,N),e.projectToScreen(P,re),re[1]}function ce(e,t,d){let f=e.eye;if(n(t.center,f)<t.radius)return r(V,f),i(ie,V,e.viewRight),a(P,f,ie),e.projectToScreen(P,K),K[1];let p=e.up;te(e,d,q);let m=t.radius;if(o(F,p,q.direction),_(f,F,I),v(I,t.center)>m)return null;y(I,t.center,L);let h=n(t.center,L),g=Math.sqrt(m**2-h**2);s(R,f,L),r(z,R),o(B,F,z);let b=c(R,z),x=c(R,B),S=Math.sqrt(b**2+x**2),C=Math.sqrt(S**2-g**2),w=g**2/S**2,T=g/S**2*C,E=w*b,D=T*-x,O=w*x,k=T*b,ee=E+D,ne=E-D,A=O+k,j=O-k;return a(H,L,l(H,u(H,z,ee),B,A)),a(U,L,l(U,u(U,z,ne),B,j)),s(W,H,f),r(W,W),s(G,U,f),r(G,G),c(e.viewForward,W)>=c(e.viewForward,G)?e.projectToScreen(H,K):e.projectToScreen(U,K),K[1]}function le(e,t,n=!0){return n?e<t:e<=t}function Z(e,t,n=!0){return n?e>t:e>=t}function ue(e,t,n){return t?e>n:e<n}function Q(e,t){let n=e.fullHeight/e.pixelRatio,r=Math.max(t,n-t);return Math.max(M.minimumHorizonPadding,M.relativeHorizonPadding*r)}function de(e,t){return[fe(e,t),pe(e,t)]}function fe(e,t){let n=e.fullHeight/e.pixelRatio;return Math.min(n,t+Q(e,t))}function pe(e,t){return Math.max(0,t-Q(e,t))}function me(e,t,n){let r={translation:e,location:t};return n&&(r.normal=n),r}function he(e){let{view:t}=e;return t.viewingMode===`global`?ge(e):_e(e)}function ge(e){let{view:t,originalScreenPoint:i,horizonY:a,horizonPadding:o,outTranslation:s,outGrabLocation:c,outGrabNormal:l,intersectionOptions:u,depthSearchSize:f}=e,p=t.state.camera,h=me(s,c,l);J.radius=m(t.spatialReference).radius;let g=E(t,p,i,J.radius,1,u);if(g.scenePickPoint==null)return!1;let _=g.hasGeometryIntersection;d(Y,g.scenePickPoint),d(h.location,Y);let v=g.sphere;h.normal&&g.normal&&d(h.normal,g.normal);let y=ye(i,a,o,_),b=_?n(Y,p.eye):1/0;return y.wasAdjusted&&be({view:t,screenAdjustment:y,intersector:$(t),fallbackCheck:(e,t,n)=>{let i=D(v,p,e,t);return i&&n&&r(n,t),i},output:h,intersectionOptions:u}),Se({view:t,screenPoint:y.adjustedScreenPoint,camera:p,initialDistance:b,depthSearchSize:f??k,output:h}),!0}function _e(e){let{view:t,originalScreenPoint:i,horizonY:a,horizonPadding:o,outTranslation:s,outGrabLocation:c,outGrabNormal:u,intersectionOptions:f,depthSearchSize:p}=e,m=t.sceneIntersectionHelper,h=t.state.camera,g=$(t),v=me(s,c,u);m.intersectIntersectorScreen(i,g,f);let y=g.results.min.getIntersectionPoint(Y),b=y?n(Y,h.eye):1/0;y&&(d(v.location,Y),v.normal&&d(v.normal,g.results.min.normal)),t.renderCoordsHelper.worldUpAtPosition(h.eye,V),l(X,h.eye,V,-h.relativeElevation),_(X,V,ae);let x=ye(i,a,o,y);return x.wasAdjusted&&be({view:t,screenAdjustment:x,intersector:g,fallbackCheck:(e,t,n)=>{let i=O(ae,h,e,t);return i&&n&&r(n,V),i},output:v,intersectionOptions:f}),Se({view:t,screenPoint:x.adjustedScreenPoint,camera:h,initialDistance:b,depthSearchSize:p??k,output:v}),!0}function ve(e,t,n,r){return!r&&le(e,t)||r&&ue(e,!1,n[0])?n[0]:!r&&Z(e,t,!1)?n[1]:null}function ye(e,n,r,i){let a=ve(e[1],n,r,i);return{originalScreenPoint:e,adjustedScreenPoint:t(e[0],a??e[1]),horizonY:n,horizonPadding:r,wasAdjusted:a!==null}}function $(e){let t=new A(e.state.viewingMode);return t.options.selectionMode=!0,t.options.store=0,t.options.hud=!1,t.options.normalRequired=!0,t}function be(e){let{view:t,screenAdjustment:n,fallbackCheck:r,intersector:i,output:a,intersectionOptions:o}=e,s=t.sceneIntersectionHelper;s.intersectIntersectorScreen(n.adjustedScreenPoint,i,{...o,requiresGroundFeedback:!0});let c=i.results.min.getIntersectionPoint(a.location);if(c){a.normal&&d(a.normal,i.results.min.normal);return}let l=xe(n);if(s.intersectIntersectorScreen(l,i,{...o,requiresGroundFeedback:!0}),c=i.results.min.getIntersectionPoint(a.location),c){a.normal&&d(a.normal,i.results.min.normal);return}c=r(n.adjustedScreenPoint,a.location,a.normal),!c&&r(l,a.location,a.normal)}function xe(e){let{originalScreenPoint:n,adjustedScreenPoint:r,horizonY:i,horizonPadding:a}=e,o=Z(r[1],i)?Math.min(a[1],n[1]):Math.max(a[0],n[1]);return t(r[0],o)}function Se(e){Ce(e),we(e)}function Ce(e){let{view:t,camera:n,output:r}=e,{offset:i}=t.navigation.mode;if(!i)return;let{translation:a,location:o}=r;t.renderCoordsHelper.worldUpAtPosition(n.eye,V),l(X,n.eye,V,-i),_(X,V,I),x(I,h(n.eye,s(N,o,n.eye)),X)&&(d(o,X),s(a,o,n.eye))}function we(e){let{view:t,screenPoint:n,camera:i,initialDistance:o,depthSearchSize:c,output:l}=e,d=c>0?t.stage.renderView.getMinimalDepthForArea(T(t),n[0],n[1],i,c):null;s(l.translation,l.location,i.eye);let p=Math.min(f(l.translation),o);d&&d<=p&&(p=d),r(l.translation,l.translation),u(l.translation,l.translation,p),a(l.location,l.translation,i.eye)}async function Te(t,r){if(t.navigation.mode.type!==`ground`){e.getLogger(`esri`).warn(`Can only advance while in ground navigation mode!`);return}let{camera:i}=t.state;t.renderCoordsHelper.worldUpAtPosition(i.eye,V);let c=t.sceneIntersectionHelper,l=$(t),p=o(N,V,i.viewRight);d(q.origin,i.eye),u(q.direction,p,r);let m=c.intersectRay(q,l,Y),h=new ne().copyFrom(i),g=s(oe,i.center,i.eye);return!m||n(Y,i.eye)>r?h.eye=a(N,q.origin,q.direction):(s(N,Y,i.eye),f(N)>2&&(Ee(N,N,.25,2),h.eye=a(N,i.eye,N))),h.center=a(N,h.eye,g),new ee(t).immediatelyCorrectGroundElevation(h,100),t.goTo(w(t,h),{duration:500,liftOffDisabled:!0})}function Ee(e,t,n,r){let i=f(e),a=Math.min(n,Math.max(i-r,0)/i);u(t,e,a)}export{Q as computeHorizonPadding,de as computeHorizonPaddingLimits,he as findGroundNavigationGrabLocation,se as findPlaneHorizonY,ce as findSphereHorizonY,Te as groundNavigationAdvance,M as groundNavigationConstants,le as isAboveHorizon,Z as isBelowHorizon,Ee as shortenTranslation,ue as shouldClampScreenY};
2
+ import e from"../../../../core/Logger.js";import{createScreenPointArray as t}from"../../../../core/screenUtils.js";import{distance as n,normalize as r,cross as i,add as a,crossAndNormalize as o,subtract as s,dot as c,scaleAndAdd as l,scale as u,copy as d,length as f}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as m}from"../../../../geometry/ellipsoidUtils.js";import{fromValues as h}from"../../../../geometry/support/lineSegment.js";import{create as g,fromPositionAndNormal as _,distance as v,projectPoint as y,projectVector as b,intersectLineSegment as x}from"../../../../geometry/support/plane.js";import{create as S}from"../../../../geometry/support/ray.js";import{Sphere as C}from"../../../../geometry/support/sphere.js";import{fromRenderCamera as w}from"../../webgl.js";import{getVoxelWasm as T}from"../../layers/VoxelWasm.js";import{pickPointAndInitSphere as E,sphereOrPlanePointFromScreenPoint as D,intersectPlaneFromScreenPoint as O,searchAreaSize as k}from"./navigationUtils.js";import{OffsetCorrectionController as ee}from"./OffsetCorrectionController.js";import{fromScreenAtEye as te}from"../../support/geometryUtils/ray.js";import ne from"../../webgl/RenderCamera.js";import{Intersector as A}from"../../webgl-engine/lib/Intersector.js";const j=1.5,M={xSpeedMultiplier:j,ySpeedMultiplier:j,maxElevation:1e4,relativeHorizonPadding:.1,minimumHorizonPadding:12},N=p(),P=p(),re=t(),F=p(),I=g(),L=p(),R=p(),z=p(),B=p(),V=p(),ie=p(),H=p(),U=p(),W=p(),G=p(),K=t(),q=S(),J=new C,Y=p(),ae=g(),X=p(),oe=p();function se(e,t){return b(t,e.viewForward,N),a(P,e.eye,N),e.projectToScreen(P,re),re[1]}function ce(e,t,d){let f=e.eye;if(n(t.center,f)<t.radius)return r(V,f),i(ie,V,e.viewRight),a(P,f,ie),e.projectToScreen(P,K),K[1];let p=e.up;te(e,d,q);let m=t.radius;if(o(F,p,q.direction),_(f,F,I),v(I,t.center)>m)return null;y(I,t.center,L);let h=n(t.center,L),g=Math.sqrt(m**2-h**2);s(R,f,L),r(z,R),o(B,F,z);let b=c(R,z),x=c(R,B),S=Math.sqrt(b**2+x**2),C=Math.sqrt(S**2-g**2),w=g**2/S**2,T=g/S**2*C,E=w*b,D=T*-x,O=w*x,k=T*b,ee=E+D,ne=E-D,A=O+k,j=O-k;return a(H,L,l(H,u(H,z,ee),B,A)),a(U,L,l(U,u(U,z,ne),B,j)),s(W,H,f),r(W,W),s(G,U,f),r(G,G),c(e.viewForward,W)>=c(e.viewForward,G)?e.projectToScreen(H,K):e.projectToScreen(U,K),K[1]}function le(e,t,n=!0){return n?e<t:e<=t}function Z(e,t,n=!0){return n?e>t:e>=t}function ue(e,t,n){return t?e>n:e<n}function Q(e,t){let n=e.fullHeight/e.pixelRatio,r=Math.max(t,n-t);return Math.max(M.minimumHorizonPadding,M.relativeHorizonPadding*r)}function de(e,t){return[fe(e,t),pe(e,t)]}function fe(e,t){let n=e.fullHeight/e.pixelRatio;return Math.min(n,t+Q(e,t))}function pe(e,t){return Math.max(0,t-Q(e,t))}function me(e,t,n){let r={translation:e,location:t};return n&&(r.normal=n),r}function he(e){let{view:t}=e;return t.viewingMode===`global`?ge(e):_e(e)}function ge(e){let{view:t,originalScreenPoint:i,horizonY:a,horizonPadding:o,outTranslation:s,outGrabLocation:c,outGrabNormal:l,intersectionOptions:u,depthSearchSize:f}=e,p=t.state.camera,h=me(s,c,l);J.radius=m(t.spatialReference).radius;let g=E(t,p,i,J.radius,1,u);if(g.scenePickPoint==null)return!1;let _=g.hasGeometryIntersection;d(Y,g.scenePickPoint),d(h.location,Y);let v=g.sphere;h.normal&&g.normal&&d(h.normal,g.normal);let y=ye(i,a,o,_),b=_?n(Y,p.eye):1/0;return y.wasAdjusted&&be({view:t,screenAdjustment:y,intersector:$(t),fallbackCheck:(e,t,n)=>{let i=D(v,p,e,t);return i&&n&&r(n,t),i},output:h,intersectionOptions:u}),Se({view:t,screenPoint:y.adjustedScreenPoint,camera:p,initialDistance:b,depthSearchSize:f??k,output:h}),!0}function _e(e){let{view:t,originalScreenPoint:i,horizonY:a,horizonPadding:o,outTranslation:s,outGrabLocation:c,outGrabNormal:u,intersectionOptions:f,depthSearchSize:p}=e,m=t.sceneIntersectionHelper,h=t.state.camera,g=$(t),v=me(s,c,u);m.intersectIntersectorScreen(i,g,f);let y=g.results.min.getIntersectionPoint(Y),b=y?n(Y,h.eye):1/0;y&&(d(v.location,Y),v.normal&&d(v.normal,g.results.min.normal)),t.renderCoordsHelper.worldUpAtPosition(h.eye,V),l(X,h.eye,V,-h.relativeElevation),_(X,V,ae);let x=ye(i,a,o,y);return x.wasAdjusted&&be({view:t,screenAdjustment:x,intersector:g,fallbackCheck:(e,t,n)=>{let i=O(ae,h,e,t);return i&&n&&r(n,V),i},output:v,intersectionOptions:f}),Se({view:t,screenPoint:x.adjustedScreenPoint,camera:h,initialDistance:b,depthSearchSize:p??k,output:v}),!0}function ve(e,t,n,r){return!r&&le(e,t)||r&&ue(e,!1,n[0])?n[0]:!r&&Z(e,t,!1)?n[1]:null}function ye(e,n,r,i){let a=ve(e[1],n,r,i);return{originalScreenPoint:e,adjustedScreenPoint:t(e[0],a??e[1]),horizonY:n,horizonPadding:r,wasAdjusted:a!==null}}function $(e){let t=new A(e.state.viewingMode);return t.options.selectionMode=!0,t.options.store=0,t.options.hud=!1,t.options.normalRequired=!0,t}function be(e){let{view:t,screenAdjustment:n,fallbackCheck:r,intersector:i,output:a,intersectionOptions:o}=e,s=t.sceneIntersectionHelper;s.intersectIntersectorScreen(n.adjustedScreenPoint,i,{...o,requiresGroundFeedback:!0});let c=i.results.min.getIntersectionPoint(a.location);if(c){a.normal&&d(a.normal,i.results.min.normal);return}let l=xe(n);if(s.intersectIntersectorScreen(l,i,{...o,requiresGroundFeedback:!0}),c=i.results.min.getIntersectionPoint(a.location),c){a.normal&&d(a.normal,i.results.min.normal);return}c=r(n.adjustedScreenPoint,a.location,a.normal),!c&&r(l,a.location,a.normal)}function xe(e){let{originalScreenPoint:n,adjustedScreenPoint:r,horizonY:i,horizonPadding:a}=e,o=Z(r[1],i)?Math.min(a[1],n[1]):Math.max(a[0],n[1]);return t(r[0],o)}function Se(e){Ce(e),we(e)}function Ce(e){let{view:t,camera:n,output:r}=e,{offset:i}=t.navigation.mode;if(!i)return;let{translation:a,location:o}=r;t.renderCoordsHelper.worldUpAtPosition(n.eye,V),l(X,n.eye,V,-i),_(X,V,I),x(I,h(n.eye,s(N,o,n.eye)),X)&&(d(o,X),s(a,o,n.eye))}function we(e){let{view:t,screenPoint:n,camera:i,initialDistance:o,depthSearchSize:c,output:l}=e,d=c>0?t.stage.renderView.getMinimalDepthForArea(T(t),n[0],n[1],i,c):null;s(l.translation,l.location,i.eye);let p=Math.min(f(l.translation),o);d&&d<=p&&(p=d),r(l.translation,l.translation),u(l.translation,l.translation,p),a(l.location,l.translation,i.eye)}async function Te(t,r){if(t.navigation.mode.type!==`ground`){e.getLogger(`esri`).warn(`Can only advance while in ground navigation mode!`);return}let{camera:i}=t.state;t.renderCoordsHelper.worldUpAtPosition(i.eye,V);let c=t.sceneIntersectionHelper,l=$(t),p=o(N,V,i.viewRight);d(q.origin,i.eye),u(q.direction,p,r);let m=c.intersectRay(q,l,Y),h=new ne().copyFrom(i),g=s(oe,i.center,i.eye);return!m||n(Y,i.eye)>r?h.eye=a(N,q.origin,q.direction):(s(N,Y,i.eye),f(N)>2&&(Ee(N,N,.25,2),h.eye=a(N,i.eye,N))),h.center=a(N,h.eye,g),new ee(t).immediatelyCorrectGroundElevation({camera:h,correctionLimit:100}),t.goTo(w(t,h),{duration:500,liftOffDisabled:!0})}function Ee(e,t,n,r){let i=f(e),a=Math.min(n,Math.max(i-r,0)/i);u(t,e,a)}export{Q as computeHorizonPadding,de as computeHorizonPaddingLimits,he as findGroundNavigationGrabLocation,se as findPlaneHorizonY,ce as findSphereHorizonY,Te as groundNavigationAdvance,M as groundNavigationConstants,le as isAboveHorizon,Z as isBelowHorizon,Ee as shortenTranslation,ue as shouldClampScreenY};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"../../../../../../core/has.js";import{ComponentTechnique as e}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as t}from"./ComponentTechniqueConfiguration.js";import{MaterialBase as n}from"../../../core/material/MaterialBase.js";import{isColor as r}from"../../../core/shaderLibrary/ShaderOutput.js";import{hasShadowHighlights as i}from"../../../shaders/ReceiveShadowsConfiguration.js";import{isSphereDepthInterpolateActive as a}from"../../../shaders/SphereDepthInterpolate.glsl.js";class o extends n{constructor(e,n,r,i,a){super(),this.parameters=e,this.key=a;let o=l(e,r);this.usePBR=e.usePBR,this.hasParametersFromSource=e.hasParametersFromSource,this.isGround=e.isGround,this.slicePlaneEnabled=e.slicePlaneEnabled,this.isIntegratedMesh=e.isIntegratedMesh,this.applySSAO=e.applySSAO,this._emissions=o!==0,this.materialPass=s(e,r),this._configuration=new t(i),this._supportsSphereDepthInterpolate=e.sphereDepthInterpolate&&this._configuration.spherical,this._initializeMaterialConfiguration(e,n,r)}destroy(){}get emissions(){if(!this._emissions)return 0;switch(this.materialPass){case 0:case 3:return 1;case 1:case 4:return 2;case 2:return 3}}acquireTechnique(t,n,r,i){let o=this._updateConfiguration(n,r);if(this._supportsSphereDepthInterpolate&&t.precompiling>0){o.sphereDepthInterpolate=!1;let n=t.get(e,o,i.layout);o.sphereDepthInterpolate=!0;let s=t.get(e,o,i.layout);return a(r.camera,o)?s:n}return t.get(e,o,i.layout)}_initializeMaterialConfiguration(e,t,n){let r=this._configuration;r.hasMetallicRoughnessTexture=e.hasMetallicRoughnessTexture,r.hasOcclusionTexture=e.hasOcclusionTexture,r.hasNormalTexture=e.hasNormalTexture,r.sphereDepthInterpolate=!1,r.ellipsoidMode=e.ellipsoidMode,r.doubleSidedMode=+!!e.doubleSided,r.hasColorTexture=e.hasBaseColorTexture,r.cullFace=e.cullFace,r.alphaDiscardMode=e.alphaDiscardMode,r.hasVertexColors=t.hasVertexColors,r.textureCoordinateType=t.textureCoordinateType,r.shadeNormals=t.shadeNormals,r.normalType=t.hasNormals?1:2,r.polygonOffset=e.polygonOffset,r.vertexPositionRotationType=t.vertexPositionRotationType,r.componentDataType=n.componentDataType,r.emissionSource=l(e,n),r.groundTransparencyMode=e.groundTransparencyMode}_updateConfiguration(e,t){let n=this._configuration,{identifier:o}=e,s=o===0;n.output=t.output,n.enableOITOffset=t.enableOITOffset,n.sphereDepthInterpolate=this._supportsSphereDepthInterpolate&&a(t.camera,n),n.hasEmission=t.hasEmission,n.renderOccluded=t.slot===9;let c=this.isIntegratedMesh&&(!has(`enable-feature:im-as-ground`)||this.isGround)?d(t)?u(t)?3:2:1:0;n.integratedMeshMode=c,n.pbrMode=c===3?4:this.usePBR?this.hasParametersFromSource?n.shadeNormals!==0&&this.isIntegratedMesh?0:2:1:0,n.hasSlicePlane=t.slicePlane!=null&&this.slicePlaneEnabled,n.isGroundSlice=n.hasSlicePlane&&this.isGround;let{materialPass:l}=this;n.transparent=s&&(l===1||l===2&&e.transparent||l===4)||n.isGroundSlice,n.hasHighlightMixTexture=o===2&&t.highlightMixTexture!=null,n.snowCover=s&&t.snowCover>0,n.vertexDiscardMode=s&&l===2?e.transparent?2:1:0;let f=r(t.output);return n.receiveAmbientOcclusion=f&&this.applySSAO&&!n.renderOccluded&&t.ssao?.getTexture()!=null,n.receiveGlobalIllumination=f&&this.applySSAO&&!n.renderOccluded&&t.globalIlluminationEnabled,n.hasOccludees=f&&t.hasOccludees,n.receiveShadows=f&&t.shadowMap.ready,n.hasShadowHighlights=i(n,t),n.screenSpaceReflections=t.hasScreenSpaceReflections,n.cloudReflections=f&&t.clouds.data?.cubeMap?.colorTexture!=null,n}}function s(e,t){let{alphaDiscardMode:n,isIntegratedMesh:r,slicePlaneEnabled:i}=e,{transparent:a,opaqueOverride:o}=t,s=e.isObjectTransparent,c=e.hasBaseColorTransparency;if(r)return s||i&&(!has(`enable-feature:im-as-ground`)||e.isGround)?4:3;if(s)return 1;if(o===0)return 0;if(c||n===0||n===3)return 1;switch(a){case 2:return 0;case 0:return 1;case 1:return 2}}function c(e){return e.hasEmissionTexture||e.hasEmissiveBaseColor}function l(e,{emissiveSourceOverride:t,emissiveOverride:n}){let r=e.hasEmissionTexture,i=n!==2&&(c(e)||t!==2),a=t===1,o=t===2;return i?c(e)?o?r?4:2:a?r?5:7:6:a?7:6:0}function u(e){return e.overlay?.getTexture(3)!=null}function d(e){return e.overlay?.getTexture(1)!=null}export{o as ComponentMaterial,s as computeMaterialPass,l as getEmissionSource};
2
+ import has from"../../../../../../core/has.js";import{ComponentTechnique as e}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as t}from"./ComponentTechniqueConfiguration.js";import{MaterialBase as n}from"../../../core/material/MaterialBase.js";import{isColor as r}from"../../../core/shaderLibrary/ShaderOutput.js";import{hasShadowHighlights as i}from"../../../shaders/ReceiveShadowsConfiguration.js";import{isSphereDepthInterpolateActive as a}from"../../../shaders/SphereDepthInterpolate.glsl.js";class o extends n{constructor(e,n,r,i,a){super(),this.parameters=e,this.key=a;let o=l(e,r);this.usePBR=e.usePBR,this.hasParametersFromSource=e.hasParametersFromSource,this.isGround=e.isGround,this.slicePlaneEnabled=e.slicePlaneEnabled,this.isIntegratedMesh=e.isIntegratedMesh,this.applySSAO=e.applySSAO,this._emissions=o!==0,this.materialPass=s(e,r),this._configuration=new t(i),this._supportsSphereDepthInterpolate=e.sphereDepthInterpolate&&this._configuration.spherical,this._initializeMaterialConfiguration(e,n,r)}destroy(){}get emissions(){if(!this._emissions)return 0;switch(this.materialPass){case 0:case 3:return 1;case 1:case 4:return 2;case 2:return 3}}acquireTechnique(t,n,r,i){let o=this._updateConfiguration(n,r);if(this._supportsSphereDepthInterpolate&&t.precompiling>0){o.sphereDepthInterpolate=!1;let n=t.get(e,o,i.layout);o.sphereDepthInterpolate=!0;let s=t.get(e,o,i.layout);return a(r.camera,o)?s:n}return t.get(e,o,i.layout)}_initializeMaterialConfiguration(e,t,n){let r=this._configuration;r.hasMetallicRoughnessTexture=e.hasMetallicRoughnessTexture,r.hasOcclusionTexture=e.hasOcclusionTexture,r.hasNormalTexture=e.hasNormalTexture,r.sphereDepthInterpolate=!1,r.ellipsoidMode=e.ellipsoidMode,r.doubleSidedMode=+!!e.doubleSided,r.hasColorTexture=e.hasBaseColorTexture,r.cullFace=e.cullFace,r.alphaDiscardMode=e.alphaDiscardMode,r.hasVertexColors=t.hasVertexColors,r.textureCoordinateType=t.textureCoordinateType,r.shadeNormals=t.shadeNormals,r.normalType=t.hasNormals?1:2,r.polygonOffset=e.polygonOffset,r.vertexPositionRotationType=t.vertexPositionRotationType,r.componentDataType=n.componentDataType,r.emissionSource=l(e,n),r.groundTransparencyMode=e.groundTransparencyMode}_updateConfiguration(e,t){let n=this._configuration,{identifier:o}=e,s=o===0;n.output=t.output,n.enableOITOffset=t.enableOITOffset,n.isGround=this.isGround,n.sphereDepthInterpolate=this._supportsSphereDepthInterpolate&&a(t.camera,n),n.hasEmission=t.hasEmission,n.renderOccluded=t.slot===9;let c=this.isIntegratedMesh&&(!has(`enable-feature:im-as-ground`)||this.isGround)?d(t)?u(t)?3:2:1:0;n.integratedMeshMode=c,n.pbrMode=c===3?4:this.usePBR?this.hasParametersFromSource?n.shadeNormals!==0&&this.isIntegratedMesh?0:2:1:0,n.hasSlicePlane=t.slicePlane!=null&&this.slicePlaneEnabled,n.isGroundSlice=n.hasSlicePlane&&this.isGround;let{materialPass:l}=this;n.transparent=s&&(l===1||l===2&&e.transparent||l===4)||n.isGroundSlice,n.hasHighlightMixTexture=o===2&&t.highlightMixTexture!=null,n.snowCover=s&&t.snowCover>0,n.vertexDiscardMode=s&&l===2?e.transparent?2:1:0;let f=r(t.output);return n.receiveAmbientOcclusion=f&&this.applySSAO&&!n.renderOccluded&&t.ssao?.getTexture()!=null,n.receiveGlobalIllumination=f&&this.applySSAO&&!n.renderOccluded&&t.globalIlluminationEnabled,n.hasOccludees=f&&t.hasOccludees,n.receiveShadows=f&&t.shadowMap.ready,n.hasShadowHighlights=i(n,t),n.screenSpaceReflections=t.hasScreenSpaceReflections,n.cloudReflections=f&&t.clouds.data?.cubeMap?.colorTexture!=null,n}}function s(e,t){let{alphaDiscardMode:n,isIntegratedMesh:r,slicePlaneEnabled:i}=e,{transparent:a,opaqueOverride:o}=t,s=e.isObjectTransparent,c=e.hasBaseColorTransparency;if(r)return s||i&&(!has(`enable-feature:im-as-ground`)||e.isGround)?4:3;if(s)return 1;if(o===0)return 0;if(c||n===0||n===3)return 1;switch(a){case 2:return 0;case 0:return 1;case 1:return 2}}function c(e){return e.hasEmissionTexture||e.hasEmissiveBaseColor}function l(e,{emissiveSourceOverride:t,emissiveOverride:n}){let r=e.hasEmissionTexture,i=n!==2&&(c(e)||t!==2),a=t===1,o=t===2;return i?c(e)?o?r?4:2:a?r?5:7:6:a?7:6:0}function u(e){return e.overlay?.getTexture(3)!=null}function d(e){return e.overlay?.getTexture(1)!=null}export{o as ComponentMaterial,s as computeMaterialPass,l as getEmissionSource};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{isColorHighlightOrOLID as t}from"../../../core/shaderLibrary/ShaderOutput.js";import{parameter as n}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{SphereDepthInterpolateConfiguration as r}from"../../../shaders/SphereDepthInterpolate.glsl.js";class i extends r{constructor(e){super(),this.output=0,this.textureCoordinateType=0,this.componentDataType=0,this.cullFace=2,this.vertexDiscardMode=0,this.doubleSidedMode=2,this.alphaDiscardMode=1,this.integratedMeshMode=0,this.pbrMode=0,this.normalType=0,this.emissionSource=0,this.shadeNormals=1,this.polygonOffset=0,this.vertexPositionRotationType=1,this.hasEmission=!1,this.hasVertexColors=!1,this.hasSlicePlane=!1,this.isGroundSlice=!1,this.hasColorTexture=!1,this.hasHighlightMixTexture=!1,this.emissionDimmingPass=!1,this.receiveAmbientOcclusion=!0,this.receiveGlobalIllumination=!1,this.receiveShadows=!0,this.hasShadowHighlights=!1,this.transparent=!0,this.groundTransparencyMode=1,this.screenSpaceReflections=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasNormalTextureTransform=!1,this.cloudReflections=!0,this.snowCover=!1,this.renderOccluded=!1,this.enableOITOffset=!1,this.sphereDepthInterpolate=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1,this.occlusionPass=!1,this.bindType=2,this.useCustomDTRExponentForWater=!1,this.hasVertexTangents=!1,this.hasSliceTranslatedView=!1,this.rayMarchMaxReach=1,this.rayMarchMaxSteps=75,this.useProjectedRayLength=!1,this.clampRayToScreen=!0,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.useFillLights=!0,this.draped=!1,this.useTransformationTexture=!0,this.sphericalSR=e.sphericalSR,this.useFloatBlend=e.useFloatBlend}get spherical(){return this.sphericalSR!==0}get overlayEnabled(){return(this.integratedMeshMode===2||this.integratedMeshMode===3)&&t(this.output)}get hasWater(){return this.pbrMode===3||this.pbrMode===4||this.pbrMode===6}}e([n()],i.prototype,`useFloatBlend`,void 0),e([n({count:12})],i.prototype,`output`,void 0),e([n({count:3})],i.prototype,`textureCoordinateType`,void 0),e([n({count:2})],i.prototype,`componentDataType`,void 0),e([n({count:3})],i.prototype,`cullFace`,void 0),e([n({count:3})],i.prototype,`vertexDiscardMode`,void 0),e([n({count:3})],i.prototype,`doubleSidedMode`,void 0),e([n({count:4})],i.prototype,`alphaDiscardMode`,void 0),e([n({count:4})],i.prototype,`integratedMeshMode`,void 0),e([n({count:8})],i.prototype,`pbrMode`,void 0),e([n({count:3})],i.prototype,`normalType`,void 0),e([n({count:8})],i.prototype,`emissionSource`,void 0),e([n({count:3})],i.prototype,`shadeNormals`,void 0),e([n({count:5})],i.prototype,`polygonOffset`,void 0),e([n({count:3})],i.prototype,`vertexPositionRotationType`,void 0),e([n()],i.prototype,`hasEmission`,void 0),e([n()],i.prototype,`hasVertexColors`,void 0),e([n()],i.prototype,`hasSlicePlane`,void 0),e([n()],i.prototype,`isGroundSlice`,void 0),e([n()],i.prototype,`hasColorTexture`,void 0),e([n()],i.prototype,`hasHighlightMixTexture`,void 0),e([n()],i.prototype,`emissionDimmingPass`,void 0),e([n()],i.prototype,`receiveAmbientOcclusion`,void 0),e([n()],i.prototype,`receiveGlobalIllumination`,void 0),e([n()],i.prototype,`receiveShadows`,void 0),e([n()],i.prototype,`hasShadowHighlights`,void 0),e([n()],i.prototype,`transparent`,void 0),e([n({count:4})],i.prototype,`groundTransparencyMode`,void 0),e([n()],i.prototype,`screenSpaceReflections`,void 0),e([n()],i.prototype,`hasMetallicRoughnessTexture`,void 0),e([n()],i.prototype,`hasOcclusionTexture`,void 0),e([n()],i.prototype,`hasNormalTexture`,void 0),e([n()],i.prototype,`hasOccludees`,void 0),e([n()],i.prototype,`terrainDepthTest`,void 0),e([n()],i.prototype,`cullAboveTerrain`,void 0),e([n()],i.prototype,`hasNormalTextureTransform`,void 0),e([n()],i.prototype,`cloudReflections`,void 0),e([n()],i.prototype,`snowCover`,void 0),e([n()],i.prototype,`renderOccluded`,void 0),e([n()],i.prototype,`enableOITOffset`,void 0),e([n()],i.prototype,`sphereDepthInterpolate`,void 0);export{i as ComponentTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{isColorHighlightOrOLID as t}from"../../../core/shaderLibrary/ShaderOutput.js";import{parameter as n}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{SphereDepthInterpolateConfiguration as r}from"../../../shaders/SphereDepthInterpolate.glsl.js";class i extends r{constructor(e){super(),this.output=0,this.textureCoordinateType=0,this.componentDataType=0,this.cullFace=2,this.vertexDiscardMode=0,this.doubleSidedMode=2,this.alphaDiscardMode=1,this.integratedMeshMode=0,this.pbrMode=0,this.normalType=0,this.emissionSource=0,this.shadeNormals=1,this.polygonOffset=0,this.vertexPositionRotationType=1,this.hasEmission=!1,this.hasVertexColors=!1,this.hasSlicePlane=!1,this.isGround=!1,this.isGroundSlice=!1,this.hasColorTexture=!1,this.hasHighlightMixTexture=!1,this.emissionDimmingPass=!1,this.receiveAmbientOcclusion=!0,this.receiveGlobalIllumination=!1,this.receiveShadows=!0,this.hasShadowHighlights=!1,this.transparent=!0,this.groundTransparencyMode=1,this.screenSpaceReflections=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasNormalTextureTransform=!1,this.cloudReflections=!0,this.snowCover=!1,this.renderOccluded=!1,this.enableOITOffset=!1,this.sphereDepthInterpolate=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1,this.occlusionPass=!1,this.bindType=2,this.useCustomDTRExponentForWater=!1,this.hasVertexTangents=!1,this.hasSliceTranslatedView=!1,this.rayMarchMaxReach=1,this.rayMarchMaxSteps=75,this.useProjectedRayLength=!1,this.clampRayToScreen=!0,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.useFillLights=!0,this.draped=!1,this.useTransformationTexture=!0,this.sphericalSR=e.sphericalSR,this.useFloatBlend=e.useFloatBlend}get spherical(){return this.sphericalSR!==0}get overlayEnabled(){return(this.integratedMeshMode===2||this.integratedMeshMode===3)&&t(this.output)}get hasWater(){return this.pbrMode===3||this.pbrMode===4||this.pbrMode===6}}e([n()],i.prototype,`useFloatBlend`,void 0),e([n({count:12})],i.prototype,`output`,void 0),e([n({count:3})],i.prototype,`textureCoordinateType`,void 0),e([n({count:2})],i.prototype,`componentDataType`,void 0),e([n({count:3})],i.prototype,`cullFace`,void 0),e([n({count:3})],i.prototype,`vertexDiscardMode`,void 0),e([n({count:3})],i.prototype,`doubleSidedMode`,void 0),e([n({count:4})],i.prototype,`alphaDiscardMode`,void 0),e([n({count:4})],i.prototype,`integratedMeshMode`,void 0),e([n({count:8})],i.prototype,`pbrMode`,void 0),e([n({count:3})],i.prototype,`normalType`,void 0),e([n({count:8})],i.prototype,`emissionSource`,void 0),e([n({count:3})],i.prototype,`shadeNormals`,void 0),e([n({count:5})],i.prototype,`polygonOffset`,void 0),e([n({count:3})],i.prototype,`vertexPositionRotationType`,void 0),e([n()],i.prototype,`hasEmission`,void 0),e([n()],i.prototype,`hasVertexColors`,void 0),e([n()],i.prototype,`hasSlicePlane`,void 0),e([n()],i.prototype,`isGround`,void 0),e([n()],i.prototype,`isGroundSlice`,void 0),e([n()],i.prototype,`hasColorTexture`,void 0),e([n()],i.prototype,`hasHighlightMixTexture`,void 0),e([n()],i.prototype,`emissionDimmingPass`,void 0),e([n()],i.prototype,`receiveAmbientOcclusion`,void 0),e([n()],i.prototype,`receiveGlobalIllumination`,void 0),e([n()],i.prototype,`receiveShadows`,void 0),e([n()],i.prototype,`hasShadowHighlights`,void 0),e([n()],i.prototype,`transparent`,void 0),e([n({count:4})],i.prototype,`groundTransparencyMode`,void 0),e([n()],i.prototype,`screenSpaceReflections`,void 0),e([n()],i.prototype,`hasMetallicRoughnessTexture`,void 0),e([n()],i.prototype,`hasOcclusionTexture`,void 0),e([n()],i.prototype,`hasNormalTexture`,void 0),e([n()],i.prototype,`hasOccludees`,void 0),e([n()],i.prototype,`terrainDepthTest`,void 0),e([n()],i.prototype,`cullAboveTerrain`,void 0),e([n()],i.prototype,`hasNormalTextureTransform`,void 0),e([n()],i.prototype,`cloudReflections`,void 0),e([n()],i.prototype,`snowCover`,void 0),e([n()],i.prototype,`renderOccluded`,void 0),e([n()],i.prototype,`enableOITOffset`,void 0),e([n()],i.prototype,`sphereDepthInterpolate`,void 0);export{i as ComponentTechniqueConfiguration};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{EvaluateAmbientLighting as e}from"./EvaluateAmbientLighting.glsl.js";import{EvaluateAmbientOcclusion as t}from"./EvaluateAmbientOcclusion.glsl.js";import{Gamma as n}from"./Gamma.glsl.js";import{mainLightDirection as r,mainLightIntensity as i,applyShading as a}from"./MainLighting.glsl.js";import{PhysicallyBasedRendering as o}from"./PhysicallyBasedRendering.glsl.js";import{PiUtils as s}from"./PiUtils.glsl.js";import{ReadGlobalIllumination as c}from"./ReadGlobalIllumination.glsl.js";import{BooleanBindUniform as l}from"../../shaderModules/BooleanBindUniform.js";import{FloatBindUniform as u}from"../../shaderModules/FloatBindUniform.js";import{glsl as d,If as f}from"../../shaderModules/glsl.js";import{ambientBoost as p}from"../../../lighting/SceneLighting.js";import{BlackLevelLightSoftCompression as m}from"../../../shaders/BlackLevelLightSoftCompression.glsl.js";import{ToneMapping as h}from"../../../shaders/ToneMapping.glsl.js";function g(e){e.constants.add(`ambientBoostFactor`,`float`,p)}function _(e){e.uniforms.add(new u(`lightingGlobalFactor`,e=>e.lighting.globalFactor))}function v(p,v){let{pbrMode:y,spherical:b,hasColorTexture:x,receiveGlobalIllumination:S}=v;p.include(n),p.include(c,v),p.include(t,v),y!==0&&p.include(o,v),p.include(e,v),p.include(s),p.include(h,v);let C=!(y===2&&!x);C&&p.include(m),g(p),_(p),p.uniforms.add(r).code.add(d`
2
+ import{EvaluateAmbientLighting as e}from"./EvaluateAmbientLighting.glsl.js";import{EvaluateAmbientOcclusion as t}from"./EvaluateAmbientOcclusion.glsl.js";import{Gamma as n}from"./Gamma.glsl.js";import{mainLightDirection as r,mainLightIntensity as i,applyShading as a}from"./MainLighting.glsl.js";import{PhysicallyBasedRendering as o}from"./PhysicallyBasedRendering.glsl.js";import{PiUtils as s}from"./PiUtils.glsl.js";import{ReadGlobalIllumination as c}from"./ReadGlobalIllumination.glsl.js";import{BooleanBindUniform as l}from"../../shaderModules/BooleanBindUniform.js";import{FloatBindUniform as u}from"../../shaderModules/FloatBindUniform.js";import{glsl as d,If as f}from"../../shaderModules/glsl.js";import{ambientBoost as p}from"../../../lighting/SceneLighting.js";import{BlackLevelLightSoftCompression as m}from"../../../shaders/BlackLevelLightSoftCompression.glsl.js";import{ToneMapping as h}from"../../../shaders/ToneMapping.glsl.js";function g(e){e.constants.add(`ambientBoostFactor`,`float`,p)}const _=new u(`lightingGlobalFactor`,e=>e.lighting.globalFactor);function v(p,v){let{pbrMode:y,spherical:b,hasColorTexture:x,receiveGlobalIllumination:S}=v;p.include(n),p.include(c,v),p.include(t,v),y!==0&&p.include(o,v),p.include(e,v),p.include(s),p.include(h,v);let C=!(y===2&&!x);C&&p.include(m),g(p),p.uniforms.add(r,_).code.add(d`
3
3
  float additionalDirectedAmbientLight(float lightAlignment) {
4
4
  return smoothstep(0.0, 1.0, clamp(lightAlignment * 2.5, 0.0, 1.0));
5
5
  }
@@ -11,7 +11,7 @@ import{EvaluateAmbientLighting as e}from"./EvaluateAmbientLighting.glsl.js";impo
11
11
  `),p.uniforms.add(i).code.add(d`vec3 evaluateAdditionalLighting(float ambientOcclusion, vec3 vPosWorld) {
12
12
  float additionalAmbientScale = additionalDirectedAmbientLight(vPosWorld);
13
13
  return (1.0 - ambientOcclusion) * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor * mainLightIntensity;
14
- }`);let w=S?`globalIlluminationOcclusion`:`ssao`;switch(p.constants.add(`mainLightIrradianceScale`,`float`,S?.75:1),p.constants.add(`ambientIrradianceScale`,`float`,S?1.5:1),S&&(p.constants.add(`globalIlluminationEmissionCompressionWeight`,`float`,.75),p.code.add(d`vec3 evaluateGlobalIlluminationOcclusion() {
14
+ }`);let w=S?`globalIlluminationOcclusion`:`ssao`,T=S?`factorDirect`:`0.0`,E=S?`factorAmbient`:`1.0`;switch(p.constants.add(`mainLightIrradianceScale`,`float`,S?.75:1),p.constants.add(`ambientIrradianceScale`,`float`,S?1.5:1),S&&(p.uniforms.add(new u(`factorDirect`,e=>e.globalIlluminationDirectFactor),new u(`factorAmbient`,e=>e.globalIlluminationAmbientFactor)),p.constants.add(`globalIlluminationEmissionCompressionWeight`,`float`,.75),p.code.add(d`vec3 evaluateGlobalIlluminationOcclusion() {
15
15
  return min(1.2 * readGlobalIlluminationOcclusion(), 1.0);
16
16
  }
17
17
  vec3 evaluateGlobalIlluminationEmission(vec3 albedoLinear) {
@@ -49,10 +49,14 @@ return mix(emission, compressedEmission, globalIlluminationEmissionCompressionWe
49
49
  inputs.NdotAmbDir = hasFillLights ? abs(dot(normal, ambientDir)) : 1.0;
50
50
 
51
51
  // Calculate the irradiance components: sun, fill lights and the sky.
52
- vec3 mainLightIrradianceComponent = mainLightIrradianceScale * inputs.NdotL * (1.0 - shadow) * mainLightIntensity;
53
- vec3 fillLightsIrradianceComponent = inputs.NdotAmbDir * mainLightIntensity * fillLightIntensity;
52
+ // Applying AO to both direct and ambient lighting enhances depth perception.
53
+ // This is an artistic choice; physically, AO should only attenuate ambient lighting.
54
+ vec3 directOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${w}), ${T});
55
+ vec3 ambientOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${w}), ${E});
56
+ vec3 mainLightIrradianceComponent = mainLightIrradianceScale * inputs.NdotL * (1.0 - shadow) * mainLightIntensity * directOcclusionFactor;
57
+ vec3 fillLightsIrradianceComponent = inputs.NdotAmbDir * mainLightIntensity * fillLightIntensity * directOcclusionFactor;
54
58
  // calculate ambient irradiance for localView and additionalLight for globalView
55
- vec3 ambientLightIrradianceComponent = ambientIrradianceScale * calculateAmbientIrradiance(normal) * (1.0 - ${w}) + additionalLight;
59
+ vec3 ambientLightIrradianceComponent = ambientIrradianceScale * calculateAmbientIrradiance(normal) * ambientOcclusionFactor + additionalLight;
56
60
 
57
61
  // Assemble the overall irradiance of the sky that illuminates the surface
58
62
  inputs.skyIrradianceToSurface = ambientLightIrradianceComponent + mainLightIrradianceComponent + fillLightsIrradianceComponent ;
@@ -100,8 +104,12 @@ return mix(emission, compressedEmission, globalIlluminationEmissionCompressionWe
100
104
 
101
105
  ${f(S,`vec3 globalIlluminationOcclusion = evaluateGlobalIlluminationOcclusion();`)}
102
106
 
103
- vec3 mainLightIrradianceComponent = mainLightIrradianceScale * (1.0 - shadow) * inputs.NdotL * mainLightIntensity;
104
- vec3 ambientLightIrradianceComponent = ambientIrradianceScale * calculateAmbientIrradiance(normal) * (1.0 - ${w}) + additionalLight;
107
+ // Applying AO to both direct and ambient lighting enhances depth perception.
108
+ // This is an artistic choice; physically, AO should only attenuate ambient lighting.
109
+ vec3 directOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${w}), ${T});
110
+ vec3 ambientOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${w}), ${E});
111
+ vec3 mainLightIrradianceComponent = mainLightIrradianceScale * (1.0 - shadow) * inputs.NdotL * mainLightIntensity * directOcclusionFactor;
112
+ vec3 ambientLightIrradianceComponent = ambientIrradianceScale * calculateAmbientIrradiance(normal) * ambientOcclusionFactor + additionalLight;
105
113
  vec3 ambientSky = ambientLightIrradianceComponent + mainLightIrradianceComponent;
106
114
 
107
115
  vec3 indirectDiffuse = ((1.0 - inputs.NdotUP) * mainLightIrradianceComponent + (1.0 + inputs.NdotUP ) * ambientSky) * 0.5;
@@ -121,4 +129,4 @@ return mix(emission, compressedEmission, globalIlluminationEmissionCompressionWe
121
129
  `);break;case 7:p.code.add(d`vec3 evaluateSceneLighting(vec3 normal, vec3 albedo, float shadow, float ssao, vec3 additionalLight,
122
130
  vec3 viewDirection, vec3 upDirection) {
123
131
  return albedo;
124
- }`)}}export{v as EvaluateSceneLighting,g as addAmbientBoostFactor,_ as addLightingGlobalFactor};
132
+ }`)}}export{v as EvaluateSceneLighting,g as addAmbientBoostFactor,_ as lightingGlobalFactor};
@@ -85,7 +85,7 @@ return vec4(col, opacity);
85
85
 
86
86
  float sdf = texture(stipplePatternTexture, vec2(u, 0.5)).r;
87
87
 
88
- return (sdf - 0.5) * vStipplePatternStretch + 0.5;
88
+ return sdf;
89
89
  }
90
90
 
91
91
  float getStippleSDF() {
@@ -104,6 +104,10 @@ return vec4(col, opacity);
104
104
  return ${d.stippleOffColorEnabled?`mix(color, stippleOffColor, stippleAlpha)`:`vec4(color.rgb, color.a * stippleAlpha)`};
105
105
  }
106
106
  `),_.code.add(s`
107
+ float getStippleCapDistance() {
108
+ return (getStippleSDF() * 2.0 - 1.0) * vStipplePatternStretch;
109
+ }
110
+
107
111
  void discardByStippleAlpha(float stippleAlpha, float threshold) {
108
112
  ${c(!d.stippleOffColorEnabled,`if (stippleAlpha < threshold) { discard; }`)}
109
113
  }
@@ -0,0 +1,12 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{EvaluateAmbientOcclusion as e}from"./EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as t,addAmbientBoostFactor as n,lightingGlobalFactor as r}from"./EvaluateSceneLighting.glsl.js";import{mainLightIntensity as i}from"./MainLighting.glsl.js";import{readFragmentShadow as a}from"./readFragmentShadow.glsl.js";import{addCameraPosition as o}from"../util/View.glsl.js";import{glsl as s}from"../../shaderModules/glsl.js";function c(c,l){let{vertex:u,fragment:d}=c;c.include(a,l),d.include(t,l),d.include(e,l),n(d),o(d,l),u.main.add(`forwardLinearDepthToReadShadow();`),d.uniforms.add(i,r,u.uniforms.get(`localOrigin`)).code.add(s`vec4 evaluateSceneLightingFragment(vec3 vpos, vec3 normal, vec4 albedo) {
3
+ vec3 posWorld = vpos + localOrigin;
4
+ float additionalAmbientScale = additionalDirectedAmbientLight(posWorld);
5
+ float shadow = readFragmentShadow(additionalAmbientScale);
6
+ float ssao = evaluateAmbientOcclusionInverse();
7
+ vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
8
+ vec3 viewDirection = normalize(vpos - cameraPosition);
9
+ return vec4(
10
+ evaluateSceneLighting(normal, albedo.rgb, shadow, 1.0 - ssao, additionalLight, viewDirection, normal),
11
+ albedo.a);
12
+ }`)}export{c as evaluateSceneLightingFragment};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{create as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{hasArea as t,width as n,height as r}from"../../../../../../geometry/support/aaBoundingRect.js";import{isColor as i}from"../ShaderOutput.js";import{mainLightDirection as a,mainLightIntensity as o}from"../shading/MainLighting.glsl.js";import{WaterColor as s}from"../shading/WaterColor.glsl.js";import{BlendColorsPremultiplied as c}from"../util/BlendColorsPremultiplied.glsl.js";import{Float4DrawUniform as l}from"../../shaderModules/Float4DrawUniform.js";import{FloatPassUniform as u}from"../../shaderModules/FloatPassUniform.js";import{glsl as d}from"../../shaderModules/glsl.js";import{Texture2DPassUniform as f}from"../../shaderModules/Texture2DPassUniform.js";import{Texture2DUintPassUniform as p}from"../../shaderModules/Texture2DUintPassUniform.js";import{Uniform as m}from"../../../../../webgl/Uniform.js";function h(e,t){let{vertex:n,fragment:r}=e;n.uniforms.add(new l(`overlayTexOffset`,(e,n)=>S(t.spherical,e,n)),new l(`overlayTexScale`,(e,n)=>C(t.spherical,e,n))),r.uniforms.add(new l(`overlayTexOffset`,(e,n)=>S(t.spherical,e,n)),new l(`overlayTexScale`,(e,n)=>C(t.spherical,e,n))),r.constants.add(`overlayOpacity`,`float`,1),r.uniforms.add(new f(`ovColorTex`,(e,t)=>g(e,t))),b(e,t)}function g(e,t){let n=_(e,t);return n==null?null:t.overlay?.getTexture(n)}function _(e,t){return e.identifier===0?i(t.output)?!e.occludedGround||t.overlay?.allSourcesOccluders?1:4:t.output===3||t.output===4?1:t.output===11?5:null:e.identifier===2?2:null}function v(e,t){let{vertex:n,fragment:r}=e;n.uniforms.add(new T(`overlayTexOffset`),new T(`overlayTexScale`)),r.uniforms.add(new u(`overlayOpacity`,e=>e.overlayOpacity)),t.output!==10&&r.uniforms.add(new f(`ovColorTex`,(e,t)=>t.overlay?.getTexture(e.overlayContent))),b(e,t)}function y(e,t){switch(e){case 0:case 1:case 2:return t.slot===9&&!t.overlay?.allSourcesOccluders?4:0;case 3:case 4:return 0;case 10:return 2;case 5:case 7:case 8:case 9:return null;case 11:return 5}return null}function b(e,t){let{hasWater:n,output:r}=t;n&&e.include(s,t);let{vertex:i,fragment:l,varyings:u}=e;u.add(`vtcOverlay`,`vec4`);let f=r===10;i.code.add(d`void setOverlayVTC(in vec2 uv) {
2
+ import{create as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{hasArea as t,width as n,height as r}from"../../../../../../geometry/support/aaBoundingRect.js";import{isColor as i}from"../ShaderOutput.js";import{mainLightDirection as a,mainLightIntensity as o}from"../shading/MainLighting.glsl.js";import{WaterColor as s}from"../shading/WaterColor.glsl.js";import{BlendColorsPremultiplied as c}from"../util/BlendColorsPremultiplied.glsl.js";import{Float4DrawUniform as l}from"../../shaderModules/Float4DrawUniform.js";import{FloatPassUniform as u}from"../../shaderModules/FloatPassUniform.js";import{glsl as d}from"../../shaderModules/glsl.js";import{Texture2DPassUniform as f}from"../../shaderModules/Texture2DPassUniform.js";import{Texture2DUintPassUniform as p}from"../../shaderModules/Texture2DUintPassUniform.js";import{Uniform as m}from"../../../../../webgl/Uniform.js";function h(e,t){let{vertex:n,fragment:r}=e;n.uniforms.add(new l(`overlayTexOffset`,(e,n)=>C(t.spherical,e,n)),new l(`overlayTexScale`,(e,n)=>w(t.spherical,e,n))),r.uniforms.add(new l(`overlayTexOffset`,(e,n)=>C(t.spherical,e,n)),new l(`overlayTexScale`,(e,n)=>w(t.spherical,e,n))),r.constants.add(`overlayOpacity`,`float`,1),r.uniforms.add(new f(`ovColorTex`,(e,n)=>g(e,n,t.isGround===!0))),x(e,t)}function g(e,t,n){let r=_(e,t,n);return r==null?null:t.overlay?.getTexture(r)}function _(e,t,n){return e.identifier===0?i(t.output)?!e.occludedGround||t.overlay?.allSourcesOccluders?v(n):4:t.output===3||t.output===4?v(n):t.output===11?5:null:e.identifier===2?2:null}function v(e){return+!e}function y(e,t){let{vertex:n,fragment:r}=e;n.uniforms.add(new E(`overlayTexOffset`),new E(`overlayTexScale`)),r.uniforms.add(new u(`overlayOpacity`,e=>e.overlayOpacity)),t.output!==10&&r.uniforms.add(new f(`ovColorTex`,(e,t)=>t.overlay?.getTexture(e.overlayContent))),x(e,t)}function b(e,t){switch(e){case 0:case 1:case 2:return t.slot===9&&!t.overlay?.allSourcesOccluders?4:0;case 3:case 4:return 0;case 10:return 2;case 5:case 7:case 8:case 9:return null;case 11:return 5}return null}function x(e,t){let{hasWater:n,output:r}=t;n&&e.include(s,t);let{vertex:i,fragment:l,varyings:u}=e;u.add(`vtcOverlay`,`vec4`);let f=r===10;i.code.add(d`void setOverlayVTC(in vec2 uv) {
3
3
  vtcOverlay = vec4(uv, uv) * overlayTexScale + overlayTexOffset;
4
4
  }`),l.code.add(d`bool isValid(vec2 uv, vec2 dxdy) {
5
5
  return (uv.x >= 0.0 + dxdy.x) && (uv.x <= 1.0 - dxdy.x) && (uv.y >= 0.0 + dxdy.y) && (uv.y <= 1.0 - dxdy.y);
@@ -57,4 +57,4 @@ vec3 n = normalize(tbn * (2.0 * maskInput.rgb - vec3(1.0)));
57
57
  vec3 v = vposEyeDir;
58
58
  vec3 final = getWaterColor(n, v, mainLightDirection, colorInput.rgb, mainLightIntensity, localUp, 1.0 - shadow, maskInput.w, position, positionWorld);
59
59
  return vec4(final, colorInput.w);
60
- }`)}function x(e,t){return e.overlay?.overlays[t]?.extent}function S(e,i,a){let o=w,s=e&&!i.useENUForGlobalOverlayUV,c=s?0:i.toMapSpace[0],l=s?0:i.toMapSpace[1],u=(e,i)=>{let s=x(a,i);t(s)&&(o[e+0]=(c-s[0])/n(s),o[e+1]=(l-s[1])/r(s))};return u(0,0),u(2,1),o}function C(e,i,a){let o=w,s=e&&!i.useENUForGlobalOverlayUV,c=s?1:i.toMapSpace[2],l=s?1:i.toMapSpace[3],u=(e,i)=>{let s=x(a,i);t(s)&&(o[e+0]=c/n(s),o[e+1]=l/r(s))};return u(0,0),u(2,1),o}const w=e();class T extends m{constructor(e){super(e,`vec4`)}}export{h as OverlayIM,v as OverlayTerrain,g as getIMColorTexture,y as getOverlayContentForOutputTerrain};
60
+ }`)}function S(e,t){return e.overlay?.overlays[t]?.extent}function C(e,i,a){let o=T,s=e&&!i.useENUForGlobalOverlayUV,c=s?0:i.toMapSpace[0],l=s?0:i.toMapSpace[1],u=(e,i)=>{let s=S(a,i);t(s)&&(o[e+0]=(c-s[0])/n(s),o[e+1]=(l-s[1])/r(s))};return u(0,0),u(2,1),o}function w(e,i,a){let o=T,s=e&&!i.useENUForGlobalOverlayUV,c=s?1:i.toMapSpace[2],l=s?1:i.toMapSpace[3],u=(e,i)=>{let s=S(a,i);t(s)&&(o[e+0]=c/n(s),o[e+1]=l/r(s))};return u(0,0),u(2,1),o}const T=e();class E extends m{constructor(e){super(e,`vec4`)}}export{h as OverlayIM,y as OverlayTerrain,g as getIMColorTexture,v as getIMOverlayColorContent,b as getOverlayContentForOutputTerrain};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../../core/signal.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/IntegerPassUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{F as FocusAreaPassParameters,b as build}from"../../../../../chunks/FocusArea.glsl.js";
2
+ import"../../../../../core/signal.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/IntegerPassUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{F as FocusAreaPassParameters,b as build}from"../../../../../chunks/FocusArea.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/output/ReadDepthLastFrame.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderLibrary/shading/MainLighting.glsl.js";import"../../core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js";import"../../core/shaderLibrary/util/CameraSpace.glsl.js";import"../../core/shaderLibrary/util/cameraUniforms.js";import"../../core/shaderModules/FloatBindUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Matrix4BindUniform.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"./GlobalIlluminationColorQuantization.glsl.js";import"../../shaders/floatBlendScale.glsl.js";import"../../shaders/ToneMapping.glsl.js";import"../../../../webgl/enums.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{G as GlobalIlluminationPassParameters,c as build,e as defaultColorBleedWeight,f as defaultEmissionBoostFactor,d as defaultRayMarchMaxReach,g as defaultRayMarchMaxReachEmissionWeight,b as defaultRayMarchMaxSteps,h as defaultRayMarchMinReach,i as defaultRayMarchMinReachEmissionWeight,j as defaultRayMarchWorldReach}from"../../../../../chunks/GlobalIllumination.glsl.js";
2
+ import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/output/ReadDepthLastFrame.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderLibrary/shading/MainLighting.glsl.js";import"../../core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js";import"../../core/shaderLibrary/util/CameraSpace.glsl.js";import"../../core/shaderLibrary/util/cameraUniforms.js";import"../../core/shaderModules/FloatBindUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Matrix4BindUniform.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"./GlobalIlluminationColorQuantization.glsl.js";import"../../shaders/floatBlendScale.glsl.js";import"../../shaders/ToneMapping.glsl.js";import"../../../../webgl/enums.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{G as GlobalIlluminationPassParameters,c as build,e as defaultColorBleedWeight,f as defaultEmissionBoostFactor,g as defaultFactorDaylightDirectional,d as defaultRayMarchMaxReach,h as defaultRayMarchMaxReachEmissionWeight,b as defaultRayMarchMaxSteps,i as defaultRayMarchMinReach,j as defaultRayMarchMinReachEmissionWeight,k as defaultRayMarchWorldReach}from"../../../../../chunks/GlobalIllumination.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{releaseMaybe as t}from"../../../../../core/maybe.js";import{watch as n,syncAndInitial as r}from"../../../../../core/reactiveUtils.js";import{waitRender as i}from"../../../../../core/scheduling.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators.js";import{set as o}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{UNIT_W as s,ZEROS as c}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as l}from"../../../webgl.js";import{AmbientIllumination as u}from"../AmbientIllumination.js";import{G as d}from"../../../../../chunks/GlobalIllumination.glsl.js";import{G as f}from"../../../../../chunks/GlobalIlluminationBlur.glsl.js";import{GlobalIlluminationBlurTechnique as p}from"./GlobalIlluminationBlurTechnique.js";import{GlobalIlluminationTechnique as m}from"./GlobalIlluminationTechnique.js";import{GlobalIlluminationTechniqueConfiguration as h}from"./GlobalIlluminationTechniqueConfiguration.js";import{G as g}from"../../../../../chunks/GlobalIlluminationUpscale.glsl.js";import{GlobalIlluminationUpscaleTechnique as _}from"./GlobalIlluminationUpscaleTechnique.js";import{DepthStencilAttachment as v,ColorAttachment1 as y}from"../../../../webgl/enums.js";const b=1;let x=class extends u{constructor(e){super(e),this._passParameters=new d,this._drawParameters=new f,this._drawParametersUpscale=new g,this._configuration=new h,this._lastOutput=null,this._isGlobalIlluminationUpdate=!1,this._lowQualityResolutionScale=.35,this._maxFrames=256}initialize(){this.addHandles(n(()=>this._mode,e=>{e===0?this._disable():this._enable()},r))}destroy(){this._lastOutput=t(this._lastOutput)}_disable(){super._disable(),this._resetAccumulation(),this._passParameters.temporalSampleFrame=0}get hasHighQuality(){return this._mode===2}resetAccumulation(){!this._isGlobalIlluminationUpdate&&(this._passParameters.accumulatedFrames>100||!this._configuration.hasEmission)&&this._resetAccumulation()}_resetAccumulation(){this._passParameters.accumulatedFrames=0,this._lastOutput=t(this._lastOutput)}get isAccumulating(){return this.enabled&&this._passParameters.accumulatedFrames<this._maxFrames}precompile(){this.techniques.getCompiled(_)}render(e){let t=this.bindParameters.frameRendererTarget===1;if(this._passParameters.accumulatedFrames>=this._maxFrames&&!t)return this._lastOutput?.retain(),this._lastOutput;let n=e.find(({name:e})=>e===`normals`),r=n?.getTexture(),i=n?.getTexture(v);return!r||!i||this._mode===0?this._emptyOutput:(this._configuration.hasEmission=!!this.bindParameters.reprojection.lastFrameEmission,t?this._renderScreenshot(r,i):this._renderInteractive(r,i))}_renderScreenshot(e,t){let n=this._emptyOutput,r=this._passParameters.accumulatedFrames,i=this._passParameters.temporalSampleFrame;this._passParameters.accumulatedFrames=0,this._passParameters.temporalSampleFrame=0;let a=this.techniques.get(m,this._configuration),o=this.techniques.get(p);for(;this._passParameters.accumulatedFrames<this._maxFrames;){this._passParameters.globalIllumination=n.getTexture(),this._passParameters.globalIlluminationWeights=n.getTexture(y);let r=this._renderAccumulationFrame(e,t,a,o);++this._passParameters.accumulatedFrames,n.release(),n=r}return this._passParameters.globalIllumination=null,this._passParameters.globalIlluminationWeights=null,this._passParameters.accumulatedFrames=r,this._passParameters.temporalSampleFrame=i,n}_renderInteractive(e,t){if(!this._canRender)return this._requestRender(),this._emptyOutput;let n=this._mode===1?this._lowQualityResolutionScale:1,r=this.techniques.getCompiled(m,this._configuration),i=this.techniques.getCompiled(p),a=n<1,o=a?this.techniques.getCompiled(_):null;if(!r||!i||a&&!o)return this._requestRender(),this._emptyOutput;let s=this._renderAccumulationFrame(e,t,r,i,o,n);return++this._passParameters.accumulatedFrames,this._passParameters.accumulatedFrames<this._maxFrames&&this._requestRender(),this._storeOutput(s),s}_renderAccumulationFrame(e,t,n,r,i,a=1){let s=this.bindParameters,c=this.renderingContext,{camera:u}=s;this._passParameters.normalTexture=e,this._passParameters.depthTexture=t,this._passParameters.projScale=1/u.computeScreenPixelSizeAtDistance(1),this._passParameters.resolutionScale=a;let{fullWidth:d,fullHeight:f}=u,p=Math.max(1,Math.floor(d*a)),m=Math.max(1,Math.floor(f*a)),h=this.fboCache.acquire(p,m,`global illumination input`).acquireColor(y,2);c.bindFramebuffer(h.fbo),c.setViewport(0,0,p,m),c.bindTechnique(n,s,this._passParameters,this._drawParameters),c.screen.draw();let g=Math.max(1,Math.round(p/1)),_=Math.max(1,Math.round(m/1)),v=this.fboCache.acquire(g,_,`global illumination blur horizontal`);c.bindFramebuffer(v.fbo);let b=h.obtainAttachment(y);this._drawParameters.texture=h.getTexture(),this._drawParameters.weightTexture=b.attachment,o(this._drawParameters.blurSize,0,1/m),c.bindTechnique(r,s,this._passParameters,this._drawParameters),c.setViewport(0,0,g,_),c.screen.draw(),h.release();let x=this.fboCache.acquire(g,_,i?`global illumination blur vertical`:l.AMBIENT_ILLUMINATION);c.bindFramebuffer(x.fbo),c.setViewport(0,0,g,_),c.setClearColor(1,1,1,0),c.clear(16384),this._drawParameters.texture=v.getTexture(),this._drawParameters.weightTexture=b.attachment,o(this._drawParameters.blurSize,1/g,0),c.bindTechnique(r,s,this._passParameters,this._drawParameters),c.setViewport(0,0,g,_),c.screen.draw(),v.release(),x.attachColor(b,y),b.release();let S=x;return i&&(S=this.fboCache.acquire(d,f,l.AMBIENT_ILLUMINATION).acquireColor(y,2),c.bindFramebuffer(S.fbo),c.setViewport(0,0,d,f),c.setClearColor(1,1,1,0),c.clear(16384),this._drawParametersUpscale.colorTexture=x.getTexture(),this._drawParametersUpscale.weightTexture=x.getTexture(y),c.bindTechnique(i,s,this._passParameters,this._drawParametersUpscale),c.screen.draw(),x.release()),c.setViewport4fv(u.fullViewport),this._passParameters.temporalSampleFrame=(this._passParameters.temporalSampleFrame+1)%64,S}_requestRender(){this._isGlobalIlluminationUpdate=!0,this.requestRender(1),this._isGlobalIlluminationUpdate=!1}_storeOutput(e){this._lastOutput!==e&&(this._lastOutput=t(this._lastOutput),this._lastOutput=e,this._lastOutput.retain())}get _emptyOutput(){let e=this.renderingContext,{fullWidth:t,fullHeight:n}=this.bindParameters.camera,r=this.fboCache.acquire(t,n,l.AMBIENT_ILLUMINATION).acquireColor(y,2);return e.bindFramebuffer(r.fbo),e.setViewport(0,0,t,n),e.clearBuffer(0,s),e.clearBuffer(1,c),r}get _canRender(){let{reprojection:e,hasEmission:t,globalIllumination:n}=this.bindParameters;return!!e.lastFrameColor&&(!t||!!e.lastFrameEmission)&&!!e.lastFrameDepth&&!!n}get _mode(){return this._useGlobalIllumination?this.view.stage.renderer.isFeatureEnabled(10)?2:1:0}get test(){let e=this;return{get maxFrames(){return e._maxFrames},set maxFrames(t){e._maxFrames=t},get lowQualityResolutionScale(){return e._lowQualityResolutionScale},set lowQualityResolutionScale(t){e._lowQualityResolutionScale=t},passParameters:this._passParameters,configuration:this._configuration,get mode(){return e._mode},async restartAccumulation(){e.produces!==`disabled`&&(e._disable(),await i(),e._enable())}}}};x=e([a(`esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination`)],x);export{x as GlobalIllumination,b as blurSizePixels};
2
+ import{__decorate as e}from"tslib";import{releaseMaybe as t}from"../../../../../core/maybe.js";import{watch as n,syncAndInitial as r}from"../../../../../core/reactiveUtils.js";import{waitRender as i}from"../../../../../core/scheduling.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators.js";import{set as o}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{UNIT_W as s,ZEROS as c}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as l}from"../../../webgl.js";import{AmbientIllumination as u}from"../AmbientIllumination.js";import{G as d}from"../../../../../chunks/GlobalIllumination.glsl.js";import{G as f}from"../../../../../chunks/GlobalIlluminationBlur.glsl.js";import{GlobalIlluminationBlurTechnique as p}from"./GlobalIlluminationBlurTechnique.js";import{GlobalIlluminationTechnique as m}from"./GlobalIlluminationTechnique.js";import{GlobalIlluminationTechniqueConfiguration as h}from"./GlobalIlluminationTechniqueConfiguration.js";import{G as g}from"../../../../../chunks/GlobalIlluminationUpscale.glsl.js";import{GlobalIlluminationUpscaleTechnique as _}from"./GlobalIlluminationUpscaleTechnique.js";import{DepthStencilAttachment as v,ColorAttachment1 as y}from"../../../../webgl/enums.js";const b=1;let x=class extends u{constructor(e){super(e),this._passParameters=new d,this._drawParameters=new f,this._drawParametersUpscale=new g,this._configuration=new h,this._lastOutput=null,this._isGlobalIlluminationUpdate=!1,this._lowQualityResolutionScale=.35,this._maxFrames=256}initialize(){this.addHandles(n(()=>this._mode,e=>{e===0?this._disable():this._enable()},r))}destroy(){this._lastOutput=t(this._lastOutput)}_disable(){super._disable(),this._resetAccumulation(),this._passParameters.temporalSampleFrame=0}get hasHighQuality(){return this._mode===2}resetAccumulation(){!this._isGlobalIlluminationUpdate&&(this._passParameters.accumulatedFrames>100||!this._configuration.hasEmission)&&this._resetAccumulation()}_resetAccumulation(){this._passParameters.accumulatedFrames=0,this._lastOutput=t(this._lastOutput)}get isAccumulating(){return this.enabled&&this._passParameters.accumulatedFrames<this._maxFrames}precompile(){this.techniques.getCompiled(_)}render(e){let t=this.bindParameters.frameRendererTarget===1;if(this._passParameters.accumulatedFrames>=this._maxFrames&&!t)return this._lastOutput?.retain(),this._lastOutput;let n=e.find(({name:e})=>e===`normals`),r=n?.getTexture(),i=n?.getTexture(v);return!r||!i||this._mode===0?this._emptyOutput:(this._configuration.hasEmission=!!this.bindParameters.reprojection.lastFrameEmission,t?this._renderScreenshot(r,i):this._renderInteractive(r,i))}_renderScreenshot(e,t){let n=this._emptyOutput,r=this._passParameters.accumulatedFrames,i=this._passParameters.temporalSampleFrame;this._passParameters.accumulatedFrames=0,this._passParameters.temporalSampleFrame=0;let a=this.techniques.get(m,this._configuration),o=this.techniques.get(p);for(;this._passParameters.accumulatedFrames<this._maxFrames;){this._passParameters.globalIllumination=n.getTexture(),this._passParameters.globalIlluminationWeights=n.getTexture(y);let r=this._renderAccumulationFrame(e,t,a,o);++this._passParameters.accumulatedFrames,n.release(),n=r}return this._passParameters.globalIllumination=null,this._passParameters.globalIlluminationWeights=null,this._passParameters.accumulatedFrames=r,this._passParameters.temporalSampleFrame=i,n}_renderInteractive(e,t){if(!this._canRender)return this._requestRender(),this._emptyOutput;let n=this._mode===1?this._lowQualityResolutionScale:1,r=this.techniques.getCompiled(m,this._configuration),i=this.techniques.getCompiled(p),a=n<1,o=a?this.techniques.getCompiled(_):null;if(!r||!i||a&&!o)return this._requestRender(),this._emptyOutput;let s=this._renderAccumulationFrame(e,t,r,i,o,n);return++this._passParameters.accumulatedFrames,this._passParameters.accumulatedFrames<this._maxFrames&&this._requestRender(),this._storeOutput(s),s}_renderAccumulationFrame(e,t,n,r,i,a=1){let s=this.bindParameters,c=this.renderingContext,{camera:u}=s;this._passParameters.normalTexture=e,this._passParameters.depthTexture=t,this._passParameters.projScale=1/u.computeScreenPixelSizeAtDistance(1),this._passParameters.resolutionScale=a,this._passParameters.glowBoost=this._glowBoost;let{fullWidth:d,fullHeight:f}=u,p=Math.max(1,Math.floor(d*a)),m=Math.max(1,Math.floor(f*a)),h=this.fboCache.acquire(p,m,`global illumination input`).acquireColor(y,2);c.bindFramebuffer(h.fbo),c.setViewport(0,0,p,m),c.bindTechnique(n,s,this._passParameters,this._drawParameters),c.screen.draw();let g=Math.max(1,Math.round(p/1)),_=Math.max(1,Math.round(m/1)),v=this.fboCache.acquire(g,_,`global illumination blur horizontal`);c.bindFramebuffer(v.fbo);let b=h.obtainAttachment(y);this._drawParameters.texture=h.getTexture(),this._drawParameters.weightTexture=b.attachment,o(this._drawParameters.blurSize,0,1/m),c.bindTechnique(r,s,this._passParameters,this._drawParameters),c.setViewport(0,0,g,_),c.screen.draw(),h.release();let x=this.fboCache.acquire(g,_,i?`global illumination blur vertical`:l.AMBIENT_ILLUMINATION);c.bindFramebuffer(x.fbo),c.setViewport(0,0,g,_),c.setClearColor(1,1,1,0),c.clear(16384),this._drawParameters.texture=v.getTexture(),this._drawParameters.weightTexture=b.attachment,o(this._drawParameters.blurSize,1/g,0),c.bindTechnique(r,s,this._passParameters,this._drawParameters),c.setViewport(0,0,g,_),c.screen.draw(),v.release(),x.attachColor(b,y),b.release();let S=x;return i&&(S=this.fboCache.acquire(d,f,l.AMBIENT_ILLUMINATION).acquireColor(y,2),c.bindFramebuffer(S.fbo),c.setViewport(0,0,d,f),c.setClearColor(1,1,1,0),c.clear(16384),this._drawParametersUpscale.colorTexture=x.getTexture(),this._drawParametersUpscale.weightTexture=x.getTexture(y),c.bindTechnique(i,s,this._passParameters,this._drawParametersUpscale),c.screen.draw(),x.release()),c.setViewport4fv(u.fullViewport),this._passParameters.temporalSampleFrame=(this._passParameters.temporalSampleFrame+1)%64,S}_requestRender(){this._isGlobalIlluminationUpdate=!0,this.requestRender(1),this._isGlobalIlluminationUpdate=!1}_storeOutput(e){this._lastOutput!==e&&(this._lastOutput=t(this._lastOutput),this._lastOutput=e,this._lastOutput.retain())}get _emptyOutput(){let e=this.renderingContext,{fullWidth:t,fullHeight:n}=this.bindParameters.camera,r=this.fboCache.acquire(t,n,l.AMBIENT_ILLUMINATION).acquireColor(y,2);return e.bindFramebuffer(r.fbo),e.setViewport(0,0,t,n),e.clearBuffer(0,s),e.clearBuffer(1,c),r}get _canRender(){let{reprojection:e,hasEmission:t,globalIllumination:n}=this.bindParameters;return!!e.lastFrameColor&&(!t||!!e.lastFrameEmission)&&!!e.lastFrameDepth&&!!n}get _glowBoost(){let e=this.view.environment.lighting.glow;return e==null?0:2+3*e.intensity}get _mode(){return this._useGlobalIllumination?this.view.stage.renderer.isFeatureEnabled(10)?2:1:0}get test(){let e=this;return{get maxFrames(){return e._maxFrames},set maxFrames(t){e._maxFrames=t},get lowQualityResolutionScale(){return e._lowQualityResolutionScale},set lowQualityResolutionScale(t){e._lowQualityResolutionScale=t},passParameters:this._passParameters,configuration:this._configuration,get mode(){return e._mode},async restartAccumulation(){e.produces!==`disabled`&&(e._disable(),await i(),e._enable())}}}};x=e([a(`esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination`)],x);export{x as GlobalIllumination,b as blurSizePixels};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{releaseMaybe as e}from"../../../../core/maybe.js";import{signal as t}from"../../../../core/signal.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import r from"../../webgl/RenderCamera.js";import{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{CloudsParameters as a}from"../effects/clouds/CloudsParameters.js";import{ReprojectionUniforms as o}from"./ReprojectionUniforms.js";import{ScreenSpaceReflectionsUniforms as s}from"./ScreenSpaceReflectionsUniforms.js";import{SceneLighting as c}from"../lighting/SceneLighting.js";class l{constructor(e,t){this.width=e,this.height=t}}class u{constructor(e){this.shadowMap=e,this.output=0,this.slot=2,this.slicePlane=null,this.planarDistanceToGroundRatio=1,this.metersPerRenderUnit=1,this.hasOccludees=!1,this._emissions=t(0),this.transparentWithoutDepthEmissionDimmingPass=!1,this.useFloatBlend=t(!0),this.enableFillLights=!0,this.alignPixelEnabled=!1,this.decorations=!0,this.frameRendererTarget=0,this.overlayStretch=1,this.viewshedEnabled=!1,this.laserlinesEnabled=!1,this.shadowAnalysisEnabled=!1,this.cutFillComputationEnabled=!1,this.cutFillVisualizationEnabled=!1,this._camera=t(new r),this._inverseViewport=n(),this._oldLighting=new c,this._newLighting=new c,this._fadedLighting=new c,this._lighting=this._newLighting,this.screenSpaceReflections=new s,this.reprojection=new o,this.highlights=[],this.highlightMixOrigin=n(),this.highlightMixTexture=null,this.globalIlluminationEnabled=!1,this.hudRenderStyle=0,this.snowCover=0,this.clouds=new a,this.hasShadowHighlights=!1}destroy(){this._camera=this.contentCamera=null,this.mainDepth=this.overlay=this.ssao=this.shadowHighlight=null,this.depth=e(this.depth),this.shadowMap?.dispose()}get emissions(){return this._emissions.value}set emissions(e){this._emissions.value=e}get hasEmission(){switch(this.output){case 0:return this.hasOpaqueEmission;case 1:case 2:return this.hasTransparentEmission;default:return!1}}get hasOpaqueEmission(){return this.emissions===1||this.emissions===3}get hasTransparentEmission(){return this.emissions===2||this.emissions===3}get hasEmissions(){return this.emissions!==0}get camera(){return this._camera.value}set camera(e){this._camera.value=e,this._inverseViewport[0]=1/e.fullViewport[2],this._inverseViewport[1]=1/e.fullViewport[3]}get enableOITOffset(){return this.camera.relativeElevation<5e5}get inverseViewport(){return this._inverseViewport}get lighting(){return this._lighting}fadeLighting(){switch(this.clouds.fadeFactor){case 0:this._lighting=this._oldLighting;break;default:this._fadedLighting.lerpLighting(this._oldLighting,this._newLighting,this.clouds.fadeFactor),this._lighting=this._fadedLighting;break;case 1:this._lighting=this._newLighting,this._oldLighting.copyFrom(this._newLighting)}}updateLighting(e,t,n,r){this._oldLighting.copyFrom(this.lighting),this._newLighting.noonFactor=t,this._newLighting.globalFactor=n,this._newLighting.set(e),this._oldLighting.updateLegacy(),r===1&&this.clouds.requestFade(),this.fadeLighting()}get hasScreenSpaceReflections(){return i(this.output)&&this.screenSpaceReflections.enabled&&this.reprojection.lastFrameColor!=null}get highlight(){return this.highlightLevel==null?null:this.highlights[this.highlightLevel]}get depth(){return this._depth}set depth(e){e&&(e.name=`geometry depth`),this._depth=e}get occluder(){return this.slot===10||this.slot===11?this.slot:null}}export{u as BindParameters,l as ViewportSize};
2
+ import{releaseMaybe as e}from"../../../../core/maybe.js";import{signal as t}from"../../../../core/signal.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import r from"../../webgl/RenderCamera.js";import{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{CloudsParameters as a}from"../effects/clouds/CloudsParameters.js";import{ReprojectionUniforms as o}from"./ReprojectionUniforms.js";import{ScreenSpaceReflectionsUniforms as s}from"./ScreenSpaceReflectionsUniforms.js";import{SceneLighting as c}from"../lighting/SceneLighting.js";class l{constructor(e,t){this.width=e,this.height=t}}class u{constructor(e){this.shadowMap=e,this.output=0,this.slot=2,this.slicePlane=null,this.planarDistanceToGroundRatio=1,this.metersPerRenderUnit=1,this.hasOccludees=!1,this._emissions=t(0),this.transparentWithoutDepthEmissionDimmingPass=!1,this.useFloatBlend=t(!0),this.globalIlluminationDirectFactor=.8,this.globalIlluminationAmbientFactor=1,this.enableFillLights=!0,this.alignPixelEnabled=!1,this.decorations=!0,this.frameRendererTarget=0,this.overlayStretch=1,this.viewshedEnabled=!1,this.laserlinesEnabled=!1,this.shadowAnalysisEnabled=!1,this.cutFillComputationEnabled=!1,this.cutFillVisualizationEnabled=!1,this._camera=t(new r),this._inverseViewport=n(),this._oldLighting=new c,this._newLighting=new c,this._fadedLighting=new c,this._lighting=this._newLighting,this.screenSpaceReflections=new s,this.reprojection=new o,this.highlights=[],this.highlightMixOrigin=n(),this.highlightMixTexture=null,this.globalIlluminationEnabled=!1,this.hudRenderStyle=0,this.snowCover=0,this.clouds=new a,this.hasShadowHighlights=!1}destroy(){this._camera=this.contentCamera=null,this.mainDepth=this.overlay=this.ssao=this.shadowHighlight=null,this.depth=e(this.depth),this.shadowMap?.dispose()}get emissions(){return this._emissions.value}set emissions(e){this._emissions.value=e}get hasEmission(){switch(this.output){case 0:return this.hasOpaqueEmission;case 1:case 2:return this.hasTransparentEmission;default:return!1}}get hasOpaqueEmission(){return this.emissions===1||this.emissions===3}get hasTransparentEmission(){return this.emissions===2||this.emissions===3}get hasEmissions(){return this.emissions!==0}get camera(){return this._camera.value}set camera(e){this._camera.value=e,this._inverseViewport[0]=1/e.fullViewport[2],this._inverseViewport[1]=1/e.fullViewport[3]}get enableOITOffset(){return this.camera.relativeElevation<5e5}get inverseViewport(){return this._inverseViewport}get lighting(){return this._lighting}fadeLighting(){switch(this.clouds.fadeFactor){case 0:this._lighting=this._oldLighting;break;default:this._fadedLighting.lerpLighting(this._oldLighting,this._newLighting,this.clouds.fadeFactor),this._lighting=this._fadedLighting;break;case 1:this._lighting=this._newLighting,this._oldLighting.copyFrom(this._newLighting)}}updateLighting(e,t,n,r){this._oldLighting.copyFrom(this.lighting),this._newLighting.noonFactor=t,this._newLighting.globalFactor=n,this._newLighting.set(e),this._oldLighting.updateLegacy(),r===1&&this.clouds.requestFade(),this.fadeLighting()}get hasScreenSpaceReflections(){return i(this.output)&&this.screenSpaceReflections.enabled&&this.reprojection.lastFrameColor!=null}get highlight(){return this.highlightLevel==null?null:this.highlights[this.highlightLevel]}get depth(){return this._depth}set depth(e){e&&(e.name=`geometry depth`),this._depth=e}get occluder(){return this.slot===10||this.slot===11?this.slot:null}}export{u as BindParameters,l as ViewportSize};