@arcgis/core 5.1.0-next.104 → 5.1.0-next.106

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 (461) 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 +90 -66
  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 +1 -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.json +1 -1
  33. package/assets/esri/core/t9n/Units_ar.json +1 -1
  34. package/assets/esri/core/t9n/Units_bg.json +1 -1
  35. package/assets/esri/core/t9n/Units_bs.json +1 -1
  36. package/assets/esri/core/t9n/Units_ca.json +1 -1
  37. package/assets/esri/core/t9n/Units_cs.json +1 -1
  38. package/assets/esri/core/t9n/Units_da.json +1 -1
  39. package/assets/esri/core/t9n/Units_de.json +1 -1
  40. package/assets/esri/core/t9n/Units_el.json +1 -1
  41. package/assets/esri/core/t9n/Units_en.json +1 -1
  42. package/assets/esri/core/t9n/Units_es.json +1 -1
  43. package/assets/esri/core/t9n/Units_et.json +1 -1
  44. package/assets/esri/core/t9n/Units_fi.json +1 -1
  45. package/assets/esri/core/t9n/Units_fr.json +1 -1
  46. package/assets/esri/core/t9n/Units_he.json +1 -1
  47. package/assets/esri/core/t9n/Units_hr.json +1 -1
  48. package/assets/esri/core/t9n/Units_hu.json +1 -1
  49. package/assets/esri/core/t9n/Units_id.json +1 -1
  50. package/assets/esri/core/t9n/Units_it.json +1 -1
  51. package/assets/esri/core/t9n/Units_ja.json +1 -1
  52. package/assets/esri/core/t9n/Units_ko.json +1 -1
  53. package/assets/esri/core/t9n/Units_lt.json +1 -1
  54. package/assets/esri/core/t9n/Units_lv.json +1 -1
  55. package/assets/esri/core/t9n/Units_nl.json +1 -1
  56. package/assets/esri/core/t9n/Units_no.json +1 -1
  57. package/assets/esri/core/t9n/Units_pl.json +1 -1
  58. package/assets/esri/core/t9n/Units_pt-BR.json +1 -1
  59. package/assets/esri/core/t9n/Units_pt-PT.json +1 -1
  60. package/assets/esri/core/t9n/Units_ro.json +1 -1
  61. package/assets/esri/core/t9n/Units_ru.json +1 -1
  62. package/assets/esri/core/t9n/Units_sk.json +1 -1
  63. package/assets/esri/core/t9n/Units_sl.json +1 -1
  64. package/assets/esri/core/t9n/Units_sr.json +1 -1
  65. package/assets/esri/core/t9n/Units_sv.json +1 -1
  66. package/assets/esri/core/t9n/Units_th.json +1 -1
  67. package/assets/esri/core/t9n/Units_tr.json +1 -1
  68. package/assets/esri/core/t9n/Units_uk.json +1 -1
  69. package/assets/esri/core/t9n/Units_vi.json +1 -1
  70. package/assets/esri/core/t9n/Units_zh-CN.json +1 -1
  71. package/assets/esri/core/t9n/Units_zh-HK.json +1 -1
  72. package/assets/esri/core/t9n/Units_zh-TW.json +1 -1
  73. package/assets/esri/core/workers/RemoteClient.js +1 -1
  74. package/assets/esri/core/workers/chunks/01c70c27aa3a955e2928.js +262 -0
  75. package/assets/esri/core/workers/chunks/{7d571845292b1b7769c2.js → 065dd2fdc834146423c7.js} +1 -1
  76. package/assets/esri/core/workers/chunks/{f5bd0a4f82df5e942b70.js → 093f27e4e4781870b431.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{2a5f6a8d282f2c391591.js → 15920af0c4f46773b06e.js} +1 -1
  78. package/assets/esri/core/workers/chunks/179c9fe4ac83b42e5976.js +1 -0
  79. package/assets/esri/core/workers/chunks/1d1929f98d941179be29.js +2 -0
  80. package/assets/esri/core/workers/chunks/{24247ee93f43fff5e596.js.LICENSE.txt → 1d1929f98d941179be29.js.LICENSE.txt} +1 -3
  81. package/assets/esri/core/workers/chunks/1ebb613bbe09fcf274d8.js +1 -0
  82. package/assets/esri/core/workers/chunks/24b43fb12fc3009fdc30.js +1 -0
  83. package/assets/esri/core/workers/chunks/2b9661700743d1f9717e.js +1 -0
  84. package/assets/esri/core/workers/chunks/2f0a3b22fc46d832e240.js +1 -0
  85. package/assets/esri/core/workers/chunks/340f2c996f62f7f5ceae.js +1 -0
  86. package/assets/esri/core/workers/chunks/466c250537415f12eb59.js +1 -0
  87. package/assets/esri/core/workers/chunks/549d348ca181d06aefb7.js +2 -0
  88. package/assets/esri/core/workers/chunks/{0cb8bc6dbbbe3b212712.js → 558606a1af22e4a0d536.js} +1 -1
  89. package/assets/esri/core/workers/chunks/{7485d59d60d61737d662.js → 55b765c72d13b3b911f9.js} +1 -1
  90. package/assets/esri/core/workers/chunks/5cdf87e7a59ace38df87.js +1 -0
  91. package/assets/esri/core/workers/chunks/622bdd1b9d5d292ec12b.js +1 -0
  92. package/assets/esri/core/workers/chunks/{bff0c4094c14cb97b18f.js → 63ea4191d441efd2f146.js} +1 -1
  93. package/assets/esri/core/workers/chunks/69c9eb93553b006b640d.js +2 -0
  94. package/assets/esri/core/workers/chunks/6d20d741b8ae1a45b422.js +1 -0
  95. package/assets/esri/core/workers/chunks/{b63cbf6c2c9ec1b02b9a.js → 6e21675bbd7a44070771.js} +1 -1
  96. package/assets/esri/core/workers/chunks/702a3ef9e1b3442cbee7.js +1 -0
  97. package/assets/esri/core/workers/chunks/762e23466308f22d7076.js +1 -0
  98. package/assets/esri/core/workers/chunks/{52219561c144e5cb4442.js → 770611659b38066a6228.js} +1 -1
  99. package/assets/esri/core/workers/chunks/{c476f4979048e558baa7.js → 7ce60331f94ee0a5d674.js} +57 -75
  100. package/assets/esri/core/workers/chunks/7e02e5c6979090fe3ea7.js +1 -0
  101. package/assets/esri/core/workers/chunks/825db2ea15308ee6e5dc.js +1 -0
  102. package/assets/esri/core/workers/chunks/{bf2c202dec5ab7bc770b.js → 829a0583b8a228c65379.js} +1 -1
  103. package/assets/esri/core/workers/chunks/8330302096d4312a4393.js +1 -0
  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/8a1751187a20b6578875.js +1 -0
  107. package/assets/esri/core/workers/chunks/{d610f517fb3c6cb24365.js → 8ade869fa9bae446266a.js} +1 -1
  108. package/assets/esri/core/workers/chunks/{44636ef119c6a576470b.js → 94eab215bab3e4e0e5b5.js} +1 -1
  109. package/assets/esri/core/workers/chunks/95dee5853c6e89f15ea9.js +1 -0
  110. package/assets/esri/core/workers/chunks/a5b9ae4c93f9af7589f2.js +1 -0
  111. package/assets/esri/core/workers/chunks/{95798e3de3419fdda6ac.js → a8ae00e06f98e04aee8e.js} +1 -1
  112. package/assets/esri/core/workers/chunks/aaad0d3e82ed917d3886.js +1 -0
  113. package/assets/esri/core/workers/chunks/b3e8ab68fc38306f13c6.js +1 -0
  114. package/assets/esri/core/workers/chunks/b7a81fd4994eabba1869.js +640 -0
  115. package/assets/esri/core/workers/chunks/{9542ef3f6c2bc7c14d85.js → b9850fe7dcdaed0c327c.js} +1 -1
  116. package/assets/esri/core/workers/chunks/{f7e386ece75afb6e4be5.js → bc249bb667f0564ad093.js} +1 -1
  117. package/assets/esri/core/workers/chunks/bd59cb5abc67e46f1b2c.js +2 -0
  118. package/assets/esri/core/workers/chunks/{f3a9100518b044e79501.js → be817be7c81fb630122f.js} +1 -1
  119. package/assets/esri/core/workers/chunks/{3c9482764c9e4f8bcbb0.js → c187bc997bad61b6c6e9.js} +1 -1
  120. package/assets/esri/core/workers/chunks/c4872cf3b71d00f450e1.js +1 -0
  121. package/assets/esri/core/workers/chunks/c5ab346a226df1894302.js +1 -0
  122. package/assets/esri/core/workers/chunks/{ce0c7070eeb723a718e7.js → d859c046a3ea42530bff.js} +1 -1
  123. package/assets/esri/core/workers/chunks/da29cf0e64065631a470.js +1 -0
  124. package/assets/esri/core/workers/chunks/{bb04aff0b4947408592c.js → dcba6c766eee8b90381a.js} +1 -1
  125. package/assets/esri/core/workers/chunks/ddebc1dc10a2d207389f.js +1 -0
  126. package/assets/esri/core/workers/chunks/e393fd61deb2e7f22ee6.js +1 -0
  127. package/assets/esri/core/workers/chunks/ea2bf7c543cc536400b7.js +30 -0
  128. package/assets/esri/core/workers/chunks/ece30bfd5c49b8d99752.js +1 -0
  129. package/assets/esri/core/workers/chunks/ecf4d07917efc97eb991.js +1 -0
  130. package/assets/esri/core/workers/chunks/ee56290e600cbeb25a00.js +1 -0
  131. package/assets/esri/core/workers/chunks/f52c6efc5a2abf5ac845.js +1 -0
  132. package/assets/esri/core/workers/chunks/{5cffc7b49966201eccdb.js → f75295cdd5e84eb97d5a.js} +1 -1
  133. package/assets/esri/core/workers/chunks/f7fe17a22390a24d6df8.js +2 -0
  134. package/assets/esri/core/workers/chunks/f9324420f2c6ac240f63.js +1 -0
  135. package/assets/esri/core/workers/chunks/{855bf811cd79b97c169a.js → fae2c8f053927559fff0.js} +1 -1
  136. package/assets/esri/core/workers/chunks/{64e268ebac0b62076f81.js → fbb23db01f3cf629d32e.js} +1 -1
  137. package/assets/esri/core/workers/chunks/fc1fe1f58a65a1694c09.js +1 -0
  138. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +84 -1
  139. package/assets/esri/themes/dark/main.css +1 -1
  140. package/assets/esri/themes/light/main.css +1 -1
  141. package/assets/esri/themes/light/view.css +1 -1
  142. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
  143. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
  144. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  145. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  146. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  147. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  148. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  149. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  150. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  151. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  152. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  153. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  154. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  155. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  156. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  157. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  158. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  159. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  160. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  161. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  162. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  163. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  164. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  165. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  166. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  167. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  168. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  169. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  170. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  171. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  172. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  173. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  174. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  175. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  176. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  177. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  178. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  179. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  180. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  181. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  182. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  183. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  184. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  185. package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
  186. package/chunks/ChapmanAtmosphere.glsl.js +14 -19
  187. package/chunks/ComponentShader.glsl.js +11 -15
  188. package/chunks/Compositing.glsl.js +4 -4
  189. package/chunks/GaussianSplatShadow.glsl.js +7 -7
  190. package/chunks/GlobalIllumination.glsl.js +27 -50
  191. package/chunks/GlobalIlluminationBlur.glsl.js +16 -11
  192. package/chunks/Terrain.glsl.js +1 -1
  193. package/config.js +1 -1
  194. package/core/ReactiveSet.js +1 -1
  195. package/core/generatorUtils.js +2 -0
  196. package/core/libs/gl-matrix-2/factories/vec2f64.js +1 -1
  197. package/core/libs/gl-matrix-2/math/vec2.js +1 -1
  198. package/core/mathUtils.js +1 -1
  199. package/core/typedArrayUtil.js +1 -1
  200. package/geometry/HeightModelInfo.js +1 -1
  201. package/geometry/geometryEngine.d.ts +2 -2
  202. package/geometry/support/buffer/BufferView.js +1 -1
  203. package/geometry/support/vcsData.js +1 -1
  204. package/geometry/support/vcsLookup.js +1 -1
  205. package/kernel.js +1 -1
  206. package/layers/DimensionLayer.d.ts +5 -5
  207. package/layers/FeatureLayer.d.ts +2 -2
  208. package/layers/GaussianSplatLayer.d.ts +3 -3
  209. package/layers/LineOfSightLayer.d.ts +5 -5
  210. package/layers/ParquetLayer.d.ts +6 -4
  211. package/layers/SubtypeGroupLayer.d.ts +2 -2
  212. package/layers/VideoLayer.js +1 -1
  213. package/layers/ViewshedLayer.d.ts +3 -3
  214. package/layers/graphics/sources/ParquetSource.js +1 -1
  215. package/layers/graphics/sources/parquet/FileProvider.js +2 -0
  216. package/layers/graphics/sources/parquet/PortalParquetFileProvider.js +2 -0
  217. package/layers/graphics/sources/parquet/PortalParquetLayerFileProvider.js +2 -0
  218. package/layers/graphics/sources/parquet/UrlsFileProvider.js +2 -0
  219. package/layers/graphics/sources/parquet/createFileProvider.js +2 -0
  220. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  221. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  222. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -2
  223. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  224. package/layers/knowledgeGraph/layerUtils.js +1 -1
  225. package/layers/orientedImagery/core/utils.js +1 -1
  226. package/layers/raster/datasets/ImageAuxRaster.js +1 -1
  227. package/layers/raster/datasets/pixelReader.js +1 -1
  228. package/layers/raster/formats/JpgPlus.js +1 -1
  229. package/layers/raster/formats/RasterCodec.js +1 -1
  230. package/layers/raster/functions/clipUtils.js +1 -1
  231. package/layers/support/AggregateField.d.ts +2 -1
  232. package/layers/support/LayerContingentValuesCache.js +1 -1
  233. package/layers/support/SubtypeSublayer.d.ts +4 -4
  234. package/layers/support/parquetUtils.d.ts +18 -7
  235. package/layers/support/parquetUtils.js +1 -1
  236. package/layers/support/rasterFunctionUtils.d.ts +2 -2
  237. package/layers/video/VideoController.js +1 -1
  238. package/libs/parquet/parquet.js +1 -1
  239. package/linkChart/ChronologicalLayoutSettings.d.ts +1 -1
  240. package/networks/CircuitManager.d.ts +3 -3
  241. package/networks/UnitIdentifierManager.d.ts +1 -1
  242. package/networks/UnitIdentifierManager.js +1 -1
  243. package/networks/UtilityNetwork.d.ts +2 -2
  244. package/networks/UtilityNetwork.js +1 -1
  245. package/networks/support/Circuit.d.ts +1 -1
  246. package/networks/support/CircuitLocation.d.ts +1 -1
  247. package/networks/support/CircuitSection.d.ts +1 -1
  248. package/networks/support/Subcircuit.d.ts +1 -1
  249. package/networks/support/TraceJobInfo.js +1 -1
  250. package/networks/support/jsonTypes.d.ts +10 -3
  251. package/package.json +3 -3
  252. package/popup/FieldInfo.d.ts +4 -2
  253. package/popup/support/FieldInfoFormat.d.ts +3 -2
  254. package/rest/featureService/FeatureService.d.ts +1 -1
  255. package/rest/knowledgeGraph/FieldIndex.d.ts +1 -1
  256. package/rest/knowledgeGraph/GraphObjectType.d.ts +2 -2
  257. package/rest/knowledgeGraph/GraphSearch.d.ts +1 -1
  258. package/rest/knowledgeGraph/GraphSearchStreaming.d.ts +1 -1
  259. package/rest/networks/circuits/support/ExportCircuitsParameters.d.ts +19 -1
  260. package/rest/networks/circuits/support/ExportCircuitsResult.js +1 -1
  261. package/rest/networks/circuits/support/VerifyCircuitsParameters.d.ts +18 -10
  262. package/rest/networks/circuits/support/VerifyCircuitsParameters.js +1 -1
  263. package/rest/networks/support/TraceParameters.js +1 -1
  264. package/rest/networks/support/TraceResult.js +1 -1
  265. package/rest/networks/trace.js +1 -1
  266. package/rest/networks/unitIdentifiers/support/QueryUnitIdentifiersParameters.js +1 -1
  267. package/rest/support/AreasAndLengthsParameters.d.ts +1 -1
  268. package/rest/support/GeneralizeParameters.d.ts +1 -1
  269. package/rest/support/Query.d.ts +1 -1
  270. package/rest/support/RelationParameters.d.ts +1 -1
  271. package/rest/support/types.d.ts +1 -1
  272. package/support/revision.js +1 -1
  273. package/symbols/CIMSymbol.d.ts +1 -1
  274. package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +1 -0
  275. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  276. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  277. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  278. package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
  279. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  280. package/views/2d/layers/features/sources/strategies/chunks/ParquetSnapshotSourceChunk.js +1 -1
  281. package/views/2d/layers/features/sources/strategies/chunks/ParquetSourceChunk.js +1 -1
  282. package/views/3d/analysis/AreaMeasurementAnalysisView3D.d.ts +1 -0
  283. package/views/3d/analysis/DimensionAnalysisView3D.d.ts +7 -6
  284. package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.d.ts +2 -0
  285. package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +2 -1
  286. package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +14 -6
  287. package/views/3d/analysis/SliceAnalysisView3D.d.ts +4 -3
  288. package/views/3d/analysis/Viewshed/ViewshedDrawToolRenderer.js +2 -0
  289. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  290. package/views/3d/analysis/Viewshed/ViewshedInteractionVisuals.js +2 -0
  291. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +2 -0
  292. package/views/3d/analysis/Viewshed/ViewshedPlacementOperation.js +2 -0
  293. package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +2 -0
  294. package/views/3d/analysis/Viewshed/ViewshedPlacementRootPlugin.js +2 -0
  295. package/views/3d/analysis/Viewshed/ViewshedSnappingController.js +2 -0
  296. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  297. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
  298. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  299. package/views/3d/analysis/Viewshed/ViewshedTool2.js +1 -1
  300. package/views/3d/analysis/Viewshed/analysisViewRegister.js +1 -1
  301. package/views/3d/analysis/Viewshed/placementUtils.js +2 -0
  302. package/views/3d/analysis/Viewshed/toolLifecycleUtils.js +2 -0
  303. package/views/3d/analysis/Viewshed/viewshedSubToolUtils.js +1 -1
  304. package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
  305. package/views/3d/analysis/ViewshedAnalysisView3D.d.ts +4 -3
  306. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  307. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  308. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  309. package/views/3d/layers/FlowSubView3D.js +1 -1
  310. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  311. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  312. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  313. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  314. package/views/3d/layers/support/UVWorkspace.js +2 -0
  315. package/views/3d/layers/support/patternUtils.js +1 -1
  316. package/views/3d/layers/support/uvUtils.js +1 -1
  317. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  318. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  319. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  320. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  321. package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
  322. package/views/3d/support/meshProcessing.js +1 -1
  323. package/views/3d/terrain/TerrainRenderer.js +1 -1
  324. package/views/3d/terrain/TileCompositor.js +1 -1
  325. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  326. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  327. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +8 -8
  328. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +13 -9
  329. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +63 -49
  330. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  331. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.glsl.js +1 -1
  332. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
  333. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphereTechnique.js +1 -1
  334. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  335. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
  336. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  337. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  338. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
  339. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +1 -1
  340. package/views/3d/webgl-engine/lib/AttributeArray.js +1 -1
  341. package/views/3d/webgl-engine/lib/Compositor.js +1 -1
  342. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  343. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  344. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  345. package/views/3d/webgl-engine/lib/PathCapBuilder.js +1 -1
  346. package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
  347. package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
  348. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  349. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  350. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  351. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  352. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
  353. package/views/3d/webgl-engine/materials/PathLayouts.js +2 -0
  354. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  355. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  356. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  357. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  358. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  359. package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
  360. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  361. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  362. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  363. package/views/3d/webgl-engine/shaders/CompositingTechniqueConfiguration.js +1 -1
  364. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  365. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  366. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  367. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  368. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  369. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  370. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +2 -3
  371. package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
  372. package/views/3d/webgl-engine/shaders/ditherNoise.glsl.js +1 -1
  373. package/views/PopupView.d.ts +77 -1
  374. package/views/PopupView.js +1 -1
  375. package/views/layers/DimensionLayerView.d.ts +2 -1
  376. package/views/layers/FeatureLikeLayerView.js +1 -1
  377. package/views/layers/LineOfSightLayerView.d.ts +2 -1
  378. package/views/layers/ViewshedLayerView.d.ts +2 -1
  379. package/webscene/Slide.js +1 -1
  380. package/widgets/Attachments/types.d.ts +1 -1
  381. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +38 -5
  382. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  383. package/widgets/BatchAttributeForm/ReactiveContingentValuesManager.js +2 -0
  384. package/widgets/BatchAttributeForm/ReactiveGraphic.js +1 -1
  385. package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
  386. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  387. package/widgets/BatchAttributeForm/css.js +1 -1
  388. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +11 -0
  389. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  390. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +77 -0
  391. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  392. package/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput.js +1 -1
  393. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  394. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  395. package/widgets/BatchAttributeForm/interfaceUtils.js +2 -0
  396. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  397. package/widgets/BatchAttributeForm/types.d.ts +30 -2
  398. package/widgets/BatchAttributeForm.d.ts +52 -1
  399. package/widgets/BatchAttributeForm.js +1 -1
  400. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  401. package/widgets/Editor.d.ts +1 -1
  402. package/widgets/FeatureTable/FieldColumn.js +1 -1
  403. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  404. package/widgets/LayerList/LayerListItem.js +1 -1
  405. package/widgets/OrientedImageryViewer/components/VideoEnhancementTools.js +1 -1
  406. package/widgets/OrientedImageryViewer.js +1 -1
  407. package/widgets/TableList/TableListViewModel.js +1 -1
  408. package/widgets/TimeSlider.d.ts +3 -3
  409. package/widgets/Track/TrackViewModel.d.ts +1 -0
  410. package/widgets/Track/TrackViewModel.js +1 -1
  411. package/widgets/Track.js +1 -1
  412. package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +10 -0
  413. package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
  414. package/widgets/support/ContingentValuesManager.js +1 -1
  415. package/widgets/support/GeolocationPositioning.d.ts +1 -0
  416. package/widgets/support/GeolocationPositioning.js +1 -1
  417. package/widgets/support/forms/formUtils.js +1 -1
  418. package/assets/esri/core/workers/chunks/037b36d415ae27e987f9.js +0 -1
  419. package/assets/esri/core/workers/chunks/11b0d3a825fe50dd1e84.js +0 -1
  420. package/assets/esri/core/workers/chunks/1a3426276dc82a8a80f2.js +0 -1
  421. package/assets/esri/core/workers/chunks/1c83e61fd9a4f8fc8372.js +0 -1
  422. package/assets/esri/core/workers/chunks/1cb0c4fc315bbc2bd00b.js +0 -1
  423. package/assets/esri/core/workers/chunks/24247ee93f43fff5e596.js +0 -2
  424. package/assets/esri/core/workers/chunks/276cb6a1cdd26d0e1444.js +0 -1
  425. package/assets/esri/core/workers/chunks/29b00d07d3e1d095c590.js +0 -2
  426. package/assets/esri/core/workers/chunks/2f903bd3a2611e7f0946.js +0 -30
  427. package/assets/esri/core/workers/chunks/2fda38219d778f0447b5.js +0 -1
  428. package/assets/esri/core/workers/chunks/35fdd62277fd06468a29.js +0 -2
  429. package/assets/esri/core/workers/chunks/38d7430d2370b69334d7.js +0 -1
  430. package/assets/esri/core/workers/chunks/39d6032d79720935910d.js +0 -1
  431. package/assets/esri/core/workers/chunks/40caf5e09e4382d81104.js +0 -640
  432. package/assets/esri/core/workers/chunks/4213aa844900fcf95287.js +0 -1
  433. package/assets/esri/core/workers/chunks/594e1f633527749d92d7.js +0 -1
  434. package/assets/esri/core/workers/chunks/5dafd35801dca4229aed.js +0 -1
  435. package/assets/esri/core/workers/chunks/642be1619c0e76355cb6.js +0 -1
  436. package/assets/esri/core/workers/chunks/6d66dc77af8d112c33c6.js +0 -1
  437. package/assets/esri/core/workers/chunks/7b3642195d6d3ea9b830.js +0 -1
  438. package/assets/esri/core/workers/chunks/7e57029ec958f6423d5d.js +0 -2
  439. package/assets/esri/core/workers/chunks/8042e001545e2782499c.js +0 -1
  440. package/assets/esri/core/workers/chunks/881234f25c7814de8753.js +0 -1
  441. package/assets/esri/core/workers/chunks/8a7682071941c35f05c1.js +0 -1
  442. package/assets/esri/core/workers/chunks/8e986167d4a393ee41ea.js +0 -1
  443. package/assets/esri/core/workers/chunks/8fdd57e2a0af647f1e3e.js +0 -1
  444. package/assets/esri/core/workers/chunks/90ea570f6b6ce8ca693b.js +0 -1
  445. package/assets/esri/core/workers/chunks/9373daa677dc767d7cf0.js +0 -1
  446. package/assets/esri/core/workers/chunks/95df6d2ebacc43ac5fa3.js +0 -1
  447. package/assets/esri/core/workers/chunks/a02ebdcb802d128c8eee.js +0 -1
  448. package/assets/esri/core/workers/chunks/adf72d87f0114aeade0e.js +0 -1
  449. package/assets/esri/core/workers/chunks/b1a21a4d7d73ad7d0e47.js +0 -1
  450. package/assets/esri/core/workers/chunks/b75e090a7e935ff870a3.js +0 -1
  451. package/assets/esri/core/workers/chunks/bacf0c9d5d3e084dea61.js +0 -1
  452. package/assets/esri/core/workers/chunks/c0e4fd6fa1d765275248.js +0 -2
  453. package/assets/esri/core/workers/chunks/cc8d55d1830d7542c3f5.js +0 -262
  454. package/assets/esri/core/workers/chunks/cf3c0bee919bb509cd4f.js +0 -1
  455. package/assets/esri/core/workers/chunks/cfaa6e205bfc0c94a1b1.js +0 -1
  456. package/assets/esri/core/workers/chunks/dcb7a3ff59677b1cf0f1.js +0 -1
  457. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphereTechniqueConfiguration.js +0 -2
  458. /package/assets/esri/core/workers/chunks/{7e57029ec958f6423d5d.js.LICENSE.txt → 549d348ca181d06aefb7.js.LICENSE.txt} +0 -0
  459. /package/assets/esri/core/workers/chunks/{29b00d07d3e1d095c590.js.LICENSE.txt → 69c9eb93553b006b640d.js.LICENSE.txt} +0 -0
  460. /package/assets/esri/core/workers/chunks/{35fdd62277fd06468a29.js.LICENSE.txt → bd59cb5abc67e46f1b2c.js.LICENSE.txt} +0 -0
  461. /package/assets/esri/core/workers/chunks/{c0e4fd6fa1d765275248.js.LICENSE.txt → f7fe17a22390a24d6df8.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{lerp as t}from"../../../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../../../core/maybe.js";import{watch as s,syncAndInitial as i,initial as o}from"../../../../../core/reactiveUtils.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators.js";import{set as n}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{set as m,length as h}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as p}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{earth as c}from"../../../../../geometry/support/Ellipsoid.js";import{InternalRenderCategory as d}from"../../../webgl.js";import{OpaqueEnvironment as u}from"../OpaqueEnvironment.js";import{computeInnerAltitudeFade as f,innerAtmosphereDepth as l}from"./atmosphereUtils.js";import{ChapmanAtmospherePassParameters as b,ChapmanAtmosphereTechnique as g}from"./ChapmanAtmosphereTechnique.js";import{ChapmanAtmosphereTechniqueConfiguration as _}from"./ChapmanAtmosphereTechniqueConfiguration.js";import{createQuadVAO as w}from"../../lib/glUtil3D.js";import{applyTextureResizeModulo as P}from"../../lib/textureUtils.js";import{a as j}from"../../../../../chunks/AtmosphereCompositing.glsl.js";import{AtmosphereCompositingTechnique as v}from"../../shaders/AtmosphereCompositingTechnique.js";import{DepthStencilAttachment as A,ColorAttachment0 as C,PrimitiveType as q}from"../../../../webgl/enums.js";import x from"../../../../../webscene/background/ColorBackground.js";let T=class extends u{constructor(){super(...arguments),this._compositingPassParameters=new j,this._vao=null,this._passParameters=new b,this._configuration=new _}initialize(){this.addHandles([s(()=>this.view.environment.background,e=>{const t=e instanceof x?e.color.toUnitRGBA():p;m(this._passParameters.backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3])},i),s(()=>this.view.stage?.renderer?.highResolutionAtmosphere,e=>this._configuration.reduced=!e,i),s(()=>this.view.map.ground.undergroundColor,e=>{this._passParameters.undergroundColor=e?.toUnitRGBA()??p,this.requestRender(1)},o),s(()=>this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),i)])}destroy(){this._vao=r(this._vao)}render(e){const r=e.find(({name:e})=>e===d.OPAQUE_ENVIRONMENT);if(!this.bindParameters.mainDepth)return r;const s=this.renderingContext;this._vao??=w(s,1);const i=r.getAttachment(A);this._update();const o=this.techniques.getCompiled(g,this._configuration);if(!o)return this.requestRender(1),r;if(!this._configuration.reduced)return r.detachDepth(),s.bindFramebuffer(r.fbo),s.bindTechnique(o,this.bindParameters,this._passParameters),s.setDrawBuffers([C]),s.bindVAO(this._vao),s.drawArrays(q.TRIANGLE_STRIP,0,4),r.attachDepth(i),r;const a=this.techniques.getCompiled(v);if(!a)return this.requestRender(1),r;const n=s.getViewport(),m=this.bindParameters.camera,p=h(m.eye)-c.radius;let u;const f=c.atmosphereHeight;if(p<f){const e=Math.min(1,Math.max(0,p/f));u=t(.2,.3,e)}else{const e=Math.min(1,Math.max(0,(p-f)/(15*f)));u=t(.3,.6,e)}const l=this.renderingContext.parameters.maxTextureSize,b=P(Math.round(u*m.fullViewport[2]),l),_=P(Math.round(u*m.fullViewport[3]),l);s.setViewport(0,0,b,_);const j=this.fboCache.acquire(b,_,"chapman",5);return s.bindFramebuffer(j.fbo),s.clearFramebuffer([0,0,0,1],!0,!0),s.bindTechnique(o,this.bindParameters,this._passParameters),s.bindVAO(this._vao),s.drawArrays(q.TRIANGLE_STRIP,0,4),s.setViewport(n.x,n.y,n.width,n.height),this._compositingPassParameters.color=j.getTexture(),r.detachDepth(),s.bindFramebuffer(r.fbo),s.bindTechnique(a,this.bindParameters,this._compositingPassParameters),s.setDrawBuffers([C]),s.screen.draw(),r.attachDepth(i),j.release(),r}_update(){const e=this.view.basemapTerrain?.getLowerBoundRadius()??0;n(this._passParameters.radii,e,e+c.atmosphereHeight);const t=h(this.bindParameters.camera.eye);this._passParameters.altitudeFade=f(t-e),this._passParameters.innerFadeDistance=2*Math.sqrt((2*e-l)*l)}};T=e([a("esri.views.3d.webgl-engine.effects.atmosphere.ChapmanAtmosphere")],T);export{T as ChapmanAtmosphere};
2
+ import{__decorate as e}from"tslib";import{lerp as t}from"../../../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../../../core/maybe.js";import{watch as s,syncAndInitial as i,initial as a}from"../../../../../core/reactiveUtils.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{set as n}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{set as m,length as h}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as p}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{earth as c}from"../../../../../geometry/support/Ellipsoid.js";import{InternalRenderCategory as d}from"../../../webgl.js";import{OpaqueEnvironment as u}from"../OpaqueEnvironment.js";import{computeInnerAltitudeFade as l,innerAtmosphereDepth as f}from"./atmosphereUtils.js";import{ChapmanAtmospherePassParameters as b,ChapmanAtmosphereTechnique as g}from"./ChapmanAtmosphereTechnique.js";import{createQuadVAO as _}from"../../lib/glUtil3D.js";import{applyTextureResizeModulo as P}from"../../lib/textureUtils.js";import{a as w}from"../../../../../chunks/AtmosphereCompositing.glsl.js";import{AtmosphereCompositingTechnique as v}from"../../shaders/AtmosphereCompositingTechnique.js";import{DepthStencilAttachment as j,ColorAttachment0 as A,PrimitiveType as x}from"../../../../webgl/enums.js";import C from"../../../../../webscene/background/ColorBackground.js";let T=class extends u{constructor(){super(...arguments),this._compositingPassParameters=new w,this._vao=null,this._passParameters=new b}initialize(){this.addHandles([s(()=>this.view.environment.background,e=>{const t=e instanceof C?e.color.toUnitRGBA():p;m(this._passParameters.backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3])},i),s(()=>this.view.stage?.renderer?.highResolutionAtmosphere,e=>this._passParameters.reduced=!e,i),s(()=>this.view.map.ground.undergroundColor,e=>{this._passParameters.undergroundColor=e?.toUnitRGBA()??p,this.requestRender(1)},a),s(()=>this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),i)])}destroy(){this._vao=r(this._vao)}render(e){const r=e.find(({name:e})=>e===d.OPAQUE_ENVIRONMENT);if(!this.bindParameters.mainDepth)return r;const s=this.renderingContext;this._vao??=_(s,1);const i=r.getAttachment(j);this._update();const a=this.techniques.getCompiled(g),o=this.techniques.getCompiled(v);if(!a||!o)return this.requestRender(1),r;if(!this._passParameters.reduced)return r.detachDepth(),s.bindFramebuffer(r.fbo),s.bindTechnique(a,this.bindParameters,this._passParameters),s.setDrawBuffers([A]),s.bindVAO(this._vao),s.drawArrays(x.TRIANGLE_STRIP,0,4),r.attachDepth(i),r;const n=s.getViewport(),m=this.bindParameters.camera,p=h(m.eye)-c.radius;let u;const l=c.atmosphereHeight;if(p<l){const e=Math.min(1,Math.max(0,p/l));u=t(.2,.3,e)}else{const e=Math.min(1,Math.max(0,(p-l)/(15*l)));u=t(.3,.6,e)}const f=this.renderingContext.parameters.maxTextureSize,b=P(Math.round(u*m.fullViewport[2]),f),w=P(Math.round(u*m.fullViewport[3]),f);s.setViewport(0,0,b,w);const C=this.fboCache.acquire(b,w,"chapman",5);return s.bindFramebuffer(C.fbo),s.clearFramebuffer([0,0,0,1],!0,!0),s.bindTechnique(a,this.bindParameters,this._passParameters),s.bindVAO(this._vao),s.drawArrays(x.TRIANGLE_STRIP,0,4),s.setViewport(n.x,n.y,n.width,n.height),this._compositingPassParameters.color=C.getTexture(),r.detachDepth(),s.bindFramebuffer(r.fbo),s.bindTechnique(o,this.bindParameters,this._compositingPassParameters),s.setDrawBuffers([A]),s.screen.draw(),r.attachDepth(i),C.release(),r}_update(){const e=this.view.basemapTerrain?.getLowerBoundRadius()??0;n(this._passParameters.radii,e,e+c.atmosphereHeight);const t=h(this.bindParameters.camera.eye);this._passParameters.altitudeFade=l(t-e),this._passParameters.innerFadeDistance=2*Math.sqrt((2*e-f)*f)}};T=e([o("esri.views.3d.webgl-engine.effects.atmosphere.ChapmanAtmosphere")],T);export{T as ChapmanAtmosphere};
@@ -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{create as o}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as s}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ReloadableShader as t}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as i}from"../../core/shaderTechnique/ShaderTechnique.js";import{ChapmanApproximationPassParameters as a}from"./ChapmanApproximation.glsl.js";import{C as m}from"../../../../../chunks/ChapmanAtmosphere.glsl.js";import{Pos2TexF16 as c}from"../../lib/DefaultVertexBufferLayouts.js";import{makePipelineState as n,defaultColorWrite as p,copySource as l,simpleBlendingParams as h}from"../../../../webgl/renderState.js";class d extends a{constructor(){super(...arguments),this.innerFadeDistance=0,this.altitudeFade=0,this.backgroundColor=o(),this.undergroundColor=s()}}let u=class extends i{constructor(e,r){super(e,r,c),this.shader=new t(m,()=>import("./ChapmanAtmosphere.glsl.js"))}initializePipeline(e){return n({blending:e.reduced?l:h(770,771),depthTest:{func:e.reduced?519:515},colorWrite:p})}};u=e([r("esri.views.3d.webgl-engine.effects.atmosphere.ChapmanAtmosphereTechnique")],u);export{d as ChapmanAtmospherePassParameters,u as ChapmanAtmosphereTechnique};
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{create as t}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as i}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ReloadableShader as s}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../../core/shaderTechnique/ShaderTechnique.js";import{ChapmanApproximationPassParameters as n}from"./ChapmanApproximation.glsl.js";import{C as a}from"../../../../../chunks/ChapmanAtmosphere.glsl.js";import{Pos2TexF16 as c}from"../../lib/DefaultVertexBufferLayouts.js";import{makePipelineState as p,defaultColorWrite as l,copySource as m,simpleBlendingParams as d}from"../../../../webgl/renderState.js";class h extends n{constructor(){super(...arguments),this.reduced=!1,this.innerFadeDistance=0,this.altitudeFade=0,this.backgroundColor=t(),this.undergroundColor=i()}}let u=class extends o{constructor(e,r){super(e,r,c),this.shader=new s(a,()=>import("./ChapmanAtmosphere.glsl.js")),this._reducedPipeline=p({blending:m,depthTest:{func:519},colorWrite:l})}initializePipeline(){return p({blending:d(770,771),depthTest:{func:515},colorWrite:l})}getPipeline(e,r){return r.reduced?this._reducedPipeline:super.getPipeline(e,r)}};u=e([r("esri.views.3d.webgl-engine.effects.atmosphere.ChapmanAtmosphereTechnique")],u);export{h as ChapmanAtmospherePassParameters,u as ChapmanAtmosphereTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as t}from"../../../../../chunks/Compositing.glsl.js";import{CompositingTechnique as e}from"../../shaders/CompositingTechnique.js";import{CompositingTechniqueConfiguration as i}from"../../shaders/CompositingTechniqueConfiguration.js";import{ColorAttachment0 as r}from"../../../../webgl/enums.js";class s{constructor(e,r=0){this._techniques=e,this._parameters=new t,this._configuration=new i,this._configuration.blitMode=r}precompile(){this._techniques.precompile(e,this._configuration)}toFramebuffer(t,e){this.blitTexture(t.getTexture(),e)}blitTexture(t,i,r,s,o=0){const n=this._rctx;n.temporaryBindFramebuffer(r,()=>{const r=this._configuration.blitMode;this._configuration.blitMode=s??this._configuration.blitMode,n.setClearColor(0,0,0,1),n.clear(16384),this._parameters.texture=t,this._parameters.mipmapLevel=o;const a=this._techniques.get(e,this._configuration);n.bindTechnique(a,i,this._parameters),n.screen.draw(),this._configuration.blitMode=r})}blend(t,i,s,o=1){const n=this._techniques.getCompiled(e,this._configuration);if(!n)return!1;const a=this._rctx;return a.bindFramebuffer(i.fbo),this._parameters.texture=t.getTexture(),this._parameters.opacity=o,a.bindTechnique(n,s,this._parameters),a.setDrawBuffers([r]),a.screen.draw(),!0}get _rctx(){return this._techniques.context.rctx}}export{s as Blit};
2
+ import{a as t}from"../../../../../chunks/Compositing.glsl.js";import{CompositingTechnique as e}from"../../shaders/CompositingTechnique.js";import{CompositingTechniqueConfiguration as i}from"../../shaders/CompositingTechniqueConfiguration.js";import{ColorAttachment0 as r}from"../../../../webgl/enums.js";class s{constructor(e,r=0){this._techniques=e,this._parameters=new t,this._configuration=new i,this._configuration.mode=r}precompile(){this._techniques.precompile(e,this._configuration)}toFramebuffer(t,e){this.blitTexture(t.getTexture(),e)}blitTexture(t,i,r,s,o=0){const n=this._rctx;n.temporaryBindFramebuffer(r,()=>{const r=this._configuration.mode;this._configuration.mode=s??this._configuration.mode,1!==this._configuration.mode&&2!==this._configuration.mode||(n.setClearColor(0,0,0,1),n.clear(16384)),this._parameters.texture=t,this._parameters.mipmapLevel=o;const a=this._techniques.get(e,this._configuration);n.bindTechnique(a,i,this._parameters),n.screen.draw(),this._configuration.mode=r})}blend(t,i,s,o=1){const n=this._techniques.getCompiled(e,this._configuration);if(!n)return!1;const a=this._rctx;return a.bindFramebuffer(i.fbo),this._parameters.texture=t.getTexture(),this._parameters.opacity=o,a.bindTechnique(n,s,this._parameters),a.setDrawBuffers([r]),a.screen.draw(),!0}get _rctx(){return this._techniques.context.rctx}}export{s as Blit};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{watch as i,initial as s}from"../../../../../core/reactiveUtils.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{OpaqueEnvironment as o}from"../OpaqueEnvironment.js";import{CloudsCompositionTechnique as n}from"./CloudsCompositionTechnique.js";import{createQuadVAO as a}from"../../lib/glUtil3D.js";import{ColorAttachment0 as m,PrimitiveType as d}from"../../../../webgl/enums.js";let h=class extends o{initialize(){this.addHandles([i(()=>null!=this.view.environment.weather&&this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),s)])}destroy(){this._vao=t(this._vao)}render(e){const t=e.find(({name:e})=>e===this.produces),i=this.bindParameters.clouds;if(!i.data)return t;const s=this.techniques.getCompiled(n);if(!s)return this.requestRender(1),t;const r=this.renderingContext;this._vao??=a(r);const o=r.bindTechnique(s,this.bindParameters);return r.setDrawBuffers([m]),r.bindVAO(this._vao),o.assertCompatibleVertexAttributeLocations(this._vao),r.drawArrays(d.TRIANGLE_STRIP,0,4),i.isFading&&this.requestRender(2),t}};h=e([r("esri.views.3d.webgl-engine.effects.clouds.CloudsComposition")],h);export{h as CloudsComposition};
2
+ import{__decorate as e}from"tslib";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{watch as i,initial as s}from"../../../../../core/reactiveUtils.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{OpaqueEnvironment as o}from"../OpaqueEnvironment.js";import{CloudsCompositionTechnique as n}from"./CloudsCompositionTechnique.js";import{createQuadVAO as a}from"../../lib/glUtil3D.js";import{ColorAttachment0 as m,PrimitiveType as d}from"../../../../webgl/enums.js";import{noParameters as l}from"../../../../webgl/NoParameters.js";let h=class extends o{initialize(){this.addHandles([i(()=>null!=this.view.environment.weather&&this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),s)])}destroy(){this._vao=t(this._vao)}render(e){const t=e.find(({name:e})=>e===this.produces),i=this.bindParameters.clouds;if(!i.data)return t;const s=this.techniques.getCompiled(n);if(!s)return this.requestRender(1),t;const r=this.renderingContext;this._vao??=a(r);const o=r.bindTechnique(s,this.bindParameters,l);return r.setDrawBuffers([m]),r.bindVAO(this._vao),o.assertCompatibleVertexAttributeLocations(this._vao),r.drawArrays(d.TRIANGLE_STRIP,0,4),i.isFading&&this.requestRender(2),t}};h=e([r("esri.views.3d.webgl-engine.effects.clouds.CloudsComposition")],h);export{h as CloudsComposition};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{property as s,subclass as t}from"../../../../../core/accessorSupport/decorators.js";import{RenderNodeOutput as r,InternalRenderCategory as i}from"../../../webgl.js";import o from"../../../webgl/RenderNode.js";import{a}from"../../../../../chunks/FocusAreaMask.glsl.js";import{FocusAreaMaskTechnique as n}from"./FocusAreaMaskTechnique.js";import{volumeToVao as h}from"./focusAreaMaskUtils.js";import{DepthStencilAttachment as c,PrimitiveType as u}from"../../../../webgl/enums.js";import{noParameters as l}from"../../../../webgl/NoParameters.js";let p=class extends o{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[r.TRANSPARENT]},this.produces=i.FOCUSAREA,this._vaos=new Array,this._counts=new Array,this._origins=new Array,this._maskParameters=new a}initialize(){this.updateGeometries()}destroy(){this._vaos.forEach(e=>e.dispose()),this._vaos.length=this._counts.length=this._origins.length=0}render(e){const s=this.techniques.getCompiled(n);if(!s||!this._vaos)return void this.requestRender(1);const t=e.find(({name:e})=>e===r.TRANSPARENT),o=this.renderingContext,a=this.bindParameters,h=a.camera,p=h.fullViewport[2],d=h.fullViewport[3],m=this.fboCache.acquire(p,d,i.FOCUSAREA,2);this.view.stage.renderer.occludedRequiresStencil?(m.acquireDepth(14),o.blitFramebuffer(t.fbo,m.fbo,256)):m.attachDepth(t.getAttachment(c)),o.bindFramebuffer(m.fbo),o.setClearColor(0,0,0,1),o.clear(17408),o.setViewport(0,0,p,d);const f=o.bindTechnique(s,a);o.setFaceCullingEnabled(!1),o.setStencilTestEnabled(!0),o.setStencilOpSeparate(1028,7680,34055,7680),o.setStencilOpSeparate(1029,7680,34056,7680),o.setDepthWriteEnabled(!1);for(let r=0;r<this._vaos.length;r++){const e=this._vaos[r],s=this._counts[r];this._maskParameters.origin=this._origins[r],f.bindDraw(a,l,this._maskParameters),o.bindVAO(e),o.setDepthTestEnabled(!0),o.setStencilWriteMask(255),o.setStencilFunction(519,0,255),o.setColorMask(!1,!1,!1,!1),o.drawArrays(u.TRIANGLES,0,s),o.setDepthTestEnabled(!1),o.setStencilWriteMask(0),o.setStencilFunction(517,0,255),o.setColorMask(!0,!0,!0,!0),o.drawArrays(u.TRIANGLES,0,s)}return m}updateGeometries(){if(!this.view.stage)return;this._vaos.forEach(e=>e.dispose()),this._vaos.length=this._counts.length=this._origins.length=0;this.focusAreasView.volumes.forEach(e=>{const s=e.geometryVolume,{vao:t,vertexCount:r}=h(this.renderingContext,s);this._vaos.push(t),this._counts.push(r),this._origins.push(e.origin)}),this.requestRender(1)}};e([s()],p.prototype,"consumes",void 0),e([s()],p.prototype,"produces",void 0),e([s({constructOnly:!0})],p.prototype,"focusAreasView",void 0),p=e([t("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaMaskNode")],p);export{p as FocusAreaMaskNode};
2
+ import{__decorate as e}from"tslib";import{property as s,subclass as t}from"../../../../../core/accessorSupport/decorators.js";import{RenderNodeOutput as r,InternalRenderCategory as i}from"../../../webgl.js";import o from"../../../webgl/RenderNode.js";import{a}from"../../../../../chunks/FocusAreaMask.glsl.js";import{FocusAreaMaskTechnique as n}from"./FocusAreaMaskTechnique.js";import{volumeToVao as h}from"./focusAreaMaskUtils.js";import{DepthStencilAttachment as c,PrimitiveType as u}from"../../../../webgl/enums.js";import{noParameters as l}from"../../../../webgl/NoParameters.js";let p=class extends o{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[r.TRANSPARENT]},this.produces=i.FOCUSAREA,this._vaos=new Array,this._counts=new Array,this._origins=new Array,this._maskParameters=new a}initialize(){this.updateGeometries()}destroy(){this._vaos.forEach(e=>e.dispose()),this._vaos.length=this._counts.length=this._origins.length=0}render(e){const s=this.techniques.getCompiled(n);if(!s||!this._vaos)return void this.requestRender(1);const t=e.find(({name:e})=>e===r.TRANSPARENT),o=this.renderingContext,a=this.bindParameters,h=a.camera,p=h.fullViewport[2],d=h.fullViewport[3],m=this.fboCache.acquire(p,d,i.FOCUSAREA,2);this.view.stage.renderer.occludedRequiresStencil?(m.acquireDepth(14),o.blitFramebuffer(t.fbo,m.fbo,256)):m.attachDepth(t.getAttachment(c)),o.bindFramebuffer(m.fbo),o.setClearColor(0,0,0,1),o.clear(17408),o.setViewport(0,0,p,d);const f=o.bindTechnique(s,a,l);o.setFaceCullingEnabled(!1),o.setStencilTestEnabled(!0),o.setStencilOpSeparate(1028,7680,34055,7680),o.setStencilOpSeparate(1029,7680,34056,7680),o.setDepthWriteEnabled(!1);for(let r=0;r<this._vaos.length;r++){const e=this._vaos[r],s=this._counts[r];this._maskParameters.origin=this._origins[r],f.bindDraw(a,l,this._maskParameters),o.bindVAO(e),o.setDepthTestEnabled(!0),o.setStencilWriteMask(255),o.setStencilFunction(519,0,255),o.setColorMask(!1,!1,!1,!1),o.drawArrays(u.TRIANGLES,0,s),o.setDepthTestEnabled(!1),o.setStencilWriteMask(0),o.setStencilFunction(517,0,255),o.setColorMask(!0,!0,!0,!0),o.drawArrays(u.TRIANGLES,0,s)}return m}updateGeometries(){if(!this.view.stage)return;this._vaos.forEach(e=>e.dispose()),this._vaos.length=this._counts.length=this._origins.length=0;this.focusAreasView.volumes.forEach(e=>{const s=e.geometryVolume,{vao:t,vertexCount:r}=h(this.renderingContext,s);this._vaos.push(t),this._counts.push(r),this._origins.push(e.origin)}),this.requestRender(1)}};e([s()],p.prototype,"consumes",void 0),e([s()],p.prototype,"produces",void 0),e([s({constructOnly:!0})],p.prototype,"focusAreasView",void 0),p=e([t("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaMaskNode")],p);export{p as FocusAreaMaskNode};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/output/ReadDepthLastFrame.glsl.js";import"../../core/shaderLibrary/shading/MainLighting.glsl.js";import"../../core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js";import"../../core/shaderLibrary/util/CameraSpace.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Matrix4BindUniform.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../../../webgl/enums.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{a as GlobalIlluminationPassParameters,b as build,d as defaultRayMarchMaxReach,c as defaultRayMarchMaxReachEmissionWeight,e as defaultRayMarchMaxSteps,f as defaultRayMarchMinReach,g as defaultRayMarchMinReachEmissionWeight,h as defaultRayMarchWorldReach}from"../../../../../chunks/GlobalIllumination.glsl.js";
2
+ import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/output/ReadDepthLastFrame.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderLibrary/shading/MainLighting.glsl.js";import"../../core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js";import"../../core/shaderLibrary/util/CameraSpace.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Matrix4BindUniform.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../../../webgl/enums.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{a as GlobalIlluminationPassParameters,b as build,d as defaultColorBleedWeight,c as defaultRayMarchMaxReach,e as defaultRayMarchMaxReachEmissionWeight,f as defaultRayMarchMaxSteps,g as defaultRayMarchMinReach,h as defaultRayMarchMinReachEmissionWeight,i as defaultRayMarchWorldReach}from"../../../../../chunks/GlobalIllumination.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/output/ReadDepth.glsl.js";import"../../core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js";import"../../core/shaderLibrary/util/CameraSpace.glsl.js";import"../../core/shaderModules/BooleanBindUniform.js";import"../../core/shaderModules/Float2DrawUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DDrawUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{a as GlobalIlluminationBlurDrawParameters,b as build}from"../../../../../chunks/GlobalIlluminationBlur.glsl.js";
2
+ import"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/output/ReadDepth.glsl.js";import"../../core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js";import"../../core/shaderLibrary/util/CameraSpace.glsl.js";import"../../core/shaderModules/BooleanBindUniform.js";import"../../core/shaderModules/Float2DrawUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DDrawUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../shaders/ditherNoise.glsl.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{a as GlobalIlluminationBlurDrawParameters,b as build}from"../../../../../chunks/GlobalIlluminationBlur.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as s}from"tslib";import{parameter as o,ShaderTechniqueConfiguration as r}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{d as t,e as a}from"../../../../../chunks/GlobalIllumination.glsl.js";class e extends r{constructor(){super(...arguments),this.hasColor=!0,this.hasEmission=!1,this.rayMarchMaxReach=t,this.rayMarchMaxSteps=a,this.useProjectedRayLength=!0,this.clampRayToScreen=!1}}s([o()],e.prototype,"hasColor",void 0),s([o()],e.prototype,"hasEmission",void 0);export{e as GlobalIlluminationTechniqueConfiguration};
2
+ import{__decorate as s}from"tslib";import{parameter as o,ShaderTechniqueConfiguration as r}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{c as t,f as a}from"../../../../../chunks/GlobalIllumination.glsl.js";class i extends r{constructor(){super(...arguments),this.hasColor=!0,this.hasEmission=!1,this.rayMarchMaxReach=t,this.rayMarchMaxSteps=a,this.useProjectedRayLength=!0,this.clampRayToScreen=!1}}s([o()],i.prototype,"hasColor",void 0),s([o()],i.prototype,"hasEmission",void 0);export{i as GlobalIlluminationTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{nativeArrayMaxSize as r,isFloat16Array as t,isUint16Array as o}from"../../../../core/typedArrayUtil.js";import{getFloat16ArrayConstructor as a}from"../../../../geometry/support/float16.js";function e(e){if(e.length<r)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return t(e)?a().from(e):o(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}export{e as cloneAttributeData};
2
+ import{nativeArrayMaxSize as r,isFloat32Array as t,isFloat16Array as o,isUint16Array as a}from"../../../../core/typedArrayUtil.js";import{getFloat16ArrayConstructor as f}from"../../../../geometry/support/float16.js";function e(e){if(e.length<r)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return o(e)?f().from(e):a(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return t(e)?Float32Array.from(e):Uint32Array.from(e);default:return Float64Array.from(e)}}export{e as cloneAttributeData};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as i}from"../../../../chunks/Compositing.glsl.js";import{CompositingTechnique as t}from"../shaders/CompositingTechnique.js";import{CompositingTechniqueConfiguration as s}from"../shaders/CompositingTechniqueConfiguration.js";class o{constructor(t,o){this._rctx=t,this._techniques=o,this._configuration=new s,this._passParameters=new i}precompile(i,s,o){this._configuration.blendEmissive=o,i&&(this._configuration.blitMode=2,this._techniques.precompile(t,this._configuration)),s&&(this._configuration.blitMode=1,this._techniques.precompile(t,this._configuration)),this._configuration.blitMode=3,this._techniques.getCompiled(t,this._configuration)}compositePreMultipliedAlpha(i,t,s=i.hasEmission){this._composite(i,t,2,s)}composite(i,t){this._composite(i,t,1,i.hasEmission)}blitDepthToLinearDepth(i,t){this._composite(i,t,3)}_composite(i,s,o,e=!1){this._configuration.blitMode=o,this._configuration.blendEmissive=e,this._passParameters.texture=s;const n=this._techniques.get(t,this._configuration);this._rctx.bindTechnique(n,i,this._passParameters),this._rctx.screen.draw()}}export{o as Compositor};
2
+ import{a as i}from"../../../../chunks/Compositing.glsl.js";import{CompositingTechnique as s}from"../shaders/CompositingTechnique.js";import{CompositingTechniqueConfiguration as t}from"../shaders/CompositingTechniqueConfiguration.js";class o{constructor(s,o){this._rctx=s,this._techniques=o,this._configuration=new t,this._passParameters=new i}precompile(i,t,o){this._configuration.blendEmissive=o,i&&(this._configuration.mode=2,this._techniques.precompile(s,this._configuration)),t&&(this._configuration.mode=1,this._techniques.precompile(s,this._configuration)),this._configuration.mode=3,this._techniques.getCompiled(s,this._configuration)}compositePreMultipliedAlpha(i,s,t=i.hasEmission){this._composite(i,s,2,t)}composite(i,s){this._composite(i,s,1,i.hasEmission)}blitDepthToLinearDepth(i,s){this._composite(i,s,3)}_composite(i,t,o,e=!1){this._configuration.mode=o,this._configuration.blendEmissive=e,this._passParameters.texture=t;const n=this._techniques.get(s,this._configuration);this._rctx.bindTechnique(n,i,this._passParameters),this._rctx.screen.draw()}}export{o as Compositor};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{watch as t}from"../../../../core/reactiveUtils.js";import{property as i,subclass as s}from"../../../../core/accessorSupport/decorators.js";import{set as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{copy as r,set as o,scale as n,floor as h,subtract as l}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as m,set as u,positiveInfinity as c,equals as d}from"../../../../geometry/support/aaBoundingBox.js";import{InternalRenderCategory as _}from"../../webgl.js";import g from"../../webgl/RenderNode.js";import{a as P}from"../../../../chunks/GaussianSplat.glsl.js";import{G as f}from"../../../../chunks/GaussianSplatComposition.glsl.js";import{GaussianSplatCompositionTechnique as C}from"../shaders/GaussianSplatCompositionTechnique.js";import{GaussianSplatCompositionTechniqueConfiguration as b}from"../shaders/GaussianSplatCompositionTechniqueConfiguration.js";import{G as S}from"../../../../chunks/GaussianSplatDepthComposition.glsl.js";import{GaussianSplatDepthCompositionTechnique as x}from"../shaders/GaussianSplatDepthCompositionTechnique.js";import{GaussianSplatTechnique as v}from"../shaders/GaussianSplatTechnique.js";import{GaussianSplatTechniqueConfiguration as q}from"../shaders/GaussianSplatTechniqueConfiguration.js";import{ColorAttachment1 as w,DepthStencilAttachment as D,PrimitiveType as R}from"../../../webgl/enums.js";var E;let T=class extends g{static{E=this}constructor(e){super(e),this.produces=_.GAUSSIAN_SPLAT,this._slicePlaneEnabled=!1,this.layerView=null,this._passParameters=new P,this._compositionPassParameters=new f,this._depthCompositionPassParameters=new S,this._compositionConfiguration=new b,this._clipBox=m(),this._previousCameraDirection=p(),this._previousSortRequestCameraDirection=p(),this._sortRequestDirectionEpsilon=.01,this._directionChangeEpsilon=.001,this._configuration=new q(e.view.state.isGlobal),u(this._clipBox,c)}async initialize(){this.addHandles([t(()=>this.view.state.camera,()=>this._onCameraChange()),t(()=>2===this.view.state.mode,()=>this.requestRender(1))])}render(e){const t=e.find(({name:e})=>e===this.produces);if(this._updateConfigurations(),this._handleFading(),!this._data.visibleGaussians||!this._data.orderTexture.texture||!this._data.textureAtlas.texture)return t;const i=t.getAttachment(w);this._compositionConfiguration.hasEmission=null!=i;const s=this.techniques.getCompiled(v,this._configuration),a=this.techniques.getCompiled(C,this._compositionConfiguration),r=this.techniques.getCompiled(x);if(!s||!r||!a)return this.requestRender(1),t;const{fullWidth:o,fullHeight:n}=this.bindParameters.camera;this._prepareParameters(n,o);const h=this.renderingContext,l=this.fboCache,p=l.acquire(o,n,"gaussian color output"),m=t.getAttachment(D);p.attachDepth(m),this._renderGaussianColorAndDepth(p,s);const u=l.acquire(o,n,this.produces);return this._depthCompositionPassParameters.splatDepth=p.getTexture(w),u.attachDepth(t.getAttachment(D)),h.bindFramebuffer(u.fbo),h.bindTechnique(r,this.bindParameters,this._depthCompositionPassParameters),h.screen.draw(),this._compositionPassParameters.color=t.getTexture(),this._compositionPassParameters.splatColor=p.getTexture(),i?(u.acquireColor(w,8,"emissive"),this._compositionPassParameters.emission=t.getTexture(w)):this._compositionPassParameters.emission=null,h.bindFramebuffer(u.fbo),h.bindTechnique(a,this.bindParameters,this._compositionPassParameters),h.screen.draw(),p.release(),u}get slicePlaneEnabled(){return this._slicePlaneEnabled}set slicePlaneEnabled(e){this._slicePlaneEnabled!==e&&(this._slicePlaneEnabled=e,this.requestRender(1))}set clippingBox(e){const t=e||c;this._hasSameClipBox(t)||(u(this._clipBox,t),this._data.requestSort(),this.requestRender(1))}get clippingBox(){return this._clippingEnabled?this._clipBox:null}get _clippingEnabled(){return!d(this._clipBox,c,(e,t)=>e===t)}get _isIdle(){return 2===this.view.state.mode}get _data(){return this.layerView.data}get _fadeHelper(){return this.layerView.fadeHelper}_updateConfigurations(){const{idleMinimumOpacity:e,nonIdleMinimumOpacity:t}=this.view.qualitySettings.gaussianSplat;this._configuration.alphaCutoff=this._isIdle?e:t,this._configuration.fadingEnabled=this._fadeHelper.fadingEnabled,this._configuration.receiveShadows=this.bindParameters.shadowMap.ready,this._configuration.hasShadowHighlights=this._configuration.receiveShadows&&this.bindParameters.hasShadowHighlights,this._configuration.clippingEnabled=this._clippingEnabled,this._configuration.hasSlicePlane=this._slicePlaneEnabled&&null!=this.bindParameters.slicePlane}_onCameraChange(){const e=this.view.state.camera.ray.direction;if(!this._directionChanged(e))return;if(r(this._previousCameraDirection,e),!this._shouldRequestSort(e))return;this._data.requestSort()&&r(this._previousSortRequestCameraDirection,e)}_directionChanged(e){return Math.abs(e[0]-this._previousCameraDirection[0])>this._directionChangeEpsilon||Math.abs(e[1]-this._previousCameraDirection[1])>this._directionChangeEpsilon||Math.abs(e[2]-this._previousCameraDirection[2])>this._directionChangeEpsilon}_shouldRequestSort(e){return Math.abs(e[0]-this._previousSortRequestCameraDirection[0])>this._sortRequestDirectionEpsilon||Math.abs(e[1]-this._previousSortRequestCameraDirection[1])>this._sortRequestDirectionEpsilon||Math.abs(e[2]-this._previousSortRequestCameraDirection[2])>this._sortRequestDirectionEpsilon}_prepareParameters(e,t){this._passParameters.splatOrder=this._data.orderTexture.texture,this._passParameters.splatFading=this._data.fadingTexture.texture,this._passParameters.splatAtlas=this._data.textureAtlas.texture;const i=Math.tan(.5*this.camera.fovY),s=i/e*t;a(this._passParameters.tanFov,s,i),this._passParameters.focalLength=e/(2*i);const o=this.view.qualitySettings.gaussianSplat,n=this._isIdle?o.idleMinimumSplatPixelRadius:o.nonIdleMinimumSplatPixelRadius;this._passParameters.minSplatRadius=n*Math.sqrt(t*e)/Math.sqrt(2073600),r(this._passParameters.origin,this.bindParameters.camera.eye),this._prepareHighPrecisionCameraPosition(),this._updateSlicePlaneLocalOrigin(),this._updateClipUniforms()}_updateClipUniforms(){const e=this.clippingBox||c,[t,i,s,a,r,n]=e,[h,l,p]=this.camera.eye,{clipMinCameraRelative:m,clipMaxCameraRelative:u}=this._passParameters;o(m,t-h,i-l,s-p),o(u,a-h,r-l,n-p)}_updateSlicePlaneLocalOrigin(){this._passParameters.slicePlaneLocalOrigin=this.camera.eye}_hasSameClipBox(e){return d(this._clipBox,e,(e,t)=>e===t)}_renderGaussianColorAndDepth(e,t){const i=this.renderingContext;e.acquireColor(w,5,"gaussian depth output"),i.bindFramebuffer(e.fbo),i.setClearColor(0,0,0,0),i.clear(16384),this.renderingContext.bindTechnique(t,this.bindParameters,this._passParameters),this.renderingContext.drawArraysInstanced(R.TRIANGLE_STRIP,0,4,this._data.visibleGaussians)}_prepareHighPrecisionCameraPosition(){n(this._passParameters.tileCameraPosition,this.camera.eye,1/E.tileSize),h(this._passParameters.tileCameraPosition,this._passParameters.tileCameraPosition),n(this._passParameters.cameraDelta,this._passParameters.tileCameraPosition,E.tileSize),l(this._passParameters.cameraDelta,this.camera.eye,this._passParameters.cameraDelta)}_handleFading(){if(0===this._fadeHelper.numFadingTiles)return void(this._previousFrameStart=null);this._previousFrameStart??=this.view.stage.renderer.renderContext.time;const e=this.view.stage?.renderer.renderContext.time-this._previousFrameStart;this._fadeHelper.updateAllTileFading(e),this._previousFrameStart=this.view.stage.renderer.renderContext.time,this._data.fadingTexture.updateTexture(this._data.textureAtlas.pageAllocator.pageCount)}static{this.tileSize=2.048}};e([i()],T.prototype,"produces",void 0),e([i({constructOnly:!0})],T.prototype,"layerView",void 0),T=E=e([s("esri.views.3d.webgl-engine.lib.GaussianSplatRenderNode")],T);export{T as GaussianSplatRenderNode};
2
+ import{__decorate as e}from"tslib";import{watch as t}from"../../../../core/reactiveUtils.js";import{property as i,subclass as s}from"../../../../core/accessorSupport/decorators.js";import{set as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{copy as r,set as n,scale as o,floor as h,subtract as l}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as u,set as m,positiveInfinity as c,equals as d}from"../../../../geometry/support/aaBoundingBox.js";import{InternalRenderCategory as _}from"../../webgl.js";import{addWraparound as g}from"../../layers/i3s/I3SUtil.js";import C from"../../webgl/RenderNode.js";import{a as f}from"../../../../chunks/GaussianSplat.glsl.js";import{G as P}from"../../../../chunks/GaussianSplatComposition.glsl.js";import{GaussianSplatCompositionTechnique as b}from"../shaders/GaussianSplatCompositionTechnique.js";import{GaussianSplatCompositionTechniqueConfiguration as v}from"../shaders/GaussianSplatCompositionTechniqueConfiguration.js";import{G as S}from"../../../../chunks/GaussianSplatDepthComposition.glsl.js";import{GaussianSplatDepthCompositionTechnique as x}from"../shaders/GaussianSplatDepthCompositionTechnique.js";import{GaussianSplatTechnique as q}from"../shaders/GaussianSplatTechnique.js";import{GaussianSplatTechniqueConfiguration as w}from"../shaders/GaussianSplatTechniqueConfiguration.js";import{ColorAttachment1 as R,DepthStencilAttachment as D,PrimitiveType as E}from"../../../webgl/enums.js";var y;let T=class extends C{static{y=this}constructor(e){super(e),this.produces=_.GAUSSIAN_SPLAT,this._slicePlaneEnabled=!1,this.layerView=null,this._passParameters=new f,this._compositionPassParameters=new P,this._depthCompositionPassParameters=new S,this._compositionConfiguration=new v,this._clipBox=u(),this._previousCameraDirection=p(),this._previousSortRequestCameraDirection=p(),this._tileCullingRevision=0,this._sortRequestDirectionEpsilon=.01,this._directionChangeEpsilon=.001,this._configuration=new w(e.view.state.isGlobal),m(this._clipBox,c)}async initialize(){this.addHandles([t(()=>this.view.state.camera,()=>this._onCameraChange()),t(()=>2===this.view.state.mode,()=>this.requestRender(1))])}render(e){const t=e.find(({name:e})=>e===this.produces);if(this._updateConfigurations(),this._handleFading(),!this._data.visibleGaussians||!this._data.orderTexture.texture||!this._data.textureAtlas.texture)return t;const i=t.getAttachment(R);this._compositionConfiguration.hasEmission=null!=i;const s=this.techniques.getCompiled(q,this._configuration),a=this.techniques.getCompiled(b,this._compositionConfiguration),r=this.techniques.getCompiled(x);if(!s||!r||!a)return this.requestRender(1),t;const{fullWidth:n,fullHeight:o}=this.bindParameters.camera;this._prepareParameters(o,n);const h=this.renderingContext,l=this.fboCache,p=l.acquire(n,o,"gaussian color output"),u=t.getAttachment(D);p.attachDepth(u),this._renderGaussianColorAndDepth(p,s);const m=l.acquire(n,o,this.produces);return this._depthCompositionPassParameters.splatDepth=p.getTexture(R),m.attachDepth(t.getAttachment(D)),h.bindFramebuffer(m.fbo),h.bindTechnique(r,this.bindParameters,this._depthCompositionPassParameters),h.screen.draw(),this._compositionPassParameters.color=t.getTexture(),this._compositionPassParameters.splatColor=p.getTexture(),i?(m.acquireColor(R,8,"emissive"),this._compositionPassParameters.emission=t.getTexture(R)):this._compositionPassParameters.emission=null,h.bindFramebuffer(m.fbo),h.bindTechnique(a,this.bindParameters,this._compositionPassParameters),h.screen.draw(),p.release(),m}get slicePlaneEnabled(){return this._slicePlaneEnabled}set slicePlaneEnabled(e){this._slicePlaneEnabled!==e&&(this._slicePlaneEnabled=e,this.requestRender(1))}set clippingBox(e){const t=e||c;this._hasSameClipBox(t)||(m(this._clipBox,t),this._tileCullingRevision=g(this._tileCullingRevision,1),this._data.requestSort(),this.requestRender(1))}get clippingBox(){return this._clippingEnabled?this._clipBox:null}get tileCullingRevision(){return this._tileCullingRevision}get _clippingEnabled(){return!d(this._clipBox,c,(e,t)=>e===t)}get _isIdle(){return 2===this.view.state.mode}get _data(){return this.layerView.data}get _fadeHelper(){return this.layerView.fadeHelper}_updateConfigurations(){const{idleMinimumOpacity:e,nonIdleMinimumOpacity:t}=this.view.qualitySettings.gaussianSplat;this._configuration.alphaCutoff=this._isIdle?e:t,this._configuration.fadingEnabled=this._fadeHelper.fadingEnabled,this._configuration.receiveShadows=this.bindParameters.shadowMap.ready,this._configuration.hasShadowHighlights=this._configuration.receiveShadows&&this.bindParameters.hasShadowHighlights,this._configuration.clippingEnabled=this._clippingEnabled,this._configuration.hasSlicePlane=this._slicePlaneEnabled&&null!=this.bindParameters.slicePlane}_onCameraChange(){this._tileCullingRevision=g(this._tileCullingRevision,1);const e=this.view.state.camera.ray.direction;if(!this._directionChanged(e))return;if(r(this._previousCameraDirection,e),!this._shouldRequestSort(e))return;this._data.requestSort()&&r(this._previousSortRequestCameraDirection,e)}_directionChanged(e){return Math.abs(e[0]-this._previousCameraDirection[0])>this._directionChangeEpsilon||Math.abs(e[1]-this._previousCameraDirection[1])>this._directionChangeEpsilon||Math.abs(e[2]-this._previousCameraDirection[2])>this._directionChangeEpsilon}_shouldRequestSort(e){return Math.abs(e[0]-this._previousSortRequestCameraDirection[0])>this._sortRequestDirectionEpsilon||Math.abs(e[1]-this._previousSortRequestCameraDirection[1])>this._sortRequestDirectionEpsilon||Math.abs(e[2]-this._previousSortRequestCameraDirection[2])>this._sortRequestDirectionEpsilon}_prepareParameters(e,t){this._passParameters.splatOrder=this._data.orderTexture.texture,this._passParameters.splatFading=this._data.fadingTexture.texture,this._passParameters.splatAtlas=this._data.textureAtlas.texture;const i=Math.tan(.5*this.camera.fovY),s=i/e*t;a(this._passParameters.tanFov,s,i),this._passParameters.focalLength=e/(2*i);const n=this.view.qualitySettings.gaussianSplat,o=this._isIdle?n.idleMinimumSplatPixelRadius:n.nonIdleMinimumSplatPixelRadius;this._passParameters.minSplatRadius=o*Math.sqrt(t*e)/Math.sqrt(2073600),r(this._passParameters.origin,this.bindParameters.camera.eye),this._prepareHighPrecisionCameraPosition(),this._updateSlicePlaneLocalOrigin(),this._updateClipUniforms()}_updateClipUniforms(){const e=this.clippingBox||c,[t,i,s,a,r,o]=e,[h,l,p]=this.camera.eye,{clipMinCameraRelative:u,clipMaxCameraRelative:m}=this._passParameters;n(u,t-h,i-l,s-p),n(m,a-h,r-l,o-p)}_updateSlicePlaneLocalOrigin(){this._passParameters.slicePlaneLocalOrigin=this.camera.eye}_hasSameClipBox(e){return d(this._clipBox,e,(e,t)=>e===t)}_renderGaussianColorAndDepth(e,t){const i=this.renderingContext;e.acquireColor(R,5,"gaussian depth output"),i.bindFramebuffer(e.fbo),i.setClearColor(0,0,0,0),i.clear(16384),this.renderingContext.bindTechnique(t,this.bindParameters,this._passParameters),this.renderingContext.drawArraysInstanced(E.TRIANGLE_STRIP,0,4,this._data.visibleGaussians)}_prepareHighPrecisionCameraPosition(){o(this._passParameters.tileCameraPosition,this.camera.eye,1/y.tileSize),h(this._passParameters.tileCameraPosition,this._passParameters.tileCameraPosition),o(this._passParameters.cameraDelta,this._passParameters.tileCameraPosition,y.tileSize),l(this._passParameters.cameraDelta,this.camera.eye,this._passParameters.cameraDelta)}_handleFading(){if(0===this._fadeHelper.numFadingTiles)return void(this._previousFrameStart=null);this._previousFrameStart??=this.view.stage.renderer.renderContext.time;const e=this.view.stage?.renderer.renderContext.time-this._previousFrameStart;this._fadeHelper.updateAllTileFading(e),this._previousFrameStart=this.view.stage.renderer.renderContext.time,this._data.fadingTexture.updateTexture(this._data.textureAtlas.pageAllocator.pageCount)}static{this.tileSize=2.048}};e([i()],T.prototype,"produces",void 0),e([i({constructOnly:!0})],T.prototype,"layerView",void 0),T=y=e([s("esri.views.3d.webgl-engine.lib.GaussianSplatRenderNode")],T);export{T as GaussianSplatRenderNode};
@@ -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{update as t}from"../../../../core/arrayUtils.js";import{createTask as s}from"../../../../core/asyncUtils.js";import has from"../../../../core/has.js";import{removeMaybe as i,abortMaybe as r,destroyMaybe as a,releaseMaybe as n,releaseReferencedMaybe as h}from"../../../../core/maybe.js";import{throwIfAborted as o}from"../../../../core/promiseUtils.js";import{watch as d,syncAndInitial as l,initial as m,sync as u}from"../../../../core/reactiveUtils.js";import{signal as _}from"../../../../core/signal.js";import{property as p,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{equals as b,invert as f,multiply as g,copy as P}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as I,create as E}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as w}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as A,ZEROS as C}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{pruneIndexArrays as S}from"../../../../geometry/support/Indices.js";import{RenderNodeOutput as T,InternalRenderCategory as R,AllRenderNodeOutputs as O,AllInternalRenderNodeOutputs as D}from"../../webgl.js";import{minNearDistanceInMeters as F}from"../../state/NearFarHeuristic.js";import{debugFlags as G}from"../../support/debugFlags.js";import{FBOCache as N}from"../core/FBOCache.js";import{RenderPassManager as H}from"../core/renderPasses/RenderPassManager.js";import{isColor as x}from"../core/shaderLibrary/ShaderOutput.js";import{distanceFadeEnd as y}from"../core/shaderLibrary/shading/ScreenSpaceConstants.js";import{RenderNodes as v}from"../effects/RenderNodes.js";import{RenderPluginManager as M}from"../effects/RenderPluginManager.js";import{WeatherFader as L}from"../effects/WeatherFader.js";import{innerAtmosphereFadeStart as q}from"../effects/atmosphere/atmosphereUtils.js";import{Blit as U}from"../effects/blit/Blit.js";import{maxHighlightsPerChannel as j,renderHighlightBuffer as B}from"../effects/highlight/Highlight.js";import{OITBlend as V}from"../effects/transparency/OITBlend.js";import{AnimationTimer as k}from"./AnimationTimer.js";import{AnimationTimeStep as W}from"./AnimationTimeStep.js";import{BoundingInfo as Q}from"./BoundingInfo.js";import{Compositor as z}from"./Compositor.js";import{DepthRange as Y}from"./DepthRange.js";import{depthRangeFromScene as X}from"./depthRangeUtils.js";import{MainFramebuffer as $}from"./MainFramebuffer.js";import{RenderContext as J,defaultRenderOccludedMask as K}from"./RenderContext.js";import{RendererBase as Z}from"./RendererBase.js";import{setupFeatureDefaults as ee}from"./RenderFeature.js";import{RenderPluginInput as te}from"./RenderPluginInput.js";import{ShadowAccumulator as se}from"./ShadowAccumulator.js";import{ShadowMap as ie}from"./ShadowMap.js";import re from"./SliceHelper.js";import{MergedRenderer as ae}from"../materials/renderers/MergedRenderer.js";import{RenderSceneResult as ne}from"../parts/renderUtils.js";import{RendererPerformanceInfo as he,PerformanceCategory as oe}from"../statistics/RendererPerformanceInfo.js";import{ColorAttachment1 as de,PixelType as le,ColorAttachment2 as me,ColorAttachment0 as ue,DrawBufferNone as _e}from"../../../webgl/enums.js";let pe=class extends Z{constructor(e,t,s,i,r){super({stage:e}),this._techniques=s,this._rctx=i,this._requestRender=r,this._pluginsHas={occludedHudElements:!1,hudElements:!1,water:!1},this.renderPassManager=new H,this._isRendering=!1,this._inGlobeView=!1,this._backgroundColor=A(0,0,0,1),this._sliceHelper=new re,this.sceneDepthRange=_(Y.Infinite),this._state=_(2),this._hasGlobalIlluminationFlag=!!has("global-illumination"),this._hasAnimations=!1,this._animationTimestep=new W,this._loadEdgeViewTask=null,this._edgeViewCallbacks=[],this._reprojectionMatrixVersion=_(0),this._renderHiddenTransparentEdges=()=>{},this._pluginInput=new te,this._hasTransparentGeometry=!1,this._releaseNodeInputs=e=>{for(const t of Te)e.some(({name:e})=>e===t)&&this._pluginInput.release(t)},this._testsNeedsDepth=!1,this._fboCache=new N(i),this._compositor=new z(i,s),this._renderStateFeatures=_(ee(e.view.qualityProfile));const a=new ie(this._fboCache,e.viewingMode);this._renderContext=new J(this._rctx,a,s),this._framebuffer=new $(this._fboCache,this._bindParameters),this._performanceInfo=new he(this._rctx),this._blit=new U(s),this._shadowAccumulator=new se(this.fboCache,s,e,e=>{const t=this.shadowsEnabled;a.enabled=!0,this._ensureBindParametersCamera(e.camera,e.contentCamera),this._plugins.prepareRender(),a.enabled=t},(t,s,i)=>{const r=e.view.qualitySettings.maximumPixelRatio;t.shadowMap.start(t.camera,s,i,!0,r),this._renderShadowCascades(5,t.shadowMap),t.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(t.camera,t.contentCamera)},r),this._nodes=new v(this._renderContext),this._plugins=new M({renderContext:this._renderContext,techniques:s,materials:t,requestRender:r,controller:e}),this._plugins.add(this.renderPassManager),this.weatherFader=new L({view:e.view,context:this._renderContext}),this.addHandles([d(()=>e.view.state.camera,()=>r(),l),d(()=>G.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES,e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(0):()=>{},r()},m),d(()=>e.view.environment.background?.color,e=>{const t=e?e.toUnitRGBA():C;w(this._backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]),r()},l),d(()=>e.view.state.camera.relativeElevation,e=>this._inGlobeView=(e??1/0)>=y,l),d(()=>this._bindParameters.clouds.fadeFactor,()=>{this._bindParameters.fadeLighting(),this._requestRender(2)},u),d(()=>this._bindParameters.clouds.data?.state,()=>r(),u),d(()=>e.view.state.highlights,e=>{this._bindParameters.highlights=e,r()},m),d(()=>"sun"===e.view.environment.lighting?.type,e=>{this._bindParameters.enableFillLights=e,this._requestRender()},l)])}destroy(){this._gpuTimerHandle=i(this._gpuTimerHandle),this._nodes.destroy(),this._framebuffer.dispose(),this._shadowAccumulator.destroy(),this._shadowAccumulator=null,this._loadEdgeViewTask=r(this._loadEdgeViewTask),this._edgeView=a(this._edgeView),this.renderPassManager.dispose(),this.weatherFader=a(this.weatherFader),this._releaseFBOs(),this._disposeOffscreenBuffers(),this._fboCache.destroy(),this._fboCache=null,this._renderContext.destroy(),this._plugins.destroy(),this._pluginInput=null,this._oitBlendOrNil=null,this._nodes=null,this._framebuffer=null,this._performanceInfo=null,Q.prune(),ae.prune(),S()}get renderContext(){return this._renderContext}get _bindParameters(){return this._renderContext.bind}get _oitBlend(){return this._oitBlendOrNil??=new V(this._techniques),this._oitBlendOrNil}get performanceInfo(){return this._performanceInfo}updateRenderFeatures(e){this._renderStateFeatures.value=ee(e),this._requestRender()}isFeatureEnabled(e,t=this._state.value){return this._renderStateFeatures.value.get(t,e)??!1}setFeatureEnabled(e,t,s){this._renderStateFeatures.mutate(i=>i.set(t,e,s)),this._requestRender()}get hasReflections(){return this._bindParameters.screenSpaceReflections.enabled=this._pluginsHas.water&&this.isFeatureEnabled(4),this._bindParameters.screenSpaceReflections.enabled}get _hasHighlights(){return this._plugins.produces(10,2,4,18,12,13,14)}hasHighlight(e){return this._plugins.hasHighlight(e)}get _hasHUDHighlights(){return this._plugins.produces(10,12,13,14)}get hasAmbientIllumination(){return this.isFeatureEnabled(3)&&!this._inGlobeView}get hasGlobalIllumination(){return this._hasGlobalIlluminationFlag&&this.hasAmbientIllumination}get hasGlobalIlluminationHighQuality(){return this.hasGlobalIllumination&&this.isFeatureEnabled(10)}get _keepGlobalIlluminationShadingAlive(){return this._hasGlobalIlluminationFlag&&!this._inGlobeView}get hasSMAA(){return this.isFeatureEnabled(0)}get _hasEmissions(){return this._plugins.hasEmissions}get hasFloatBlend(){return this._rctx.driverTest.floatBufferBlend.result&&this.isFeatureEnabled(9)}get highResolutionAtmosphere(){return this.isFeatureEnabled(2)}get fboCache(){return this._fboCache}_releaseFBOs(){this._bindParameters.hudOcclusion=n(this._bindParameters.hudOcclusion),this._bindParameters.depth=null}_disposeOffscreenBuffers(){this._framebuffer.dispose(),this._bindParameters.globalIllumination=n(this._bindParameters.globalIllumination),this._bindParameters.reprojection.lastFrameDepth=n(this._bindParameters.reprojection.lastFrameDepth),this._bindParameters.reprojection.lastFrameEmission=n(this._bindParameters.reprojection.lastFrameEmission),this._disposeBindBuffers()}_disposeBindBuffers(){this._bindParameters.shadowMap.disposeOutputs()}get updating(){return this._loadEdgeViewTask&&!this._loadEdgeViewTask.finished||this._edgeView?.updating||this._shadowAccumulator.readyToRun||this._plugins.updating||this.weatherFader?.readyToRun||!this.isCameraFinal}loadEdgeView(){return this._loadEdgeViewTask||(this._loadEdgeViewTask=s(async e=>{const{EdgeView:t}=await import("./edgeRendering/EdgeView.js");o(e);const s=this._edgeView=new t({rctx:this._rctx,renderSR:this.stage.view.renderSpatialReference,viewingMode:this.stage.view.stage.viewingMode,techniques:this._techniques,setNeedsRender:()=>this._requestRender(),schedule:Ge(this.stage.view.resourceController)});return this.addHandles(d(()=>s.updating,()=>this._requestRender(),u)),this._requestRender(),this._edgeViewCallbacks.forEach(e=>e(s)),this._edgeViewCallbacks.length=0,s})),this._loadEdgeViewTask.promise}withEdgeView(e){this.loadEdgeView(),null==this._edgeView?this._edgeViewCallbacks.push(e):e(this._edgeView)}get edgeView(){return this._edgeView}get isCameraFinal(){return this._reprojectionMatrixVersion.value>=0&&b(this._bindParameters.reprojection.matrix,I)}set _reprojectionMatrix(e){t(this._bindParameters.reprojection.matrix,e)&&this._reprojectionMatrixVersion.value++}get shadowsEnabled(){return!!this._bindParameters.shadowMap.enabled}setParameters(e){void 0!==e.shadowMap&&this._bindParameters.shadowMap.enabled!==e.shadowMap&&(this._bindParameters.shadowMap.enabled=e.shadowMap,this._requestRender()),e.shadowCast&&this._shadowAccumulator.setParameters(e.shadowCast)}set slice(e){this._sliceHelper.update(e)&&this._requestRender()}get plugins(){return this._plugins}commit(e,t){return this._isRendering&&console.warn("Renderer.modify called while rendering"),!!super.commit(e,t,this._plugins.context)&&(this.updateHasFlags(),!0)}rendererAdded(e){this._plugins.add(e)}rendererRemoved(e){this._plugins.remove(e)}get occludedRequiresStencil(){return this._occludedRequiresOccludeeStencil||this.occludedRequiresIntegratedMeshStencil}get _occludedRequiresOccludeeStencil(){return this._bindParameters.hasOccludees&&!!(8&this.plugins.renderOccludedFlags)}get occludedRequiresIntegratedMeshStencil(){return this._plugins.produces(0,0)&&this._plugins.produces(0,9)}updateHasFlags(){const has=this._pluginsHas;has.occludedHudElements=this._plugins.produces(0,13),has.hudElements=has.occludedHudElements||this._plugins.produces(0,...Ee),has.water=this._plugins.produces(4,19),this._bindParameters.hasOccludees=this._plugins.hasOccludees,this._requestRender()}updateAnimation(e,t){this._animationTimer??=new k(e.camera,t),this._animationTimer.advance(e.camera,t,this._animationTimeDilation);const s=this._hasAnimations;return this._hasAnimations=this._plugins.updateAnimation(this._animationTimer),this._hasAnimations=this._nodes.updateAnimation(this._animationTimer)||this._hasAnimations,this._hasAnimations!==s&&(this._gpuTimerHandle=s?i(this._gpuTimerHandle):this.performanceInfo.enableGPUPerformanceInfo()),this._hasAnimations}get animationTimestep(){return this._animationTimestep.value}get _animationTimeDilation(){return this._animationTimestep.timeDilation}resetAnimation(){this._animationTimestep.clear()}tick(){this.fboCache.clean()}render(e,t,s,i=!1){try{return this._isRendering=!0,this._render(e,t,s,i)}catch(r){console.error(`Exception during rendering: ${r}:\n${r.stack}`)}finally{this._isRendering=!1}return new ne(this._pluginInput.get(T.FINAL),null)}_render(e,t,s,i){const r=0===s;this.performanceInfo.startFrame(),this.fboCache.frameStart(),this.fboCache.interactive=r,this._disposeBindBuffers();const{camera:a,contentCamera:o,mode:d,alignPixelEnabled:l}=e;this._state.value=d,this._renderContext.time=t,this._bindParameters.output=0,this._bindParameters.emissions=this._hasEmissions,this._bindParameters.alignPixelEnabled=l,this._bindParameters.decorations=!i,this._bindParameters.mainDepth=null,this._bindParameters.useFloatBlend.value=this.hasFloatBlend;const m=!i||!this._sliceHelper.isDecoration;this._bindParameters.slicePlane=m?this._sliceHelper.plane:null,this._bindParameters.viewshedEnabled=this._nodes.produces(R.VIEWSHED),this._bindParameters.cutFillComputationEnabled=this._nodes.produces(R.CUTFILL_COMPUTATION),this._bindParameters.cutFillVisualizationEnabled=this._nodes.produces(R.CUTFILL_COLOR),this._renderOverlay(),a.setGLViewport(this._rctx);const u=this._framebuffer,_=u.initialize(a.fullWidth,a.fullHeight,this._backgroundColor),p=this._needsLastFrameColor;p?(_?.retain(p-1),_?.setName("last frame color"),this._bindParameters.reprojection.lastFrameColor=_):_?.release(),this._ensureBindParameters(a,o,t),this._plugins.sortTestsTransparentOrderedSlots(Ae),this._plugins.prepareRender(),this._bindParameters.hasShadowHighlights=this._needsShadowHighlight&&!i,this._hasTransparentGeometry=this._plugins.produces(0,...be),this._precompilePrepasses(),this.performanceInfo.advance(oe.PREPARE);const c=this._computeShadowDepthRange(a);this._pluginInput.set("normals",this._renderNormals()),this._renderAmbientIlluminationAndDepth(),this._renderShadowMap(a,o,this._bindParameters.lighting.mainLight.direction,c),this._renderShadowAccumulation(c,!r),u.bind(),this._bindParameters.mainDepth=u.depth.attachment,this._precompileShaders(r),this._bindParameters.output=0;this._bindParameters.hasOpaqueEmissions||0===this._bindParameters.emissions?(this._renderOpaque(),this._renderPreTransparent()):(this._bindParameters.emissions=0,this._renderOpaque(),this._renderPreTransparent(),this._bindParameters.emissions=2),this._renderTransparent(),this.hasReflections&&(this._bindParameters.depth=h(this._bindParameters.depth),this._bindParameters.reprojection.lastFrameColor=h(this._bindParameters.reprojection.lastFrameColor)),this._bindParameters.shadowMap.disposeOutput(5),this._renderCutFillComputation(),this._pluginInput.set(R.FOCUSAREA,this._renderFocusAreaGeometry()),u.update(e=>this._renderNodes(R.TRANSPARENT_ENVIRONMENT,e)),u.update(e=>this._renderNodes(R.VIEWSHED,e)),u.update(e=>this._renderNodes(R.LASERLINES,e)),this._nodes.requireGeometryDepth&&(this._bindParameters.depth=h(this._bindParameters.depth)),u.update(e=>this._renderNodes(R.FOCUSAREA_COLOR,e)),u.update(e=>this._renderNodes(R.CUTFILL_COLOR,e)),this._pluginInput.release(R.FOCUSAREA),this._pluginInput.release(R.GROUND_DEPTH),u.update(e=>this._renderNodes(R.OCCLUDED,e)),this._pluginInput.set("highlights",this._renderHighlightPrepass());const b=2===s?this._renderObjectAndLayerIdColor():null;u.update(e=>this._renderNodes(T.COMPOSITE,e)),this._bindParameters.shadowMap.disposeOutputs(),this._bindParameters.shadowHighlight=n(this._bindParameters.shadowHighlight),this.hasGlobalIllumination&&this._hasEmissions&&(this._bindParameters.reprojection.lastFrameEmission=u.color.obtainAttachment(de)),u.update(e=>this._renderNodes(R.ANTIALIASING,e));const f=this._hasTransparentGeometry?2:1;let g;return this._bindParameters.emissions=0,this._hasHUDHighlights&&u.update(e=>this._renderHUD(f,e)),u.update(e=>this._renderNodes(R.HIGHLIGHT_COLOR,e)),this._hasHUDHighlights||u.update(e=>this._renderHUD(f,e)),this._bindParameters.emissions=this._hasEmissions,u.update(e=>this._renderNodes(R.MAGNIFIER,e)),u.update(e=>this._renderNodes(T.FINAL,e)),r&&this._blit.toFramebuffer(u.color,this._bindParameters),this.hasGlobalIllumination&&(this._bindParameters.reprojection.lastFrameDepth=this._bindParameters.depth),this._testsNeedsDepth&&(this._bindParameters.depth=h(this._bindParameters.depth)),this._releaseFBOs(),u.releaseDepth(),this._bindParameters.reprojection.lastFrameCamera.copyFrom(this._bindParameters.camera),this.fboCache.frameEnd(),r||(g=u.color,g.retain(),this._releaseFBOs(),this._disposeOffscreenBuffers()),this.performanceInfo.finishFrame(),new ne(g,b)}_precompileShaders(e){++this._plugins.context.techniques.precompiling,this._bindParameters.output=0;const t=this._bindParameters,s=t.hasEmission;this._precompileOpaqueGeometry(),this._nodes.precompile(s,R.OPAQUE_ENVIRONMENT,R.GAUSSIAN_SPLAT,R.OPAQUE_OCCLUSION_QUERY,R.VOXEL);if(2===this._bindParameters.emissions&&(this._bindParameters.emissions=0,this._precompileOpaqueGeometry(),this._bindParameters.emissions=2),this._bindParameters.output=3,this._plugins.precompile(...fe),this._bindParameters.output=0,this._plugins.precompile(...fe),this._hasTransparentGeometry){const e=this._pluginsHas.occludedHudElements;this._oitBlend.precompile(this._bindParameters,e,0),this._pluginsHas.hudElements&&this._oitBlend.precompile(this._bindParameters,!1,1),this._precompileTransparentGeometry()}this._nodes.precompile(s,R.FOCUSAREA),this._compositor.precompile(this._usesPremultipliedAlphaBlit,!!this._needsEdges,s),this._hasTransparentGeometry||this._plugins.precompile(15),this._nodes.precompile(s,R.TRANSPARENT_ENVIRONMENT,R.VIEWSHED,R.CUTFILL_COMPUTATION,R.CUTFILL_COLOR,R.LASERLINES,R.FOCUSAREA_COLOR,R.OCCLUDED,R.ANTIALIASING),t.highlightMixTexture=t.highlights.length>1?this._rctx.emptyTexture:null,this._precompileHUD(0),t.emissions=0,this._precompileHUD(0),this._precompileHUD(1),t.emissions=this._hasEmissions,this._hasHighlights&&(t.highlights.forEach((e,s)=>{t.highlightLevel=s,this._precompileAllGeometry(10),this._hasHUDHighlights&&this._plugins.precompile(13,12)}),t.highlightLevel=null,this._nodes.precompile(s,R.HIGHLIGHT_COLOR)),t.highlightMixTexture=null,this._nodes.precompile(s,T.COMPOSITE,R.MAGNIFIER),this._shadowAccumulator.precompile(),this._plugins.precompile(8),s&&(t.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.precompile(8),t.transparentWithoutDepthEmissionDimmingPass=!1),e&&this._blit.precompile(),--this._plugins.context.techniques.precompiling}_renderFocusAreaGeometry(){const e=this._nodes.produce(R.FOCUSAREA,this._pluginInput);return e&&this.performanceInfo.advance(oe.FOCUS_AREA_MASK),e}_renderObjectAndLayerIdColor(){if(!this._nodes.produces("olid"))return null;const e=this._bindParameters.output;++this._techniques.precompiling;const{width:t,height:s}=this._framebuffer.size;let i=this.fboCache.acquire(t,s,"olid");return i.acquireDepth(14),i=this._nodes.render(i,this._pluginInput),--this._techniques.precompiling,this.performanceInfo.advance(oe.OBJECT_AND_LAYER_ID_COLOR),this._bindParameters.output=e,i}finish(e){this._hasAnimations||this._animationTimestep.clear();const t=this.performanceInfo.gpuSamplingEnabled,s=0===e;if(s||t){const e=s?this.performanceInfo.elapsedTime:0;let i=0;t?i=this.performanceInfo.totalGPUTimeSampler.last:this._rctx.gl.finish();const r=Math.max(e,i);this._animationTimestep.frame(r,s)}}readMainDepth(e,t){const{mainDepth:s,camera:i}=this._bindParameters;if(!s)return;const r=this.fboCache.acquire(this._framebuffer.size.width,this._framebuffer.size.height,"linear depth");this._rctx.bindFramebuffer(r.fbo),i.setGLViewport(this._rctx),this._rctx.setScissorRect(e[0],e[1],e[2],e[3]),this._rctx.setScissorTestEnabled(!0),this._rctx.clearFramebuffer(C),this._compositor.blitDepthToLinearDepth(this._bindParameters,s),this._rctx.setScissorTestEnabled(!1),this._rctx.setScissorRect(0,0,this._rctx.gl.canvas.width,this._rctx.gl.canvas.width),r.fbo?.readPixels(e[0],e[1],e[2],e[3],6408,le.UNSIGNED_BYTE,t),r.release()}readAccumulatedShadow(e){return this._shadowAccumulator.readAccumulatedShadow(e[0],e[1])}get _needsEdges(){return this._edgeView?.shouldRender()?this._edgeView:null}_renderEdges(e){const t=this._needsEdges;if(!t)return;const{width:s,height:i}=this._framebuffer.size,r=this.fboCache.acquire(s,i,"edges");r.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer(C),t.render(this._bindParameters,e),r.detachDepth(),this._framebuffer.bind(),this._compositor.composite(this._bindParameters,r.getTexture()),r.release(),this.performanceInfo.advance(1===e?oe.OPAQUE_EDGES:oe.TRANSPARENT_EDGES)}_renderOverlay(){this._bindParameters.overlay=this.overlay?.render(this._renderContext.time),this._bindParameters.overlay&&this.performanceInfo.advance(oe.OVERLAY)}_renderShadowMap(e,t,s,i){if(!this.shadowsEnabled)return;const r=this._bindParameters.shadowMap;if(r.start(e,s,i,this.isFeatureEnabled(5),this.stage.view.qualitySettings.maximumPixelRatio),this._needsShadowHighlight){this._renderShadowCascades(6,r),e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,t);const s=this._bindParameters.output;this._bindParameters.output=0,this._bindParameters.shadowHighlight=this._nodes.produce(R.SHADOW_HIGHLIGHT,this._pluginInput),this._bindParameters.output=s,r.disposeOutput(6),r.clear(),this._renderShadowCascades(7,r)}else this._renderShadowCascades(5);e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,this._bindParameters.contentCamera),this._needsShadowHighlight&&(this._bindParameters.depth=h(this._bindParameters.depth)),this.performanceInfo.advance(oe.SHADOW_MAP)}_renderCutFillComputation(){this._nodes.produce(R.CUTFILL_COMPUTATION,this._pluginInput)?.release()}_precompileShadowCascades(e){0!==this._bindParameters.shadowMap.cascades.length&&this._precompileAllGeometry(e)}_renderShadowCascades(e,t=this._bindParameters.shadowMap){const s=this._bindParameters.output,i=t===this._bindParameters.shadowMap&&6!==e;t.bindFramebuffer();for(const r of t.cascades)r.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(r.camera,r.camera),this.renderAllGeometry(e),i&&this._renderShadowCasterNodes();t.finish(e),this._bindParameters.output=s}_renderShadowCasterNodes(){if(!this._nodes.produces(R.SHADOW_CASTERS))return;const e=this._bindParameters.shadowMap.renderTarget;if(!e)return;const t=e.name;e.setName(R.SHADOW_CASTERS),this._pluginInput.set(R.SHADOW_CASTERS,e);try{this._nodes.render(e,this._pluginInput,this._releaseNodeInputs)}finally{e.setName(t),this._pluginInput.set(R.SHADOW_CASTERS,null)}}get _needsLastFrameColor(){return+this.hasReflections+ +this.hasGlobalIllumination}get _needsDepth(){return+this._nodes.requireGeometryDepth+ +this.hasReflections+ +this.hasGlobalIllumination+ +this._shadowAccumulator.accumulating+ +this._testsNeedsDepth}get _usesPremultipliedAlphaBlit(){return this._pluginsHas.hudElements}_renderAmbientIlluminationAndDepth(){this._bindParameters.depth=n(this._bindParameters.depth);const e=this._pluginInput.get("normals");if(e){this._pluginInput.set(R.AMBIENT_ILLUMINATION,this._hasGlobalIlluminationFlag?this._renderGlobalIllumination():this._renderSSAO());const t=this._needsDepth;t?(this._rctx.bindFramebuffer(e.fbo),this._rctx.clear(1024),this._renderGeometryWithoutNormals(3),this._bindParameters.depth=e.obtainDepthTexture(),this._bindParameters.depth?.retain(t-1),this.performanceInfo.advance(oe.DEPTH)):e.detachDepth(),this.hasAmbientIllumination&&this._pluginInput.release("normals")}else this._hasGlobalIlluminationFlag&&(this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIlluminationEnabled=this._keepGlobalIlluminationShadingAlive),this._renderAllGeometryDepth()}_renderAllGeometryDepth(){const e=this._needsDepth;if(0===e)return;const{width:t,height:s}=this._framebuffer.size,i=this.fboCache.acquire(t,s,"geometry depth",14);this._rctx.bindFramebuffer(i.fbo),this._rctx.clear(1280),this.renderAllGeometry(3),this._bindParameters.depth=i.obtainDepthTexture(),this._bindParameters.depth?.retain(e-1),i.release(),this.performanceInfo.advance(oe.DEPTH)}get _needsShadowDepthRange(){return this._bindParameters.shadowMap.enabled||this._shadowAccumulator.active}_computeShadowDepthRange(e){if(!this._needsShadowDepthRange)return Y.Zero;const t=X(e,this._plugins.plugins,this.stage.layers,0);return t.union(this._plugins.queryDepthRange(e)),this._bindParameters.shadowMap.enabled&&t.union(this._nodes.queryDepthRange(R.SHADOW_CASTERS,e)),t.near=Math.max(e.near,t.near),t.far=Math.min(e.far,t.far),t}updateSceneDepthRange(e){if(!this.stage.view.state.isGlobal)return void(this.sceneDepthRange.value=Y.Infinite);if((this.stage.view.renderCoordsHelper?.getAltitude(e.eye)??0)<q)return void(this.sceneDepthRange.value=Y.Infinite);const t=e.clone();t.near=F,t.far=1e10;const s=X(t,this._plugins.plugins,this.stage.layers,1);s.union(this._plugins.queryDepthRange(t)),this.sceneDepthRange.value.equals(s)||(this.sceneDepthRange.value=s)}get _normalsRequired(){return this._nodes.require("normals",...O,R.VIEWSHED,R.LASERLINES)+(this.hasAmbientIllumination?1:0)}_precompilePrepasses(){this._normalsRequired?(this._precompilePlugins(4,ge),this._needsDepth&&this._precompilePlugins(3,Pe)):this._needsDepth&&this._precompileAllGeometry(3),this.shadowsEnabled&&(this._needsShadowHighlight?(this._nodes.precompile(this._bindParameters.hasEmission,R.SHADOW_HIGHLIGHT),this._precompileShadowCascades(6),this._precompileShadowCascades(7)):this._precompileShadowCascades(5)),this._shadowAccumulator.active&&(this._shadowAccumulator.precompilePrepass(),this._precompileAllGeometry(5)),this.hasAmbientIllumination&&this._normalsRequired&&this._nodes.precompile(this._bindParameters.hasEmission,R.AMBIENT_ILLUMINATION)}_renderNormals(){const e=this._normalsRequired;if(0===e)return;const{width:t,height:s}=this._framebuffer.size,i=this.fboCache.acquire(t,s,"normals",5);i.acquireDepth(14),this._rctx.bindFramebuffer(i.fbo),this._rctx.clearFramebuffer(C,!0,!0),this._bindParameters.output=4,this._plugins.render(...ge);const r=this._nodes.optional("normals",...O,R.VIEWSHED);return i.retain(e+r-1),this.performanceInfo.advance(oe.NORMALS),i}_renderSSAO(){this._bindParameters.globalIlluminationEnabled=!1;const e=this._pluginInput.get("normals");return this.hasAmbientIllumination&&e?(this._bindParameters.ssao=this._nodes.produce(R.AMBIENT_ILLUMINATION,this._pluginInput),this._bindParameters.ssao&&this.performanceInfo.advance(oe.AMBIENT_ILLUMINATION),this._bindParameters.ssao):null}_renderGlobalIllumination(){if(!this.hasGlobalIllumination)return this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIlluminationEnabled=this._keepGlobalIlluminationShadingAlive,null;const e=this._nodes.produce(R.AMBIENT_ILLUMINATION,this._pluginInput);return this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIllumination=e,this._bindParameters.globalIlluminationEnabled=!0,this.hasGlobalIlluminationHighQuality?this.performanceInfo.advance(oe.AMBIENT_ILLUMINATION_HIGH_QUALITY):this.performanceInfo.advance(oe.AMBIENT_ILLUMINATION),e}_releaseGlobalIlluminationBuffers(){this._bindParameters.reprojection.lastFrameColor=h(this._bindParameters.reprojection.lastFrameColor),this._bindParameters.reprojection.lastFrameDepth=h(this._bindParameters.reprojection.lastFrameDepth),this._bindParameters.reprojection.lastFrameEmission=h(this._bindParameters.reprojection.lastFrameEmission),this._bindParameters.globalIllumination=h(this._bindParameters.globalIllumination),this._bindParameters.globalIlluminationEnabled=!1}_precompileAllGeometry(e){const t=this._bindParameters.output;this._bindParameters.output=e,this._precompileOpaqueGeometry(),this._precompileTransparentGeometry(),this._plugins.precompile(...fe),this._bindParameters.output=t}renderAllGeometry(e){this._bindParameters.output=e,this._renderOpaqueAndTransparentGeometry(e),this._renderTransparentGround()}precompileSlots(e,...t){for(const s of t)this._bindParameters.slot=s,e.precompile(this._renderContext)}precompileOccludedSlots(e,t){for(const s of t)this._renderContext.renderOccludedMask=s,this.precompileSlots(e,...Ie);this._renderContext.renderOccludedMask=K}renderSlots(e,...t){for(const s of t)this._bindParameters.slot=s,e.forAll(e=>{const t=e.acquireTechniques(this._renderContext);t&&e.render(this._renderContext,t)})}renderOccludedSlots(e,t){this._renderContext.renderOccludedMask=t,this.plugins.renderOccludedFlags>1&&this._plugins.render(9),this.renderSlots(e,...Ie),this._renderContext.renderOccludedMask=K}renderHUD(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(...Ce[e])}_renderHUDElements(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(16),this.renderHUD(e),this._bindParameters.hudRenderStyle=e,this._plugins.render(14)}precompileViewshedShadowMap(){this._precompileAllGeometry(8)}precompileCutFillOrthographicReferenceDepth(){this._precompilePlugins(9,Se)}_precompilePlugins(e,t){const s=this._bindParameters.output;this._bindParameters.output=e,this._plugins.precompile(...t),this._bindParameters.output=s}renderViewshedShadowMap(e){const{camera:t,contentCamera:s}=this._bindParameters,i=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this.renderAllGeometry(8),this._ensureBindParametersCamera(t,s),this._bindParameters.camera.setGLViewport(this._rctx),this._bindParameters.output=i}renderCutFillOrthographicReferenceDepth(e){const{camera:t,contentCamera:s}=this._bindParameters,i=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this._bindParameters.output=9,this._plugins.render(...Se),this._ensureBindParametersCamera(t,s),t.setGLViewport(this._rctx),this._bindParameters.output=i}get _needsGroundDepth(){return this._bindParameters.cutFillVisualizationEnabled}_blitGroundDepth(){if(!this._needsGroundDepth)return null;const{width:e,height:t}=this._framebuffer.size,s=this.fboCache.acquire(e,t,R.GROUND_DEPTH,14);return this._rctx.blitFramebuffer(this._framebuffer.color.fbo,s.fbo,256),this._framebuffer.bind(),s}_renderOpaqueAndTransparentGeometry(e){this._bindParameters.output=e,this._renderOpaqueGeometry(),this._renderTransparentGeometry()}_renderGeometryWithoutNormals(e){this._bindParameters.output=e,this._plugins.render(...Pe)}_precompileOpaqueGeometry(){this._needsOpaquePass&&(this._plugins.precompile(...ce),this._nodes.precompile(this._bindParameters.hasEmission,"opaque-color"))}_renderOpaqueGeometry(){this._plugins.render(...ce)}_renderTransparentGeometry(){this._plugins.render(...be),this._hasTransparentGeometry&&this._plugins.render(15)}_renderTransparentGround(){this._plugins.render(...fe)}_precompileHUD(e){if(!this._pluginsHas.hudElements)return;const t=this._bindParameters.output,s=this._bindParameters.hudRenderStyle;this._bindParameters.hudRenderStyle=e,this._bindParameters.output=1,this._plugins.precompile(...Ee),this._bindParameters.output=2,this._plugins.precompile(...Ee),this._bindParameters.output=0,this._oitBlend.precompile(this._bindParameters,!1,1),this._hasHighlights&&(this._bindParameters.output=10,this._plugins.precompile(...Ee)),this._bindParameters.output=t,this._bindParameters.hudRenderStyle=s}_renderHUD(e,t){if(!this._pluginsHas.hudElements)return t;const s=this._renderOIT(1,e);this._rctx.bindFramebuffer(t.fbo);const i=!!t.getTexture(de);return this._compositor.compositePreMultipliedAlpha(this._bindParameters,s.getTexture(),i),s.release(),this.performanceInfo.advance(0===e?oe.HUD_OCCLUDED:oe.HUD),t}get _needsShadowHighlight(){return this.shadowsEnabled&&this._plugins.produces(6,2)}_renderHighlightPrepass(){if(!this._hasHighlights)return;const{fboCache:e,_rctx:t,_bindParameters:s}=this,{width:i,height:r}=this._framebuffer.size,{highlights:a}=s,n=a.length>j?3:1,h=e.acquire(i,r,"highlights",n);h.acquireDepth(14);const o=this._plugins.produces(10,0);return o&&this._framebuffer.color.fbo&&h.fbo&&t.blitFramebuffer(this._framebuffer.color.fbo,h.fbo,1024),t.bindFramebuffer(h.fbo),t.gl.clearBufferuiv(6144,0,[0,0,0,0]),o||t.clear(1024),this._bindParameters.output=10,t.bindFramebuffer(h.fbo),B(t,e,i,r,s,()=>this._renderHighlightGeometries()),h.detachDepth(),this.performanceInfo.advance(oe.HIGHLIGHTS),h.retain(this._nodes.require("highlights",...D)+this._nodes.optional("highlights",...D)-1),h}_renderHighlightGeometries(){this._plugins.render(...we),this._rctx.clear(256),this._renderHUDElements(2)}_renderShadowAccumulation(e,t){this._shadowAccumulator.updateDepthRange(e),this._bindParameters.output=0,this._shadowAccumulator.accumulating&&this._bindParameters.depth&&(this._shadowAccumulator.renderAccumulation(this._bindParameters,t)&&this.performanceInfo.advance(oe.ACCUMULATED_SHADOWS),this._bindParameters.depth=h(this._bindParameters.depth))}_precompileTransparentGeometry(){x(this._bindParameters.output)?(this._bindParameters.output=1,this._plugins.precompile(...be),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=2,this._plugins.precompile(...be),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=0):this._plugins.precompile(...be)}_renderOIT(e,t=2){const s=1===e,{width:i,height:r}=this._framebuffer.size,a=s?()=>this._renderHUDElements(t):()=>this._renderTransparentGeometry(),h=this._bindParameters,o=h.useFloatBlend.value?8:5,d=h.output;h.output=1;const l=s?"oit hud":"oit",m=this.fboCache.acquire(i,r,l,o),u=h.hasEmission&&(0===e||1!==t);u&&m.acquireColor(de,o,"oit emissive");const _=u?me:de;m.acquireColor(_,this.hasFloatBlend?7:0,"oit alpha"),s||m.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(m.fbo),this._rctx.clearFramebuffer([0,0,0,1]),u&&this._rctx.clearBuffer(1,C),a(),m.detachDepth(),h.output=2;const p=this.fboCache.acquire(i,r,s?"oit front hud":"oit front");u&&p.acquireColor(de,o,"oit front emissive"),s?p.acquireDepth(this._hudDepthFormat):p.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(p.fbo),this._rctx.clearFramebuffer(C,s),a(),p.detachDepth();const c=this._pluginsHas.occludedHudElements&&!s;let b;return h.hudOcclusion=n(this._bindParameters.hudOcclusion),h.output=0,s?(b=this.fboCache.acquire(i,r,"oit composite hud"),this._rctx.bindFramebuffer(b.fbo),this._rctx.setClearColor(0,0,0,1e-13),this._rctx.clear(16384)):(c&&(this._framebuffer.color.acquireColor(_,0,"hud occlusion"),this._rctx.clearBuffer(_-ue,C)),this._framebuffer.bind()),this._oitBlend.blend(this._rctx,m,p,h,u,c,e),b?.detachDepth(),s||c&&(h.hudOcclusion=this._framebuffer.color.obtainAttachment(_)),p.release(),m.release(),h.output=d,b}get _hudDepthFormat(){return this.isFeatureEnabled(7)?14:13}get _needsOpaquePass(){return this.plugins.produces(0,...ce)||this.plugins.produces(5,...ce)||this.plugins.produces(3,3)}_renderOpaque(){const e=this._needsOpaquePass;e&&(this._plugins.render(0,1),this._pluginInput.set(R.GROUND_DEPTH,this._blitGroundDepth()),this._plugins.render(2,3));const t=this._framebuffer;t.update(t=>this._renderNodes(T.OPAQUE,t,e)),this.fboCache.debugCallback?.(T.OPAQUE,t.color.fbo),t.update(e=>this._renderNodes(R.OPAQUE_ENVIRONMENT,e)),this.fboCache.debugCallback?.(R.OPAQUE_ENVIRONMENT,t.color.fbo),this._renderEdges(1)}_renderPreTransparent(){this._framebuffer.update(e=>this._renderNodes(R.GAUSSIAN_SPLAT,e)),this.fboCache.debugCallback?.(R.GAUSSIAN_SPLAT,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(R.OPAQUE_OCCLUSION_QUERY,e)),this.fboCache.debugCallback?.(R.OPAQUE_OCCLUSION_QUERY,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(R.VOXEL,e)),this.fboCache.debugCallback?.(R.VOXEL,this._framebuffer.color.fbo)}_renderTransparent(){const e=this._framebuffer;2===this._bindParameters.emissions&&e.ensureEmissionAttachment(),this._renderHiddenTransparentEdges(),this._hasTransparentGeometry&&this._renderOIT(0),e.update(e=>this._renderNodes(T.TRANSPARENT,e,this._hasTransparentGeometry)),this.fboCache.debugCallback?.(T.TRANSPARENT,e.color.fbo),this._hasTransparentGeometry||this._plugins.render(15),this._renderEdges(0),this._bindParameters.ssao=n(this._bindParameters.ssao),this._renderTransparentEnvironment()}_renderTransparentEnvironment(){if(this._shadowAccumulator.render(this._bindParameters),this.performanceInfo.advance(oe.APPLY_ACCUMULATED_SHADOWS),this._framebuffer.bind(),this._plugins.render(8),this._bindParameters.hasEmission){const e=this._rctx.setDrawBuffers([_e,de]);this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.render(8),this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!1,this._rctx.setDrawBuffers(e)}this.performanceInfo.advance(oe.TRANSPARENT_MATERIAL_WITHOUT_DEPTH)}_renderNodes(e,t,s=!1){const i=t.name;if(t.setName(e),this._pluginInput.set(e,t),!this._nodes.produces(e))return s&&this.performanceInfo.advance(e),t;this._fboCache.debugCallback?.(i,t.fbo);const r=this._nodes.render(t,this._pluginInput,this._releaseNodeInputs);return this.performanceInfo.advance(e),r}_ensureBindParameters(e,t,s){this._ensureBindParametersCamera(e,t),this._ensureBindParametersWeatherFader(s),this._ensureBindParametersScreenSpaceReflections(s),this._ensureBindParametersReprojection()}_ensureBindParametersCamera(e,t){this._bindParameters.camera=e,this._bindParameters.contentCamera=t}_ensureBindParametersWeatherFader(e){1===this.stage.viewingMode&&(this._bindParameters.clouds.data&&(this._bindParameters.clouds.fade(this._bindParameters.camera,e,this.stage.view.qualitySettings.fadeDuration),this.weatherFader?.cleanupCubemap()),this._bindParameters.snowCover=this.weatherFader?.snowCover??0)}_ensureBindParametersScreenSpaceReflections(e){const{screenSpaceReflections:t}=this._bindParameters;if(this.hasReflections){null==this._ssrEnableTime&&(this._ssrEnableTime=e);const s=this.stage.view.qualitySettings.fadeDuration;t.fadeFactor=s>0?Math.min(s,e-this._ssrEnableTime)/s:1,t.fadeFactor<1&&this._requestRender()}else this._ssrEnableTime=null}_ensureBindParametersReprojection(){if(!(this.hasReflections||this.hasGlobalIllumination))return void(this._reprojectionMatrix=I);const{reprojection:e,camera:t}=this._bindParameters,{lastFrameCamera:s}=e,i=!s.equals(t);if(i?(f(Oe,t.viewMatrix),f(Re,t.projectionMatrix),g(De,Oe,Re),g(De,s.viewMatrix,De),g(De,s.projectionMatrix,De),this._reprojectionMatrix=De):this._reprojectionMatrix=I,this.hasGlobalIllumination){const{viewMatrix:t}=e;i?(g(Fe,s.viewMatrix,Oe),P(t,Fe)):P(t,I)}}addRenderNode(e){this._nodes.add(e),this._requestRender()}removeRenderNode(e){this._nodes.remove(e),this._requestRender()}updateLighting(e,t,s,i){this._bindParameters.updateLighting(e,t,s,i),this._requestRender(1)}get usedMemory(){return{fbos:this.fboCache.usedMemory,plugins:this._plugins.usedMemory,edges:this.edgeView?.usedMemory??0,clouds:this.weatherFader?.usedMemory??0}}get test(){}};e([p()],pe.prototype,"_inGlobeView",void 0),e([p({readOnly:!0})],pe.prototype,"highResolutionAtmosphere",null),e([p()],pe.prototype,"_edgeView",void 0),e([p()],pe.prototype,"updating",null),pe=e([c("esri.views.3d.webgl-engine.lib.Renderer")],pe);const ce=[0,1,2,3],be=[7,6,4,5],fe=[7,6],ge=[0,1,2,4,...fe],Pe=[3,5],Ie=[2,4,8],Ee=[16,12,14,13],we=[4,5,2,3,0,1,...fe],Ae=[4,8,5,11],Ce={0:[13],1:[12],2:[13,12],3:[13,12]},Se=[0,1,...fe],Te=["normals","highlights"],Re=E(),Oe=E(),De=E(),Fe=E();function Ge(e){return t=>e.immediate.schedule(t)}export{pe as Renderer};
2
+ import{__decorate as e}from"tslib";import{update as t}from"../../../../core/arrayUtils.js";import{createTask as s}from"../../../../core/asyncUtils.js";import has from"../../../../core/has.js";import{removeMaybe as i,abortMaybe as r,destroyMaybe as a,releaseMaybe as n,releaseReferencedMaybe as h}from"../../../../core/maybe.js";import{throwIfAborted as o}from"../../../../core/promiseUtils.js";import{watch as d,syncAndInitial as l,initial as m,sync as u}from"../../../../core/reactiveUtils.js";import{signal as _}from"../../../../core/signal.js";import{property as p,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{equals as b,invert as f,multiply as g,copy as P}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as I,create as E}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as w}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as A,ZEROS as C}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{pruneIndexArrays as T}from"../../../../geometry/support/Indices.js";import{RenderNodeOutput as S,InternalRenderCategory as R,AllRenderNodeOutputs as O,AllInternalRenderNodeOutputs as D}from"../../webgl.js";import{minNearDistanceInMeters as F}from"../../state/NearFarHeuristic.js";import{debugFlags as G}from"../../support/debugFlags.js";import{FBOCache as N}from"../core/FBOCache.js";import{RenderPassManager as H}from"../core/renderPasses/RenderPassManager.js";import{isColor as x}from"../core/shaderLibrary/ShaderOutput.js";import{distanceFadeEnd as y}from"../core/shaderLibrary/shading/ScreenSpaceConstants.js";import{RenderNodes as v}from"../effects/RenderNodes.js";import{RenderPluginManager as M}from"../effects/RenderPluginManager.js";import{WeatherFader as L}from"../effects/WeatherFader.js";import{innerAtmosphereFadeStart as q}from"../effects/atmosphere/atmosphereUtils.js";import{Blit as U}from"../effects/blit/Blit.js";import{maxHighlightsPerChannel as j,renderHighlightBuffer as B}from"../effects/highlight/Highlight.js";import{OITBlend as V}from"../effects/transparency/OITBlend.js";import{AnimationTimer as k}from"./AnimationTimer.js";import{AnimationTimeStep as W}from"./AnimationTimeStep.js";import{BoundingInfo as Q}from"./BoundingInfo.js";import{Compositor as z}from"./Compositor.js";import{DepthRange as Y}from"./DepthRange.js";import{depthRangeFromScene as X}from"./depthRangeUtils.js";import{MainFramebuffer as $}from"./MainFramebuffer.js";import{RenderContext as J,defaultRenderOccludedMask as K}from"./RenderContext.js";import{RendererBase as Z}from"./RendererBase.js";import{setupFeatureDefaults as ee}from"./RenderFeature.js";import{RenderPluginInput as te}from"./RenderPluginInput.js";import{ShadowAccumulator as se}from"./ShadowAccumulator.js";import{ShadowMap as ie}from"./ShadowMap.js";import re from"./SliceHelper.js";import{MergedRenderer as ae}from"../materials/renderers/MergedRenderer.js";import{RenderSceneResult as ne}from"../parts/renderUtils.js";import{RendererPerformanceInfo as he,PerformanceCategory as oe}from"../statistics/RendererPerformanceInfo.js";import{ColorAttachment1 as de,PixelType as le,ColorAttachment2 as me,ColorAttachment0 as ue,DrawBufferNone as _e}from"../../../webgl/enums.js";let pe=class extends Z{constructor(e,t,s,i,r){super({stage:e}),this._techniques=s,this._rctx=i,this._requestRender=r,this._pluginsHas={occludedHudElements:!1,hudElements:!1,water:!1},this.renderPassManager=new H,this._isRendering=!1,this._inGlobeView=!1,this._backgroundColor=A(0,0,0,1),this._sliceHelper=new re,this.sceneDepthRange=_(Y.Infinite),this._state=_(2),this._hasGlobalIlluminationFlag=!!has("global-illumination"),this._hasAnimations=!1,this._animationTimestep=new W,this._loadEdgeViewTask=null,this._edgeViewCallbacks=[],this._reprojectionMatrixVersion=_(0),this._renderHiddenTransparentEdges=()=>{},this._pluginInput=new te,this._hasTransparentGeometry=!1,this._releaseNodeInputs=e=>{for(const t of Se)e.some(({name:e})=>e===t)&&this._pluginInput.release(t)},this._testsNeedsDepth=!1,this._fboCache=new N(i),this._compositor=new z(i,s),this._renderStateFeatures=_(ee(e.view.qualityProfile));const a=new ie(this._fboCache,e.viewingMode);this._renderContext=new J(this._rctx,a,s),this._framebuffer=new $(this._fboCache,this._bindParameters),this._performanceInfo=new he(this._rctx),this._blit=new U(s),this._shadowAccumulator=new se(this.fboCache,s,e,e=>{const t=this.shadowsEnabled;a.enabled=!0,this._ensureBindParametersCamera(e.camera,e.contentCamera),this._plugins.prepareRender(),a.enabled=t},(t,s,i)=>{const r=e.view.qualitySettings.maximumPixelRatio;t.shadowMap.start(t.camera,s,i,!0,r),this._renderShadowCascades(5,t.shadowMap),t.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(t.camera,t.contentCamera)},r),this._nodes=new v(this._renderContext),this._plugins=new M({renderContext:this._renderContext,techniques:s,materials:t,requestRender:r,controller:e}),this._plugins.add(this.renderPassManager),this.weatherFader=new L({view:e.view,context:this._renderContext}),this.addHandles([d(()=>e.view.state.camera,()=>r(),l),d(()=>G.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES,e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(0):()=>{},r()},m),d(()=>e.view.environment.background?.color,e=>{const t=e?e.toUnitRGBA():C;w(this._backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]),r()},l),d(()=>e.view.state.camera.relativeElevation,e=>this._inGlobeView=(e??1/0)>=y,l),d(()=>this._bindParameters.clouds.fadeFactor,()=>{this._bindParameters.fadeLighting(),this._requestRender(2)},u),d(()=>this._bindParameters.clouds.data?.state,()=>r(),u),d(()=>e.view.state.highlights,e=>{this._bindParameters.highlights=e,r()},m),d(()=>"sun"===e.view.environment.lighting?.type,e=>{this._bindParameters.enableFillLights=e,this._requestRender()},l)])}destroy(){this._gpuTimerHandle=i(this._gpuTimerHandle),this._nodes.destroy(),this._framebuffer.dispose(),this._shadowAccumulator.destroy(),this._shadowAccumulator=null,this._loadEdgeViewTask=r(this._loadEdgeViewTask),this._edgeView=a(this._edgeView),this.renderPassManager.dispose(),this.weatherFader=a(this.weatherFader),this._releaseFBOs(),this._disposeOffscreenBuffers(),this._fboCache.destroy(),this._fboCache=null,this._renderContext.destroy(),this._plugins.destroy(),this._pluginInput=null,this._oitBlendOrNil=null,this._nodes=null,this._framebuffer=null,this._performanceInfo=null,Q.prune(),ae.prune(),T()}get renderContext(){return this._renderContext}get _bindParameters(){return this._renderContext.bind}get _oitBlend(){return this._oitBlendOrNil??=new V(this._techniques),this._oitBlendOrNil}get performanceInfo(){return this._performanceInfo}updateRenderFeatures(e){this._renderStateFeatures.value=ee(e),this._requestRender()}isFeatureEnabled(e,t=this._state.value){return this._renderStateFeatures.value.get(t,e)??!1}setFeatureEnabled(e,t,s){this._renderStateFeatures.mutate(i=>i.set(t,e,s)),this._requestRender()}setTime(e){this._renderContext.time=e}get hasReflections(){return this._bindParameters.screenSpaceReflections.enabled=this._pluginsHas.water&&this.isFeatureEnabled(4),this._bindParameters.screenSpaceReflections.enabled}get _hasHighlights(){return this._plugins.produces(10,2,4,18,12,13,14)}hasHighlight(e){return this._plugins.hasHighlight(e)}get _hasHUDHighlights(){return this._plugins.produces(10,12,13,14)}get hasAmbientIllumination(){return this.isFeatureEnabled(3)&&!this._inGlobeView}get hasGlobalIllumination(){return this._hasGlobalIlluminationFlag&&this.hasAmbientIllumination}get hasGlobalIlluminationHighQuality(){return this.hasGlobalIllumination&&this.isFeatureEnabled(10)}get _keepGlobalIlluminationShadingAlive(){return this._hasGlobalIlluminationFlag&&!this._inGlobeView}get hasSMAA(){return this.isFeatureEnabled(0)}get _hasEmissions(){return this._plugins.hasEmissions}get hasFloatBlend(){return this._rctx.driverTest.floatBufferBlend.result&&this.isFeatureEnabled(9)}get highResolutionAtmosphere(){return this.isFeatureEnabled(2)}get fboCache(){return this._fboCache}_releaseFBOs(){this._bindParameters.hudOcclusion=n(this._bindParameters.hudOcclusion),this._bindParameters.depth=null}_disposeOffscreenBuffers(){this._framebuffer.dispose(),this._bindParameters.globalIllumination=n(this._bindParameters.globalIllumination),this._bindParameters.reprojection.lastFrameDepth=n(this._bindParameters.reprojection.lastFrameDepth),this._bindParameters.reprojection.lastFrameEmission=n(this._bindParameters.reprojection.lastFrameEmission),this._disposeBindBuffers()}_disposeBindBuffers(){this._bindParameters.shadowMap.disposeOutputs()}get updating(){return this._loadEdgeViewTask&&!this._loadEdgeViewTask.finished||this._edgeView?.updating||this._shadowAccumulator.readyToRun||this._plugins.updating||this.weatherFader?.readyToRun||!this.isCameraFinal}loadEdgeView(){return this._loadEdgeViewTask||(this._loadEdgeViewTask=s(async e=>{const{EdgeView:t}=await import("./edgeRendering/EdgeView.js");o(e);const s=this._edgeView=new t({rctx:this._rctx,renderSR:this.stage.view.renderSpatialReference,viewingMode:this.stage.view.stage.viewingMode,techniques:this._techniques,setNeedsRender:()=>this._requestRender(),schedule:Ge(this.stage.view.resourceController)});return this.addHandles(d(()=>s.updating,()=>this._requestRender(),u)),this._requestRender(),this._edgeViewCallbacks.forEach(e=>e(s)),this._edgeViewCallbacks.length=0,s})),this._loadEdgeViewTask.promise}withEdgeView(e){this.loadEdgeView(),null==this._edgeView?this._edgeViewCallbacks.push(e):e(this._edgeView)}get edgeView(){return this._edgeView}get isCameraFinal(){return this._reprojectionMatrixVersion.value>=0&&b(this._bindParameters.reprojection.matrix,I)}set _reprojectionMatrix(e){t(this._bindParameters.reprojection.matrix,e)&&this._reprojectionMatrixVersion.value++}get shadowsEnabled(){return!!this._bindParameters.shadowMap.enabled}setParameters(e){void 0!==e.shadowMap&&this._bindParameters.shadowMap.enabled!==e.shadowMap&&(this._bindParameters.shadowMap.enabled=e.shadowMap,this._requestRender()),e.shadowCast&&this._shadowAccumulator.setParameters(e.shadowCast)}set slice(e){this._sliceHelper.update(e)&&this._requestRender()}get plugins(){return this._plugins}commit(e,t){return this._isRendering&&console.warn("Renderer.modify called while rendering"),!!super.commit(e,t,this._plugins.context)&&(this.updateHasFlags(),!0)}rendererAdded(e){this._plugins.add(e)}rendererRemoved(e){this._plugins.remove(e)}get occludedRequiresStencil(){return this._occludedRequiresOccludeeStencil||this.occludedRequiresIntegratedMeshStencil}get _occludedRequiresOccludeeStencil(){return this._bindParameters.hasOccludees&&!!(8&this.plugins.renderOccludedFlags)}get occludedRequiresIntegratedMeshStencil(){return this._plugins.produces(0,0)&&this._plugins.produces(0,9)}updateHasFlags(){const has=this._pluginsHas;has.occludedHudElements=this._plugins.produces(0,13),has.hudElements=has.occludedHudElements||this._plugins.produces(0,...Ee),has.water=this._plugins.produces(4,19),this._bindParameters.hasOccludees=this._plugins.hasOccludees,this._requestRender()}updateAnimation(e,t){this._animationTimer??=new k(e.camera,t),this._animationTimer.advance(e.camera,t,this._animationTimeDilation);const s=this._hasAnimations;return this._hasAnimations=this._plugins.updateAnimation(this._animationTimer),this._hasAnimations=this._nodes.updateAnimation(this._animationTimer)||this._hasAnimations,this._hasAnimations!==s&&(this._gpuTimerHandle=s?i(this._gpuTimerHandle):this.performanceInfo.enableGPUPerformanceInfo()),this._hasAnimations}get animationTimestep(){return this._animationTimestep.value}get _animationTimeDilation(){return this._animationTimestep.timeDilation}resetAnimation(){this._animationTimestep.clear()}tick(){this.fboCache.clean()}render(e,t,s=!1){try{return this._isRendering=!0,this._render(e,t,s)}catch(i){console.error(`Exception during rendering: ${i}:\n${i.stack}`)}finally{this._isRendering=!1}return new ne(this._pluginInput.get(S.FINAL),null)}_render(e,t,s){const i=0===t;this.performanceInfo.startFrame(),this.fboCache.frameStart(),this.fboCache.interactive=i,this._disposeBindBuffers();const{camera:r,contentCamera:a,mode:o,alignPixelEnabled:d}=e;this._state.value=o,this._bindParameters.output=0,this._bindParameters.emissions=this._hasEmissions,this._bindParameters.alignPixelEnabled=d,this._bindParameters.decorations=!s,this._bindParameters.mainDepth=null,this._bindParameters.useFloatBlend.value=this.hasFloatBlend;const l=!s||!this._sliceHelper.isDecoration;this._bindParameters.slicePlane=l?this._sliceHelper.plane:null,this._bindParameters.viewshedEnabled=this._nodes.produces(R.VIEWSHED),this._bindParameters.cutFillComputationEnabled=this._nodes.produces(R.CUTFILL_COMPUTATION),this._bindParameters.cutFillVisualizationEnabled=this._nodes.produces(R.CUTFILL_COLOR),this._renderOverlay(),r.setGLViewport(this._rctx);const m=this._framebuffer,u=m.initialize(r.fullWidth,r.fullHeight,this._backgroundColor),_=this._needsLastFrameColor;_?(u?.retain(_-1),u?.setName("last frame color"),this._bindParameters.reprojection.lastFrameColor=u):u?.release(),this._ensureBindParameters(r,a),this._plugins.sortTestsTransparentOrderedSlots(Ae),this._plugins.prepareRender(),this._bindParameters.hasShadowHighlights=this._needsShadowHighlight&&!s,this._hasTransparentGeometry=this._plugins.produces(0,...be),this._precompilePrepasses(),this.performanceInfo.advance(oe.PREPARE);const p=this._computeShadowDepthRange(r);this._pluginInput.set("normals",this._renderNormals()),this._renderAmbientIlluminationAndDepth(),this._renderShadowMap(r,a,this._bindParameters.lighting.mainLight.direction,p),this._renderShadowAccumulation(p,!i),m.bind(),this._bindParameters.mainDepth=m.depth.attachment,this._precompileShaders(i),this._bindParameters.output=0;this._bindParameters.hasOpaqueEmissions||0===this._bindParameters.emissions?(this._renderOpaque(),this._renderPreTransparent()):(this._bindParameters.emissions=0,this._renderOpaque(),this._renderPreTransparent(),this._bindParameters.emissions=2),this._renderTransparent(),this.hasReflections&&(this._bindParameters.depth=h(this._bindParameters.depth),this._bindParameters.reprojection.lastFrameColor=h(this._bindParameters.reprojection.lastFrameColor)),this._bindParameters.shadowMap.disposeOutput(5),this._renderCutFillComputation(),this._pluginInput.set(R.FOCUSAREA,this._renderFocusAreaGeometry()),m.update(e=>this._renderNodes(R.TRANSPARENT_ENVIRONMENT,e)),m.update(e=>this._renderNodes(R.VIEWSHED,e)),m.update(e=>this._renderNodes(R.LASERLINES,e)),this._nodes.requireGeometryDepth&&(this._bindParameters.depth=h(this._bindParameters.depth)),m.update(e=>this._renderNodes(R.FOCUSAREA_COLOR,e)),m.update(e=>this._renderNodes(R.CUTFILL_COLOR,e)),this._pluginInput.release(R.FOCUSAREA),this._pluginInput.release(R.GROUND_DEPTH),m.update(e=>this._renderNodes(R.OCCLUDED,e)),this._pluginInput.set("highlights",this._renderHighlightPrepass());const c=2===t?this._renderObjectAndLayerIdColor():null;m.update(e=>this._renderNodes(S.COMPOSITE,e)),this._bindParameters.shadowMap.disposeOutputs(),this._bindParameters.shadowHighlight=n(this._bindParameters.shadowHighlight),this.hasGlobalIllumination&&this._hasEmissions&&(this._bindParameters.reprojection.lastFrameEmission=m.color.obtainAttachment(de)),m.update(e=>this._renderNodes(R.ANTIALIASING,e));const b=this._hasTransparentGeometry?2:1;let f;return this._bindParameters.emissions=0,this._hasHUDHighlights&&m.update(e=>this._renderHUD(b,e)),m.update(e=>this._renderNodes(R.HIGHLIGHT_COLOR,e)),this._hasHUDHighlights||m.update(e=>this._renderHUD(b,e)),this._bindParameters.emissions=this._hasEmissions,m.update(e=>this._renderNodes(R.MAGNIFIER,e)),m.update(e=>this._renderNodes(S.FINAL,e)),i&&this._blit.toFramebuffer(m.color,this._bindParameters),this.hasGlobalIllumination&&(this._bindParameters.reprojection.lastFrameDepth=this._bindParameters.depth),this._testsNeedsDepth&&(this._bindParameters.depth=h(this._bindParameters.depth)),this._releaseFBOs(),m.releaseDepth(),this._bindParameters.reprojection.lastFrameCamera.copyFrom(this._bindParameters.camera),this.fboCache.frameEnd(),i||(f=m.color,f.retain(),this._releaseFBOs(),this._disposeOffscreenBuffers()),this.performanceInfo.finishFrame(),new ne(f,c)}_precompileShaders(e){++this._plugins.context.techniques.precompiling,this._bindParameters.output=0;const t=this._bindParameters,s=t.hasEmission;this._precompileOpaqueGeometry(),this._nodes.precompile(s,R.OPAQUE_ENVIRONMENT,R.GAUSSIAN_SPLAT,R.OPAQUE_OCCLUSION_QUERY,R.VOXEL);if(2===this._bindParameters.emissions&&(this._bindParameters.emissions=0,this._precompileOpaqueGeometry(),this._bindParameters.emissions=2),this._bindParameters.output=3,this._plugins.precompile(...fe),this._bindParameters.output=0,this._plugins.precompile(...fe),this._hasTransparentGeometry){const e=this._pluginsHas.occludedHudElements;this._oitBlend.precompile(this._bindParameters,e,0),this._pluginsHas.hudElements&&this._oitBlend.precompile(this._bindParameters,!1,1),this._precompileTransparentGeometry()}this._nodes.precompile(s,R.FOCUSAREA),this._compositor.precompile(this._usesPremultipliedAlphaBlit,!!this._needsEdges,s),this._hasTransparentGeometry||this._plugins.precompile(15),this._nodes.precompile(s,R.TRANSPARENT_ENVIRONMENT,R.VIEWSHED,R.CUTFILL_COMPUTATION,R.CUTFILL_COLOR,R.LASERLINES,R.FOCUSAREA_COLOR,R.OCCLUDED,R.ANTIALIASING),t.highlightMixTexture=t.highlights.length>1?this._rctx.emptyTexture:null,this._precompileHUD(0),t.emissions=0,this._precompileHUD(0),this._precompileHUD(1),t.emissions=this._hasEmissions,this._hasHighlights&&(t.highlights.forEach((e,s)=>{t.highlightLevel=s,this._precompileAllGeometry(10),this._hasHUDHighlights&&this._plugins.precompile(13,12)}),t.highlightLevel=null,this._nodes.precompile(s,R.HIGHLIGHT_COLOR)),t.highlightMixTexture=null,this._nodes.precompile(s,S.COMPOSITE,R.MAGNIFIER),this._shadowAccumulator.precompile(),this._plugins.precompile(8),s&&(t.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.precompile(8),t.transparentWithoutDepthEmissionDimmingPass=!1),e&&this._blit.precompile(),--this._plugins.context.techniques.precompiling}_renderFocusAreaGeometry(){const e=this._nodes.produce(R.FOCUSAREA,this._pluginInput);return e&&this.performanceInfo.advance(oe.FOCUS_AREA_MASK),e}_renderObjectAndLayerIdColor(){if(!this._nodes.produces("olid"))return null;const e=this._bindParameters.output;++this._techniques.precompiling;const{width:t,height:s}=this._framebuffer.size;let i=this.fboCache.acquire(t,s,"olid");return i.acquireDepth(14),i=this._nodes.render(i,this._pluginInput),--this._techniques.precompiling,this.performanceInfo.advance(oe.OBJECT_AND_LAYER_ID_COLOR),this._bindParameters.output=e,i}finish(e){this._hasAnimations||this._animationTimestep.clear();const t=this.performanceInfo.gpuSamplingEnabled,s=0===e;if(s||t){const e=s?this.performanceInfo.elapsedTime:0;let i=0;t?i=this.performanceInfo.totalGPUTimeSampler.last:this._rctx.gl.finish();const r=Math.max(e,i);this._animationTimestep.frame(r,s)}}readMainDepth(e,t){const{mainDepth:s,camera:i}=this._bindParameters;if(!s)return;const r=this.fboCache.acquire(this._framebuffer.size.width,this._framebuffer.size.height,"linear depth");this._rctx.bindFramebuffer(r.fbo),i.setGLViewport(this._rctx),this._rctx.setScissorRect(e[0],e[1],e[2],e[3]),this._rctx.setScissorTestEnabled(!0),this._rctx.clearFramebuffer(C),this._compositor.blitDepthToLinearDepth(this._bindParameters,s),this._rctx.setScissorTestEnabled(!1),this._rctx.setScissorRect(0,0,this._rctx.gl.canvas.width,this._rctx.gl.canvas.width),r.fbo?.readPixels(e[0],e[1],e[2],e[3],6408,le.UNSIGNED_BYTE,t),r.release()}readAccumulatedShadow(e){return this._shadowAccumulator.readAccumulatedShadow(e[0],e[1])}get _needsEdges(){return this._edgeView?.shouldRender()?this._edgeView:null}_renderEdges(e){const t=this._needsEdges;if(!t)return;const{width:s,height:i}=this._framebuffer.size,r=this.fboCache.acquire(s,i,"edges");r.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer(C),t.render(this._bindParameters,e),r.detachDepth(),this._framebuffer.bind(),this._compositor.composite(this._bindParameters,r.getTexture()),r.release(),this.performanceInfo.advance(1===e?oe.OPAQUE_EDGES:oe.TRANSPARENT_EDGES)}_renderOverlay(){this._bindParameters.overlay=this.overlay?.render(this._renderContext.time),this._bindParameters.overlay&&this.performanceInfo.advance(oe.OVERLAY)}_renderShadowMap(e,t,s,i){if(!this.shadowsEnabled)return;const r=this._bindParameters.shadowMap;if(r.start(e,s,i,this.isFeatureEnabled(5),this.stage.view.qualitySettings.maximumPixelRatio),this._needsShadowHighlight){this._renderShadowCascades(6,r),e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,t);const s=this._bindParameters.output;this._bindParameters.output=0,this._bindParameters.shadowHighlight=this._nodes.produce(R.SHADOW_HIGHLIGHT,this._pluginInput),this._bindParameters.output=s,r.disposeOutput(6),r.clear(),this._renderShadowCascades(7,r)}else this._renderShadowCascades(5);e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,this._bindParameters.contentCamera),this._needsShadowHighlight&&(this._bindParameters.depth=h(this._bindParameters.depth)),this.performanceInfo.advance(oe.SHADOW_MAP)}_renderCutFillComputation(){this._nodes.produce(R.CUTFILL_COMPUTATION,this._pluginInput)?.release()}_precompileShadowCascades(e){0!==this._bindParameters.shadowMap.cascades.length&&this._precompileAllGeometry(e)}_renderShadowCascades(e,t=this._bindParameters.shadowMap){const s=this._bindParameters.output,i=t===this._bindParameters.shadowMap&&6!==e;t.bindFramebuffer();for(const r of t.cascades)r.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(r.camera,r.camera),this.renderAllGeometry(e),i&&this._renderShadowCasterNodes();t.finish(e),this._bindParameters.output=s}_renderShadowCasterNodes(){if(!this._nodes.produces(R.SHADOW_CASTERS))return;const e=this._bindParameters.shadowMap.renderTarget;if(!e)return;const t=e.name;e.setName(R.SHADOW_CASTERS),this._pluginInput.set(R.SHADOW_CASTERS,e);try{this._nodes.render(e,this._pluginInput,this._releaseNodeInputs)}finally{e.setName(t),this._pluginInput.set(R.SHADOW_CASTERS,null)}}get _needsLastFrameColor(){return+this.hasReflections+ +this.hasGlobalIllumination}get _needsDepth(){return+this._nodes.requireGeometryDepth+ +this.hasReflections+ +this.hasGlobalIllumination+ +this._shadowAccumulator.accumulating+ +this._testsNeedsDepth}get _usesPremultipliedAlphaBlit(){return this._pluginsHas.hudElements}_renderAmbientIlluminationAndDepth(){this._bindParameters.depth=n(this._bindParameters.depth);const e=this._pluginInput.get("normals");if(e){this._pluginInput.set(R.AMBIENT_ILLUMINATION,this._hasGlobalIlluminationFlag?this._renderGlobalIllumination():this._renderSSAO());const t=this._needsDepth;t?(this._rctx.bindFramebuffer(e.fbo),this._rctx.clear(1024),this._renderGeometryWithoutNormals(3),this._bindParameters.depth=e.obtainDepthTexture(),this._bindParameters.depth?.retain(t-1),this.performanceInfo.advance(oe.DEPTH)):e.detachDepth(),this.hasAmbientIllumination&&this._pluginInput.release("normals")}else this._hasGlobalIlluminationFlag&&(this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIlluminationEnabled=this._keepGlobalIlluminationShadingAlive),this._renderAllGeometryDepth()}_renderAllGeometryDepth(){const e=this._needsDepth;if(0===e)return;const{width:t,height:s}=this._framebuffer.size,i=this.fboCache.acquire(t,s,"geometry depth",14);this._rctx.bindFramebuffer(i.fbo),this._rctx.clear(1280),this.renderAllGeometry(3),this._bindParameters.depth=i.obtainDepthTexture(),this._bindParameters.depth?.retain(e-1),i.release(),this.performanceInfo.advance(oe.DEPTH)}get _needsShadowDepthRange(){return this._bindParameters.shadowMap.enabled||this._shadowAccumulator.active}_computeShadowDepthRange(e){if(!this._needsShadowDepthRange)return Y.Zero;const t=X(e,this._plugins.plugins,this.stage.layers,0);return t.union(this._plugins.queryDepthRange(e)),this._bindParameters.shadowMap.enabled&&t.union(this._nodes.queryDepthRange(R.SHADOW_CASTERS,e)),t.near=Math.max(e.near,t.near),t.far=Math.min(e.far,t.far),t}updateSceneDepthRange(e){if(!this.stage.view.state.isGlobal)return void(this.sceneDepthRange.value=Y.Infinite);if((this.stage.view.renderCoordsHelper?.getAltitude(e.eye)??0)<q)return void(this.sceneDepthRange.value=Y.Infinite);const t=e.clone();t.near=F,t.far=1e10;const s=X(t,this._plugins.plugins,this.stage.layers,1);s.union(this._plugins.queryDepthRange(t)),this.sceneDepthRange.value.equals(s)||(this.sceneDepthRange.value=s)}get _normalsRequired(){return this._nodes.require("normals",...O,R.VIEWSHED,R.LASERLINES)+(this.hasAmbientIllumination?1:0)}_precompilePrepasses(){this._normalsRequired?(this._precompilePlugins(4,ge),this._needsDepth&&this._precompilePlugins(3,Pe)):this._needsDepth&&this._precompileAllGeometry(3),this.shadowsEnabled&&(this._needsShadowHighlight?(this._nodes.precompile(this._bindParameters.hasEmission,R.SHADOW_HIGHLIGHT),this._precompileShadowCascades(6),this._precompileShadowCascades(7)):this._precompileShadowCascades(5)),this._shadowAccumulator.active&&(this._shadowAccumulator.precompilePrepass(),this._precompileAllGeometry(5)),this.hasAmbientIllumination&&this._normalsRequired&&this._nodes.precompile(this._bindParameters.hasEmission,R.AMBIENT_ILLUMINATION)}_renderNormals(){const e=this._normalsRequired;if(0===e)return;const{width:t,height:s}=this._framebuffer.size,i=this.fboCache.acquire(t,s,"normals",5);i.acquireDepth(14),this._rctx.bindFramebuffer(i.fbo),this._rctx.clearFramebuffer(C,!0,!0),this._bindParameters.output=4,this._plugins.render(...ge);const r=this._nodes.optional("normals",...O,R.VIEWSHED);return i.retain(e+r-1),this.performanceInfo.advance(oe.NORMALS),i}_renderSSAO(){this._bindParameters.globalIlluminationEnabled=!1;const e=this._pluginInput.get("normals");return this.hasAmbientIllumination&&e?(this._bindParameters.ssao=this._nodes.produce(R.AMBIENT_ILLUMINATION,this._pluginInput),this._bindParameters.ssao&&this.performanceInfo.advance(oe.AMBIENT_ILLUMINATION),this._bindParameters.ssao):null}_renderGlobalIllumination(){if(!this.hasGlobalIllumination)return this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIlluminationEnabled=this._keepGlobalIlluminationShadingAlive,null;const e=this._nodes.produce(R.AMBIENT_ILLUMINATION,this._pluginInput);return this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIllumination=e,this._bindParameters.globalIlluminationEnabled=!0,this.hasGlobalIlluminationHighQuality?this.performanceInfo.advance(oe.AMBIENT_ILLUMINATION_HIGH_QUALITY):this.performanceInfo.advance(oe.AMBIENT_ILLUMINATION),e}_releaseGlobalIlluminationBuffers(){this._bindParameters.reprojection.lastFrameColor=h(this._bindParameters.reprojection.lastFrameColor),this._bindParameters.reprojection.lastFrameDepth=h(this._bindParameters.reprojection.lastFrameDepth),this._bindParameters.reprojection.lastFrameEmission=h(this._bindParameters.reprojection.lastFrameEmission),this._bindParameters.globalIllumination=h(this._bindParameters.globalIllumination),this._bindParameters.globalIlluminationEnabled=!1}_precompileAllGeometry(e){const t=this._bindParameters.output;this._bindParameters.output=e,this._precompileOpaqueGeometry(),this._precompileTransparentGeometry(),this._plugins.precompile(...fe),this._bindParameters.output=t}renderAllGeometry(e){this._bindParameters.output=e,this._renderOpaqueAndTransparentGeometry(e),this._renderTransparentGround()}precompileSlots(e,...t){for(const s of t)this._bindParameters.slot=s,e.precompile(this._renderContext)}precompileOccludedSlots(e,t){for(const s of t)this._renderContext.renderOccludedMask=s,this.precompileSlots(e,...Ie);this._renderContext.renderOccludedMask=K}renderSlots(e,...t){for(const s of t)this._bindParameters.slot=s,e.forAll(e=>{const t=e.acquireTechniques(this._renderContext);t&&e.render(this._renderContext,t)})}renderOccludedSlots(e,t){this._renderContext.renderOccludedMask=t,this.plugins.renderOccludedFlags>1&&this._plugins.render(9),this.renderSlots(e,...Ie),this._renderContext.renderOccludedMask=K}renderHUD(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(...Ce[e])}_renderHUDElements(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(16),this.renderHUD(e),this._bindParameters.hudRenderStyle=e,this._plugins.render(14)}precompileViewshedShadowMap(){this._precompileAllGeometry(8)}precompileCutFillOrthographicReferenceDepth(){this._precompilePlugins(9,Te)}_precompilePlugins(e,t){const s=this._bindParameters.output;this._bindParameters.output=e,this._plugins.precompile(...t),this._bindParameters.output=s}renderViewshedShadowMap(e){const{camera:t,contentCamera:s}=this._bindParameters,i=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this.renderAllGeometry(8),this._ensureBindParametersCamera(t,s),this._bindParameters.camera.setGLViewport(this._rctx),this._bindParameters.output=i}renderCutFillOrthographicReferenceDepth(e){const{camera:t,contentCamera:s}=this._bindParameters,i=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this._bindParameters.output=9,this._plugins.render(...Te),this._ensureBindParametersCamera(t,s),t.setGLViewport(this._rctx),this._bindParameters.output=i}get _needsGroundDepth(){return this._bindParameters.cutFillVisualizationEnabled}_blitGroundDepth(){if(!this._needsGroundDepth)return null;const{width:e,height:t}=this._framebuffer.size,s=this.fboCache.acquire(e,t,R.GROUND_DEPTH,14);return this._rctx.blitFramebuffer(this._framebuffer.color.fbo,s.fbo,256),this._framebuffer.bind(),s}_renderOpaqueAndTransparentGeometry(e){this._bindParameters.output=e,this._renderOpaqueGeometry(),this._renderTransparentGeometry()}_renderGeometryWithoutNormals(e){this._bindParameters.output=e,this._plugins.render(...Pe)}_precompileOpaqueGeometry(){this._needsOpaquePass&&(this._plugins.precompile(...ce),this._nodes.precompile(this._bindParameters.hasEmission,"opaque-color"))}_renderOpaqueGeometry(){this._plugins.render(...ce)}_renderTransparentGeometry(){this._plugins.render(...be),this._hasTransparentGeometry&&this._plugins.render(15)}_renderTransparentGround(){this._plugins.render(...fe)}_precompileHUD(e){if(!this._pluginsHas.hudElements)return;const t=this._bindParameters.output,s=this._bindParameters.hudRenderStyle;this._bindParameters.hudRenderStyle=e,this._bindParameters.output=1,this._plugins.precompile(...Ee),this._bindParameters.output=2,this._plugins.precompile(...Ee),this._bindParameters.output=0,this._oitBlend.precompile(this._bindParameters,!1,1),this._hasHighlights&&(this._bindParameters.output=10,this._plugins.precompile(...Ee)),this._bindParameters.output=t,this._bindParameters.hudRenderStyle=s}_renderHUD(e,t){if(!this._pluginsHas.hudElements)return t;const s=this._renderOIT(1,e);this._rctx.bindFramebuffer(t.fbo);const i=!!t.getTexture(de);return this._compositor.compositePreMultipliedAlpha(this._bindParameters,s.getTexture(),i),s.release(),this.performanceInfo.advance(0===e?oe.HUD_OCCLUDED:oe.HUD),t}get _needsShadowHighlight(){return this.shadowsEnabled&&this._plugins.produces(6,2)}_renderHighlightPrepass(){if(!this._hasHighlights)return;const{fboCache:e,_rctx:t,_bindParameters:s}=this,{width:i,height:r}=this._framebuffer.size,{highlights:a}=s,n=a.length>j?3:1,h=e.acquire(i,r,"highlights",n);h.acquireDepth(14);const o=this._plugins.produces(10,0);return o&&this._framebuffer.color.fbo&&h.fbo&&t.blitFramebuffer(this._framebuffer.color.fbo,h.fbo,1024),t.bindFramebuffer(h.fbo),t.gl.clearBufferuiv(6144,0,[0,0,0,0]),o||t.clear(1024),this._bindParameters.output=10,t.bindFramebuffer(h.fbo),B(t,e,i,r,s,()=>this._renderHighlightGeometries()),h.detachDepth(),this.performanceInfo.advance(oe.HIGHLIGHTS),h.retain(this._nodes.require("highlights",...D)+this._nodes.optional("highlights",...D)-1),h}_renderHighlightGeometries(){this._plugins.render(...we),this._rctx.clear(256),this._renderHUDElements(2)}_renderShadowAccumulation(e,t){this._shadowAccumulator.updateDepthRange(e),this._bindParameters.output=0,this._shadowAccumulator.accumulating&&this._bindParameters.depth&&(this._shadowAccumulator.renderAccumulation(this._bindParameters,t)&&this.performanceInfo.advance(oe.ACCUMULATED_SHADOWS),this._bindParameters.depth=h(this._bindParameters.depth))}_precompileTransparentGeometry(){x(this._bindParameters.output)?(this._bindParameters.output=1,this._plugins.precompile(...be),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=2,this._plugins.precompile(...be),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=0):this._plugins.precompile(...be)}_renderOIT(e,t=2){const s=1===e,{width:i,height:r}=this._framebuffer.size,a=s?()=>this._renderHUDElements(t):()=>this._renderTransparentGeometry(),h=this._bindParameters,o=h.useFloatBlend.value?8:5,d=h.output;h.output=1;const l=s?"oit hud":"oit",m=this.fboCache.acquire(i,r,l,o),u=h.hasEmission&&(0===e||1!==t);u&&m.acquireColor(de,o,"oit emissive");const _=u?me:de;m.acquireColor(_,this.hasFloatBlend?7:0,"oit alpha"),s||m.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(m.fbo),this._rctx.clearFramebuffer([0,0,0,1]),u&&this._rctx.clearBuffer(1,C),a(),m.detachDepth(),h.output=2;const p=this.fboCache.acquire(i,r,s?"oit front hud":"oit front");u&&p.acquireColor(de,o,"oit front emissive"),s?p.acquireDepth(this._hudDepthFormat):p.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(p.fbo),this._rctx.clearFramebuffer(C,s),a(),p.detachDepth();const c=this._pluginsHas.occludedHudElements&&!s;let b;return h.hudOcclusion=n(this._bindParameters.hudOcclusion),h.output=0,s?(b=this.fboCache.acquire(i,r,"oit composite hud"),this._rctx.bindFramebuffer(b.fbo),this._rctx.setClearColor(0,0,0,1e-13),this._rctx.clear(16384)):(c&&(this._framebuffer.color.acquireColor(_,0,"hud occlusion"),this._rctx.clearBuffer(_-ue,C)),this._framebuffer.bind()),this._oitBlend.blend(this._rctx,m,p,h,u,c,e),b?.detachDepth(),s||c&&(h.hudOcclusion=this._framebuffer.color.obtainAttachment(_)),p.release(),m.release(),h.output=d,b}get _hudDepthFormat(){return this.isFeatureEnabled(7)?14:13}get _needsOpaquePass(){return this.plugins.produces(0,...ce)||this.plugins.produces(5,...ce)||this.plugins.produces(3,3)}_renderOpaque(){const e=this._needsOpaquePass;e&&(this._plugins.render(0,1),this._pluginInput.set(R.GROUND_DEPTH,this._blitGroundDepth()),this._plugins.render(2,3));const t=this._framebuffer;t.update(t=>this._renderNodes(S.OPAQUE,t,e)),this.fboCache.debugCallback?.(S.OPAQUE,t.color.fbo),t.update(e=>this._renderNodes(R.OPAQUE_ENVIRONMENT,e)),this.fboCache.debugCallback?.(R.OPAQUE_ENVIRONMENT,t.color.fbo),this._renderEdges(1)}_renderPreTransparent(){this._framebuffer.update(e=>this._renderNodes(R.GAUSSIAN_SPLAT,e)),this.fboCache.debugCallback?.(R.GAUSSIAN_SPLAT,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(R.OPAQUE_OCCLUSION_QUERY,e)),this.fboCache.debugCallback?.(R.OPAQUE_OCCLUSION_QUERY,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(R.VOXEL,e)),this.fboCache.debugCallback?.(R.VOXEL,this._framebuffer.color.fbo)}_renderTransparent(){const e=this._framebuffer;2===this._bindParameters.emissions&&e.ensureEmissionAttachment(),this._renderHiddenTransparentEdges(),this._hasTransparentGeometry&&this._renderOIT(0),e.update(e=>this._renderNodes(S.TRANSPARENT,e,this._hasTransparentGeometry)),this.fboCache.debugCallback?.(S.TRANSPARENT,e.color.fbo),this._hasTransparentGeometry||this._plugins.render(15),this._renderEdges(0),this._bindParameters.ssao=n(this._bindParameters.ssao),this._renderTransparentEnvironment()}_renderTransparentEnvironment(){if(this._shadowAccumulator.render(this._bindParameters),this.performanceInfo.advance(oe.APPLY_ACCUMULATED_SHADOWS),this._framebuffer.bind(),this._plugins.render(8),this._bindParameters.hasEmission){const e=this._rctx.setDrawBuffers([_e,de]);this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.render(8),this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!1,this._rctx.setDrawBuffers(e)}this.performanceInfo.advance(oe.TRANSPARENT_MATERIAL_WITHOUT_DEPTH)}_renderNodes(e,t,s=!1){const i=t.name;if(t.setName(e),this._pluginInput.set(e,t),!this._nodes.produces(e))return s&&this.performanceInfo.advance(e),t;this._fboCache.debugCallback?.(i,t.fbo);const r=this._nodes.render(t,this._pluginInput,this._releaseNodeInputs);return this.performanceInfo.advance(e),r}_ensureBindParameters(e,t){this._ensureBindParametersCamera(e,t),this._ensureBindParametersWeatherFader(),this._ensureBindParametersScreenSpaceReflections(),this._ensureBindParametersReprojection()}_ensureBindParametersCamera(e,t){this._bindParameters.camera=e,this._bindParameters.contentCamera=t}_ensureBindParametersWeatherFader(){1===this.stage.viewingMode&&(this._bindParameters.clouds.data&&(this._bindParameters.clouds.fade(this._bindParameters.camera,this.renderContext.time,this.stage.view.qualitySettings.fadeDuration),this.weatherFader?.cleanupCubemap()),this._bindParameters.snowCover=this.weatherFader?.snowCover??0)}_ensureBindParametersScreenSpaceReflections(){const{time:e}=this.renderContext,{screenSpaceReflections:t}=this._bindParameters;if(this.hasReflections){null==this._ssrEnableTime&&(this._ssrEnableTime=e);const s=this.stage.view.qualitySettings.fadeDuration;t.fadeFactor=s>0?Math.min(s,e-this._ssrEnableTime)/s:1,t.fadeFactor<1&&this._requestRender()}else this._ssrEnableTime=null}_ensureBindParametersReprojection(){if(!(this.hasReflections||this.hasGlobalIllumination))return void(this._reprojectionMatrix=I);const{reprojection:e,camera:t}=this._bindParameters,{lastFrameCamera:s}=e,i=!s.equals(t);if(i?(f(Oe,t.viewMatrix),f(Re,t.projectionMatrix),g(De,Oe,Re),g(De,s.viewMatrix,De),g(De,s.projectionMatrix,De),this._reprojectionMatrix=De):this._reprojectionMatrix=I,this.hasGlobalIllumination){const{viewMatrix:t}=e;i?(g(Fe,s.viewMatrix,Oe),P(t,Fe)):P(t,I)}}addRenderNode(e){this._nodes.add(e),this._requestRender()}removeRenderNode(e){this._nodes.remove(e),this._requestRender()}updateLighting(e,t,s,i){this._bindParameters.updateLighting(e,t,s,i),this._requestRender(1)}get usedMemory(){return{fbos:this.fboCache.usedMemory,plugins:this._plugins.usedMemory,edges:this.edgeView?.usedMemory??0,clouds:this.weatherFader?.usedMemory??0}}get test(){}};e([p()],pe.prototype,"_inGlobeView",void 0),e([p({readOnly:!0})],pe.prototype,"highResolutionAtmosphere",null),e([p()],pe.prototype,"_edgeView",void 0),e([p()],pe.prototype,"updating",null),pe=e([c("esri.views.3d.webgl-engine.lib.Renderer")],pe);const ce=[0,1,2,3],be=[7,6,4,5],fe=[7,6],ge=[0,1,2,4,...fe],Pe=[3,5],Ie=[2,4,8],Ee=[16,12,14,13],we=[4,5,2,3,0,1,...fe],Ae=[4,8,5,11],Ce={0:[13],1:[12],2:[13,12],3:[13,12]},Te=[0,1,...fe],Se=["normals","highlights"],Re=E(),Oe=E(),De=E(),Fe=E();function Ge(e){return t=>e.immediate.schedule(t)}export{pe as Renderer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import has from"../../../../core/has.js";import{disposeMaybe as e}from"../../../../core/maybe.js";import{isDepthOrShadowLike as s}from"../core/shaderLibrary/ShaderOutput.js";import{ScreenSpaceGeometry as r}from"../effects/ScreenSpaceGeometry.js";import{createEmptyTexture as t}from"./glUtil3D.js";import{IndexBufferCache as i}from"../materials/renderers/IndexBufferCache.js";import{TextureBufferCache as h}from"../materials/renderers/TextureBufferCache.js";import{VaoCache as a}from"../materials/renderers/VaoCache.js";import{VboCache as o}from"../materials/renderers/VboCache.js";import{DrawBufferNone as n}from"../../../webgl/enums.js";import{RenderingContext as u,getFramebufferDrawBuffers as c}from"../../../webgl/RenderingContext.js";class f extends u{constructor(e,s){super(e,s),this.emptyTexture=t(this),this._vaoCaches=new Map,this._vboCaches=new Map,this._indexBufferCache=null,this._textureBufferCaches=new Map,this._output=0,this.debugBoundTechnique="",this._refCount=1,this._newCache=s.newCache,this._screen=new r(this)}configure(e){super.configure(e),this._newCache=e.newCache}destroy(){this._vaoCaches.forEach(e=>e.dispose()),this._vaoCaches.clear(),this._vboCaches.forEach(e=>e.dispose()),this._vboCaches.clear(),this._indexBufferCache=e(this._indexBufferCache),this._textureBufferCaches.forEach(e=>e.dispose()),this._textureBufferCaches.clear(),--this._refCount>0||this.dispose()}ref(){++this._refCount}get refCount(){return this._refCount}dispose(){this.emptyTexture.dispose(),this._screen.destroy(),this._screen=null,super.dispose(),this._vaoCaches.forEach(e=>e.dispose()),this._vaoCaches.clear(),this._vboCaches.forEach(e=>e.dispose()),this._vboCaches.clear(),this._indexBufferCache?.dispose(),this._indexBufferCache=null,this._textureBufferCaches.forEach(e=>e.dispose()),this._textureBufferCaches.clear()}get newCache(){return this._newCache}get screen(){return this._screen}getVaoCache(e){const s=JSON.stringify(e),r=this._vaoCaches.get(s);if(r)return r;const t=new a(this,e);return this._vaoCaches.set(s,t),t}getVboCache(e){const s=JSON.stringify(e),r=this._vboCaches.get(s);if(r)return r;const t=new o(this,e);return this._vboCaches.set(s,t),t}get indexBufferCache(){return this._indexBufferCache??=new i(this),this._indexBufferCache}getTextureBufferCache(e){const s=JSON.stringify(e),r=this._textureBufferCaches.get(s);if(r)return r;const t=new h(this,e);return this._textureBufferCaches.set(s,t),t}resetDrawBuffers(e){this._output=e,this.setDrawBuffers(c(this._state.drawFramebuffer))}setDrawBuffers(e){return s(this._output)?super.setDrawBuffers([n]):super.setDrawBuffers(e)}bindTechnique(e,s,r,t){return this.debugBoundTechnique=e.declaredClass,this.useProgram(e.program),this.setPipelineState(e.getPipeline(s)),e.program.bind(s),r&&(e.program.bindPass(r,s),t&&e.program.bindDraw(s,r,t)),e.program}get isAssumedMetalDriver(){if(null==this._isAssumedMetalDriver&&(this._isAssumedMetalDriver=!!has("ios")||!!has("safari"),!this._isAssumedMetalDriver&&has("mac")&&has("chrome"))){const e=this.capabilities.rendererInfo?.getUnmaskedRenderer().toLowerCase(),s=e?.includes("apple")&&e?.includes("angle")&&e?.includes("metal");this._isAssumedMetalDriver=s??!0}return this._isAssumedMetalDriver}get test(){}}export{f as RenderingContext};
2
+ import has from"../../../../core/has.js";import{disposeMaybe as e}from"../../../../core/maybe.js";import{isDepthOrShadowLike as s}from"../core/shaderLibrary/ShaderOutput.js";import{ScreenSpaceGeometry as r}from"../effects/ScreenSpaceGeometry.js";import{createEmptyTexture as t}from"./glUtil3D.js";import{IndexBufferCache as i}from"../materials/renderers/IndexBufferCache.js";import{TextureBufferCache as h}from"../materials/renderers/TextureBufferCache.js";import{VaoCache as a}from"../materials/renderers/VaoCache.js";import{VboCache as o}from"../materials/renderers/VboCache.js";import{DrawBufferNone as n}from"../../../webgl/enums.js";import{RenderingContext as u,getFramebufferDrawBuffers as c}from"../../../webgl/RenderingContext.js";class f extends u{constructor(e,s){super(e,s),this.emptyTexture=t(this),this._vaoCaches=new Map,this._vboCaches=new Map,this._indexBufferCache=null,this._textureBufferCaches=new Map,this._output=0,this.debugBoundTechnique="",this._refCount=1,this._newCache=s.newCache,this._screen=new r(this)}configure(e){super.configure(e),this._newCache=e.newCache}destroy(){this._vaoCaches.forEach(e=>e.dispose()),this._vaoCaches.clear(),this._vboCaches.forEach(e=>e.dispose()),this._vboCaches.clear(),this._indexBufferCache=e(this._indexBufferCache),this._textureBufferCaches.forEach(e=>e.dispose()),this._textureBufferCaches.clear(),--this._refCount>0||this.dispose()}ref(){++this._refCount}get refCount(){return this._refCount}dispose(){this.emptyTexture.dispose(),this._screen.destroy(),this._screen=null,super.dispose(),this._vaoCaches.forEach(e=>e.dispose()),this._vaoCaches.clear(),this._vboCaches.forEach(e=>e.dispose()),this._vboCaches.clear(),this._indexBufferCache?.dispose(),this._indexBufferCache=null,this._textureBufferCaches.forEach(e=>e.dispose()),this._textureBufferCaches.clear()}get newCache(){return this._newCache}get screen(){return this._screen}getVaoCache(e){const s=JSON.stringify(e),r=this._vaoCaches.get(s);if(r)return r;const t=new a(this,e);return this._vaoCaches.set(s,t),t}getVboCache(e){const s=JSON.stringify(e),r=this._vboCaches.get(s);if(r)return r;const t=new o(this,e);return this._vboCaches.set(s,t),t}get indexBufferCache(){return this._indexBufferCache??=new i(this),this._indexBufferCache}getTextureBufferCache(e){const s=JSON.stringify(e),r=this._textureBufferCaches.get(s);if(r)return r;const t=new h(this,e);return this._textureBufferCaches.set(s,t),t}resetDrawBuffers(e){this._output=e,this.setDrawBuffers(c(this._state.drawFramebuffer))}setDrawBuffers(e){return s(this._output)?super.setDrawBuffers([n]):super.setDrawBuffers(e)}bindTechnique(e,s,r,t){return this.debugBoundTechnique=e.declaredClass,this.useProgram(e.program),this.setPipelineState(e.getPipeline(s,r)),e.program.bind(s),e.program.bindPass(r,s),t&&e.program.bindDraw(s,r,t),e.program}get isAssumedMetalDriver(){if(null==this._isAssumedMetalDriver&&(this._isAssumedMetalDriver=!!has("ios")||!!has("safari"),!this._isAssumedMetalDriver&&has("mac")&&has("chrome"))){const e=this.capabilities.rendererInfo?.getUnmaskedRenderer().toLowerCase(),s=e?.includes("apple")&&e?.includes("angle")&&e?.includes("metal");this._isAssumedMetalDriver=s??!0}return this._isAssumedMetalDriver}get test(){}}export{f as RenderingContext};