@arcgis/core 6.0.0-next.47 → 6.0.0-next.49

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 (979) hide show
  1. package/Ground.js +1 -1
  2. package/PopupTemplate.js +1 -1
  3. package/analysis/AreaMeasurementAnalysis.d.ts +12 -10
  4. package/analysis/AreaMeasurementAnalysis.js +1 -1
  5. package/applications/Components/formatUtils.d.ts +3 -2
  6. package/applications/MapViewer/mediaUtils.js +1 -1
  7. package/applications/MapViewer/templateUtils.d.ts +4 -1
  8. package/applications/Play/transformToolUtils.d.ts +74 -0
  9. package/applications/Play/transformToolUtils.js +2 -0
  10. package/applications/SceneViewer/sceneViewerUtils.d.ts +12 -1
  11. package/applications/SceneViewer/sceneViewerUtils.js +1 -1
  12. package/arcade/featureset/actions/SpatialFilter.js +1 -1
  13. package/arcade/functions/featuresetgeom.js +1 -1
  14. package/arcade/functions/geomasync.js +1 -1
  15. package/arcade/geometry/operatorsWorker.js +1 -1
  16. package/arcade/geometry/operatorsWorkerConnection.js +1 -1
  17. package/arcgisGlobal.d.ts +6 -1
  18. package/assets/esri/core/workers/RemoteClient.js +1 -1
  19. package/assets/esri/core/workers/chunks/00331b59ca88e333fef8.js +1 -0
  20. package/assets/esri/core/workers/chunks/01f834149d0f89deaef8.js +1 -0
  21. package/assets/esri/core/workers/chunks/021bd07b9a3e70598840.js +1 -0
  22. package/assets/esri/core/workers/chunks/037c2d2ccb4bf4db4fec.js +1 -0
  23. package/assets/esri/core/workers/chunks/042d7669093a16d6e77e.js +1 -0
  24. package/assets/esri/core/workers/chunks/04ee9dc3e5a90d015f2f.js +1 -0
  25. package/assets/esri/core/workers/chunks/052b248db9ff46c6f36b.js +1 -0
  26. package/assets/esri/core/workers/chunks/05ec995edeb73ccba8b6.js +1 -0
  27. package/assets/esri/core/workers/chunks/0636a6629bd42b67ad00.js +1 -0
  28. package/assets/esri/core/workers/chunks/063cc462524646cd45e8.js +1 -0
  29. package/assets/esri/core/workers/chunks/06966406bee9c33beac7.js +1 -0
  30. package/assets/esri/core/workers/chunks/07ce1d788ed1c9b926db.js +2 -0
  31. package/assets/esri/core/workers/chunks/0a7d721d8ce5803124ed.js +1 -0
  32. package/assets/esri/core/workers/chunks/0c1f1eba7846a05c6fcc.js +1 -0
  33. package/assets/esri/core/workers/chunks/0c90f857976527db567e.js +1 -0
  34. package/assets/esri/core/workers/chunks/0d83237e9c7291ec3ef5.js +1 -0
  35. package/assets/esri/core/workers/chunks/0fd5ff5b6037c89257ec.js +1 -0
  36. package/assets/esri/core/workers/chunks/1053e9bc73cded8d403a.js +1 -0
  37. package/assets/esri/core/workers/chunks/110f78d5e78732750097.js +1 -0
  38. package/assets/esri/core/workers/chunks/119c62e9c9c7440a6129.js +1 -0
  39. package/assets/esri/core/workers/chunks/12add2003631fa314f25.js +1 -0
  40. package/assets/esri/core/workers/chunks/13a5d2c9d2ae6b0a297b.js +1 -0
  41. package/assets/esri/core/workers/chunks/1430be5ba5a20d587b37.js +1 -0
  42. package/assets/esri/core/workers/chunks/14a00ec7bc0f230d994c.js +1 -0
  43. package/assets/esri/core/workers/chunks/14bac20e21bad6bb95c8.js +1 -0
  44. package/assets/esri/core/workers/chunks/14c04fde8d33b739b415.js +1 -0
  45. package/assets/esri/core/workers/chunks/1680091022f0964d47b1.js +1 -0
  46. package/assets/esri/core/workers/chunks/16d0433d1b02606fdd00.js +1 -0
  47. package/assets/esri/core/workers/chunks/16e4686ec9e408716087.js +1 -0
  48. package/assets/esri/core/workers/chunks/1705e9d085499a854f14.js +1 -0
  49. package/assets/esri/core/workers/chunks/1908da6e2b1e5f6d2992.js +1 -0
  50. package/assets/esri/core/workers/chunks/1971dbb6ac3ce1d5e367.js +1 -0
  51. package/assets/esri/core/workers/chunks/1afe435a9a23858e694e.js +1 -0
  52. package/assets/esri/core/workers/chunks/1b4e53575290d7a3feb1.js +1 -0
  53. package/assets/esri/core/workers/chunks/1bde6b7b54f07573d031.js +1 -0
  54. package/assets/esri/core/workers/chunks/1c7a21387d11dc907ae4.js +1 -0
  55. package/assets/esri/core/workers/chunks/1c7bd11f6014ffe7aac5.js +1 -0
  56. package/assets/esri/core/workers/chunks/1d4db5c0de1b1440b7c8.js +1 -0
  57. package/assets/esri/core/workers/chunks/1d9e5298ee4309022ee1.js +1 -0
  58. package/assets/esri/core/workers/chunks/1e39f97cc9ffbc282ffe.js +1 -0
  59. package/assets/esri/core/workers/chunks/1f94ce4d7595018e7b90.js +1 -0
  60. package/assets/esri/core/workers/chunks/2019b43c545b01f2c3fd.js +1 -0
  61. package/assets/esri/core/workers/chunks/21911cdbbf068cbf8641.js +1 -0
  62. package/assets/esri/core/workers/chunks/21aa29039a95debd7f44.js +1 -0
  63. package/assets/esri/core/workers/chunks/22c131418a907bf09cc0.js +1 -0
  64. package/assets/esri/core/workers/chunks/230e5be597a8e8172513.js +1 -0
  65. package/assets/esri/core/workers/chunks/23ed0f61c49df3ae631e.js +1 -0
  66. package/assets/esri/core/workers/chunks/2415db54c6da71c857a6.js +1 -0
  67. package/assets/esri/core/workers/chunks/244816f7dc50581b826b.js +1 -0
  68. package/assets/esri/core/workers/chunks/2458d6504682c1877ddc.js +1 -0
  69. package/assets/esri/core/workers/chunks/2502688aa275d9064e78.js +1 -0
  70. package/assets/esri/core/workers/chunks/250e6c23dbf50dbcf749.js +1 -0
  71. package/assets/esri/core/workers/chunks/255f5b45c4d32f97f86c.js +1 -0
  72. package/assets/esri/core/workers/chunks/27a91b52d1bee92b6f20.js +1 -0
  73. package/assets/esri/core/workers/chunks/27dfc461e44b58e7fbc0.js +1 -0
  74. package/assets/esri/core/workers/chunks/28425ff10dc0b181a6ba.js +1 -0
  75. package/assets/esri/core/workers/chunks/297fc73f8018d870ab82.js +1 -0
  76. package/assets/esri/core/workers/chunks/29b74a3ff03d3c8b65dc.js +1 -0
  77. package/assets/esri/core/workers/chunks/2d106419cd3a161587bd.js +1 -0
  78. package/assets/esri/core/workers/chunks/2fcd168262942494452a.js +1 -0
  79. package/assets/esri/core/workers/chunks/2fe55882a9ff5a74867b.js +1 -0
  80. package/assets/esri/core/workers/chunks/31eb09e96f31bced71ad.js +1 -0
  81. package/assets/esri/core/workers/chunks/31f9d86b2a2bb05143b5.js +1 -0
  82. package/assets/esri/core/workers/chunks/{0ac38ca04285cd5ef1a0.js → 3236e18921955450fc0d.js} +41 -35
  83. package/assets/esri/core/workers/chunks/340a893f1003953adab7.js +1 -0
  84. package/assets/esri/core/workers/chunks/341970c3550c9ca3938d.js +1 -0
  85. package/assets/esri/core/workers/chunks/3695ed5d82ea1514147e.js +1 -0
  86. package/assets/esri/core/workers/chunks/3737025b8ed71099890f.js +1 -0
  87. package/assets/esri/core/workers/chunks/38b7ae210c9d39449853.js +1 -0
  88. package/assets/esri/core/workers/chunks/38ea54b715a08bd8d794.js +1 -0
  89. package/assets/esri/core/workers/chunks/3ab33631e0f6f8f2cbbc.js +1 -0
  90. package/assets/esri/core/workers/chunks/3ad149ec07285a3f5777.js +1 -0
  91. package/assets/esri/core/workers/chunks/3b434fc144f6b1a21f97.js +1 -0
  92. package/assets/esri/core/workers/chunks/3be49515f93ea3730be3.js +1 -0
  93. package/assets/esri/core/workers/chunks/3ce7120056040af3bab1.js +1 -0
  94. package/assets/esri/core/workers/chunks/3d9294dd813707e48e55.js +1 -0
  95. package/assets/esri/core/workers/chunks/3ddcf58242f02feea584.js +1 -0
  96. package/assets/esri/core/workers/chunks/3e4fda8f6fea1ce84712.js +1 -0
  97. package/assets/esri/core/workers/chunks/3e57f8128102a72e7930.js +1 -0
  98. package/assets/esri/core/workers/chunks/3e9a72ea2d6d37a543dd.js +1 -0
  99. package/assets/esri/core/workers/chunks/3fac9a1b43b1035b22d6.js +1 -0
  100. package/assets/esri/core/workers/chunks/3fdce20b9efc05dd1cbe.js +1 -0
  101. package/assets/esri/core/workers/chunks/40af4142bc92166aaaf2.js +1 -0
  102. package/assets/esri/core/workers/chunks/40b101a969ac2b113a99.js +1 -0
  103. package/assets/esri/core/workers/chunks/412c7d198ee121b34494.js +1 -0
  104. package/assets/esri/core/workers/chunks/41c9880c718f0aaba78a.js +1 -0
  105. package/assets/esri/core/workers/chunks/42953a1ea2872f087d25.js +1 -0
  106. package/assets/esri/core/workers/chunks/435dacf493aec07ff6e3.js +1 -0
  107. package/assets/esri/core/workers/chunks/45f02d1ec060615fa7c5.js +1 -0
  108. package/assets/esri/core/workers/chunks/4608f4ba5649f107827f.js +1 -0
  109. package/assets/esri/core/workers/chunks/476b42902f6d0cb03489.js +1 -0
  110. package/assets/esri/core/workers/chunks/47cd157c9d11986d8d3a.js +1 -0
  111. package/assets/esri/core/workers/chunks/4813bd8bff055eb29377.js +1 -0
  112. package/assets/esri/core/workers/chunks/48937df95a2e03412dfd.js +1 -0
  113. package/assets/esri/core/workers/chunks/48b60ff59afbae865de1.js +1 -0
  114. package/assets/esri/core/workers/chunks/49cde0a9b3f1c3965f26.js +1 -0
  115. package/assets/esri/core/workers/chunks/4a41bf3d1e2e9bb79771.js +2 -0
  116. package/assets/esri/core/workers/chunks/4a45f63b37f1e736e99d.js +1 -0
  117. package/assets/esri/core/workers/chunks/4c26d6408ee7a3b9d163.js +1 -0
  118. package/assets/esri/core/workers/chunks/4cf8bddc3e0619e34424.js +1 -0
  119. package/assets/esri/core/workers/chunks/4d2d9d4e31af8af43445.js +1 -0
  120. package/assets/esri/core/workers/chunks/4dc75d9c860177cfc012.js +1 -0
  121. package/assets/esri/core/workers/chunks/4e3414d75d8378490207.js +1 -0
  122. package/assets/esri/core/workers/chunks/4e4eedddd954f4ad3841.js +1 -0
  123. package/assets/esri/core/workers/chunks/50440f9865edd9b4851d.js +1 -0
  124. package/assets/esri/core/workers/chunks/506954fb374ea528d020.js +1 -0
  125. package/assets/esri/core/workers/chunks/5253933277d16dbe7ab6.js +1 -0
  126. package/assets/esri/core/workers/chunks/52f96030709bd29ef47d.js +1 -0
  127. package/assets/esri/core/workers/chunks/53277ccca55731e6eb36.js +1 -0
  128. package/assets/esri/core/workers/chunks/53daa71ecf0155eeb498.js +1 -0
  129. package/assets/esri/core/workers/chunks/5404ffa9aa1f3fa9973a.js +1 -0
  130. package/assets/esri/core/workers/chunks/54a99b10f2ecf76061af.js +1 -0
  131. package/assets/esri/core/workers/chunks/556f4ee089f71bf201c2.js +1 -0
  132. package/assets/esri/core/workers/chunks/55ac40a5257faf92c43d.js +1 -0
  133. package/assets/esri/core/workers/chunks/55d28d3f5b8ced061e39.js +1 -0
  134. package/assets/esri/core/workers/chunks/55db28616f810ca063b7.js +1 -0
  135. package/assets/esri/core/workers/chunks/560961eeacc861a690a1.js +1 -0
  136. package/assets/esri/core/workers/chunks/564b38915cc3a44a96ea.js +1 -0
  137. package/assets/esri/core/workers/chunks/5729baa3151ac10d0d04.js +1 -0
  138. package/assets/esri/core/workers/chunks/57cf2bd82b006e78f8e5.js +1 -0
  139. package/assets/esri/core/workers/chunks/5928c270c5bf4345dab5.js +1 -0
  140. package/assets/esri/core/workers/chunks/59ae5bd0ee1bae7a9fb3.js +1 -0
  141. package/assets/esri/core/workers/chunks/5af001311d2042f14738.js +1 -0
  142. package/assets/esri/core/workers/chunks/5afd379eaf3d37be0854.js +1 -0
  143. package/assets/esri/core/workers/chunks/5b2e95bd0f48f4b283bc.js +1 -0
  144. package/assets/esri/core/workers/chunks/5bda285f6ecf725676b3.js +1 -0
  145. package/assets/esri/core/workers/chunks/5bea201cb7e24b14b852.js +1 -0
  146. package/assets/esri/core/workers/chunks/5cd896edff4829aab42e.js +1 -0
  147. package/assets/esri/core/workers/chunks/5d14591449ef16c0976f.js +1 -0
  148. package/assets/esri/core/workers/chunks/5d3fa06eb5eb2b663a8f.js +1 -0
  149. package/assets/esri/core/workers/chunks/5d75fcaded78f76efd3e.js +1 -0
  150. package/assets/esri/core/workers/chunks/5e816e62664a9a968833.js +1 -0
  151. package/assets/esri/core/workers/chunks/6004a9582ffb96d31640.js +1 -0
  152. package/assets/esri/core/workers/chunks/6007b6b65154e477d96a.js +1 -0
  153. package/assets/esri/core/workers/chunks/6033eef7867f5c82fdc6.js +1 -0
  154. package/assets/esri/core/workers/chunks/60556278f4bfae63a49a.js +1 -0
  155. package/assets/esri/core/workers/chunks/621c5b3f1e29c17426e7.js +1 -0
  156. package/assets/esri/core/workers/chunks/6234a96aaf934ed36793.js +1 -0
  157. package/assets/esri/core/workers/chunks/6274f3192d2edbc2629e.js +1 -0
  158. package/assets/esri/core/workers/chunks/630a36c4817f33f4cad2.js +1 -0
  159. package/assets/esri/core/workers/chunks/641981a68199890bde27.js +1 -0
  160. package/assets/esri/core/workers/chunks/6538253abdafc8e6d112.js +1 -0
  161. package/assets/esri/core/workers/chunks/658eb6efe5c2210def01.js +1 -0
  162. package/assets/esri/core/workers/chunks/65a58ffdb651c948b52c.js +1 -0
  163. package/assets/esri/core/workers/chunks/6779afc2d6ee46c301b5.js +1 -0
  164. package/assets/esri/core/workers/chunks/690a3afeeb3dbd252524.js +1 -0
  165. package/assets/esri/core/workers/chunks/6a509ffb4852d694a097.js +1 -0
  166. package/assets/esri/core/workers/chunks/6ba6714da4dcb5a6fde4.js +1 -0
  167. package/assets/esri/core/workers/chunks/6bf81005fd647e3cc4bf.js +1 -0
  168. package/assets/esri/core/workers/chunks/6c20144cf05f29dd00fc.js +1 -0
  169. package/assets/esri/core/workers/chunks/6c21964eb7c25c8b1e9a.js +1 -0
  170. package/assets/esri/core/workers/chunks/6c4c06a4fa585f56e6a3.js +1 -0
  171. package/assets/esri/core/workers/chunks/6d25a7071fceb707858a.js +1 -0
  172. package/assets/esri/core/workers/chunks/6d30cf656be3bccd3ca7.js +1 -0
  173. package/assets/esri/core/workers/chunks/6d86eadd4d62c9218927.js +1 -0
  174. package/assets/esri/core/workers/chunks/6e30a6c3224207e13a7a.js +1 -0
  175. package/assets/esri/core/workers/chunks/70695e0fb53018d48e7b.js +2 -0
  176. package/assets/esri/core/workers/chunks/708ba5a28c093994c4bd.js +1 -0
  177. package/assets/esri/core/workers/chunks/72c66f2b5479a3f86b94.js +1 -0
  178. package/assets/esri/core/workers/chunks/72ef9199ded8deea05d1.js +1 -0
  179. package/assets/esri/core/workers/chunks/737b748d0fbfd2e0cf02.js +1 -0
  180. package/assets/esri/core/workers/chunks/755df811d724a46957c5.js +1 -0
  181. package/assets/esri/core/workers/chunks/7585a0d26bfe7efda194.js +1 -0
  182. package/assets/esri/core/workers/chunks/758fcf7000eb27ba75e2.js +1 -0
  183. package/assets/esri/core/workers/chunks/75bc76953bdb63a095e6.js +1 -0
  184. package/assets/esri/core/workers/chunks/762842aba4a1dd85db64.js +1 -0
  185. package/assets/esri/core/workers/chunks/765b18e66111d09447de.js +1 -0
  186. package/assets/esri/core/workers/chunks/766a1357be2ed7f4e125.js +1 -0
  187. package/assets/esri/core/workers/chunks/76e20d88983a77b003e1.js +1 -0
  188. package/assets/esri/core/workers/chunks/794f691166c0693993ac.js +1 -0
  189. package/assets/esri/core/workers/chunks/7960b6eb02fdaff6ada7.js +1 -0
  190. package/assets/esri/core/workers/chunks/7a97eec9823941fd210f.js +29 -0
  191. package/assets/esri/core/workers/chunks/7a98b29b3f82d82da1da.js +1 -0
  192. package/assets/esri/core/workers/chunks/7b29fc210b5878951cdc.js +1 -0
  193. package/assets/esri/core/workers/chunks/7ccec1d7e9aca860a150.js +1 -0
  194. package/assets/esri/core/workers/chunks/7d040257ebefcbe896c7.js +1 -0
  195. package/assets/esri/core/workers/chunks/7d74bcce7d8931f9486d.js +1 -0
  196. package/assets/esri/core/workers/chunks/80cf3a616922e3d15d67.js +1 -0
  197. package/assets/esri/core/workers/chunks/80da6d01bb1dcef9e004.js +1 -0
  198. package/assets/esri/core/workers/chunks/812cb2e9efc4d335e9e9.js +1 -0
  199. package/assets/esri/core/workers/chunks/8147bbc6c42d2071e149.js +1 -0
  200. package/assets/esri/core/workers/chunks/82bbf0c5e18fc1c795f4.js +1 -0
  201. package/assets/esri/core/workers/chunks/836b131247908097be7e.js +1 -0
  202. package/assets/esri/core/workers/chunks/837e421a81c7dae6b67c.js +1 -0
  203. package/assets/esri/core/workers/chunks/83bc862c242ff0629c8b.js +1 -0
  204. package/assets/esri/core/workers/chunks/840258be26978bc75609.js +1 -0
  205. package/assets/esri/core/workers/chunks/85979b277f282f4806fe.js +1 -0
  206. package/assets/esri/core/workers/chunks/85992d817e58af01fa70.js +1 -0
  207. package/assets/esri/core/workers/chunks/85d18a646f1c8e9e041d.js +1 -0
  208. package/assets/esri/core/workers/chunks/87c33e729d91fa119aa4.js +1 -0
  209. package/assets/esri/core/workers/chunks/892d99cc12110399fae3.js +1 -0
  210. package/assets/esri/core/workers/chunks/8b104a30814ecc0ef588.js +1 -0
  211. package/assets/esri/core/workers/chunks/8c0afb02e028a520cafc.js +1 -0
  212. package/assets/esri/core/workers/chunks/8c94e987754b3919181e.js +1 -0
  213. package/assets/esri/core/workers/chunks/91019e9dff63107f8cb4.js +1 -0
  214. package/assets/esri/core/workers/chunks/919115788da38049aea7.js +2 -0
  215. package/assets/esri/core/workers/chunks/9436749830e078ddba45.js +1 -0
  216. package/assets/esri/core/workers/chunks/954f9854a9bf4a852b81.js +1 -0
  217. package/assets/esri/core/workers/chunks/95784bb703ad5e9886d8.js +1 -0
  218. package/assets/esri/core/workers/chunks/96bbd5af1902cc7a0347.js +1 -0
  219. package/assets/esri/core/workers/chunks/972677041782aea9be46.js +1 -0
  220. package/assets/esri/core/workers/chunks/97cdcedfe853280f6258.js +1 -0
  221. package/assets/esri/core/workers/chunks/9846abf2d3991a15b2b5.js +1 -0
  222. package/assets/esri/core/workers/chunks/98af83f8126c043aa49c.js +1 -0
  223. package/assets/esri/core/workers/chunks/9a4498d5865c88a86755.js +1 -0
  224. package/assets/esri/core/workers/chunks/9b57dc3b74f43b2c17b3.js +1 -0
  225. package/assets/esri/core/workers/chunks/9bec57017e6c009b5d41.js +1 -0
  226. package/assets/esri/core/workers/chunks/9c52b6e951ec142653e0.js +1 -0
  227. package/assets/esri/core/workers/chunks/9cc0250d304d93f96c01.js +1 -0
  228. package/assets/esri/core/workers/chunks/9d0db1230a4b95c59f1e.js +1 -0
  229. package/assets/esri/core/workers/chunks/9d0dfc9765c1ce96a168.js +1 -0
  230. package/assets/esri/core/workers/chunks/9d1a6fb14475ce790149.js +1 -0
  231. package/assets/esri/core/workers/chunks/9d6d4fe9a73aa17a4840.js +1 -0
  232. package/assets/esri/core/workers/chunks/9dcf5be203f8b1e47d9d.js +1 -0
  233. package/assets/esri/core/workers/chunks/9eb00bb8dab995c2dcb3.js +1 -0
  234. package/assets/esri/core/workers/chunks/9f087fcaf30100e447d4.js +1 -0
  235. package/assets/esri/core/workers/chunks/9f63600039606e3ce5e0.js +1 -0
  236. package/assets/esri/core/workers/chunks/9f74b3f0f453bc957e3a.js +1 -0
  237. package/assets/esri/core/workers/chunks/9f8d5cc6c7c2c36c6c7b.js +1 -0
  238. package/assets/esri/core/workers/chunks/a0e2a1c6f37454547193.js +1 -0
  239. package/assets/esri/core/workers/chunks/a1c45e8f5bba471b3905.js +1 -0
  240. package/assets/esri/core/workers/chunks/a2825285d46f8cd5d814.js +1 -0
  241. package/assets/esri/core/workers/chunks/a2e25c964251c2f25340.js +1 -0
  242. package/assets/esri/core/workers/chunks/a3409f879cae2911ef3c.js +1 -0
  243. package/assets/esri/core/workers/chunks/a39c0ab14d6fe337f2f3.js +1 -0
  244. package/assets/esri/core/workers/chunks/a5ae717842c053f5bc9c.js +1 -0
  245. package/assets/esri/core/workers/chunks/a5fe0625f38f1b3f8c84.js +1 -0
  246. package/assets/esri/core/workers/chunks/a6a3d80e786edaa0156a.js +1 -0
  247. package/assets/esri/core/workers/chunks/a6b139e22bd0efe20b01.js +1 -0
  248. package/assets/esri/core/workers/chunks/a710c7a0584d9e45a469.js +1 -0
  249. package/assets/esri/core/workers/chunks/a7537388778e81c9d4b4.js +1 -0
  250. package/assets/esri/core/workers/chunks/a8314873ed823b6ac6d6.js +1 -0
  251. package/assets/esri/core/workers/chunks/a8bd42057e3543c17800.js +1 -0
  252. package/assets/esri/core/workers/chunks/a94291f7e98864091554.js +1 -0
  253. package/assets/esri/core/workers/chunks/a945f7f9504e9602b9b0.js +1 -0
  254. package/assets/esri/core/workers/chunks/a9f1d7e4432e74285a58.js +1 -0
  255. package/assets/esri/core/workers/chunks/aa1793102cb8e7c5b600.js +1 -0
  256. package/assets/esri/core/workers/chunks/aa702f65d735eb033812.js +1 -0
  257. package/assets/esri/core/workers/chunks/aae6a546d2aedc22debd.js +1 -0
  258. package/assets/esri/core/workers/chunks/ab78c25309395049d976.js +1 -0
  259. package/assets/esri/core/workers/chunks/ab7e6f8fff957daa2a33.js +1 -0
  260. package/assets/esri/core/workers/chunks/ab8476dfb0818fc388ba.js +1 -0
  261. package/assets/esri/core/workers/chunks/ad029f4f7c9b79fbce8d.js +1 -0
  262. package/assets/esri/core/workers/chunks/aed8a1a3843aabe819f2.js +1 -0
  263. package/assets/esri/core/workers/chunks/b33922def112150e565f.js +1 -0
  264. package/assets/esri/core/workers/chunks/b4fd8f232c3d09481127.js +1 -0
  265. package/assets/esri/core/workers/chunks/b511b5c68defefccde0b.js +1 -0
  266. package/assets/esri/core/workers/chunks/b51df1d7344d47a9b72a.js +1 -0
  267. package/assets/esri/core/workers/chunks/b58a003bd74f158cf62a.js +1 -0
  268. package/assets/esri/core/workers/chunks/b7c9f95af3473b005267.js +1 -0
  269. package/assets/esri/core/workers/chunks/b88e1084097a93a89f61.js +1 -0
  270. package/assets/esri/core/workers/chunks/b92b6dd6ca5c740bf509.js +1 -0
  271. package/assets/esri/core/workers/chunks/b9ccaaee349e058a78df.js +1 -0
  272. package/assets/esri/core/workers/chunks/ba80d7ac1074ba7530d4.js +1 -0
  273. package/assets/esri/core/workers/chunks/babb2683e688337ea054.js +1 -0
  274. package/assets/esri/core/workers/chunks/bafced37f9f20a4812d7.js +1 -0
  275. package/assets/esri/core/workers/chunks/bb3520800b085d43cd83.js +1 -0
  276. package/assets/esri/core/workers/chunks/bb3a0f07e1f758d82a81.js +1 -0
  277. package/assets/esri/core/workers/chunks/bbf28e8c5acd87771dc7.js +1 -0
  278. package/assets/esri/core/workers/chunks/bbf6c995039ade67de07.js +1 -0
  279. package/assets/esri/core/workers/chunks/bdaf880bf4663d8263cc.js +1 -0
  280. package/assets/esri/core/workers/chunks/bdc2617101988ab5e9f9.js +1 -0
  281. package/assets/esri/core/workers/chunks/bf81b3670b5323621e2d.js +1 -0
  282. package/assets/esri/core/workers/chunks/bfeb4b089dbd0165d2ab.js +1 -0
  283. package/assets/esri/core/workers/chunks/c117db5805b5ce292ac2.js +1 -0
  284. package/assets/esri/core/workers/chunks/c24d383a28da266922c2.js +1 -0
  285. package/assets/esri/core/workers/chunks/c36dd2f7f6ea1044cd62.js +1 -0
  286. package/assets/esri/core/workers/chunks/c3c0f24a9e0047232ae1.js +1 -0
  287. package/assets/esri/core/workers/chunks/c4794d692934098988e7.js +1 -0
  288. package/assets/esri/core/workers/chunks/c4974a4dc081e23899ba.js +1 -0
  289. package/assets/esri/core/workers/chunks/c6066041f8ca0dd94480.js +1 -0
  290. package/assets/esri/core/workers/chunks/c80c3b746c286f8b860a.js +1 -0
  291. package/assets/esri/core/workers/chunks/c85184baccb4004bf42b.js +1 -0
  292. package/assets/esri/core/workers/chunks/c945d36f5406ea4e4e3a.js +1 -0
  293. package/assets/esri/core/workers/chunks/ca1f98251f246d481ba2.js +1 -0
  294. package/assets/esri/core/workers/chunks/ca309b6aca9c0948ebae.js +1 -0
  295. package/assets/esri/core/workers/chunks/cbaade131e08ec123719.js +1 -0
  296. package/assets/esri/core/workers/chunks/cc834768685065ddc4c3.js +1 -0
  297. package/assets/esri/core/workers/chunks/cd21fc8eabb11e6ecdc8.js +1 -0
  298. package/assets/esri/core/workers/chunks/cd9100a7c8309dfa7569.js +1 -0
  299. package/assets/esri/core/workers/chunks/ce995e7c03e9e65c987a.js +1 -0
  300. package/assets/esri/core/workers/chunks/ced5dfb2bf46fc5eac8c.js +2 -0
  301. package/assets/esri/core/workers/chunks/cef537fa9705dd1cf685.js +1 -0
  302. package/assets/esri/core/workers/chunks/cf4b92ded0503f991c0e.js +1 -0
  303. package/assets/esri/core/workers/chunks/cf859cb25ceccba1588c.js +1 -0
  304. package/assets/esri/core/workers/chunks/d007762f05dbc9272587.js +1 -0
  305. package/assets/esri/core/workers/chunks/d036c6e9b7ef9f8434c8.js +1 -0
  306. package/assets/esri/core/workers/chunks/d0900a901197948bd7df.js +1 -0
  307. package/assets/esri/core/workers/chunks/d22a4124af837bae4c28.js +1 -0
  308. package/assets/esri/core/workers/chunks/d2ed93bbfa98395bbed7.js +1 -0
  309. package/assets/esri/core/workers/chunks/d3b646ca17b91e59bf48.js +1 -0
  310. package/assets/esri/core/workers/chunks/d486a8a61ff993f8202a.js +1 -0
  311. package/assets/esri/core/workers/chunks/d4a79c878e0a1a42fdc0.js +1 -0
  312. package/assets/esri/core/workers/chunks/d4b6ea046995dcb5872f.js +1 -0
  313. package/assets/esri/core/workers/chunks/d4d07419a4132f69941d.js +1 -0
  314. package/assets/esri/core/workers/chunks/d695d30949b881217bab.js +1 -0
  315. package/assets/esri/core/workers/chunks/d6a513171dcc14e52a84.js +1 -0
  316. package/assets/esri/core/workers/chunks/d82ff5c137227563c5dc.js +1 -0
  317. package/assets/esri/core/workers/chunks/d96e63d66f7b1f4ea54a.js +2 -0
  318. package/assets/esri/core/workers/chunks/da0e55fbc14502ce7c38.js +1 -0
  319. package/assets/esri/core/workers/chunks/da6328b16ef589c1d2ae.js +1 -0
  320. package/assets/esri/core/workers/chunks/da673ffb77ae29d361ae.js +1 -0
  321. package/assets/esri/core/workers/chunks/daa7b13e92230464850f.js +1 -0
  322. package/assets/esri/core/workers/chunks/dacbefe9706585e6c273.js +1 -0
  323. package/assets/esri/core/workers/chunks/db438bbfbb137bb4484e.js +1 -0
  324. package/assets/esri/core/workers/chunks/db66be88c52b1f5e5aad.js +1 -0
  325. package/assets/esri/core/workers/chunks/dc3206ae22700a216ec3.js +1 -0
  326. package/assets/esri/core/workers/chunks/dcc7b221c3fa712d0fd1.js +1 -0
  327. package/assets/esri/core/workers/chunks/dd744dcd5b8751b59c83.js +1 -0
  328. package/assets/esri/core/workers/chunks/de6b14d13977f967a627.js +1 -0
  329. package/assets/esri/core/workers/chunks/df968a32256df81c0f05.js +1 -0
  330. package/assets/esri/core/workers/chunks/e06036392a982dbf3ae3.js +1 -0
  331. package/assets/esri/core/workers/chunks/e0961f79f4f0dd68a4c6.js +1 -0
  332. package/assets/esri/core/workers/chunks/e1dfc05bebfbf4a2274e.js +1 -0
  333. package/assets/esri/core/workers/chunks/e4309f214162e9daa6ed.js +1 -0
  334. package/assets/esri/core/workers/chunks/e4a9a6dd8cc44a4b7f32.js +1 -0
  335. package/assets/esri/core/workers/chunks/e575375e7c43ec22f05e.js +1 -0
  336. package/assets/esri/core/workers/chunks/e80526571f1a34de3278.js +1 -0
  337. package/assets/esri/core/workers/chunks/e9376357f24e4f59c0ee.js +1 -0
  338. package/assets/esri/core/workers/chunks/e99d3d85b0f074a1dcd3.js +1 -0
  339. package/assets/esri/core/workers/chunks/ebbb1aed4cdbb41095d6.js +1 -0
  340. package/assets/esri/core/workers/chunks/ec334f87203096caef43.js +1 -0
  341. package/assets/esri/core/workers/chunks/ecd6743a95526e2c2cbe.js +1 -0
  342. package/assets/esri/core/workers/chunks/ecfa2a675da831ec99ff.js +1 -0
  343. package/assets/esri/core/workers/chunks/ed1db6571b0c61fe4f91.js +1 -0
  344. package/assets/esri/core/workers/chunks/edfb0a47ce9c3d89f833.js +1 -0
  345. package/assets/esri/core/workers/chunks/ee33e50a54752ac88d30.js +1 -0
  346. package/assets/esri/core/workers/chunks/ef353a93740a9d90cd8c.js +1 -0
  347. package/assets/esri/core/workers/chunks/ef928201beffbaa1c98d.js +1 -0
  348. package/assets/esri/core/workers/chunks/efadb45b4763c51e701b.js +1 -0
  349. package/assets/esri/core/workers/chunks/efe52385fe8efd933831.js +1 -0
  350. package/assets/esri/core/workers/chunks/f053cbfe671bd14c7d5b.js +1 -0
  351. package/assets/esri/core/workers/chunks/f10ccb31ed05c14a1740.js +1 -0
  352. package/assets/esri/core/workers/chunks/f3035559945bdd619544.js +1 -0
  353. package/assets/esri/core/workers/chunks/f3744b12a5d0d8ca8621.js +1 -0
  354. package/assets/esri/core/workers/chunks/f67b6f57d71ad09dca1f.js +1 -0
  355. package/assets/esri/core/workers/chunks/f7c84687a5e6e2072380.js +1 -0
  356. package/assets/esri/core/workers/chunks/f7ed22285229ff42e6ab.js +1 -0
  357. package/assets/esri/core/workers/chunks/f86d64f0adc7e23950a1.js +1 -0
  358. package/assets/esri/core/workers/chunks/f91682e4545b47b2d260.js +1 -0
  359. package/assets/esri/core/workers/chunks/f97dc99afe3375fc8e16.js +1 -0
  360. package/assets/esri/core/workers/chunks/f9dfa94f63a024d1860e.js +1 -0
  361. package/assets/esri/core/workers/chunks/facfea0ae3e204829326.js +1 -0
  362. package/assets/esri/core/workers/chunks/fba428cd4731872a74db.js +1 -0
  363. package/assets/esri/core/workers/chunks/fd64556a54111b4f37dd.js +1 -0
  364. package/assets/esri/core/workers/chunks/fd94fe2527f360af121e.js +1 -0
  365. package/assets/esri/core/workers/chunks/fe529524d1fca11e0f78.js +1 -0
  366. package/assets/esri/core/workers/chunks/fe811d651d201f698b8f.js +2 -0
  367. package/assets/esri/core/workers/chunks/ff7cd800558dd4aab51c.js +1 -0
  368. package/assets/esri/core/workers/chunks/ffac34a030dfe5cec258.js +1 -0
  369. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  370. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  371. package/chunks/BlendWeights.glsl.js +4 -5
  372. package/chunks/Blur.glsl.js +10 -7
  373. package/chunks/BlurEmission.glsl.js +27 -7
  374. package/chunks/CheckerBoard.glsl.js +1 -1
  375. package/chunks/Clouds.glsl.js +2 -2
  376. package/chunks/ColorMaterial.glsl.js +2 -1
  377. package/chunks/Component.glsl.js +48 -48
  378. package/chunks/DefaultMaterial.glsl.js +4 -6
  379. package/chunks/EdgeDetect.glsl.js +1 -1
  380. package/chunks/EdgeShader.glsl.js +1 -1
  381. package/chunks/EmissionComposite.glsl.js +2 -2
  382. package/chunks/Fog.glsl.js +4 -4
  383. package/chunks/GlobalIlluminationBlur.glsl.js +1 -1
  384. package/chunks/HighlightSharpApply.glsl.js +4 -1
  385. package/chunks/ImageMaterial.glsl.js +1 -1
  386. package/chunks/LineCallout.glsl.js +1 -1
  387. package/chunks/LineMarker.glsl.js +6 -5
  388. package/chunks/Magnifier.glsl.js +1 -1
  389. package/chunks/MeasurementArrow.glsl.js +1 -1
  390. package/chunks/NativeLine.glsl.js +1 -1
  391. package/chunks/NoiseTextureAtlas.glsl.js +3 -3
  392. package/chunks/Path.glsl.js +2 -2
  393. package/chunks/Pattern.glsl.js +35 -32
  394. package/chunks/{ChapmanAtmosphere.glsl.js → RealisticAtmosphere.glsl.js} +18 -9
  395. package/chunks/RealisticAtmosphereCompositing.glsl.js +35 -0
  396. package/chunks/RealisticTree.glsl.js +1 -1
  397. package/chunks/RibbonLine.glsl.js +1 -1
  398. package/chunks/SSAO.glsl.js +2 -2
  399. package/chunks/SimpleAtmosphere.glsl.js +1 -1
  400. package/chunks/SlicePlaneMaterial.glsl.js +1 -1
  401. package/chunks/Terrain.glsl.js +1 -1
  402. package/chunks/Water.glsl.js +1 -1
  403. package/chunks/lyr3DMain.js +1 -1
  404. package/chunks/lyr3DWorker.js +1 -1
  405. package/config.js +1 -1
  406. package/core/Logger.js +1 -1
  407. package/core/accessorSupport/ObservableBase.js +1 -1
  408. package/core/accessorSupport/tracking/ObservationHandle.js +1 -1
  409. package/core/accessorSupport/tracking/SimpleObservable.js +1 -1
  410. package/core/accessorSupport/tracking/SimpleTrackingTarget.js +1 -1
  411. package/core/accessorSupport/tracking/TrackingTarget.js +1 -1
  412. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  413. package/core/quantity.js +1 -1
  414. package/core/timeUtils.js +1 -1
  415. package/core/workers/Connection.d.ts +3 -9
  416. package/core/workers/WorkerFallback.js +2 -4
  417. package/core/workers/WorkerOwner.js +1 -1
  418. package/core/workers/workerFactory.js +1 -1
  419. package/core/workers/workers.js +1 -1
  420. package/core/workers.d.ts +1 -14
  421. package/form/FormTemplate.js +1 -1
  422. package/geometry/Mesh.js +1 -1
  423. package/geometry/coordinateConversion/CoordinateConversionModel.d.ts +258 -0
  424. package/geometry/coordinateConversion/CoordinateConversionModel.js +2 -0
  425. package/geometry/coordinateConversion/support/Conversion.d.ts +73 -0
  426. package/geometry/coordinateConversion/support/Conversion.js +2 -0
  427. package/geometry/coordinateConversion/support/Format.d.ts +131 -0
  428. package/geometry/coordinateConversion/support/Format.js +2 -0
  429. package/geometry/coordinateConversion/support/coordinateConversionUtils.js +2 -0
  430. package/geometry/coordinateConversion/support/formatUtils.js +2 -0
  431. package/geometry/coordinateConversion/types.d.ts +116 -0
  432. package/geometry/support/curves/bezierCurveUtils.js +1 -1
  433. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  434. package/geometry/support/meshUtils/rotate.js +1 -1
  435. package/interfaces.d.ts +1 -7
  436. package/kernel.js +1 -1
  437. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  438. package/layers/IntegratedMeshLayer.js +1 -1
  439. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  440. package/layers/ParquetLayer.d.ts +2 -3
  441. package/layers/VectorTileLayer.js +1 -1
  442. package/layers/catalog/CatalogFootprintLayer.d.ts +2 -2
  443. package/layers/graphics/data/QueryEngine.js +1 -1
  444. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  445. package/layers/knowledgeGraph/cypherUtils.js +1 -1
  446. package/layers/mixins/FeatureLayerBase.d.ts +2 -2
  447. package/layers/raster/formats/Lzw.js +1 -1
  448. package/layers/raster/formats/Raw.js +1 -1
  449. package/layers/raster/formats/TiffDecoder.js +1 -1
  450. package/layers/raster/formats/tiffParser.js +1 -1
  451. package/layers/raster/formats/tiffTag.js +1 -1
  452. package/layers/raster/functions/rasterProjectionHelper.js +1 -1
  453. package/layers/support/AggregateFieldsIndex.js +1 -1
  454. package/layers/support/FieldCollector.js +2 -0
  455. package/layers/support/IntegratedMeshSemantics.js +2 -0
  456. package/layers/support/VideoElement.js +1 -1
  457. package/layers/support/fieldUtils.d.ts +214 -1
  458. package/layers/support/fieldUtils.js +1 -1
  459. package/layers/support/relativeTimeQueryUtils.js +1 -1
  460. package/layers/support/types.d.ts +1 -2
  461. package/legend/ActiveLayerInfo.js +1 -1
  462. package/legend/LegendModel.js +1 -1
  463. package/legend/types.d.ts +15 -1
  464. package/package.json +2 -2
  465. package/renderers/ClassBreaksRenderer.js +1 -1
  466. package/renderers/DictionaryRenderer.js +1 -1
  467. package/renderers/DotDensityRenderer.js +1 -1
  468. package/renderers/HeatmapRenderer.js +1 -1
  469. package/renderers/PieChartRenderer.js +1 -1
  470. package/renderers/Renderer.js +1 -1
  471. package/renderers/SimpleRenderer.js +1 -1
  472. package/renderers/UniqueValueRenderer.js +1 -1
  473. package/renderers/mixins/VisualVariablesMixin.js +1 -1
  474. package/rest/print.js +1 -1
  475. package/symbols/CIMSymbol.js +1 -1
  476. package/symbols/FillSymbol3DLayer.d.ts +1 -4
  477. package/symbols/Symbol.js +1 -1
  478. package/symbols/cim/Rasterizer.js +1 -1
  479. package/symbols/cim/cimAnalyzer.js +1 -1
  480. package/symbols/support/FeatureExpressionInfo.js +1 -1
  481. package/time/daylightUtils.d.ts +29 -0
  482. package/time/daylightUtils.js +2 -0
  483. package/time/timeZoneUtils.js +1 -1
  484. package/time/types.d.ts +57 -1
  485. package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
  486. package/views/2d/analysis/AreaMeasurementAnalysisView2D.js +1 -1
  487. package/views/2d/engine/webgl/TextureManager.js +1 -1
  488. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  489. package/views/2d/engine/webgl/shaderGraph/techniques/markers/ComputedMarkerParams.js +1 -1
  490. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
  491. package/views/2d/interactive/editingTools/GraphicTransformTarget.js +2 -0
  492. package/views/2d/interactive/editingTools/MediaElementTransformTarget.js +2 -0
  493. package/views/2d/interactive/editingTools/MediaTransformToolsWrapper.js +1 -1
  494. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  495. package/views/2d/interactive/editingTools.js +1 -1
  496. package/views/2d/layers/GeospatialPDFLayerView2D.js +1 -1
  497. package/views/2d/layers/MediaLayerView2D.js +1 -1
  498. package/views/2d/layers/TileLayerView2D.js +1 -1
  499. package/views/2d/layers/support/MediaLayerInteraction.js +1 -1
  500. package/views/3d/GroundView3D.js +1 -1
  501. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  502. package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
  503. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  504. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  505. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementController.js +1 -1
  506. package/views/3d/glTF/internal/TextureTransformUtils.js +1 -1
  507. package/views/3d/interactive/Manipulator3D.js +1 -1
  508. package/views/3d/interactive/Manipulator3DBase.js +2 -0
  509. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  510. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  511. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  512. package/views/3d/layers/I3SMeshView3D.js +1 -1
  513. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  514. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  515. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  516. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  517. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  518. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  519. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  520. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  521. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  522. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  523. package/views/3d/layers/graphics/SymbolComplexity.js +1 -1
  524. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  525. package/views/3d/layers/graphics/webStyleUtils.js +1 -1
  526. package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
  527. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  528. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  529. package/views/3d/layers/support/SceneLayerViewRequiredFields.js +1 -1
  530. package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
  531. package/views/3d/layers/support/createFeatureFilterHighlight.js +1 -1
  532. package/views/3d/layers/support/patternUtils.js +1 -1
  533. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  534. package/views/3d/support/GroundAndIMSurface.js +1 -1
  535. package/views/3d/support/engineContent/line.js +1 -1
  536. package/views/3d/support/hitTest.js +1 -1
  537. package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
  538. package/views/3d/terrain/OverlayRenderer.js +1 -1
  539. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  540. package/views/3d/terrain/PatchRenderDataWaterproofness.js +1 -1
  541. package/views/3d/terrain/SphericalPatch.js +1 -1
  542. package/views/3d/terrain/TerrainSurface.js +1 -1
  543. package/views/3d/webgl-engine/collections/Component/ComponentDrawParameters.js +1 -1
  544. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  545. package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
  546. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  547. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialInitParameters.js +1 -1
  548. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
  549. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  550. package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
  551. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  552. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +8 -8
  553. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +2 -2
  554. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js +1 -1
  555. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js +1 -1
  556. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +6 -4
  557. package/views/3d/webgl-engine/core/shaderLibrary/shading/evaluateSceneLightingFragment.glsl.js +3 -2
  558. package/views/3d/webgl-engine/core/shaderLibrary/util/BlendModes.glsl.js +1 -1
  559. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +10 -9
  560. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js +1 -1
  561. package/views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js +1 -1
  562. package/views/3d/webgl-engine/effects/WeatherFader.js +1 -1
  563. package/views/3d/webgl-engine/effects/atmosphere/ChapmanApproximation.glsl.js +3 -3
  564. package/views/3d/webgl-engine/effects/atmosphere/{ChapmanAtmosphere.glsl.js → RealisticAtmosphere.glsl.js} +1 -1
  565. package/views/3d/webgl-engine/effects/atmosphere/RealisticAtmosphere.js +2 -0
  566. package/views/3d/webgl-engine/effects/atmosphere/RealisticAtmosphereCompositing.glsl.js +2 -0
  567. package/views/3d/webgl-engine/effects/atmosphere/RealisticAtmosphereCompositingTechnique.js +2 -0
  568. package/views/3d/webgl-engine/effects/atmosphere/RealisticAtmosphereTechnique.js +2 -0
  569. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  570. package/views/3d/webgl-engine/effects/glow/BlurEmission.glsl.js +1 -1
  571. package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +87 -41
  572. package/views/3d/webgl-engine/effects/precipitation/Precipitation.js +1 -1
  573. package/views/3d/webgl-engine/effects/snowcover/applySnow.glsl.js +4 -2
  574. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  575. package/views/3d/webgl-engine/lib/BufferGeometry.js +1 -1
  576. package/views/3d/webgl-engine/lib/EmissionComposite.glsl.js +1 -1
  577. package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
  578. package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
  579. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  580. package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
  581. package/views/3d/webgl-engine/lib/Material.js +1 -1
  582. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  583. package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
  584. package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
  585. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  586. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  587. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  588. package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
  589. package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
  590. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  591. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  592. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  593. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  594. package/views/3d/webgl-engine/materials/internal/ribbonLineBufferUtils.js +1 -1
  595. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  596. package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
  597. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +14 -13
  598. package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
  599. package/views/3d/webgl-engine/shaders/PatternLayouts.js +1 -1
  600. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  601. package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
  602. package/views/SceneView.js +1 -1
  603. package/views/VideoView.js +1 -1
  604. package/views/interactive/Tooltip.js +1 -1
  605. package/views/interactive/keybindings.d.ts +67 -0
  606. package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
  607. package/views/interactive/snapping/SnappingAlgorithm.js +1 -1
  608. package/views/interactive/tooltip/content/TooltipContent.js +1 -1
  609. package/views/layers/FeatureLikeLayerView.js +1 -1
  610. package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
  611. package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +3 -0
  612. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  613. package/widgets/CoordinateConversion.js +1 -1
  614. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  615. package/widgets/Sketch/SketchViewModel.js +1 -1
  616. package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
  617. package/assets/esri/core/workers/chunks/00620a90b32352bcdc71.js +0 -1
  618. package/assets/esri/core/workers/chunks/01a24ae6e3d730e193e2.js +0 -1
  619. package/assets/esri/core/workers/chunks/0284f608d25c654fcc11.js +0 -1
  620. package/assets/esri/core/workers/chunks/02debe67e6fef9d88bdd.js +0 -1
  621. package/assets/esri/core/workers/chunks/02feb2550b6878e62e2d.js +0 -1
  622. package/assets/esri/core/workers/chunks/035204000954973b0ebc.js +0 -1
  623. package/assets/esri/core/workers/chunks/04a1d08c3b5b1dc7628f.js +0 -1
  624. package/assets/esri/core/workers/chunks/05225506fdba0c827407.js +0 -1
  625. package/assets/esri/core/workers/chunks/0523f893870a1546d7d9.js +0 -1
  626. package/assets/esri/core/workers/chunks/06101f3da5e2fc708402.js +0 -1
  627. package/assets/esri/core/workers/chunks/06326c8cbe0d644eca16.js +0 -1
  628. package/assets/esri/core/workers/chunks/075fe33152fd79fe6d72.js +0 -1
  629. package/assets/esri/core/workers/chunks/077b755688346e0dc8d3.js +0 -1
  630. package/assets/esri/core/workers/chunks/0864da8f8f147016cf1c.js +0 -1
  631. package/assets/esri/core/workers/chunks/08fe248e412bb170210d.js +0 -1
  632. package/assets/esri/core/workers/chunks/090a7d0b0128d20879be.js +0 -1
  633. package/assets/esri/core/workers/chunks/0979a48905742486f222.js +0 -1
  634. package/assets/esri/core/workers/chunks/0ac4a3029ba17a9e2492.js +0 -1
  635. package/assets/esri/core/workers/chunks/0ae2933ab9b4a6ca56f2.js +0 -1
  636. package/assets/esri/core/workers/chunks/0b480583373b69773333.js +0 -1
  637. package/assets/esri/core/workers/chunks/0b6941781e35ce0f7274.js +0 -1
  638. package/assets/esri/core/workers/chunks/0bfc4e7640058811e10c.js +0 -1
  639. package/assets/esri/core/workers/chunks/0c1d8e0c2eae21f97fc0.js +0 -1
  640. package/assets/esri/core/workers/chunks/0da6abe3ceabfe78f7a0.js +0 -1
  641. package/assets/esri/core/workers/chunks/0dc1ac5531f7c8854686.js +0 -1
  642. package/assets/esri/core/workers/chunks/0e57bac610d41c7c9ad4.js +0 -1
  643. package/assets/esri/core/workers/chunks/0fda0d8b0eaeed2ab39d.js +0 -1
  644. package/assets/esri/core/workers/chunks/10ad7b35b6800d40444e.js +0 -1
  645. package/assets/esri/core/workers/chunks/116293b1ee788a89ce1e.js +0 -1
  646. package/assets/esri/core/workers/chunks/11877d4dc97f756e4711.js +0 -1
  647. package/assets/esri/core/workers/chunks/11e313dfca2579e68419.js +0 -1
  648. package/assets/esri/core/workers/chunks/12a08d0ad0f5fea32642.js +0 -1
  649. package/assets/esri/core/workers/chunks/13b40a611224ff5f4697.js +0 -1
  650. package/assets/esri/core/workers/chunks/13c64087be3b2985a21b.js +0 -1
  651. package/assets/esri/core/workers/chunks/14ef986665b4a1f6ccdc.js +0 -1
  652. package/assets/esri/core/workers/chunks/158cbf4075d3eca83a6a.js +0 -1
  653. package/assets/esri/core/workers/chunks/15a18c803a3aafa9a65b.js +0 -1
  654. package/assets/esri/core/workers/chunks/15a7a3264915fc8d3188.js +0 -1
  655. package/assets/esri/core/workers/chunks/15f2b27b8edc0d53e399.js +0 -1
  656. package/assets/esri/core/workers/chunks/162de06e54c0f9cba012.js +0 -1
  657. package/assets/esri/core/workers/chunks/17c6d66b47aa690df0d4.js +0 -1
  658. package/assets/esri/core/workers/chunks/17f99b130384c1ff2e01.js +0 -1
  659. package/assets/esri/core/workers/chunks/181d24ced5ef6b1f959b.js +0 -1
  660. package/assets/esri/core/workers/chunks/18e7fa4d3e0b1a084cc6.js +0 -1
  661. package/assets/esri/core/workers/chunks/1ae0c9345626e70affd3.js +0 -2
  662. package/assets/esri/core/workers/chunks/1c61ced6079443fc0ce8.js +0 -1
  663. package/assets/esri/core/workers/chunks/1c94d4d79952dc4067be.js +0 -1
  664. package/assets/esri/core/workers/chunks/1ca9f823caff691e964d.js +0 -1
  665. package/assets/esri/core/workers/chunks/1d9b0db37d5f3819ffca.js +0 -1
  666. package/assets/esri/core/workers/chunks/1e37337f47f45d6d8005.js +0 -1
  667. package/assets/esri/core/workers/chunks/1eaaa896eea3f2ffe6a6.js +0 -1
  668. package/assets/esri/core/workers/chunks/1f51567f47c2e2fc8a23.js +0 -1
  669. package/assets/esri/core/workers/chunks/200da109115eab8b2480.js +0 -1
  670. package/assets/esri/core/workers/chunks/2050c844b5a29b1df28a.js +0 -1
  671. package/assets/esri/core/workers/chunks/21939ef53bc71b42370f.js +0 -1
  672. package/assets/esri/core/workers/chunks/21a4c3d8265aca775616.js +0 -1
  673. package/assets/esri/core/workers/chunks/230189a28552ab00546d.js +0 -1
  674. package/assets/esri/core/workers/chunks/23fff0505e02fd364909.js +0 -1
  675. package/assets/esri/core/workers/chunks/244ffdb91237d1cbade3.js +0 -1
  676. package/assets/esri/core/workers/chunks/24bdeafbb16ae83bb8c3.js +0 -1
  677. package/assets/esri/core/workers/chunks/2515ce2ef279cdd4d5fa.js +0 -1
  678. package/assets/esri/core/workers/chunks/2671035cc08027185737.js +0 -1
  679. package/assets/esri/core/workers/chunks/271ae7deccb94112c2df.js +0 -1
  680. package/assets/esri/core/workers/chunks/27a5c6be4f847900d6ed.js +0 -1
  681. package/assets/esri/core/workers/chunks/27f0bbde1e9fa3f06d46.js +0 -1
  682. package/assets/esri/core/workers/chunks/286e3e050b29e6158e6f.js +0 -1
  683. package/assets/esri/core/workers/chunks/29a437a2b7b3a9b3e104.js +0 -1
  684. package/assets/esri/core/workers/chunks/2a224bc845c9bf682c54.js +0 -1
  685. package/assets/esri/core/workers/chunks/2a8168e109caa87d596f.js +0 -1
  686. package/assets/esri/core/workers/chunks/2ad69cc496235702bbf2.js +0 -1
  687. package/assets/esri/core/workers/chunks/2b06e8507d71c4d9b5b5.js +0 -1
  688. package/assets/esri/core/workers/chunks/2b4dd42920d37b1ff0a9.js +0 -2
  689. package/assets/esri/core/workers/chunks/2bdd5f0e0364b9e5f52b.js +0 -1
  690. package/assets/esri/core/workers/chunks/2c619c50cdcc37652c0b.js +0 -1
  691. package/assets/esri/core/workers/chunks/2c7f3fb74a076acf9b30.js +0 -1
  692. package/assets/esri/core/workers/chunks/2e9a1673b1d51aa082b6.js +0 -1
  693. package/assets/esri/core/workers/chunks/2e9d2f0a4e3c84d2ac2e.js +0 -1
  694. package/assets/esri/core/workers/chunks/30c5b584e8658b2b3607.js +0 -1
  695. package/assets/esri/core/workers/chunks/30e20461958951a31a5c.js +0 -1
  696. package/assets/esri/core/workers/chunks/31ef7b7074b3e3829763.js +0 -1
  697. package/assets/esri/core/workers/chunks/32b9bedd4bb0504f0b1d.js +0 -1
  698. package/assets/esri/core/workers/chunks/32ba94e59b411d3ff063.js +0 -1
  699. package/assets/esri/core/workers/chunks/3463b52d633a9336af28.js +0 -1
  700. package/assets/esri/core/workers/chunks/348f1def9cd2ddf92e87.js +0 -1
  701. package/assets/esri/core/workers/chunks/348f28d7ab46df878c6f.js +0 -1
  702. package/assets/esri/core/workers/chunks/3537fe95b83a13b156cc.js +0 -1
  703. package/assets/esri/core/workers/chunks/35426786de409d42a87f.js +0 -1
  704. package/assets/esri/core/workers/chunks/359ab29c4509dce0ffbd.js +0 -1
  705. package/assets/esri/core/workers/chunks/35f8896b52adaf952657.js +0 -1
  706. package/assets/esri/core/workers/chunks/365825c51fad1bb7f51f.js +0 -1
  707. package/assets/esri/core/workers/chunks/369780276b2755361f7d.js +0 -1
  708. package/assets/esri/core/workers/chunks/377158a19c9d6ef11387.js +0 -1
  709. package/assets/esri/core/workers/chunks/394b329e64d880cdb500.js +0 -1
  710. package/assets/esri/core/workers/chunks/39c23a52d7c3e1ee121c.js +0 -1
  711. package/assets/esri/core/workers/chunks/3a295fab549ae3caf9df.js +0 -1
  712. package/assets/esri/core/workers/chunks/3a3b57abfb92494cac84.js +0 -1
  713. package/assets/esri/core/workers/chunks/3a8320a40916c755c031.js +0 -1
  714. package/assets/esri/core/workers/chunks/3bb1e06861cd0563ed9f.js +0 -1
  715. package/assets/esri/core/workers/chunks/3cbb3c4e0e60a874ac6d.js +0 -1
  716. package/assets/esri/core/workers/chunks/3e67d50a2b2f8f837831.js +0 -29
  717. package/assets/esri/core/workers/chunks/3f92afa58c895bf87e62.js +0 -1
  718. package/assets/esri/core/workers/chunks/3fe04f13215474accb09.js +0 -1
  719. package/assets/esri/core/workers/chunks/3fe4c89acd325d36618d.js +0 -1
  720. package/assets/esri/core/workers/chunks/40748b846cf6923478c9.js +0 -1
  721. package/assets/esri/core/workers/chunks/4136c4de42b8818e2710.js +0 -1
  722. package/assets/esri/core/workers/chunks/41d674e73b57c8abe838.js +0 -1
  723. package/assets/esri/core/workers/chunks/422784ceae0d511868a0.js +0 -1
  724. package/assets/esri/core/workers/chunks/425347186c279bcc595c.js +0 -1
  725. package/assets/esri/core/workers/chunks/42eec0421e3663019549.js +0 -1
  726. package/assets/esri/core/workers/chunks/434a7ef5b25d83593b50.js +0 -1
  727. package/assets/esri/core/workers/chunks/4521f72ab0ea872e5d7c.js +0 -1
  728. package/assets/esri/core/workers/chunks/46d0db736c6e7decbcf6.js +0 -1
  729. package/assets/esri/core/workers/chunks/474015def9652ddf0640.js +0 -1
  730. package/assets/esri/core/workers/chunks/478a89317a12e9b4d146.js +0 -1
  731. package/assets/esri/core/workers/chunks/47af220003adfca2167e.js +0 -1
  732. package/assets/esri/core/workers/chunks/4869e097261ded90b8bb.js +0 -1
  733. package/assets/esri/core/workers/chunks/489b37c459e1af116aeb.js +0 -1
  734. package/assets/esri/core/workers/chunks/49c21c11621ff077e401.js +0 -1
  735. package/assets/esri/core/workers/chunks/4a8903fb1a5d30a68df9.js +0 -1
  736. package/assets/esri/core/workers/chunks/4ba856605f711b615e4c.js +0 -1
  737. package/assets/esri/core/workers/chunks/4d62877f521cc9663535.js +0 -1
  738. package/assets/esri/core/workers/chunks/4d7063c4152953afb859.js +0 -1
  739. package/assets/esri/core/workers/chunks/4d818b231e6d1fa73cc5.js +0 -1
  740. package/assets/esri/core/workers/chunks/4eab4e74c6a479c5f930.js +0 -1
  741. package/assets/esri/core/workers/chunks/4f3e0d583cfa9d1d6727.js +0 -2
  742. package/assets/esri/core/workers/chunks/4f4bc4f809b8936cd010.js +0 -1
  743. package/assets/esri/core/workers/chunks/4f8a915795f107b772c5.js +0 -1
  744. package/assets/esri/core/workers/chunks/503ee206e7de1f65e291.js +0 -1
  745. package/assets/esri/core/workers/chunks/50b8b1cce0a5f77c8372.js +0 -1
  746. package/assets/esri/core/workers/chunks/52a0aa2d19a495e48ab1.js +0 -1
  747. package/assets/esri/core/workers/chunks/5565b4e7c31d31a7e546.js +0 -1
  748. package/assets/esri/core/workers/chunks/561c48cb4d49b150765b.js +0 -1
  749. package/assets/esri/core/workers/chunks/5622f3faa59434772857.js +0 -1
  750. package/assets/esri/core/workers/chunks/5736feefa261589b6273.js +0 -1
  751. package/assets/esri/core/workers/chunks/5744c7350e4e2eb73aa9.js +0 -1
  752. package/assets/esri/core/workers/chunks/5788c5ab258b36c8a897.js +0 -1
  753. package/assets/esri/core/workers/chunks/57e0bf4be8a166d5b1eb.js +0 -1
  754. package/assets/esri/core/workers/chunks/5864bce1498a13ee5b7e.js +0 -2
  755. package/assets/esri/core/workers/chunks/590fe0f56bc4c33a50e7.js +0 -1
  756. package/assets/esri/core/workers/chunks/5b1cebae74c7214ccda9.js +0 -1
  757. package/assets/esri/core/workers/chunks/5b3db2c40feaefb7cbc0.js +0 -1
  758. package/assets/esri/core/workers/chunks/5ba40e98e9300d1ebc85.js +0 -1
  759. package/assets/esri/core/workers/chunks/5be386b3af867b19ff39.js +0 -1
  760. package/assets/esri/core/workers/chunks/5c2e79f2ca401741bf3e.js +0 -1
  761. package/assets/esri/core/workers/chunks/5c3aa8386705c5e40358.js +0 -1
  762. package/assets/esri/core/workers/chunks/5c9ab86bec07264dc9f2.js +0 -1
  763. package/assets/esri/core/workers/chunks/5e6d6676a5c47c0e132a.js +0 -1
  764. package/assets/esri/core/workers/chunks/5fbd7d8d8896a224fff3.js +0 -1
  765. package/assets/esri/core/workers/chunks/60137300db0e0c3caf13.js +0 -1
  766. package/assets/esri/core/workers/chunks/6061232c96e11eb7b25d.js +0 -1
  767. package/assets/esri/core/workers/chunks/606ea251075fe81a1206.js +0 -1
  768. package/assets/esri/core/workers/chunks/608be1172a908e92b9f1.js +0 -1
  769. package/assets/esri/core/workers/chunks/6268aadb24e0b7c8d207.js +0 -1
  770. package/assets/esri/core/workers/chunks/62a0abcf45a2bd14ecbe.js +0 -1
  771. package/assets/esri/core/workers/chunks/63d2645a744dce469bbb.js +0 -1
  772. package/assets/esri/core/workers/chunks/64382363d6dc04ff1eac.js +0 -1
  773. package/assets/esri/core/workers/chunks/649e4ecb1d9e6da3fcd7.js +0 -1
  774. package/assets/esri/core/workers/chunks/6604272ef6fe85279032.js +0 -1
  775. package/assets/esri/core/workers/chunks/6637fb99033bfa7646d4.js +0 -1
  776. package/assets/esri/core/workers/chunks/66539ab0d88b47326ce9.js +0 -1
  777. package/assets/esri/core/workers/chunks/67f54efc817b241f8746.js +0 -1
  778. package/assets/esri/core/workers/chunks/68b4ce0b2e754ac2e552.js +0 -1
  779. package/assets/esri/core/workers/chunks/69b73251257088ce7099.js +0 -1
  780. package/assets/esri/core/workers/chunks/69c338d1d359075371bc.js +0 -1
  781. package/assets/esri/core/workers/chunks/6b646971cc15e33a9f33.js +0 -1
  782. package/assets/esri/core/workers/chunks/6cd17c3a254a0b5c2476.js +0 -1
  783. package/assets/esri/core/workers/chunks/6d863761f29f31a030eb.js +0 -1
  784. package/assets/esri/core/workers/chunks/7027a0e7bfabb3bb7fc2.js +0 -1
  785. package/assets/esri/core/workers/chunks/711cfb84659cb4437679.js +0 -1
  786. package/assets/esri/core/workers/chunks/72020d86e3fc7ecc139f.js +0 -1
  787. package/assets/esri/core/workers/chunks/72f4dad65e16a7d7c58f.js +0 -1
  788. package/assets/esri/core/workers/chunks/72f716a841463e0ba23f.js +0 -1
  789. package/assets/esri/core/workers/chunks/73ab4f0275a85b9671ec.js +0 -1
  790. package/assets/esri/core/workers/chunks/751a21288cf161b94a54.js +0 -1
  791. package/assets/esri/core/workers/chunks/7672c123cfb960f4ddad.js +0 -1
  792. package/assets/esri/core/workers/chunks/76dc8e3264a456f33e61.js +0 -1
  793. package/assets/esri/core/workers/chunks/77463141652bf1ca6fb2.js +0 -1
  794. package/assets/esri/core/workers/chunks/776b64a1e1a57878c34c.js +0 -1
  795. package/assets/esri/core/workers/chunks/77d80b6d65d761214a7c.js +0 -1
  796. package/assets/esri/core/workers/chunks/792d2b62356a1d953c88.js +0 -1
  797. package/assets/esri/core/workers/chunks/79483c05867ba1386f5a.js +0 -1
  798. package/assets/esri/core/workers/chunks/7aa9b61ca9b66f30449f.js +0 -1
  799. package/assets/esri/core/workers/chunks/7b7208237123e948f170.js +0 -1
  800. package/assets/esri/core/workers/chunks/7c75a8ee266c36baa902.js +0 -1
  801. package/assets/esri/core/workers/chunks/7d866911d1171d25ca78.js +0 -1
  802. package/assets/esri/core/workers/chunks/7db9e615e60d824eac1b.js +0 -1
  803. package/assets/esri/core/workers/chunks/7ddbde8fdd1cf3c53f50.js +0 -1
  804. package/assets/esri/core/workers/chunks/7eddde6c4249f46c67f3.js +0 -1
  805. package/assets/esri/core/workers/chunks/8102f0bf5707c3be3310.js +0 -1
  806. package/assets/esri/core/workers/chunks/8140ed6e44c3d8536d3e.js +0 -1
  807. package/assets/esri/core/workers/chunks/82160bd873cdb5a23557.js +0 -1
  808. package/assets/esri/core/workers/chunks/82e238375582f90dc94c.js +0 -1
  809. package/assets/esri/core/workers/chunks/831d896587d10fb689dc.js +0 -1
  810. package/assets/esri/core/workers/chunks/834bbda7719b04301f74.js +0 -1
  811. package/assets/esri/core/workers/chunks/835ccd95f2d312ecda5a.js +0 -1
  812. package/assets/esri/core/workers/chunks/8385bede56cc95d1a388.js +0 -1
  813. package/assets/esri/core/workers/chunks/85cd525705eec6803dd3.js +0 -1
  814. package/assets/esri/core/workers/chunks/85ec73dcba4b922f1948.js +0 -1
  815. package/assets/esri/core/workers/chunks/8766832c7253557da8fe.js +0 -1
  816. package/assets/esri/core/workers/chunks/892fd2c3533ce46a9258.js +0 -1
  817. package/assets/esri/core/workers/chunks/89cc1a5539b82fb46216.js +0 -1
  818. package/assets/esri/core/workers/chunks/89e9ebc8d5c1022cb265.js +0 -1
  819. package/assets/esri/core/workers/chunks/8a8c9a3969b7016c20d9.js +0 -1
  820. package/assets/esri/core/workers/chunks/8c1ae93dae934aedc6dc.js +0 -1
  821. package/assets/esri/core/workers/chunks/8cc8d7ffe43f5947b04f.js +0 -1
  822. package/assets/esri/core/workers/chunks/8cddfdbab3ad3809462f.js +0 -1
  823. package/assets/esri/core/workers/chunks/8cec3f48e995aab3d62e.js +0 -1
  824. package/assets/esri/core/workers/chunks/8e7a3b1b088c160f4db7.js +0 -1
  825. package/assets/esri/core/workers/chunks/8f1dd383502432d8a039.js +0 -1
  826. package/assets/esri/core/workers/chunks/90a7cd7564f2a92199cc.js +0 -1
  827. package/assets/esri/core/workers/chunks/914a0b5d9fef683cdf9c.js +0 -1
  828. package/assets/esri/core/workers/chunks/921917e53bac82693ec8.js +0 -1
  829. package/assets/esri/core/workers/chunks/926e0a3827eaf16ca8b4.js +0 -1
  830. package/assets/esri/core/workers/chunks/92809b209b68abcb97ee.js +0 -1
  831. package/assets/esri/core/workers/chunks/929ca32ddbb43328ef31.js +0 -1
  832. package/assets/esri/core/workers/chunks/92b03de8a7686b164f60.js +0 -1
  833. package/assets/esri/core/workers/chunks/98957dba728c93506e50.js +0 -1
  834. package/assets/esri/core/workers/chunks/98e3f7ab4bfbabf0b952.js +0 -1
  835. package/assets/esri/core/workers/chunks/99a72b65afdcd3ee091a.js +0 -1
  836. package/assets/esri/core/workers/chunks/99ffb839407cb3c26ad8.js +0 -1
  837. package/assets/esri/core/workers/chunks/9b048f80c2d28d527373.js +0 -1
  838. package/assets/esri/core/workers/chunks/9b517c8d26a86dedb921.js +0 -1
  839. package/assets/esri/core/workers/chunks/9bb90097368b200fa730.js +0 -1
  840. package/assets/esri/core/workers/chunks/9bf77f92760aacbd636f.js +0 -1
  841. package/assets/esri/core/workers/chunks/9c2436464b7dfd666678.js +0 -1
  842. package/assets/esri/core/workers/chunks/9c3f56f22e9baa80a387.js +0 -1
  843. package/assets/esri/core/workers/chunks/9d0ee6a816bb72068ab1.js +0 -1
  844. package/assets/esri/core/workers/chunks/9e7622379d777ea88018.js +0 -1
  845. package/assets/esri/core/workers/chunks/9fb4c10d5b3e32bc86e9.js +0 -1
  846. package/assets/esri/core/workers/chunks/a02c3c23bd87e0470b8b.js +0 -1
  847. package/assets/esri/core/workers/chunks/a1602995ef96beb7df29.js +0 -1
  848. package/assets/esri/core/workers/chunks/a553478664a688f32488.js +0 -1
  849. package/assets/esri/core/workers/chunks/a83815c028c9c80aa4c9.js +0 -1
  850. package/assets/esri/core/workers/chunks/a8bedc53d4a316953108.js +0 -1
  851. package/assets/esri/core/workers/chunks/a8fbef765a6fb68e1115.js +0 -1
  852. package/assets/esri/core/workers/chunks/a95186214f1206efd8ed.js +0 -1
  853. package/assets/esri/core/workers/chunks/aa4f3751f0d830113bed.js +0 -1
  854. package/assets/esri/core/workers/chunks/aa8ab28e0c1ae3b55ac0.js +0 -1
  855. package/assets/esri/core/workers/chunks/aaac620f93a20fbd3f08.js +0 -1
  856. package/assets/esri/core/workers/chunks/ab60e8fbe0f92340616a.js +0 -1
  857. package/assets/esri/core/workers/chunks/ab684cce869973ea71cf.js +0 -1
  858. package/assets/esri/core/workers/chunks/aba42885c5d6b2b5fe7f.js +0 -1
  859. package/assets/esri/core/workers/chunks/ac10c7d2c4829a150037.js +0 -1
  860. package/assets/esri/core/workers/chunks/ac69c0fd5867b493f1d2.js +0 -1
  861. package/assets/esri/core/workers/chunks/ad787100602e18dde650.js +0 -1
  862. package/assets/esri/core/workers/chunks/ae29fec228e70a93ced1.js +0 -1
  863. package/assets/esri/core/workers/chunks/ae40eac1eadd1a537bf4.js +0 -1
  864. package/assets/esri/core/workers/chunks/ae70972bf88d586fd453.js +0 -1
  865. package/assets/esri/core/workers/chunks/af3c6794334626b94f00.js +0 -1
  866. package/assets/esri/core/workers/chunks/af70a81620203c030f5b.js +0 -1
  867. package/assets/esri/core/workers/chunks/afc8a9847f31bb66b13b.js +0 -1
  868. package/assets/esri/core/workers/chunks/b021fa4654ede1d04279.js +0 -1
  869. package/assets/esri/core/workers/chunks/b10850c48f4eee60b8a9.js +0 -1
  870. package/assets/esri/core/workers/chunks/b18459c1bed75dbdec08.js +0 -1
  871. package/assets/esri/core/workers/chunks/b25104337f2495a4296a.js +0 -1
  872. package/assets/esri/core/workers/chunks/b2d922ecc2c4899dbee1.js +0 -1
  873. package/assets/esri/core/workers/chunks/b3707d2cd2f4b2f70889.js +0 -1
  874. package/assets/esri/core/workers/chunks/b3801d58c024224917df.js +0 -1
  875. package/assets/esri/core/workers/chunks/b3c0c9c91bcdbbb8e719.js +0 -1
  876. package/assets/esri/core/workers/chunks/b4928831a2a13b2da745.js +0 -1
  877. package/assets/esri/core/workers/chunks/b6a82775b83d20599635.js +0 -1
  878. package/assets/esri/core/workers/chunks/b6d365b9198b74b05338.js +0 -1
  879. package/assets/esri/core/workers/chunks/b6d71a4ab788a09714f3.js +0 -1
  880. package/assets/esri/core/workers/chunks/b89b634e9d38b5a51d33.js +0 -1
  881. package/assets/esri/core/workers/chunks/b976122bcd4e2170afaf.js +0 -1
  882. package/assets/esri/core/workers/chunks/bb6573d794bbe670216a.js +0 -1
  883. package/assets/esri/core/workers/chunks/bc21241bc9acb83d1b1c.js +0 -1
  884. package/assets/esri/core/workers/chunks/bdd76a0b6c14e7fb6984.js +0 -1
  885. package/assets/esri/core/workers/chunks/be11cec9979ed5e9738e.js +0 -1
  886. package/assets/esri/core/workers/chunks/c063de8f57a393280c39.js +0 -1
  887. package/assets/esri/core/workers/chunks/c473c8b480de9802711b.js +0 -1
  888. package/assets/esri/core/workers/chunks/c5bf19da62a3d31009fe.js +0 -2
  889. package/assets/esri/core/workers/chunks/c67ce7896789ac7275b2.js +0 -1
  890. package/assets/esri/core/workers/chunks/c752f1e732bb019f657d.js +0 -1
  891. package/assets/esri/core/workers/chunks/c75cc72a306a617d9cd8.js +0 -1
  892. package/assets/esri/core/workers/chunks/c85336a50a4994a2a7eb.js +0 -1
  893. package/assets/esri/core/workers/chunks/c9e7d4c277fbc82c4438.js +0 -1
  894. package/assets/esri/core/workers/chunks/cc817c9d3f8e8f8c56e4.js +0 -1
  895. package/assets/esri/core/workers/chunks/ccb0046b883286e65429.js +0 -1
  896. package/assets/esri/core/workers/chunks/ccb55245fe49d844ec50.js +0 -1
  897. package/assets/esri/core/workers/chunks/cdf0c7706d3e1221f49b.js +0 -1
  898. package/assets/esri/core/workers/chunks/cf684026e7f1ab7df4f7.js +0 -1
  899. package/assets/esri/core/workers/chunks/d0172d31389dbfaaa848.js +0 -1
  900. package/assets/esri/core/workers/chunks/d19ac8368bb769fa5fba.js +0 -1
  901. package/assets/esri/core/workers/chunks/d26c9db8c0a772d0923c.js +0 -1
  902. package/assets/esri/core/workers/chunks/d31f6598b76380e8688a.js +0 -1
  903. package/assets/esri/core/workers/chunks/d344c3fd9f6b113bbcd7.js +0 -1
  904. package/assets/esri/core/workers/chunks/d3cd09b2d78ce9f2ea42.js +0 -1
  905. package/assets/esri/core/workers/chunks/d4028536542db8b623cc.js +0 -1
  906. package/assets/esri/core/workers/chunks/d4eb24c82087a74ae670.js +0 -1
  907. package/assets/esri/core/workers/chunks/d4fe26716c4eca13d493.js +0 -1
  908. package/assets/esri/core/workers/chunks/d5916500514a41a4758f.js +0 -1
  909. package/assets/esri/core/workers/chunks/d63e181f0e48bde73395.js +0 -1
  910. package/assets/esri/core/workers/chunks/d7270a2db6f3bfcf0565.js +0 -1
  911. package/assets/esri/core/workers/chunks/d77888c84a8b49478807.js +0 -1
  912. package/assets/esri/core/workers/chunks/d85d1064ba87ea1b1410.js +0 -1
  913. package/assets/esri/core/workers/chunks/d8b9d14f8d3e82ad26dc.js +0 -1
  914. package/assets/esri/core/workers/chunks/d99d5aa04e2d74ef57a7.js +0 -1
  915. package/assets/esri/core/workers/chunks/d9e75266ac28f934eb61.js +0 -1
  916. package/assets/esri/core/workers/chunks/db1f7b2562de495b3401.js +0 -2
  917. package/assets/esri/core/workers/chunks/dbf37b1c4e0567d9fb32.js +0 -1
  918. package/assets/esri/core/workers/chunks/dc9792b2aa55975b8a95.js +0 -1
  919. package/assets/esri/core/workers/chunks/dca0e2505a6cbef6f7f5.js +0 -1
  920. package/assets/esri/core/workers/chunks/dcc782e4bf9e8a8202f9.js +0 -1
  921. package/assets/esri/core/workers/chunks/dd7e4c94a88452425750.js +0 -1
  922. package/assets/esri/core/workers/chunks/ddaa8f8098e4a663e4e5.js +0 -1
  923. package/assets/esri/core/workers/chunks/ddb4689624d091922471.js +0 -1
  924. package/assets/esri/core/workers/chunks/de3f140058aa0b907b65.js +0 -1
  925. package/assets/esri/core/workers/chunks/df375d1b0dab5ecbd1be.js +0 -1
  926. package/assets/esri/core/workers/chunks/df88bb9117967fe72eb4.js +0 -1
  927. package/assets/esri/core/workers/chunks/dfbe0efe453587ec5eb2.js +0 -1
  928. package/assets/esri/core/workers/chunks/dfc6b33f51dc81f3a7be.js +0 -1
  929. package/assets/esri/core/workers/chunks/e0650b1408197d3ac862.js +0 -1
  930. package/assets/esri/core/workers/chunks/e0a37d3bcb9a944e53dd.js +0 -1
  931. package/assets/esri/core/workers/chunks/e1f5da51115472347b55.js +0 -1
  932. package/assets/esri/core/workers/chunks/e209cb1f3f14bf576ebe.js +0 -1
  933. package/assets/esri/core/workers/chunks/e2535c83b97725e89256.js +0 -1
  934. package/assets/esri/core/workers/chunks/e2576c37cf13dc421f69.js +0 -1
  935. package/assets/esri/core/workers/chunks/e2ebf0ea3af2e6907987.js +0 -1
  936. package/assets/esri/core/workers/chunks/e4e2edfdc85dd14e66d4.js +0 -1
  937. package/assets/esri/core/workers/chunks/e55934eb4a17a5b24c94.js +0 -1
  938. package/assets/esri/core/workers/chunks/e5bdfef7c2cc5354be52.js +0 -1
  939. package/assets/esri/core/workers/chunks/e7719bfbc5875a515a2b.js +0 -1
  940. package/assets/esri/core/workers/chunks/eaa0e906b46ae4c84d72.js +0 -2
  941. package/assets/esri/core/workers/chunks/ead49b513e070951a964.js +0 -1
  942. package/assets/esri/core/workers/chunks/eb2652ec48faa78de3c5.js +0 -1
  943. package/assets/esri/core/workers/chunks/ec88631b5033c19f569e.js +0 -1
  944. package/assets/esri/core/workers/chunks/ee6679ef9efa1504e7eb.js +0 -1
  945. package/assets/esri/core/workers/chunks/ef8f9b61b829c3bdf999.js +0 -1
  946. package/assets/esri/core/workers/chunks/ef9740c4d1bd808af38a.js +0 -1
  947. package/assets/esri/core/workers/chunks/efcd38aad9aa667001b2.js +0 -1
  948. package/assets/esri/core/workers/chunks/f0b897319ca8578df63f.js +0 -1
  949. package/assets/esri/core/workers/chunks/f1c2f7c7ce4bd4096eb0.js +0 -1
  950. package/assets/esri/core/workers/chunks/f1e87e3ff65d8594e6b3.js +0 -1
  951. package/assets/esri/core/workers/chunks/f36376b126c80d0983fb.js +0 -1
  952. package/assets/esri/core/workers/chunks/f3ca7fa35eb8d55f5907.js +0 -1
  953. package/assets/esri/core/workers/chunks/f497968055af459c5da4.js +0 -1
  954. package/assets/esri/core/workers/chunks/f4d714d0a1a513861704.js +0 -1
  955. package/assets/esri/core/workers/chunks/f4e63c5f82b8c2bbfacb.js +0 -1
  956. package/assets/esri/core/workers/chunks/f7123ba1286f64e13e91.js +0 -1
  957. package/assets/esri/core/workers/chunks/f7f73de8c63924e347ab.js +0 -1
  958. package/assets/esri/core/workers/chunks/f91e36a104e84d985517.js +0 -1
  959. package/assets/esri/core/workers/chunks/f9259dc1d78d762c6ac0.js +0 -1
  960. package/assets/esri/core/workers/chunks/fa5d4b9a098441ebf505.js +0 -1
  961. package/assets/esri/core/workers/chunks/fc9d66fe2cc9e2d31964.js +0 -1
  962. package/assets/esri/core/workers/chunks/fcb4707c2e95099b9f30.js +0 -1
  963. package/assets/esri/core/workers/chunks/fccfe3aa45a2fb286012.js +0 -1
  964. package/assets/esri/core/workers/chunks/fe0248af95d3f37e099e.js +0 -1
  965. package/chunks/AtmosphereCompositing.glsl.js +0 -25
  966. package/layers/support/ParquetPortalItemData.d.ts +0 -39
  967. package/layers/support/ParquetPortalItemData.js +0 -2
  968. package/views/3d/analysis/ShadowCast/sunlightUtils.js +0 -2
  969. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +0 -2
  970. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphereTechnique.js +0 -2
  971. package/views/3d/webgl-engine/shaders/AtmosphereCompositing.glsl.js +0 -2
  972. package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +0 -2
  973. /package/assets/esri/core/workers/chunks/{c5bf19da62a3d31009fe.js.LICENSE.txt → 07ce1d788ed1c9b926db.js.LICENSE.txt} +0 -0
  974. /package/assets/esri/core/workers/chunks/{4f3e0d583cfa9d1d6727.js.LICENSE.txt → 4a41bf3d1e2e9bb79771.js.LICENSE.txt} +0 -0
  975. /package/assets/esri/core/workers/chunks/{5864bce1498a13ee5b7e.js.LICENSE.txt → 70695e0fb53018d48e7b.js.LICENSE.txt} +0 -0
  976. /package/assets/esri/core/workers/chunks/{2b4dd42920d37b1ff0a9.js.LICENSE.txt → 919115788da38049aea7.js.LICENSE.txt} +0 -0
  977. /package/assets/esri/core/workers/chunks/{db1f7b2562de495b3401.js.LICENSE.txt → ced5dfb2bf46fc5eac8c.js.LICENSE.txt} +0 -0
  978. /package/assets/esri/core/workers/chunks/{eaa0e906b46ae4c84d72.js.LICENSE.txt → d96e63d66f7b1f4ea54a.js.LICENSE.txt} +0 -0
  979. /package/assets/esri/core/workers/chunks/{1ae0c9345626e70affd3.js.LICENSE.txt → fe811d651d201f698b8f.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../../../Color.js";import{linearize as t}from"../../../../colorUtils.js";import{deg2rad as n}from"../../../../core/mathUtils.js";import{releaseMaybe as r}from"../../../../core/maybe.js";import{isPromiseLike as i}from"../../../../core/promiseUtils.js";import{normalFromMat4 as a,fromMat4 as o}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{fromTranslation as c,multiply as l,invert as u,getTranslation as d}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as f,IDENTITY as p,clone as m}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{ONES as h}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as g,add as _,scale as v,transformMat4 as y,transformMat3 as b,normalize as x,scaleAndAdd as ee,subtract as S,cross as te,dot as ne}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as re,ZEROS as ie,ONES as ae,create as C}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as oe}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{canProjectWithoutEngine as se}from"../../../../geometry/projectionUtils.js";import{computeTranslationToOriginAndRotation as w}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBuffer as ce}from"../../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as le}from"../../../../geometry/projection/projectVectorToVector.js";import{fromBuffer as ue,intersectsClippingArea as de,create as fe}from"../../../../geometry/support/aaBoundingBox.js";import{newFloatArray as T}from"../../../../geometry/support/FloatArray.js";import{getZeroIndexArray as E,getContinuousIndexArray as pe}from"../../../../geometry/support/Indices.js";import me from"../../../../geometry/support/MeshComponent.js";import he from"../../../../geometry/support/MeshMaterialMetallicRoughness.js";import ge from"../../../../geometry/support/MeshTextureTransform.js";import{isRelativeVertexSpace as _e,isAbsoluteVertexSpace as ve}from"../../../../geometry/support/meshVertexSpaceUtils.js";import{equals as D,isPlateCarree as O}from"../../../../geometry/support/spatialReferenceUtils.js";import{t as k}from"../../../../chunks/vec3.js";import{transformNormal as A,transformVectorENUPlateCarree as j,transformVectorWMPlateCarree as M,projectNormalToPCPF as ye,transformTangent as N,projectTangentToPCPF as be}from"../../../../geometry/support/meshUtils/projection.js";import{projectMeshVertexPositions as xe}from"../../../../geometry/support/meshUtils/projectMeshVertexPositions.js";import{projectLocalVertexSpaceToPCPF as Se}from"../../../../geometry/support/meshUtils/vertexSpaceConversion.js";import{isDrivenOpacityFallbackAlwaysOpaque as Ce}from"../../../../renderers/visualVariables/support/visualVariableUtils.js";import{getEmissiveMode as we}from"../../../../symbols/support/materialUtils.js";import{isEncodedMeshTexture as Te}from"../../glTF/internal/resourceUtils.js";import{getTransformMatrix as P}from"../../glTF/internal/TextureTransformUtils.js";import{defaultSymbolLayerMemoryComplexity as Ee}from"./defaultSymbolComplexity.js";import{perObjectElevationAligner as F}from"./ElevationAligners.js";import{needsElevationUpdates3D as I,evaluateElevationInfoAtPoint as L}from"./elevationAlignmentUtils.js";import{preparePatchEmissiveStrength as De}from"./emissiveUtils.js";import{Graphics3DMeshObject3DGraphicLayer as Oe}from"./Graphics3DMeshObject3DGraphicLayer.js";import{Object3DEdgeState as ke}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as Ae,nanFallbackColor as je}from"./Graphics3DSymbolLayer.js";import{MaterialInfoCache as Me,MeshFastUpdateProcessor as Ne}from"./MeshFastUpdateProcessor.js";import{addOlidAttribute as Pe}from"./olidUtils.js";import{SymbolComplexity as Fe}from"./SymbolComplexity.js";import{hasEdges as Ie,createMaterial as Le}from"../support/edgeUtils.js";import{debugFlags as Re}from"../../support/debugFlags.js";import{Attribute as R}from"../../webgl-engine/lib/Attribute.js";import{Geometry as z}from"../../webgl-engine/lib/Geometry.js";import{ManagedTexture as ze}from"../../webgl-engine/lib/ManagedTexture.js";import{Object3D as Be}from"../../webgl-engine/lib/Object3D.js";import{DefaultMaterial as Ve}from"../../webgl-engine/materials/DefaultMaterial.js";import{NativeLineMaterial as B}from"../../webgl-engine/materials/NativeLineMaterial.js";import{useSchematicPBR as He,advancedMRRFactors as Ue,schematicMRRFactors as We}from"../../webgl-engine/materials/pbrUtils.js";const Ge=[`mesh`];class Ke extends Ae{constructor(e,t,n,r){super(e,t,n,r,Ce(t)),this._materialInfoCache=new Me,this._fastUpdateProcessor=new Ne,this._textures=new Map,this.ensureDrapedStatus(!1)}async doLoad(){Re.DRAW_MESH_GEOMETRY_NORMALS&&(this._debugVertexNormalMaterial=new B({color:[1,0,1,1]}),this._debugTangentNormalMaterial=new B({color:[1,.5,0,1]}),this._debugFaceNormalMaterial=new B({color:[0,1,1,1]})),this.updateComplexity()}destroy(){super.destroy(),this._textures.forEach(e=>e.unload()),this._context.stage.removeTextures(Array.from(this._textures.values())),this._materialInfoCache.clear(),this._textures.clear(),this._fastUpdateProcessor.destroy()}get materials(){return this._materialInfoCache.materials}createGraphics3DGraphic(e){let t=e.graphic;if(!this._validateGeometry(t.geometry,Ge,`fill on mesh-3d`))return null;let n=this.createElevationContextForGraphic(t),r=e.renderingInfo;return this._createAs3DShape(t,r,n,t.uid)}onRemoveGraphic(e){this._fastUpdateProcessor.onRemoveGraphic(e,this._materialInfoCache)}layerOpacityChanged(e,t){let n=this._getLayerOpacity();this._updateMaterialParameters(e=>{e.material.setParameters({layerOpacity:n});let t=e.material.parameters;this._setMaterialTextureAlphaMode(t,e)}),e?.forEach(e=>t(e)?.layerOpacityChanged(n,this._context.isAsync))}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,I)}slicePlaneEnabledChanged(e,t){return this._updateMaterialParameters(({material:e})=>{e.setParameters({hasSlicePlane:this._context.slicePlaneEnabled})}),e?.forEach(e=>t(e)?.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)),!0}physicalBasedRenderingChanged(){let e=this._usePBR();return this._updateMaterialParameters(({material:t})=>t.setParameters({usePBR:e})),!0}updateMeshTransform(e,t,n,r,i){if(!e.fastTransformUpdatesAllowed)return!1;let a=e.fastTransformUpdatesEnabled;switch(i){case 0:if(a)return!0;break;case 1:if(!a)return!0}let o=this._context.renderCoordsHelper.spatialReference,s=at,{origin:c,transform:l}=n;if(!w(t.spatialReference,g(J,c.x,c.y,c.z??0),s,o))return!1;switch(i){case void 0:a||this._fastUpdateProcessor.enable(e,this._materialInfoCache,this._context,!0);break;case 0:this._fastUpdateProcessor.enable(e,this._materialInfoCache,this._context);break;case 1:if(this._fastUpdateProcessor.disable(e,this._materialInfoCache),t.vertexSpace.type===`local`)return!1}e.updateFastLocalOrigin(s,l,this._context.localOriginFactory,!1);let{elevationContext:u}=e;u.centerInElevationSR=this._getCenterInElevationSR(s);let{elevationProvider:d,renderCoordsHelper:f}=this._context;return e.alignedSampledElevation=F(e,u,d.spatialReference,(e,t)=>L(e,d,u,f,t),f,s),e.updateTransform(s,l,this._context.isAsync,r),!0}computeComplexity(){if(!this._textures||this._textures.size===0)return super.computeComplexity();let e=0;for(let t of this._textures.values())e+=t.usedMemory;let t={...Ee(this.symbol,this.symbolLayer),resourceBytes:e},n=Ie(this.symbolLayer)?2:0;return new Fe({drawCallsPerFeature:n,memory:t})}_requiresSymbolVertexColors(){return this._hasDrivenColorOrOpacity}_materialPropertiesDefault(e,t){let n=this._requiresSymbolVertexColors(),r=!!e.vertexAttributes.color,i=!!e.vertexAttributes.tangent;return{hasSymbolVertexColors:n,hasVertexColors:r,hasVertexTangents:i,unlit:!1,uid:`vc:${r},vt:${i},vct${t},svc:${n}`}}_materialProperties(e,t,n){let r=this._materialPropertiesDefault(e,n);if(!t.material)return r;let{color:i,colorTexture:a,colorTextureTransform:o,normalTexture:s,normalTextureTransform:c,doubleSided:l,alphaCutoff:u,alphaMode:d}=t.material,f=G(i),p=G(a),m=K(o),h=G(s),g=K(c);if(r.color=i,r.colorTexture=a,r.normalTexture=s,r.uid=`${r.uid},cmuid:${f},ctmuid:${p},cttuid:${m},ntmuid:${h},nttuid:${g},ds:${l},ac:${u},am:${d}`,t.material instanceof he){let{metallic:e,roughness:n,metallicRoughnessTexture:i,metallicRoughnessTextureTransform:a,emissiveColor:s,emissiveStrength:l,emissiveTexture:u,emissiveTextureTransform:d,occlusionTexture:f,occlusionTextureTransform:p,unlit:m}=t.material,h=G(i),g=K(a),_=G(s),v=G(u),y=K(d),b=G(f),x=K(p);r.uid=[r.uid,`mrm:${e}`,`mrr:${n}`,`mrt:${h}`,`mrtt:${g}`,`emuid:${_}`,`ems:${l}`,`etmuid:${v}`,`ett:${y}`,`otmuid:${b}`,`ott:${x}`,`unlit:${m}`].join(`,`),r.metallic=e,r.roughness=n,r.metallicRoughnessTexture=i,r.emissiveColor=m?void 0:s,r.emissiveStrength=l,r.emissiveTexture=m?void 0:u,r.occlusionTexture=f,r.unlit=m,r.colorTextureTransform=U(o),r.normalTextureTransform=U(c),r.emissiveTextureTransform=U(d),r.occlusionTextureTransform=U(p),r.metallicRoughnessTextureTransform=U(a)}return r}_getInternalTexture(e,t=!1,n=1){let a=nt(e);if(!a)return null;let o=`${e.contentHash}/${n}`,s=this._textures.get(o);if(s){let e=this._context.stage.renderView.textures,t=null,n=e.acquire(s.id);return n!=null&&!i(n)&&(s.events.on(`unloaded`,()=>t=r(t)),t=n),s}let c=null,l=this._context.stage.renderView.renderingContext.parameters.maxMaxAnisotropy,u={wrap:$e(e.wrap),noUnpackFlip:!0,maxAnisotropy:l,mipmap:l>1};return Te(a)?(c=a.data,u.preMultiplyAlpha=!1,u.encoding=a.encoding):(c=a,u.preMultiplyAlpha=n!==1,u.compressionOptions=t?{compressionTracker:this._context.compressionTracker,compressionCallback:()=>this.updateComplexity()}:void 0),s=new ze(c,u),this._textures.set(o,s),s.events.on(`loaded`,()=>this.updateComplexity()),s.load(this._context.stage.renderView.renderingContext),this._context.stage.addTexture(s),s.events.on(`unloaded`,()=>{this._textures.delete(o)}),s}_setInternalMaterialTextureParameters(e,n){if(e.colorTexture!=null){let t=n.textureAlphaMode!==1,r=this._getInternalTexture(e.colorTexture,t,n.textureAlphaMode);r?(n.textureId=r.id,n.textureAlphaPremultiplied=!!r.parameters.preMultiplyAlpha):n.textureId=void 0}if(e.normalTexture&&(n.normalTextureId=this._getInternalTexture(e.normalTexture)?.id),e.emissiveColor){let r=e.emissiveColor?.toUnitRGB();n.emissiveBaseColor=re(t(r[0]),t(r[1]),t(r[2]))}e.emissiveStrength&&(n.emissiveStrengthKHR=e.emissiveStrength),e.emissiveTexture&&(n.emissiveTextureId=this._getInternalTexture(e.emissiveTexture)?.id),e.occlusionTexture&&(n.occlusionTextureId=this._getInternalTexture(e.occlusionTexture,!0)?.id),e.metallicRoughnessTexture&&(n.metallicRoughnessTextureId=this._getInternalTexture(e.metallicRoughnessTexture,!0)?.id)}_setInternalMaterialParameters(e,t,n){e.color!=null&&tt(e.color,t,n),this._setInternalMaterialTextureParameters(e,t),t.colorTextureTransformMatrix=P(e.colorTextureTransform),t.normalTextureTransformMatrix=P(e.normalTextureTransform);let r=e.normalTextureTransform?.scale==null?h:e.normalTextureTransform?.scale;t.scale=[r[0],r[1]],t.occlusionTextureTransformMatrix=P(e.occlusionTextureTransform),t.emissiveTextureTransformMatrix=P(e.emissiveTextureTransform),t.metallicRoughnessTextureTransformMatrix=P(e.metallicRoughnessTextureTransform)}_setExternalMaterialParameters(e,t=this._materialColor){let n=this._drivenProperties.color,r=this._drivenProperties.opacity;if(n)e.externalColor=oe;else{let n=t??null;if(n){let t=n.toUnitRGBA();r&&(t[3]=1),e.externalColor=t}else e.externalColor=je}e.colorMixMode=this.symbolLayer.material?.colorMixMode??`multiply`,e.castShadows=!!this.symbolLayer.castShadows,e.emissiveStrengthFromSymbol=this.symbolLayer?.material?.emissive?.strength??1,e.emissiveSource=we(this.symbolLayer?.material?.emissive?.source??`emissive`)}_getOrCreateMaterial(e,t){let n=t.material?.color,r=t.material?.colorTexture,i=t.material?.alphaMode,a=i===`blend`,o=i!==`opaque`&&(et(e)||n!=null&&n.a<1||r?.transparent||a),s=this._materialProperties(e,t,o),c=this._materialInfoCache.byUid(s.uid);if(c)return this._setInternalMaterialTextureParameters(s,c.material.parameters),c.material;let l={uid:s.uid,material:null,isComponentTransparent:o,alphaMode:t.material?t.material.alphaMode:`opaque`},u=He({normalTexture:s.normalTexture,metallicRoughnessTexture:s.metallicRoughnessTexture,metallicFactor:s.metallic,roughnessFactor:s.roughness,emissiveTexture:s.unlit?void 0:s.emissiveTexture,emissiveFactor:s.unlit?ie:s.emissiveColor?.toUnitRGB(),occlusionTexture:s.occlusionTexture}),d={usePBR:this._usePBR(),isSchematic:u,hasVertexColors:s.hasVertexColors,hasSymbolColors:s.hasSymbolVertexColors,hasVertexTangents:s.hasVertexTangents,ambient:ie,diffuse:ae,opacity:1,doubleSided:!0,doubleSidedType:`winding-order`,cullFace:0,unlit:s.unlit,layerOpacity:this._getLayerOpacity(),hasSlicePlane:this._context.slicePlaneEnabled,drivenOpacity:this.needsDrivenTransparentPass||l.isComponentTransparent};d.mrrFactors=u?We:[s.metallic,s.roughness,Ue[2]],t.material&&(d.doubleSided=t.material.doubleSided,d.cullFace=t.material.doubleSided?0:2,d.textureAlphaCutoff=t.material.alphaCutoff),this._setExternalMaterialParameters(d),this._setMaterialTextureAlphaMode(d,l),this._setInternalMaterialParameters(s,d,l);let f=new Ve(d,this._context.spherical);return l.material=f,this._materialInfoCache.set(s.uid,l),f}prepareSymbolLayerPatch(e){if(e.diff.type!==`partial`)return;let t=e.diff.diff;this._preparePatchColor(e,t),this._preparePatchEmissive(e,t)}_preparePatchColor(e,t){if(!t.material||t.material.type!==`partial`)return;let n=t.material.diff;if(!n.color||n.color.type!==`complete`||n.color.newValue==null||n.color.oldValue==null)return;let r=n.color.newValue;delete n.color,e.symbolLayerStatePatches.push(()=>{this._updateMaterialParameters(e=>{let t=e.material.parameters;this._setExternalMaterialParameters(t,r),this._setMaterialTextureAlphaMode(t,e),e.material.setParameters({externalColor:t.externalColor})})})}_preparePatchEmissive(e,t){return De(e,t,e=>{this._updateMaterialParameters(t=>{t.material.setParameters({emissiveStrengthFromSymbol:e??1})})},this.view.stage.renderView.renderingContext.driverTest.floatBufferBlend.result)}_usePBR(){return this._context.physicalBasedRenderingEnabled}_setMaterialTextureAlphaMode(e,t){e.textureAlphaMode=t.alphaMode===`auto`?this.needsDrivenTransparentPass||t.isComponentTransparent||(e.layerOpacity??1)<1||(e.opacity??1)<1||(e.externalColor?.[3]??1)<1?3:1:t.alphaMode===`opaque`?1:t.alphaMode===`mask`?2:0}_createFaceDebugNormals(e,t){let n=t.length,r=e.spatialReference.isGeographic?20015077/180:1,i=.1*Math.max(e.extent.width*r,e.extent.height*r,e.extent.zmax-e.extent.zmin),o=[],c=[],l=t[0].transformation,u=a(s(),l);for(let e=0;e<n;e++){let n=t[e].attributes.get(`position`);if(!n)continue;let r=n.data,a=n.indices;for(let e=0;e<a.length;e+=3)H(r,a,e,Z),Qe(r,a,e,J,Y,X),_(J,J,Y),_(J,J,X),v(J,J,1/3),y(J,J,l),o.push(...J),b(Z,Z,u),x(Z,Z),ee(J,J,Z,i),o.push(...J),c.push(c.length),c.push(c.length)}return o.length?new z(this._debugFaceNormalMaterial,[[`position`,new R(o,c,3,!0)]],null):null}_createPerVertexDebugVectors(e,t,n,r,i){let c=t.length,l=e.spatialReference.isGeographic?20015077/180:1,u=i*.1*Math.max(e.extent.width*l,e.extent.height*l,e.extent.zmax-e.extent.zmin),d=[],f=[],p=t[0].transformation,m=a(s(),p);n===`tangent`&&o(m,p);for(let e=0;e<c;e++){let r=t[e],i=r.attributes.get(`position`),a=r.attributes.get(n);if(!i||!a)continue;let o=i.data,s=i.indices,c=a.data,l=a.indices;for(let e=0;e<s.length;e++){let t=s[e]*3,n=l[e]*a.stride;g(J,o[t+0],o[t+1],o[t+2]),y(J,J,p),d.push(...J),g(Y,c[n+0],c[n+1],c[n+2]),b(Y,Y,m),x(Y,Y),ee(J,J,Y,u),d.push(...J),f.push(f.length),f.push(f.length)}}return d.length?new z(r,[[`position`,new R(d,f,3,!0)]],null):null}_createAs3DShape(e,t,n,r){let i=e.geometry;if(i.type!==`mesh`)return null;let a=this._createGeometryInfo(i,t,r);if(a==null)return null;let{geometries:o,objectTransformation:s}=a;if(Re.DRAW_MESH_GEOMETRY_NORMALS){let e=this._createPerVertexDebugVectors(i,o,`normal`,this._debugVertexNormalMaterial,1),t=this._createPerVertexDebugVectors(i,o,`tangent`,this._debugTangentNormalMaterial,.5),n=this._createFaceDebugNormals(i,o);e&&o.push(e),t&&o.push(t),n&&o.push(n)}let c=this._context.layerViewUid,l=new Be({geometries:o,layerViewUid:c,graphicUid:r,isElevationSource:!0});l.transformation=s;let u=Le(this.symbolLayer,{opacity:this._getLayerOpacity()}),d=u?new ke(o[0].material,u,this._context.slicePlaneEnabled):null,f=new Oe(this,l,null,F,n,d);this._fastUpdateProcessor.onAddGraphic(),f.needsElevationUpdates=I(n.mode),f.useObjectOriginAsAttachmentOrigin=!0,f.fastTransformUpdatesAllowed=this._fastTransformUpdatesAllowed(i),n.centerInElevationSR=this._getCenterInElevationSR(l.transformation);let{elevationProvider:p,renderCoordsHelper:m}=this._context;return f.alignedSampledElevation=F(f,n,p.spatialReference,(e,t)=>L(e,p,n,m,t),m),f}_fastTransformUpdatesAllowed(e){let{vertexSpace:t,spatialReference:n}=e;if(!_e(t))return!1;let{type:r}=t,{view:i}=this._context.graphicsCoreOwner,{viewingMode:a}=i.state,o=i.spatialReference;return a===1&&r===`local`||a===2&&D(o,n)&&r===`georeferenced`&&!n.isGeographic}_getElevationSR(){return this._context.elevationProvider.spatialReference??null}_getCenterInElevationSR(e){let t=C(),n=g(st,e[12],e[13],e[14]);return le(n,this._context.renderCoordsHelper.spatialReference,t,this._getElevationSR()),t}_passthroughReprojectionInfo(e){return e.reprojection===0&&!!e.objectTransformation}_createPositionBuffer(e,t,n){let r=n.position,i=r,a;if(t.reprojection===0)return{position:i,georeferencedPositionBuffer:a};let o=t.reprojection===1?t.transformBeforeProject:null;o&&(i=k(new Float64Array(i.length),i,o));let{normal:s,tangent:c}=n;!this._passthroughReprojectionInfo(t)&&(s||c)&&(a=i);let l=i===r||i===a?new Float64Array(i.length):i;return ce(i,e.spatialReference,0,l,this._context.renderCoordsHelper.spatialReference,0),{position:l,georeferencedPositionBuffer:a}}_createNormalBuffer(e,t,n,r,i){let a=i.normal;if(a==null)return null;let o=a,s=r.reprojection===1?r.transformBeforeProject:null;s&&(o=A(o,new Float32Array(o.length),s));let c=this._context.graphicsCoreOwner.view.viewingMode;if(r.reprojection===0)return o;if(c===`local`){if(!O(this._context.renderCoordsHelper.spatialReference))return o;if(n==null)return null;if(e.spatialReference.isGeographic){let e=o===a?new Float32Array(o.length):o;return j(o,0,n,e)}if(e.spatialReference.isWebMercator){let e=o===a?new Float32Array(o.length):o;return M(o,0,n,e)}return o}if(n==null)return null;let l=o===a?new Float32Array(o.length):o,u=this._context.renderCoordsHelper.spatialReference;return ye(o,n,e.spatialReference,t,u,l)}_createTangentBuffer(e,t,n,r,i){let a=i.tangent;if(a==null)return null;let o=a,s=r.reprojection===1?r.transformBeforeProject:null;s&&(o=N(o,new Float32Array(o.length),s));let c=this._context.graphicsCoreOwner.view.viewingMode;if(r.reprojection===0)return o;if(c===`local`){if(!O(this._context.renderCoordsHelper.spatialReference))return o;if(n==null)return null;if(e.spatialReference.isGeographic){let e=o===a?new Float32Array(o.length):o;return j(o,1,n,e)}if(e.spatialReference.isWebMercator){let e=o===a?new Float32Array(o.length):o;return M(o,1,n,e)}return o}if(n==null)return null;let l=o===a?new Float32Array(o.length):o,u=this._context.renderCoordsHelper.spatialReference;return be(o,n,e.spatialReference,t,u,l)}_createSymbolColorBuffer(e){return this._requiresSymbolVertexColors()?new Uint8Array(this._getDrivenUInt8ColorWithNaNSupport(e,this._materialColor,!0)):null}_createBuffers(e,t){let n=e.vertexAttributes&&e.vertexAttributes.position;if(!n)return this.logger.warn(`Mesh geometry must contain position vertex attributes`),null;let r=e.vertexAttributes.normal,i=e.vertexAttributes.uv,a=e.vertexAttributes.tangent;if(r&&r.length!==n.length)return this.logger.warn(`Mesh normal vertex buffer must contain the same number of elements as the position buffer`),null;if(a&&a.length/4!=n.length/3)return this.logger.warn(`Mesh tangent vertex buffer must contain the same number of elements as the position buffer`),null;if(i&&i.length/2!=n.length/3)return this.logger.warn(`Mesh uv vertex buffer must contain the same number of elements as the position buffer`),null;let o=this._computeReprojectionInfo(e),s=o.reprojection===1&&o.convertLocalVertexSpace,c=s&&e.vertexSpace.type===`local`?Se(e,e.vertexSpace,this._context.renderCoordsHelper.spatialReference):null;if(s&&!c)return this.logger.warn(`Local mesh vertex space could not be converted for rendering`),null;let{position:l,georeferencedPositionBuffer:u}=c?{position:c.position,georeferencedPositionBuffer:null}:this._createPositionBuffer(e,o,e.vertexAttributes),d=rt(e),f=this._createSymbolColorBuffer(t),p=c?c.normal:this._createNormalBuffer(e,l,u,o,e.vertexAttributes),m=c?c.tangent:this._createTangentBuffer(e,l,u,o,e.vertexAttributes),h=i,{geometryTransformation:g}=o,{transformation:_,position:v,normal:y,tangent:b}=this._passthroughReprojectionInfo(o)?{transformation:o.objectTransformation,position:l,normal:p,tangent:m}:this._expressInOriginLocalSpace(e,l,p,m,g);return{positionBuffer:v,normalBuffer:y,tangentBuffer:b,uvBuffer:h,colorBuffer:d,symbolColorBuffer:f,objectTransformation:_,geometryTransformation:g}}_computeReprojectionInfo(e){let{vertexSpace:t}=e,n=t.type===`georeferenced`,r=t.type===`local`&&this._context.graphicsCoreOwner.view.state.isGlobal,i=n?+!D(this._context.renderCoordsHelper.spatialReference,e.spatialReference):+!!r;if(ve(t))return{reprojection:i,geometryTransformation:f()};let a=t.origin,o=e.transform?.localMatrix??p;if(i===0){let t=f();return w(e.spatialReference,a,t,this._context.renderCoordsHelper.spatialReference),{reprojection:i,objectTransformation:t,geometryTransformation:m(o)}}if(r)return{reprojection:i,convertLocalVertexSpace:!0,geometryTransformation:m(o)};let s=c(f(),a);return l(s,s,o),{reprojection:i,transformBeforeProject:s,geometryTransformation:f()}}_expressInOriginLocalSpace(e,t,n,r,i){let a=this._context.renderCoordsHelper.spatialReference,o=e.origin;q[0]=o.x,q[1]=o.y,q[2]=o.z??0;let s=f();w(e.spatialReference,q,s,a),l(Q,s,i),u(Q,Q);let{position:c,normal:d,tangent:p}=e.vertexAttributes,m=t===c?new Float64Array(t.length):t;k(m,t,Q);let h=n?n===d?new Float32Array(n.length):n:null,g=r?r===p?new Float32Array(r.length):r:null;return n&&h&&A(n,h,Q),r&&g&&N(r,g,Q),{transformation:s,position:m,normal:h,tangent:g}}_validateFaces(e,t){let n=e.vertexAttributes.position.length/3,r=t.faces;if(r&&r.length>0){let e=-1;for(let t=0;t<r.length;t++){let n=r[t];n>e&&(e=n)}if(n<=e)return this.logger.warn(`Vertex index ${e} is out of bounds of the mesh position buffer`),!1}else if(n%3!=0)return this.logger.warn(`Mesh position buffer length must be a multiple of 9 if no component faces are defined (3 values per vertex * 3 vertices per triangle)`),!1;return!0}_isOutsideClippingArea(e){if(!this._context.clippingExtent||!e.vertexAttributes?.position)return!1;let t=this._context.elevationProvider.spatialReference,n=xe(e,t??e.spatialReference);return n?(ue(n,$),!de($,this._context.clippingExtent)):!1}_createGeometryInfo(e,t,n){if(!se(e.spatialReference,this._context.renderCoordsHelper.spatialReference))return this.logger.warn(`Geometry spatial reference is not compatible with the view`),null;if(!this._validateVertexSpace(e)||this._isOutsideClippingArea(e))return null;let r=this._createBuffers(e,t);if(r==null)return null;let{positionBuffer:i,uvBuffer:a,colorBuffer:o,symbolColorBuffer:s,normalBuffer:c,tangentBuffer:l,objectTransformation:u,geometryTransformation:f}=r,p=e.components??ot,m=[],h=!1,g=d(J,u),_=this._context.localOriginFactory.getOrigin(g);for(let t of p){if(!this._validateFaces(e,t))return null;let r=qe(e,t);if(r.length===0)continue;let u=Je(i,c,t,r);u.didFlipNormals&&(h=!0);let d=[[`position`,new R(i,r,3,!0)],[`normal`,new R(u.normals,u.indices,3,!0)]];o&&d.push([`color`,new R(o,r,4,!0)]);let p=null;s&&(p=E(r.length),d.push([`symbolColor`,new R(s,p,4,!0)])),a&&d.push([`uv0`,new R(a,r,2,!0)]),l&&d.push([`tangent`,new R(l,r,4,!0)]);let g=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:n,layerViewUid:this._context.layerViewUid});g&&(p??=E(r.length),Pe(d,g,p));let v=this._getOrCreateMaterial(e,t),y=new z(v,d,null);y.transformation=f,y.localOrigin=_,m.push(y)}return h&&this.logger.warn(`Normals have been automatically flipped to be consistent with the counter clock wise face winding order. It is better to generate mesh geometries that have consistent normals.`),m.length===0?null:{geometries:m,objectTransformation:u}}_updateMaterialParameters(e){this._materialInfoCache.forEachMaterialInfo(e),this._fastUpdateProcessor.forEachMaterialInfo(e),this._fastUpdateProcessor.forEachClonedMaterial((e,t)=>{t.setParameters(e.parameters)})}_validateVertexSpace(e){let{_context:{graphicsCoreOwner:{view:{state:{viewingMode:t}}}}}=this,{vertexSpace:n}=e;return t===2&&n.type===`local`?(this.logger.warn(`Displaying a mesh with a local vertex space in a view in local viewing mode is not supported.`),!1):!0}test(){return{...super.test(),materials:this._materialInfoCache.materials}}get _materialColor(){return this.symbolLayer.material?.color}}class V{constructor(e,t,n){this.normals=e,this.indices=t,this.didFlipNormals=n}}function qe(e,t){return t.faces??pe(e.vertexAttributes.position.length/3)}function Je(e,t,n,r){switch(n.shading||`flat`){default:case`source`:return Xe(e,t,n,r);case`flat`:return Ye(e,r);case`smooth`:return Ze(e,r)}}function Ye(e,t){let n=T(t.length),r=Array(t.length*3);for(let i=0;i<t.length;i+=3){let a=H(e,t,i,Z);for(let e=0;e<3;e++)n[i+e]=a[e],r[i+e]=i/3}return new V(n,r,!1)}function Xe(e,t,n,r){if(t==null)return Ye(e,r);let i=!1;if(!n.trustSourceNormals)for(let n=0;n<r.length;n+=3){H(e,r,n,Z);for(let e=0;e<3;e++){let a=r[n+e]*3;J[0]=t[a],J[1]=t[a+1],J[2]=t[a+2],ne(Z,J)<0&&(t[a]=-t[a],t[a+1]=-t[a+1],t[a+2]=-t[a+2],i=!0)}}return new V(t,r,i)}function Ze(e,t){let n={};for(let r=0;r<t.length;r+=3){let i=H(e,t,r,Z);for(let e=0;e<3;e++){let a=t[r+e],o=n[a];o||(o={normal:C(),count:0},n[a]=o),_(o.normal,o.normal,i),o.count++}}let r=T(t.length*3),i=Array(t.length*3);for(let e=0;e<t.length;e++){let a=n[t[e]];a.count!==1&&(x(a.normal,a.normal),a.count=1);for(let t=0;t<3;t++)r[e*3+t]=a.normal[t];i[e]=e}return new V(r,i,!1)}function Qe(e,t,n,r,i,a){let o=t[n]*3,s=t[n+1]*3,c=t[n+2]*3;r[0]=e[o],r[1]=e[o+1],r[2]=e[o+2],i[0]=e[s],i[1]=e[s+1],i[2]=e[s+2],a[0]=e[c],a[1]=e[c+1],a[2]=e[c+2]}function H(e,t,n,r){return Qe(e,t,n,J,Y,X),S(Y,Y,J),S(X,X,J),te(J,Y,X),x(r,J),r}function U(e){if(!e)return null;let{scale:t,offset:r,rotation:i}=e;return{scale:t,offset:r,rotation:n(i)}}function $e(e=`repeat`){if(typeof e==`string`){let t=W(e);return{s:t,t}}return{s:W(e.horizontal),t:W(e.vertical)}}function W(e){switch(e){case`clamp`:return 33071;case`mirror`:return 33648;default:return 10497}}function et(e){let t=e.vertexAttributes.color;if(t==null)return!1;for(let e=3;e<t.length;e+=4)if(t[e]!==255)return!0;return!1}function tt(e,t,n){t.diffuse=e.toUnitRGB(),t.opacity=n.alphaMode===`opaque`?1:e.a}function nt(e){return e.data??e.url}function G(t){return t==null?`-`:t instanceof e?t.toHex():t.contentHash}function K(e){let{offset:t,scale:n,rotation:r}=e??it;return`${t[0]},${t[1]},${r},${n[0]},${n[1]}`}function rt(e){return e.vertexAttributes.color}const it=new ge,q=C(),J=C(),Y=C(),X=C(),Z=C(),Q=f(),at=f(),$=fe(),ot=[new me],st=C();export{Ke as Graphics3DMeshFillSymbolLayer};
2
+ import e from"../../../../Color.js";import{linearize as t}from"../../../../colorUtils.js";import{releaseMaybe as n}from"../../../../core/maybe.js";import{isPromiseLike as r}from"../../../../core/promiseUtils.js";import{normalFromMat4 as i,fromMat4 as a}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{fromTranslation as s,multiply as c,invert as l,getTranslation as u}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as d,IDENTITY as f,clone as p}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{ONES as m}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as h,add as g,scale as _,transformMat4 as v,transformMat3 as y,normalize as b,scaleAndAdd as x,subtract as S,cross as ee,dot as te}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as ne,ZEROS as re,ONES as ie,create as C}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as ae}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{canProjectWithoutEngine as oe}from"../../../../geometry/projectionUtils.js";import{computeTranslationToOriginAndRotation as w}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBuffer as se}from"../../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as ce}from"../../../../geometry/projection/projectVectorToVector.js";import{fromBuffer as le,intersectsClippingArea as ue,create as de}from"../../../../geometry/support/aaBoundingBox.js";import{newFloatArray as T}from"../../../../geometry/support/FloatArray.js";import{getZeroIndexArray as E,getContinuousIndexArray as fe}from"../../../../geometry/support/Indices.js";import pe from"../../../../geometry/support/MeshComponent.js";import me from"../../../../geometry/support/MeshMaterialMetallicRoughness.js";import he from"../../../../geometry/support/MeshTextureTransform.js";import{isRelativeVertexSpace as ge,isAbsoluteVertexSpace as _e}from"../../../../geometry/support/meshVertexSpaceUtils.js";import{equals as D,isPlateCarree as O}from"../../../../geometry/support/spatialReferenceUtils.js";import{t as k}from"../../../../chunks/vec3.js";import{transformNormal as A,transformVectorENUPlateCarree as j,transformVectorWMPlateCarree as M,projectNormalToPCPF as ve,transformTangent as N,projectTangentToPCPF as ye}from"../../../../geometry/support/meshUtils/projection.js";import{projectMeshVertexPositions as be}from"../../../../geometry/support/meshUtils/projectMeshVertexPositions.js";import{projectLocalVertexSpaceToPCPF as xe}from"../../../../geometry/support/meshUtils/vertexSpaceConversion.js";import{isDrivenOpacityFallbackAlwaysOpaque as Se}from"../../../../renderers/visualVariables/support/visualVariableUtils.js";import{getEmissiveMode as Ce}from"../../../../symbols/support/materialUtils.js";import{isEncodedMeshTexture as we}from"../../glTF/internal/resourceUtils.js";import{convertMeshTextureTransformToGLTF as P,getTransformMatrix as F}from"../../glTF/internal/TextureTransformUtils.js";import{defaultSymbolLayerMemoryComplexity as Te}from"./defaultSymbolComplexity.js";import{perObjectElevationAligner as I}from"./ElevationAligners.js";import{needsElevationUpdates3D as L,evaluateElevationInfoAtPoint as R}from"./elevationAlignmentUtils.js";import{preparePatchEmissiveStrength as Ee}from"./emissiveUtils.js";import{Graphics3DMeshObject3DGraphicLayer as De}from"./Graphics3DMeshObject3DGraphicLayer.js";import{Object3DEdgeState as Oe}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as ke,nanFallbackColor as Ae}from"./Graphics3DSymbolLayer.js";import{MaterialInfoCache as je,MeshFastUpdateProcessor as Me}from"./MeshFastUpdateProcessor.js";import{addOlidAttribute as Ne}from"./olidUtils.js";import{SymbolComplexity as Pe}from"./SymbolComplexity.js";import{hasEdges as Fe,createMaterial as Ie}from"../support/edgeUtils.js";import{debugFlags as Le}from"../../support/debugFlags.js";import{Attribute as z}from"../../webgl-engine/lib/Attribute.js";import{Geometry as B}from"../../webgl-engine/lib/Geometry.js";import{ManagedTexture as Re}from"../../webgl-engine/lib/ManagedTexture.js";import{Object3D as ze}from"../../webgl-engine/lib/Object3D.js";import{DefaultMaterial as Be}from"../../webgl-engine/materials/DefaultMaterial.js";import{NativeLineMaterial as V}from"../../webgl-engine/materials/NativeLineMaterial.js";import{useSchematicPBR as Ve,advancedMRRFactors as He,schematicMRRFactors as Ue}from"../../webgl-engine/materials/pbrUtils.js";const We=[`mesh`];class Ge extends ke{constructor(e,t,n,r){super(e,t,n,r,Se(t)),this._materialInfoCache=new je,this._fastUpdateProcessor=new Me,this._textures=new Map,this.ensureDrapedStatus(!1)}async doLoad(){Le.DRAW_MESH_GEOMETRY_NORMALS&&(this._debugVertexNormalMaterial=new V({color:[1,0,1,1]}),this._debugTangentNormalMaterial=new V({color:[1,.5,0,1]}),this._debugFaceNormalMaterial=new V({color:[0,1,1,1]})),this.updateComplexity()}destroy(){super.destroy(),this._textures.forEach(e=>e.unload()),this._context.stage.removeTextures(Array.from(this._textures.values())),this._materialInfoCache.clear(),this._textures.clear(),this._fastUpdateProcessor.destroy()}get materials(){return this._materialInfoCache.materials}createGraphics3DGraphic(e){let t=e.graphic;if(!this._validateGeometry(t.geometry,We,`fill on mesh-3d`))return null;let n=this.createElevationContextForGraphic(t),r=e.renderingInfo;return this._createAs3DShape(t,r,n,t.uid)}onRemoveGraphic(e){this._fastUpdateProcessor.onRemoveGraphic(e,this._materialInfoCache)}layerOpacityChanged(e,t){let n=this._getLayerOpacity();this._updateMaterialParameters(e=>{e.material.setParameters({layerOpacity:n});let t=e.material.parameters;this._setMaterialTextureAlphaMode(t,e)}),e?.forEach(e=>t(e)?.layerOpacityChanged(n,this._context.isAsync))}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,L)}slicePlaneEnabledChanged(e,t){return this._updateMaterialParameters(({material:e})=>{e.setParameters({hasSlicePlane:this._context.slicePlaneEnabled})}),e?.forEach(e=>t(e)?.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)),!0}physicalBasedRenderingChanged(){let e=this._usePBR();return this._updateMaterialParameters(({material:t})=>t.setParameters({usePBR:e})),!0}updateMeshTransform(e,t,n,r,i){if(!e.fastTransformUpdatesAllowed)return!1;let a=e.fastTransformUpdatesEnabled;switch(i){case 0:if(a)return!0;break;case 1:if(!a)return!0}let o=this._context.renderCoordsHelper.spatialReference,s=it,{origin:c,transform:l}=n;if(!w(t.spatialReference,h(J,c.x,c.y,c.z??0),s,o))return!1;switch(i){case void 0:a||this._fastUpdateProcessor.enable(e,this._materialInfoCache,this._context,!0);break;case 0:this._fastUpdateProcessor.enable(e,this._materialInfoCache,this._context);break;case 1:if(this._fastUpdateProcessor.disable(e,this._materialInfoCache),t.vertexSpace.type===`local`)return!1}e.updateFastLocalOrigin(s,l,this._context.localOriginFactory,!1);let{elevationContext:u}=e;u.centerInElevationSR=this._getCenterInElevationSR(s);let{elevationProvider:d,renderCoordsHelper:f}=this._context;return e.alignedSampledElevation=I(e,u,d.spatialReference,(e,t)=>R(e,d,u,f,t),f,s),e.updateTransform(s,l,this._context.isAsync,r),!0}computeComplexity(){if(!this._textures||this._textures.size===0)return super.computeComplexity();let e=0;for(let t of this._textures.values())e+=t.usedMemory;let t={...Te(this.symbol,this.symbolLayer),resourceBytes:e},n=Fe(this.symbolLayer)?2:0;return new Pe({drawCallsPerFeature:n,memory:t})}_requiresSymbolVertexColors(){return this._hasDrivenColorOrOpacity}_materialPropertiesDefault(e,t){let n=this._requiresSymbolVertexColors(),r=!!e.vertexAttributes.color,i=!!e.vertexAttributes.tangent;return{hasSymbolVertexColors:n,hasVertexColors:r,hasVertexTangents:i,unlit:!1,uid:`vc:${r},vt:${i},vct${t},svc:${n}`}}_materialProperties(e,t,n){let r=this._materialPropertiesDefault(e,n);if(!t.material)return r;let{color:i,colorTexture:a,colorTextureTransform:o,normalTexture:s,normalTextureTransform:c,doubleSided:l,alphaCutoff:u,alphaMode:d}=t.material,f=G(i),p=G(a),m=K(o),h=G(s),g=K(c);if(r.color=i,r.colorTexture=a,r.normalTexture=s,r.uid=`${r.uid},cmuid:${f},ctmuid:${p},cttuid:${m},ntmuid:${h},nttuid:${g},ds:${l},ac:${u},am:${d}`,t.material instanceof me){let{metallic:e,roughness:n,metallicRoughnessTexture:i,metallicRoughnessTextureTransform:a,emissiveColor:s,emissiveStrength:l,emissiveTexture:u,emissiveTextureTransform:d,occlusionTexture:f,occlusionTextureTransform:p,unlit:m}=t.material,h=G(i),g=K(a),_=G(s),v=G(u),y=K(d),b=G(f),x=K(p);r.uid=[r.uid,`mrm:${e}`,`mrr:${n}`,`mrt:${h}`,`mrtt:${g}`,`emuid:${_}`,`ems:${l}`,`etmuid:${v}`,`ett:${y}`,`otmuid:${b}`,`ott:${x}`,`unlit:${m}`].join(`,`),r.metallic=e,r.roughness=n,r.metallicRoughnessTexture=i,r.emissiveColor=m?void 0:s,r.emissiveStrength=l,r.emissiveTexture=m?void 0:u,r.occlusionTexture=f,r.unlit=m,r.colorTextureTransform=P(o),r.normalTextureTransform=P(c),r.emissiveTextureTransform=P(d),r.occlusionTextureTransform=P(p),r.metallicRoughnessTextureTransform=P(a)}return r}_getInternalTexture(e,t=!1,i=1){let a=tt(e);if(!a)return null;let o=`${e.contentHash}/${i}`,s=this._textures.get(o);if(s){let e=this._context.stage.renderView.textures,t=null,i=e.acquire(s.id);return i!=null&&!r(i)&&(s.events.on(`unloaded`,()=>t=n(t)),t=i),s}let c=null,l=this._context.stage.renderView.renderingContext.parameters.maxMaxAnisotropy,u={wrap:Qe(e.wrap),noUnpackFlip:!0,maxAnisotropy:l,mipmap:l>1};return we(a)?(c=a.data,u.preMultiplyAlpha=!1,u.encoding=a.encoding):(c=a,u.preMultiplyAlpha=i!==1,u.compressionOptions=t?{compressionTracker:this._context.compressionTracker,compressionCallback:()=>this.updateComplexity()}:void 0),s=new Re(c,u),this._textures.set(o,s),s.events.on(`loaded`,()=>this.updateComplexity()),s.load(this._context.stage.renderView.renderingContext),this._context.stage.addTexture(s),s.events.on(`unloaded`,()=>{this._textures.delete(o)}),s}_setInternalMaterialTextureParameters(e,n){if(e.colorTexture!=null){let t=n.textureAlphaMode!==1,r=this._getInternalTexture(e.colorTexture,t,n.textureAlphaMode);r?(n.textureId=r.id,n.textureAlphaPremultiplied=!!r.parameters.preMultiplyAlpha):n.textureId=void 0}if(e.normalTexture&&(n.normalTextureId=this._getInternalTexture(e.normalTexture)?.id),e.emissiveColor){let r=e.emissiveColor?.toUnitRGB();n.emissiveBaseColor=ne(t(r[0]),t(r[1]),t(r[2]))}e.emissiveStrength&&(n.emissiveStrengthKHR=e.emissiveStrength),e.emissiveTexture&&(n.emissiveTextureId=this._getInternalTexture(e.emissiveTexture)?.id),e.occlusionTexture&&(n.occlusionTextureId=this._getInternalTexture(e.occlusionTexture,!0)?.id),e.metallicRoughnessTexture&&(n.metallicRoughnessTextureId=this._getInternalTexture(e.metallicRoughnessTexture,!0)?.id)}_setInternalMaterialParameters(e,t,n){e.color!=null&&et(e.color,t,n),this._setInternalMaterialTextureParameters(e,t),t.colorTextureTransformMatrix=F(e.colorTextureTransform),t.normalTextureTransformMatrix=F(e.normalTextureTransform);let r=e.normalTextureTransform?.scale==null?m:e.normalTextureTransform?.scale;t.normalScale=[r[0],r[1]],t.occlusionTextureTransformMatrix=F(e.occlusionTextureTransform),t.emissiveTextureTransformMatrix=F(e.emissiveTextureTransform),t.metallicRoughnessTextureTransformMatrix=F(e.metallicRoughnessTextureTransform)}_setExternalMaterialParameters(e,t=this._materialColor){let n=this._drivenProperties.color,r=this._drivenProperties.opacity;if(n)e.externalColor=ae;else{let n=t??null;if(n){let t=n.toUnitRGBA();r&&(t[3]=1),e.externalColor=t}else e.externalColor=Ae}e.colorMixMode=this.symbolLayer.material?.colorMixMode??`multiply`,e.castShadows=!!this.symbolLayer.castShadows,e.emissiveStrengthFromSymbol=this.symbolLayer?.material?.emissive?.strength??1,e.emissiveSource=Ce(this.symbolLayer?.material?.emissive?.source??`emissive`)}_getOrCreateMaterial(e,t){let n=t.material?.color,r=t.material?.colorTexture,i=t.material?.alphaMode,a=i===`blend`,o=i!==`opaque`&&($e(e)||n!=null&&n.a<1||r?.transparent||a),s=this._materialProperties(e,t,o),c=this._materialInfoCache.byUid(s.uid);if(c)return this._setInternalMaterialTextureParameters(s,c.material.parameters),c.material;let l={uid:s.uid,material:null,isComponentTransparent:o,alphaMode:t.material?t.material.alphaMode:`opaque`},u=Ve({normalTexture:s.normalTexture,metallicRoughnessTexture:s.metallicRoughnessTexture,metallicFactor:s.metallic,roughnessFactor:s.roughness,emissiveTexture:s.unlit?void 0:s.emissiveTexture,emissiveFactor:s.unlit?re:s.emissiveColor?.toUnitRGB(),occlusionTexture:s.occlusionTexture}),d={usePBR:this._usePBR(),isSchematic:u,hasVertexColors:s.hasVertexColors,hasSymbolColors:s.hasSymbolVertexColors,hasVertexTangents:s.hasVertexTangents,ambient:re,diffuse:ie,opacity:1,doubleSided:!0,doubleSidedType:`winding-order`,cullFace:0,unlit:s.unlit,layerOpacity:this._getLayerOpacity(),hasSlicePlane:this._context.slicePlaneEnabled,drivenOpacity:this.needsDrivenTransparentPass||l.isComponentTransparent};d.mrrFactors=u?Ue:[s.metallic,s.roughness,He[2]],t.material&&(d.doubleSided=t.material.doubleSided,d.cullFace=t.material.doubleSided?0:2,d.textureAlphaCutoff=t.material.alphaCutoff),this._setExternalMaterialParameters(d),this._setMaterialTextureAlphaMode(d,l),this._setInternalMaterialParameters(s,d,l);let f=new Be(d,this._context.spherical);return l.material=f,this._materialInfoCache.set(s.uid,l),f}prepareSymbolLayerPatch(e){if(e.diff.type!==`partial`)return;let t=e.diff.diff;this._preparePatchColor(e,t),this._preparePatchEmissive(e,t)}_preparePatchColor(e,t){if(!t.material||t.material.type!==`partial`)return;let n=t.material.diff;if(!n.color||n.color.type!==`complete`||n.color.newValue==null||n.color.oldValue==null)return;let r=n.color.newValue;delete n.color,e.symbolLayerStatePatches.push(()=>{this._updateMaterialParameters(e=>{let t=e.material.parameters;this._setExternalMaterialParameters(t,r),this._setMaterialTextureAlphaMode(t,e),e.material.setParameters({externalColor:t.externalColor})})})}_preparePatchEmissive(e,t){return Ee(e,t,e=>{this._updateMaterialParameters(t=>{t.material.setParameters({emissiveStrengthFromSymbol:e??1})})},this.view.stage.renderView.renderingContext.driverTest.floatBufferBlend.result)}_usePBR(){return this._context.physicalBasedRenderingEnabled}_setMaterialTextureAlphaMode(e,t){e.textureAlphaMode=t.alphaMode===`auto`?this.needsDrivenTransparentPass||t.isComponentTransparent||(e.layerOpacity??1)<1||(e.opacity??1)<1||(e.externalColor?.[3]??1)<1?3:1:t.alphaMode===`opaque`?1:t.alphaMode===`mask`?2:0}_createFaceDebugNormals(e,t){let n=t.length,r=e.spatialReference.isGeographic?20015077/180:1,a=.1*Math.max(e.extent.width*r,e.extent.height*r,e.extent.zmax-e.extent.zmin),s=[],c=[],l=t[0].transformation,u=i(o(),l);for(let e=0;e<n;e++){let n=t[e].attributes.get(`position`);if(!n)continue;let r=n.data,i=n.indices;for(let e=0;e<i.length;e+=3)U(r,i,e,Z),Ze(r,i,e,J,Y,X),g(J,J,Y),g(J,J,X),_(J,J,1/3),v(J,J,l),s.push(...J),y(Z,Z,u),b(Z,Z),x(J,J,Z,a),s.push(...J),c.push(c.length),c.push(c.length)}return s.length?new B(this._debugFaceNormalMaterial,[[`position`,new z(s,c,3,!0)]],null):null}_createPerVertexDebugVectors(e,t,n,r,s){let c=t.length,l=e.spatialReference.isGeographic?20015077/180:1,u=s*.1*Math.max(e.extent.width*l,e.extent.height*l,e.extent.zmax-e.extent.zmin),d=[],f=[],p=t[0].transformation,m=i(o(),p);n===`tangent`&&a(m,p);for(let e=0;e<c;e++){let r=t[e],i=r.attributes.get(`position`),a=r.attributes.get(n);if(!i||!a)continue;let o=i.data,s=i.indices,c=a.data,l=a.indices;for(let e=0;e<s.length;e++){let t=s[e]*3,n=l[e]*a.stride;h(J,o[t+0],o[t+1],o[t+2]),v(J,J,p),d.push(...J),h(Y,c[n+0],c[n+1],c[n+2]),y(Y,Y,m),b(Y,Y),x(J,J,Y,u),d.push(...J),f.push(f.length),f.push(f.length)}}return d.length?new B(r,[[`position`,new z(d,f,3,!0)]],null):null}_createAs3DShape(e,t,n,r){let i=e.geometry;if(i.type!==`mesh`)return null;let a=this._createGeometryInfo(i,t,r);if(a==null)return null;let{geometries:o,objectTransformation:s}=a;if(Le.DRAW_MESH_GEOMETRY_NORMALS){let e=this._createPerVertexDebugVectors(i,o,`normal`,this._debugVertexNormalMaterial,1),t=this._createPerVertexDebugVectors(i,o,`tangent`,this._debugTangentNormalMaterial,.5),n=this._createFaceDebugNormals(i,o);e&&o.push(e),t&&o.push(t),n&&o.push(n)}let c=this._context.layerViewUid,l=new ze({geometries:o,layerViewUid:c,graphicUid:r,isElevationSource:!0});l.transformation=s;let u=Ie(this.symbolLayer,{opacity:this._getLayerOpacity()}),d=u?new Oe(o[0].material,u,this._context.slicePlaneEnabled):null,f=new De(this,l,null,I,n,d);this._fastUpdateProcessor.onAddGraphic(),f.needsElevationUpdates=L(n.mode),f.useObjectOriginAsAttachmentOrigin=!0,f.fastTransformUpdatesAllowed=this._fastTransformUpdatesAllowed(i),n.centerInElevationSR=this._getCenterInElevationSR(l.transformation);let{elevationProvider:p,renderCoordsHelper:m}=this._context;return f.alignedSampledElevation=I(f,n,p.spatialReference,(e,t)=>R(e,p,n,m,t),m),f}_fastTransformUpdatesAllowed(e){let{vertexSpace:t,spatialReference:n}=e;if(!ge(t))return!1;let{type:r}=t,{view:i}=this._context.graphicsCoreOwner,{viewingMode:a}=i.state,o=i.spatialReference;return a===1&&r===`local`||a===2&&D(o,n)&&r===`georeferenced`&&!n.isGeographic}_getElevationSR(){return this._context.elevationProvider.spatialReference??null}_getCenterInElevationSR(e){let t=C(),n=h(ot,e[12],e[13],e[14]);return ce(n,this._context.renderCoordsHelper.spatialReference,t,this._getElevationSR()),t}_passthroughReprojectionInfo(e){return e.reprojection===0&&!!e.objectTransformation}_createPositionBuffer(e,t,n){let r=n.position,i=r,a;if(t.reprojection===0)return{position:i,georeferencedPositionBuffer:a};let o=t.reprojection===1?t.transformBeforeProject:null;o&&(i=k(new Float64Array(i.length),i,o));let{normal:s,tangent:c}=n;!this._passthroughReprojectionInfo(t)&&(s||c)&&(a=i);let l=i===r||i===a?new Float64Array(i.length):i;return se(i,e.spatialReference,0,l,this._context.renderCoordsHelper.spatialReference,0),{position:l,georeferencedPositionBuffer:a}}_createNormalBuffer(e,t,n,r,i){let a=i.normal;if(a==null)return null;let o=a,s=r.reprojection===1?r.transformBeforeProject:null;s&&(o=A(o,new Float32Array(o.length),s));let c=this._context.graphicsCoreOwner.view.viewingMode;if(r.reprojection===0)return o;if(c===`local`){if(!O(this._context.renderCoordsHelper.spatialReference))return o;if(n==null)return null;if(e.spatialReference.isGeographic){let e=o===a?new Float32Array(o.length):o;return j(o,0,n,e)}if(e.spatialReference.isWebMercator){let e=o===a?new Float32Array(o.length):o;return M(o,0,n,e)}return o}if(n==null)return null;let l=o===a?new Float32Array(o.length):o,u=this._context.renderCoordsHelper.spatialReference;return ve(o,n,e.spatialReference,t,u,l)}_createTangentBuffer(e,t,n,r,i){let a=i.tangent;if(a==null)return null;let o=a,s=r.reprojection===1?r.transformBeforeProject:null;s&&(o=N(o,new Float32Array(o.length),s));let c=this._context.graphicsCoreOwner.view.viewingMode;if(r.reprojection===0)return o;if(c===`local`){if(!O(this._context.renderCoordsHelper.spatialReference))return o;if(n==null)return null;if(e.spatialReference.isGeographic){let e=o===a?new Float32Array(o.length):o;return j(o,1,n,e)}if(e.spatialReference.isWebMercator){let e=o===a?new Float32Array(o.length):o;return M(o,1,n,e)}return o}if(n==null)return null;let l=o===a?new Float32Array(o.length):o,u=this._context.renderCoordsHelper.spatialReference;return ye(o,n,e.spatialReference,t,u,l)}_createSymbolColorBuffer(e){return this._requiresSymbolVertexColors()?new Uint8Array(this._getDrivenUInt8ColorWithNaNSupport(e,this._materialColor,!0)):null}_createBuffers(e,t){let n=e.vertexAttributes&&e.vertexAttributes.position;if(!n)return this.logger.warn(`Mesh geometry must contain position vertex attributes`),null;let r=e.vertexAttributes.normal,i=e.vertexAttributes.uv,a=e.vertexAttributes.tangent;if(r&&r.length!==n.length)return this.logger.warn(`Mesh normal vertex buffer must contain the same number of elements as the position buffer`),null;if(a&&a.length/4!=n.length/3)return this.logger.warn(`Mesh tangent vertex buffer must contain the same number of elements as the position buffer`),null;if(i&&i.length/2!=n.length/3)return this.logger.warn(`Mesh uv vertex buffer must contain the same number of elements as the position buffer`),null;let o=this._computeReprojectionInfo(e),s=o.reprojection===1&&o.convertLocalVertexSpace,c=s&&e.vertexSpace.type===`local`?xe(e,e.vertexSpace,this._context.renderCoordsHelper.spatialReference):null;if(s&&!c)return this.logger.warn(`Local mesh vertex space could not be converted for rendering`),null;let{position:l,georeferencedPositionBuffer:u}=c?{position:c.position,georeferencedPositionBuffer:null}:this._createPositionBuffer(e,o,e.vertexAttributes),d=nt(e),f=this._createSymbolColorBuffer(t),p=c?c.normal:this._createNormalBuffer(e,l,u,o,e.vertexAttributes),m=c?c.tangent:this._createTangentBuffer(e,l,u,o,e.vertexAttributes),h=i,{geometryTransformation:g}=o,{transformation:_,position:v,normal:y,tangent:b}=this._passthroughReprojectionInfo(o)?{transformation:o.objectTransformation,position:l,normal:p,tangent:m}:this._expressInOriginLocalSpace(e,l,p,m,g);return{positionBuffer:v,normalBuffer:y,tangentBuffer:b,uvBuffer:h,colorBuffer:d,symbolColorBuffer:f,objectTransformation:_,geometryTransformation:g}}_computeReprojectionInfo(e){let{vertexSpace:t}=e,n=t.type===`georeferenced`,r=t.type===`local`&&this._context.graphicsCoreOwner.view.state.isGlobal,i=n?+!D(this._context.renderCoordsHelper.spatialReference,e.spatialReference):+!!r;if(_e(t))return{reprojection:i,geometryTransformation:d()};let a=t.origin,o=e.transform?.localMatrix??f;if(i===0){let t=d();return w(e.spatialReference,a,t,this._context.renderCoordsHelper.spatialReference),{reprojection:i,objectTransformation:t,geometryTransformation:p(o)}}if(r)return{reprojection:i,convertLocalVertexSpace:!0,geometryTransformation:p(o)};let l=s(d(),a);return c(l,l,o),{reprojection:i,transformBeforeProject:l,geometryTransformation:d()}}_expressInOriginLocalSpace(e,t,n,r,i){let a=this._context.renderCoordsHelper.spatialReference,o=e.origin;q[0]=o.x,q[1]=o.y,q[2]=o.z??0;let s=d();w(e.spatialReference,q,s,a),c(Q,s,i),l(Q,Q);let{position:u,normal:f,tangent:p}=e.vertexAttributes,m=t===u?new Float64Array(t.length):t;k(m,t,Q);let h=n?n===f?new Float32Array(n.length):n:null,g=r?r===p?new Float32Array(r.length):r:null;return n&&h&&A(n,h,Q),r&&g&&N(r,g,Q),{transformation:s,position:m,normal:h,tangent:g}}_validateFaces(e,t){let n=e.vertexAttributes.position.length/3,r=t.faces;if(r&&r.length>0){let e=-1;for(let t=0;t<r.length;t++){let n=r[t];n>e&&(e=n)}if(n<=e)return this.logger.warn(`Vertex index ${e} is out of bounds of the mesh position buffer`),!1}else if(n%3!=0)return this.logger.warn(`Mesh position buffer length must be a multiple of 9 if no component faces are defined (3 values per vertex * 3 vertices per triangle)`),!1;return!0}_isOutsideClippingArea(e){if(!this._context.clippingExtent||!e.vertexAttributes?.position)return!1;let t=this._context.elevationProvider.spatialReference,n=be(e,t??e.spatialReference);return n?(le(n,$),!ue($,this._context.clippingExtent)):!1}_createGeometryInfo(e,t,n){if(!oe(e.spatialReference,this._context.renderCoordsHelper.spatialReference))return this.logger.warn(`Geometry spatial reference is not compatible with the view`),null;if(!this._validateVertexSpace(e)||this._isOutsideClippingArea(e))return null;let r=this._createBuffers(e,t);if(r==null)return null;let{positionBuffer:i,uvBuffer:a,colorBuffer:o,symbolColorBuffer:s,normalBuffer:c,tangentBuffer:l,objectTransformation:d,geometryTransformation:f}=r,p=e.components??at,m=[],h=!1,g=u(J,d),_=this._context.localOriginFactory.getOrigin(g);for(let t of p){if(!this._validateFaces(e,t))return null;let r=Ke(e,t);if(r.length===0)continue;let u=qe(i,c,t,r);u.didFlipNormals&&(h=!0);let d=[[`position`,new z(i,r,3,!0)],[`normal`,new z(u.normals,u.indices,3,!0)]];o&&d.push([`color`,new z(o,r,4,!0)]);let p=null;s&&(p=E(r.length),d.push([`symbolColor`,new z(s,p,4,!0)])),a&&d.push([`uv0`,new z(a,r,2,!0)]),l&&d.push([`tangent`,new z(l,r,4,!0)]);let g=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:n,layerViewUid:this._context.layerViewUid});g&&(p??=E(r.length),Ne(d,g,p));let v=this._getOrCreateMaterial(e,t),y=new B(v,d,null);y.transformation=f,y.localOrigin=_,m.push(y)}return h&&this.logger.warn(`Normals have been automatically flipped to be consistent with the counter clock wise face winding order. It is better to generate mesh geometries that have consistent normals.`),m.length===0?null:{geometries:m,objectTransformation:d}}_updateMaterialParameters(e){this._materialInfoCache.forEachMaterialInfo(e),this._fastUpdateProcessor.forEachMaterialInfo(e),this._fastUpdateProcessor.forEachClonedMaterial((e,t)=>{t.setParameters(e.parameters)})}_validateVertexSpace(e){let{_context:{graphicsCoreOwner:{view:{state:{viewingMode:t}}}}}=this,{vertexSpace:n}=e;return t===2&&n.type===`local`?(this.logger.warn(`Displaying a mesh with a local vertex space in a view in local viewing mode is not supported.`),!1):!0}test(){return{...super.test(),materials:this._materialInfoCache.materials}}get _materialColor(){return this.symbolLayer.material?.color}}class H{constructor(e,t,n){this.normals=e,this.indices=t,this.didFlipNormals=n}}function Ke(e,t){return t.faces??fe(e.vertexAttributes.position.length/3)}function qe(e,t,n,r){switch(n.shading||`flat`){default:case`source`:return Ye(e,t,n,r);case`flat`:return Je(e,r);case`smooth`:return Xe(e,r)}}function Je(e,t){let n=T(t.length),r=Array(t.length*3);for(let i=0;i<t.length;i+=3){let a=U(e,t,i,Z);for(let e=0;e<3;e++)n[i+e]=a[e],r[i+e]=i/3}return new H(n,r,!1)}function Ye(e,t,n,r){if(t==null)return Je(e,r);let i=!1;if(!n.trustSourceNormals)for(let n=0;n<r.length;n+=3){U(e,r,n,Z);for(let e=0;e<3;e++){let a=r[n+e]*3;J[0]=t[a],J[1]=t[a+1],J[2]=t[a+2],te(Z,J)<0&&(t[a]=-t[a],t[a+1]=-t[a+1],t[a+2]=-t[a+2],i=!0)}}return new H(t,r,i)}function Xe(e,t){let n={};for(let r=0;r<t.length;r+=3){let i=U(e,t,r,Z);for(let e=0;e<3;e++){let a=t[r+e],o=n[a];o||(o={normal:C(),count:0},n[a]=o),g(o.normal,o.normal,i),o.count++}}let r=T(t.length*3),i=Array(t.length*3);for(let e=0;e<t.length;e++){let a=n[t[e]];a.count!==1&&(b(a.normal,a.normal),a.count=1);for(let t=0;t<3;t++)r[e*3+t]=a.normal[t];i[e]=e}return new H(r,i,!1)}function Ze(e,t,n,r,i,a){let o=t[n]*3,s=t[n+1]*3,c=t[n+2]*3;r[0]=e[o],r[1]=e[o+1],r[2]=e[o+2],i[0]=e[s],i[1]=e[s+1],i[2]=e[s+2],a[0]=e[c],a[1]=e[c+1],a[2]=e[c+2]}function U(e,t,n,r){return Ze(e,t,n,J,Y,X),S(Y,Y,J),S(X,X,J),ee(J,Y,X),b(r,J),r}function Qe(e=`repeat`){if(typeof e==`string`){let t=W(e);return{s:t,t}}return{s:W(e.horizontal),t:W(e.vertical)}}function W(e){switch(e){case`clamp`:return 33071;case`mirror`:return 33648;default:return 10497}}function $e(e){let t=e.vertexAttributes.color;if(t==null)return!1;for(let e=3;e<t.length;e+=4)if(t[e]!==255)return!0;return!1}function et(e,t,n){t.diffuse=e.toUnitRGB(),t.opacity=n.alphaMode===`opaque`?1:e.a}function tt(e){return e.data??e.url}function G(t){return t==null?`-`:t instanceof e?t.toHex():t.contentHash}function K(e){let{offset:t,scale:n,rotation:r}=e??rt;return`${t[0]},${t[1]},${r},${n[0]},${n[1]}`}function nt(e){return e.vertexAttributes.color}const rt=new he,q=C(),J=C(),Y=C(),X=C(),Z=C(),Q=d(),it=d(),$=de(),at=[new pe],ot=C();export{Ge as Graphics3DMeshFillSymbolLayer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{has}from"../../../../applications/Components/baUtils.js";import{pt2px as e}from"../../../../core/screenUtils.js";import{ZEROS as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{fromBuffer as n,intersectsClippingArea as r,empty as i,expandWithAABB as a,create as o}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as s,doubleSubArray as c}from"../../../../geometry/support/DoubleArray.js";import{newFloatArray as l}from"../../../../geometry/support/FloatArray.js";import{getContinuousIndexArray as u}from"../../../../geometry/support/Indices.js";import{isDrivenOpacityFallbackAlwaysOpaque as d}from"../../../../renderers/visualVariables/support/visualVariableUtils.js";import{elevationModeChangeUpdateType as f,needsElevationUpdates2D as p}from"./elevationAlignmentUtils.js";import{PlateLayoutInformation as m,updatePlateNormals as h}from"./extrudePolygon.js";import{Graphics3DDrapedGraphicLayer as g}from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as _}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as v}from"./Graphics3DSymbolLayer.js";import{mixinColorAndOpacity as y}from"./graphicUtils.js";import{parseCapType as b,computeSymbolLayerIndex as x}from"./lineUtils.js";import{geometryAsPolygon as S,createColorGeometry as C,PolygonCreationDataBase as w}from"./polygonUtils.js";import{initFastSymbolUpdatesState as T,updateFastSymbolUpdatesState as E,getAttributeValue as D,ConvertOptions as O}from"../support/FastSymbolUpdates.js";import{createMaterial as k,uvElevationAligner as A}from"../support/patternUtils.js";import{writeMapSpaceUVCoordsPerConnectedPart as j,writeMapSpaceUVCoordsDraped as M}from"../support/uvUtils.js";import{createGeometry as N}from"../../support/engineContent/line.js";import{loadTessellationUtils as P,preloadedPolygonToRenderInfoElevationAligned as F,preloadedPolygonToRenderInfoDraped as I}from"../../support/renderInfoUtils/polygon.js";import{Object3D as L}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as R}from"../../webgl-engine/lib/RenderGeometry.js";import{isScreenSizePerspectiveEnabled as z}from"../../webgl-engine/lib/screenSizePerspectiveUtils.js";import{getStipplePatternForLinePattern as B}from"../../webgl-engine/materials/lineStippleUtils.js";import{PatternMaterial as V}from"../../webgl-engine/materials/PatternMaterial.js";import{RibbonLineMaterial as H}from"../../webgl-engine/materials/RibbonLineMaterial.js";const U=[`polyline`,`polygon`,`extent`];class W extends v{static{this.elevationModeChangeTypes={definedChanged:2,staysOnTheGround:0,onTheGroundChanged:2}}constructor(e,t,n,r){super(e,t,n,r,d(t)),this._needsUV=!1,this._materials=[]}async doLoad(){this._fastUpdates=T(this._context.renderer,this._vvConvertOptions),await P()}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 _shadingEnabled(){return!this.draped&&!!has(`enable-feature:emissive-on-non-volumetric`)}_createMaterials(){if(this._materials.length>0)return;let{_materialColor:t,draped:n,_shadingEnabled:r}=this,i=this._getCombinedOpacityAndColor(t);this._materials[0]=k(this.symbolLayer,{color:i,forceTransparentMode:this.needsDrivenTransparentPass,hasVertexColors:this._drivenProperties.color||this._drivenProperties.opacity,draped:n,shading:+!!r,castShadows:r,hasSlicePlane:this._context.slicePlaneEnabled,emissiveStrength:this._emissiveStrength,...this._fastUpdates?.materialParameters},this._context),this._needsUV=this._materials[0]instanceof V;let a=this.symbolLayer.outline;if(J(a)){let t=B(a.pattern),n=b(a.pattern?a.patternCap||`butt`:`square`);this._materials[1]=new H({color:this._getOutlineColor(),width:e(a.size),polygonOffset:3,polygonOffsetIndex:x(this._renderPriority,this._renderPriorityStep),shadingEnabled:r,hasSlicePlane:this._context.slicePlaneEnabled,isClosed:!0,stipplePattern:t,cap:n,screenSizePerspective:this._outlineScreenSizePerspective},this.view)}}get _outlineScreenSizePerspective(){return!this.draped&&z(this._context.layer.screenSizePerspectiveEnabled)?this.view.screenSizePerspective.parameters:null}createGraphics3DGraphic(e){let t=e.graphic;if(!this._validateGeometry(t.geometry,U,this.symbolLayer.type))return null;let n=this._getDrivenUInt8Color(e.renderingInfo,this._materialColor,!1),r=this.createElevationContextForGraphic(t);return this.ensureDrapedStatus(r.mode===`on-the-ground`),this._createMaterials(),this.draped?this._createAsOverlay(e.renderingInfo,t,n):this._createAs3DShape(e.renderingInfo,t,n,r)}applyRendererDiff(e,t){for(let n in e.diff)switch(n){case`visualVariables`:if(E(this._fastUpdates,t,this._vvConvertOptions))this._materials[0]?.setParameters(this._fastUpdates.materialParameters);else return 0;break;default:return 0}return 2}layerOpacityChanged(){if(this._materials[0]!=null){let e=this._materials[0].parameters.color,t=this._materialColor,n=this._getCombinedOpacity(t);this._materials[0].setParameters({color:[e[0],e[1],e[2],n],forceTransparentMode:this.needsDrivenTransparentPass})}if(this._materials[1]!=null){let e=this._materials[1].parameters.color;this._materials[1].setParameters({color:[e[0],e[1],e[2],this._getOutlineOpacity()]})}}layerScreenSizePerspectiveChanged(){this._materials[1]?.setParameters({screenSizePerspective:this._outlineScreenSizePerspective})}layerElevationInfoChanged(e,t,n){let r=this._elevationContext.mode,i=f(W.elevationModeChangeTypes,n,r);if(i!==1)return i;let a=p(r);return this.updateGraphics3DGraphicElevationInfo(e,t,()=>a)}slicePlaneEnabledChanged(){if(this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),this._materials[1]){let e={hasSlicePlane:this._context.slicePlaneEnabled};this._materials[1].setParameters(e)}return!0}physicalBasedRenderingChanged(){return!0}_containsRenderableGeometry(e){return e.polygonIndexCount>0?!0:this._materials[1]==null?!1:e.outline.output===`vertex-data`?e.outline.outlines.length>0:e.outlineIndexCount>0}_createAs3DShape(e,t,n,r){let i=S(t.geometry);if(!i)return null;let a=this._shadingEnabled,o=F(i,this._context.elevationProvider,this._context.renderCoordsHelper,r,{projectIfNearlyVertical:!0,requireNormals:a,outlineOutput:`vertex-data`,owner:this._context.layer});if(o==null)return null;let d=new K(o,n,this._context.layerViewUid,t.uid),f=d.renderInfo.vertexCount;if(this._needsUV){d.uvMapSpace=l(f*4,!0),d.textureElementIndices=Array(f),d.boundingRect=s(9*(d.renderInfo.polygonIndices.length/3));let e=j(d.uvMapSpace,d.boundingRect,d.textureElementIndices,d.renderInfo.positions,d.renderInfo.polygonIndices,this._context.renderCoordsHelper);d.boundingRect=c(d.boundingRect,0,9*e),d.boundingRectIndices=u(e)}if(d.olidColor=this._context.stage.renderView?.getObjectAndLayerIdColor(d),this._createAs3DShapeFill(e,d),this._materials[1]&&this._createAs3DShapeOutline(d),this._logGeometryCreationWarnings(d.renderInfo,i.rings,`rings`,`FillSymbol3DLayer`),d.outGeometries.length===0)return null;let m=new L({geometries:d.outGeometries,castShadow:this._shadingEnabled,layerViewUid:this._context.layerViewUid,graphicUid:t.uid}),h=new _(this,m,null,(e,t,n,r,i)=>A(e,t,n,r,i,d.plateLayout),r);return h.alignedSampledElevation=d.renderInfo.sampledElevation,h.needsElevationUpdates=p(r.mode),h}_createAs3DShapeFill(e,t){let{mapPositions:i,positions:a,polygonIndices:o,polygonIndexCount:s,vertexCount:c,compressedNormals:l}=t.renderInfo;if(s===0||this._context.clippingExtent!=null&&(n(i,G),!r(G,this._context.clippingExtent)))return;let u=this._fastUpdates?.visualVariables.color,d=C({material:this._materials[0],indices:o,mapPositions:i,attributeData:{position:a,color:u?null:t.color,compressedNormals:l,colorFeature:u?D(u,e.color):null,uvMapSpace:this._needsUV?t.uvMapSpace:null,boundingRect:this._needsUV?t.boundingRect:null,textureElementIndices:this._needsUV?t.textureElementIndices:null,boundingRectIndices:this._needsUV?t.boundingRectIndices:null,olidColor:t.olidColor}});t.plateLayout=new m(c,0,null,0,s/3),h(d,t.plateLayout),t.outGeometries.push(d)}_createAs3DShapeOutline(e){if(this._materials[1]==null)return;let{outline:t}=e.renderInfo;if(t.output!==`vertex-data`)return;let{outlines:i}=t;if(i!=null&&i.length!==0)for(let{mapPositions:t,position:a}of i){if(this._context.clippingExtent!=null&&(n(t,G),!r(G,this._context.clippingExtent)))continue;let i=N(this._materials[1],{overlayInfo:null,removeDuplicateStartEnd:!0,mapPositions:t,attributeData:{position:a}},e.olidColor);e.outGeometries.push(i)}}_createAsOverlay(e,t,n){let r=S(t.geometry);if(r==null)return null;this._materials[0].renderPriority=this._renderPriority+this._renderPriorityStep/2,this._materials[1]!=null&&(this._materials[1].renderPriority=this._renderPriority);let a=I(r,{drapedSpatialReference:this._context.overlaySR,outlineOutput:`vertex-data`,owner:this._context.layer});if(a==null)return null;let o=new q(a,n,this._context.layerViewUid,t.uid);return this._needsUV&&(o.uvMapSpace=l(o.renderInfo.vertexCount*4,!0),M(o.uvMapSpace,o.renderInfo.positions,this._context.overlaySR,this._context.graphicsCoreOwner.view.state.viewingMode)),o.outBoundingBox=i(),o.olidColor=this._context.stage.renderView?.getObjectAndLayerIdColor(o),this._createAsOverlayFill(e,o),this._materials[1]&&this._createAsOverlayOutline(o),this._logGeometryCreationWarnings(o.renderInfo,r.rings,`rings`,`FillSymbol3DLayer`),new g(this,o.outGeometries,o.outBoundingBox,this._context.drapeSourceRenderer)}_createAsOverlayFill(e,t){let{positions:i,polygonIndices:o,polygonIndexCount:s}=t.renderInfo;if(s===0)return;let c=n(i,G);if(!r(c,this._context.clippingExtent))return;a(t.outBoundingBox,c);let l=this._fastUpdates?.visualVariables.color,u=C({material:this._materials[0],indices:o,attributeData:{position:i,color:l?null:t.color,colorFeature:l?D(l,e.color):null,uvMapSpace:this._needsUV?t.uvMapSpace:null,olidColor:t.olidColor}});t.outGeometries.push(new R(u,t))}_createAsOverlayOutline(e){if(this._materials[1]==null)return;let{outline:t}=e.renderInfo;if(t.output!==`vertex-data`)return;let{outlines:i}=t;for(let{position:t}of i){if(n(t,G),!r(G,this._context.clippingExtent))continue;a(e.outBoundingBox,G);let i=N(this._materials[1],{overlayInfo:{spatialReference:this._context.overlaySR,renderCoordsHelper:this._context.renderCoordsHelper},removeDuplicateStartEnd:!0,attributeData:{position:t}},e.olidColor);e.outGeometries.push(new R(i,e))}}_getOutlineOpacity(){let e=this.symbolLayer?.outline?.color;return(this.draped?1:this._getLayerOpacity())*(e==null?0:e.a)}_getOutlineColor(){let e=this.symbolLayer?.outline?.color,t=this._getOutlineOpacity();return y(e?.toUnitRGB(),t)}test(){return{...super.test(),createAsOverlay:(e,t,n)=>this._createAsOverlay(e,t,n),createAs3DShape:(e,t,n,r)=>this._createAs3DShape(e,t,n,r)}}get _vvConvertOptions(){return new O({supports:{size:!1,color:!0,rotation:!1,opacity:!1},fallbackColor:this._materialColor?.toUnitRGBA()??t})}}const G=o();class K extends w{constructor(e,t,n,r){super(e,n,r),this.color=t}}class q extends w{constructor(e,t,n,r){super(e,n,r),this.color=t}}function J(e){return e?.size!=null&&e.size>0&&e.color!=null&&(e.pattern==null||e.pattern.type!==`style`||e.pattern.style!==`none`)}export{W as Graphics3DPolygonFillSymbolLayer};
2
+ import{has}from"../../../../applications/Components/baUtils.js";import{pt2px as e}from"../../../../core/screenUtils.js";import{ZEROS as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{fromBuffer as n,intersectsClippingArea as r,empty as i,expandWithAABB as a,create as o}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as s,doubleSubArray as c}from"../../../../geometry/support/DoubleArray.js";import{newFloatArray as l}from"../../../../geometry/support/FloatArray.js";import{getContinuousIndexArray as u}from"../../../../geometry/support/Indices.js";import{isDrivenOpacityFallbackAlwaysOpaque as d}from"../../../../renderers/visualVariables/support/visualVariableUtils.js";import{elevationModeChangeUpdateType as f,needsElevationUpdates2D as p}from"./elevationAlignmentUtils.js";import{PlateLayoutInformation as m,updatePlateNormals as h}from"./extrudePolygon.js";import{Graphics3DDrapedGraphicLayer as g}from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as _}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as v}from"./Graphics3DSymbolLayer.js";import{mixinColorAndOpacity as y}from"./graphicUtils.js";import{parseCapType as b,computeSymbolLayerIndex as x}from"./lineUtils.js";import{geometryAsPolygon as S,createColorGeometry as C,PolygonCreationDataBase as w}from"./polygonUtils.js";import{initFastSymbolUpdatesState as T,updateFastSymbolUpdatesState as E,getAttributeValue as D,ConvertOptions as O}from"../support/FastSymbolUpdates.js";import{createMaterial as k,uvElevationAligner as A}from"../support/patternUtils.js";import{writeMapSpaceUVCoordsPerConnectedPart as j,writeMapSpaceUVCoordsDraped as M}from"../support/uvUtils.js";import{createGeometry as N}from"../../support/engineContent/line.js";import{loadTessellationUtils as P,preloadedPolygonToRenderInfoElevationAligned as F,preloadedPolygonToRenderInfoDraped as I}from"../../support/renderInfoUtils/polygon.js";import{Object3D as L}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as R}from"../../webgl-engine/lib/RenderGeometry.js";import{isScreenSizePerspectiveEnabled as z}from"../../webgl-engine/lib/screenSizePerspectiveUtils.js";import{getStipplePatternForLinePattern as B}from"../../webgl-engine/materials/lineStippleUtils.js";import{PatternMaterial as V}from"../../webgl-engine/materials/PatternMaterial.js";import{RibbonLineMaterial as H}from"../../webgl-engine/materials/RibbonLineMaterial.js";const U=[`polyline`,`polygon`,`extent`];class W extends v{static{this.elevationModeChangeTypes={definedChanged:2,staysOnTheGround:0,onTheGroundChanged:2}}constructor(e,t,n,r){super(e,t,n,r,d(t)),this._needsUV=!1,this._materials=[]}async doLoad(){this._fastUpdates=T(this._context.renderer,this._vvConvertOptions),await P()}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 _shadingEnabled(){return!this.draped&&!!has(`enable-feature:emissive-on-non-volumetric`)}_createMaterials(){if(this._materials.length>0)return;let{_materialColor:t,draped:n,_shadingEnabled:r}=this,i=this._getCombinedOpacityAndColor(t);this._materials[0]=k(this.symbolLayer,{color:i,forceTransparentMode:this.needsDrivenTransparentPass,hasVertexColors:this._drivenProperties.color||this._drivenProperties.opacity,draped:n,shading:+!!r,castShadows:r&&this.symbolLayer.castShadows,hasSlicePlane:this._context.slicePlaneEnabled,emissiveStrength:this._emissiveStrength,...this._fastUpdates?.materialParameters},this._context),this._needsUV=this._materials[0]instanceof V;let a=this.symbolLayer.outline;if(J(a)){let t=B(a.pattern),n=b(a.pattern?a.patternCap||`butt`:`square`);this._materials[1]=new H({color:this._getOutlineColor(),width:e(a.size),polygonOffset:3,polygonOffsetIndex:x(this._renderPriority,this._renderPriorityStep),shadingEnabled:r,hasSlicePlane:this._context.slicePlaneEnabled,isClosed:!0,stipplePattern:t,cap:n,screenSizePerspective:this._outlineScreenSizePerspective},this.view)}}get _outlineScreenSizePerspective(){return!this.draped&&z(this._context.layer.screenSizePerspectiveEnabled)?this.view.screenSizePerspective.parameters:null}createGraphics3DGraphic(e){let t=e.graphic;if(!this._validateGeometry(t.geometry,U,this.symbolLayer.type))return null;let n=this._getDrivenUInt8Color(e.renderingInfo,this._materialColor,!1),r=this.createElevationContextForGraphic(t);return this.ensureDrapedStatus(r.mode===`on-the-ground`),this._createMaterials(),this.draped?this._createAsOverlay(e.renderingInfo,t,n):this._createAs3DShape(e.renderingInfo,t,n,r)}applyRendererDiff(e,t){for(let n in e.diff)switch(n){case`visualVariables`:if(E(this._fastUpdates,t,this._vvConvertOptions))this._materials[0]?.setParameters(this._fastUpdates.materialParameters);else return 0;break;default:return 0}return 2}layerOpacityChanged(){if(this._materials[0]!=null){let e=this._materials[0].parameters.color,t=this._materialColor,n=this._getCombinedOpacity(t);this._materials[0].setParameters({color:[e[0],e[1],e[2],n],forceTransparentMode:this.needsDrivenTransparentPass})}if(this._materials[1]!=null){let e=this._materials[1].parameters.color;this._materials[1].setParameters({color:[e[0],e[1],e[2],this._getOutlineOpacity()]})}}layerScreenSizePerspectiveChanged(){this._materials[1]?.setParameters({screenSizePerspective:this._outlineScreenSizePerspective})}layerElevationInfoChanged(e,t,n){let r=this._elevationContext.mode,i=f(W.elevationModeChangeTypes,n,r);if(i!==1)return i;let a=p(r);return this.updateGraphics3DGraphicElevationInfo(e,t,()=>a)}slicePlaneEnabledChanged(){if(this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),this._materials[1]){let e={hasSlicePlane:this._context.slicePlaneEnabled};this._materials[1].setParameters(e)}return!0}physicalBasedRenderingChanged(){return!0}_containsRenderableGeometry(e){return e.polygonIndexCount>0?!0:this._materials[1]==null?!1:e.outline.output===`vertex-data`?e.outline.outlines.length>0:e.outlineIndexCount>0}_createAs3DShape(e,t,n,r){let i=S(t.geometry);if(!i)return null;let a=this._shadingEnabled,o=F(i,this._context.elevationProvider,this._context.renderCoordsHelper,r,{projectIfNearlyVertical:!0,requireNormals:a,outlineOutput:`vertex-data`,owner:this._context.layer});if(o==null)return null;let d=new K(o,n,this._context.layerViewUid,t.uid),f=d.renderInfo.vertexCount;if(this._needsUV){d.uvMapSpace=l(f*4,!0),d.textureElementIndices=Array(f),d.boundingRect=s(9*(d.renderInfo.polygonIndices.length/3));let e=j(d.uvMapSpace,d.boundingRect,d.textureElementIndices,d.renderInfo.positions,d.renderInfo.polygonIndices,this._context.renderCoordsHelper);d.boundingRect=c(d.boundingRect,0,9*e),d.boundingRectIndices=u(e)}if(d.olidColor=this._context.stage.renderView?.getObjectAndLayerIdColor(d),this._createAs3DShapeFill(e,d),this._materials[1]&&this._createAs3DShapeOutline(d),this._logGeometryCreationWarnings(d.renderInfo,i.rings,`rings`,`FillSymbol3DLayer`),d.outGeometries.length===0)return null;let m=new L({geometries:d.outGeometries,castShadow:this._shadingEnabled,layerViewUid:this._context.layerViewUid,graphicUid:t.uid}),h=d.plateLayout,g=new _(this,m,null,(e,t,n,r,i)=>A(e,t,n,r,i,h),r);return g.alignedSampledElevation=d.renderInfo.sampledElevation,g.needsElevationUpdates=p(r.mode),g}_createAs3DShapeFill(e,t){let{mapPositions:i,positions:a,polygonIndices:o,polygonIndexCount:s,vertexCount:c,compressedNormals:l}=t.renderInfo;if(s===0||this._context.clippingExtent!=null&&(n(i,G),!r(G,this._context.clippingExtent)))return;let u=this._fastUpdates?.visualVariables.color,d=C({material:this._materials[0],indices:o,mapPositions:i,attributeData:{position:a,color:u?null:t.color,compressedNormals:l,colorFeature:u?D(u,e.color):null,uvMapSpace:this._needsUV?t.uvMapSpace:null,boundingRect:this._needsUV?t.boundingRect:null,textureElementIndices:this._needsUV?t.textureElementIndices:null,boundingRectIndices:this._needsUV?t.boundingRectIndices:null,olidColor:t.olidColor}});t.plateLayout=new m(c,0,null,0,s/3),h(d,t.plateLayout),t.outGeometries.push(d)}_createAs3DShapeOutline(e){if(this._materials[1]==null)return;let{outline:t}=e.renderInfo;if(t.output!==`vertex-data`)return;let{outlines:i}=t;if(i!=null&&i.length!==0)for(let{mapPositions:t,position:a}of i){if(this._context.clippingExtent!=null&&(n(t,G),!r(G,this._context.clippingExtent)))continue;let i=N(this._materials[1],{overlayInfo:null,removeDuplicateStartEnd:!0,mapPositions:t,attributeData:{position:a}},e.olidColor);e.outGeometries.push(i)}}_createAsOverlay(e,t,n){let r=S(t.geometry);if(r==null)return null;this._materials[0].renderPriority=this._renderPriority+this._renderPriorityStep/2,this._materials[1]!=null&&(this._materials[1].renderPriority=this._renderPriority);let a=I(r,{drapedSpatialReference:this._context.overlaySR,outlineOutput:`vertex-data`,owner:this._context.layer});if(a==null)return null;let o=new q(a,n,this._context.layerViewUid,t.uid);return this._needsUV&&(o.uvMapSpace=l(o.renderInfo.vertexCount*4,!0),M(o.uvMapSpace,o.renderInfo.positions,this._context.overlaySR,this._context.graphicsCoreOwner.view.state.viewingMode)),o.outBoundingBox=i(),o.olidColor=this._context.stage.renderView?.getObjectAndLayerIdColor(o),this._createAsOverlayFill(e,o),this._materials[1]&&this._createAsOverlayOutline(o),this._logGeometryCreationWarnings(o.renderInfo,r.rings,`rings`,`FillSymbol3DLayer`),new g(this,o.outGeometries,o.outBoundingBox,this._context.drapeSourceRenderer)}_createAsOverlayFill(e,t){let{positions:i,polygonIndices:o,polygonIndexCount:s}=t.renderInfo;if(s===0)return;let c=n(i,G);if(!r(c,this._context.clippingExtent))return;a(t.outBoundingBox,c);let l=this._fastUpdates?.visualVariables.color,u=C({material:this._materials[0],indices:o,attributeData:{position:i,color:l?null:t.color,colorFeature:l?D(l,e.color):null,uvMapSpace:this._needsUV?t.uvMapSpace:null,olidColor:t.olidColor}});t.outGeometries.push(new R(u,t))}_createAsOverlayOutline(e){if(this._materials[1]==null)return;let{outline:t}=e.renderInfo;if(t.output!==`vertex-data`)return;let{outlines:i}=t;for(let{position:t}of i){if(n(t,G),!r(G,this._context.clippingExtent))continue;a(e.outBoundingBox,G);let i=N(this._materials[1],{overlayInfo:{spatialReference:this._context.overlaySR,renderCoordsHelper:this._context.renderCoordsHelper},removeDuplicateStartEnd:!0,attributeData:{position:t}},e.olidColor);e.outGeometries.push(new R(i,e))}}_getOutlineOpacity(){let e=this.symbolLayer?.outline?.color;return(this.draped?1:this._getLayerOpacity())*(e==null?0:e.a)}_getOutlineColor(){let e=this.symbolLayer?.outline?.color,t=this._getOutlineOpacity();return y(e?.toUnitRGB(),t)}test(){return{...super.test(),createAsOverlay:(e,t,n)=>this._createAsOverlay(e,t,n),createAs3DShape:(e,t,n,r)=>this._createAs3DShape(e,t,n,r)}}get _vvConvertOptions(){return new O({supports:{size:!1,color:!0,rotation:!1,opacity:!1},fallbackColor:this._materialColor?.toUnitRGBA()??t})}}const G=o();class K extends w{constructor(e,t,n,r){super(e,n,r),this.color=t}}class q extends w{constructor(e,t,n,r){super(e,n,r),this.color=t}}function J(e){return e?.size!=null&&e.size>0&&e.color!=null&&(e.pattern==null||e.pattern.type!==`style`||e.pattern.style!==`none`)}export{W as Graphics3DPolygonFillSymbolLayer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{isSome as e}from"../../../../core/arrayUtils.js";import{forEach as t}from"../../../../core/asyncUtils.js";import n from"../../../../core/Error.js";import"../../../../core/has.js";import{onAbortOrThrow as r,throwIfAborted as i}from"../../../../core/promiseUtils.js";import{aggregateSymbolComplexity as a}from"./defaultSymbolComplexity.js";import{Graphics3DGraphic as o}from"./Graphics3DGraphic.js";import{Graphics3DSymbolLayerCreationContext as s}from"./Graphics3DSymbolCreationContext.js";import{Loadable as c}from"./Loadable.js";import{AggregateSymbolComplexity as l}from"./SymbolComplexity.js";import{getSymbolMemorySize as u}from"./symbolMemory.js";class d extends c{set symbol(e){this._symbol=e,e.symbolLayers.forEach((t,n)=>{let r=this.symbolLayers[n];r!=null&&(r.symbol=e,r.symbolLayer=t)})}get symbol(){return this._symbol}constructor(e,t,n){super(t.schedule),this._symbol=e,this._context=t,this._backgroundLayers=n,this._destroyed=!1,this.symbolLayers=[],this.referenced=0,this._extentPadding=0}async doLoad(e){let a=this._symbol.symbolLayers;this._extentPadding=0,this._backgroundLayers&&(a=this._backgroundLayers.concat(a));let o=a.length;for(;this.symbolLayers.length<a.length;)this.symbolLayers.push(null);this.symbolLayers.length=a.length;let s=[];if(!f){let{make:e}=await(p??=import(`./Graphics3DSymbolLayerFactory.js`).catch(e=>{throw p=null,e}));f=e}for(let t=0;t<o;t++){let n=a.at(t);if(n.enabled===!1)continue;m.renderPriority=1-(1+t)/o,m.renderPriorityStep=1/o,m.ignoreDrivers=n.ignoreDrivers;let i=f(this.symbol,n,this._context,m),c=r(e,()=>{this.symbolLayers[t]=null,i.destroy()});c&&s.push(c),this.symbolLayers[t]=i}let c;if(await t(this.symbolLayers,async(e,t)=>{if(e!=null)try{await e.load(),this._extentPadding+=Math.max(this._extentPadding,e.extentPadding)}catch(e){this.symbolLayers[t]=null,c??=e}}),s.forEach(e=>e.remove()),i(e),this.symbolLayers.length&&!this.symbolLayers.some(e=>!!e))throw c??new n(`graphics3dsymbol:load`,`No symbollayers loaded`)}getSymbolLayerSize(e){let t=this.symbolLayers[e];return t==null?null:t.getCachedSize()}get extentPadding(){return this._extentPadding}get symbologySnappingSupported(){return this.symbolLayers.some(e=>e?.queryForSnapping)}get needsUpdateFocus(){return this.symbolLayers.some(e=>e?.needsUpdateFocus===!0)}createGraphics3DGraphic(e,t){let{graphic:n}=e,r=this.symbolLayers.map(t=>t?.createGraphics3DGraphic(e)??null);return new o(n,t||this,r,e.reportGraphicSourceMemory)}get complexity(){let e=new l;return this.symbolLayers.forEach(t=>a(t?.complexity,e)),e}globalPropertyChanged(e,t){let n=this.symbolLayers.length;for(let r=0;r<n;r++){let n=this.symbolLayers[r];if(n!=null&&!n.globalPropertyChanged(e,t,e=>{let t=e.layers[r];return t?.type===`object3d`||t?.type===`buffer`?t:null}))return!1}return!0}applyRendererDiff(e,t){return this.loadStatus===1?this.symbolLayers.reduce((n,r)=>n!==0&&r!=null?Math.min(n,r.applyRendererDiff(e,t)):n,2):0}prepareSymbolPatch(e){if(this.loadStatus===2||e.diff.type!==`partial`)return;let t=e.diff.diff;if(!t.symbolLayers||t.symbolLayers.type!==`partial`)return;let n=t.symbolLayers.diff;this.symbolLayers.forEach((t,r)=>{if(t==null)return;let i=n[r];if(i){let n={diff:i,graphics3DGraphicPatches:[],symbolLayerStatePatches:[]};t.prepareSymbolLayerPatch(n),e.symbolStatePatches.push(...n.symbolLayerStatePatches),n.graphics3DGraphicPatches.length&&e.graphics3DGraphicPatches.push((e,t)=>{let i=e.layers[r];i!=null&&n.graphics3DGraphicPatches.forEach(e=>e(i,t))})}})}updateGeometry(e){return this._updateGeometryOrTransform(e,(t,n)=>t.updateGeometry?t.updateGeometry(e.graphic,n):!1)}updateMeshTransform(e,t,n,r,i){return this._updateGeometryOrTransform(e,(e,a)=>e.updateMeshTransform?e.updateMeshTransform(a,t,n,r,i):!1)}_updateGeometryOrTransform(e,t){for(let n=0;n<this.symbolLayers.length;n++){let r=this.symbolLayers[n];if(r==null)continue;let i=e.layers[n];if(!i||!t(r,i))return!1}return!0}onRemoveGraphic(e){for(let t=0;t<this.symbolLayers.length;t++){let n=this.symbolLayers[t];if(n==null)continue;let r=e.layers[t];r!=null&&n.onRemoveGraphic(r)}}getFastUpdateStatus(){let e=!1,t=!1;for(let n of this.symbolLayers)if(n!=null){if(n.loadStatus===0)return 3;n.isFastUpdatesEnabled()?t=!0:e=!0}return t?e?2:1:e?0:4}async queryForSnapping(t,n,r,a){let o=this.symbolLayers.filter(e).filter(e=>e.queryForSnapping!=null).map(e=>e.queryForSnapping(t,n,r,a)),s=await Promise.all(o);return i(a),s.flat()}destroy(){if(!this.destroyed){super.destroy();for(let e of this.symbolLayers)e?.destroy();this.symbolLayers.length=0,this._destroyed=!0}}get destroyed(){return this._destroyed}get usedMemory(){return u(this)}}let f=null,p=null;const m=new s;export{d as Graphics3DSymbol};
2
+ import{isSome as e}from"../../../../core/arrayUtils.js";import{forEach as t}from"../../../../core/asyncUtils.js";import n from"../../../../core/Error.js";import"../../../../core/has.js";import{onAbortOrThrow as r,throwIfAborted as i}from"../../../../core/promiseUtils.js";import{aggregateSymbolComplexity as a}from"./defaultSymbolComplexity.js";import{Graphics3DGraphic as o}from"./Graphics3DGraphic.js";import{Graphics3DSymbolLayerCreationContext as s}from"./Graphics3DSymbolCreationContext.js";import{Loadable as c}from"./Loadable.js";import{AggregateSymbolComplexity as l}from"./SymbolComplexity.js";import{getSymbolMemorySize as u}from"./symbolMemory.js";class d extends c{set symbol(e){this._symbol=e,e.symbolLayers.forEach((t,n)=>{let r=this.symbolLayers[n];r!=null&&(r.symbol=e,r.symbolLayer=t)})}get symbol(){return this._symbol}constructor(e,t,n){super(t.schedule),this._symbol=e,this._context=t,this._backgroundLayers=n,this._destroyed=!1,this.symbolLayers=[],this.referenced=0,this._extentPadding=0}async doLoad(e){let a=this._symbol.symbolLayers;this._extentPadding=0,this._backgroundLayers&&(a=this._backgroundLayers.concat(a));let o=a.length;for(;this.symbolLayers.length<a.length;)this.symbolLayers.push(null);this.symbolLayers.length=a.length;let s=[];if(!f){let{make:e}=await(p??=import(`./Graphics3DSymbolLayerFactory.js`).catch(e=>{throw p=null,e}));f=e}for(let t=0;t<o;t++){let n=a.at(t);if(n.enabled===!1)continue;m.renderPriority=1-(1+t)/o,m.renderPriorityStep=1/o,m.ignoreDrivers=n.ignoreDrivers;let i=f(this.symbol,n,this._context,m),c=r(e,()=>{this.symbolLayers[t]=null,i.destroy()});c&&s.push(c),this.symbolLayers[t]=i}let c;if(await t(this.symbolLayers,async(e,t)=>{if(e!=null)try{await e.load(),this._extentPadding+=Math.max(this._extentPadding,e.extentPadding)}catch(e){this.symbolLayers[t]=null,c??=e}}),s.forEach(e=>e.remove()),i(e),this.symbolLayers.length&&!this.symbolLayers.some(e=>!!e))throw c??new n(`graphics3dsymbol:load`,`No symbollayers loaded`)}getSymbolLayerSize(e){let t=this.symbolLayers[e];return t==null?null:t.getCachedSize()}get extentPadding(){return this._extentPadding}get symbologySnappingSupported(){return this.symbolLayers.some(e=>e?.queryForSnapping)}get needsUpdateFocus(){return this.symbolLayers.some(e=>e?.needsUpdateFocus===!0)}createGraphics3DGraphic(e,t){let{graphic:n}=e,r=this.symbolLayers.map(t=>t?.createGraphics3DGraphic(e)??null);return new o(n,t||this,r,e.reportGraphicSourceMemory)}get complexity(){let e=new l;return this.getComplexity(e),e}getComplexity(e){e.reset(),this.symbolLayers.forEach(t=>a(t?.complexity,e))}globalPropertyChanged(e,t){let n=this.symbolLayers.length;for(let r=0;r<n;r++){let n=this.symbolLayers[r];if(n!=null&&!n.globalPropertyChanged(e,t,e=>{let t=e.layers[r];return t?.type===`object3d`||t?.type===`buffer`?t:null}))return!1}return!0}applyRendererDiff(e,t){return this.loadStatus===1?this.symbolLayers.reduce((n,r)=>n!==0&&r!=null?Math.min(n,r.applyRendererDiff(e,t)):n,2):0}prepareSymbolPatch(e){if(this.loadStatus===2||e.diff.type!==`partial`)return;let t=e.diff.diff;if(!t.symbolLayers||t.symbolLayers.type!==`partial`)return;let n=t.symbolLayers.diff;this.symbolLayers.forEach((t,r)=>{if(t==null)return;let i=n[r];if(i){let n={diff:i,graphics3DGraphicPatches:[],symbolLayerStatePatches:[]};t.prepareSymbolLayerPatch(n),e.symbolStatePatches.push(...n.symbolLayerStatePatches),n.graphics3DGraphicPatches.length&&e.graphics3DGraphicPatches.push((e,t)=>{let i=e.layers[r];i!=null&&n.graphics3DGraphicPatches.forEach(e=>e(i,t))})}})}updateGeometry(e){return this._updateGeometryOrTransform(e,(t,n)=>t.updateGeometry?t.updateGeometry(e.graphic,n):!1)}updateMeshTransform(e,t,n,r,i){return this._updateGeometryOrTransform(e,(e,a)=>e.updateMeshTransform?e.updateMeshTransform(a,t,n,r,i):!1)}_updateGeometryOrTransform(e,t){for(let n=0;n<this.symbolLayers.length;n++){let r=this.symbolLayers[n];if(r==null)continue;let i=e.layers[n];if(!i||!t(r,i))return!1}return!0}onRemoveGraphic(e){for(let t=0;t<this.symbolLayers.length;t++){let n=this.symbolLayers[t];if(n==null)continue;let r=e.layers[t];r!=null&&n.onRemoveGraphic(r)}}getFastUpdateStatus(){let e=!1,t=!1;for(let n of this.symbolLayers)if(n!=null){if(n.loadStatus===0)return 3;n.isFastUpdatesEnabled()?t=!0:e=!0}return t?e?2:1:e?0:4}async queryForSnapping(t,n,r,a){let o=this.symbolLayers.filter(e).filter(e=>e.queryForSnapping!=null).map(e=>e.queryForSnapping(t,n,r,a)),s=await Promise.all(o);return i(a),s.flat()}destroy(){if(!this.destroyed){super.destroy();for(let e of this.symbolLayers)e?.destroy();this.symbolLayers.length=0,this._destroyed=!0}}get destroyed(){return this._destroyed}get usedMemory(){return u(this)}}let f=null,p=null;const m=new s;export{d as Graphics3DSymbol};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{throwIfAborted as e}from"../../../../core/promiseUtils.js";import{emptySymbolComplexity as t}from"./defaultSymbolComplexity.js";import{Loadable as n}from"./Loadable.js";import{getSymbolMemorySize as r}from"./symbolMemory.js";class i extends n{constructor(e,t,n){super(t),this.symbol=e,this._convert=n,this.symbologySnappingSupported=!1,this.graphics3DSymbol=null,this.referenced=0}getSymbolLayerSize(e){return this.graphics3DSymbol==null?null:this.graphics3DSymbol.getSymbolLayerSize(e)}get symbolLayers(){return this.graphics3DSymbol==null?[]:this.graphics3DSymbol.symbolLayers}get extentPadding(){return this.graphics3DSymbol==null?0:this.graphics3DSymbol.extentPadding}async doLoad(t){let n=await this.symbol.fetchSymbol({signal:t});e(t),n.id=this.symbol.id,this.graphics3DSymbol=this._convert(n),this.graphics3DSymbol!=null&&(await this.graphics3DSymbol.load(),e(t))}createGraphics3DGraphic(e){return this.graphics3DSymbol==null?null:this.graphics3DSymbol.createGraphics3DGraphic(e,this)}get complexity(){return this.graphics3DSymbol==null?t:this.graphics3DSymbol.complexity}globalPropertyChanged(e,t){return this.graphics3DSymbol!=null&&this.graphics3DSymbol.globalPropertyChanged(e,t)}applyRendererDiff(e,t){return this.graphics3DSymbol==null?0:this.graphics3DSymbol.applyRendererDiff(e,t)}prepareSymbolPatch(e){this.graphics3DSymbol!=null&&this.graphics3DSymbol.prepareSymbolPatch(e)}updateGeometry(e){return this.graphics3DSymbol!=null&&this.graphics3DSymbol.updateGeometry(e)}updateMeshTransform(e,t,n,r,i){return this.graphics3DSymbol?.updateMeshTransform(e,t,n,r,i)??!1}onRemoveGraphic(){}get needsUpdateFocus(){return!1}getFastUpdateStatus(){return this.graphics3DSymbol?.getFastUpdateStatus()??3}destroy(){this.graphics3DSymbol!=null&&this.graphics3DSymbol.destroy(),this.graphics3DSymbol=void 0,super.destroy()}get destroyed(){return this.graphics3DSymbol===void 0}get usedMemory(){return r(this)}}export{i as Graphics3DWebStyleSymbol};
2
+ import{throwIfAborted as e}from"../../../../core/promiseUtils.js";import{emptySymbolComplexity as t}from"./defaultSymbolComplexity.js";import{Loadable as n}from"./Loadable.js";import{getSymbolMemorySize as r}from"./symbolMemory.js";class i extends n{constructor(e,t,n){super(t),this.symbol=e,this._convert=n,this.symbologySnappingSupported=!1,this.graphics3DSymbol=null,this.referenced=0}getSymbolLayerSize(e){return this.graphics3DSymbol==null?null:this.graphics3DSymbol.getSymbolLayerSize(e)}get symbolLayers(){return this.graphics3DSymbol==null?[]:this.graphics3DSymbol.symbolLayers}get extentPadding(){return this.graphics3DSymbol==null?0:this.graphics3DSymbol.extentPadding}async doLoad(t){let n=await this.symbol.fetchSymbol({signal:t});e(t),n.id=this.symbol.id,this.graphics3DSymbol=this._convert(n),this.graphics3DSymbol!=null&&(await this.graphics3DSymbol.load(),e(t))}createGraphics3DGraphic(e){return this.graphics3DSymbol==null?null:this.graphics3DSymbol.createGraphics3DGraphic(e,this)}get complexity(){return this.graphics3DSymbol==null?t:this.graphics3DSymbol.complexity}getComplexity(e){this.graphics3DSymbol==null?e.reset():this.graphics3DSymbol.getComplexity(e)}globalPropertyChanged(e,t){return this.graphics3DSymbol!=null&&this.graphics3DSymbol.globalPropertyChanged(e,t)}applyRendererDiff(e,t){return this.graphics3DSymbol==null?0:this.graphics3DSymbol.applyRendererDiff(e,t)}prepareSymbolPatch(e){this.graphics3DSymbol!=null&&this.graphics3DSymbol.prepareSymbolPatch(e)}updateGeometry(e){return this.graphics3DSymbol!=null&&this.graphics3DSymbol.updateGeometry(e)}updateMeshTransform(e,t,n,r,i){return this.graphics3DSymbol?.updateMeshTransform(e,t,n,r,i)??!1}onRemoveGraphic(){}get needsUpdateFocus(){return!1}getFastUpdateStatus(){return this.graphics3DSymbol?.getFastUpdateStatus()??3}destroy(){this.graphics3DSymbol!=null&&this.graphics3DSymbol.destroy(),this.graphics3DSymbol=void 0,super.destroy()}get destroyed(){return this.graphics3DSymbol===void 0}get usedMemory(){return r(this)}}export{i as Graphics3DWebStyleSymbol};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- class e{constructor(e){this.estimated=!1,this.verticesPerFeature=e?.verticesPerFeature??0,this.verticesPerCoordinate=e?.verticesPerCoordinate??0,this.drawCallsPerFeature=e?.drawCallsPerFeature??0,this.memory=e?.memory??new r}}class t extends e{constructor(e){super(e),this.estimated=!0}}class n extends e{constructor(e=0,t){super(t),this.numComplexities=e}}class r{constructor(){this.bytesPerFeature=0,this.bytesPerFeatureLabel=0,this.resourceBytes=0,this.draped={bytesPerFeature:0,bytesPerFeatureLabel:0}}}export{n as AggregateSymbolComplexity,t as EstimatedSymbolComplexity,e as SymbolComplexity,r as SymbolComplexityMemory};
2
+ class e{constructor(e){this.estimated=!1,this.verticesPerFeature=e?.verticesPerFeature??0,this.verticesPerCoordinate=e?.verticesPerCoordinate??0,this.drawCallsPerFeature=e?.drawCallsPerFeature??0,this.memory=e?.memory??new r}}class t extends e{constructor(e){super(e),this.estimated=!0}}class n extends e{constructor(e=0,t){super(t),this.numComplexities=e}reset(){this.numComplexities=0,this.verticesPerFeature=0,this.verticesPerCoordinate=0,this.drawCallsPerFeature=0,this.estimated=!1,this.memory.bytesPerFeature=0,this.memory.bytesPerFeatureLabel=0,this.memory.resourceBytes=0,this.memory.draped.bytesPerFeature=0,this.memory.draped.bytesPerFeatureLabel=0}}class r{constructor(){this.bytesPerFeature=0,this.bytesPerFeatureLabel=0,this.resourceBytes=0,this.draped={bytesPerFeature:0,bytesPerFeatureLabel:0}}}export{n as AggregateSymbolComplexity,t as EstimatedSymbolComplexity,e as SymbolComplexity,r as SymbolComplexityMemory};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{delinearize as e,colorGamma as t}from"../../../../colorUtils.js";import{adjustStaticAGOUrl as n}from"../../../../core/devEnvironmentUtils.js";import{hasScaling as r}from"../../../../core/mathUtils.js";import{normalFromMat4 as i,fromMat4 as a}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as s}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{ONES as l}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{transformMat4 as u,subtract as d,divide as f,length as p,normalize as m,lerp as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as g,create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{empty as v,expandWithAABB as y}from"../../../../geometry/support/aaBoundingBox.js";import{newFloatArray as b}from"../../../../geometry/support/FloatArray.js";import{BufferViewVec3f as x,BufferViewVec4f as S,BufferViewVec4u8 as C,BufferViewVec4u16 as w,BufferViewVec3u8 as T,BufferViewVec3u16 as E}from"../../../../geometry/support/buffer/BufferView.js";import{t as D,b as ee,n as O,f as k}from"../../../../chunks/vec3.js";import{t as A,b as j}from"../../../../chunks/vec4.js";import{a as M}from"../../../../chunks/vec2.js";import{DefaultLoadingContext as N}from"../../glTF/DefaultLoadingContext.js";import{convertPrimitiveToTriangles as P}from"../../glTF/internal/indexUtils.js";import{isEncodedMeshTexture as F}from"../../glTF/internal/resourceUtils.js";import{getTransformMatrix as I}from"../../glTF/internal/TextureTransformUtils.js";import{ProcessedObjectResource as L}from"./ProcessedObjectResource.js";import{load as R,processLoadResult as z}from"./wosrLoader.js";import{Attribute as B}from"../../webgl-engine/lib/Attribute.js";import{Geometry as V}from"../../webgl-engine/lib/Geometry.js";import{ManagedTexture as H}from"../../webgl-engine/lib/ManagedTexture.js";import{DefaultMaterial as U}from"../../webgl-engine/materials/DefaultMaterial.js";import{useSchematicPBR as W,schematicMRRFactors as G,esriSymbologyMRRFactors as K,advancedMRRFactors as q}from"../../webgl-engine/materials/pbrUtils.js";async function J(e,t){let r=Y(n(e));if(r.fileType===`wosr`){let e=await(t.cache?t.cache.loadWOSR(r.url,t):R(r.url,t)),{engineResources:n,referenceBoundingBox:i}=z(e,t);return{lods:n,referenceBoundingBox:i,isEsriSymbolResource:!1,isWosr:!0}}let i;if(t.cache)i=await t.cache.loadGLTF(r.url,t,!!t.usePBR,!!t.useEmissive);else{let{loadGLTF:e}=await import(`../../glTF/loader.js`);i=await e(new N,r.url,t,t.usePBR,t.useEmissive)}let{engineResources:a,referenceBoundingBox:o}=X(i,t,r.specifiedLodIndex);return{lods:a,referenceBoundingBox:o,isEsriSymbolResource:i.meta.isEsriSymbolResource,isWosr:!1}}function Y(e){let t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:`gltf`,url:t[1],specifiedLodIndex:t[4]==null?null:Number(t[4])}:{fileType:e.match(/(.*\.(json|json\.gz))$/)?`wosr`:`unknown`,url:e,specifiedLodIndex:null}}function X(e,t,n){let r=e.model,i=e.meta,a=r.meta?.ESRI_proxyEllipsoid,o=i.isEsriSymbolResource&&a!=null&&i.ESRI_webstyle===`EsriRealisticTreesStyle`;o&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,ne(e,a));let s=!!t.usePBR,c=i.isEsriSymbolResource?{usePBR:s,isSchematic:!1,treeRendering:o,mrrFactors:K}:{usePBR:s,isSchematic:!1,treeRendering:!1,mrrFactors:q},l={...t.materialParameters,treeRendering:o},u=[],d=new Map,f=new Map,p=r.lods.length,m=v();return r.lods.forEach((e,i)=>{let a=t.skipHighLods===!0&&(p>1&&i===0||p>3&&i===1)||t.skipHighLods===!1&&n!=null&&i!==n;if(a&&i!==0)return;let s=new L(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{let n=a?new U({},t.spherical):Z(r,e,s,c,l,d,f,t,o),{geometry:u,vertexCount:p}=Q(e,n??new U({},t.spherical)),h=u.boundingInfo;h!=null&&i===0&&y(m,h.box),n!=null&&(s.stageResources.geometries.push(u),s.numberOfVertices+=p)}),a||u.push(s)}),{engineResources:u,referenceBoundingBox:m}}function Z(t,n,r,i,a,o,s,c,u){let d=t.materials.get(n.material);if(d==null)return null;let{normal:f,color:p,texCoord0:m,tangent:h}=n.attributes,_=n.material+(f?`_normal`:``)+(p?`_color`:``)+(m?`_texCoord0`:``)+(h?`_tangent`:``),v=n.attributes.texCoord0!=null,y=n.attributes.normal!=null,b=te(d.alphaMode);if(!o.has(_)){if(v){let e=(e,n=!1,r=!1)=>{if(e!=null&&!s.has(e)){let i=t.textures.get(e);if(i){let t=i.data,a=n&&!F(t)?c.compressionOptions:void 0;s.set(e,new H(F(t)?t.data:t,{...i.parameters,preMultiplyAlpha:!F(t)&&r,encoding:F(t)?t.encoding:void 0,compressionOptions:a}))}}},n=b!==1&&!u;e(d.colorTexture,n,b!==1),e(d.normalTexture),e(d.occlusionTexture,!0),e(d.emissiveTexture),e(d.metallicRoughnessTexture,!0)}let r=e(d.color[0]),f=e(d.color[1]),p=e(d.color[2]),m=d.colorTexture!=null&&v?s.get(d.colorTexture):null,h=W(d),x=d.normalTextureTransform?.scale==null?l:d.normalTextureTransform?.scale;o.set(_,new U({...i,customDepthTest:1,textureAlphaMode:b,textureAlphaCutoff:d.alphaCutoff,diffuse:[r,f,p],ambient:[r,f,p],opacity:d.alphaMode===`OPAQUE`?1:d.opacity,doubleSided:d.doubleSided,doubleSidedType:`winding-order`,cullFace:d.doubleSided?0:2,hasVertexColors:!!n.attributes.color,hasVertexTangents:!!n.attributes.tangent,normalType:y?0:2,castShadows:!0,receiveShadows:d.receiveShadows,receiveAmbientOcclusion:d.receiveAmbientOcclusion,unlit:d.unlit,textureId:m?.id,colorMixMode:d.colorMixMode,normalTextureId:d.normalTexture!=null&&v?s.get(d.normalTexture).id:void 0,textureAlphaPremultiplied:m!=null&&!!m.parameters.preMultiplyAlpha,occlusionTextureId:d.occlusionTexture!=null&&v?s.get(d.occlusionTexture).id:void 0,emissiveTextureId:d.emissiveTexture!=null&&v&&!d.unlit?s.get(d.emissiveTexture).id:void 0,metallicRoughnessTextureId:d.metallicRoughnessTexture!=null&&v?s.get(d.metallicRoughnessTexture).id:void 0,emissiveBaseColor:d.unlit?g:[d.emissiveFactor[0],d.emissiveFactor[1],d.emissiveFactor[2]],emissiveStrengthKHR:d.emissiveStrengthKHR==null?1:d.emissiveStrengthKHR,emissiveStrengthFromSymbol:a.emissiveStrengthFromSymbol==null?void 0:a.emissiveStrengthFromSymbol,mrrFactors:h?G:[d.metallicFactor,d.roughnessFactor,i.mrrFactors[2]],isSchematic:h,colorTextureTransformMatrix:I(d.colorTextureTransform),normalTextureTransformMatrix:I(d.normalTextureTransform),scale:[x[0],x[1]],occlusionTextureTransformMatrix:I(d.occlusionTextureTransform),emissiveTextureTransformMatrix:I(d.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:I(d.metallicRoughnessTextureTransform),...a},c.spherical))}let x=o.get(_);if(r.stageResources.materials.push(x),v){let e=e=>{e!=null&&r.stageResources.textures.push(s.get(e))};e(d.colorTexture),e(d.normalTexture),e(d.occlusionTexture),e(d.emissiveTexture),e(d.metallicRoughnessTexture)}return x}function Q(e,t){let n=e.attributes.position.count,o=P(e.indices||n,e.primitiveType),s=b(3*n),{typedBuffer:c,typedBufferStride:l}=e.attributes.position;D(s,c,e.transform,3,l);let u=[[`position`,new B(s,o,3,!0)]];if(e.attributes.normal!=null){let t=b(3*n),{typedBuffer:a,typedBufferStride:s}=e.attributes.normal;i($,e.transform),ee(t,a,$,3,s),r($)&&O(t,t),u.push([`normal`,new B(t,o,3,!0)])}if(e.attributes.tangent!=null){let t=b(4*n),{typedBuffer:i,typedBufferStride:s}=e.attributes.tangent;a($,e.transform),A(t,i,$,4,s),r($)&&O(t,t,4),u.push([`tangent`,new B(t,o,4,!0)])}if(e.attributes.texCoord0!=null){let t=b(2*n),{typedBuffer:r,typedBufferStride:i}=e.attributes.texCoord0;M(t,r,2,i),u.push([`uv0`,new B(t,o,2,!0)])}let d=e.attributes.color;if(d!=null){let t=new Uint8Array(4*n);d.elementCount===4?d instanceof S?j(t,d,1,255):(d instanceof C||d instanceof w)&&j(t,d,1/255,255):(t.fill(255),d instanceof x?k(t,d.typedBuffer,1,255,4,d.typedBufferStride):(e.attributes.color instanceof T||e.attributes.color instanceof E)&&k(t,d.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),u.push([`color`,new B(t,o,4,!0)])}return{geometry:new V(t,u),vertexCount:n}}const $=o();function te(e){switch(e){case`BLEND`:return 0;case`MASK`:return 2;case`OPAQUE`:case null:case void 0:return 1}}function ne(e,n){for(let r=0;r<e.model.lods.length;++r){let i=e.model.lods[r];for(let a of i.parts){let i=a.attributes.normal;if(i==null)return;let o=a.attributes.position,l=o.count,g=_(),v=_(),y=_(),b=new Float32Array(4*l),C=new Float32Array(3*l),w=s(c(),a.transform),T=0,E=0;for(let s=0;s<l;s++){o.getVec(s,v),i.getVec(s,g),u(v,v,a.transform),d(y,v,n.center),f(y,y,n.radius);let c=y[2],l=p(y),_=Math.min(.45+.55*l*l,1)**t;f(y,y,n.radius),w!==null&&u(y,y,w),m(y,y),r+1!==e.model.lods.length&&e.model.lods.length>1&&(c>-1?h(y,y,g,.2):h(y,y,g,Math.min(-4*c-3.8,1))),C[T]=y[0],C[T+1]=y[1],C[T+2]=y[2],T+=3,b[E]=_,b[E+1]=_,b[E+2]=_,b[E+3]=1,E+=4}a.attributes.normal=new x(C.buffer),a.attributes.color=new S(b.buffer)}}}export{J as fetch,Y as parseUrl};
2
+ import{delinearize as e,colorGamma as t}from"../../../../colorUtils.js";import{adjustStaticAGOUrl as n}from"../../../../core/devEnvironmentUtils.js";import{hasScaling as r}from"../../../../core/mathUtils.js";import{normalFromMat4 as i,fromMat4 as a}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as s}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{ONES as l}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{transformMat4 as u,subtract as d,divide as f,length as p,normalize as m,lerp as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as g,create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{empty as v,expandWithAABB as y}from"../../../../geometry/support/aaBoundingBox.js";import{newFloatArray as b}from"../../../../geometry/support/FloatArray.js";import{BufferViewVec3f as x,BufferViewVec4f as S,BufferViewVec4u8 as C,BufferViewVec4u16 as w,BufferViewVec3u8 as T,BufferViewVec3u16 as E}from"../../../../geometry/support/buffer/BufferView.js";import{t as D,b as ee,n as O,f as k}from"../../../../chunks/vec3.js";import{t as A,b as j}from"../../../../chunks/vec4.js";import{a as M}from"../../../../chunks/vec2.js";import{DefaultLoadingContext as N}from"../../glTF/DefaultLoadingContext.js";import{convertPrimitiveToTriangles as P}from"../../glTF/internal/indexUtils.js";import{isEncodedMeshTexture as F}from"../../glTF/internal/resourceUtils.js";import{getTransformMatrix as I}from"../../glTF/internal/TextureTransformUtils.js";import{ProcessedObjectResource as L}from"./ProcessedObjectResource.js";import{load as R,processLoadResult as z}from"./wosrLoader.js";import{Attribute as B}from"../../webgl-engine/lib/Attribute.js";import{Geometry as V}from"../../webgl-engine/lib/Geometry.js";import{ManagedTexture as H}from"../../webgl-engine/lib/ManagedTexture.js";import{DefaultMaterial as U}from"../../webgl-engine/materials/DefaultMaterial.js";import{useSchematicPBR as W,schematicMRRFactors as G,esriSymbologyMRRFactors as K,advancedMRRFactors as q}from"../../webgl-engine/materials/pbrUtils.js";async function J(e,t){let r=Y(n(e));if(r.fileType===`wosr`){let e=await(t.cache?t.cache.loadWOSR(r.url,t):R(r.url,t)),{engineResources:n,referenceBoundingBox:i}=z(e,t);return{lods:n,referenceBoundingBox:i,isEsriSymbolResource:!1,isWosr:!0}}let i;if(t.cache)i=await t.cache.loadGLTF(r.url,t,!!t.usePBR,!!t.useEmissive);else{let{loadGLTF:e}=await import(`../../glTF/loader.js`);i=await e(new N,r.url,t,t.usePBR,t.useEmissive)}let{engineResources:a,referenceBoundingBox:o}=X(i,t,r.specifiedLodIndex);return{lods:a,referenceBoundingBox:o,isEsriSymbolResource:i.meta.isEsriSymbolResource,isWosr:!1}}function Y(e){let t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:`gltf`,url:t[1],specifiedLodIndex:t[4]==null?null:Number(t[4])}:{fileType:e.match(/(.*\.(json|json\.gz))$/)?`wosr`:`unknown`,url:e,specifiedLodIndex:null}}function X(e,t,n){let r=e.model,i=e.meta,a=r.meta?.ESRI_proxyEllipsoid,o=i.isEsriSymbolResource&&a!=null&&i.ESRI_webstyle===`EsriRealisticTreesStyle`;o&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,ne(e,a));let s=!!t.usePBR,c=i.isEsriSymbolResource?{usePBR:s,isSchematic:!1,treeRendering:o,mrrFactors:K}:{usePBR:s,isSchematic:!1,treeRendering:!1,mrrFactors:q},l={...t.materialParameters,treeRendering:o},u=[],d=new Map,f=new Map,p=r.lods.length,m=v();return r.lods.forEach((e,i)=>{let a=t.skipHighLods===!0&&(p>1&&i===0||p>3&&i===1)||t.skipHighLods===!1&&n!=null&&i!==n;if(a&&i!==0)return;let s=new L(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{let n=a?new U({},t.spherical):Z(r,e,s,c,l,d,f,t,o),{geometry:u,vertexCount:p}=Q(e,n??new U({},t.spherical)),h=u.boundingInfo;h!=null&&i===0&&y(m,h.box),n!=null&&(s.stageResources.geometries.push(u),s.numberOfVertices+=p)}),a||u.push(s)}),{engineResources:u,referenceBoundingBox:m}}function Z(t,n,r,i,a,o,s,c,u){let d=t.materials.get(n.material);if(d==null)return null;let{normal:f,color:p,texCoord0:m,tangent:h}=n.attributes,_=n.material+(f?`_normal`:``)+(p?`_color`:``)+(m?`_texCoord0`:``)+(h?`_tangent`:``),v=n.attributes.texCoord0!=null,y=n.attributes.normal!=null,b=te(d.alphaMode);if(!o.has(_)){if(v){let e=(e,n=!1,r=!1)=>{if(e!=null&&!s.has(e)){let i=t.textures.get(e);if(i){let t=i.data,a=n&&!F(t)?c.compressionOptions:void 0;s.set(e,new H(F(t)?t.data:t,{...i.parameters,preMultiplyAlpha:!F(t)&&r,encoding:F(t)?t.encoding:void 0,compressionOptions:a}))}}},n=b!==1&&!u;e(d.colorTexture,n,b!==1),e(d.normalTexture),e(d.occlusionTexture,!0),e(d.emissiveTexture),e(d.metallicRoughnessTexture,!0)}let r=e(d.color[0]),f=e(d.color[1]),p=e(d.color[2]),m=d.colorTexture!=null&&v?s.get(d.colorTexture):null,h=W(d),x=d.normalTextureTransform?.scale==null?l:d.normalTextureTransform?.scale;o.set(_,new U({...i,customDepthTest:1,textureAlphaMode:b,textureAlphaCutoff:d.alphaCutoff,diffuse:[r,f,p],ambient:[r,f,p],opacity:d.alphaMode===`OPAQUE`?1:d.opacity,doubleSided:d.doubleSided,doubleSidedType:`winding-order`,cullFace:d.doubleSided?0:2,hasVertexColors:!!n.attributes.color,hasVertexTangents:!!n.attributes.tangent,normalType:y?0:2,castShadows:!0,receiveShadows:d.receiveShadows,receiveAmbientOcclusion:d.receiveAmbientOcclusion,unlit:d.unlit,textureId:m?.id,colorMixMode:d.colorMixMode,normalTextureId:d.normalTexture!=null&&v?s.get(d.normalTexture).id:void 0,textureAlphaPremultiplied:m!=null&&!!m.parameters.preMultiplyAlpha,occlusionTextureId:d.occlusionTexture!=null&&v?s.get(d.occlusionTexture).id:void 0,emissiveTextureId:d.emissiveTexture!=null&&v&&!d.unlit?s.get(d.emissiveTexture).id:void 0,metallicRoughnessTextureId:d.metallicRoughnessTexture!=null&&v?s.get(d.metallicRoughnessTexture).id:void 0,emissiveBaseColor:d.unlit?g:[d.emissiveFactor[0],d.emissiveFactor[1],d.emissiveFactor[2]],emissiveStrengthKHR:d.emissiveStrengthKHR==null?1:d.emissiveStrengthKHR,emissiveStrengthFromSymbol:a.emissiveStrengthFromSymbol==null?void 0:a.emissiveStrengthFromSymbol,mrrFactors:h?G:[d.metallicFactor,d.roughnessFactor,i.mrrFactors[2]],isSchematic:h,colorTextureTransformMatrix:I(d.colorTextureTransform),normalTextureTransformMatrix:I(d.normalTextureTransform),normalScale:[x[0],x[1]],occlusionTextureTransformMatrix:I(d.occlusionTextureTransform),emissiveTextureTransformMatrix:I(d.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:I(d.metallicRoughnessTextureTransform),...a},c.spherical))}let x=o.get(_);if(r.stageResources.materials.push(x),v){let e=e=>{e!=null&&r.stageResources.textures.push(s.get(e))};e(d.colorTexture),e(d.normalTexture),e(d.occlusionTexture),e(d.emissiveTexture),e(d.metallicRoughnessTexture)}return x}function Q(e,t){let n=e.attributes.position.count,o=P(e.indices||n,e.primitiveType),s=b(3*n),{typedBuffer:c,typedBufferStride:l}=e.attributes.position;D(s,c,e.transform,3,l);let u=[[`position`,new B(s,o,3,!0)]];if(e.attributes.normal!=null){let t=b(3*n),{typedBuffer:a,typedBufferStride:s}=e.attributes.normal;i($,e.transform),ee(t,a,$,3,s),r($)&&O(t,t),u.push([`normal`,new B(t,o,3,!0)])}if(e.attributes.tangent!=null){let t=b(4*n),{typedBuffer:i,typedBufferStride:s}=e.attributes.tangent;a($,e.transform),A(t,i,$,4,s),r($)&&O(t,t,4),u.push([`tangent`,new B(t,o,4,!0)])}if(e.attributes.texCoord0!=null){let t=b(2*n),{typedBuffer:r,typedBufferStride:i}=e.attributes.texCoord0;M(t,r,2,i),u.push([`uv0`,new B(t,o,2,!0)])}let d=e.attributes.color;if(d!=null){let t=new Uint8Array(4*n);d.elementCount===4?d instanceof S?j(t,d,1,255):(d instanceof C||d instanceof w)&&j(t,d,1/255,255):(t.fill(255),d instanceof x?k(t,d.typedBuffer,1,255,4,d.typedBufferStride):(e.attributes.color instanceof T||e.attributes.color instanceof E)&&k(t,d.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),u.push([`color`,new B(t,o,4,!0)])}return{geometry:new V(t,u),vertexCount:n}}const $=o();function te(e){switch(e){case`BLEND`:return 0;case`MASK`:return 2;case`OPAQUE`:case null:case void 0:return 1}}function ne(e,n){for(let r=0;r<e.model.lods.length;++r){let i=e.model.lods[r];for(let a of i.parts){let i=a.attributes.normal;if(i==null)return;let o=a.attributes.position,l=o.count,g=_(),v=_(),y=_(),b=new Float32Array(4*l),C=new Float32Array(3*l),w=s(c(),a.transform),T=0,E=0;for(let s=0;s<l;s++){o.getVec(s,v),i.getVec(s,g),u(v,v,a.transform),d(y,v,n.center),f(y,y,n.radius);let c=y[2],l=p(y),_=Math.min(.45+.55*l*l,1)**t;f(y,y,n.radius),w!==null&&u(y,y,w),m(y,y),r+1!==e.model.lods.length&&e.model.lods.length>1&&(c>-1?h(y,y,g,.2):h(y,y,g,Math.min(-4*c-3.8,1))),C[T]=y[0],C[T+1]=y[1],C[T+2]=y[2],T+=3,b[E]=_,b[E+1]=_,b[E+2]=_,b[E+3]=1,E+=4}a.attributes.normal=new x(C.buffer),a.attributes.color=new S(b.buffer)}}}export{J as fetch,Y as parseUrl};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../../../core/Error.js";import{fetchStyle as t,symbolUrlFromStyleItem as n}from"../../../../symbols/support/styleUtils.js";import{getStyleItemFromStyle as r,fetchSymbolFromStyle as i}from"../../../../symbols/support/webStyleSymbolUtils.js";async function a(a){if(a==null||a.styleName==null&&a.styleUrl==null)return null;let o=a.name;if(o==null)throw new e(`symbolstyleutils:style-symbol-reference-name-missing`,`Missing name in style symbol reference`);let s={portal:a.portal},c=await t(a,s).catch(()=>null);if(c===null)return null;let l=r(o,c.data);if(l&&!l.formatInfos?.some(e=>e.type===`gltf_basisu`))return null;let u=await i(c,o,s,n,{acceptedFormats:[`web-gltf-basisu`,`web-gltf`,`web`]}).catch(()=>null);if(u===null||u.type!==`point-3d`)return null;let d=u.symbolLayers.items[0];return d.type===`object`?d.resource:null}export{a as getResourceUrlFromSymbolStyle};
2
+ import e from"../../../../core/Error.js";import{fetchStyle as t,symbolUrlFromStyleItem as n}from"../../../../symbols/support/styleUtils.js";import{fetchSymbolFromStyle as r}from"../../../../symbols/support/webStyleSymbolUtils.js";async function i(i){if(i==null||i.styleName==null&&i.styleUrl==null)return null;let a=i.name;if(a==null)throw new e(`symbolstyleutils:style-symbol-reference-name-missing`,`Missing name in style symbol reference`);let o={portal:i.portal},s=await t(i,o).catch(()=>null);if(s===null)return null;let c=await r(s,a,o,n,{acceptedFormats:[`web-gltf-basisu`,`web-gltf`,`web`]}).catch(()=>null);if(c===null||c.type!==`point-3d`)return null;let l=c.symbolLayers.items[0];return l.type===`object`?l.resource:null}export{i as getResourceUrlFromSymbolStyle};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{linearize as e}from"../../../../colorUtils.js";import t from"../../../../core/Error.js";import{scale as n}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromArray as r,zeros as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{loadImage as a}from"../../../../request/loadImage.js";import{EncodedMeshTexture as o}from"../../glTF/internal/resourceUtils.js";import{useSchematicPBR as s,schematicMRRFactors as c}from"../../webgl-engine/materials/pbrUtils.js";import{alphaCutoff as l}from"../../../../webscene/support/AlphaCutoff.js";async function u(t){let a=[],o=[];if(t==null)return{material:{alphaMode:`opaque`,alphaCutoff:l,doubleSided:!0,cullFace:0,normalTextureId:-1,emissiveTextureId:-1,occlusionTextureId:-1,emissiveFactor:[0,0,0],metallicRoughness:{baseColorFactor:[1,1,1,1],baseColorTextureId:-1,metallicRoughnessTextureId:-1,metallicFactor:0,roughnessFactor:.6000000238418579},wrapTextures:!1,hasParametersFromSource:!0},requiredTextures:a,textureData:o};let u=f(t);t.alphaMode===`auto`&&console.warn(`alphaMode "auto" not supported by I3S PBRMaterial - defaulting to "blend".`);let p=s({normalTexture:t.normalTexture,emissiveTexture:u?t.emissiveTexture:null,emissiveFactor:u&&t.emissiveColor?.toUnitRGB()||null,occlusionTexture:u?t.occlusionTexture:null,metallicRoughnessTexture:u?t.metallicRoughnessTexture:null,metallicFactor:u?t.metallic:null,roughnessFactor:u?t.roughness:null}),m=p?c[0]:u?t.metallic:0,h=p?c[1]:u?t.roughness:0,g=i();return u&&t.emissiveColor&&(g=r(t.emissiveColor.toUnitRGB().map(e)),t.emissiveStrength&&n(g,g,t.emissiveStrength)),{material:{alphaMode:t.alphaMode===`auto`?`blend`:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,cullFace:t.doubleSided?0:2,normalTextureId:await d(t.normalTexture,a,o,4),emissiveTextureId:u?await d(t.emissiveTexture,a,o,16):-1,occlusionTextureId:u?await d(t.occlusionTexture,a,o,8):-1,emissiveFactor:g,metallicRoughness:{baseColorFactor:t.color==null?[1,1,1,1]:t.color.toUnitRGBA(),baseColorTextureId:await d(t.colorTexture,a,o,1),metallicRoughnessTextureId:u?await d(t.metallicRoughnessTexture,a,o,2):-1,metallicFactor:m,roughnessFactor:h},wrapTextures:!0,hasParametersFromSource:p},requiredTextures:a,textureData:o}}async function d(e,n,r,i){if(e==null)return-1;let s=r.length,c=e.data,l=e.url;if(c!=null){if(c instanceof HTMLImageElement||c instanceof HTMLCanvasElement)return r.push({id:s,usage:i,data:c,encoding:8}),n.push({id:s,usage:i,encodings:[{name:void 0,encoding:8}]}),s;if(c instanceof HTMLVideoElement)return-1;if(c instanceof ImageData)throw new t(`scenelayer`,`ImageData textures not supported yet for client side I3S nodes`);if(c instanceof o)return r.push({id:s,usage:i,data:c.data.buffer,encoding:1}),n.push({id:s,usage:i,encodings:[{name:void 0,encoding:1}]}),s}else if(l!=null){let e=new Image;e.src=l;let t=await a(e,e.src,!1,void 0);return r.push({id:s,usage:i,data:t,encoding:8}),n.push({id:s,usage:i,encodings:[{name:void 0,encoding:8}]}),s}return-1}function f(e){return e.hasOwnProperty(`metallicRoughnessTexture`)}export{u as convertMeshMaterialToPBRMaterial};
2
+ import{linearize as e}from"../../../../colorUtils.js";import t from"../../../../core/Error.js";import{scale as n}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromArray as r,zeros as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{loadImage as a}from"../../../../request/loadImage.js";import{EncodedMeshTexture as o}from"../../glTF/internal/resourceUtils.js";import{getTransformMatrix as s,convertMeshTextureTransformToGLTF as c}from"../../glTF/internal/TextureTransformUtils.js";import{useSchematicPBR as l,schematicMRRFactors as u}from"../../webgl-engine/materials/pbrUtils.js";import{alphaCutoff as d}from"../../../../webscene/support/AlphaCutoff.js";async function f(t){let a=[],o=[];if(t==null)return{material:{alphaMode:`opaque`,alphaCutoff:d,doubleSided:!0,cullFace:0,normalTextureId:-1,emissiveTextureId:-1,occlusionTextureId:-1,emissiveFactor:[0,0,0],metallicRoughness:{baseColorFactor:[1,1,1,1],baseColorTextureId:-1,metallicRoughnessTextureId:-1,metallicFactor:0,roughnessFactor:.6000000238418579},wrapTextures:!1,hasParametersFromSource:!0},requiredTextures:a,textureData:o};let f=m(t);t.alphaMode===`auto`&&console.warn(`alphaMode "auto" not supported by I3S PBRMaterial - defaulting to "blend".`);let h=l({normalTexture:t.normalTexture,emissiveTexture:f?t.emissiveTexture:null,emissiveFactor:f&&t.emissiveColor?.toUnitRGB()||null,occlusionTexture:f?t.occlusionTexture:null,metallicRoughnessTexture:f?t.metallicRoughnessTexture:null,metallicFactor:f?t.metallic:null,roughnessFactor:f?t.roughness:null}),g=h?u[0]:f?t.metallic:0,_=h?u[1]:f?t.roughness:0,v=i();return f&&t.emissiveColor&&(v=r(t.emissiveColor.toUnitRGB().map(e)),t.emissiveStrength&&n(v,v,t.emissiveStrength)),{material:{alphaMode:t.alphaMode===`auto`?`blend`:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,cullFace:t.doubleSided?0:2,normalTextureId:await p(t.normalTexture,a,o,4),emissiveTextureId:f?await p(t.emissiveTexture,a,o,16):-1,occlusionTextureId:f?await p(t.occlusionTexture,a,o,8):-1,emissiveFactor:v,metallicRoughness:{baseColorFactor:t.color==null?[1,1,1,1]:t.color.toUnitRGBA(),baseColorTextureId:await p(t.colorTexture,a,o,1),metallicRoughnessTextureId:f?await p(t.metallicRoughnessTexture,a,o,2):-1,metallicFactor:g,roughnessFactor:_},wrapTextures:!0,hasParametersFromSource:h,textureTransforms:{color:s(c(t.colorTextureTransform)),normal:s(c(t.normalTextureTransform)),normalScale:t.normalTextureTransform?.scale??null,emissive:s(c(f?t.emissiveTextureTransform:null)),occlusion:s(c(f?t.occlusionTextureTransform:null)),metallicRoughness:s(c(f?t.metallicRoughnessTextureTransform:null))}},requiredTextures:a,textureData:o}}async function p(e,n,r,i){if(e==null)return-1;let s=r.length,c=e.data,l=e.url;if(c!=null){if(c instanceof HTMLImageElement||c instanceof HTMLCanvasElement)return r.push({id:s,usage:i,data:c,encoding:8}),n.push({id:s,usage:i,encodings:[{name:void 0,encoding:8}]}),s;if(c instanceof HTMLVideoElement)return-1;if(c instanceof ImageData)throw new t(`scenelayer`,`ImageData textures not supported yet for client side I3S nodes`);if(c instanceof o)return r.push({id:s,usage:i,data:c.data.buffer,encoding:1}),n.push({id:s,usage:i,encodings:[{name:void 0,encoding:1}]}),s}else if(l!=null){let e=new Image;e.src=l;let t=await a(e,e.src,!1,void 0);return r.push({id:s,usage:i,data:t,encoding:8}),n.push({id:s,usage:i,encodings:[{name:void 0,encoding:8}]}),s}return-1}function m(e){return e.hasOwnProperty(`metallicRoughnessTexture`)}export{f as convertMeshMaterialToPBRMaterial};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{intersectsSphere as e}from"../../../../geometry/support/frustumPlanes.js";import{I3sTarget as t}from"./Intersector.js";import{IntersectorResultRay as n}from"../../webgl-engine/lib/IntersectorResult.js";import{MeshIntersectionOptions as r}from"../../webgl-engine/lib/RayIntersections.js";import{getVerticalOffsetI3S as i}from"../../webgl-engine/lib/verticalOffsetUtils.js";class a{constructor(e,t){this.node=e,this.objectHandle=t}}class o{constructor(e){this.type=2,this._needVerticalOffset=!1,this.layerViewUid=e.layerViewUid,this.sublayerId=e.sublayerId,this._collection=e.collection,this._traverseNodeHierarchy=e.traverseNodeHierarchy,this.slicePlaneEnabled=e.slicePlaneEnabled,this.isGround=e.isGround}updateElevationAlignState(e,t){this._needVerticalOffset=e&&t===1}intersectRay(e,a,o,c,l,u){let d=e.options.store===2,f=e.ray.direction,p=e=>e,m=e=>e,h=i(e.verticalOffset??(this._needVerticalOffset?0:null));e.verticalOffset!=null&&h!=null&&(p=e=>h.applyToMbs(e),m=e=>h.applyToObb(e));let{results:g,tolerance:_}=e,v=new r(_,u,e.options.normalRequired),y=e=>{if(e.childrenLoaded===0)return!1;let t=e.serviceObbInRenderSR?.isValid?e.serviceObbInRenderSR:null;return!(t&&!m(t).intersectRay(o,f,_))};for(let{node:r,objectHandle:i}of this._traverseNodeHierarchy(y)){let l=r.serviceObbInRenderSR?.isValid?r.serviceObbInRenderSR:null,{serviceMbsInRenderSRElevationAdjusted:u}=r;i&&(l||!u.isValid||s(p(u),o,f,_))&&(r.geometryObbInRenderSR==null||m(r.geometryObbInRenderSR).intersectRay(o,f,_))&&this._collection.intersectRay(i,o,c,h,v,(i,s,l,u,f)=>{if(s<0||a!=null&&!a(o,c,s))return;let p=e=>{let n=new t(this.layerViewUid,this.sublayerId,r.index,f,u);e.set(this.type,n,i,s,l)};if(this.isGround&&(g.ground.renderDistance==null||s<g.ground.renderDistance)&&p(g.ground),!e.options.isFiltered&&((g.min.renderDistance==null||s<g.min.renderDistance)&&p(g.min),(g.max.renderDistance==null||i>g.max.renderDistance)&&p(g.max),d)){let t=new n(e.ray);p(t),e.results.all.push(t)}})}}*intersectScreenPolygon(n,r){if(n.camera==null)return;let a=i(this._needVerticalOffset?0:null),o=t=>{if(t.childrenLoaded===0)return!1;let n=t.serviceObbInRenderSR?.isValid?t.serviceObbInRenderSR:null;if(n!=null){if(!n.intersectsFrustumConservativeApproximation(r.broadPhaseFrustum))return!1}else{let n=t.serviceMbsInRenderSRElevationAdjusted;if(n.isValid&&!e(r.broadPhaseFrustum,n))return!1}return!0};for(let{node:e,objectHandle:i}of this._traverseNodeHierarchy(o))i!=null&&i.visible&&(e.geometryObbInRenderSR==null||e.geometryObbInRenderSR.intersectsFrustumConservativeApproximation(r.broadPhaseFrustum))&&(yield*this._collection.intersectScreenPolygon(i,n,r,a,(r,i,a,o)=>{n.polygonResults.add(this.type,new t(this.layerViewUid,this.sublayerId,e.index,r,o),i)}))}}function s(e,t,n,r=0){let i=e.radius+r,a=t[0]-e.center[0],o=t[1]-e.center[1],s=t[2]-e.center[2],[c,l,u]=n,d=c*c+l*l+u*u,f=c*a+l*o+u*s,p=a*a+o*o+s*s-i*i;return f*f-d*p>=0}export{o as I3SIntersectionHandler,a as TraversedIntersectionNode};
2
+ import{intersectsSphere as e}from"../../../../geometry/support/frustumPlanes.js";import{I3sTarget as t}from"./Intersector.js";import{IntersectorResultRay as n}from"../../webgl-engine/lib/IntersectorResult.js";import{MeshIntersectionOptions as r}from"../../webgl-engine/lib/RayIntersections.js";import{getVerticalOffsetI3S as i}from"../../webgl-engine/lib/verticalOffsetUtils.js";class a{constructor(e,t){this.node=e,this.objectHandle=t}}class o{get isGround(){return this.integratedMeshSemantics.shouldIntersectAsGround}constructor(e){this.type=2,this._needVerticalOffset=!1,this.layerViewUid=e.layerViewUid,this.sublayerId=e.sublayerId,this._collection=e.collection,this._traverseNodeHierarchy=e.traverseNodeHierarchy,this.slicePlaneEnabled=e.slicePlaneEnabled,this.integratedMeshSemantics=e.integratedMeshSemantics}updateElevationAlignState(e,t){this._needVerticalOffset=e&&t===1}intersectRay(e,a,o,c,l,u){let d=e.options.store===2,f=e.ray.direction,p=e=>e,m=e=>e,h=i(e.verticalOffset??(this._needVerticalOffset?0:null));e.verticalOffset!=null&&h!=null&&(p=e=>h.applyToMbs(e),m=e=>h.applyToObb(e));let{results:g,tolerance:_}=e,v=new r(_,u,e.options.normalRequired),y=e=>{if(e.childrenLoaded===0)return!1;let t=e.serviceObbInRenderSR?.isValid?e.serviceObbInRenderSR:null;return!(t&&!m(t).intersectRay(o,f,_))};for(let{node:r,objectHandle:i}of this._traverseNodeHierarchy(y)){let l=r.serviceObbInRenderSR?.isValid?r.serviceObbInRenderSR:null,{serviceMbsInRenderSRElevationAdjusted:u}=r;i&&(l||!u.isValid||s(p(u),o,f,_))&&(r.geometryObbInRenderSR==null||m(r.geometryObbInRenderSR).intersectRay(o,f,_))&&this._collection.intersectRay(i,o,c,h,v,(i,s,l,u,f)=>{if(s<0||a!=null&&!a(o,c,s))return;let p=e=>{let n=new t(this.layerViewUid,this.sublayerId,r.index,f,u);e.set(this.type,n,i,s,l)};if(this.isGround&&(g.ground.renderDistance==null||s<g.ground.renderDistance)&&p(g.ground),!e.options.isFiltered&&((g.min.renderDistance==null||s<g.min.renderDistance)&&p(g.min),(g.max.renderDistance==null||i>g.max.renderDistance)&&p(g.max),d)){let t=new n(e.ray);p(t),e.results.all.push(t)}})}}*intersectScreenPolygon(n,r){if(n.camera==null)return;let a=i(this._needVerticalOffset?0:null),o=t=>{if(t.childrenLoaded===0)return!1;let n=t.serviceObbInRenderSR?.isValid?t.serviceObbInRenderSR:null;if(n!=null){if(!n.intersectsFrustumConservativeApproximation(r.broadPhaseFrustum))return!1}else{let n=t.serviceMbsInRenderSRElevationAdjusted;if(n.isValid&&!e(r.broadPhaseFrustum,n))return!1}return!0};for(let{node:e,objectHandle:i}of this._traverseNodeHierarchy(o))i!=null&&i.visible&&(e.geometryObbInRenderSR==null||e.geometryObbInRenderSR.intersectsFrustumConservativeApproximation(r.broadPhaseFrustum))&&(yield*this._collection.intersectScreenPolygon(i,n,r,a,(r,i,a,o)=>{n.polygonResults.add(this.type,new t(this.layerViewUid,this.sublayerId,e.index,r,o),i)}))}}function s(e,t,n,r=0){let i=e.radius+r,a=t[0]-e.center[0],o=t[1]-e.center[1],s=t[2]-e.center[2],[c,l,u]=n,d=c*c+l*l+u*u,f=c*a+l*o+u*s,p=a*a+o*o+s*s-i*i;return f*f-d*p>=0}export{o as I3SIntersectionHandler,a as TraversedIntersectionNode};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{validateColorAndOpacity as e,validateColor as t}from"../../../../core/colorUtils.js";import has from"../../../../core/has.js";import{clamp as n}from"../../../../core/mathUtils.js";import{clone as r}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{uncompressedFormats as i,compressibleUsages as a}from"./enums.js";import{RenderTexture as o}from"../../webgl-engine/core/material/RenderTexture.js";import{getEllipsoidMode as s}from"../../webgl-engine/core/shaderLibrary/util/EllipsoidMode.js";import{ManagedTexture as c}from"../../webgl-engine/lib/ManagedTexture.js";import{useSchematicPBR as l,schematicMRRFactors as u,advancedMRRFactors as d}from"../../webgl-engine/materials/pbrUtils.js";import{alphaCutoff as f}from"../../../../webscene/support/AlphaCutoff.js";function p(t,n,r){let i=new Map,a=(e,t)=>{if(e==null)return-1;let n=i.get(e.id);if(n)return n.usage|=t,n.id;let r=i.size;return i.set(e.id,{id:r,usage:t}),r},o=n.pbrMetallicRoughness,s=o?.baseColorFactor?e(o.baseColorFactor):null,c=n.emissiveFactor,f=r&&o?.metallicFactor===0||l({normalTexture:n.normalTexture,emissiveTexture:n.emissiveTexture,emissiveFactor:n.emissiveFactor,occlusionTexture:n.occlusionTexture,metallicRoughnessTexture:o?.metallicRoughnessTexture,metallicFactor:o?.metallicFactor,roughnessFactor:o?.roughnessFactor}),p=f?u[0]:o?.metallicFactor??d[0],g=f?u[1]:o?.roughnessFactor??d[1],_=n.alphaMode===`mask`?33:1,v={baseColorFactor:s?[s[0],s[1],s[2],s[3]]:[1,1,1,1],baseColorTextureId:a(o?.baseColorTexture,_),metallicRoughnessTextureId:a(o?.metallicRoughnessTexture,2),metallicFactor:p,roughnessFactor:g},y={alphaMode:n.alphaMode,alphaCutoff:n.alphaCutoff,doubleSided:n.doubleSided,cullFace:n.cullFace===`none`?0:n.cullFace===`back`?2:+(n.cullFace===`front`),normalTextureId:a(n.normalTexture,4),emissiveTextureId:a(n.emissiveTexture,16),occlusionTextureId:a(n.occlusionTexture,8),emissiveFactor:c?[c[0],c[1],c[2]]:[0,0,0],metallicRoughness:v,wrapTextures:!1,hasParametersFromSource:f},b=[];return i.forEach(({usage:e},n)=>{let r=t!=null&&t[n]&&t[n].formats,i=r?m(r.map(({name:e,format:t})=>({name:e,encoding:h[t]}))):[];b.push({id:n,usage:e,encodings:i})}),{material:y,textures:b}}function m(e){return e.sort((e,t)=>e.encoding-t.encoding)}const h={ktx2:1,basis:2,dds:4,png:8,jpg:16,"ktx-etc2":32},g={"image/ktx2":2,"image/x.basis":2,"image/vnd-ms.dds":4,"image/png":8,"image/jpg":16,"image/jpeg":16,"image/ktx":32};function _(e){let r=e?.materialDefinitions?Object.keys(e.materialDefinitions)[0]:null,i=e?.textureDefinitions?Object.keys(e.textureDefinitions)[0]:null,a=r?e.materialDefinitions?.[r]:null,o=i?e.textureDefinitions?.[i]:null,s=v();if(a!=null){let e=a.params;e.diffuse&&(t(e.diffuse),s.metallicRoughness.baseColorFactor=[e.diffuse[0],e.diffuse[1],e.diffuse[2],1]),e.doubleSided!=null&&(s.doubleSided=e.doubleSided,s.cullFace=e.doubleSided?0:2),(e.cullFace===`none`||e.cullFace===`front`||e.cullFace===`back`)&&(s.cullFace=e.cullFace===`none`?0:e.cullFace===`back`?2:1),e.transparency&&(s.metallicRoughness.baseColorFactor[3]=n(1-e.transparency,0,1)),(e.useVertexColorAlpha||s.metallicRoughness.baseColorFactor[3]<1)&&(s.alphaMode=`blend`)}let c=[];if(o!=null){o.wrap&&(o.wrap[0]===`repeat`||o.wrap[1]===`repeat`)&&(s.wrapTextures=!0);let e=1;o.channels===`rgba`&&(s.alphaMode=`blend`,e|=32);let t=o.images.length-1,n=o.images[t],r=e=>e?.split(`/`).pop(),i=Array.isArray(o.encoding)?m(o.encoding.map((e,t)=>({name:r(n.href[t]),encoding:g[e]||0}))):[{name:r(n.href),encoding:g[o.encoding]||0}];c.push({id:0,usage:e,encodings:i}),s.metallicRoughness.baseColorTextureId=0}return{material:s,textures:c}}const v=()=>({alphaMode:`opaque`,alphaCutoff:f,doubleSided:!0,cullFace:0,normalTextureId:-1,emissiveTextureId:-1,occlusionTextureId:-1,emissiveFactor:[0,0,0],metallicRoughness:{baseColorFactor:[.8,.8,.8,1],baseColorTextureId:-1,metallicRoughnessTextureId:-1,metallicFactor:0,roughnessFactor:.6},wrapTextures:!1,hasParametersFromSource:!0});function y(e,t,n,r,i,a){if(e?.data==null)return null;let o=e.data,s=r.renderingContext.parameters.maxMaxAnisotropy,l=s>1,u=n||!t.wrapTextures?b:x,d=D(e.encoding),f=e.usage&1?t.alphaMode===`opaque`?6407:6408:6407,p=E(e.encoding,e.usage)?{compressionTracker:i,compressionCallback:a}:void 0;return new c(o,{mipmap:l,maxAnisotropy:s,encoding:d,wrap:u,pixelFormat:f,compressionOptions:p,noUnpackFlip:!0})}const b={s:33071,t:33071},x={s:10497,t:10497};function S(t,n,i,a,c){let l=c.rendererTextureUsage,p=e=>T(i,n,e&l),m=[],h=e=>{let t=p(e);if(t==null)return null;let n=new o(a,t);return m.push(n.loadPromise),n},g=h(33),_=h(2),v=h(16),y=h(8),b=h(4),x={baseColor:r(e(t.metallicRoughness.baseColorFactor)),hasParametersFromSource:!!t.hasParametersFromSource,usePBR:c.usePBR,mrrFactors:[t.metallicRoughness.metallicFactor,t.metallicRoughness.roughnessFactor,t.hasParametersFromSource?u[2]:d[2]],emissiveBaseColor:t.emissiveFactor,isIntegratedMesh:c.isIntegratedMesh,textureAlphaCutoff:t.alphaMode===`mask`?t.alphaCutoff:f,alphaDiscardMode:t.alphaMode===`opaque`?1:t.alphaMode===`mask`?2:3,baseColorTexture:g,metallicRoughnessTexture:_,emissionTexture:v,occlusionTexture:y,normalTexture:b,slicePlaneEnabled:c.slicePlaneEnabled,doubleSided:t.doubleSided,cullFace:t.cullFace,ellipsoidMode:s(c.viewSpatialReference),sphereDepthInterpolate:!1,isGround:has(`enable-feature:im-as-ground`)?c.isGround:!1,opacity:1,polygonOffset:0,applySSAO:c.applySSAO};return{texturePromise:Promise.all(m),materialParameters:x}}function C(e){let t=!!e.compressedTextureS3TC,n=!!e.compressedTextureETC,r=has(`disable-feature:i3s-basis`)?0:3,i=r|4,a=r;return 24|(t?i:0)|(n?a:0)}function w(e,t){if(t!=null)return e.find(e=>(e.encoding&t)!==0)}function T(e,t,n){if(e==null||n===0)return null;for(let r=0;r<e.length;r++){let i=e[r];if(i!=null&&(i.usage&n)!==0){let e=t[r];return e==null?null:e.id}}return null}function E(e,t){return has(`enable-feature:esri-compress-IM-textures`)?(e&i)!==0&&!(t&~a):!1}function D(e){switch(e){case 1:return`image/ktx2`;case 2:return`image/x.basis`;case 4:return`image/vnd-ms.dds`;case 8:return`image/png`;case 16:return`image/jpeg`;case 32:return`image/ktx`;default:return``}}export{S as configureMaterial,y as createTexture,v as defaultMaterial,p as getMaterialAndTextures,_ as getMaterialAndTexturesFromShared,C as getSupportedEncodings,T as getTextureIdByUsage,w as selectEncoding};
2
+ import{validateColorAndOpacity as e,validateColor as t}from"../../../../core/colorUtils.js";import has from"../../../../core/has.js";import{clamp as n}from"../../../../core/mathUtils.js";import{clone as r}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{uncompressedFormats as i,compressibleUsages as a}from"./enums.js";import{RenderTexture as o}from"../../webgl-engine/core/material/RenderTexture.js";import{getEllipsoidMode as s}from"../../webgl-engine/core/shaderLibrary/util/EllipsoidMode.js";import{ManagedTexture as c}from"../../webgl-engine/lib/ManagedTexture.js";import{useSchematicPBR as l,schematicMRRFactors as u,advancedMRRFactors as d}from"../../webgl-engine/materials/pbrUtils.js";import{alphaCutoff as f}from"../../../../webscene/support/AlphaCutoff.js";function p(t,n,r){let i=new Map,a=(e,t)=>{if(e==null)return-1;let n=i.get(e.id);if(n)return n.usage|=t,n.id;let r=i.size;return i.set(e.id,{id:r,usage:t}),r},o=n.pbrMetallicRoughness,s=o?.baseColorFactor?e(o.baseColorFactor):null,c=n.emissiveFactor,f=r&&o?.metallicFactor===0||l({normalTexture:n.normalTexture,emissiveTexture:n.emissiveTexture,emissiveFactor:n.emissiveFactor,occlusionTexture:n.occlusionTexture,metallicRoughnessTexture:o?.metallicRoughnessTexture,metallicFactor:o?.metallicFactor,roughnessFactor:o?.roughnessFactor}),p=f?u[0]:o?.metallicFactor??d[0],g=f?u[1]:o?.roughnessFactor??d[1],_=n.alphaMode===`mask`?33:1,v={baseColorFactor:s?[s[0],s[1],s[2],s[3]]:[1,1,1,1],baseColorTextureId:a(o?.baseColorTexture,_),metallicRoughnessTextureId:a(o?.metallicRoughnessTexture,2),metallicFactor:p,roughnessFactor:g},y={alphaMode:n.alphaMode,alphaCutoff:n.alphaCutoff,doubleSided:n.doubleSided,cullFace:n.cullFace===`none`?0:n.cullFace===`back`?2:+(n.cullFace===`front`),normalTextureId:a(n.normalTexture,4),emissiveTextureId:a(n.emissiveTexture,16),occlusionTextureId:a(n.occlusionTexture,8),emissiveFactor:c?[c[0],c[1],c[2]]:[0,0,0],metallicRoughness:v,wrapTextures:!1,hasParametersFromSource:f},b=[];return i.forEach(({usage:e},n)=>{let r=t!=null&&t[n]&&t[n].formats,i=r?m(r.map(({name:e,format:t})=>({name:e,encoding:h[t]}))):[];b.push({id:n,usage:e,encodings:i})}),{material:y,textures:b}}function m(e){return e.sort((e,t)=>e.encoding-t.encoding)}const h={ktx2:1,basis:2,dds:4,png:8,jpg:16,"ktx-etc2":32},g={"image/ktx2":2,"image/x.basis":2,"image/vnd-ms.dds":4,"image/png":8,"image/jpg":16,"image/jpeg":16,"image/ktx":32};function _(e){let r=e?.materialDefinitions?Object.keys(e.materialDefinitions)[0]:null,i=e?.textureDefinitions?Object.keys(e.textureDefinitions)[0]:null,a=r?e.materialDefinitions?.[r]:null,o=i?e.textureDefinitions?.[i]:null,s=v();if(a!=null){let e=a.params;e.diffuse&&(t(e.diffuse),s.metallicRoughness.baseColorFactor=[e.diffuse[0],e.diffuse[1],e.diffuse[2],1]),e.doubleSided!=null&&(s.doubleSided=e.doubleSided,s.cullFace=e.doubleSided?0:2),(e.cullFace===`none`||e.cullFace===`front`||e.cullFace===`back`)&&(s.cullFace=e.cullFace===`none`?0:e.cullFace===`back`?2:1),e.transparency&&(s.metallicRoughness.baseColorFactor[3]=n(1-e.transparency,0,1)),(e.useVertexColorAlpha||s.metallicRoughness.baseColorFactor[3]<1)&&(s.alphaMode=`blend`)}let c=[];if(o!=null){o.wrap&&(o.wrap[0]===`repeat`||o.wrap[1]===`repeat`)&&(s.wrapTextures=!0);let e=1;o.channels===`rgba`&&(s.alphaMode=`blend`,e|=32);let t=o.images.length-1,n=o.images[t],r=e=>e?.split(`/`).pop(),i=Array.isArray(o.encoding)?m(o.encoding.map((e,t)=>({name:r(n.href[t]),encoding:g[e]||0}))):[{name:r(n.href),encoding:g[o.encoding]||0}];c.push({id:0,usage:e,encodings:i}),s.metallicRoughness.baseColorTextureId=0}return{material:s,textures:c}}const v=()=>({alphaMode:`opaque`,alphaCutoff:f,doubleSided:!0,cullFace:0,normalTextureId:-1,emissiveTextureId:-1,occlusionTextureId:-1,emissiveFactor:[0,0,0],metallicRoughness:{baseColorFactor:[.8,.8,.8,1],baseColorTextureId:-1,metallicRoughnessTextureId:-1,metallicFactor:0,roughnessFactor:.6},wrapTextures:!1,hasParametersFromSource:!0});function y(e,t,n,r,i,a){if(e?.data==null)return null;let o=e.data,s=r.renderingContext.parameters.maxMaxAnisotropy,l=s>1,u=n||!t.wrapTextures?b:x,d=D(e.encoding),f=e.usage&1?t.alphaMode===`opaque`?6407:6408:6407,p=E(e.encoding,e.usage)?{compressionTracker:i,compressionCallback:a}:void 0;return new c(o,{mipmap:l,maxAnisotropy:s,encoding:d,wrap:u,pixelFormat:f,compressionOptions:p,noUnpackFlip:!0})}const b={s:33071,t:33071},x={s:10497,t:10497};function S(t,n,i,a,c){let l=c.rendererTextureUsage,p=e=>T(i,n,e&l),m=[],h=e=>{let t=p(e);if(t==null)return null;let n=new o(a,t);return m.push(n.loadPromise),n},g=h(33),_=h(2),v=h(16),y=h(8),b=h(4),x={baseColor:r(e(t.metallicRoughness.baseColorFactor)),hasParametersFromSource:!!t.hasParametersFromSource,usePBR:c.usePBR,mrrFactors:[t.metallicRoughness.metallicFactor,t.metallicRoughness.roughnessFactor,t.hasParametersFromSource?u[2]:d[2]],emissiveBaseColor:t.emissiveFactor,isIntegratedMesh:c.isIntegratedMesh,integratedMeshSemantics:c.integratedMeshSemantics,textureAlphaCutoff:t.alphaMode===`mask`?t.alphaCutoff:f,alphaDiscardMode:t.alphaMode===`opaque`?1:t.alphaMode===`mask`?2:3,baseColorTexture:g,metallicRoughnessTexture:_,emissionTexture:v,occlusionTexture:y,normalTexture:b,textureTransforms:t.textureTransforms,slicePlaneEnabled:c.slicePlaneEnabled,doubleSided:t.doubleSided,cullFace:t.cullFace,ellipsoidMode:s(c.viewSpatialReference),sphereDepthInterpolate:!1,opacity:1,polygonOffset:0,applySSAO:c.applySSAO};return{texturePromise:Promise.all(m),materialParameters:x}}function C(e){let t=!!e.compressedTextureS3TC,n=!!e.compressedTextureETC,r=has(`disable-feature:i3s-basis`)?0:3,i=r|4,a=r;return 24|(t?i:0)|(n?a:0)}function w(e,t){if(t!=null)return e.find(e=>(e.encoding&t)!==0)}function T(e,t,n){if(e==null||n===0)return null;for(let r=0;r<e.length;r++){let i=e[r];if(i!=null&&(i.usage&n)!==0){let e=t[r];return e==null?null:e.id}}return null}function E(e,t){return has(`enable-feature:esri-compress-IM-textures`)?(e&i)!==0&&!(t&~a):!1}function D(e){switch(e){case 1:return`image/ktx2`;case 2:return`image/x.basis`;case 4:return`image/vnd-ms.dds`;case 8:return`image/png`;case 16:return`image/jpeg`;case 32:return`image/ktx`;default:return``}}export{S as configureMaterial,y as createTexture,v as defaultMaterial,p as getMaterialAndTextures,_ as getMaterialAndTexturesFromShared,C as getSupportedEncodings,T as getTextureIdByUsage,w as selectEncoding};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{AsyncUpdateMixin as n}from"../../../../core/AsyncUpdate.js";import r from"../../../../core/Logger.js";import{property as i,subclass as a}from"../../../../core/accessorSupport/decorators.js";import{fallbackObjectIDAttribute as o}from"../../../../layers/LayerConstants.js";import{fixFields as s,collectLabelingFields as c,collectFilterFields as l}from"../../../../layers/support/fieldUtils.js";let u=class extends n(t){get layer(){return this.layerView.layer}get requiredFields(){let{layerView:{layer:{fieldsIndex:e,objectIdField:t},definitionExpressionFields:n},rendererFields:r,labelingFields:i,viewFilterFields:a,highlightFields:c}=this;return s(e,[...n??[],...r??[],...i??[],...a??[],...c??[],t??o])}constructor(e){super(e)}initialize(){this.addHandles([this.autoUpdateAsync(`rendererFields`,async()=>{let{fieldsIndex:e,renderer:t}=this.layer;return t?this._getFieldsAsync(n=>t.collectRequiredFields(n,e)):null}),this.autoUpdateAsync(`labelingFields`,async()=>{let{layer:e}=this;return e.labelsVisible?this._getFieldsAsync(t=>c(t,e)):null}),this.autoUpdateAsync(`viewFilterFields`,()=>{let{layer:e,mergedFilter:t}=this.layerView;return this._getFieldsAsync(n=>l(n,e,t))}),this.autoUpdateAsync(`highlightFields`,()=>{let{layer:e,highlightFilters:t}=this.layerView;return this._getFieldsAsync(async n=>{await Promise.all(t.map(t=>l(n,e,t)))})})])}async _getFieldsAsync(e){let t=new Set;try{return await e(t),Array.from(t).sort()}catch(e){return r.getLogger(this).error(e),null}}};e([i()],u.prototype,`layerView`,void 0),e([i()],u.prototype,`layer`,null),e([i()],u.prototype,`requiredFields`,null),e([i()],u.prototype,`rendererFields`,void 0),e([i()],u.prototype,`labelingFields`,void 0),e([i()],u.prototype,`viewFilterFields`,void 0),e([i()],u.prototype,`highlightFields`,void 0),u=e([a(`esri.views.3d.layers.support.SceneLayerViewRequiredFields`)],u);export{u as SceneLayerViewRequiredFields};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{AsyncUpdateMixin as n}from"../../../../core/AsyncUpdate.js";import r from"../../../../core/Logger.js";import{property as i,subclass as a}from"../../../../core/accessorSupport/decorators.js";import{fallbackObjectIDAttribute as o}from"../../../../layers/LayerConstants.js";import{RequiredFieldsCollector as s}from"../../../../layers/support/FieldCollector.js";import{fixFields as c,collectLabelingFields as l,collectFilterFields as u}from"../../../../layers/support/fieldUtils.js";let d=class extends n(t){get layer(){return this.layerView.layer}get requiredFields(){let{layerView:{layer:{fieldsIndex:e,objectIdField:t},definitionExpressionFields:n},rendererFields:r,labelingFields:i,viewFilterFields:a,highlightFields:s}=this;return c(e,[...n??[],...r??[],...i??[],...a??[],...s??[],t??o])}constructor(e){super(e)}initialize(){this.addHandles([this.autoUpdateAsync(`rendererFields`,async()=>{let{renderer:e}=this.layer;return e?this._getFieldsAsync(t=>e.collectRequiredFields(t)):null}),this.autoUpdateAsync(`labelingFields`,async()=>{let{layer:e}=this;return e.labelsVisible?this._getFieldsAsync(t=>l(t,e)):null}),this.autoUpdateAsync(`viewFilterFields`,()=>{let{layer:e,mergedFilter:t}=this.layerView;return this._getFieldsAsync(n=>u(n,e,t))}),this.autoUpdateAsync(`highlightFields`,()=>{let{layer:e,highlightFilters:t}=this.layerView;return this._getFieldsAsync(async n=>{await Promise.all(t.map(t=>u(n,e,t)))})})])}async _getFieldsAsync(e){let t=new Set;try{return await e(new s(t,this.layer.fieldsIndex)),Array.from(t).sort()}catch(e){return r.getLogger(this).error(e),null}}};e([i()],d.prototype,`layerView`,void 0),e([i()],d.prototype,`layer`,null),e([i()],d.prototype,`requiredFields`,null),e([i()],d.prototype,`rendererFields`,void 0),e([i()],d.prototype,`labelingFields`,void 0),e([i()],d.prototype,`viewFilterFields`,void 0),e([i()],d.prototype,`highlightFields`,void 0),d=e([a(`esri.views.3d.layers.support.SceneLayerViewRequiredFields`)],d);export{d as SceneLayerViewRequiredFields};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import has from"../../../../core/has.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{Tiles3DTarget as t}from"../i3s/Intersector.js";import{createTileBVHForLayer as n}from"./createTileBVHForLayer.js";import{ElevationRange as r}from"../../support/ElevationRange.js";import{IntersectorResultRay as i}from"../../webgl-engine/lib/IntersectorResult.js";import{MeshIntersectionOptions as a,computeInvDir as o,intersectAabbInvDir as s}from"../../webgl-engine/lib/RayIntersections.js";class c{constructor(e){this.layerView=e,this.type=8,this.slicePlaneEnabled=!1,this.layerViewUid=e.uid,this.isGround=!has(`enable-feature:im-as-ground`)||e.layer.isUsedAsGroundLayer,this._bvh=n(e)}destroy(){this._bvh.destroy()}addTile(e){this._bvh.addTile(e)}removeTile(e){this._bvh.removeTile(e)}intersectRay(e,n,r,c,u,d){if(e.options.filteredLayerViewUids.includes(this.layerView.uid))return;let{results:f,tolerance:p}=e,m=e.options.store===2,{componentObjectCollection:h}=this.layerView.view.stage.renderView,g=new a(p,d,e.options.normalRequired),_=o(r,c,l),v=(a,o,s)=>{if(o<0||n!=null&&!n(r,c,a))return;let l=e=>{let n=new t(this.layerView.uid);e.set(this.type,n,a,o,s)};if(this.isGround&&(f.ground.renderDistance==null||o<f.ground.renderDistance)&&l(f.ground),!e.options.isFiltered&&((f.min.renderDistance==null||o<f.min.renderDistance)&&l(f.min),(f.max.renderDistance==null||o>f.max.renderDistance)&&l(f.max),m)){let t=new i(e.ray);l(t),e.results.all.push(t)}};this._bvh.forEachTileIntersectingRay(r,c,e=>{let{componentObjects:t}=e;for(let e of t)s(e.aabbInWorldCoordinates,r,_,0)&&h.intersectRay(e,r,c,null,g,v)},d)}get elevationRange(){let e=this._bvh.elevationRange;return e!=null&&!e.isEmpty?new r(e.minElevation,e.maxElevation):null}getElevationRange(e){return this._bvh.getElevationRangeIntersectingSphere(e)??new r(0,0)}}const l=e();export{c as Tiles3DMeshIntersectionHandler};
2
+ import{create as e}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{Tiles3DTarget as t}from"../i3s/Intersector.js";import{createTileBVHForLayer as n}from"./createTileBVHForLayer.js";import{ElevationRange as r}from"../../support/ElevationRange.js";import{IntersectorResultRay as i}from"../../webgl-engine/lib/IntersectorResult.js";import{MeshIntersectionOptions as a,computeInvDir as o,intersectAabbInvDir as s}from"../../webgl-engine/lib/RayIntersections.js";class c{constructor(e,t){this.layerView=e,this.integratedMeshSemantics=t,this.type=8,this.slicePlaneEnabled=!1,this.layerViewUid=e.uid,this._bvh=n(e)}destroy(){this._bvh.destroy()}addTile(e){this._bvh.addTile(e)}removeTile(e){this._bvh.removeTile(e)}get isGround(){return this.integratedMeshSemantics.shouldIntersectAsGround}intersectRay(e,n,r,c,u,d){if(e.options.filteredLayerViewUids.includes(this.layerView.uid))return;let{results:f,tolerance:p}=e,m=e.options.store===2,{componentObjectCollection:h}=this.layerView.view.stage.renderView,g=new a(p,d,e.options.normalRequired),_=o(r,c,l),v=(a,o,s)=>{if(o<0||n!=null&&!n(r,c,a))return;let l=e=>{let n=new t(this.layerView.uid);e.set(this.type,n,a,o,s)};if(this.isGround&&(f.ground.renderDistance==null||o<f.ground.renderDistance)&&l(f.ground),!e.options.isFiltered&&((f.min.renderDistance==null||o<f.min.renderDistance)&&l(f.min),(f.max.renderDistance==null||o>f.max.renderDistance)&&l(f.max),m)){let t=new i(e.ray);l(t),e.results.all.push(t)}};this._bvh.forEachTileIntersectingRay(r,c,e=>{let{componentObjects:t}=e;for(let e of t)s(e.aabbInWorldCoordinates,r,_,0)&&h.intersectRay(e,r,c,null,g,v)},d)}get elevationRange(){let e=this._bvh.elevationRange;return e!=null&&!e.isEmpty?new r(e.minElevation,e.maxElevation):null}getElevationRange(e){return this._bvh.getElevationRangeIntersectingSphere(e)??new r(0,0)}}const l=e();export{c as Tiles3DMeshIntersectionHandler};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{makeHandle as e}from"../../../../core/handleUtils.js";import{debounce as t,throwIfAborted as n}from"../../../../core/promiseUtils.js";import{watch as r,syncAndInitial as i,whenOnce as a}from"../../../../core/reactiveUtils.js";import{collectFilterFields as o}from"../../../../layers/support/fieldUtils.js";import{TaskPriority as s}from"../../../support/Scheduler.js";function c(c){let{owner:l,filter:u,layer:d,scheduler:f,updatingHandles:p,getAvailableFields:m,query:h,apply:g,onChange:_}=c,v=f.registerTask(s.FEATURE_FILTER_HIGHLIGHT),y=new AbortController,{signal:b}=y,x=!1,S=t(async e=>(n(e),v.scheduleGenerator(async function*(){x=!1;let t=new Set;await o(t,d,u),n(e),yield,await a(()=>Array.from(t).every(e=>m().includes(e)),{signal:e}),n(e),yield;let r=await h(e);n(e),yield,g(r)},e))),C=()=>{x||(x=!0,p.consumePromise(S(b)))},w=Symbol();return l.addHandles([r(()=>[u.toJSON(),m()],C,i),e(()=>{y.abort(),v.remove()}),...c.handles,_(C)],w),e(()=>l.removeHandles(w))}export{c as createFeatureFilterHighlight};
2
+ import{makeHandle as e}from"../../../../core/handleUtils.js";import{debounce as t,throwIfAborted as n}from"../../../../core/promiseUtils.js";import{watch as r,syncAndInitial as i,whenOnce as a}from"../../../../core/reactiveUtils.js";import{RequiredFieldsCollector as o}from"../../../../layers/support/FieldCollector.js";import{collectFilterFields as s}from"../../../../layers/support/fieldUtils.js";import{TaskPriority as c}from"../../../support/Scheduler.js";function l(l){let{owner:u,filter:d,layer:f,scheduler:p,updatingHandles:m,getAvailableFields:h,query:g,apply:_,onChange:v}=l,y=p.registerTask(c.FEATURE_FILTER_HIGHLIGHT),b=new AbortController,{signal:x}=b,S=!1,C=t(async e=>(n(e),y.scheduleGenerator(async function*(){S=!1;let t=new Set;await s(new o(t,f.fieldsIndex),f,d),n(e),yield,await a(()=>Array.from(t).every(e=>h().includes(e)),{signal:e}),n(e),yield;let r=await g(e);n(e),yield,_(r)},e))),w=()=>{S||(S=!0,m.consumePromise(C(x)))},T=Symbol();return u.addHandles([r(()=>[d.toJSON(),h()],w,i),e(()=>{b.abort(),y.remove()}),...l.handles,v(w)],T),e(()=>u.removeHandles(T))}export{l as createFeatureFilterHighlight};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{fromValues as e}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{perVertexElevationAligner as t}from"../graphics/ElevationAligners.js";import{writeMapSpaceUVCoordsPerConnectedPart as n,writeMapSpaceUVCoords as r}from"./uvUtils.js";import{ColorMaterial as i}from"../../webgl-engine/materials/ColorMaterial.js";import{PatternMaterial as a}from"../../webgl-engine/materials/PatternMaterial.js";function o(t,n,r){n.useIndexing=!0;let o=t?.pattern;return o==null||o.style===`solid`?new i(n,r.spherical):o.style===`none`?(n.color=e(0,0,0,0),n.forceTransparentMode=!0,new i(n,r.spherical)):(n.style=s(o.style),new a(n))}function s(e){switch(e){case`horizontal`:return 0;case`vertical`:return 1;case`cross`:return 2;case`forward-diagonal`:return 3;case`backward-diagonal`:return 4;case`diagonal-cross`:return 5;default:return}}function c(e){return e.material instanceof a&&!e.material.parameters.draped}function l(e,t){if(c(e)){let i=e.attributes.get(`position`).data,a=e.getMutableAttribute(`uvMapSpace`).data,o=e.getMutableAttribute(`boundingRect`),s=e.getMutableAttribute(`textureElementIndex`);if(s!=null&&e.drawIndices!=null){n(a,o.data,s.data,i,e.drawIndices,t);return}r(a,o.data,i,t)}}function u(e,n,r,i,a,o){let s=t(e,n,r,i,a,o),c=e.stageObject.geometries;for(let e of c)l(e,a);return s}export{o as createMaterial,s as parsePatternStyle,c as requiresUVUpdates,l as updateMapSpaceUVCoords,u as uvElevationAligner};
2
+ import{fromValues as e}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{perVertexElevationAligner as t}from"../graphics/ElevationAligners.js";import{writeMapSpaceUVCoordsPerConnectedPart as n,writeMapSpaceUVCoords as r}from"./uvUtils.js";import{ColorMaterial as i}from"../../webgl-engine/materials/ColorMaterial.js";import{PatternMaterial as a}from"../../webgl-engine/materials/PatternMaterial.js";function o(t,n,r){n.useIndexing=!0;let o=t?.pattern;return o==null||o.style===`solid`?new i(n,r.spherical):o.style===`none`?(n.color=e(0,0,0,0),n.forceTransparentMode=!0,new i(n,r.spherical)):(n.style=s(o.style),new a({...n,shadingEnabled:n.shading===1},r.spherical))}function s(e){switch(e){case`horizontal`:return 0;case`vertical`:return 1;case`cross`:return 2;case`forward-diagonal`:return 3;case`backward-diagonal`:return 4;case`diagonal-cross`:return 5;default:return}}function c(e){return e.material instanceof a&&!e.material.parameters.draped}function l(e,t){if(c(e)){let i=e.attributes.get(`position`).data,a=e.getMutableAttribute(`uvMapSpace`).data,o=e.getMutableAttribute(`boundingRect`),s=e.getMutableAttribute(`textureElementIndex`);if(s!=null&&e.drawIndices!=null){n(a,o.data,s.data,i,e.drawIndices,t);return}r(a,o.data,i,t)}}function u(e,n,r,i,a,o){let s=t(e,n,r,i,a,o),c=e.stageObject.geometries;for(let e of c)l(e,a);return s}export{o as createMaterial,s as parsePatternStyle,c as requiresUVUpdates,l as updateMapSpaceUVCoords,u as uvElevationAligner};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{clamp as t,acosClamped as n,deg2rad as r}from"../../../../core/mathUtils.js";import{property as i,subclass as a}from"../../../../core/accessorSupport/decorators.js";import{translate as o,rotate as s,identity as c}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{subtract as u,transformMat4 as d,add as f,scale as p,copy as m,negate as h,length as g,set as _,normalize as v,cross as y,distance as b,direction as ee,dot as x}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as S}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as C}from"../../../../geometry/ellipsoidUtils.js";import{wrap as w}from"../../../../geometry/support/ray.js";import{Sphere as T}from"../../../../geometry/support/sphere.js";import{angle as te}from"../../../../geometry/support/vector.js";import{sv3d as E}from"../../../../geometry/support/vectorStacks.js";import{applyAll as D}from"../../camera/constraintUtils.js";import{ConstraintOptions as O}from"../../camera/constraintUtils/ConstraintOptions.js";import{TiltRange as k}from"../Constraints.js";import{InteractiveController as A}from"./InteractiveController.js";import{panMotionToRotationMatrix as j,onSurfaceTiltToEyeTiltGlobal as M,offSurfaceTiltToEyeTiltGlobal as N}from"../utils/navigationUtils.js";import{viewAngle as P}from"../utils/viewUtils.js";import{headingTiltToDirectionUp as F}from"../../support/cameraUtils.js";import{createDirectionUp as I}from"../../support/cameraUtilsInternal.js";import L from"../../webgl/RenderCamera.js";import{extractTransformation as R,isZeroTransformation as z,extractTransformationKeyboard as B}from"../../../navigation/gamepadAndKeyboardUtils.js";let V=class extends A{constructor(e){super(e),this._filteredSurfaceElevation=0,this._precisionPanEnabled=!1,this._coarsePanEnabled=!1,this._transformation={translation:[0,0,0],heading:0,tilt:0,zoom:0},this._keysButtonState=[0,0,0,0,0,0,0,0,0,0,0,0],this._tmpCamera=new L,this._headingStart=0,this._constraintOptions=new O(15,0,0,new L,null,1)}handleEventGamepad(e){let t=R(e,this.view.navigation.gamepad,this._transformation);(e.action===`end`||z(t))&&this.finishController()}activateDirection(e){this._keysButtonState[e]=1,B(this._keysButtonState,this._transformation)}directionActive(e){return this._keysButtonState[e]===1}countActiveDirections(){return this._keysButtonState.reduce((e,t)=>t>0?e+1:e,0)}deactivateDirection(e){this._keysButtonState[e]=0;let t=B(this._keysButtonState,this._transformation);z(t)&&(this._precisionPanEnabled=!1,this._coarsePanEnabled=!1,this.finishController())}setPrecisionPanEnabled(e){this._precisionPanEnabled=e}setCoarsePanEnabled(e){this._coarsePanEnabled=e}onControllerStart(e){this._filteredSurfaceElevation=this.view.pointsOfInterest.cameraOnSurface.location.z,this._headingStart=this.view.camera.heading,super.onControllerStart(e)}_updateFilteredSurfaceElevation(e){let t=this.view.pointsOfInterest.cameraOnSurface.location.z;this._filteredSurfaceElevation+=1*(t-this._filteredSurfaceElevation)*e}stepController(e,t){this._updateStartHeading(),this._updateFilteredSurfaceElevation(e),this.currentCamera.copyViewFrom(t),this._updateCameraCenter(),this._constraintOptions.interactionStartCamera?.copyFrom(this.currentCamera),this._calculateControlTransformation(e,this.currentCamera,X),this._applyDisabledMovementTypes(X),this._applyPan(X.pan),this._applyRotate(X.rotate),this._applyZoom(X.zoom),this._applyAscend(X.ascend),this._constraintOptions.interactionType=0,this._constraintOptions.selection=8,D(this.view,this.currentCamera,this._constraintOptions),super.stepController(e,t)}_updateStartHeading(){this._transformation.heading!==0&&(this._headingStart=this.view.camera.heading)}_applyRotate(e){if(!e.enabled)return;let t=this.currentCamera;u(Z,t.center,t.eye),d(Z,Z,e.matrix),t.center=f(Z,Z,t.eye),t.up=d(Z,t.up,e.matrix),this._constraintOptions.interactionType=3,this._constraintOptions.selection=7,D(this.view,t,this._constraintOptions)}_applyPan(e,t=this.currentCamera){e.enabled&&(t.eye=d(Z,t.eye,e.matrix),t.center=d(Z,t.center,e.matrix),this.view.state.isGlobal&&(t.up=d(Z,t.up,e.matrix)),this._constraintOptions.interactionType=4,this._constraintOptions.selection=15,D(this.view,t,this._constraintOptions))}_applyZoom(e){if(!e)return;let t=this.currentCamera.viewForward;this.currentCamera.eye=f(Z,this.currentCamera.eye,p(E.get(),t,e)),m(Q,t),h(Q,Q),this._constraintOptions.interactionDirection=Q,this._constraintOptions.interactionType=1,this._constraintOptions.selection=7,D(this.view,this.currentCamera,this._constraintOptions),this._constraintOptions.interactionDirection=null}_applyAscend(e){if(!e)return;let t=this.view.renderCoordsHelper.worldUpAtPosition(this.currentCamera.eye,E.get());if(this._constraintOptions.interactionDirection=m(Q,t),this.view.state.isGlobal){let t=g(this.currentCamera.eye),n=(t+e)/t;this.currentCamera.eye=p(Z,this.currentCamera.eye,n),this.currentCamera.center=p(Z,this.currentCamera.center,n)}else{let n=p(E.get(),t,e);this.currentCamera.eye=f(Z,this.currentCamera.eye,n),this.currentCamera.center=f(Z,this.currentCamera.center,n)}this._updateCameraCenter(),this._constraintOptions.interactionType=5,this._constraintOptions.selection=8,D(this.view,this.currentCamera,this._constraintOptions)&&this._updateCameraCenter(),this._constraintOptions.selection=7,D(this.view,this.currentCamera,this._constraintOptions),this._constraintOptions.interactionDirection=null}_calculateControlTransformation(e,t,n){ie(n);let r=this._computeVelocities(e);this.view.state.isLocal?this._calculateControlTransformationLocal(r,t,n):this._calculateControlTransformationGlobal(r,t,n)}_updateCameraCenter(){let e=this.view.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude,t=this.view.renderCoordsHelper,n=this.currentCamera.ray;this.currentCamera.center=t.intersectManifoldClosestSilhouette(n,e,Z)}_calculateControlTransformationLocal(e,n,r){let{viewRight:i,viewForward:a}=n,c=this._transformation,l=this.view.navigation.gamepad,u=_(E.get(),a[0],a[1],0);v(u,u);let d=c.translation[0]*e.pan;if(d!==0){let e=p(E.get(),i,d);o(r.pan.matrix,r.pan.matrix,e),r.pan.enabled=!0}switch(l.mode){case`pan`:{let t=-c.translation[1]*e.pan;if(t!==0){let e=p(E.get(),u,t);o(r.pan.matrix,r.pan.matrix,e),r.pan.enabled=!0}r.zoom=c.zoom*e.zoom;break}case`zoom`:r.zoom=(-c.translation[1]+c.zoom)*e.zoom;break;default:l.mode}r.ascend=c.translation[2]*e.ascend;let f=-c.heading*e.rotate;f!==0&&(s(r.rotate.matrix,r.rotate.matrix,f,this.view.renderCoordsHelper.worldUpAtPosition(n.eye,E.get())),r.rotate.enabled=!0);let m=c.tilt*e.rotate,h=P(this.view.renderCoordsHelper,n.center,n.eye),g=t(h+m,k.min,k.max)-h;g&&(s(r.rotate.matrix,r.rotate.matrix,g,i),r.rotate.enabled=!0)}_calculateControlTransformationGlobal(e,t,n){let{eye:r,viewRight:i}=t,a=this._transformation,o=this.view.navigation.gamepad,c=y(E.get(),i,r);v(c,c),h(c,c),j(this.startCamera,t,a,e,this.view.camera.heading,this._headingStart,this.view.camera.tilt,n,o),this._tmpCamera.copyFrom(this.currentCamera),this._applyPan(X.pan,this._tmpCamera);let l=this.view.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude;n.ascend=a.translation[2]*e.ascend;let u=-a.heading*e.rotate;u!==0&&(s(n.rotate.matrix,n.rotate.matrix,u,this._tmpCamera.eye),n.rotate.enabled=!0);let d=a.tilt*e.rotate,f=this._clampTiltDeltaGlobalToValidRange(d,t.ray,l);f!==0&&(s(n.rotate.matrix,n.rotate.matrix,f,this._tmpCamera.viewRight),n.rotate.enabled=!0),n.zoom+=a.zoom*e.zoom}_clampTiltDeltaGlobalToValidRange(e,n,r){let i=C(this.view.spatialReference),a=M(k.min,n.origin,r,i),o=0,s=0,c=E.get();if(this.view.renderCoordsHelper.intersectManifold(n,r,c)){let e=P(this.view.renderCoordsHelper,c,n.origin);o=M(e,n.origin,r,i),s=M(k.max,n.origin,r,i)}else{$.radius=r+i.radius,$.closestPointOnSilhouette(n,c);let e=Math.PI+te(n.direction,c);o=N(e,n.origin,r,i),s=N(k.max,n.origin,r,i)}return t(o+e,a,s)-o}_getPointAbsoluteSurfaceElevation(e,t,n){let{renderCoordsHelper:r}=this.view,i=r.getAltitude(e),a=t+Math.abs(i-t);return r.setAltitude(n,a,e),a}_clampedDistanceToSurface(e,t){let{renderCoordsHelper:n}=this.view,{camera:r}=this.view.state,{direction:i}=F(this.view,t,0,U,re),a=n.intersectManifoldClosestSilhouette(w(t,i),e,E.get()),o=b(t,a),s=n.intersectManifoldClosestSilhouette(w(t,ee(E.get(),t,r.center)),e,E.get()),c=b(t,s);return Math.min(o,c)}_computeHeadingRotateRadius(e){let{renderCoordsHelper:t,state:r}=this.view,{camera:i,isGlobal:a}=r,o=t.intersectManifoldClosestSilhouette(i.ray,this._filteredSurfaceElevation,E.get());if(a){let t=u(E.get(),e,o),r=g(t);p(t,t,1/r);let i=v(E.get(),e),a=n(x(i,t));return r*Math.sin(Math.min(W,a))}{let n=m(E.get(),e);return t.setAltitude(n,this._filteredSurfaceElevation),b(o,n)}}_minimumAscendVelocity(){return this.view.state.constraints.collision.enabled?0:J}_computeVelocities(e){let n=this._filteredSurfaceElevation,r=n+C(this.view.spatialReference).radius,{camera:i,isGlobal:a}=this.view.state,o=E.get(),s=this._getPointAbsoluteSurfaceElevation(i.eye,n,o),c=this._clampedDistanceToSurface(n,o),l=i.width/2,u=G*i.width,d=G*i.width,f=i.computeRenderPixelSizeAtDistance(c),p=f/r,m=f/this._computeHeadingRotateRadius(o),h=a?p:f,g=this._precisionPanEnabled===this._coarsePanEnabled?1:this._precisionPanEnabled?K:q,_=h*u*e*g,v=s-n;return{pan:_,ascend:Math.max(this._minimumAscendVelocity()*e,2**(u*e/l)*v-v),zoom:2**(u*e/l)*c-c,rotate:t(m*d,Y,ne)*e}}_applyDisabledMovementTypes(e){this.disableMovements!=null&&(this.disableMovements.mode===void 0||this.view.state.viewingMode===this.disableMovements.mode)&&(e.zoom=this.disableMovements.zoom?0:e.zoom,e.ascend=this.disableMovements.ascend?0:e.ascend,e.pan.enabled=!this.disableMovements.pan,this.disableMovements.pan&&c(e.pan.matrix),e.rotate.enabled=!this.disableMovements.rotate,this.disableMovements.rotate&&c(e.rotate.matrix))}static activatesFor(e,t){let n=R(t,e.navigation.gamepad,H);return!(t.action===`end`||z(n))}};e([i({constructOnly:!0})],V.prototype,`gamepadDevice`,void 0),e([i({constructOnly:!0})],V.prototype,`disableMovements`,void 0),V=e([a(`esri.views.3d.state.controllers.GamepadKeyboardController`)],V);const H={translation:[0,0,0],heading:0,tilt:0,zoom:0},U=80,W=r(80),G=.75,K=.25,q=4,J=5,Y=r(30),ne=r(80),X={zoom:0,ascend:0,pan:{enabled:!1,matrix:l()},rotate:{enabled:!1,matrix:l()}},Z=S(),Q=S(),re=I(),$=new T;function ie(e){e.zoom=0,e.ascend=0,e.pan.enabled=!1,c(e.pan.matrix),e.rotate.enabled=!1,c(e.rotate.matrix)}export{V as GamepadKeyboardController};
2
+ import{__decorate as e}from"tslib";import{clamp as t,acosClamped as n,deg2rad as r}from"../../../../core/mathUtils.js";import{property as i,subclass as a}from"../../../../core/accessorSupport/decorators.js";import{translate as o,rotate as s,identity as c}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{subtract as u,transformMat4 as d,add as f,scale as p,copy as m,negate as h,length as g,set as _,normalize as v,cross as y,distance as b,direction as ee,dot as x}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as S}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as C}from"../../../../geometry/ellipsoidUtils.js";import{wrap as w}from"../../../../geometry/support/ray.js";import{Sphere as T}from"../../../../geometry/support/sphere.js";import{angle as te}from"../../../../geometry/support/vector.js";import{sv3d as E}from"../../../../geometry/support/vectorStacks.js";import{applyAll as D}from"../../camera/constraintUtils.js";import{ConstraintOptions as O}from"../../camera/constraintUtils/ConstraintOptions.js";import{TiltRange as k}from"../Constraints.js";import{InteractiveController as A}from"./InteractiveController.js";import{panMotionToRotationMatrix as j,onSurfaceTiltToEyeTiltGlobal as M,offSurfaceTiltToEyeTiltGlobal as N}from"../utils/navigationUtils.js";import{viewAngle as P}from"../utils/viewUtils.js";import{headingTiltToDirectionUp as F}from"../../support/cameraUtils.js";import{createDirectionUp as I}from"../../support/cameraUtilsInternal.js";import L from"../../webgl/RenderCamera.js";import{extractTransformation as R,isZeroTransformation as z,extractTransformationKeyboard as B}from"../../../navigation/gamepadAndKeyboardUtils.js";let V=class extends A{constructor(e){super(e),this._filteredSurfaceElevation=0,this._precisionPanEnabled=!1,this._coarsePanEnabled=!1,this._transformation={translation:[0,0,0],heading:0,tilt:0,zoom:0},this._keysButtonState=[0,0,0,0,0,0,0,0,0,0,0,0],this._tmpCamera=new L,this._headingStart=0,this._constraintOptions=new O(15,0,0,new L,null,1)}handleEventGamepad(e){let t=R(e,this.view.navigation.gamepad,this._transformation);(e.action===`end`||z(t))&&this.finishController()}activateDirection(e){this._keysButtonState[e]=1,B(this._keysButtonState,this._transformation)}directionActive(e){return this._keysButtonState[e]===1}countActiveDirections(){return this._keysButtonState.reduce((e,t)=>t>0?e+1:e,0)}deactivateDirection(e){this._keysButtonState[e]=0;let t=B(this._keysButtonState,this._transformation);z(t)&&(this._precisionPanEnabled=!1,this._coarsePanEnabled=!1,this.finishController())}setPrecisionPanEnabled(e){this._precisionPanEnabled=e}setCoarsePanEnabled(e){this._coarsePanEnabled=e}onControllerStart(e){this._filteredSurfaceElevation=this.view.pointsOfInterest.cameraOnSurface.location.z,this._headingStart=this.view.camera.heading,super.onControllerStart(e)}_updateFilteredSurfaceElevation(e){let t=this.view.pointsOfInterest.cameraOnSurface.location.z;this._filteredSurfaceElevation+=1*(t-this._filteredSurfaceElevation)*e}stepController(e,t){this._updateStartHeading(),this._updateFilteredSurfaceElevation(e),this.currentCamera.copyViewFrom(t),this._updateCameraCenter(),this._constraintOptions.interactionStartCamera?.copyFrom(this.currentCamera),this._calculateControlTransformation(e,this.currentCamera,X),this._applyPan(X.pan),this._applyRotate(X.rotate),this._applyZoom(X.zoom),this._applyAscend(X.ascend),this._constraintOptions.interactionType=0,this._constraintOptions.selection=8,D(this.view,this.currentCamera,this._constraintOptions),super.stepController(e,t)}_updateStartHeading(){this._transformation.heading!==0&&(this._headingStart=this.view.camera.heading)}_applyRotate(e){if(!e.enabled)return;let t=this.currentCamera;u(Z,t.center,t.eye),d(Z,Z,e.matrix),t.center=f(Z,Z,t.eye),t.up=d(Z,t.up,e.matrix),this._constraintOptions.interactionType=3,this._constraintOptions.selection=7,D(this.view,t,this._constraintOptions)}_applyPan(e,t=this.currentCamera){e.enabled&&(t.eye=d(Z,t.eye,e.matrix),t.center=d(Z,t.center,e.matrix),this.view.state.isGlobal&&(t.up=d(Z,t.up,e.matrix)),this._constraintOptions.interactionType=4,this._constraintOptions.selection=15,D(this.view,t,this._constraintOptions))}_applyZoom(e){if(!e)return;let t=this.currentCamera.viewForward;this.currentCamera.eye=f(Z,this.currentCamera.eye,p(E.get(),t,e)),m(Q,t),h(Q,Q),this._constraintOptions.interactionDirection=Q,this._constraintOptions.interactionType=1,this._constraintOptions.selection=7,D(this.view,this.currentCamera,this._constraintOptions),this._constraintOptions.interactionDirection=null}_applyAscend(e){if(!e)return;let t=this.view.renderCoordsHelper.worldUpAtPosition(this.currentCamera.eye,E.get());if(this._constraintOptions.interactionDirection=m(Q,t),this.view.state.isGlobal){let t=g(this.currentCamera.eye),n=(t+e)/t;this.currentCamera.eye=p(Z,this.currentCamera.eye,n),this.currentCamera.center=p(Z,this.currentCamera.center,n)}else{let n=p(E.get(),t,e);this.currentCamera.eye=f(Z,this.currentCamera.eye,n),this.currentCamera.center=f(Z,this.currentCamera.center,n)}this._updateCameraCenter(),this._constraintOptions.interactionType=5,this._constraintOptions.selection=8,D(this.view,this.currentCamera,this._constraintOptions)&&this._updateCameraCenter(),this._constraintOptions.selection=7,D(this.view,this.currentCamera,this._constraintOptions),this._constraintOptions.interactionDirection=null}_calculateControlTransformation(e,t,n){ie(n);let r=this._computeVelocities(e);this.view.state.isLocal?this._calculateControlTransformationLocal(r,t,n):this._calculateControlTransformationGlobal(r,t,n)}_updateCameraCenter(){let e=this.view.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude,t=this.view.renderCoordsHelper,n=this.currentCamera.ray;this.currentCamera.center=t.intersectManifoldClosestSilhouette(n,e,Z)}_calculateControlTransformationLocal(e,n,r){let{viewRight:i,viewForward:a}=n,c=this._transformation,l=this.view.navigation.gamepad,u=_(E.get(),a[0],a[1],0);v(u,u);let d=c.translation[0]*e.pan;if(d!==0){let e=p(E.get(),i,d);o(r.pan.matrix,r.pan.matrix,e),r.pan.enabled=!0}switch(l.mode){case`pan`:{let t=-c.translation[1]*e.pan;if(t!==0){let e=p(E.get(),u,t);o(r.pan.matrix,r.pan.matrix,e),r.pan.enabled=!0}r.zoom=c.zoom*e.zoom;break}case`zoom`:r.zoom=(-c.translation[1]+c.zoom)*e.zoom;break;default:l.mode}r.ascend=c.translation[2]*e.ascend;let f=-c.heading*e.rotate;f!==0&&(s(r.rotate.matrix,r.rotate.matrix,f,this.view.renderCoordsHelper.worldUpAtPosition(n.eye,E.get())),r.rotate.enabled=!0);let m=c.tilt*e.rotate,h=P(this.view.renderCoordsHelper,n.center,n.eye),g=t(h+m,k.min,k.max)-h;g&&(s(r.rotate.matrix,r.rotate.matrix,g,i),r.rotate.enabled=!0)}_calculateControlTransformationGlobal(e,t,n){let{eye:r,viewRight:i}=t,a=this._transformation,o=this.view.navigation.gamepad,c=y(E.get(),i,r);v(c,c),h(c,c),j(this.startCamera,t,a,e,this.view.camera.heading,this._headingStart,this.view.camera.tilt,n,o),this._tmpCamera.copyFrom(this.currentCamera),this._applyPan(X.pan,this._tmpCamera);let l=this.view.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude;n.ascend=a.translation[2]*e.ascend;let u=-a.heading*e.rotate;u!==0&&(s(n.rotate.matrix,n.rotate.matrix,u,this._tmpCamera.eye),n.rotate.enabled=!0);let d=a.tilt*e.rotate,f=this._clampTiltDeltaGlobalToValidRange(d,t.ray,l);f!==0&&(s(n.rotate.matrix,n.rotate.matrix,f,this._tmpCamera.viewRight),n.rotate.enabled=!0),n.zoom+=a.zoom*e.zoom}_clampTiltDeltaGlobalToValidRange(e,n,r){let i=C(this.view.spatialReference),a=M(k.min,n.origin,r,i),o=0,s=0,c=E.get();if(this.view.renderCoordsHelper.intersectManifold(n,r,c)){let e=P(this.view.renderCoordsHelper,c,n.origin);o=M(e,n.origin,r,i),s=M(k.max,n.origin,r,i)}else{$.radius=r+i.radius,$.closestPointOnSilhouette(n,c);let e=Math.PI+te(n.direction,c);o=N(e,n.origin,r,i),s=N(k.max,n.origin,r,i)}return t(o+e,a,s)-o}_getPointAbsoluteSurfaceElevation(e,t,n){let{renderCoordsHelper:r}=this.view,i=r.getAltitude(e),a=t+Math.abs(i-t);return r.setAltitude(n,a,e),a}_clampedDistanceToSurface(e,t){let{renderCoordsHelper:n}=this.view,{camera:r}=this.view.state,{direction:i}=F(this.view,t,0,U,re),a=n.intersectManifoldClosestSilhouette(w(t,i),e,E.get()),o=b(t,a),s=n.intersectManifoldClosestSilhouette(w(t,ee(E.get(),t,r.center)),e,E.get()),c=b(t,s);return Math.min(o,c)}_computeHeadingRotateRadius(e){let{renderCoordsHelper:t,state:r}=this.view,{camera:i,isGlobal:a}=r,o=t.intersectManifoldClosestSilhouette(i.ray,this._filteredSurfaceElevation,E.get());if(a){let t=u(E.get(),e,o),r=g(t);p(t,t,1/r);let i=v(E.get(),e),a=n(x(i,t));return r*Math.sin(Math.min(W,a))}{let n=m(E.get(),e);return t.setAltitude(n,this._filteredSurfaceElevation),b(o,n)}}_minimumAscendVelocity(){return this.view.state.constraints.collision.enabled?0:J}_computeVelocities(e){let n=this._filteredSurfaceElevation,r=n+C(this.view.spatialReference).radius,{camera:i,isGlobal:a}=this.view.state,o=E.get(),s=this._getPointAbsoluteSurfaceElevation(i.eye,n,o),c=this._clampedDistanceToSurface(n,o),l=i.width/2,u=G*i.width,d=G*i.width,f=i.computeRenderPixelSizeAtDistance(c),p=f/r,m=f/this._computeHeadingRotateRadius(o),h=a?p:f,g=this._precisionPanEnabled===this._coarsePanEnabled?1:this._precisionPanEnabled?K:q,_=h*u*e*g,v=s-n;return{pan:_,ascend:Math.max(this._minimumAscendVelocity()*e,2**(u*e/l)*v-v),zoom:2**(u*e/l)*c-c,rotate:t(m*d,Y,ne)*e}}static activatesFor(e,t){let n=R(t,e.navigation.gamepad,H);return!(t.action===`end`||z(n))}};e([i({constructOnly:!0})],V.prototype,`gamepadDevice`,void 0),V=e([a(`esri.views.3d.state.controllers.GamepadKeyboardController`)],V);const H={translation:[0,0,0],heading:0,tilt:0,zoom:0},U=80,W=r(80),G=.75,K=.25,q=4,J=5,Y=r(30),ne=r(80),X={zoom:0,ascend:0,pan:{enabled:!1,matrix:l()},rotate:{enabled:!1,matrix:l()}},Z=S(),Q=S(),re=I(),$=new T;function ie(e){e.zoom=0,e.ascend=0,e.pan.enabled=!1,c(e.pan.matrix),e.rotate.enabled=!1,c(e.rotate.matrix)}export{V as GamepadKeyboardController};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../../core/Evented.js";import has from"../../../core/has.js";import{on as n}from"../../../core/reactiveUtils.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{isIntegratedMeshLayerView as a}from"../../support/layerViewUtils.js";let o=class extends t{constructor(e){super(e),this._integratedMeshElevationUpdateHandles=new Map}initialize(){let e=this._integratedMeshElevationUpdateHandles;this.addHandles([n(()=>this.view.groundView,`elevation-change`,e=>this._elevationChange(e)),this.view.allLayerViews.on(`change`,t=>{t.added.forEach(t=>{if(!a(t)||(has(`enable-feature:im-as-ground`)?t.usedAsGround:t.replacesTerrain))return;let n=t.elevationProvider.on(`elevation-change`,e=>this._elevationChange(e));e.set(t,n),this.addHandles(n,t)}),t.removed.forEach(t=>{a(t)&&(this.removeHandles(t),e.delete(t))})})])}intersect(e,t,n,r){this.view.groundView.intersect(e,t,n,r);for(let i of this._integratedMeshElevationUpdateHandles.keys())i.intersect(e,t,n,r)}_elevationChange(e){this.emit(`elevation-change`,e)}};e([r({constructOnly:!0})],o.prototype,`view`,void 0),o=e([i(`esri.views.3d.support.GroundAndIMSurface`)],o);export{o as GroundAndIMSurface};
2
+ import{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../../core/Evented.js";import{on as n}from"../../../core/reactiveUtils.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{IntegratedMeshSemantics as a}from"../../../layers/support/IntegratedMeshSemantics.js";import{isIntegratedMeshLayerView as o}from"../../support/layerViewUtils.js";let s=class extends t{constructor(e){super(e),this._integratedMeshElevationUpdateHandles=new Map}initialize(){let e=this._integratedMeshElevationUpdateHandles;this.addHandles([n(()=>this.view.groundView,`elevation-change`,e=>this._elevationChange(e)),this.view.allLayerViews.on(`change`,t=>{t.added.forEach(t=>{if(!o(t)||a.contributesToGroundElevation(t.layer,t.replacesTerrain))return;let n=t.elevationProvider.on(`elevation-change`,e=>this._elevationChange(e));e.set(t,n),this.addHandles(n,t)}),t.removed.forEach(t=>{o(t)&&(this.removeHandles(t),e.delete(t))})})])}intersect(e,t,n,r){this.view.groundView.intersect(e,t,n,r);for(let i of this._integratedMeshElevationUpdateHandles.keys())i.intersect(e,t,n,r)}_elevationChange(e){this.emit(`elevation-change`,e)}};e([r({constructOnly:!0})],s.prototype,`view`,void 0),s=e([i(`esri.views.3d.support.GroundAndIMSurface`)],s);export{s as GroundAndIMSurface};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{translateAffine as e}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as t,create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as r,dist as i}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{negate as o,set as s,transformMat4 as c}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as u}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{getReferenceEllipsoid as d}from"../../../../geometry/ellipsoidUtils.js";import{lonLatToWebMercatorComparable as f}from"../../../../geometry/projection/projectors.js";import{center as p,fromBuffer as m,setEmpty as h,expandWithVec3 as g,create as _}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as v}from"../../../../geometry/support/DoubleArray.js";import{newFloatArray as ee}from"../../../../geometry/support/FloatArray.js";import{newHalfFloatArray as y}from"../../../../geometry/support/HalfFloatArray.js";import{getZeroIndexArray as b}from"../../../../geometry/support/Indices.js";import{addOlidAttribute as te}from"../../layers/graphics/olidUtils.js";import{getPlanarDistanceToGroundRatio as ne}from"../planarDistanceToGroundRatio.js";import{Attribute as x}from"../../webgl-engine/lib/Attribute.js";import{BufferGeometry as S}from"../../webgl-engine/lib/BufferGeometry.js";import{Buffers as C}from"../../webgl-engine/lib/Buffers.js";import{Geometry as w}from"../../webgl-engine/lib/Geometry.js";import{createVerticesView as T}from"../../webgl-engine/lib/VerticesView.js";import{isImagePattern as re}from"../../webgl-engine/materials/lineStippleUtils.js";import{writeRibbonLineTextureBuffer as E,isClosed as D,ribbonLineVertexCount as ie,writeRibbonLineVertices as ae}from"../../webgl-engine/materials/internal/ribbonLineBufferUtils.js";import{getLayout as oe,getTextureBufferLayout as O}from"../../webgl-engine/shaders/RibbonLineLayouts.js";function k(e,t,n=null){let r=[],i=t.mapPositions,a=P(t,r),o=a.data,s=a.indices.length,c=b(s);return F(t,r,c),R(t,r,c),I(t,r,c),L(t,r,a.indices,c),z(t,r,a.indices,c),B(t,r),V(t,r,a.indices,c),H(e,t,r,o),n!=null&&te(r,n,c),new w(e,r,i)}function A(n,r,i,a,s=null){let c=r.attributeData,l=T({data:c.position,size:3,stride:3},3),u=D(n.parameters,l.count),d=oe(n.parameters).createBuffer(ie(l.count,u,n.parameters)),f=O(n.parameters).createBuffer(l.count+(u?3:2)),p=f.layout.fields.has(`u0`)?U(n.parameters,r.overlayInfo,c.position):null;return o(Q,i.vec3),e($,s??t,Q),E({...c,position:l,distancesToStart:p,olidColor:a},u,{buffer:f,offset:0},$),ae(l.count,u,n.parameters,{buffer:d,offset:0},0),new S(n,new C(d,f),i,r.mapPositions)}function j(n,r,i,a=null){o(Q,n.localOrigin.vec3),e($,a??t,Q);let s=T({data:r,size:3,stride:3},3);E({position:s,color:i},D(n.material.parameters,s.count),{buffer:n.getMutableBuffers().storage,offset:0},$)}function M(e,t,n=null){let r=Y(X,e,n);return p(r,Z),t.getOrigin(Z)}function N(e,t,n,r=null){let i=Y(X,n,r);return p(i,Z),t.needsOriginUpdate(e,Z,0)}function P(e,t){let{attributeData:{position:n},removeDuplicateStartEnd:r}=e,i=n.length/3,a=i>2&&W(n)&&r,o=i-+!!a,s=Array(2*(o-1)),c=a?n.slice(0,-3):n,l=0;for(let e=0;e<o-1;e++)s[l++]=e,s[l++]=e+1;let u=new x(c,s,3,a);return t.push([`position`,u]),u}function F(e,t,n){if(e.attributeData.colorFeature!=null)return;let r=e.attributeData.color;t.push([`color`,new x(r??u,n,4)])}function I(e,t,n){e.attributeData.normal&&t.push([`normal`,new x(e.attributeData.normal,n,3)])}function L(e,t,n,r){let i=e.attributeData.colorFeature;i!=null&&(typeof i==`number`?t.push([`colorFeatureAttribute`,new x([i],r,1,!0)]):t.push([`colorFeatureAttribute`,new x(i,n,1,!0)]))}function R(e,t,n){e.attributeData.sizeFeature??t.push([`size`,new x([e.attributeData.size??1],n,1,!0)])}function z(e,t,n,r){let i=e.attributeData.sizeFeature;i!=null&&(typeof i==`number`?t.push([`sizeFeatureAttribute`,new x([i],r,1,!0)]):t.push([`sizeFeatureAttribute`,new x(i,n,1,!0)]))}function B(e,t){let{attributeData:{position:n,timeStamps:r}}=e;if(!r)return;let i=n.length/3,a=Array(2*(i-1)),o=0;for(let e=0;e<i-1;e++)a[o++]=e,a[o++]=e+1;t.push([`timeStamps`,new x(r,a,q,!0)])}function V(e,t,n,r){let i=e.attributeData.opacityFeature;i!=null&&(typeof i==`number`?t.push([`opacityFeatureAttribute`,new x([i],r,1,!0)]):t.push([`opacityFeatureAttribute`,new x(i,n,1,!0)]))}function H(e,{overlayInfo:t},n,r){let i=U(e.parameters,t,r);i!=null&&n.push([`distanceToStart`,new x(i,n[0][1].indices,1,!0)])}function U(e,t,n){if(t==null||!G(e)||e.stipplePattern==null)return null;let{renderCoordsHelper:a,spatialReference:o}=t,s=o.isGeographic&&a.viewingMode===1,c=e.worldSized||re(e.stipplePattern);if(!c&&!s)return null;let l=n;if(s){let e=v(n.length),t=d(o);for(let r=0;r<e.length;r+=3)f(n,r,e,r,t);l=e}let u=n.length/3,p=ee(u+1),m=a.viewingMode===1,h=K,g=se,_=0,y=0,b=0;r(h,l[y++],l[y++]),y++,p[0]=0;for(let e=1;e<u+1;++e){e===u&&(y=0);let t=y;r(g,l[y++],l[y++]),y++;let a=(n[b+1]+n[t+1])/2,s=c?ne(o,m,a):1;_+=i(h,g)*s,p[e]=_,[h,g]=[g,h],b=t}return p}function W(e){let t=e.length;return e[0]===e[t-3]&&e[1]===e[t-2]&&e[2]===e[t-1]}function G(e){return`stipplePattern`in e}const K=a(),se=a(),q=4;function ce(e,t,n,r,i,a){if(e==null||e.length===0)return[];let o=[];for(let s=0;s<e.length;s++){let c=e[s];if(c.length<2)continue;let l=c.length,u=v(l*3);for(let e=0;e<l;e++){let t=c[e];u[e*3]=t[0],u[e*3+1]=t[1],u[e*3+2]=t[2]}let d=a?.[s];o.push({attributeData:{position:u,normal:t,colorFeature:n?.[s],opacityFeature:r?.[s],sizeFeature:i?.[s],timeStamps:d==null?void 0:J(d.timeStamps,d.stage)},removeDuplicateStartEnd:!1})}return o}function le(e,t=0,n=.01){let r=y(e.length);r[0]=0;for(let t=1;t<e.length;t++){let n=e[t-1],i=e[t],a=Math.sqrt((i[0]-n[0])**2+(i[1]-n[1])**2+(i[2]-n[2])**2);r[t]=r[t-1]+a}let i=r.map(e=>e*n);if(t!==0&&t<i.length){let e=i[t];for(let t=0;t<i.length;t++)i[t]-=e}return i}function J(e,t){let n=y(e.length*4),r=e[0],i=e[e.length-1];for(let a=0;a<e.length;a++)n[a*4]=e[a],n[a*4+1]=r,n[a*4+2]=i,n[a*4+3]=t+.5;return n}function Y(e,t,n){if(n==null)return m(t,e);h(e);for(let r=0;r<t.length;r+=3)s(Z,t[r],t[r+1],t[r+2]),c(Z,Z,n),g(e,Z);return e}const X=_(),Z=l(),Q=l(),$=n();export{U as computeLineDistances,A as createBufferGeometry,k as createGeometry,le as getLinearTimeStamps,ce as lineStripsToParameters,N as needsBufferGeometryOriginUpdate,q as numTimeStampValuesPerVertex,M as selectLocalOrigin,J as timeStampsToAttribute,j as updateBufferGeometry};
2
+ import{translateAffine as e}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as t,create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as r,dist as i}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{negate as o,set as s,transformMat4 as c}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as u}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{getReferenceEllipsoid as d}from"../../../../geometry/ellipsoidUtils.js";import{lonLatToWebMercatorComparable as f}from"../../../../geometry/projection/projectors.js";import{center as p,fromBuffer as m,setEmpty as h,expandWithVec3 as g,create as _}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as v}from"../../../../geometry/support/DoubleArray.js";import{newFloatArray as y}from"../../../../geometry/support/FloatArray.js";import{newHalfFloatArray as b}from"../../../../geometry/support/HalfFloatArray.js";import{getZeroIndexArray as x}from"../../../../geometry/support/Indices.js";import{addOlidAttribute as ee}from"../../layers/graphics/olidUtils.js";import{getPlanarDistanceToGroundRatio as te}from"../planarDistanceToGroundRatio.js";import{Attribute as S}from"../../webgl-engine/lib/Attribute.js";import{BufferGeometry as ne}from"../../webgl-engine/lib/BufferGeometry.js";import{Buffers as C}from"../../webgl-engine/lib/Buffers.js";import{Geometry as w}from"../../webgl-engine/lib/Geometry.js";import{createVerticesView as T}from"../../webgl-engine/lib/VerticesView.js";import{isImagePattern as re}from"../../webgl-engine/materials/lineStippleUtils.js";import{isClosed as E,ribbonLineVertexCount as D,writeRibbonLineTextureBuffer as O,writeRibbonLineVertices as ie}from"../../webgl-engine/materials/internal/ribbonLineBufferUtils.js";import{getLayout as ae,getTextureBufferLayout as oe}from"../../webgl-engine/shaders/RibbonLineLayouts.js";function k(e,t,n=null){let r=[],i=t.mapPositions,a=P(t,r),o=a.data,s=a.indices.length,c=x(s);return F(t,r,c),R(t,r,c),I(t,r,c),L(t,r,a.indices,c),z(t,r,a.indices,c),B(t,r),V(t,r,a.indices,c),H(e,t,r,o),n!=null&&ee(r,n,c),new w(e,r,i)}function A(n,r,i,a,s=null){let{attributeData:c,removeDuplicateStartEnd:l}=r,u=G(c.position,l),d=T({data:u,size:3,stride:3},3),f=E(n.parameters,d.count),p=ae(n.parameters).createBuffer(D(d.count,f,n.parameters)),m=oe(n.parameters).createBuffer(d.count+(f?3:2)),h=m.layout.fields.has(`u0`)?U(n.parameters,r.overlayInfo,u):null;return o(Q,i.vec3),e($,s??t,Q),O({...c,position:d,distancesToStart:h,olidColor:a},f,{buffer:m,offset:0},$),ie(d.count,f,n.parameters,{buffer:p,offset:0},0),new ne(n,new C(p,m),i,r.mapPositions)}function j(n,r,i,a=null){let s=T({data:r,size:3,stride:3},3),c=E(n.material.parameters,s.count);o(Q,n.localOrigin.vec3),e($,a??t,Q),O({position:s,color:i},c,{buffer:n.getMutableBuffers().storage,offset:0},$)}function M(e,t,n=null){let r=Y(X,e,n);return p(r,Z),t.getOrigin(Z)}function N(e,t,n,r=null){let i=Y(X,n,r);return p(i,Z),t.needsOriginUpdate(e,Z,0)}function P(e,t){let{attributeData:{position:n},removeDuplicateStartEnd:r}=e,i=G(n,r),a=i.length/3,o=Array(2*(a-1)),s=0;for(let e=0;e<a-1;e++)o[s++]=e,o[s++]=e+1;let c=new S(i,o,3,i!==n);return t.push([`position`,c]),c}function F(e,t,n){if(e.attributeData.colorFeature!=null)return;let r=e.attributeData.color;t.push([`color`,new S(r??u,n,4)])}function I(e,t,n){e.attributeData.normal&&t.push([`normal`,new S(e.attributeData.normal,n,3)])}function L(e,t,n,r){let i=e.attributeData.colorFeature;i!=null&&(typeof i==`number`?t.push([`colorFeatureAttribute`,new S([i],r,1,!0)]):t.push([`colorFeatureAttribute`,new S(i,n,1,!0)]))}function R(e,t,n){e.attributeData.sizeFeature??t.push([`size`,new S([e.attributeData.size??1],n,1,!0)])}function z(e,t,n,r){let i=e.attributeData.sizeFeature;i!=null&&(typeof i==`number`?t.push([`sizeFeatureAttribute`,new S([i],r,1,!0)]):t.push([`sizeFeatureAttribute`,new S(i,n,1,!0)]))}function B(e,t){let{attributeData:{position:n,timeStamps:r}}=e;if(!r)return;let i=n.length/3,a=Array(2*(i-1)),o=0;for(let e=0;e<i-1;e++)a[o++]=e,a[o++]=e+1;t.push([`timeStamps`,new S(r,a,q,!0)])}function V(e,t,n,r){let i=e.attributeData.opacityFeature;i!=null&&(typeof i==`number`?t.push([`opacityFeatureAttribute`,new S([i],r,1,!0)]):t.push([`opacityFeatureAttribute`,new S(i,n,1,!0)]))}function H(e,{overlayInfo:t},n,r){let i=U(e.parameters,t,r);i!=null&&n.push([`distanceToStart`,new S(i,n[0][1].indices,1,!0)])}function U(e,t,n){if(t==null||!K(e)||e.stipplePattern==null)return null;let{renderCoordsHelper:a,spatialReference:o}=t,s=o.isGeographic&&a.viewingMode===1,c=e.worldSized||re(e.stipplePattern);if(!c&&!s)return null;let l=n;if(s){let e=v(n.length),t=d(o);for(let r=0;r<e.length;r+=3)f(n,r,e,r,t);l=e}let u=n.length/3,p=y(u+1),m=a.viewingMode===1,h=se,g=ce,_=0,b=0,x=0;r(h,l[b++],l[b++]),b++,p[0]=0;for(let e=1;e<u+1;++e){e===u&&(b=0);let t=b;r(g,l[b++],l[b++]),b++;let a=(n[x+1]+n[t+1])/2,s=c?te(o,m,a):1;_+=i(h,g)*s,p[e]=_,[h,g]=[g,h],x=t}return p}function W(e){let t=e.length;return e[0]===e[t-3]&&e[1]===e[t-2]&&e[2]===e[t-1]}function G(e,t){return t&&e.length>6&&W(e)?e.slice(0,-3):e}function K(e){return`stipplePattern`in e}const se=a(),ce=a(),q=4;function le(e,t,n,r,i,a){if(e==null||e.length===0)return[];let o=[];for(let s=0;s<e.length;s++){let c=e[s];if(c.length<2)continue;let l=c.length,u=v(l*3);for(let e=0;e<l;e++){let t=c[e];u[e*3]=t[0],u[e*3+1]=t[1],u[e*3+2]=t[2]}let d=a?.[s];o.push({attributeData:{position:u,normal:t,colorFeature:n?.[s],opacityFeature:r?.[s],sizeFeature:i?.[s],timeStamps:d==null?void 0:J(d.timeStamps,d.stage)},removeDuplicateStartEnd:!1})}return o}function ue(e,t=0,n=.01){let r=b(e.length);r[0]=0;for(let t=1;t<e.length;t++){let n=e[t-1],i=e[t],a=Math.sqrt((i[0]-n[0])**2+(i[1]-n[1])**2+(i[2]-n[2])**2);r[t]=r[t-1]+a}let i=r.map(e=>e*n);if(t!==0&&t<i.length){let e=i[t];for(let t=0;t<i.length;t++)i[t]-=e}return i}function J(e,t){let n=b(e.length*4),r=e[0],i=e[e.length-1];for(let a=0;a<e.length;a++)n[a*4]=e[a],n[a*4+1]=r,n[a*4+2]=i,n[a*4+3]=t+.5;return n}function Y(e,t,n){if(n==null)return m(t,e);h(e);for(let r=0;r<t.length;r+=3)s(Z,t[r],t[r+1],t[r+2]),c(Z,Z,n),g(e,Z);return e}const X=_(),Z=l(),Q=l(),$=n();export{U as computeLineDistances,A as createBufferGeometry,k as createGeometry,ue as getLinearTimeStamps,le as lineStripsToParameters,N as needsBufferGeometryOriginUpdate,q as numTimeStampValuesPerVertex,M as selectLocalOrigin,J as timeStampsToAttribute,j as updateBufferGeometry};