@arcgis/core 5.1.0-next.105 → 5.1.0-next.107

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 (478) hide show
  1. package/analysis/AreaMeasurementAnalysis.d.ts +5 -5
  2. package/analysis/DimensionAnalysis.d.ts +3 -3
  3. package/analysis/DimensionSimpleStyle.d.ts +2 -2
  4. package/analysis/DirectLineMeasurementAnalysis.d.ts +4 -4
  5. package/analysis/DistanceMeasurementAnalysis.d.ts +4 -4
  6. package/analysis/ElevationProfileAnalysis.d.ts +3 -3
  7. package/analysis/LengthDimension.d.ts +2 -2
  8. package/analysis/LineOfSightAnalysis.d.ts +4 -4
  9. package/analysis/ShadowCast/DiscreteOptions.d.ts +7 -3
  10. package/analysis/ShadowCast/MinDurationOptions.d.ts +5 -1
  11. package/analysis/ShadowCast/TotalDurationOptions.d.ts +7 -3
  12. package/analysis/ShadowCast/types.d.ts +1 -1
  13. package/analysis/ShadowCastAnalysis.d.ts +11 -6
  14. package/analysis/SliceAnalysis.d.ts +4 -4
  15. package/analysis/SlicePlane.d.ts +3 -3
  16. package/analysis/Viewshed.d.ts +2 -2
  17. package/analysis/ViewshedAnalysis.d.ts +3 -3
  18. package/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.d.ts +1 -1
  19. package/analysis/VolumeMeasurementAnalysis.d.ts +3 -3
  20. package/applications/Components/imageryUtils.d.ts +24 -0
  21. package/applications/Components/layerUtils.d.ts +21 -0
  22. package/applications/Components/layerUtils.js +2 -0
  23. package/applications/Components/templateUtils.d.ts +11 -1
  24. package/applications/Components/templateUtils.js +1 -1
  25. package/arcgisGlobal.d.ts +6 -0
  26. package/assets/components/assets/icon/buttons16.json +1 -0
  27. package/assets/components/assets/icon/buttons24.json +1 -0
  28. package/assets/components/assets/icon/buttons32.json +1 -0
  29. package/assets/components/assets/icon/entityTypes16.json +1 -0
  30. package/assets/components/assets/icon/entityTypes24.json +1 -0
  31. package/assets/components/assets/icon/entityTypes32.json +1 -0
  32. package/assets/esri/core/t9n/Units_ar.json +1 -1
  33. package/assets/esri/core/t9n/Units_bg.json +1 -1
  34. package/assets/esri/core/t9n/Units_bs.json +1 -1
  35. package/assets/esri/core/t9n/Units_ca.json +1 -1
  36. package/assets/esri/core/t9n/Units_cs.json +1 -1
  37. package/assets/esri/core/t9n/Units_da.json +1 -1
  38. package/assets/esri/core/t9n/Units_de.json +1 -1
  39. package/assets/esri/core/t9n/Units_el.json +1 -1
  40. package/assets/esri/core/t9n/Units_es.json +1 -1
  41. package/assets/esri/core/t9n/Units_et.json +1 -1
  42. package/assets/esri/core/t9n/Units_fi.json +1 -1
  43. package/assets/esri/core/t9n/Units_fr.json +1 -1
  44. package/assets/esri/core/t9n/Units_he.json +1 -1
  45. package/assets/esri/core/t9n/Units_hr.json +1 -1
  46. package/assets/esri/core/t9n/Units_hu.json +1 -1
  47. package/assets/esri/core/t9n/Units_id.json +1 -1
  48. package/assets/esri/core/t9n/Units_it.json +1 -1
  49. package/assets/esri/core/t9n/Units_ja.json +1 -1
  50. package/assets/esri/core/t9n/Units_ko.json +1 -1
  51. package/assets/esri/core/t9n/Units_lt.json +1 -1
  52. package/assets/esri/core/t9n/Units_lv.json +1 -1
  53. package/assets/esri/core/t9n/Units_nl.json +1 -1
  54. package/assets/esri/core/t9n/Units_no.json +1 -1
  55. package/assets/esri/core/t9n/Units_pl.json +1 -1
  56. package/assets/esri/core/t9n/Units_pt-BR.json +1 -1
  57. package/assets/esri/core/t9n/Units_pt-PT.json +1 -1
  58. package/assets/esri/core/t9n/Units_ro.json +1 -1
  59. package/assets/esri/core/t9n/Units_ru.json +1 -1
  60. package/assets/esri/core/t9n/Units_sk.json +1 -1
  61. package/assets/esri/core/t9n/Units_sl.json +1 -1
  62. package/assets/esri/core/t9n/Units_sr.json +1 -1
  63. package/assets/esri/core/t9n/Units_sv.json +1 -1
  64. package/assets/esri/core/t9n/Units_th.json +1 -1
  65. package/assets/esri/core/t9n/Units_tr.json +1 -1
  66. package/assets/esri/core/t9n/Units_uk.json +1 -1
  67. package/assets/esri/core/t9n/Units_vi.json +1 -1
  68. package/assets/esri/core/t9n/Units_zh-CN.json +1 -1
  69. package/assets/esri/core/t9n/Units_zh-HK.json +1 -1
  70. package/assets/esri/core/t9n/Units_zh-TW.json +1 -1
  71. package/assets/esri/core/workers/RemoteClient.js +1 -1
  72. package/assets/esri/core/workers/chunks/{6854b28853f5dd195110.js → 01c70c27aa3a955e2928.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{b7a81fd4994eabba1869.js → 0c8e6ccb5a8174718d62.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{a943bd2e6fb7443c2b66.js → 17604cbd4d24158e2c16.js} +1 -1
  75. package/assets/esri/core/workers/chunks/179c9fe4ac83b42e5976.js +1 -0
  76. package/assets/esri/core/workers/chunks/1d1929f98d941179be29.js +2 -0
  77. package/assets/esri/core/workers/chunks/{24247ee93f43fff5e596.js.LICENSE.txt → 1d1929f98d941179be29.js.LICENSE.txt} +1 -3
  78. package/assets/esri/core/workers/chunks/1ebb613bbe09fcf274d8.js +1 -0
  79. package/assets/esri/core/workers/chunks/24b43fb12fc3009fdc30.js +1 -0
  80. package/assets/esri/core/workers/chunks/2b9661700743d1f9717e.js +1 -0
  81. package/assets/esri/core/workers/chunks/2f0a3b22fc46d832e240.js +1 -0
  82. package/assets/esri/core/workers/chunks/{2dced41ff2aa1bd86665.js → 33ec193e6d7a0cb9d8dd.js} +1 -1
  83. package/assets/esri/core/workers/chunks/340f2c996f62f7f5ceae.js +1 -0
  84. package/assets/esri/core/workers/chunks/37c63570c0b4981cd519.js +1 -0
  85. package/assets/esri/core/workers/chunks/{a0e72b107991ba38a9f0.js → 502c3da8c49bf885f51d.js} +1 -1
  86. package/assets/esri/core/workers/chunks/518046d2b95a7590a092.js +1 -0
  87. package/assets/esri/core/workers/chunks/547dc6ccb989bd962661.js +1 -0
  88. package/assets/esri/core/workers/chunks/549d348ca181d06aefb7.js +2 -0
  89. package/assets/esri/core/workers/chunks/{9b89cc85c1b5d561df7c.js → 55334ad3618899cdbf78.js} +2 -2
  90. package/assets/esri/core/workers/chunks/{7485d59d60d61737d662.js → 55b765c72d13b3b911f9.js} +1 -1
  91. package/assets/esri/core/workers/chunks/{1e8d5bfc5f8c2664190c.js → 56d9d3f108ff6e719dd4.js} +1 -1
  92. package/assets/esri/core/workers/chunks/5cdf87e7a59ace38df87.js +1 -0
  93. package/assets/esri/core/workers/chunks/622bdd1b9d5d292ec12b.js +1 -0
  94. package/assets/esri/core/workers/chunks/69c9eb93553b006b640d.js +2 -0
  95. package/assets/esri/core/workers/chunks/6d20d741b8ae1a45b422.js +1 -0
  96. package/assets/esri/core/workers/chunks/702a3ef9e1b3442cbee7.js +1 -0
  97. package/assets/esri/core/workers/chunks/75a7de23c05435ec7649.js +1 -0
  98. package/assets/esri/core/workers/chunks/762e23466308f22d7076.js +1 -0
  99. package/assets/esri/core/workers/chunks/{52219561c144e5cb4442.js → 770611659b38066a6228.js} +1 -1
  100. package/assets/esri/core/workers/chunks/{e90afd914f2ccd4f5374.js → 7ce60331f94ee0a5d674.js} +6 -6
  101. package/assets/esri/core/workers/chunks/825db2ea15308ee6e5dc.js +1 -0
  102. package/assets/esri/core/workers/chunks/8330302096d4312a4393.js +1 -0
  103. package/assets/esri/core/workers/chunks/{7617bd0f3a70dfe61637.js → 8557dd9ef336b23f768f.js} +1 -1
  104. package/assets/esri/core/workers/chunks/885eac78a76184efa1e5.js +1 -0
  105. package/assets/esri/core/workers/chunks/{79dc7045d9a2d43ba8df.js → 890b7a1153b7f65eba9a.js} +1 -1
  106. package/assets/esri/core/workers/chunks/9234a293d61e134f121f.js +1 -0
  107. package/assets/esri/core/workers/chunks/{44636ef119c6a576470b.js → 94eab215bab3e4e0e5b5.js} +1 -1
  108. package/assets/esri/core/workers/chunks/95dee5853c6e89f15ea9.js +1 -0
  109. package/assets/esri/core/workers/chunks/a5b9ae4c93f9af7589f2.js +1 -0
  110. package/assets/esri/core/workers/chunks/{fb415b01f0f1d644832d.js → ac408c62565e2c8b5975.js} +1 -1
  111. package/assets/esri/core/workers/chunks/b3e8ab68fc38306f13c6.js +1 -0
  112. package/assets/esri/core/workers/chunks/b69d1d528e271568cbd8.js +2 -0
  113. package/assets/esri/core/workers/chunks/{0cc74bc3772be51cabc1.js → bbaf8baa3ca6195467e4.js} +1 -1
  114. package/assets/esri/core/workers/chunks/{f7e386ece75afb6e4be5.js → bc249bb667f0564ad093.js} +1 -1
  115. package/assets/esri/core/workers/chunks/c4872cf3b71d00f450e1.js +1 -0
  116. package/assets/esri/core/workers/chunks/c5ab346a226df1894302.js +1 -0
  117. package/assets/esri/core/workers/chunks/{39a8e6c9d710d3faea3c.js → cdb48d198145493f76f3.js} +1 -1
  118. package/assets/esri/core/workers/chunks/{359dbfbfb9acfb18bc6e.js → d4014213c476bf8099af.js} +1 -1
  119. package/assets/esri/core/workers/chunks/da29cf0e64065631a470.js +1 -0
  120. package/assets/esri/core/workers/chunks/ddebc1dc10a2d207389f.js +1 -0
  121. package/assets/esri/core/workers/chunks/e393fd61deb2e7f22ee6.js +1 -0
  122. package/assets/esri/core/workers/chunks/ea2bf7c543cc536400b7.js +30 -0
  123. package/assets/esri/core/workers/chunks/ece30bfd5c49b8d99752.js +1 -0
  124. package/assets/esri/core/workers/chunks/ecf4d07917efc97eb991.js +1 -0
  125. package/assets/esri/core/workers/chunks/ee56290e600cbeb25a00.js +1 -0
  126. package/assets/esri/core/workers/chunks/f52c6efc5a2abf5ac845.js +1 -0
  127. package/assets/esri/core/workers/chunks/fc1fe1f58a65a1694c09.js +1 -0
  128. package/assets/esri/geometry/support/pe-wasm.wasm +0 -0
  129. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  130. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  131. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +84 -1
  132. package/assets/esri/themes/base/widgets/_Sketch.scss +1 -24
  133. package/assets/esri/themes/dark/main.css +1 -1
  134. package/assets/esri/themes/light/main.css +1 -1
  135. package/assets/esri/themes/light/view.css +1 -1
  136. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
  137. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
  138. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
  139. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
  140. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
  141. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
  142. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
  143. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
  144. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
  145. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
  146. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
  147. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
  148. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
  149. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
  150. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
  151. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
  152. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
  153. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
  154. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
  155. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
  156. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
  157. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
  158. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
  159. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
  160. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
  161. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
  162. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
  163. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
  164. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
  165. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
  166. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
  167. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
  168. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
  169. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
  170. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
  171. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
  172. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
  173. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
  174. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
  175. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
  176. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
  177. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable.json +1 -1
  178. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_en.json +1 -1
  179. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  180. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  181. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  182. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  183. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  184. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  185. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  186. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  187. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  188. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  189. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  190. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  191. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  192. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  193. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  194. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  195. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  196. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  197. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  198. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  199. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  200. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  201. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  202. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  203. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  204. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  205. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  206. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  207. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  208. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  209. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  210. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  211. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  212. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  213. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  214. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  215. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  216. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  217. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  218. package/assets/esri/widgets/Sketch/t9n/Sketch.json +1 -1
  219. package/assets/esri/widgets/Sketch/t9n/Sketch_en.json +1 -1
  220. package/chunks/ComponentShader.glsl.js +11 -15
  221. package/chunks/Fog.glsl.js +3 -3
  222. package/chunks/GlowComposition.glsl.js +38 -56
  223. package/chunks/OITDimOpaque.glsl.js +8 -3
  224. package/chunks/SimpleAtmosphere.glsl.js +3 -3
  225. package/chunks/lyr3DWorker.js +1 -1
  226. package/chunks/pe-wasm.js +1 -1
  227. package/config.js +1 -1
  228. package/core/generatorUtils.js +2 -0
  229. package/core/libs/gl-matrix-2/factories/vec2f64.js +1 -1
  230. package/core/libs/gl-matrix-2/math/vec2.js +1 -1
  231. package/core/mathUtils.js +1 -1
  232. package/core/typedArrayUtil.js +1 -1
  233. package/geometry/HeightModelInfo.js +1 -1
  234. package/geometry/geometryEngine.d.ts +2 -2
  235. package/geometry/support/WKIDUnitConversion.js +1 -1
  236. package/geometry/support/buffer/BufferView.js +1 -1
  237. package/geometry/support/vcsData.js +1 -1
  238. package/geometry/support/vcsLookup.js +1 -1
  239. package/identity/IdentityManagerBase.js +1 -1
  240. package/kernel.js +1 -1
  241. package/layers/DimensionLayer.d.ts +5 -5
  242. package/layers/FeatureLayer.d.ts +2 -2
  243. package/layers/GaussianSplatLayer.d.ts +3 -3
  244. package/layers/LineOfSightLayer.d.ts +5 -5
  245. package/layers/ParquetLayer.d.ts +6 -4
  246. package/layers/SubtypeGroupLayer.d.ts +2 -2
  247. package/layers/ViewshedLayer.d.ts +3 -3
  248. package/layers/graphics/sources/ParquetSource.js +1 -1
  249. package/layers/graphics/sources/parquet/FileProvider.js +2 -0
  250. package/layers/graphics/sources/parquet/PortalParquetFileProvider.js +2 -0
  251. package/layers/graphics/sources/parquet/PortalParquetLayerFileProvider.js +2 -0
  252. package/layers/graphics/sources/parquet/UrlsFileProvider.js +2 -0
  253. package/layers/graphics/sources/parquet/createFileProvider.js +2 -0
  254. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  255. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +1 -1
  256. package/layers/raster/datasets/ImageAuxRaster.js +1 -1
  257. package/layers/raster/datasets/MRFRaster.js +1 -1
  258. package/layers/raster/datasets/pixelReader.js +1 -1
  259. package/layers/raster/formats/JpgPlus.js +1 -1
  260. package/layers/raster/formats/RasterCodec.js +1 -1
  261. package/layers/raster/functions/clipUtils.js +1 -1
  262. package/layers/support/AggregateField.d.ts +2 -1
  263. package/layers/support/LayerContingentValuesCache.js +1 -1
  264. package/layers/support/SubtypeSublayer.d.ts +4 -4
  265. package/layers/support/parquetUtils.d.ts +18 -7
  266. package/layers/support/parquetUtils.js +1 -1
  267. package/layers/support/rasterFunctionUtils.d.ts +2 -2
  268. package/libs/parquet/parquet.js +1 -1
  269. package/linkChart/ChronologicalLayoutSettings.d.ts +1 -1
  270. package/networks/CircuitManager.d.ts +3 -3
  271. package/networks/UnitIdentifierManager.d.ts +1 -1
  272. package/networks/UnitIdentifierManager.js +1 -1
  273. package/networks/UtilityNetwork.d.ts +2 -2
  274. package/networks/UtilityNetwork.js +1 -1
  275. package/networks/support/Circuit.d.ts +1 -1
  276. package/networks/support/CircuitLocation.d.ts +1 -1
  277. package/networks/support/CircuitSection.d.ts +1 -1
  278. package/networks/support/Subcircuit.d.ts +1 -1
  279. package/networks/support/TraceJobInfo.js +1 -1
  280. package/networks/support/jsonTypes.d.ts +10 -3
  281. package/package.json +4 -4
  282. package/popup/FieldInfo.d.ts +4 -2
  283. package/popup/support/FieldInfoFormat.d.ts +3 -2
  284. package/rest/featureService/FeatureService.d.ts +1 -1
  285. package/rest/knowledgeGraph/FieldIndex.d.ts +1 -1
  286. package/rest/knowledgeGraph/GraphObjectType.d.ts +2 -2
  287. package/rest/knowledgeGraph/GraphSearch.d.ts +1 -1
  288. package/rest/knowledgeGraph/GraphSearchStreaming.d.ts +1 -1
  289. package/rest/networks/circuits/support/CircuitVerifyResult.js +1 -1
  290. package/rest/networks/circuits/support/ExportCircuitsParameters.d.ts +19 -1
  291. package/rest/networks/circuits/support/ExportCircuitsResult.js +1 -1
  292. package/rest/networks/circuits/support/VerifyCircuitsParameters.d.ts +18 -10
  293. package/rest/networks/circuits/support/VerifyCircuitsParameters.js +1 -1
  294. package/rest/networks/circuits/support/VerifyCircuitsResult.js +1 -1
  295. package/rest/networks/support/TraceParameters.js +1 -1
  296. package/rest/networks/support/TraceResult.js +1 -1
  297. package/rest/networks/trace.js +1 -1
  298. package/rest/networks/unitIdentifiers/support/QueryUnitIdentifiersParameters.js +1 -1
  299. package/rest/support/AreasAndLengthsParameters.d.ts +1 -1
  300. package/rest/support/GeneralizeParameters.d.ts +1 -1
  301. package/rest/support/Query.d.ts +1 -1
  302. package/rest/support/RelationParameters.d.ts +1 -1
  303. package/rest/support/types.d.ts +1 -1
  304. package/support/revision.js +1 -1
  305. package/symbols/CIMSymbol.d.ts +1 -1
  306. package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +1 -0
  307. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  308. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  309. package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
  310. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  311. package/views/2d/layers/features/sources/strategies/chunks/ParquetSnapshotSourceChunk.js +1 -1
  312. package/views/2d/layers/features/sources/strategies/chunks/ParquetSourceChunk.js +1 -1
  313. package/views/3d/analysis/AreaMeasurementAnalysisView3D.d.ts +1 -0
  314. package/views/3d/analysis/DimensionAnalysisView3D.d.ts +7 -6
  315. package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.d.ts +2 -0
  316. package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
  317. package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
  318. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  319. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  320. package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +2 -1
  321. package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +5 -1
  322. package/views/3d/analysis/SliceAnalysisView3D.d.ts +4 -3
  323. package/views/3d/analysis/Viewshed/ViewshedConfiguration.js +1 -1
  324. package/views/3d/analysis/Viewshed/ViewshedDrawToolRenderer.js +2 -0
  325. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  326. package/views/3d/analysis/Viewshed/ViewshedInteractionVisuals.js +2 -0
  327. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +2 -0
  328. package/views/3d/analysis/Viewshed/ViewshedPlacementOperation.js +2 -0
  329. package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +2 -0
  330. package/views/3d/analysis/Viewshed/ViewshedPlacementRootPlugin.js +2 -0
  331. package/views/3d/analysis/Viewshed/ViewshedSnappingController.js +2 -0
  332. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  333. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
  334. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  335. package/views/3d/analysis/Viewshed/ViewshedTool2.js +1 -1
  336. package/views/3d/analysis/Viewshed/analysisViewRegister.js +1 -1
  337. package/views/3d/analysis/Viewshed/placementUtils.js +2 -0
  338. package/views/3d/analysis/Viewshed/toolLifecycleUtils.js +2 -0
  339. package/views/3d/analysis/Viewshed/viewshedSubToolUtils.js +1 -1
  340. package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
  341. package/views/3d/analysis/ViewshedAnalysisView3D.d.ts +4 -3
  342. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  343. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  344. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  345. package/views/3d/environment/FoggyWeather.js +1 -1
  346. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  347. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  348. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  349. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  350. package/views/3d/layers/i3s/Intersector.js +1 -1
  351. package/views/3d/layers/support/UVWorkspace.js +2 -0
  352. package/views/3d/layers/support/patternUtils.js +1 -1
  353. package/views/3d/layers/support/uvUtils.js +1 -1
  354. package/views/3d/support/ResourceController.js +1 -1
  355. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  356. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  357. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  358. package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
  359. package/views/3d/support/meshProcessing.js +1 -1
  360. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  361. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +8 -8
  362. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +13 -9
  363. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +63 -49
  364. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  365. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  366. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  367. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechniqueConfiguration.js +1 -1
  368. package/views/3d/webgl-engine/lib/AttributeArray.js +1 -1
  369. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  370. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  371. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  372. package/views/3d/webgl-engine/lib/PathCapBuilder.js +1 -1
  373. package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
  374. package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
  375. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  376. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  377. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
  378. package/views/3d/webgl-engine/materials/PathLayouts.js +2 -0
  379. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  380. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  381. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  382. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  383. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  384. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +2 -3
  385. package/views/PopupView.d.ts +77 -1
  386. package/views/PopupView.js +1 -1
  387. package/views/SceneView.js +1 -1
  388. package/views/draw/DrawTool.d.ts +77 -0
  389. package/views/draw/support/editingSessionUtils.js +1 -1
  390. package/views/draw/support/managers/PluginLifecycleManager.d.ts +10 -0
  391. package/views/interactive/InteractiveToolBase.d.ts +11 -0
  392. package/views/interactive/editGeometry/interfaces.d.ts +8 -0
  393. package/views/interactive/interfaces.d.ts +20 -0
  394. package/views/layers/DimensionLayerView.d.ts +2 -1
  395. package/views/layers/LineOfSightLayerView.d.ts +2 -1
  396. package/views/layers/ViewshedLayerView.d.ts +2 -1
  397. package/views/webgl/capabilities/load.js +1 -1
  398. package/webscene/Slide.js +1 -1
  399. package/widgets/Attachments/types.d.ts +1 -1
  400. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +38 -5
  401. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  402. package/widgets/BatchAttributeForm/ReactiveContingentValuesManager.js +2 -0
  403. package/widgets/BatchAttributeForm/ReactiveGraphic.js +1 -1
  404. package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
  405. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  406. package/widgets/BatchAttributeForm/css.js +1 -1
  407. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +11 -0
  408. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  409. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +77 -0
  410. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  411. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  412. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  413. package/widgets/BatchAttributeForm/interfaceUtils.js +2 -0
  414. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  415. package/widgets/BatchAttributeForm/types.d.ts +30 -2
  416. package/widgets/BatchAttributeForm.d.ts +52 -1
  417. package/widgets/BatchAttributeForm.js +1 -1
  418. package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +9 -1
  419. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  420. package/widgets/Editor.d.ts +1 -1
  421. package/widgets/FeatureTable/FieldColumn.js +1 -1
  422. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  423. package/widgets/LayerList/LayerListItem.js +1 -1
  424. package/widgets/Sketch/SketchViewModel.d.ts +67 -2
  425. package/widgets/Sketch/SketchViewModel.js +1 -1
  426. package/widgets/Sketch/VisibleElements.d.ts +19 -1
  427. package/widgets/Sketch/VisibleElements.js +1 -1
  428. package/widgets/Sketch/support/OperationHandle.js +1 -1
  429. package/widgets/Sketch/support/PluginManager.d.ts +12 -0
  430. package/widgets/Sketch/support/PluginManager.js +1 -1
  431. package/widgets/Sketch.js +1 -1
  432. package/widgets/TimeSlider.d.ts +3 -3
  433. package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +10 -0
  434. package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
  435. package/widgets/support/ContingentValuesManager.js +1 -1
  436. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.d.ts +81 -0
  437. package/widgets/support/SelectionToolbar/types.d.ts +4 -0
  438. package/widgets/support/forms/formUtils.js +1 -1
  439. package/assets/esri/core/workers/chunks/11b0d3a825fe50dd1e84.js +0 -1
  440. package/assets/esri/core/workers/chunks/130851b81f04e6a008cd.js +0 -1
  441. package/assets/esri/core/workers/chunks/1a3426276dc82a8a80f2.js +0 -1
  442. package/assets/esri/core/workers/chunks/1c8a21b7b60c0709e6b2.js +0 -1
  443. package/assets/esri/core/workers/chunks/24247ee93f43fff5e596.js +0 -2
  444. package/assets/esri/core/workers/chunks/276cb6a1cdd26d0e1444.js +0 -1
  445. package/assets/esri/core/workers/chunks/2b3a8a53cd68f666676b.js +0 -1
  446. package/assets/esri/core/workers/chunks/2ecb21c402cdd8c82533.js +0 -1
  447. package/assets/esri/core/workers/chunks/2f903bd3a2611e7f0946.js +0 -30
  448. package/assets/esri/core/workers/chunks/2fda38219d778f0447b5.js +0 -1
  449. package/assets/esri/core/workers/chunks/38d7430d2370b69334d7.js +0 -1
  450. package/assets/esri/core/workers/chunks/39d6032d79720935910d.js +0 -1
  451. package/assets/esri/core/workers/chunks/5dafd35801dca4229aed.js +0 -1
  452. package/assets/esri/core/workers/chunks/642be1619c0e76355cb6.js +0 -1
  453. package/assets/esri/core/workers/chunks/6d66dc77af8d112c33c6.js +0 -1
  454. package/assets/esri/core/workers/chunks/7b3642195d6d3ea9b830.js +0 -1
  455. package/assets/esri/core/workers/chunks/7e57029ec958f6423d5d.js +0 -2
  456. package/assets/esri/core/workers/chunks/8042e001545e2782499c.js +0 -1
  457. package/assets/esri/core/workers/chunks/855bf811cd79b97c169a.js +0 -1
  458. package/assets/esri/core/workers/chunks/881234f25c7814de8753.js +0 -1
  459. package/assets/esri/core/workers/chunks/8a7682071941c35f05c1.js +0 -1
  460. package/assets/esri/core/workers/chunks/8fdd57e2a0af647f1e3e.js +0 -1
  461. package/assets/esri/core/workers/chunks/90ea570f6b6ce8ca693b.js +0 -1
  462. package/assets/esri/core/workers/chunks/9373daa677dc767d7cf0.js +0 -1
  463. package/assets/esri/core/workers/chunks/95df6d2ebacc43ac5fa3.js +0 -1
  464. package/assets/esri/core/workers/chunks/a02ebdcb802d128c8eee.js +0 -1
  465. package/assets/esri/core/workers/chunks/adf72d87f0114aeade0e.js +0 -1
  466. package/assets/esri/core/workers/chunks/aec4a4cd7044fdbbbe34.js +0 -1
  467. package/assets/esri/core/workers/chunks/b1a21a4d7d73ad7d0e47.js +0 -1
  468. package/assets/esri/core/workers/chunks/b262478da29470abb72b.js +0 -2
  469. package/assets/esri/core/workers/chunks/b75e090a7e935ff870a3.js +0 -1
  470. package/assets/esri/core/workers/chunks/bacf0c9d5d3e084dea61.js +0 -1
  471. package/assets/esri/core/workers/chunks/c0e4fd6fa1d765275248.js +0 -2
  472. package/assets/esri/core/workers/chunks/cfaa6e205bfc0c94a1b1.js +0 -1
  473. package/assets/esri/core/workers/chunks/d3f08f1a9a250cd8a2c8.js +0 -1
  474. package/assets/esri/core/workers/chunks/dcb7a3ff59677b1cf0f1.js +0 -1
  475. /package/assets/esri/core/workers/chunks/{7e57029ec958f6423d5d.js.LICENSE.txt → 549d348ca181d06aefb7.js.LICENSE.txt} +0 -0
  476. /package/assets/esri/core/workers/chunks/{9b89cc85c1b5d561df7c.js.LICENSE.txt → 55334ad3618899cdbf78.js.LICENSE.txt} +0 -0
  477. /package/assets/esri/core/workers/chunks/{b262478da29470abb72b.js.LICENSE.txt → 69c9eb93553b006b640d.js.LICENSE.txt} +0 -0
  478. /package/assets/esri/core/workers/chunks/{c0e4fd6fa1d765275248.js.LICENSE.txt → b69d1d528e271568cbd8.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{IDENTITY as t,clone as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as e}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{getContinuousIndexArray as s}from"../../../../geometry/support/Indices.js";import{Attribute as n}from"./Attribute.js";import{cloneAttributeData as o}from"./AttributeArray.js";import{BoundingInfo as h}from"./BoundingInfo.js";import{GeometryBaseInstance as r}from"./GeometryBaseInstance.js";import{computeAttachmentOriginTriangles as a,computeAttachmentOriginLines as g,computeAttachmentOriginPoints as u}from"./geometryDataUtils.js";import{Object3DHighlightStateID as l}from"./Object3DStateID.js";import{assert as c}from"./Util.js";import{webglDebugEnabled as d}from"../../../webgl/checkWebGLError.js";class m extends r{constructor(t,i,e=null,s=0,n=null,o=-1,h,r){super(i),this.material=t,this.mapPositions=e,this.type=s,this.olidColor=n,this.edgeIndicesLength=o,this.baseGeometry=h,this.drawIndices=r,this._vertexPositionIndicesCache=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.visible=!0,this._boundingInfo=null,c((t?.useIndexing??!1)===(null!=r),"Material index requirement and Geometry must match");const a=this.positionAttribute;null!=a&&this.edgeIndicesLength<0&&(this.edgeIndicesLength=a.indices.length)}instantiate(t={}){const i=new m(t.material||this.material,[],this.mapPositions,this.type,this.olidColor,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((t,e)=>{t.exclusive=!1,i._attributes.set(e,t)}),i._boundingInfo=this._boundingInfo,i.transformation=t.transformation||this.transformation,i}getMutableAttribute(t){let i=this._attributes.get(t);return i&&!i.exclusive&&(i={...i,exclusive:!0,data:o(i.data)},this._attributes.set(t,i)),i}setAttributeData(t,i){const e=this._attributes.get(t);e?this._attributes.set(t,{...e,exclusive:!0,data:i}):d()&&console.warn(`Setting undefined attribute ${t} data`)}get primitivePositionIndices(){if(void 0!==this._vertexPositionIndicesCache)return this._vertexPositionIndicesCache;const{drawIndices:t}=this,i=this.positionAttribute;if(null!=t&&null!=i){const e=new Array;for(const s of t)e.push(i.indices[s]);this._vertexPositionIndicesCache=e}else this._vertexPositionIndicesCache=i?.indices??null;return this._vertexPositionIndicesCache}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){const t=this.drawIndices??this.positionAttribute?.indices;return t?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(t){return!!(0===this.type?this._computeAttachmentOriginTriangles(t):2===this.type?this._computeAttachmentOriginLines(t):this._computeAttachmentOriginPoints(t))&&(null!=this._transformation&&e(t,t,this._transformation),!0)}_computeAttachmentOriginTriangles(t){const i=this.positionAttribute,e=this.primitivePositionIndices;return a(t,i,e)}_computeAttachmentOriginLines(t){const i=this.positionAttribute,e=this.primitivePositionIndices;return g(t,i,p(this.material.parameters,i),e)}_computeAttachmentOriginPoints(t){const i=this.positionAttribute,e=this.primitivePositionIndices;return u(t,i,e)}invalidateBoundingInfo(){this._boundingInfo=null,this._vertexPositionIndicesCache=void 0}_calculateBoundingInfo(){const t=this.positionAttribute,i=this.primitivePositionIndices;if(!t||!i||0===i.length)return null;const e=i===t.indices?t:new n(t.data,i,t.size,!1,t.stride),o=0===this.type?3:1;c(i.length%o===0,"Indexing error: "+i.length+" not divisible by "+o);const r=s(i.length/o);return new h(r,o,e)}get transformation(){return this._transformation??t}set transformation(e){this._transformation=e&&e!==t?i(e):null}get highlights(){return this._highlights||_}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}foreachHighlightOptions(t){this._highlightOptionsCounts?.forEach((i,e)=>t(e))}allocateIdAndHighlight(t){const i=new l(t);return this.addHighlight(i)}addHighlight(t){this._ensureHighlights().add(t);const{highlightName:i}=t,e=(this._highlightOptionsCounts?.get(i)??0)+1;return this._ensureHighlightOptionsCounts().set(i,e),t}_ensureHighlights(){let t=this._highlights;return t||(t=new Set,this._highlights=t),t}_ensureHighlightOptionsCounts(){let t=this._highlightOptionsCounts;return t||(t=new Map,this._highlightOptionsCounts=t),t}removeHighlight(t){if(this._highlights?.delete(t)){const{highlightName:i}=t,e=this._highlightOptionsCounts?.get(i)??0;e<=1?this._highlightOptionsCounts?.delete(i):this._ensureHighlightOptionsCounts().set(i,e-1)}}}function p(t,i){return!(!("isClosed"in t)||!t.isClosed)&&i.indices.length>2}const _=new Set;export{m as Geometry};
2
+ import{IDENTITY as t,clone as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as e}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{getContinuousIndexArray as s}from"../../../../geometry/support/Indices.js";import{Attribute as n}from"./Attribute.js";import{cloneAttributeData as o}from"./AttributeArray.js";import{BoundingInfo as r}from"./BoundingInfo.js";import{GeometryBaseInstance as h}from"./GeometryBaseInstance.js";import{computeAttachmentOriginTriangles as u,computeAttachmentOriginLines as a,computeAttachmentOriginPoints as g}from"./geometryDataUtils.js";import{Object3DHighlightStateID as l}from"./Object3DStateID.js";import{assert as c}from"./Util.js";import{webglDebugEnabled as d}from"../../../webgl/checkWebGLError.js";class m extends h{constructor(t,i,e=null,s=0,n=null,o=-1,r,h){super(i),this.material=t,this.mapPositions=e,this.type=s,this.olidColor=n,this.edgeIndicesLength=o,this.baseGeometry=r,this.drawIndices=h,this._vertexPositionIndicesCache=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.visible=!0,this._boundingInfo=null,c((t?.useIndexing??!1)===(null!=h),"Material index requirement and Geometry must match");const u=this.positionAttribute;null!=u&&this.edgeIndicesLength<0&&(this.edgeIndicesLength=u.indices.length)}instantiate(t={}){const i=new m(t.material||this.material,[],this.mapPositions,this.type,this.olidColor,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((t,e)=>{t.exclusive=!1,i._attributes.set(e,t)}),i._boundingInfo=this._boundingInfo,i.transformation=t.transformation||this.transformation,i}getMutableAttribute(t){let i=this._attributes.get(t);return i&&!i.exclusive&&(i={...i,exclusive:!0,data:o(i.data)},this._attributes.set(t,i)),i}setAttributeData(t,i){const e=this._attributes.get(t);e?this._attributes.set(t,{...e,exclusive:!0,data:i}):d()&&console.warn(`Setting undefined attribute ${t} data`)}get primitivePositionIndices(){return void 0!==this._vertexPositionIndicesCache||(this._vertexPositionIndicesCache=this._computePrimitivePositionIndices()),this._vertexPositionIndicesCache}_computePrimitivePositionIndices(){const{drawIndices:t}=this,i=this.positionAttribute;if(null!=t&&null!=i){const e=new Array;for(const s of t)e.push(i.indices[s]);return e}return i?.indices??null}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){const t=this.drawIndices??this.positionAttribute?.indices;return t?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(t){return!!(0===this.type?this._computeAttachmentOriginTriangles(t):2===this.type?this._computeAttachmentOriginLines(t):this._computeAttachmentOriginPoints(t))&&(null!=this._transformation&&e(t,t,this._transformation),!0)}_computeAttachmentOriginTriangles(t){const i=this.positionAttribute,e=this.primitivePositionIndices;return u(t,i,e)}_computeAttachmentOriginLines(t){const i=this.positionAttribute,e=this.primitivePositionIndices;return a(t,i,p(this.material.parameters,i),e)}_computeAttachmentOriginPoints(t){const i=this.positionAttribute,e=this.primitivePositionIndices;return g(t,i,e)}invalidateBoundingInfo(){this._boundingInfo=null,this._vertexPositionIndicesCache=void 0}_calculateBoundingInfo(){const t=this.positionAttribute,i=this.primitivePositionIndices;if(!t||!i||0===i.length)return null;const e=i===t.indices?t:new n(t.data,i,t.size,!1,t.stride),o=0===this.type?3:1;c(i.length%o===0,"Indexing error: "+i.length+" not divisible by "+o);const h=s(i.length/o);return new r(h,o,e)}get transformation(){return this._transformation??t}set transformation(e){this._transformation=e&&e!==t?i(e):null}get highlights(){return this._highlights||_}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}foreachHighlightOptions(t){this._highlightOptionsCounts?.forEach((i,e)=>t(e))}allocateIdAndHighlight(t){const i=new l(t);return this.addHighlight(i)}addHighlight(t){this._ensureHighlights().add(t);const{highlightName:i}=t,e=(this._highlightOptionsCounts?.get(i)??0)+1;return this._ensureHighlightOptionsCounts().set(i,e),t}_ensureHighlights(){let t=this._highlights;return t||(t=new Set,this._highlights=t),t}_ensureHighlightOptionsCounts(){let t=this._highlightOptionsCounts;return t||(t=new Map,this._highlightOptionsCounts=t),t}removeHighlight(t){if(this._highlights?.delete(t)){const{highlightName:i}=t,e=this._highlightOptionsCounts?.get(i)??0;e<=1?this._highlightOptionsCounts?.delete(i):this._ensureHighlightOptionsCounts().set(i,e-1)}}}function p(t,i){return!(!("isClosed"in t)||!t.isClosed)&&i.indices.length>2}const _=new Set;export{m as Geometry};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{floatSubArray as t}from"../../../../geometry/support/FloatArray.js";import{newHalfFloatArray as e}from"../../../../geometry/support/HalfFloatArray.js";import{newIntArray as i,compactIndices as s}from"../../../../geometry/support/Indices.js";import{newShortArray as r}from"../../../../geometry/support/ShortArray.js";import{compressNormal as o}from"./Normals.js";class h{constructor(s,o,h,n,a,p={}){this.path=s,this.profile=o,this.extruder=h,this.startCap=n,this.endCap=a,this.options=p,this._extrusionVertexCount=0;const l=this.path.vertices.length-2;this.numExtrusionProfiles=h.numProfilesPerJoin()*l+2,this.numVerticesTotal=o.vertices.length*this.numExtrusionProfiles,this.startCap.vertexBufferStart=this.numVerticesTotal;const u=this.startCap.numVertices;this.numVerticesTotal+=u,this.endCap.vertexBufferStart=this.numVerticesTotal;const x=this.endCap.numVertices;this.numVerticesTotal+=x,this.pathVertexData=i(1*this.numVerticesTotal),this.profileRightAxes=r(2*this.numVerticesTotal),this.profileUpAxes=r(2*this.numVerticesTotal),this.profileVertexAndNormals=e(4*this.numVerticesTotal),this.profileAuxData=e(3*this.numVerticesTotal),this.positions=t(s.positions,s.offset,3*s.vertices.length),this._rebuildGeometry(),this._buildTopology()}emitVertex(t,e,i,s,r){let h=4*this._extrusionVertexCount;if(this.profileVertexAndNormals[h]=i[0],this.profileVertexAndNormals[h+1]=i[1],this.profileVertexAndNormals[h+2]=s[0],this.profileVertexAndNormals[h+3]=s[1],this.pathVertexData[this._extrusionVertexCount]=t,h=3*this._extrusionVertexCount,r){const e=this.path.vertices[t],i=e.maxStretchDistance;this.profileAuxData[h]=e.rotationRight[0]*i,this.profileAuxData[h+1]=e.rotationRight[1]*i}else this.profileAuxData[h]=this.profileAuxData[h+1]=0;this.profileAuxData[h+2]=0,o(this.profileRightAxes,this._extrusionVertexCount,e.right[0],e.right[1],e.right[2]),o(this.profileUpAxes,this._extrusionVertexCount,e.up[0],e.up[1],e.up[2]),++this._extrusionVertexCount}emitCapVertex(t,e,i,s,r,h){let n=4*this._extrusionVertexCount;this.profileVertexAndNormals[n]=i[0],this.profileVertexAndNormals[n+1]=i[1],this.profileVertexAndNormals[n+2]=s[0],this.profileVertexAndNormals[n+3]=s[1],n=3*this._extrusionVertexCount,this.profileAuxData[n]=r,this.profileAuxData[n+1]=h,this.profileAuxData[n+2]=1,o(this.profileRightAxes,this._extrusionVertexCount,e.right[0],e.right[1],e.right[2]),o(this.profileUpAxes,this._extrusionVertexCount,e.up[0],e.up[1],e.up[2]),this.pathVertexData[this._extrusionVertexCount]=t,++this._extrusionVertexCount}_rebuildGeometry(){this._extrusionVertexCount=0;const{positions:e,offset:i,vertices:s}=this.path;this.positions=t(e,i,3*s.length);let r=0;const o=(t,e,i,s,o)=>this.emitCapVertex(r,t,e,i,s,o),h=(t,e,i,s)=>this.emitVertex(r,t,e,i,s);for(this.startCap.rebuildConnectingProfileGeometry(s[r],this.profile,o),r=1;r<s.length-1;++r)this.extruder.extrude(s[r],this.profile,h);this.endCap.rebuildConnectingProfileGeometry(s[r],this.profile,o),r=0,this.startCap.rebuildCapGeometry(s[r],o),r=s.length-1,this.endCap.rebuildCapGeometry(s[r],o)}_buildTopology(){const t=this.profile.vertices.length,e=this.profile.numSegments,i=this.numExtrusionProfiles-1;let r=3*(2*(e*i));this.startCap.indexBufferStart=r,this.startCap.firstProfileVertexIndex=0,r+=this.startCap.numIndices,this.endCap.indexBufferStart=r,this.endCap.firstProfileVertexIndex=t*(this.numExtrusionProfiles-1);const o=new Array,h=new Array,n=(t,e,i)=>{o.push(t),o.push(e),o.push(i),h.push(this.pathVertexData[t]),h.push(this.pathVertexData[e]),h.push(this.pathVertexData[i])};for(let s=0;s<e;++s){const e=this.profile.indices[2*s],r=this.profile.indices[2*s+1];for(let s=0;s<i;++s){const i=s*t+e,o=(s+1)*t+r,h=s*t+r;n(i,(s+1)*t+e,o),n(i,o,h)}}this.startCap.buildTopology(this.path.vertices[0],n),this.endCap.buildTopology(this.path.vertices[this.path.vertices.length-1],n),this.vertexIndices=s(o),this.pathVertexIndices=s(h)}onPathChanged(){this._rebuildGeometry()}}export{h as PathBuilder};
2
+ import{floatSubArray as t}from"../../../../geometry/support/FloatArray.js";import{newHalfFloatArray as e}from"../../../../geometry/support/HalfFloatArray.js";import{newIndexArray as i,compactIndices as s}from"../../../../geometry/support/Indices.js";import{newShortArray as r}from"../../../../geometry/support/ShortArray.js";import{compressNormal as o}from"./Normals.js";class n{constructor(s,o,n,h,a,u={}){this.path=s,this.profile=o,this.extruder=n,this.startCap=h,this.endCap=a,this.options=u,this._extrusionVertexCount=0,this._extrusionFrameCount=0;const l=this.path.vertices.length-2;this.numExtrusionProfiles=n.numProfilesPerJoin()*l+2,this.numVerticesTotal=o.vertices.length*this.numExtrusionProfiles,this.numExtrusionFrames=n.numProfileFramesPerPathVertex()*l+4,this.startCap.vertexBufferStart=this.numVerticesTotal;const p=this.startCap.numVertices;this.numVerticesTotal+=p,this.endCap.vertexBufferStart=this.numVerticesTotal;const x=this.endCap.numVertices;this.numVerticesTotal+=x,this.profileRightAxes=r(2*this.numExtrusionFrames),this.profileUpAxes=r(2*this.numExtrusionFrames),this.framePositionIndices=i(this.numExtrusionFrames),this.profileVertexAndNormals=e(4*this.numVerticesTotal),this.profileAuxData=e(3*this.numVerticesTotal),this.vertexFrameIndices=i(this.numVerticesTotal),this.positions=t(s.positions,s.offset,3*s.vertices.length),this._rebuildGeometry(),this._buildTopology()}emitVertex(t,e,i,s,r){let o=4*this._extrusionVertexCount;if(this.profileVertexAndNormals[o]=i[0],this.profileVertexAndNormals[o+1]=i[1],this.profileVertexAndNormals[o+2]=s[0],this.profileVertexAndNormals[o+3]=s[1],o=3*this._extrusionVertexCount,r){const e=this.path.vertices[t],i=e.maxStretchDistance;this.profileAuxData[o]=e.rotationRight[0]*i,this.profileAuxData[o+1]=e.rotationRight[1]*i}else this.profileAuxData[o]=this.profileAuxData[o+1]=0;this.profileAuxData[o+2]=0,this.vertexFrameIndices[this._extrusionVertexCount]=e,++this._extrusionVertexCount}emitExtrusionFrame(t,e){return o(this.profileRightAxes,this._extrusionFrameCount,t.right[0],t.right[1],t.right[2]),o(this.profileUpAxes,this._extrusionFrameCount,t.up[0],t.up[1],t.up[2]),this.framePositionIndices[this._extrusionFrameCount]=e,this._extrusionFrameCount++}emitCapVertex(t,e,i,s,r){let o=4*this._extrusionVertexCount;this.profileVertexAndNormals[o]=e[0],this.profileVertexAndNormals[o+1]=e[1],this.profileVertexAndNormals[o+2]=i[0],this.profileVertexAndNormals[o+3]=i[1],o=3*this._extrusionVertexCount,this.profileAuxData[o]=s,this.profileAuxData[o+1]=r,this.profileAuxData[o+2]=1,this.vertexFrameIndices[this._extrusionVertexCount]=t,++this._extrusionVertexCount}_rebuildGeometry(){this._extrusionVertexCount=0,this._extrusionFrameCount=0;const{positions:e,offset:i,vertices:s}=this.path;this.positions=t(e,i,3*s.length);let r=0;const o=(t,e,i,s,r)=>this.emitCapVertex(t,e,i,s,r),n=(t,e,i,s)=>this.emitVertex(r,t,e,i,s),h=t=>this.emitExtrusionFrame(t,r);for(this.startCap.rebuildConnectingProfileGeometry(s[r],this.profile,o,h),r=1;r<s.length-1;++r)this.extruder.extrude(s[r],this.profile,n,h);this.endCap.rebuildConnectingProfileGeometry(s[r],this.profile,o,h),r=0,this.startCap.rebuildCapGeometry(s[r],o,h),r=s.length-1,this.endCap.rebuildCapGeometry(s[r],o,h)}_buildTopology(){const t=this.profile.vertices.length,e=this.profile.numSegments,i=this.numExtrusionProfiles-1;let r=3*(2*(e*i));this.startCap.indexBufferStart=r,this.startCap.firstProfileVertexIndex=0,r+=this.startCap.numIndices,this.endCap.indexBufferStart=r,this.endCap.firstProfileVertexIndex=t*(this.numExtrusionProfiles-1);const o=new Array,n=(t,e,i)=>{o.push(t),o.push(e),o.push(i)};for(let s=0;s<e;++s){const e=this.profile.indices[2*s],r=this.profile.indices[2*s+1];for(let s=0;s<i;++s){const i=s*t+e,o=(s+1)*t+r,h=s*t+r;n(i,(s+1)*t+e,o),n(i,o,h)}}this.startCap.buildTopology(this.path.vertices[0],n),this.endCap.buildTopology(this.path.vertices[this.path.vertices.length-1],n),this.vertexIndices=s(o)}onPathChanged(){this._rebuildGeometry()}}export{n as PathBuilder};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{set as e,subtract as t,scale as s,add as i,normalize as r}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";class o{rebuildConnectingProfileGeometry(e,t,s){for(let i=0;i<t.vertices.length;++i)s(e.frame,t.vertices[i],t.normals[i],0,0)}}class l extends o{constructor(){super(),this.numVertices=0,this.numIndices=0}rebuildCapGeometry(){}buildTopology(){}}class f extends o{constructor(e,t=0,s=!1){super(),this.profile=e,this.profilePlaneOffset=t,this.flip=s}get numVertices(){return this.profile.vertices.length}get numIndices(){return 3*this.profile.numSegments}rebuildConnectingProfileGeometry(e,t,s){const i=this.profilePlaneOffset;for(let r=0;r<t.vertices.length;++r)s(e.frame,t.vertices[r],t.normals[r],i,0)}rebuildCapGeometry(t,s){const i=this.profile,r=this.flip?1:-1,n=this.profilePlaneOffset,o=m;e(o,0,0);for(let e=0;e<i.vertices.length;++e)s(t.frame,i.vertices[e],o,n,r)}buildTopology(e,t){const s=this.profile,i=this.vertexBufferStart+s.indices[0];for(let r=1;r<s.numSegments;++r){const e=s.indices[2*r],n=s.indices[2*r+1],o=this.vertexBufferStart+e,l=this.vertexBufferStart+n;this.flip?t(l,o,i):t(i,o,l)}}}class h extends o{constructor(e){super(),this.flip=!1,this.sign=0,this.breakNormals=!1,this.numSegments=3,this.profile=e.profile,this.flip=e.flip,this.sign=this.flip?1:-1,this.breakNormals=e.breakNormals,this.numSegments=e.subdivisions}get numVertices(){let e=this.profile.vertices.length*(this.numSegments-1)+this.profile.poles.length;return this.breakNormals&&(e+=this.profile.vertices.length),e}get numIndices(){let e=0;const t=this.profile;e+=2*t.numSegments*(this.numSegments-1);for(let s=0;s<t.numSegments;++s){const i=t.indices[2*s],r=t.indices[2*s+1];t.poleIndices[i]===t.poleIndices[r]?e+=1:e+=2}return 3*e}rebuildCapGeometry(n,o){const l=this.profile,f=n.frame,h=.5*this.sign,p=c,a=m;e(a,0,0);for(const e of l.poles)e.normal?o(f,e.position,e.normal,h,0):o(f,e.position,a,h,this.sign);if(this.breakNormals)for(let e=0;e<l.vertices.length;++e)o(f,l.vertices[e],l.normals[e],0,0);for(let e=0;e<this.numSegments-1;++e){const n=(1-(e+1)/this.numSegments)*Math.PI*.5,c=Math.sin(n),m=Math.cos(n);for(let e=0;e<l.vertices.length;++e){const n=l.poles[l.poleIndices[e]];t(p,l.vertices[e],n.position),s(p,p,c),n.normal?(i(p,p,n.position),o(f,p,n.normal,h*m,0)):(r(a,p),s(a,a,c),i(p,p,n.position),o(f,p,a,h*m,this.sign*m))}}}buildTopology(e,t){const s=this.profile,i=this.breakNormals?this.vertexBufferStart+s.poles.length:this.firstProfileVertexIndex,r=this.breakNormals?this.vertexBufferStart+s.poles.length+s.vertices.length:this.vertexBufferStart+s.poles.length;for(let n=0;n<s.numSegments;++n){const e=s.indices[2*n],o=s.indices[2*n+1],l=this.vertexBufferStart+s.poleIndices[e],f=this.vertexBufferStart+s.poleIndices[o];let h=i+e,c=i+o;for(let i=0;i<this.numSegments-1;++i){const n=r+i*s.vertices.length+e,l=r+i*s.vertices.length+o;this.flip?(t(n,c,h),t(c,n,l)):(t(h,c,n),t(l,n,c)),h=n,c=l}this.flip?(t(l,c,h),l!==f&&t(l,f,c)):(t(h,c,l),l!==f&&t(c,f,l))}}}const c=n(),m=n();export{l as NoCapBuilder,o as PathCapBuilder,h as RoundCapBuilder,f as TriangulationCapBuilder};
2
+ import{set as e,subtract as t,scale as s,add as i,normalize as r}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";class o{rebuildConnectingProfileGeometry(e,t,s,i){const r=i(e.frame);for(let n=0;n<t.vertices.length;++n)s(r,t.vertices[n],t.normals[n],0,0)}}class l extends o{constructor(){super(),this.numVertices=0,this.numIndices=0}rebuildCapGeometry(){}buildTopology(){}}class f extends o{constructor(e,t=0,s=!1){super(),this.profile=e,this.profilePlaneOffset=t,this.flip=s}get numVertices(){return this.profile.vertices.length}get numIndices(){return 3*this.profile.numSegments}rebuildConnectingProfileGeometry(e,t,s,i){const r=this.profilePlaneOffset,n=i(e.frame);for(let o=0;o<t.vertices.length;++o)s(n,t.vertices[o],t.normals[o],r,0)}rebuildCapGeometry(t,s,i){const r=this.profile,n=this.flip?1:-1,o=this.profilePlaneOffset,l=m;e(l,0,0);const f=i(t.frame);for(let e=0;e<r.vertices.length;++e)s(f,r.vertices[e],l,o,n)}buildTopology(e,t){const s=this.profile,i=this.vertexBufferStart+s.indices[0];for(let r=1;r<s.numSegments;++r){const e=s.indices[2*r],n=s.indices[2*r+1],o=this.vertexBufferStart+e,l=this.vertexBufferStart+n;this.flip?t(l,o,i):t(i,o,l)}}}class h extends o{constructor(e){super(),this.flip=!1,this.sign=0,this.breakNormals=!1,this.numSegments=3,this.profile=e.profile,this.flip=e.flip,this.sign=this.flip?1:-1,this.breakNormals=e.breakNormals,this.numSegments=e.subdivisions}get numVertices(){let e=this.profile.vertices.length*(this.numSegments-1)+this.profile.poles.length;return this.breakNormals&&(e+=this.profile.vertices.length),e}get numIndices(){let e=0;const t=this.profile;e+=2*t.numSegments*(this.numSegments-1);for(let s=0;s<t.numSegments;++s){const i=t.indices[2*s],r=t.indices[2*s+1];t.poleIndices[i]===t.poleIndices[r]?e+=1:e+=2}return 3*e}rebuildCapGeometry(n,o,l){const f=this.profile,h=l(n.frame),p=.5*this.sign,a=c,u=m;e(u,0,0);for(const e of f.poles)e.normal?o(h,e.position,e.normal,p,0):o(h,e.position,u,p,this.sign);if(this.breakNormals)for(let e=0;e<f.vertices.length;++e)o(h,f.vertices[e],f.normals[e],0,0);for(let e=0;e<this.numSegments-1;++e){const n=(1-(e+1)/this.numSegments)*Math.PI*.5,l=Math.sin(n),c=Math.cos(n);for(let e=0;e<f.vertices.length;++e){const n=f.poles[f.poleIndices[e]];t(a,f.vertices[e],n.position),s(a,a,l),n.normal?(i(a,a,n.position),o(h,a,n.normal,p*c,0)):(r(u,a),s(u,u,l),i(a,a,n.position),o(h,a,u,p*c,this.sign*c))}}}buildTopology(e,t){const s=this.profile,i=this.breakNormals?this.vertexBufferStart+s.poles.length:this.firstProfileVertexIndex,r=this.breakNormals?this.vertexBufferStart+s.poles.length+s.vertices.length:this.vertexBufferStart+s.poles.length;for(let n=0;n<s.numSegments;++n){const e=s.indices[2*n],o=s.indices[2*n+1],l=this.vertexBufferStart+s.poleIndices[e],f=this.vertexBufferStart+s.poleIndices[o];let h=i+e,c=i+o;for(let i=0;i<this.numSegments-1;++i){const n=r+i*s.vertices.length+e,l=r+i*s.vertices.length+o;this.flip?(t(n,c,h),t(c,n,l)):(t(h,c,n),t(l,n,c)),h=n,c=l}this.flip?(t(l,c,h),l!==f&&t(l,f,c)):(t(h,c,l),l!==f&&t(c,f,l))}}}const c=n(),m=n();export{l as NoCapBuilder,o as PathCapBuilder,h as RoundCapBuilder,f as TriangulationCapBuilder};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{fromRotation as t}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{dot as e}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{transformMat4 as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";class n{}class c{numProfilesPerJoin(){return 1}extrude(t,r,e){for(let i=0;i<r.vertices.length;++i)e(t.frame,r.vertices[i],r.normals[i],!1)}}class l{constructor(t,r){this.cutoffAngle=t,this.numBendSubdivisions=r}numProfilesPerJoin(){return this.numBendSubdivisions+1}extrude(r,i,s){const o=h,{rotationAngle:n,rotationRight:c,frame:l}=r;if(Math.abs(n)>=this.cutoffAngle){const m=r.rotationFrameUp;for(let h=0;h<this.numBendSubdivisions+1;++h){t(u,.5*-n+h*n/this.numBendSubdivisions,m),a(o,l,u);for(let t=0;t<i.vertices.length;++t){if(e(i.vertices[t],c)*n>=0)s(o,i.vertices[t],i.normals[t],!1);else{s(l,r.applyMiterStretch(f,i.vertices[t]),i.normals[t],!0)}}}}else for(let t=0;t<this.numBendSubdivisions+1;++t)for(let o=0;o<i.vertices.length;++o){const t=e(i.vertices[o],c)*n>=0;s(l,r.applyMiterStretch(f,i.vertices[o]),i.normals[o],!t)}}}class m{constructor(){this.up=o(),this.right=o()}}function a(t,r,e){s(t.up,r.up,e),s(t.right,r.right,e)}const f=i(),u=r(),h=new m;export{m as Frame2D,l as MiterExtruder,n as PathExtruder,c as SimpleExtruder};
2
+ import{fromRotation as t}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{dot as r}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{transformMat4 as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";class n{}class m{numProfilesPerJoin(){return 1}numProfileFramesPerPathVertex(){return 1}extrude(t,e,r,i){const s=i(t.frame);for(let o=0;o<e.vertices.length;++o)r(s,e.vertices[o],e.normals[o],!1)}}class c{constructor(t,e){this.cutoffAngle=t,this.numBendSubdivisions=e}numProfilesPerJoin(){return this.numBendSubdivisions+1}numProfileFramesPerPathVertex(){return this.numBendSubdivisions+2}extrude(e,i,s,o){const n=h,{rotationAngle:m,rotationRight:c,frame:a}=e,v=o(a),d=new Array,g=e.rotationFrameUp;for(let r=0;r<this.numBendSubdivisions+1;++r)t(f,.5*-m+r*m/this.numBendSubdivisions,g),l(n,a,f),d.push(o(n));if(Math.abs(m)>=this.cutoffAngle)for(let t=0;t<this.numBendSubdivisions+1;++t){const o=d[t];for(let t=0;t<i.vertices.length;++t){if(r(i.vertices[t],c)*m>=0)s(o,i.vertices[t],i.normals[t],!1);else{s(v,e.applyMiterStretch(u,i.vertices[t]),i.normals[t],!0)}}}else for(let t=0;t<this.numBendSubdivisions+1;++t)for(let o=0;o<i.vertices.length;++o){const t=r(i.vertices[o],c)*m>=0;s(v,e.applyMiterStretch(u,i.vertices[o]),i.normals[o],!t)}}}class a{constructor(){this.up=o(),this.right=o()}}function l(t,e,r){s(t.up,e.up,r),s(t.right,e.right,r)}const u=i(),f=e(),h=new a;export{a as Frame2D,c as MiterExtruder,n as PathExtruder,m as SimpleExtruder};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{Geometry as t}from"./Geometry.js";class e extends t{constructor(t,e,r,s,i,n){super(t,e,null,0,n),this.path=r,this.geometrySR=s,this.stencilWidth=i}}function r(t){return"path"in t}export{e as PathGeometry,r as isPathGeometry};
2
+ import{Geometry as t}from"./Geometry.js";class e extends t{constructor(t,e,i,s,n,r){super(t,e,null,0,r),this.path=i,this.geometrySR=s,this.stencilWidth=n}_computePrimitivePositionIndices(){const t=this.attributes.get("textureElementIndex"),e=this.attributes.get("position");if(t&&e){const i=e.indices,s=t.indices,n=t.data;return s.map(t=>i[n[t]])}return e?.indices??null}}function i(t){return"path"in t}export{e as PathGeometry,i as isPathGeometry};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{copy as t,set as e,length as i,normalize as s,dot as r,scale as o,add as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{cross as l,set as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as p}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as m}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{newFloatArray as u}from"../../../../geometry/support/FloatArray.js";import{newHalfFloatArray as f}from"../../../../geometry/support/HalfFloatArray.js";import{getZeroIndexArray as b}from"../../../../geometry/support/Indices.js";import{Attribute as d,Vertices as g}from"./Attribute.js";import{decompressNormal as v,compressNormal as x}from"./Normals.js";import{intersectTriangles as A}from"./RayIntersections.js";class w{constructor(t){this.builder=t}onPathChanged(t){this.builder.onPathChanged()}}class y extends w{constructor(t){super(t),this.color=m(255,255,255,255),this._size=n(),this.positions=u(3*this.builder.numVerticesTotal),this.normals=new Int16Array(2*this.builder.numVerticesTotal)}bakeVertexColors(t){p(this.color,t)}bake(n){t(this._size,n);const{numVerticesTotal:c,pathVertexData:p,positions:m,profileRightAxes:u,profileUpAxes:f,profileVertexAndNormals:b,profileAuxData:d}=this.builder;for(let t=0;t<c;++t){let c=p[t];c*=3;const g=_;let A=0,w=0;const y=v(I,u,t),j=v(D,f,t),P=4*t,F=e(V,b[P]*n[0],b[P+1]*n[1]),k=3*t;if(1===d[k+2])l(g,j,y),A=d[k]*n[0],w=d[k+1];else{const t=C,n=z;e(t,d[k],d[k+1]);const l=i(t);s(t,t);const c=r(F,t);if(Math.abs(c)>l){e(n,-t[1],t[0]);const i=r(F,n);o(t,t,l*Math.sign(c)),o(n,n,i),a(F,t,n)}h(g,0,0,0)}const N=y[0]*F[0]+j[0]*F[1],R=y[1]*F[0]+j[1]*F[1],M=y[2]*F[0]+j[2]*F[1];this.positions[k]=m[c]+N+g[0]*A,this.positions[k+1]=m[c+1]+R+g[1]*A,this.positions[k+2]=m[c+2]+M+g[2]*A;const T=b[P+2],U=b[P+3];x(this.normals,t,y[0]*T+j[0]*U+g[0]*w,y[1]*T+j[1]*U+g[1]*w,y[2]*T+j[2]*U+g[2]*w)}}createGeometryData(){const t=this.builder.vertexIndices;return[["position",new d(this.positions,t,3,!0)],["normalCompressed",new d(this.normals,t,2,!0)],["color",new d(this.color,b(t.length),4,!0)]]}onPathChanged(t){super.onPathChanged(t),this.bake(this.size)}intersect(t,e,i,s){const r=this.builder.vertexIndices,o=new g(this.positions,3),a=r.length/3;A(t,e,0,a,r,o,void 0,i,s)}get size(){return this._size}}class j extends w{constructor(t,e,i,s){super(t),this.sizeAttributeValue=e,this.colorAttributeValue=i,this.opacityAttributeValue=s,this.baked=new y(t),this._vvSize=u(this.builder.path.vertices.length).fill(e),this._vvColor=f(this.builder.path.vertices.length).fill(i),this._vvOpacity=f(this.builder.path.vertices.length).fill(s)}createGeometryData(){const t=this.builder,{pathVertexIndices:e,vertexIndices:i}=t;return[["position",new d(t.positions,e,3,!0)],["profileVertexAndNormal",new d(t.profileVertexAndNormals,i,4,!0)],["profileAuxData",new d(t.profileAuxData,i,3,!0)],["profileRight",new d(t.profileRightAxes,i,2,!0)],["profileUp",new d(t.profileUpAxes,i,2,!0)],["sizeFeatureAttribute",new d(this._vvSize,e,1,!0)],["colorFeatureAttribute",new d(this._vvColor,e,1,!0)],["opacityFeatureAttribute",new d(this._vvOpacity,e,1,!0)]]}onPathChanged(t){super.onPathChanged(t);const e=t.getMutableAttribute("position");e&&(e.data=this.builder.positions)}}const V=n(),C=n(),z=n(),_=c(),I=c(),D=c();export{j as FastUpdatePathGeometry,w as PathGeometryData,y as StaticPathGeometry};
2
+ import{copy as t,set as e,length as i,normalize as s,dot as o,scale as r,add as n}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{cross as l,set as c}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as m}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as p}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{newFloatArray as u}from"../../../../geometry/support/FloatArray.js";import{getContinuousIndexArray as f,getZeroIndexArray as d}from"../../../../geometry/support/Indices.js";import{Attribute as b,Vertices as x}from"./Attribute.js";import{decompressNormal as v,compressNormal as g}from"./Normals.js";import{intersectTriangles as A}from"./RayIntersections.js";class w{constructor(t){this.builder=t}onPathChanged(t){this.builder.onPathChanged()}}class y extends w{constructor(t){super(t),this.color=p(255,255,255,255),this._size=a(),this.positions=u(3*this.builder.numVerticesTotal),this.normals=new Int16Array(2*this.builder.numVerticesTotal)}bakeVertexColors(t){m(this.color,t)}bake(a){t(this._size,a);const{numVerticesTotal:h,positions:m,profileRightAxes:p,profileUpAxes:u,profileVertexAndNormals:f,profileAuxData:d,vertexFrameIndices:b,framePositionIndices:x}=this.builder;for(let t=0;t<h;++t){const h=z;let A=0,w=0;const y=b[t],j=v(_,p,y),F=v(P,u,y),D=3*x[y],k=4*t,N=e(I,f[k]*a[0],f[k+1]*a[1]),R=3*t;if(1===d[R+2])l(h,F,j),A=d[R]*a[0],w=d[R+1];else{const t=C,a=V;e(t,d[R],d[R+1]);const l=i(t);s(t,t);const m=o(N,t);if(Math.abs(m)>l){e(a,-t[1],t[0]);const i=o(N,a);r(t,t,l*Math.sign(m)),r(a,a,i),n(N,t,a)}c(h,0,0,0)}const M=j[0]*N[0]+F[0]*N[1],T=j[1]*N[0]+F[1]*N[1],U=j[2]*N[0]+F[2]*N[1];this.positions[R]=m[D]+M+h[0]*A,this.positions[R+1]=m[D+1]+T+h[1]*A,this.positions[R+2]=m[D+2]+U+h[2]*A;const E=f[k+2],G=f[k+3];g(this.normals,t,j[0]*E+F[0]*G+h[0]*w,j[1]*E+F[1]*G+h[1]*w,j[2]*E+F[2]*G+h[2]*w)}}createGeometryData(){const t=this.builder.vertexIndices;return[["position",new b(this.positions,t,3,!0)],["normalCompressed",new b(this.normals,t,2,!0)],["color",new b(this.color,d(t.length),4,!0)]]}onPathChanged(t){super.onPathChanged(t),this.bake(this.size)}intersect(t,e,i,s){const o=this.builder.vertexIndices,r=new x(this.positions,3),n=o.length/3;A(t,e,0,n,o,r,void 0,i,s)}get size(){return this._size}}class j extends w{constructor(t,e,i,s){super(t),this.sizeAttributeValue=e,this.colorAttributeValue=i,this.opacityAttributeValue=s,this.baked=new y(t),this._vvSize=e,this._vvColor=i,this._vvOpacity=s}createGeometryData(){const t=this.builder,{vertexIndices:e,framePositionIndices:i,numExtrusionFrames:s}=t,o=f(s),r=d(s);return[["position",new b(t.positions,i,3,!0)],["profileRight",new b(t.profileRightAxes,o,2,!0)],["profileUp",new b(t.profileUpAxes,o,2,!0)],["sizeFeatureAttribute",new b([this._vvSize],r,1,!0)],["colorFeatureAttribute",new b([this._vvColor],r,1,!0)],["opacityFeatureAttribute",new b([this._vvOpacity],r,1,!0)],["textureElementIndex",new b(t.vertexFrameIndices,e,1,!0)],["profileVertexAndNormal",new b(t.profileVertexAndNormals,e,4,!0)],["profileAuxData",new b(t.profileAuxData,e,3,!0)]]}onPathChanged(t){super.onPathChanged(t);const e=t.getMutableAttribute("position");e&&(e.data=this.builder.positions)}}const I=a(),C=a(),V=a(),z=h(),_=h(),P=h();export{j as FastUpdatePathGeometry,w as PathGeometryData,y as StaticPathGeometry};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{sliceEquals as i}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{smoothstep as r}from"../../../../core/mathUtils.js";import{releaseMaybe as s,disposeMaybe as a}from"../../../../core/maybe.js";import{watch as o,sync as n}from"../../../../core/reactiveUtils.js";import{signal as h}from"../../../../core/signal.js";import{property as c,subclass as u}from"../../../../core/accessorSupport/decorators.js";import{copy as l,equals as m}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ReadShadowMapPassParameters as d}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{a as p}from"../../../../chunks/FocusAreaMask.glsl.js";import{volumeToVao as f}from"../effects/focusArea/focusAreaMaskUtils.js";import{BindParameters as g}from"./BindParameters.js";import{DepthRange as b}from"./DepthRange.js";import{createQuadVAO as v}from"./glUtil3D.js";import{ShadowCastRenderer as y,shadowCastDisabledElevationThreshold as S,shadowCastDisableElevationMax as w,shadowCastDisableElevationMin as A}from"./ShadowCastRenderer.js";import{ShadowMap as F}from"./ShadowMap.js";import{a as C}from"../../../../chunks/ShadowCastAccumulate.glsl.js";import{ShadowCastAccumulateTechnique as R}from"../shaders/ShadowCastAccumulateTechnique.js";import{ShadowCastAccumulateTechniqueConfiguration as x}from"../shaders/ShadowCastAccumulateTechniqueConfiguration.js";import{ShadowCastClearTechnique as P}from"../shaders/ShadowCastClearTechnique.js";import{ShadowCastMaskTechnique as q}from"../shaders/ShadowCastMaskTechnique.js";import{TaskPriority as j}from"../../../support/Scheduler.js";import{PrimitiveType as H,DepthStencilAttachment as V,PixelType as T}from"../../../webgl/enums.js";import{DisposableFramebufferObject as D}from"../../../webgl/FramebufferObject.js";import{noParameters as M}from"../../../webgl/NoParameters.js";let E=class extends t{constructor(e,t,i,r,a,h){super({}),this._fbos=e,this._techniques=t,this._stage=i,this._prepareForShadowMapPass=r,this._renderToShadowMap=a,this._requestRender=h,this._analysisVolumeGeometry=null,this._primarySet=new U(new x(0),()=>this._requestRenderIfEnabled()),this._contextSet=new U(new x(1),()=>this._requestRenderIfEnabled()),this._passParameters=new d,this._maskParameters=new p,this._volumeVao=null,this._volumeVertexCount=0,this._depthRange=b.Zero,this._enabled=!1,this._previewing=!1,this._shadowAccumulatorKey=Symbol("shadowAccumulator"),this._bindParameters=new g(e.rctx,new F(e,i.viewingMode)),this._bindParameters.shadowMap.enabled=!0,this._vao=v(e.rctx),this._accumulationRenderer=new y(e,t,this,h),this._tmpReadFbo=new D(e.rctx);const c=this._stage.view.resourceController.scheduler;this.addHandles([c.registerTask(j.SHADOW_ACCUMULATOR,this),o(()=>this._previewing,e=>{e?this._invalidateAccumulationSets():this._requestRenderIfEnabled()},n),o(()=>this._numActive,()=>this._numActiveChanged(),n),o(()=>this._depthRange,()=>this._invalidateAccumulationSets(),n),o(()=>this.readyToRun,e=>{e||(this._bindParameters.depth=s(this._bindParameters.depth),this.notifyChange("canAccumulate"))})],this._shadowAccumulatorKey)}destroy(){this._disable(),this.removeHandles(this._shadowAccumulatorKey),this._accumulationRenderer=a(this._accumulationRenderer),this._fboHandle=a(this._fboHandle),this._vao=a(this._vao),this._volumeVao=a(this._volumeVao),this._tmpReadFbo=a(this._tmpReadFbo),this._bindParameters.destroy();for(const e of this._accumulationSets())e.destroy();this._contextSet=null,this._primarySet=null}*_accumulationSets(){yield this._primarySet,yield this._contextSet}get computedSamples(){return[this._primarySet.progress,this._contextSet.progress]}get shadowCastTexture(){return this._fboHandle?.getTexture()}get accumulating(){return this.active&&this._previewing||this._refining}get _refining(){return this.active&&!this._doneAccumulating&&!this._previewing}get active(){return this._enabled&&[...this._accumulationSets()].some(e=>e.active)}get canAccumulate(){return null!=this._bindParameters.depth&&this._depthRange!==b.Zero&&this._opacityFromElevation>S}get _doneAccumulating(){return[...this._accumulationSets()].every(e=>e.doneAccumulating)}get _opacityFromElevation(){return this._accumulationRenderer.opacityFromElevation}set _opacityFromElevation(e){this._accumulationRenderer.opacityFromElevation=e}get _numActive(){return[...this._accumulationSets()].reduce((e,t)=>e+(t.active?1:0),0)}get _colorFormat(){return 2===this._numActive?2:0}get readyToRun(){return this._refining&&this.canAccumulate&&[...this._accumulationSets()].some(e=>e.running)}get _analysisVolume(){return this._analysisVolumeGeometry}set _analysisVolume(e){if(this._analysisVolumeGeometry===e)return;this._invalidateAccumulationSets(),this._analysisVolumeGeometry=e,this._volumeVao=a(this._volumeVao),this._volumeVertexCount=0;const t=null!=e;for(const a of this._accumulationSets())a.configuration.useMask=t;if(!t)return;const i=e.geometryVolume,{vao:r,vertexCount:s}=f(this._rctx,i);this._volumeVao=r,this._volumeVertexCount=s}runTask(e){this._clearBuffersOnAccumulationStart(),this._prepareForShadowMapPass(this._bindParameters);let t=!1;for(const i of this._accumulationSets())this._runTaskForSet(i,e)&&(t=!0);t&&this._requestRender()}_runTaskForSet(e,t){let i=!1;for(;!t.done&&!e.doneAccumulating;)this._accumulateShadow(e),t.madeProgress(),i=!0;return i}renderAccumulation(e,t){return this._updateCamera(e.camera),this._bindParameters.contentCamera=e.contentCamera,e.depth?.retain(),this._bindParameters.depth?.release(),this._bindParameters.depth=e.depth,this._passParameters.origin=this._bindParameters.camera.center,this.notifyChange("canAccumulate"),!(!this.accumulating||!this.canAccumulate)&&(this._previewing||t?(this._clearFramebuffer(),this._reset()):this._clearBuffersOnAccumulationStart(),this._renderAreaMask(),this._accumulateSetsForRenderFrame(t))}_renderAreaMask(){const e=this._techniques.getCompiled(q),t=this._volumeVao,i=this._volumeVertexCount,r=this._fboHandle,s=this._analysisVolume;if(r?.detachDepth(),!e||!t||i<1||!r||!s)return;r.acquireDepth(14);const a=this._rctx,o=this._bindParameters,n=o.depth,h=this._tmpReadFbo;h.attachDepthStencil(n?.attachment),a.blitFramebuffer(h,r.fbo,256),h.detachDepthStencilTexture(),a.bindFramebuffer(r.fbo),a.setClearStencil(0),a.clear(1024),a.setViewport(0,0,o.camera.width,o.camera.height);const c=a.bindTechnique(e,o,M);this._maskParameters.origin=s.origin,c.bindDraw(o,M,this._maskParameters),a.bindVAO(t),a.drawArrays(H.TRIANGLES,0,i)}_clearBuffersOnAccumulationStart(){if([...this._accumulationSets()].every(e=>0===e.progress))this._clearFramebuffer();else for(const e of this._accumulationSets())0===e.progress&&this._clearFramebufferForSet(this._fboHandle,e)}_accumulateSetsForRenderFrame(e){let t=!1;for(const i of this._accumulationSets())this._accumulateSetForRenderFrame(i,e)&&(t=!0);return t&&this._requestRender(),t}_accumulateSetForRenderFrame(e,t){let i=t?e.sampleCount:Math.min(k,e.sampleCount);i-=e.progress;for(let r=0;r<i;++r)this._accumulateShadow(e);return i>0}precompilePrepass(){if(this.accumulating){for(const e of this._accumulationSets())this._techniques.precompile(R,e.configuration),this._techniques.precompile(P,e.configuration);this._techniques.precompile(q)}}precompile(){this._accumulationRenderer.precompile()}render(e){const t=this._fboHandle?.getAttachment(V);this._accumulationRenderer.render(e,t)}setParameters(e){void 0!==e.previewing&&(this._previewing=e.previewing),void 0!==e.lightDirections&&(this._primarySet.lightDirections=e.lightDirections),void 0!==e.lightDirectionsContext&&(this._contextSet.lightDirections=e.lightDirectionsContext),!0===e.enabled?this._enable():!1===e.enabled&&this._disable(),void 0!==e.analysisVolume&&(this._analysisVolume=e.analysisVolume),this._accumulationRenderer.setOptions(e)}readAccumulatedShadow(e,t){const i=this._primarySet.progress;return!this.active||!this._fboHandle||i<1||e<0||e>=this._fboHandle.fbo.width||t<0||t>=this._fboHandle.fbo.height?0:(this._fboHandle.fbo.readPixels(e,t,1,1,6408,T.UNSIGNED_BYTE,O),O[0]/i)}_numActiveChanged(){if(!this._enabled||!this._fboHandle)return;const e=2===this._numActive,{width:t,height:i}=this._fboHandle.fbo,r=this._createFBO(t,i);e&&(this._clearFramebuffer(r),this._contextSet.reset()),this._rctx.blitFramebuffer(this._fboHandle.fbo,r.fbo),this._fboHandle.dispose(),this._fboHandle=r,this._requestRender()}_enable(){this._enabled||(this._enabled=!0,this._invalidateAccumulationSets())}_disable(){this._enabled&&(this._fboHandle=a(this._fboHandle),this._enabled=!1,this._requestRender())}_createFBO(e,t){return this._fbos.acquire(e,t,"shadow accumulation",this._colorFormat)}_invalidateAccumulationSets(){for(const e of this._accumulationSets())e.reset();this._requestRenderIfEnabled()}_reset(){for(const e of this._accumulationSets())e.reset()}_clearFramebuffer(e=this._fboHandle){e&&(this._rctx.bindFramebuffer(e.fbo),this._rctx.setClearColor(0,0,0,0),this._rctx.clear(16384))}_clearFramebufferForSet(e,t){if(!e)return;const i=this._techniques.get(P,t.configuration);this._rctx.bindFramebuffer(e.fbo),this._rctx.bindTechnique(i,this._bindParameters,this._passParameters),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(i.primitiveType,0,this._vao.vertexCount("geometry"))}_accumulateShadow(e){this._renderToShadowMap(this._bindParameters,e.lightDirections[e.progress++],this._depthRange);const t=this._techniques.get(R,e.configuration);this._rctx.bindFramebuffer(this._fboHandle?.fbo),this._rctx.bindTechnique(t,this._bindParameters,this._passParameters),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(t.primitiveType,0,this._vao.vertexCount("geometry"))}_updateCamera(e){if(!this._enabled)return;const t=this._bindParameters.camera;e.equals(t)||t.copyFrom(e),this._fboHandle?.fbo.width===e.fullWidth&&this._fboHandle?.fbo.height===e.fullHeight||(this._fboHandle?.release(),this._fboHandle=this._createFBO(e.fullWidth,e.fullHeight)),this._opacityFromElevation=1-r(A,w,e.relativeElevation)}_requestRenderIfEnabled(){this._enabled&&this._requestRender()}get _rctx(){return this._fbos.rctx}updateDepthRange(e){this._depthRange.equals(e)||(this._depthRange=e)}get test(){}};e([c()],E.prototype,"_refining",null),e([c()],E.prototype,"active",null),e([c()],E.prototype,"canAccumulate",null),e([c()],E.prototype,"_doneAccumulating",null),e([c()],E.prototype,"_opacityFromElevation",null),e([c()],E.prototype,"_numActive",null),e([c()],E.prototype,"_colorFormat",null),e([c()],E.prototype,"readyToRun",null),e([c()],E.prototype,"_depthRange",void 0),e([c()],E.prototype,"_enabled",void 0),e([c()],E.prototype,"_previewing",void 0),e([c()],E.prototype,"_accumulationRenderer",void 0),E=e([u("esri.views.3d.webgl-engine.lib.ShadowAccumulator")],E);const k=6,O=new Uint8Array(4);class U{constructor(e,t){this.configuration=e,this._notifyChange=t,this._cachedLightDirections=[],this._progress=h(0),this._sampleCount=h(0)}get progress(){return this._progress.value}set progress(e){this._progress.value=e}get sampleCount(){return this._sampleCount.value}get doneAccumulating(){return this.progress>=this.sampleCount}get running(){return this.progress>0}get active(){return this.sampleCount>0}get lightDirections(){return this._cachedLightDirections}set lightDirections(e){const t=this._cachedLightDirections,r=Math.min(C,e.length);if(!i(t,0,t.length,e,0,r,m)){t.length=r,this._sampleCount.value=r;for(let i=0;i<r;++i)t[i]=l(t[i]??_(),e[i]);this.reset(),this._notifyChange()}}destroy(){this._cachedLightDirections.length=0,this._sampleCount.value=0}reset(){this.progress=0}precompile(e){e.precompile(R,this.configuration),e.precompile(P,this.configuration)}}export{E as ShadowAccumulator};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{sliceEquals as i}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{smoothstep as r}from"../../../../core/mathUtils.js";import{releaseMaybe as s,disposeMaybe as a}from"../../../../core/maybe.js";import{watch as o,sync as n}from"../../../../core/reactiveUtils.js";import{signal as h}from"../../../../core/signal.js";import{property as c,subclass as u}from"../../../../core/accessorSupport/decorators.js";import{copy as l,equals as m}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ReadShadowMapPassParameters as d}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{a as p}from"../../../../chunks/FocusAreaMask.glsl.js";import{volumeToVao as f}from"../effects/focusArea/focusAreaMaskUtils.js";import{BindParameters as g}from"./BindParameters.js";import{DepthRange as b}from"./DepthRange.js";import{createQuadVAO as v}from"./glUtil3D.js";import{ShadowCastRenderer as y,shadowCastDisabledElevationThreshold as S,shadowCastDisableElevationMax as w,shadowCastDisableElevationMin as A}from"./ShadowCastRenderer.js";import{ShadowMap as F}from"./ShadowMap.js";import{a as C}from"../../../../chunks/ShadowCastAccumulate.glsl.js";import{ShadowCastAccumulateTechnique as R}from"../shaders/ShadowCastAccumulateTechnique.js";import{ShadowCastAccumulateTechniqueConfiguration as x}from"../shaders/ShadowCastAccumulateTechniqueConfiguration.js";import{ShadowCastClearTechnique as P}from"../shaders/ShadowCastClearTechnique.js";import{ShadowCastMaskTechnique as q}from"../shaders/ShadowCastMaskTechnique.js";import{TaskPriority as j}from"../../../support/Scheduler.js";import{PrimitiveType as H,DepthStencilAttachment as V,PixelType as T}from"../../../webgl/enums.js";import{DisposableFramebufferObject as D}from"../../../webgl/FramebufferObject.js";import{noParameters as M}from"../../../webgl/NoParameters.js";let E=class extends t{constructor(e,t,i,r,a,h){super({}),this._fbos=e,this._techniques=t,this._stage=i,this._prepareForShadowMapPass=r,this._renderToShadowMap=a,this._requestRender=h,this._analysisVolumeGeometry=null,this._primarySet=new U(new x(0),()=>this._requestRenderIfEnabled()),this._contextSet=new U(new x(1),()=>this._requestRenderIfEnabled()),this._passParameters=new d,this._maskParameters=new p,this._volumeVao=null,this._volumeVertexCount=0,this._depthRange=b.Zero,this._enabled=!1,this._previewing=!1,this._shadowAccumulatorKey=Symbol("shadowAccumulator"),this._bindParameters=new g(e.rctx,new F(e,i.viewingMode)),this._bindParameters.shadowMap.enabled=!0,this._vao=v(e.rctx),this._accumulationRenderer=new y(e,t,this,h),this._tmpReadFbo=new D(e.rctx);const c=this._stage.view.resourceController.scheduler;this.addHandles([c.registerTask(j.SHADOW_ACCUMULATOR,this),o(()=>this._previewing,e=>{e?this._invalidateAccumulationSets():this._requestRenderIfEnabled()},n),o(()=>this._numActive,()=>this._numActiveChanged(),n),o(()=>this.readyToRun,e=>{e||(this._bindParameters.depth=s(this._bindParameters.depth),this.notifyChange("canAccumulate"))})],this._shadowAccumulatorKey)}destroy(){this._disable(),this.removeHandles(this._shadowAccumulatorKey),this._accumulationRenderer=a(this._accumulationRenderer),this._fboHandle=a(this._fboHandle),this._vao=a(this._vao),this._volumeVao=a(this._volumeVao),this._tmpReadFbo=a(this._tmpReadFbo),this._bindParameters.destroy();for(const e of this._accumulationSets())e.destroy();this._contextSet=null,this._primarySet=null}*_accumulationSets(){yield this._primarySet,yield this._contextSet}get computedSamples(){return[this._primarySet.progress,this._contextSet.progress]}get shadowCastTexture(){return this._fboHandle?.getTexture()}get accumulating(){return this.active&&this._previewing||this._refining}get _refining(){return this.active&&!this._doneAccumulating&&!this._previewing}get active(){return this._enabled&&[...this._accumulationSets()].some(e=>e.active)}get canAccumulate(){return null!=this._bindParameters.depth&&this._depthRange!==b.Zero&&this._opacityFromElevation>S}get _doneAccumulating(){return[...this._accumulationSets()].every(e=>e.doneAccumulating)}get _opacityFromElevation(){return this._accumulationRenderer.opacityFromElevation}set _opacityFromElevation(e){this._accumulationRenderer.opacityFromElevation=e}get _numActive(){return[...this._accumulationSets()].reduce((e,t)=>e+(t.active?1:0),0)}get _colorFormat(){return 2===this._numActive?2:0}get readyToRun(){return this._refining&&this.canAccumulate&&[...this._accumulationSets()].some(e=>e.running)}get _analysisVolume(){return this._analysisVolumeGeometry}set _analysisVolume(e){if(this._analysisVolumeGeometry===e)return;this._invalidateAccumulationSets(),this._analysisVolumeGeometry=e,this._volumeVao=a(this._volumeVao),this._volumeVertexCount=0;const t=null!=e;for(const a of this._accumulationSets())a.configuration.useMask=t;if(!t)return;const i=e.geometryVolume,{vao:r,vertexCount:s}=f(this._rctx,i);this._volumeVao=r,this._volumeVertexCount=s}runTask(e){this._clearBuffersOnAccumulationStart(),this._prepareForShadowMapPass(this._bindParameters);let t=!1;for(const i of this._accumulationSets())this._runTaskForSet(i,e)&&(t=!0);t&&this._requestRender()}_runTaskForSet(e,t){let i=!1;for(;!t.done&&!e.doneAccumulating;)this._accumulateShadow(e),t.madeProgress(),i=!0;return i}renderAccumulation(e,t){return this._updateCamera(e.camera),this._bindParameters.contentCamera=e.contentCamera,e.depth?.retain(),this._bindParameters.depth?.release(),this._bindParameters.depth=e.depth,this._passParameters.origin=this._bindParameters.camera.center,this.notifyChange("canAccumulate"),!(!this.accumulating||!this.canAccumulate)&&(this._previewing||t?(this._clearFramebuffer(),this._reset()):this._clearBuffersOnAccumulationStart(),this._renderAreaMask(),this._accumulateSetsForRenderFrame(t))}_renderAreaMask(){const e=this._techniques.getCompiled(q),t=this._volumeVao,i=this._volumeVertexCount,r=this._fboHandle,s=this._analysisVolume;if(r?.detachDepth(),!e||!t||i<1||!r||!s)return;r.acquireDepth(14);const a=this._rctx,o=this._bindParameters,n=o.depth,h=this._tmpReadFbo;h.attachDepthStencil(n?.attachment),a.blitFramebuffer(h,r.fbo,256),h.detachDepthStencilTexture(),a.bindFramebuffer(r.fbo),a.setClearStencil(0),a.clear(1024),a.setViewport(0,0,o.camera.width,o.camera.height);const c=a.bindTechnique(e,o,M);this._maskParameters.origin=s.origin,c.bindDraw(o,M,this._maskParameters),a.bindVAO(t),a.drawArrays(H.TRIANGLES,0,i)}_clearBuffersOnAccumulationStart(){if([...this._accumulationSets()].every(e=>0===e.progress))this._clearFramebuffer();else for(const e of this._accumulationSets())0===e.progress&&this._clearFramebufferForSet(this._fboHandle,e)}_accumulateSetsForRenderFrame(e){let t=!1;for(const i of this._accumulationSets())this._accumulateSetForRenderFrame(i,e)&&(t=!0);return t&&this._requestRender(),t}_accumulateSetForRenderFrame(e,t){let i=t?e.sampleCount:Math.min(k,e.sampleCount);i-=e.progress;for(let r=0;r<i;++r)this._accumulateShadow(e);return i>0}precompilePrepass(){if(this.accumulating){for(const e of this._accumulationSets())this._techniques.precompile(R,e.configuration),this._techniques.precompile(P,e.configuration);this._techniques.precompile(q)}}precompile(){this._accumulationRenderer.precompile()}render(e){const t=this._fboHandle?.getAttachment(V);this._accumulationRenderer.render(e,t)}setParameters(e){void 0!==e.previewing&&(this._previewing=e.previewing),void 0!==e.lightDirections&&(this._primarySet.lightDirections=e.lightDirections),void 0!==e.lightDirectionsContext&&(this._contextSet.lightDirections=e.lightDirectionsContext),!0===e.enabled?this._enable():!1===e.enabled&&this._disable(),void 0!==e.analysisVolume&&(this._analysisVolume=e.analysisVolume),this._accumulationRenderer.setOptions(e)}readAccumulatedShadow(e,t){const i=this._primarySet.progress;return!this.active||!this._fboHandle||i<1||e<0||e>=this._fboHandle.fbo.width||t<0||t>=this._fboHandle.fbo.height?0:(this._fboHandle.fbo.readPixels(e,t,1,1,6408,T.UNSIGNED_BYTE,O),O[0]/i)}_numActiveChanged(){if(!this._enabled||!this._fboHandle)return;const e=2===this._numActive,{width:t,height:i}=this._fboHandle.fbo,r=this._createFBO(t,i);e&&(this._clearFramebuffer(r),this._contextSet.reset()),this._rctx.blitFramebuffer(this._fboHandle.fbo,r.fbo),this._fboHandle.dispose(),this._fboHandle=r,this._requestRender()}_enable(){this._enabled||(this._enabled=!0,this._invalidateAccumulationSets())}_disable(){this._enabled&&(this._fboHandle=a(this._fboHandle),this._enabled=!1,this._requestRender())}_createFBO(e,t){return this._fbos.acquire(e,t,"shadow accumulation",this._colorFormat)}_invalidateAccumulationSets(){for(const e of this._accumulationSets())e.reset();this._requestRenderIfEnabled()}_reset(){for(const e of this._accumulationSets())e.reset()}_clearFramebuffer(e=this._fboHandle){e&&(this._rctx.bindFramebuffer(e.fbo),this._rctx.setClearColor(0,0,0,0),this._rctx.clear(16384))}_clearFramebufferForSet(e,t){if(!e)return;const i=this._techniques.get(P,t.configuration);this._rctx.bindFramebuffer(e.fbo),this._rctx.bindTechnique(i,this._bindParameters,this._passParameters),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(i.primitiveType,0,this._vao.vertexCount("geometry"))}_accumulateShadow(e){this._renderToShadowMap(this._bindParameters,e.lightDirections[e.progress++],this._depthRange);const t=this._techniques.get(R,e.configuration);this._rctx.bindFramebuffer(this._fboHandle?.fbo),this._rctx.bindTechnique(t,this._bindParameters,this._passParameters),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(t.primitiveType,0,this._vao.vertexCount("geometry"))}_updateCamera(e){if(!this._enabled)return;const t=this._bindParameters.camera;e.equals(t)||t.copyFrom(e),this._fboHandle?.fbo.width===e.fullWidth&&this._fboHandle?.fbo.height===e.fullHeight||(this._fboHandle?.release(),this._fboHandle=this._createFBO(e.fullWidth,e.fullHeight)),this._opacityFromElevation=1-r(A,w,e.relativeElevation)}_requestRenderIfEnabled(){this._enabled&&this._requestRender()}get _rctx(){return this._fbos.rctx}updateDepthRange(e){this._depthRange.equals(e)||(this._depthRange=e,this._invalidateAccumulationSets())}get test(){}};e([c()],E.prototype,"_refining",null),e([c()],E.prototype,"active",null),e([c()],E.prototype,"canAccumulate",null),e([c()],E.prototype,"_doneAccumulating",null),e([c()],E.prototype,"_opacityFromElevation",null),e([c()],E.prototype,"_numActive",null),e([c()],E.prototype,"_colorFormat",null),e([c()],E.prototype,"readyToRun",null),e([c()],E.prototype,"_depthRange",void 0),e([c()],E.prototype,"_enabled",void 0),e([c()],E.prototype,"_previewing",void 0),e([c()],E.prototype,"_accumulationRenderer",void 0),E=e([u("esri.views.3d.webgl-engine.lib.ShadowAccumulator")],E);const k=6,O=new Uint8Array(4);class U{constructor(e,t){this.configuration=e,this._notifyChange=t,this._cachedLightDirections=[],this._progress=h(0),this._sampleCount=h(0)}get progress(){return this._progress.value}set progress(e){this._progress.value=e}get sampleCount(){return this._sampleCount.value}get doneAccumulating(){return this.progress>=this.sampleCount}get running(){return this.progress>0}get active(){return this.sampleCount>0}get lightDirections(){return this._cachedLightDirections}set lightDirections(e){const t=this._cachedLightDirections,r=Math.min(C,e.length);if(!i(t,0,t.length,e,0,r,m)){t.length=r,this._sampleCount.value=r;for(let i=0;i<r;++i)t[i]=l(t[i]??_(),e[i]);this.reset(),this._notifyChange()}}destroy(){this._cachedLightDirections.length=0,this._sampleCount.value=0}reset(){this.progress=0}precompile(e){e.precompile(R,this.configuration),e.precompile(P,this.configuration)}}export{E as ShadowAccumulator};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{hasNativeFloat16Array as e}from"../../../../../geometry/support/float16.js";import{BufferViewMat3f as t,BufferViewVec3f as o,BufferViewFloat as r,BufferViewFloat16 as n,BufferViewVec4Unorm8 as f,BufferViewUnorm8 as u,BufferViewVec4u8 as m,BufferViewUint8 as s}from"../../../../../geometry/support/buffer/BufferView.js";import{elementTypeSize as i}from"../../../../../geometry/support/buffer/types.js";class p{constructor(e,t,o){this.elementCount=e,this.elementType=t,this.bufferViewConstructor=o,this.byteSize=l(o)}}function l(e){return i(e.ElementType)*e.ElementCount}const w={u8:new p(1,"uint",s),vec4u8:new p(4,"uint",m),unorm8:new p(1,"float",u),vec4unorm8:new p(4,"float",f),f16:new p(1,"float",e?n:r),f32:new p(1,"float",r),vec3f32:new p(3,"float",o),mat3f32:new p(9,"float",t)};export{p as FieldCreationInfo,w as typeToCreationInfoMap};
2
+ import{hasNativeFloat16Array as e}from"../../../../../geometry/support/float16.js";import{BufferViewMat3f as t,BufferViewVec3f as o,BufferViewFloat as n,BufferViewFloat16 as r,BufferViewVec2Snorm16 as f,BufferViewVec4Unorm8 as u,BufferViewUnorm8 as m,BufferViewVec4u8 as s,BufferViewUint8 as i}from"../../../../../geometry/support/buffer/BufferView.js";import{elementTypeSize as l}from"../../../../../geometry/support/buffer/types.js";class p{constructor(e,t,o){this.elementCount=e,this.elementType=t,this.bufferViewConstructor=o,this.byteSize=w(o)}}function w(e){return l(e.ElementType)*e.ElementCount}const a={u8:new p(1,"uint",i),vec4u8:new p(4,"uint",s),unorm8:new p(1,"float",m),vec4unorm8:new p(4,"float",u),vec2snorm16:new p(2,"float",f),f16:new p(1,"float",e?r:n),f32:new p(1,"float",n),vec3f32:new p(3,"float",o),mat3f32:new p(9,"float",t)};export{p as FieldCreationInfo,a as typeToCreationInfoMap};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{newLayout as e}from"../../support/buffer/InterleavedLayout.js";import{olidEnabled as t}from"../effects/geometry/olidUtils.js";import{TextureBackedBufferLayout as r}from"../lib/TextureBackedBuffer/TextureBackedBufferLayout.js";function o(){const r=e().vec4f16("profileVertexAndNormal").u32("textureElementIndex",{integer:!0});return t()&&r.vec4u8("olidColor"),r.vec3f16("profileAuxData"),r.freeze()}function u(e){const t=[{type:"vec3f32",name:"position"},{type:"vec2snorm16",name:"profileRight"},{type:"vec2snorm16",name:"profileUp"}];return e.hasVVSize&&t.push({type:"f32",name:"sizeFeatureAttribute"}),e.hasVVColor&&t.push({type:"f32",name:"colorFeatureAttribute"}),e.hasVVOpacity&&t.push({type:"f32",name:"opacityFeatureAttribute"}),new r(t)}export{o as getLayout,u as getTextureLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{clamp as t}from"../../../../core/mathUtils.js";import{clone as e}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as s}from"../../../../geometry/support/aaBoundingBox.js";import{isShadowLike as r,is3DGeometry as a,isColor as o}from"../core/shaderLibrary/ShaderOutput.js";import n from"../lib/GLMaterial.js";import{isPathGeometry as h}from"../lib/PathGeometry.js";import{MeshIntersectionOptions as p,intersectAabbInvDir as c}from"../lib/RayIntersections.js";import{DefaultBufferWriter as u}from"./DefaultBufferWriter.js";import{getLayout as m,PathPassParameters as d,PathTechnique as f}from"./PathTechnique.js";import{PathTechniqueConfiguration as l}from"./PathTechniqueConfiguration.js";import{TriangleMaterial as b}from"./TriangleMaterial.js";import{hasShadowHighlights as g}from"../shaders/ReceiveShadowsConfiguration.js";import{alphaCutoff as S}from"../../../../webscene/support/AlphaCutoff.js";class _ extends b{constructor(t,e){super(t,M),this.supportsEdges=!0,this._pp0=i(0,0,1),this._pp1=i(0,0,0),this.produces=new Map([[2,t=>(this.parameters.castShadows&&r(t)||a(t))&&!this.transparent],[4,t=>(this.parameters.castShadows&&r(t)||a(t))&&this.transparent]]),this._configuration=new l(e.spherical)}get hasEmissions(){return this.parameters.emissiveStrength>0?this.transparent?2:1:0}updateConfiguration(t){super.updateConfiguration(t),this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.transparent,this._configuration.hasOccludees=t.hasOccludees,o(t.output)?(this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?1:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?2:0,this._configuration.receiveShadows=t.shadowMap.enabled,this._configuration.hasShadowHighlights=g(this._configuration,t),this._configuration.receiveAmbientOcclusion=null!=t.ssao):this._configuration.receiveShadows=this._configuration.hasShadowHighlights=this._configuration.receiveAmbientOcclusion=!1,this._configuration.pbrMode=this.parameters.usePBR?2:0,this._configuration.emissionSource=this.parameters.usePBR?1:0,this._configuration.snowCover=t.snowCover>0}isVisibleForOutput(t){return 5!==t&&7!==t&&6!==t||this.parameters.castShadows}get visible(){return this.parameters.opacity>=S}intersect(t,e,i,s,r,a){this._intersect(t,i,s,r,a)}intersectDraped(t,e,i,s){return this._pp0[0]=this._pp1[0]=i[0],this._pp0[1]=this._pp1[1]=i[1],this._intersect(t,e,this._pp0,this._pp1,s)}_intersect(i,r,a,o,n){const u=i;if(!h(u))return;const m=u.path,d=e(this.parameters.size);if(this.parameters.vvSize){const{offset:e,factor:i,minSize:s,maxSize:r,fallback:a}=this.parameters.vvSize,o=m.sizeAttributeValue;Number.isNaN(o)?(d[0]*=a[0],d[1]*=a[2]):(d[0]*=t(e[0]+o*i[0],s[0],r[0]),d[1]*=t(e[2]+o*i[2],s[2],r[2]))}const f=new p(r.tolerance,!1,r.options.normalRequired),l=Math.max(d[0],d[1]),b=i.boundingInfo;if(null==b)return void v(m,d,a,o,f,n);const g=s(b.bbMin[0]-l,b.bbMin[1]-l,b.bbMin[2]-l,b.bbMax[0]+l,b.bbMax[1]+l,b.bbMax[2]+l),S=[o[0]-a[0],o[1]-a[1],o[2]-a[2]],_=Math.sqrt(S[0]*S[0]+S[1]*S[1]+S[2]*S[2]),w=[_/S[0],_/S[1],_/S[2]];c(g,a,w,r.tolerance)&&v(m,d,a,o,f,n)}createBufferWriter(){return new u(m(this.parameters))}createGLMaterial(t){return new w(t)}get transparent(){const{parameters:t}=this;return t.drivenOpacity||t.opacity<1}}class w extends n{beginSlot(t){return this.getTechnique(f,t)}}function v(t,e,i,s,r,a){t.baked.size&&t.baked.size[0]===e[0]&&t.baked.size[1]===e[1]||t.baked.bake(e),t.baked.intersect(i,s,r,a)}class M extends d{constructor(){super(...arguments),this.doubleSided=!1,this.doubleSidedType="normal",this.polygonOffset=0,this.castShadows=!0,this.hasSlicePlane=!1,this.drivenOpacity=!1,this.usePBR=!1}}export{M as Parameters,_ as PathMaterial};
2
+ import{clamp as e}from"../../../../core/mathUtils.js";import{clone as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as r}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewUint32 as s,BufferViewVec3f as o,BufferViewVec2Snorm16 as a,BufferViewFloat as n}from"../../../../geometry/support/buffer/BufferView.js";import{isShadowLike as u,is3DGeometry as h,isColor as p}from"../core/shaderLibrary/ShaderOutput.js";import c from"../lib/GLMaterial.js";import{isPathGeometry as f}from"../lib/PathGeometry.js";import{MeshIntersectionOptions as l,intersectAabbInvDir as m}from"../lib/RayIntersections.js";import{assert as d}from"../lib/Util.js";import{getLayout as g,getTextureLayout as b}from"./PathLayouts.js";import{PathPassParameters as S,PathTechnique as _}from"./PathTechnique.js";import{PathTechniqueConfiguration as w}from"./PathTechniqueConfiguration.js";import{TriangleMaterial as x}from"./TriangleMaterial.js";import{writeAttributes as y,writeTextureElementIndex as v,writePosition as j,writeBufferVec2 as V,writeBufferFloat as z}from"./internal/bufferWriterUtils.js";import{hasShadowHighlights as M}from"../shaders/ReceiveShadowsConfiguration.js";import{alphaCutoff as F}from"../../../../webscene/support/AlphaCutoff.js";class A extends x{constructor(e,t){super(e,B),this.supportsEdges=!0,this._pp0=i(0,0,1),this._pp1=i(0,0,0),this.produces=new Map([[2,e=>(this.parameters.castShadows&&u(e)||h(e))&&!this.transparent],[4,e=>(this.parameters.castShadows&&u(e)||h(e))&&this.transparent]]),this._configuration=new w(t.spherical)}get hasEmissions(){return this.parameters.emissiveStrength>0?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e),this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.transparent,this._configuration.hasOccludees=e.hasOccludees,p(e.output)?(this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?1:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?2:0,this._configuration.receiveShadows=e.shadowMap.enabled,this._configuration.hasShadowHighlights=M(this._configuration,e),this._configuration.receiveAmbientOcclusion=null!=e.ssao):this._configuration.receiveShadows=this._configuration.hasShadowHighlights=this._configuration.receiveAmbientOcclusion=!1,this._configuration.pbrMode=this.parameters.usePBR?2:0,this._configuration.emissionSource=this.parameters.usePBR?1:0,this._configuration.snowCover=e.snowCover>0}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){return this.parameters.opacity>=F}intersect(e,t,i,r,s,o){this._intersect(e,i,r,s,o)}intersectDraped(e,t,i,r){return this._pp0[0]=this._pp1[0]=i[0],this._pp0[1]=this._pp1[1]=i[1],this._intersect(e,t,this._pp0,this._pp1,r)}_intersect(i,s,o,a,n){const u=i;if(!f(u))return;const h=u.path,p=t(this.parameters.size);if(this.parameters.vvSize){const{offset:t,factor:i,minSize:r,maxSize:s,fallback:o}=this.parameters.vvSize,a=h.sizeAttributeValue;Number.isNaN(a)?(p[0]*=o[0],p[1]*=o[2]):(p[0]*=e(t[0]+a*i[0],r[0],s[0]),p[1]*=e(t[2]+a*i[2],r[2],s[2]))}const c=new l(s.tolerance,!1,s.options.normalRequired),d=Math.max(p[0],p[1]),g=i.boundingInfo;if(null==g)return void O(h,p,o,a,c,n);const b=r(g.bbMin[0]-d,g.bbMin[1]-d,g.bbMin[2]-d,g.bbMax[0]+d,g.bbMax[1]+d,g.bbMax[2]+d),S=[a[0]-o[0],a[1]-o[1],a[2]-o[2]],_=Math.sqrt(S[0]*S[0]+S[1]*S[1]+S[2]*S[2]),w=[_/S[0],_/S[1],_/S[2]];m(b,o,w,s.tolerance)&&O(h,p,o,a,c,n)}createBufferWriter(){return new P(g(),b(this.parameters))}createGLMaterial(e){return new C(e)}get transparent(){const{parameters:e}=this;return e.drivenOpacity||e.opacity<1}}class C extends c{beginSlot(e){return this.getTechnique(_,e)}}function O(e,t,i,r,s,o){e.baked.size&&e.baked.size[0]===t[0]&&e.baked.size[1]===t[1]||e.baked.bake(t),e.baked.intersect(i,r,s,o)}class B extends S{constructor(){super(...arguments),this.doubleSided=!1,this.doubleSidedType="normal",this.polygonOffset=0,this.castShadows=!0,this.hasSlicePlane=!1,this.drivenOpacity=!1,this.usePBR=!1}}class P{constructor(e,t){this.layout=e,this.textureBufferLayout=t}elementCount(e){return e.get("profileVertexAndNormal")?.indices.length??0}elementCountTextureBuffer(e){return e.get("position")?.indices.length??0}write(e,t,i,r,u,h){d(null!=h,"Texture buffer is required for path material"),y(i,r,this.layout,e,t,u);const p=u.buffer.getField("textureElementIndex",s),c=i.get("textureElementIndex"),f=h.offset,l=h.textureBufferRange.from;p&&c&&v(c,p,u.offset,l);const m=h.buffer.getField("position",o),g=i.get("position");m&&g&&(d(3===g.size),j(g,e,m,f));const b=h.buffer.getField("profileRight",a),S=i.get("profileRight");b&&S&&(d(2===S.size),V(S,b,f));const _=h.buffer.getField("profileUp",a),w=i.get("profileUp");_&&w&&(d(2===w.size),V(w,_,f));const x=h.buffer.getField("sizeFeatureAttribute",n),M=i.get("sizeFeatureAttribute");x&&M&&z(M,x,f);const F=h.buffer.getField("opacityFeatureAttribute",n),A=i.get("opacityFeatureAttribute");F&&A&&z(A,F,f);const C=h.buffer.getField("colorFeatureAttribute",n),O=i.get("colorFeatureAttribute");C&&O&&z(O,C,f)}}export{B as Parameters,P as PathBufferWriter,A as PathMaterial};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{freeze as t,create as i,ZEROS as o}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{glLayout as s}from"../../support/buffer/glUtil.js";import{newLayout as l}from"../../support/buffer/InterleavedLayout.js";import{isOITColor as a}from"../core/shaderLibrary/ShaderOutput.js";import{PathVertexPositionPassParameters as n}from"../core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{ReloadableShader as m}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as c}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as p}from"../effects/geometry/olidUtils.js";import{depthTest as f,blending as u}from"../lib/OrderIndependentTransparency.js";import{stencilBaseAllZeros as h,stencilWriteMaskOn as d}from"../lib/StencilUtils.js";import{P as b}from"../../../../chunks/Path.glsl.js";import{advancedMRRFactors as g}from"./pbrUtils.js";import{polygonOffset as j}from"./PolygonOffset.js";import{makePipelineState as S,defaultColorWrite as v,defaultDepthWrite as y,frontFaceCullingParams as P}from"../../../webgl/renderState.js";class T extends n{constructor(){super(...arguments),this.ambient=t(.2,.2,.2),this.diffuse=t(.8,.8,.8),this.opacity=1,this.origin=i(),this.modelTransformation=null,this.mrrFactors=g,this.emissiveStrengthFromSymbol=0,this.emissiveSource=1,this.emissiveBaseColor=o}get emissiveStrength(){return this.emissiveStrengthFromSymbol}}let V=class extends c{constructor(e,r){super(e,r,s(x(r))),this.shader=new m(b,()=>import("./Path.glsl.js"))}initializePipeline(e){const{output:r,transparent:t,hasSlicePlane:i,doubleSidedMode:o,hasOccludees:s}=e,l=!a(r);return S({blending:t?u(r):null,culling:i&&!t&&0!==o?P:null,depthTest:f(r),depthWrite:l?y:null,colorWrite:v,stencilWrite:s?d:null,stencilTest:s?h:null,polygonOffset:j(e)})}};function x(e){const r=l().vec3f("position").vec4f16("profileVertexAndNormal").vec2i16("profileRight",{glNormalized:!0}).vec2i16("profileUp",{glNormalized:!0});return e.hasVVSize&&r.f32("sizeFeatureAttribute"),e.hasVVColor&&r.f32("colorFeatureAttribute"),e.hasVVOpacity&&r.f32("opacityFeatureAttribute"),p()&&r.vec4u8("olidColor"),r.vec3f16("profileAuxData"),r.freeze()}V=e([r("esri.views.3d.webgl-engine.materials.PathTechnique")],V);export{T as PathPassParameters,V as PathTechnique,x as getLayout};
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{freeze as t,create as s,ZEROS as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{glLayout as o}from"../../support/buffer/glUtil.js";import{isOITColor as l}from"../core/shaderLibrary/ShaderOutput.js";import{PathVertexPositionPassParameters as n}from"../core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{ReloadableShader as m}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as a}from"../core/shaderTechnique/ShaderTechnique.js";import{depthTest as h,blending as c}from"../lib/OrderIndependentTransparency.js";import{stencilBaseAllZeros as p,stencilWriteMaskOn as u}from"../lib/StencilUtils.js";import{P as d}from"../../../../chunks/Path.glsl.js";import{getLayout as f}from"./PathLayouts.js";import{advancedMRRFactors as b}from"./pbrUtils.js";import{polygonOffset as g}from"./PolygonOffset.js";import{makePipelineState as j,defaultColorWrite as S,defaultDepthWrite as P,frontFaceCullingParams as y}from"../../../webgl/renderState.js";class T extends n{constructor(){super(...arguments),this.ambient=t(.2,.2,.2),this.diffuse=t(.8,.8,.8),this.opacity=1,this.origin=s(),this.modelTransformation=null,this.mrrFactors=b,this.emissiveStrengthFromSymbol=0,this.emissiveSource=1,this.emissiveBaseColor=i}get emissiveStrength(){return this.emissiveStrengthFromSymbol}}let v=class extends a{constructor(e,r){super(e,r,o(f())),this.shader=new m(d,()=>import("./Path.glsl.js"))}initializePipeline(e){const{output:r,transparent:t,hasSlicePlane:s,doubleSidedMode:i,hasOccludees:o}=e,n=!l(r);return j({blending:t?c(r):null,culling:s&&!t&&0!==i?y:null,depthTest:h(r),depthWrite:n?P:null,colorWrite:S,stencilWrite:o?u:null,stencilTest:o?p:null,polygonOffset:g(e)})}};v=e([r("esri.views.3d.webgl-engine.materials.PathTechnique")],v);export{T as PathPassParameters,v as PathTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as o}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as t}from"./TriangleTechniqueConfiguration.js";class i extends t{constructor(e){super(),this.spherical=e,this.pbrMode=0,this.doubleSidedMode=0,this.emissionSource=0,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVVOpacity=!1,this.hasOccludees=!1,this.snowCover=!1,this.receiveGlobalIllumination=!1,this.textureCoordinateType=0,this.hasVVInstancing=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.draped=!1,this.overlayEnabled=!1}get discardInvisibleFragments(){return this.transparent}}e([o({count:7})],i.prototype,"pbrMode",void 0),e([o({count:3})],i.prototype,"doubleSidedMode",void 0),e([o({count:8})],i.prototype,"emissionSource",void 0),e([o()],i.prototype,"receiveShadows",void 0),e([o()],i.prototype,"hasShadowHighlights",void 0),e([o()],i.prototype,"receiveAmbientOcclusion",void 0),e([o()],i.prototype,"hasVVSize",void 0),e([o()],i.prototype,"hasVVColor",void 0),e([o()],i.prototype,"hasVVOpacity",void 0),e([o()],i.prototype,"hasOccludees",void 0),e([o()],i.prototype,"snowCover",void 0),e([o()],i.prototype,"receiveGlobalIllumination",void 0);export{i as PathTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{parameter as o}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as t}from"./TriangleTechniqueConfiguration.js";class i extends t{constructor(e){super(),this.spherical=e,this.pbrMode=0,this.doubleSidedMode=0,this.emissionSource=0,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVVOpacity=!1,this.hasOccludees=!1,this.snowCover=!1,this.receiveGlobalIllumination=!1,this.supportNaN=!0,this.textureCoordinateType=0,this.hasVVInstancing=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.draped=!1,this.overlayEnabled=!1}get discardInvisibleFragments(){return this.transparent}}e([o({count:7})],i.prototype,"pbrMode",void 0),e([o({count:3})],i.prototype,"doubleSidedMode",void 0),e([o({count:8})],i.prototype,"emissionSource",void 0),e([o()],i.prototype,"receiveShadows",void 0),e([o()],i.prototype,"hasShadowHighlights",void 0),e([o()],i.prototype,"receiveAmbientOcclusion",void 0),e([o()],i.prototype,"hasVVSize",void 0),e([o()],i.prototype,"hasVVColor",void 0),e([o()],i.prototype,"hasVVOpacity",void 0),e([o()],i.prototype,"hasOccludees",void 0),e([o()],i.prototype,"snowCover",void 0),e([o()],i.prototype,"receiveGlobalIllumination",void 0);export{i as PathTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{IDENTITY as e}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{BufferViewVec4f as r,BufferViewUint32 as s,BufferViewMat3f as i,BufferViewVec4u8 as o,BufferViewFloat as n}from"../../../../geometry/support/buffer/BufferView.js";import{isHighlightOrOLID as a,isColor as u,isDepth as f,isColorHighlightOrOLID as l}from"../core/shaderLibrary/ShaderOutput.js";import c from"../lib/GLMaterial.js";import{assert as h}from"../lib/Util.js";import{DefaultBufferWriter as m}from"./DefaultBufferWriter.js";import{TriangleMaterial as p}from"./TriangleMaterial.js";import{VisualVariablePassParameters as d}from"./VisualVariablePassParameters.js";import{writeAttributes as g,writeBufferVec4 as x,writeColor as b,writeVVFeatureAttribute as y}from"./internal/bufferWriterUtils.js";import{getLayout as j,getTextureLayout as B}from"../shaders/PatternLayouts.js";import{PatternTechnique as v}from"../shaders/PatternTechnique.js";import{PatternTechniqueConfiguration as w}from"../shaders/PatternTechniqueConfiguration.js";import{alphaCutoff as C}from"../../../../webscene/support/AlphaCutoff.js";class F extends p{constructor(e){super(e,V),this._configuration=new w,this.supportsEdges=!0,this.transparent=!0,this.produces=new Map([[2,e=>a(e)],[4,e=>u(e)],[5,e=>f(e)],[18,e=>this.parameters.draped&&l(e)]])}updateConfiguration(e){super.updateConfiguration(e),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasVertexColors=this.parameters.hasVertexColors&&!this.parameters.vvColor,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.style=this.parameters.style,this._configuration.draped=this.parameters.draped,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.emissionSource=this.hasEmissions?1:0}get visible(){return this.parameters.color[3]>=C}get hasEmissions(){return this.parameters.emissiveStrength>0?2:0}createGLMaterial(e){return new S(e)}createBufferWriter(){return new _(j(this.parameters),B(this.parameters))}}class S extends c{beginSlot(e){return this.getTechnique(v,e)}}class _ extends m{constructor(e,t){super(e),this.textureBufferLayout=t}elementCountTextureBuffer(e){return e.get("boundingRect")?.indices.length??0}write(e,t,i,o,n,a){const{buffer:u,offset:f}=n,l=a?.textureBufferRange;g(i,o,this.layout,e,t,n);for(const s of this.layout.fields.keys()){const e=i.get(s),t=e?.indices;if(e&&t)switch(s){case"uvMapSpace":{h(4===e.size);const t=u.getField(s,r);t&&x(e,t,f);break}}}const{textureBufferLayout:c}=this;if(null==c)return;h(null!=l,"Using a texture layout, but the texture range for this instance was not provided");const m=l.from;h(1===l.numElements,"Provided more than one texture buffer element per polygon");const p=u.getField("textureElementIndex",s);h(null!=p,"Missing component index field");const d=i.get("position")?.indices.length??0;for(let r=0;r<d;++r)p.set(f+r,m);this._writeTextureBuffer(e,i,a)}_writeTextureBuffer(t,r,s){const{textureBufferLayout:a}=this;if(null==a||null==s)return;const{buffer:u,offset:f}=s,l=u.getField("boundingRect",i),c=r.get("boundingRect");l&&c&&(h(9===c.size),P(c,t??e,l,f));const m=u.getField("color",o),p=r.get("color");m&&p&&(h(3===p.size||4===p.size),b(p,p.size,m,f));const d=u.getField("colorFeatureAttribute",n),g=r.get("colorFeatureAttribute");d&&g&&(h(1===g.size),y(g,d,f))}}function P(e,t,r,s){const{data:i,indices:o}=e,n=t,a=r.typedBuffer,u=r.typedBufferStride,f=o.length;s*=u;for(let l=0;l<f;++l){const e=9*o[l],t=i[e],r=i[e+1],f=i[e+2];a[s]=n[0]*t+n[4]*r+n[8]*f+n[12],a[s+1]=n[1]*t+n[5]*r+n[9]*f+n[13],a[s+2]=n[2]*t+n[6]*r+n[10]*f+n[14];for(let o=3;o<9;++o)a[s+o]=i[e+o];s+=u}}class V extends d{constructor(){super(...arguments),this.color=t(1,1,1,1),this.emissiveStrength=0,this.hasVertexColors=!1,this.polygonOffset=0,this.hasSlicePlane=!1,this.cullFace=0,this.hasOccludees=!1,this.style=2,this.draped=!0,this.useIndexing=!0}}export{V as Parameters,F as PatternMaterial};
2
+ import{IDENTITY as e}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{BufferViewVec4f as r,BufferViewUint32 as s,BufferViewMat3f as i,BufferViewVec4u8 as o,BufferViewFloat as a}from"../../../../geometry/support/buffer/BufferView.js";import{isHighlightOrOLID as n,isColor as u,isDepth as f,isColorHighlightOrOLID as l}from"../core/shaderLibrary/ShaderOutput.js";import c from"../lib/GLMaterial.js";import{assert as h}from"../lib/Util.js";import{DefaultBufferWriter as p}from"./DefaultBufferWriter.js";import{TriangleMaterial as m}from"./TriangleMaterial.js";import{VisualVariablePassParameters as d}from"./VisualVariablePassParameters.js";import{writeAttributes as g,writeBufferVec4 as x,writeTextureElementIndex as b,writeConstTextureElementIndex as y,writeColor as j,writeVVFeatureAttribute as B}from"./internal/bufferWriterUtils.js";import{getLayout as w,getTextureLayout as C}from"../shaders/PatternLayouts.js";import{PatternTechnique as v}from"../shaders/PatternTechnique.js";import{PatternTechniqueConfiguration as F}from"../shaders/PatternTechniqueConfiguration.js";import{alphaCutoff as S}from"../../../../webscene/support/AlphaCutoff.js";class _ extends m{constructor(e){super(e,T),this._configuration=new F,this.supportsEdges=!0,this.transparent=!0,this.produces=new Map([[2,e=>n(e)],[4,e=>u(e)],[5,e=>f(e)],[18,e=>this.parameters.draped&&l(e)]])}updateConfiguration(e){super.updateConfiguration(e),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasVertexColors=this.parameters.hasVertexColors&&!this.parameters.vvColor,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.style=this.parameters.style,this._configuration.draped=this.parameters.draped,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.emissionSource=this.hasEmissions?1:0}get visible(){return this.parameters.color[3]>=S}get hasEmissions(){return this.parameters.emissiveStrength>0?2:0}createGLMaterial(e){return new P(e)}createBufferWriter(){return new V(w(this.parameters),C(this.parameters))}}class P extends c{beginSlot(e){return this.getTechnique(v,e)}}class V extends p{constructor(e,t){super(e),this.textureBufferLayout=t}elementCountTextureBuffer(e){return e.get("boundingRect")?.indices.length??0}write(e,t,i,o,a,n){const{buffer:u,offset:f}=a,l=n?.textureBufferRange;g(i,o,this.layout,e,t,a);for(const s of this.layout.fields.keys()){const e=i.get(s),t=e?.indices;if(e&&t)switch(s){case"uvMapSpace":{h(4===e.size);const t=u.getField(s,r);t&&x(e,t,f);break}}}const{textureBufferLayout:c}=this;if(null==c)return;h(null!=l,"Using a texture layout, but the texture range for this instance was not provided");const p=l.from,m=u.getField("textureElementIndex",s);h(null!=m,"Missing component index field");const d=i.get("position")?.indices.length??0,j=i.get("textureElementIndex");null!=j?b(j,m,f,p):y(m,f,p,d),this._writeTextureBuffer(e,i,n)}_writeTextureBuffer(t,r,s){const{textureBufferLayout:n}=this;if(null==n||null==s)return;const{buffer:u,offset:f}=s,l=u.getField("boundingRect",i),c=r.get("boundingRect");l&&c&&(h(9===c.size),L(c,t??e,l,f));const p=u.getField("color",o),m=r.get("color");p&&m&&(h(3===m.size||4===m.size),j(m,m.size,p,f));const d=u.getField("colorFeatureAttribute",a),g=r.get("colorFeatureAttribute");d&&g&&(h(1===g.size),B(g,d,f))}}function L(e,t,r,s){const{data:i,indices:o}=e,a=t,n=r.typedBuffer,u=r.typedBufferStride,f=o.length;s*=u;for(let l=0;l<f;++l){const e=9*o[l],t=i[e],r=i[e+1],f=i[e+2];n[s]=a[0]*t+a[4]*r+a[8]*f+a[12],n[s+1]=a[1]*t+a[5]*r+a[9]*f+a[13],n[s+2]=a[2]*t+a[6]*r+a[10]*f+a[14];for(let o=3;o<9;++o)n[s+o]=i[e+o];s+=u}}class T extends d{constructor(){super(...arguments),this.color=t(1,1,1,1),this.emissiveStrength=0,this.hasVertexColors=!1,this.polygonOffset=0,this.hasSlicePlane=!1,this.cullFace=0,this.hasOccludees=!1,this.style=2,this.draped=!0,this.useIndexing=!0}}export{T as Parameters,_ as PatternMaterial};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{subtract as e,length as t,scale as f}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isOrthoNormal as r,hasIdentityRotation as i}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{BufferViewVec4u8 as s,BufferViewVec3f16 as n,BufferViewVec3f as c,BufferViewVec4f16 as l,BufferViewVec4f as d,BufferViewFloat as u,BufferViewVec2i16 as a,BufferViewVec2f16 as p,BufferViewVec2f as g}from"../../../../../geometry/support/buffer/BufferView.js";import{assert as y}from"../../lib/Util.js";function b(e,t,f,o=1){const{data:r,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===o)for(let l=0;l<c;++l)s[f]=r[i[l]],f+=n;else for(let l=0;l<c;++l){const e=r[i[l]];for(let t=0;t<o;t++)s[f]=e,f+=n}}function B(e,t,f){const{data:o,indices:r}=e,i=t.typedBuffer,s=t.typedBufferStride,n=r.length;f*=s;for(let c=0;c<n;++c){const e=2*r[c];i[f]=o[e],i[f+1]=o[e+1],f+=s}}function m(e,t,f,o=1){const{data:r,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===o)for(let l=0;l<c;++l){const e=3*i[l];s[f]=r[e],s[f+1]=r[e+1],s[f+2]=r[e+2],f+=n}else for(let l=0;l<c;++l){const e=3*i[l];for(let t=0;t<o;++t)s[f]=r[e],s[f+1]=r[e+1],s[f+2]=r[e+2],f+=n}}function h(e,t,f,o=1){const{data:r,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===o)for(let l=0;l<c;++l){const e=4*i[l];s[f]=r[e],s[f+1]=r[e+1],s[f+2]=r[e+2],s[f+3]=r[e+3],f+=n}else for(let l=0;l<c;++l){const e=4*i[l];for(let t=0;t<o;++t)s[f]=r[e],s[f+1]=r[e+1],s[f+2]=r[e+2],s[f+3]=r[e+3],f+=n}}function F(e,t,f){const o=e.typedBuffer,r=e.typedBufferStride,i=e.elementCount;t*=r;for(let s=0;s<f;++s){for(let e=0;e<i;++e)o[t+e]=0;t+=r}}function v(e,t,f){const{data:o,indices:r}=e,i=t.typedBuffer,s=t.typedBufferStride,n=r.length;f*=s;for(let c=0;c<n;++c){const e=9*r[c];for(let t=0;t<9;++t)i[f+t]=o[e+t];f+=s}}function w(e,t,f){const{data:o,indices:r}=e,i=t.typedBuffer,s=t.typedBufferStride,n=r.length;f*=s;for(let c=0;c<n;++c){const e=16*r[c];for(let t=0;t<16;++t)i[f+t]=o[e+t];f+=s}}function z(e,t,f,o,r=1){if(!t)return void m(e,f,o,r);const{data:s,indices:n}=e,c=f.typedBuffer,l=f.typedBufferStride,d=n.length,u=t[0],a=t[1],p=t[2],g=t[4],y=t[5],b=t[6],B=t[8],h=t[9],F=t[10],v=t[12],w=t[13],z=t[14];o*=l;let S=0,k=0,N=0;const $=i(t)?e=>{S=s[e]+v,k=s[e+1]+w,N=s[e+2]+z}:e=>{const t=s[e],f=s[e+1],o=s[e+2];S=u*t+g*f+B*o+v,k=a*t+y*f+h*o+w,N=p*t+b*f+F*o+z};if(1===r)for(let i=0;i<d;++i)$(3*n[i]),c[o]=S,c[o+1]=k,c[o+2]=N,o+=l;else for(let i=0;i<d;++i){$(3*n[i]);for(let e=0;e<r;++e)c[o]=S,c[o+1]=k,c[o+2]=N,o+=l}}function S(e,t,f,o,s=1){if(!t)return void m(e,f,o,s);const{data:n,indices:c}=e,l=t,d=f.typedBuffer,u=f.typedBufferStride,a=c.length,p=l[0],g=l[1],y=l[2],b=l[4],B=l[5],h=l[6],F=l[8],v=l[9],w=l[10],z=!r(l),S=1e-6,k=1-S;o*=u;let N=0,$=0,x=0;const A=i(l)?e=>{N=n[e],$=n[e+1],x=n[e+2]}:e=>{const t=n[e],f=n[e+1],o=n[e+2];N=p*t+b*f+F*o,$=g*t+B*f+v*o,x=y*t+h*f+w*o};if(1===s)if(z)for(let r=0;r<a;++r){A(3*c[r]);const e=N*N+$*$+x*x;if(e<k&&e>S){const t=1/Math.sqrt(e);d[o]=N*t,d[o+1]=$*t,d[o+2]=x*t}else d[o]=N,d[o+1]=$,d[o+2]=x;o+=u}else for(let r=0;r<a;++r)A(3*c[r]),d[o]=N,d[o+1]=$,d[o+2]=x,o+=u;else for(let r=0;r<a;++r){if(A(3*c[r]),z){const e=N*N+$*$+x*x;if(e<k&&e>S){const t=1/Math.sqrt(e);N*=t,$*=t,x*=t}}for(let e=0;e<s;++e)d[o]=N,d[o+1]=$,d[o+2]=x,o+=u}}function k(e,t,f,o,i=1){if(!t)return void h(e,f,o,i);const{data:s,indices:n}=e,c=t,l=f.typedBuffer,d=f.typedBufferStride,u=n.length,a=c[0],p=c[1],g=c[2],y=c[4],b=c[5],B=c[6],m=c[8],F=c[9],v=c[10],w=!r(c),z=1e-6,S=1-z;if(o*=d,1===i)for(let r=0;r<u;++r){const e=4*n[r],t=s[e],f=s[e+1],i=s[e+2],c=s[e+3];let u=a*t+y*f+m*i,h=p*t+b*f+F*i,k=g*t+B*f+v*i;if(w){const e=u*u+h*h+k*k;if(e<S&&e>z){const t=1/Math.sqrt(e);u*=t,h*=t,k*=t}}l[o]=u,l[o+1]=h,l[o+2]=k,l[o+3]=c,o+=d}else for(let r=0;r<u;++r){const e=4*n[r],t=s[e],f=s[e+1],c=s[e+2],u=s[e+3];let h=a*t+y*f+m*c,k=p*t+b*f+F*c,N=g*t+B*f+v*c;if(w){const e=h*h+k*k+N*N;if(e<S&&e>z){const t=1/Math.sqrt(e);h*=t,k*=t,N*=t}}for(let r=0;r<i;++r)l[o]=h,l[o+1]=k,l[o+2]=N,l[o+3]=u,o+=d}}function N(e,t,f,o,r=1){const{data:i,indices:s}=e,n=f.typedBuffer,c=f.typedBufferStride,l=s.length;if(o*=c,t===i.length&&4===t){n[o]=i[0],n[o+1]=i[1],n[o+2]=i[2],n[o+3]=i[3];const e=new Uint32Array(f.typedBuffer.buffer,f.start),t=c/4,s=e[o/=4];o+=t;const d=l*r;for(let f=1;f<d;++f)e[o]=s,o+=t;return}if(1!==r)if(4!==t)for(let d=0;d<l;++d){const e=3*s[d];for(let t=0;t<r;++t)n[o]=i[e],n[o+1]=i[e+1],n[o+2]=i[e+2],n[o+3]=255,o+=c}else for(let d=0;d<l;++d){const e=4*s[d];for(let t=0;t<r;++t)n[o]=i[e],n[o+1]=i[e+1],n[o+2]=i[e+2],n[o+3]=i[e+3],o+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*s[e];n[o]=i[t],n[o+1]=i[t+1],n[o+2]=i[t+2],n[o+3]=i[t+3],o+=c}return}for(let e=0;e<l;++e){const t=3*s[e];n[o]=i[t],n[o+1]=i[t+1],n[o+2]=i[t+2],n[o+3]=255,o+=c}}}function $(e,t,f){const{data:o,indices:r}=e,i=t.typedBuffer,s=t.typedBufferStride,n=r.length,c=o[0];f*=s;for(let l=0;l<n;++l)i[f]=c,f+=s}function x(o,r,i,s){e(A,o,r);const n=Math.max(Math.sqrt(t(A)),1e-4);f(A,A,1/n),i[s++]=A[0],i[s++]=A[1],i[s++]=A[2],i[s++]=n}const A=o();function M(e,t,f,o,r=1){const i=t.typedBuffer,s=t.typedBufferStride;if(o*=s,1===r)for(let n=0;n<f;++n)i[o]=e[0],i[o+1]=e[1],i[o+2]=e[2],i[o+3]=e[3],o+=s;else for(let n=0;n<f;++n)for(let t=0;t<r;++t)i[o]=e[0],i[o+1]=e[1],i[o+2]=e[2],i[o+3]=e[3],o+=s}function j(e,t,f,o,r,i){const{buffer:n,offset:c}=i;for(const l of f.fields.keys()){const f=e.get(l),i=f?.indices;if(f&&i)q(l,f,o,r,n,c);else if("olidColor"===l&&null!=t){const f=e.get("position")?.indices;if(f){const e=f.length;M(t,n.getField(l,s),e,c)}}}}function q(e,t,f,o,r,i){switch(e){case"position":{y(3===t.size);const o=r.getField(e,c);y(!!o,`No buffer view for ${e}`),z(t,f,o,i);break}case"normal":{y(3===t.size);const f=r.getField(e,c);y(!!f,`No buffer view for ${e}`),S(t,o,f,i);break}case"normalCompressed":case"profileRight":case"profileUp":{y(2===t.size);const f=r.getField(e,a);y(!!f,`No buffer view for ${e}`),B(t,f,i);break}case"uv0":{y(2===t.size);const f=r.getField(e,p)??r.getField(e,g);y(!!f,`No buffer view for ${e}`),B(t,f,i);break}case"uvi":{y(2===t.size);const f=r.getField(e,a);y(!!f,`No buffer view for ${e}`),B(t,f,i);break}case"color":case"symbolColor":{const f=r.getField(e,s);y(!!f,`No buffer view for ${e}`),y(3===t.size||4===t.size),N(t,t.size,f,i);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const f=r.getField(e,u)??r.getField(e,u);y(!!f,`No buffer view for ${e}`),y(1===t.size),$(t,f,i);break}case"tangent":{y(4===t.size);const o=r.getField(e,d);y(!!o,`No buffer view for ${e}`),k(t,f,o,i);break}case"profileVertexAndNormal":{y(4===t.size);const f=r.getField(e,l)??r.getField(e,d);y(!!f,`No buffer view for ${e}`),h(t,f,i);break}case"profileAuxData":{y(3===t.size);const f=r.getField(e,n)??r.getField(e,c);y(!!f,`No buffer view for ${e}`),m(t,f,i);break}}}export{q as writeAttribute,j as writeAttributes,b as writeBufferFloat,v as writeBufferMat3f,w as writeBufferMat4f,B as writeBufferVec2,m as writeBufferVec3,h as writeBufferVec4,F as writeBufferZeros,N as writeColor,x as writeDeltaF16Vector,S as writeNormal,M as writeOlidColor,z as writePosition,k as writeTangent,$ as writeVVFeatureAttribute};
2
+ import{subtract as e,length as t,scale as f}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isOrthoNormal as r,hasIdentityRotation as i}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{BufferViewVec4u8 as s,BufferViewVec3f16 as n,BufferViewVec3f as c,BufferViewVec4f16 as l,BufferViewVec4f as d,BufferViewFloat as u,BufferViewVec2i16 as a,BufferViewVec2f16 as p,BufferViewVec2f as g}from"../../../../../geometry/support/buffer/BufferView.js";import{assert as b}from"../../lib/Util.js";function y(e,t,f,o=1){const{data:r,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===o)for(let l=0;l<c;++l)s[f]=r[i[l]],f+=n;else for(let l=0;l<c;++l){const e=r[i[l]];for(let t=0;t<o;t++)s[f]=e,f+=n}}function B(e,t,f){const{data:o,indices:r}=e,i=t.typedBuffer,s=t.typedBufferStride,n=r.length;f*=s;for(let c=0;c<n;++c){const e=2*r[c];i[f]=o[e],i[f+1]=o[e+1],f+=s}}function h(e,t,f,o=1){const{data:r,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===o)for(let l=0;l<c;++l){const e=3*i[l];s[f]=r[e],s[f+1]=r[e+1],s[f+2]=r[e+2],f+=n}else for(let l=0;l<c;++l){const e=3*i[l];for(let t=0;t<o;++t)s[f]=r[e],s[f+1]=r[e+1],s[f+2]=r[e+2],f+=n}}function m(e,t,f,o=1){const{data:r,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===o)for(let l=0;l<c;++l){const e=4*i[l];s[f]=r[e],s[f+1]=r[e+1],s[f+2]=r[e+2],s[f+3]=r[e+3],f+=n}else for(let l=0;l<c;++l){const e=4*i[l];for(let t=0;t<o;++t)s[f]=r[e],s[f+1]=r[e+1],s[f+2]=r[e+2],s[f+3]=r[e+3],f+=n}}function F(e,t,f){const o=e.typedBuffer,r=e.typedBufferStride,i=e.elementCount;t*=r;for(let s=0;s<f;++s){for(let e=0;e<i;++e)o[t+e]=0;t+=r}}function v(e,t,f){const{data:o,indices:r}=e,i=t.typedBuffer,s=t.typedBufferStride,n=r.length;f*=s;for(let c=0;c<n;++c){const e=9*r[c];for(let t=0;t<9;++t)i[f+t]=o[e+t];f+=s}}function z(e,t,f){const{data:o,indices:r}=e,i=t.typedBuffer,s=t.typedBufferStride,n=r.length;f*=s;for(let c=0;c<n;++c){const e=16*r[c];for(let t=0;t<16;++t)i[f+t]=o[e+t];f+=s}}function w(e,t,f,o,r=1){if(!t)return void h(e,f,o,r);const{data:s,indices:n}=e,c=f.typedBuffer,l=f.typedBufferStride,d=n.length,u=t[0],a=t[1],p=t[2],g=t[4],b=t[5],y=t[6],B=t[8],m=t[9],F=t[10],v=t[12],z=t[13],w=t[14];o*=l;let S=0,k=0,N=0;const $=i(t)?e=>{S=s[e]+v,k=s[e+1]+z,N=s[e+2]+w}:e=>{const t=s[e],f=s[e+1],o=s[e+2];S=u*t+g*f+B*o+v,k=a*t+b*f+m*o+z,N=p*t+y*f+F*o+w};if(1===r)for(let i=0;i<d;++i)$(3*n[i]),c[o]=S,c[o+1]=k,c[o+2]=N,o+=l;else for(let i=0;i<d;++i){$(3*n[i]);for(let e=0;e<r;++e)c[o]=S,c[o+1]=k,c[o+2]=N,o+=l}}function S(e,t,f,o,s=1){if(!t)return void h(e,f,o,s);const{data:n,indices:c}=e,l=t,d=f.typedBuffer,u=f.typedBufferStride,a=c.length,p=l[0],g=l[1],b=l[2],y=l[4],B=l[5],m=l[6],F=l[8],v=l[9],z=l[10],w=!r(l),S=1e-6,k=1-S;o*=u;let N=0,$=0,x=0;const A=i(l)?e=>{N=n[e],$=n[e+1],x=n[e+2]}:e=>{const t=n[e],f=n[e+1],o=n[e+2];N=p*t+y*f+F*o,$=g*t+B*f+v*o,x=b*t+m*f+z*o};if(1===s)if(w)for(let r=0;r<a;++r){A(3*c[r]);const e=N*N+$*$+x*x;if(e<k&&e>S){const t=1/Math.sqrt(e);d[o]=N*t,d[o+1]=$*t,d[o+2]=x*t}else d[o]=N,d[o+1]=$,d[o+2]=x;o+=u}else for(let r=0;r<a;++r)A(3*c[r]),d[o]=N,d[o+1]=$,d[o+2]=x,o+=u;else for(let r=0;r<a;++r){if(A(3*c[r]),w){const e=N*N+$*$+x*x;if(e<k&&e>S){const t=1/Math.sqrt(e);N*=t,$*=t,x*=t}}for(let e=0;e<s;++e)d[o]=N,d[o+1]=$,d[o+2]=x,o+=u}}function k(e,t,f,o,i=1){if(!t)return void m(e,f,o,i);const{data:s,indices:n}=e,c=t,l=f.typedBuffer,d=f.typedBufferStride,u=n.length,a=c[0],p=c[1],g=c[2],b=c[4],y=c[5],B=c[6],h=c[8],F=c[9],v=c[10],z=!r(c),w=1e-6,S=1-w;if(o*=d,1===i)for(let r=0;r<u;++r){const e=4*n[r],t=s[e],f=s[e+1],i=s[e+2],c=s[e+3];let u=a*t+b*f+h*i,m=p*t+y*f+F*i,k=g*t+B*f+v*i;if(z){const e=u*u+m*m+k*k;if(e<S&&e>w){const t=1/Math.sqrt(e);u*=t,m*=t,k*=t}}l[o]=u,l[o+1]=m,l[o+2]=k,l[o+3]=c,o+=d}else for(let r=0;r<u;++r){const e=4*n[r],t=s[e],f=s[e+1],c=s[e+2],u=s[e+3];let m=a*t+b*f+h*c,k=p*t+y*f+F*c,N=g*t+B*f+v*c;if(z){const e=m*m+k*k+N*N;if(e<S&&e>w){const t=1/Math.sqrt(e);m*=t,k*=t,N*=t}}for(let r=0;r<i;++r)l[o]=m,l[o+1]=k,l[o+2]=N,l[o+3]=u,o+=d}}function N(e,t,f,o,r=1){const{data:i,indices:s}=e,n=f.typedBuffer,c=f.typedBufferStride,l=s.length;if(o*=c,t===i.length&&4===t){n[o]=i[0],n[o+1]=i[1],n[o+2]=i[2],n[o+3]=i[3];const e=new Uint32Array(f.typedBuffer.buffer,f.start),t=c/4,s=e[o/=4];o+=t;const d=l*r;for(let f=1;f<d;++f)e[o]=s,o+=t;return}if(1!==r)if(4!==t)for(let d=0;d<l;++d){const e=3*s[d];for(let t=0;t<r;++t)n[o]=i[e],n[o+1]=i[e+1],n[o+2]=i[e+2],n[o+3]=255,o+=c}else for(let d=0;d<l;++d){const e=4*s[d];for(let t=0;t<r;++t)n[o]=i[e],n[o+1]=i[e+1],n[o+2]=i[e+2],n[o+3]=i[e+3],o+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*s[e];n[o]=i[t],n[o+1]=i[t+1],n[o+2]=i[t+2],n[o+3]=i[t+3],o+=c}return}for(let e=0;e<l;++e){const t=3*s[e];n[o]=i[t],n[o+1]=i[t+1],n[o+2]=i[t+2],n[o+3]=255,o+=c}}}function $(e,t,f){const{data:o,indices:r}=e,i=t.typedBuffer,s=t.typedBufferStride,n=r.length,c=o[0];f*=s;for(let l=0;l<n;++l)i[f]=c,f+=s}function x(o,r,i,s){e(A,o,r);const n=Math.max(Math.sqrt(t(A)),1e-4);f(A,A,1/n),i[s++]=A[0],i[s++]=A[1],i[s++]=A[2],i[s++]=n}const A=o();function M(e,t,f,o,r=1){const i=t.typedBuffer,s=t.typedBufferStride;if(o*=s,1===r)for(let n=0;n<f;++n)i[o]=e[0],i[o+1]=e[1],i[o+2]=e[2],i[o+3]=e[3],o+=s;else for(let n=0;n<f;++n)for(let t=0;t<r;++t)i[o]=e[0],i[o+1]=e[1],i[o+2]=e[2],i[o+3]=e[3],o+=s}function j(e,t,f,o,r,i){const{buffer:n,offset:c}=i;for(const l of f.fields.keys()){const f=e.get(l),i=f?.indices;if(f&&i)q(l,f,o,r,n,c);else if("olidColor"===l&&null!=t){const f=e.get("position")?.indices;if(f){const e=f.length;M(t,n.getField(l,s),e,c)}}}}function q(e,t,f,o,r,i){switch(e){case"position":{b(3===t.size);const o=r.getField(e,c);b(!!o,`No buffer view for ${e}`),w(t,f,o,i);break}case"normal":{b(3===t.size);const f=r.getField(e,c);b(!!f,`No buffer view for ${e}`),S(t,o,f,i);break}case"normalCompressed":case"profileRight":case"profileUp":{b(2===t.size);const f=r.getField(e,a);b(!!f,`No buffer view for ${e}`),B(t,f,i);break}case"uv0":{b(2===t.size);const f=r.getField(e,p)??r.getField(e,g);b(!!f,`No buffer view for ${e}`),B(t,f,i);break}case"uvi":{b(2===t.size);const f=r.getField(e,a);b(!!f,`No buffer view for ${e}`),B(t,f,i);break}case"color":case"symbolColor":{const f=r.getField(e,s);b(!!f,`No buffer view for ${e}`),b(3===t.size||4===t.size),N(t,t.size,f,i);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const f=r.getField(e,u)??r.getField(e,u);b(!!f,`No buffer view for ${e}`),b(1===t.size),$(t,f,i);break}case"tangent":{b(4===t.size);const o=r.getField(e,d);b(!!o,`No buffer view for ${e}`),k(t,f,o,i);break}case"profileVertexAndNormal":{b(4===t.size);const f=r.getField(e,l)??r.getField(e,d);b(!!f,`No buffer view for ${e}`),m(t,f,i);break}case"profileAuxData":{b(3===t.size);const f=r.getField(e,n)??r.getField(e,c);b(!!f,`No buffer view for ${e}`),h(t,f,i);break}}}function C(e,t,f,o){const{data:r,stride:i,size:s,indices:n}=e;b(1===s,"Index should be 1D");const c=n.length;for(let l=0;l<c;++l){const e=r[i*n[l]];t.set(f+l,o+e)}}function U(e,t,f,o){for(let r=0;r<o;++r)e.set(t+r,f)}export{q as writeAttribute,j as writeAttributes,y as writeBufferFloat,v as writeBufferMat3f,z as writeBufferMat4f,B as writeBufferVec2,h as writeBufferVec3,m as writeBufferVec4,F as writeBufferZeros,N as writeColor,U as writeConstTextureElementIndex,x as writeDeltaF16Vector,S as writeNormal,M as writeOlidColor,w as writePosition,k as writeTangent,C as writeTextureElementIndex,$ as writeVVFeatureAttribute};
@@ -1,6 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{smoothstep as r}from"../../../../core/mathUtils.js";import{set as t}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{squaredLength as a}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{radiusModifier as s}from"../../../../geometry/ellipsoidUtils.js";import{moon as i,mars as n,earth as l}from"../../../../geometry/support/Ellipsoid.js";import{Float2BindUniform as c}from"../core/shaderModules/Float2BindUniform.js";import{Float3BindUniform as m}from"../core/shaderModules/Float3BindUniform.js";import{glsl as p}from"../core/shaderModules/glsl.js";import{parameter as h,ShaderTechniqueConfiguration as d}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{SphereIntersect as f}from"./SphereIntersect.glsl.js";class u extends d{constructor(){super(...arguments),this.ellipsoidMode=1}}function y(e,o){e.fragment.uniforms.add(new c("cameraHeights",e=>{const i=e.camera,n=a(i.eye),l=Math.sqrt(n),c=j(o)*s,m=n-c*c;let p=r(4e6,5e6,l-c);return p=Math.min(p,.98),t(g,p,m)}),new m("cameraPosition",e=>e.camera.eye)),e.fragment.include(f),e.fragment.code.add(p`float sphereFade() {return cameraHeights[0];}
3
- float sphereDepthInterpolate(vec3 worldRay, vec3 viewRay, float currentLinearDepth) {
2
+ import{__decorate as e}from"tslib";import{smoothstep as r}from"../../../../core/mathUtils.js";import{set as t}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{squaredLength as a}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{radiusModifier as s}from"../../../../geometry/ellipsoidUtils.js";import{moon as i,mars as n,earth as c}from"../../../../geometry/support/Ellipsoid.js";import{Float2BindUniform as l}from"../core/shaderModules/Float2BindUniform.js";import{Float3BindUniform as m}from"../core/shaderModules/Float3BindUniform.js";import{glsl as p}from"../core/shaderModules/glsl.js";import{parameter as h,ShaderTechniqueConfiguration as d}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{SphereIntersect as f}from"./SphereIntersect.glsl.js";class u extends d{constructor(){super(...arguments),this.ellipsoidMode=1}}function y(e,o){e.fragment.uniforms.add(new l("cameraHeights",e=>{const i=e.camera,n=a(i.eye),c=Math.sqrt(n),l=j(o)*s,m=n-l*l;let p=r(w,M,c-l);return p=Math.min(p,.98),t(g,p,m)}),new m("cameraPosition",e=>e.camera.eye)),e.fragment.include(f),e.fragment.code.add(p`float sphereDepthInterpolate(vec3 worldRay, vec3 viewRay, float currentLinearDepth) {
4
3
  vec2 rayPlanetIntersect = sphereIntersect(cameraPosition, worldRay, cameraHeights[1]);
5
4
  bool hitsPlanet = (rayPlanetIntersect.x <= rayPlanetIntersect.y) && rayPlanetIntersect.x > 0.0;
6
5
  if (hitsPlanet) {
@@ -11,4 +10,4 @@ float sphereFade = cameraHeights[0];
11
10
  return (-linearDepth) * sphereFade + currentLinearDepth * (1.0 - sphereFade);
12
11
  }
13
12
  return currentLinearDepth;
14
- }`)}e([h({count:4})],u.prototype,"ellipsoidMode",void 0);const g=o();function j({ellipsoidMode:e}){switch(e){case 4:case 1:return l.radius;case 2:return n.radius;case 3:return i.radius}}export{u as SphereDepthInterpolateConfiguration,j as getPlanetRadius,y as sphereDepthInterpolate};
13
+ }`)}e([h({count:4})],u.prototype,"ellipsoidMode",void 0);const g=o();function j({ellipsoidMode:e}){switch(e){case 4:case 1:return c.radius;case 2:return n.radius;case 3:return i.radius}}function v(e,r){const{eye:t}=e;return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])-j(r)*s>w}const w=4e6,M=5e6;export{u as SphereDepthInterpolateConfiguration,j as getPlanetRadius,v as isSphereDepthInterpolateActive,M as maximalSphereDepthInterpolateCameraHeight,w as minimalSphereDepthInterpolateCameraHeight,y as sphereDepthInterpolate};
@@ -1,4 +1,8 @@
1
+ import type Graphic from "../Graphic.js";
1
2
  import type Popup from "../widgets/Popup.js";
3
+ import type { AbortOptions } from "../core/promiseUtils.js";
4
+ import type { ScreenPoint } from "../core/types.js";
5
+ import type { PointerType } from "./input/types.js";
2
6
  import type { PopupProperties } from "../widgets/Popup.js";
3
7
  import type { PopupOpenOptions } from "../widgets/Popup/types.js";
4
8
 
@@ -114,6 +118,62 @@ export abstract class PopupView {
114
118
  * }
115
119
  */
116
120
  closePopup(): void;
121
+ /**
122
+ * Use this method to query for features at a given screen location.
123
+ * These features come from origins (layers and sublayers) configured with a [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/)
124
+ * and have its [FeatureLayer.popupEnabled](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#popupEnabled) set.
125
+ *
126
+ * One example could be a custom side panel that displays feature-specific information based on
127
+ * an end user's click location. This method allows a developer to
128
+ * control how the input location is handled, and then subsequently, what to do with the results.
129
+ *
130
+ * @param screenPoint
131
+ * @param options
132
+ * @returns An async generator of features ready to be displayed by the popup,
133
+ * with the attributes and geometry required by their popup template.
134
+ * Generator yields features as soon as they are available in the top to bottom order.
135
+ * @since 5.1
136
+ * @example
137
+ * // Consume features from the generator as soon as they are available
138
+ * view.on("click", async (event) => {
139
+ * const generator = view.fetchPopupFeatures(event.screenPoint, {
140
+ * pointerType: event.pointerType
141
+ * });
142
+ *
143
+ * for await (const feature of generator) {
144
+ * console.log(feature);
145
+ * }
146
+ * });
147
+ * @example
148
+ * // Wait for all the features to be available
149
+ * view.on("click", async (event) => {
150
+ * const generator = view.fetchPopupFeatures(event.screenPoint, {
151
+ * pointerType: event.pointerType
152
+ * });
153
+ *
154
+ * const features = await Array.fromAsync(generator);
155
+ *
156
+ * console.log(`${features.length} available for popup`);
157
+ * });
158
+ * @example
159
+ * // Get the top most feature
160
+ * view.on("click", async (event) => {
161
+ * const controller = new AbortController();
162
+ * const generator = view.fetchPopupFeatures(event.screenPoint, {
163
+ * pointerType: event.pointerType,
164
+ * signal: controller.signal
165
+ * });
166
+ *
167
+ * const result = await generator.next();
168
+ * const feature = result.done ? null : result.value;
169
+ *
170
+ * // abort the pending iterations
171
+ * controller.abort();
172
+ *
173
+ * console.log(`top most feature`, feature);
174
+ * });
175
+ */
176
+ fetchPopupFeatures(screenPoint: ScreenPoint, options?: FetchPopupFeaturesOptions): AsyncGenerator<Graphic>;
117
177
  /**
118
178
  * Opens the popup at the given location with content defined either explicitly with `content`
119
179
  * or driven from the [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) of input features. This method sets
@@ -181,4 +241,20 @@ export abstract class PopupView {
181
241
  openPopup(options?: ViewPopupOpenOptions): Promise<void>;
182
242
  }
183
243
 
184
- export type ViewPopupOpenOptions = Pick<PopupOpenOptions, "actions" | "content" | "features" | "fetchFeatures" | "location" | "promises" | "title" | "updateLocationEnabled">;
244
+ export type ViewPopupOpenOptions = Pick<PopupOpenOptions, "actions" | "content" | "features" | "fetchFeatures" | "location" | "promises" | "title" | "updateLocationEnabled">;
245
+
246
+ /**
247
+ * Options for the [fetchPopupFeatures()](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#fetchPopupFeatures) method. See properties below for object specifications.
248
+ *
249
+ * @since 5.1
250
+ */
251
+ export interface FetchPopupFeaturesOptions extends AbortOptions {
252
+ /**
253
+ * The type of pointer coming from the input event.
254
+ * It influences the tolerence when querying for features on services.
255
+ * A `touch` pointer uses a larger tolerence than `mouse` or `pen`.
256
+ */
257
+ pointerType?: PointerType;
258
+ /** A default popup template is automatically used if no `popupTemplate` is defined for a feature's origin */
259
+ defaultPopupTemplateEnabled?: boolean;
260
+ }
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as p}from"tslib";import{createTask as e}from"../core/asyncUtils.js";import t from"../core/Error.js";import has from"../core/has.js";import o from"../core/Logger.js";import{throwIfAborted as i,wrapAbortWithTimeout as s,allSettledValues as r}from"../core/promiseUtils.js";import{watch as u,syncAndInitial as n,whenOnce as a}from"../core/reactiveUtils.js";import{property as c,subclass as h}from"../core/accessorSupport/decorators.js";import{addPopup as l,openPopupWithViewClick as m,isPopup as d,isPopupElement as f,openPopupWithOptions as w,closePopup as y}from"./popupAdapter.js";import{ViewEventPriorities as g}from"./input/InputManager.js";const P=P=>{const _=P;let v=class extends _{constructor(...p){super(...p),this._popupSetupTask=null,this.popupEnabled=!0,this.popup={}}initialize(){this.addHandles([u(()=>[this.ui,this.popup,this.popupElement],([p,e,t],o)=>{const[i,s,r]=o??[];l(this,[p,e,t],[i,s,r])},n),this.on("click",p=>{this.popup&&this.popupEnabled&&("mouse"!==p.pointerType||0===p.button)&&m(this,p)},g.WIDGET)]),a(()=>this.ready&&this.popupEnabled&&!this.updating).then(()=>import("../widgets/Popup.js"))}destroy(){this.destroyed||this.closePopup()}get popup(){return this._get("popup")}set popup(p){this._set("popup",p)}async openPopup(p){if(d(this.popup))return this.popup.open(p);if(this.popupElement&&f(this.popupElement))this.popupElement.open(p).catch(()=>{});else try{if(await this.setupPopup(),!this.popup)return void o.getLogger(this).error(new t("view:null-popup","Popup is null and can't be opened"));w(this,p)}catch{}}closePopup(){this._popupSetupTask?.abort(),y(this.popup,this.popupElement)}async fetchPopupFeaturesLegacy(p,e){return await this.when(),this._popupHitsToFeatures(await this._getPopupHits(p,e),e)}async setupPopup(){if(this._popupSetupTask?.abort(),this.popup&&!d(this.popup))return this._popupSetupTask=e(async p=>{if(!this.popupEnabled||!f(this.popupElement))if(this.dependencies.popup&&"function"==typeof this.dependencies.popup)await this.dependencies.popup(),i(p),customElements.get("arcgis-popup")||o.getLogger(this).error(new t("view:undefined-popup-element","`arcgis-popup` custom element is undefined and can't be opened")),this.popupElement=document.createElement("arcgis-popup");else{const{default:e}=await import("../widgets/Popup.js");if(i(p),!this.popup||d(this.popup))return;const t=this.popup;if("open"in t||"close"in t){const{open:p,close:o,...i}=t;this.popup=new e({...i})}else this.popup=new e(t)}}),this._popupSetupTask.promise}async _popupHitsToFeatures({location:p,hits:e},t){const o=[],i=[];let u=!1;const n=s(t,has("popup-view-fetch-timeout")??E),a=p=>{const e=new V(p);return i.push(e),o.push(e.promise),e},c=p=>{const e=i.at(-1);return e&&e.layerView===p&&!u?e:a(p)};for(const s of e)if("graphic"in s){c(s.layerView).graphics.push(s.graphic),u=!1}else o.push(s.layerView.fetchPopupFeaturesAtLocation(s.mapPoint,n)),u=!0;i.forEach(p=>p.resolve(n));const h=r(o).then(p=>p.filter(p=>!!p).flat());return{pendingFeatures:o,allGraphicsPromise:h,location:p}}async _getPopupHits(p,e){const{hits:t,location:o}=await this.popupHitTest(p);i(e);const s=[];for(const i of t)if("graphic"in i){if(this._isValidPopupGraphic(i.graphic,e)){const p=this._isValidPopupGraphicsLayerView(i.layerView)?i.layerView:void 0;s.push({graphic:i.graphic,layerView:p})}}else this._isValidPopupLocationLayerView(i.layerView)&&s.push({mapPoint:i.mapPoint,layerView:i.layerView});return{hits:s,location:o}}_isValidPopupGraphic(p,e){return p&&!!p.getEffectivePopupTemplate(e?.defaultPopupTemplateEnabled)}_isValidPopupGraphicsLayerView(p){return!p||(!("layer"in p)||!p.suspended)&&"fetchPopupFeaturesFromGraphics"in p}_isValidPopupLocationLayerView(p){return(!("layer"in p)||!p.suspended)&&"fetchPopupFeaturesAtLocation"in p}};return p([c()],v.prototype,"popup",null),p([c()],v.prototype,"popupElement",void 0),p([c()],v.prototype,"popupEnabled",void 0),v=p([h("esri.views.PopupView")],v),v};class V{constructor(p){this.layerView=p,this._resolver=Promise.withResolvers(),this.graphics=[]}get promise(){return this._resolver.promise}resolve(p){const{layerView:e,graphics:t,_resolver:o}=this;if(!e)return o.resolve(t),o.promise;let i;return e.fetchPopupFeaturesFromGraphics(t,p).catch(p=>(i=p,null)).then(p=>{p?o.resolve(p):o.reject(i)}),o.promise}}const E=5e3;export{P as PopupView};
2
+ import{__decorate as p}from"tslib";import{createTask as e}from"../core/asyncUtils.js";import t from"../core/Error.js";import{generatorFlat as o,generatorFromPromises as i}from"../core/generatorUtils.js";import has from"../core/has.js";import s from"../core/Logger.js";import{throwIfAborted as r,wrapAbortWithTimeout as u,allSettledValues as n}from"../core/promiseUtils.js";import{watch as a,syncAndInitial as h,whenOnce as c}from"../core/reactiveUtils.js";import{property as l,subclass as m}from"../core/accessorSupport/decorators.js";import{addPopup as d,openPopupWithViewClick as f,isPopup as w,isPopupElement as g,openPopupWithOptions as y,closePopup as P}from"./popupAdapter.js";import{ViewEventPriorities as V}from"./input/InputManager.js";const _=_=>{const j=_;let F=class extends j{constructor(...p){super(...p),this._popupSetupTask=null,this.popupEnabled=!0,this.popup={}}initialize(){this.addHandles([a(()=>[this.ui,this.popup,this.popupElement],([p,e,t],o)=>{const[i,s,r]=o??[];d(this,[p,e,t],[i,s,r])},h),this.on("click",p=>{this.popup&&this.popupEnabled&&("mouse"!==p.pointerType||0===p.button)&&f(this,p)},V.WIDGET)]),c(()=>this.ready&&this.popupEnabled&&!this.updating).then(()=>import("../widgets/Popup.js"))}destroy(){this.destroyed||this.closePopup()}get popup(){return this._get("popup")}set popup(p){this._set("popup",p)}async openPopup(p){if(w(this.popup))return this.popup.open(p);if(this.popupElement&&g(this.popupElement))this.popupElement.open(p).catch(()=>{});else try{if(await this.setupPopup(),!this.popup)return void s.getLogger(this).error(new t("view:null-popup","Popup is null and can't be opened"));y(this,p)}catch{}}closePopup(){this._popupSetupTask?.abort(),P(this.popup,this.popupElement)}async*fetchPopupFeatures(p,e){await this.when();const{pendingFeatures:t}=this._popupHitsToFeatures(await this._getPopupHits(p,e),e);yield*o(i(t,e),e)}async fetchPopupFeaturesLegacy(p,e){return await this.when(),this._popupHitsToFeatures(await this._getPopupHits(p,e),e)}async setupPopup(){if(this._popupSetupTask?.abort(),this.popup&&!w(this.popup))return this._popupSetupTask=e(async p=>{if(!this.popupEnabled||!g(this.popupElement))if(this.dependencies.popup&&"function"==typeof this.dependencies.popup)await this.dependencies.popup(),r(p),customElements.get("arcgis-popup")||s.getLogger(this).error(new t("view:undefined-popup-element","`arcgis-popup` custom element is undefined and can't be opened")),this.popupElement=document.createElement("arcgis-popup");else{const{default:e}=await import("../widgets/Popup.js");if(r(p),!this.popup||w(this.popup))return;const t=this.popup;if("open"in t||"close"in t){const{open:p,close:o,...i}=t;this.popup=new e({...i})}else this.popup=new e(t)}}),this._popupSetupTask.promise}_popupHitsToFeatures({location:p,hits:e},t){const o=[],i=[];let s=!1;const r=u(t,has("popup-view-fetch-timeout")??v),a=p=>{const e=new E(p);return i.push(e),o.push(e.promise),e},h=p=>{const e=i.at(-1);return e&&e.layerView===p&&!s?e:a(p)};for(const u of e)if("graphic"in u){h(u.layerView).graphics.push(u.graphic),s=!1}else o.push(u.layerView.fetchPopupFeaturesAtLocation(u.mapPoint,r)),s=!0;i.forEach(p=>p.resolve(r));const c=n(o).then(p=>p.filter(p=>!!p).flat());return{pendingFeatures:o,allGraphicsPromise:c,location:p}}async _getPopupHits(p,e){const{hits:t,location:o}=await this.popupHitTest(p);r(e);const i=[];for(const s of t)if("graphic"in s){if(this._isValidPopupGraphic(s.graphic,e)){const p=this._isValidPopupGraphicsLayerView(s.layerView)?s.layerView:void 0;i.push({graphic:s.graphic,layerView:p})}}else this._isValidPopupLocationLayerView(s.layerView)&&i.push({mapPoint:s.mapPoint,layerView:s.layerView});return{hits:i,location:o}}_isValidPopupGraphic(p,e){return p&&!!p.getEffectivePopupTemplate(e?.defaultPopupTemplateEnabled)}_isValidPopupGraphicsLayerView(p){return!p||(!("layer"in p)||!p.suspended)&&"fetchPopupFeaturesFromGraphics"in p}_isValidPopupLocationLayerView(p){return(!("layer"in p)||!p.suspended)&&"fetchPopupFeaturesAtLocation"in p}};return p([l()],F.prototype,"popup",null),p([l()],F.prototype,"popupElement",void 0),p([l()],F.prototype,"popupEnabled",void 0),F=p([m("esri.views.PopupView")],F),F};class E{constructor(p){this.layerView=p,this._resolver=Promise.withResolvers(),this.graphics=[]}get promise(){return this._resolver.promise}resolve(p){const{layerView:e,graphics:t,_resolver:o}=this;if(!e)return o.resolve(t),o.promise;let i;return e.fetchPopupFeaturesFromGraphics(t,p).catch(p=>(i=p,null)).then(p=>{p?o.resolve(p):o.reject(i)}),o.promise}}const v=5e3;export{_ as PopupView};