@arcgis/core 5.0.0-next.53 → 5.0.0-next.55

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 (812) hide show
  1. package/Basemap.d.ts +1 -1
  2. package/Color.js +1 -1
  3. package/Ground.d.ts +4 -6
  4. package/Ground.js +1 -1
  5. package/PopupTemplate.d.ts +2 -2
  6. package/WebLinkChart.d.ts +1 -1
  7. package/WebScene.js +1 -1
  8. package/applications/Components/QuantityFormatter.d.ts +7 -7
  9. package/applications/Components/analysisUtils.d.ts +28 -53
  10. package/applications/Components/baUtils.d.ts +8 -0
  11. package/applications/Components/drawUtils.d.ts +8 -1
  12. package/applications/Components/featureUtils.d.ts +1 -1
  13. package/applications/Components/imageryUtils.d.ts +2 -2
  14. package/applications/Components/layerOriginUtils.d.ts +3 -3
  15. package/applications/Components/reactiveUtils.d.ts +24 -5
  16. package/applications/Excalibur/videoViewUtils.d.ts +2 -2
  17. package/applications/ExperienceBuilder/sketchUtils.d.ts +6 -6
  18. package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +7 -13
  19. package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +7 -7
  20. package/applications/KnowledgeStudio/reshape.d.ts +6 -15
  21. package/applications/MapViewer/mediaUtils.d.ts +4 -4
  22. package/applications/MapViewer/templateUtils.d.ts +3 -3
  23. package/applications/PortalApp/layerUtils.d.ts +10 -0
  24. package/applications/PortalApp/layerUtils.js +5 -0
  25. package/applications/SceneViewer/sceneViewerUtils.d.ts +1 -2
  26. package/arcade/featureSetUtils.js +1 -1
  27. package/arcade/featureset/support/shared.js +1 -1
  28. package/arcade.d.ts +33 -17
  29. package/assets/esri/core/workers/RemoteClient.js +1 -1
  30. package/assets/esri/core/workers/chunks/{5aa354854219361f722b.js → 0099f4729c94c779ba35.js} +1 -1
  31. package/assets/esri/core/workers/chunks/00e407d262c49890afa8.js +1 -0
  32. package/assets/esri/core/workers/chunks/{15a0750c10b510564a42.js → 01d38a9ca9e88c38aab9.js} +1 -1
  33. package/assets/esri/core/workers/chunks/087cf25ca211836a084a.js +1 -0
  34. package/assets/esri/core/workers/chunks/{a3f23f08337e101e4e64.js → 097001462d93b78b64f4.js} +1 -1
  35. package/assets/esri/core/workers/chunks/0a39c6dc57bd60d5587e.js +1 -0
  36. package/assets/esri/core/workers/chunks/0d1e8d5d9abee38e275e.js +316 -0
  37. package/assets/esri/core/workers/chunks/{cef873da468668eb95cb.js → 14765f98b8ea447498a1.js} +6 -7
  38. package/assets/esri/core/workers/chunks/{da922e861d5845ae0979.js → 1ab98591d2f2bc604505.js} +1 -1
  39. package/assets/esri/core/workers/chunks/1b2e17c04c34cfa671a1.js +1 -0
  40. package/assets/esri/core/workers/chunks/211837df0edada4414c5.js +1 -0
  41. package/assets/esri/core/workers/chunks/22b07c54a5fcc27771b0.js +1 -0
  42. package/assets/esri/core/workers/chunks/{cd8fec3500e6503ae020.js → 23a9dd9454d5249bbd59.js} +1 -1
  43. package/assets/esri/core/workers/chunks/311c4914a4f69f3c1525.js +1 -0
  44. package/assets/esri/core/workers/chunks/{108675a17e432a02cf66.js → 35cbc61a006351620ead.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{1bf4b5e5402790ccb450.js → 369f37060608342a4262.js} +1 -1
  46. package/assets/esri/core/workers/chunks/3b5e71b156244789f624.js +1 -0
  47. package/assets/esri/core/workers/chunks/3f0959b1abafe516146e.js +1 -0
  48. package/assets/esri/core/workers/chunks/{308fb48d080e01499a26.js → 436f206898306df019ac.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{553ca1e55e9f1359839c.js → 44c228388a95fa958827.js} +1 -1
  50. package/assets/esri/core/workers/chunks/454c15367cccbf63af7a.js +1 -0
  51. package/assets/esri/core/workers/chunks/{11ab10668632648b2ba7.js → 492d575894c7905bb70c.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{f3d8d5fe15501220792d.js → 495b11fdecc3ba90d454.js} +1 -1
  53. package/assets/esri/core/workers/chunks/4f33a2ecb154a2c2449c.js +1 -0
  54. package/assets/esri/core/workers/chunks/{b1d3d2c93c189e215f67.js → 5047acfd66539eefe353.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{cddce67919e13e2f365e.js → 51fd6662245b920af652.js} +1 -1
  56. package/assets/esri/core/workers/chunks/52726458f590e726d52c.js +1 -0
  57. package/assets/esri/core/workers/chunks/5873c7b65d0fb04998fb.js +1 -0
  58. package/assets/esri/core/workers/chunks/{d677b378449257103ec4.js → 58cf5b9a6aa685fc3367.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{395a0773ccafd1f24c4d.js → 5d31fbabaa875f8627c0.js} +1 -1
  60. package/assets/esri/core/workers/chunks/67a45faa80316f43c51b.js +1 -0
  61. package/assets/esri/core/workers/chunks/6d09965ab2bff9da88b6.js +1 -0
  62. package/assets/esri/core/workers/chunks/{521aac8a665e98e4ca78.js → 700122f775b98a7ed353.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{a92c1171314a68504c1b.js → 7353d78feba7e6302b6e.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{13ce8e8d45779b11ee12.js → 7f4fa2f2e85863d3cfb9.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{a4f89568205d78d91cfe.js → 80c36f1786ae0be00962.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{549f4ab9e285deaf04fb.js → 81d89107ff82604a3ea0.js} +1 -1
  67. package/assets/esri/core/workers/chunks/8208c073e606973ea1ad.js +1 -0
  68. package/assets/esri/core/workers/chunks/{62ed6b45482e39d67785.js → 893a5ab0c2df9262efd8.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{1f0c7ab33e466a37c7f9.js → 8c1f1eb36198ce40ef13.js} +1 -1
  70. package/assets/esri/core/workers/chunks/92928c56b312e1514600.js +1 -0
  71. package/assets/esri/core/workers/chunks/94929cf2b9fc66a93882.js +1 -0
  72. package/assets/esri/core/workers/chunks/94f02082a006003ef5a9.js +1 -0
  73. package/assets/esri/core/workers/chunks/951e3c911a3486b1e609.js +1 -0
  74. package/assets/esri/core/workers/chunks/{54666586754949bfa584.js → 983356eb4fd0a0dcf3fd.js} +1 -1
  75. package/assets/esri/core/workers/chunks/a16e75ff5cd9b22be197.js +1 -0
  76. package/assets/esri/core/workers/chunks/{36d9208895abd1ba4ff1.js → a623676c74745e040a2a.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{1065fd655bb7cee243fd.js → a624dd283d264dce35a8.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{2dfaead2ec6434513d45.js → a6742abe3ebe371e85f1.js} +1 -1
  79. package/assets/esri/core/workers/chunks/acc7ff44bfcb5c195114.js +1 -0
  80. package/assets/esri/core/workers/chunks/ad92427bf597a6e0a299.js +1 -0
  81. package/assets/esri/core/workers/chunks/{640085b5ade5c7f16228.js → b285de471ca90f38ec25.js} +1 -1
  82. package/assets/esri/core/workers/chunks/b8f83a272fc41765031d.js +1 -0
  83. package/assets/esri/core/workers/chunks/{19270a2de33f2662005b.js → b93f2bd6429879f92143.js} +1 -1
  84. package/assets/esri/core/workers/chunks/be6cc8a1485961f22372.js +1 -0
  85. package/assets/esri/core/workers/chunks/{bf5a120bc0c4851dbb69.js → bef2a70d382515b3c84e.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{e2973e5626e5039209f9.js → c448540065690cac0744.js} +1 -1
  87. package/assets/esri/core/workers/chunks/{95057105f1b3bf805140.js → cd2ea924cb91cdb6dde9.js} +1 -1
  88. package/assets/esri/core/workers/chunks/d199deff988eaefe18b4.js +1 -0
  89. package/assets/esri/core/workers/chunks/{2ef4c0092c59a98a5532.js → d54988c21ea5667d00b7.js} +1 -1
  90. package/assets/esri/core/workers/chunks/d94a2ad5a91de7086fbe.js +1 -0
  91. package/assets/esri/core/workers/chunks/d9736c783513e9c9b22f.js +1 -0
  92. package/assets/esri/core/workers/chunks/{23396a6318edf9264c1f.js → dcf6f7001f470f76bd3e.js} +1 -1
  93. package/assets/esri/core/workers/chunks/dd99b77a7c0a052507bb.js +33 -0
  94. package/assets/esri/core/workers/chunks/{cd39a53ef74f47604977.js → e03c706e327f4989280a.js} +1 -1
  95. package/assets/esri/core/workers/chunks/e47535f795b15608a6cb.js +1 -0
  96. package/assets/esri/core/workers/chunks/e572ffc1d000e4e6325f.js +1 -0
  97. package/assets/esri/core/workers/chunks/ed38c1043e6a83f49f93.js +1 -0
  98. package/assets/esri/core/workers/chunks/f44f358db5c56d5bbc0c.js +1 -0
  99. package/assets/esri/core/workers/chunks/fa95c9248fbfab338f2e.js +1 -0
  100. package/chunks/ChapmanAtmosphere.glsl.js +12 -9
  101. package/chunks/ComponentShader.glsl.js +29 -29
  102. package/chunks/GlowComposition.glsl.js +1 -1
  103. package/chunks/Haze.glsl.js +15 -21
  104. package/chunks/RasterColorizer.glsl.js +10 -10
  105. package/chunks/Viewshed.glsl.js +1 -1
  106. package/config.d.ts +1 -1
  107. package/config.js +1 -1
  108. package/core/Collection.d.ts +1 -1
  109. package/core/Error.d.ts +1 -1
  110. package/core/Evented.d.ts +1 -1
  111. package/core/accessorSupport/decorators.d.ts +1 -1
  112. package/core/colorUtils.js +1 -1
  113. package/editing/sharedTemplates/SharedTemplate.d.ts +1 -1
  114. package/editing/sharedTemplates/SharedTemplateMetadata.d.ts +1 -1
  115. package/geometry/Mesh.d.ts +1 -2
  116. package/geometry/coordinateFormatter.d.ts +1 -1
  117. package/geometry/projection/projectPointToVector.js +1 -1
  118. package/geometry/projectionUtils.js +1 -1
  119. package/geometry/support/MeshMaterial.d.ts +1 -1
  120. package/geometry/support/MeshMaterialMetallicRoughness.d.ts +1 -1
  121. package/geometry/support/MeshTexture.d.ts +1 -1
  122. package/geometry/support/meshUtils/{interfaces.d.ts → types.d.ts} +10 -1
  123. package/geometry/support/meshUtils.d.ts +1 -1
  124. package/geometry/support/normalizeUtils.d.ts +1 -1
  125. package/geometry/support/typeUtils.d.ts +3 -1
  126. package/geometry/support/typeUtils.js +1 -1
  127. package/{views/3d/glTF/internal/resourceUtils.d.ts → geometry/types.d.ts} +5 -1
  128. package/interfaces.d.ts +779 -812
  129. package/intl/date.d.ts +1 -1
  130. package/kernel.js +1 -1
  131. package/layers/CSVLayer.d.ts +3 -3
  132. package/layers/CatalogLayer.d.ts +1 -1
  133. package/layers/FeatureLayer.d.ts +7 -4
  134. package/layers/GaussianSplatLayer.d.ts +22 -0
  135. package/layers/GeoJSONLayer.d.ts +3 -3
  136. package/layers/ImageryTileLayer.d.ts +9 -9
  137. package/layers/MapImageLayer.d.ts +2 -2
  138. package/layers/OrientedImageryLayer.d.ts +2 -2
  139. package/layers/ParquetLayer.d.ts +1 -1
  140. package/layers/RouteLayer.d.ts +3 -3
  141. package/layers/SceneLayer.d.ts +3 -3
  142. package/layers/SubtypeGroupLayer.d.ts +1 -1
  143. package/layers/VectorTileLayer.d.ts +3 -3
  144. package/layers/VideoLayer.d.ts +2 -2
  145. package/layers/WCSLayer.d.ts +1 -1
  146. package/layers/WFSLayer.d.ts +3 -3
  147. package/layers/catalog/CatalogFootprintLayer.d.ts +3 -3
  148. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  149. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  150. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  151. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -2
  152. package/layers/knowledgeGraph/layerUtils.js +1 -1
  153. package/layers/mixins/ArcGISImageService.d.ts +7 -7
  154. package/layers/mixins/BlendLayer.d.ts +2 -2
  155. package/layers/mixins/EditBusLayer.d.ts +6 -0
  156. package/layers/mixins/FeatureLayerBase.d.ts +2 -2
  157. package/layers/mixins/ImageryTileMixin.d.ts +4 -4
  158. package/layers/mixins/properties/ILayerWithGetFeatureTitle.d.ts +1 -1
  159. package/layers/ogc/wcsUtils.d.ts +1 -1
  160. package/layers/orientedImagery/transformations/imageToWorld.d.ts +2 -2
  161. package/layers/orientedImagery/transformations/{interfaces.d.ts → types.d.ts} +1 -1
  162. package/layers/orientedImagery/transformations/worldToImage.d.ts +2 -2
  163. package/layers/raster/datasets/wcsCapabilitiesParser.d.ts +1 -1
  164. package/layers/raster/datasets/wcsCoverageParser.d.ts +1 -1
  165. package/layers/raster/functions/creators/createAppearenceFunctions.d.ts +2 -2
  166. package/layers/raster/functions/creators/createBandIndexFunctions.d.ts +1 -1
  167. package/layers/raster/functions/creators/createChangeFunctions.d.ts +1 -1
  168. package/layers/raster/functions/creators/createConversionFunctions.d.ts +1 -1
  169. package/layers/raster/functions/creators/createDataManagementFunctions.d.ts +2 -2
  170. package/layers/raster/functions/creators/createLocalFunctions.d.ts +1 -1
  171. package/layers/raster/functions/creators/createMultiRasterAnalysisFunctions.d.ts +1 -1
  172. package/layers/raster/functions/creators/createStatisticsFunctions.d.ts +1 -1
  173. package/layers/raster/functions/creators/createSurfaceFunctions.d.ts +1 -1
  174. package/layers/support/ControlPoint.d.ts +3 -3
  175. package/layers/support/ControlPointsGeoreference.d.ts +6 -6
  176. package/layers/support/EditingCapabilities.d.ts +2 -2
  177. package/layers/support/FeatureEffect.d.ts +3 -3
  178. package/layers/support/LabelClass.d.ts +1 -1
  179. package/layers/support/RasterInfo.d.ts +1 -1
  180. package/layers/support/SpriteSource.d.ts +1 -1
  181. package/layers/support/StreamConnection.d.ts +1 -1
  182. package/layers/support/Sublayer.d.ts +1 -1
  183. package/layers/support/SubtypeSublayer.d.ts +15 -2
  184. package/layers/support/TimeInfo.d.ts +1 -1
  185. package/layers/support/capabilities.js +1 -1
  186. package/layers/support/layerUtils.js +1 -1
  187. package/layers/support/rasterFunctionUtils.d.ts +1 -1
  188. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  189. package/layers/support/{interfaces.d.ts → types.d.ts} +6 -6
  190. package/layers/{interfaces.d.ts → types.d.ts} +18 -1
  191. package/linkChart/ChronologicalLayoutSettings.d.ts +1 -1
  192. package/linkChart/OrganicLayoutSettings.d.ts +1 -1
  193. package/networks/Network.d.ts +4 -4
  194. package/networks/UtilityNetwork.d.ts +8 -8
  195. package/networks/support/TopologyValidationJobInfo.d.ts +1 -1
  196. package/networks/support/TraceJobInfo.d.ts +1 -1
  197. package/package.json +1 -1
  198. package/popup/content/CustomContent.d.ts +1 -1
  199. package/portal/PortalItem.d.ts +1 -1
  200. package/portal/PortalItemResource.d.ts +1 -1
  201. package/portal/PortalUser.d.ts +2 -2
  202. package/renderers/FlowRenderer.d.ts +1 -1
  203. package/renderers/RasterStretchRenderer.d.ts +2 -2
  204. package/renderers/Renderer.d.ts +1 -1
  205. package/renderers/VectorFieldRenderer.d.ts +1 -1
  206. package/renderers/mixins/VisualVariablesMixin.d.ts +3 -3
  207. package/renderers/support/AuthoringInfo.d.ts +1 -1
  208. package/renderers/support/rasterRendererHelper.d.ts +1 -1
  209. package/renderers/support/renderingInfoUtils.js +1 -1
  210. package/renderers/{interfaces.d.ts → types.d.ts} +3 -1
  211. package/renderers/visualVariables/SizeVariable.d.ts +1 -1
  212. package/renderers/visualVariables/VisualVariable.d.ts +1 -1
  213. package/request/{interfaces.d.ts → types.d.ts} +10 -10
  214. package/request.d.ts +4 -4
  215. package/rest/closestFacility.d.ts +1 -1
  216. package/rest/featureService/FeatureService.d.ts +1 -1
  217. package/rest/featureService/FeatureService.js +1 -1
  218. package/rest/featureService/{interfaces.d.ts → types.d.ts} +16 -3
  219. package/rest/featureService/utils.d.ts +1 -1
  220. package/rest/find.d.ts +1 -1
  221. package/rest/geometryService.d.ts +1 -1
  222. package/rest/geoprocessor.d.ts +1 -1
  223. package/rest/identify.d.ts +1 -1
  224. package/rest/imageService.d.ts +5 -5
  225. package/rest/knowledgeGraphService.d.ts +19 -19
  226. package/rest/lastMileDelivery.d.ts +1 -1
  227. package/rest/locator.d.ts +1 -1
  228. package/rest/networkService.d.ts +1 -1
  229. package/rest/networks/queryAssociations.d.ts +1 -1
  230. package/rest/networks/synthesizeAssociationGeometries.d.ts +1 -1
  231. package/rest/networks/trace.d.ts +1 -1
  232. package/rest/places.d.ts +1 -1
  233. package/rest/print.d.ts +2 -2
  234. package/rest/query.d.ts +2 -2
  235. package/rest/route.d.ts +1 -1
  236. package/rest/serviceArea.d.ts +1 -1
  237. package/rest/support/AddressToLocationsParameters.d.ts +1 -1
  238. package/rest/support/AddressesToLocationsParameters.d.ts +1 -1
  239. package/rest/support/AttributeBinsQuery.d.ts +3 -3
  240. package/rest/support/JobInfo.d.ts +2 -2
  241. package/rest/support/LastMileDeliveryParameters.d.ts +1 -1
  242. package/rest/support/LocationToAddressParameters.d.ts +1 -1
  243. package/rest/support/ParameterValue.d.ts +1 -1
  244. package/rest/support/ProjectParameters.d.ts +1 -1
  245. package/rest/symbolService.d.ts +3 -3
  246. package/smartMapping/heuristics/binLevel.d.ts +1 -1
  247. package/smartMapping/heuristics/scaleRange.d.ts +1 -1
  248. package/smartMapping/heuristics/sizeRange.d.ts +1 -1
  249. package/smartMapping/heuristics/{interfaces.d.ts → types.d.ts} +1 -1
  250. package/smartMapping/labels/clusters.d.ts +1 -1
  251. package/smartMapping/popup/clusters.d.ts +1 -1
  252. package/smartMapping/popup/templates.d.ts +1 -1
  253. package/smartMapping/raster/renderers/classBreaks.d.ts +2 -2
  254. package/smartMapping/raster/renderers/colormap.d.ts +1 -1
  255. package/smartMapping/raster/renderers/flow.d.ts +4 -4
  256. package/smartMapping/raster/renderers/rgb.d.ts +2 -2
  257. package/smartMapping/raster/renderers/shadedRelief.d.ts +1 -1
  258. package/smartMapping/raster/renderers/stretch.d.ts +2 -2
  259. package/smartMapping/raster/renderers/{interfaces.d.ts → types.d.ts} +1 -1
  260. package/smartMapping/raster/renderers/uniqueValue.d.ts +1 -1
  261. package/smartMapping/raster/renderers/vectorField.d.ts +1 -1
  262. package/smartMapping/raster/support/utils.d.ts +1 -1
  263. package/smartMapping/renderers/color.d.ts +4 -4
  264. package/smartMapping/renderers/dotDensity.d.ts +3 -3
  265. package/smartMapping/renderers/heatmap.d.ts +3 -3
  266. package/smartMapping/renderers/location.d.ts +2 -2
  267. package/smartMapping/renderers/opacity.d.ts +3 -3
  268. package/smartMapping/renderers/pieChart.d.ts +3 -3
  269. package/smartMapping/renderers/predominance.d.ts +2 -2
  270. package/smartMapping/renderers/relationship.d.ts +4 -4
  271. package/smartMapping/renderers/size.d.ts +4 -4
  272. package/smartMapping/renderers/support/rendererUtils.d.ts +1 -1
  273. package/smartMapping/renderers/type.d.ts +3 -3
  274. package/smartMapping/renderers/univariateColorSize.d.ts +4 -4
  275. package/smartMapping/statistics/classBreaks.d.ts +2 -2
  276. package/smartMapping/statistics/heatmapStatistics.d.ts +2 -2
  277. package/smartMapping/statistics/histogram.d.ts +1 -2
  278. package/smartMapping/statistics/predominantCategories.d.ts +2 -2
  279. package/smartMapping/statistics/summaryStatistics.d.ts +2 -2
  280. package/smartMapping/statistics/summaryStatisticsForAge.d.ts +1 -1
  281. package/smartMapping/statistics/support/ageUtils.d.ts +1 -1
  282. package/smartMapping/statistics/types.d.ts +571 -0
  283. package/smartMapping/statistics/uniqueValues.d.ts +2 -2
  284. package/smartMapping/symbology/color.d.ts +1 -1
  285. package/smartMapping/symbology/dotDensity.d.ts +1 -1
  286. package/smartMapping/symbology/flow.d.ts +1 -1
  287. package/smartMapping/symbology/heatmap.d.ts +1 -1
  288. package/smartMapping/symbology/location.d.ts +1 -1
  289. package/smartMapping/symbology/pieChart.d.ts +1 -1
  290. package/smartMapping/symbology/predominance.d.ts +1 -1
  291. package/smartMapping/symbology/relationship.d.ts +1 -1
  292. package/smartMapping/symbology/size.d.ts +1 -1
  293. package/smartMapping/symbology/support/colorRamps.d.ts +1 -1
  294. package/smartMapping/symbology/type.d.ts +1 -1
  295. package/smartMapping/types.d.ts +18 -0
  296. package/support/groundUtils.js +1 -1
  297. package/support/revision.js +1 -1
  298. package/support/tests/setupServiceMocksMesh.js +1 -1
  299. package/support/timeUtils.d.ts +1 -1
  300. package/symbols/LineStyleMarker3D.d.ts +1 -1
  301. package/symbols/LineSymbol3DLayer.d.ts +1 -1
  302. package/symbols/LineSymbolMarker.d.ts +1 -1
  303. package/symbols/PathSymbol3DLayer.d.ts +1 -1
  304. package/symbols/SimpleLineSymbol.d.ts +1 -1
  305. package/symbols/patterns/LineStylePattern3D.d.ts +1 -1
  306. package/symbols/patterns/StylePattern3D.d.ts +1 -1
  307. package/symbols/support/ElevationInfo.d.ts +1 -1
  308. package/symbols/support/Symbol3DOutline.d.ts +1 -1
  309. package/symbols/support/symbolUtils.d.ts +2 -2
  310. package/time/TimeExtent.d.ts +1 -1
  311. package/unionTypes.d.ts +3 -3
  312. package/versionManagement/VersionManagementService.d.ts +1 -1
  313. package/versionManagement/VersionManager.d.ts +3 -3
  314. package/versionManagement/VersioningState.d.ts +1 -1
  315. package/versionManagement/utils.d.ts +1 -1
  316. package/versionManagement/versionAdapters/utils.d.ts +7 -7
  317. package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
  318. package/views/2d/analysis/ElevationProfile/ElevationProfileVisualization2D.js +1 -1
  319. package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +1 -2
  320. package/views/2d/engine/vectorTiles/style/StyleProperty.js +1 -1
  321. package/views/2d/layers/BaseLayerView2D.d.ts +2 -2
  322. package/views/2d/layers/BaseLayerViewGL2D.d.ts +9 -9
  323. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  324. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  325. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  326. package/views/2d/layers/types.d.ts +6 -0
  327. package/views/2d/{layers/support/interfaces.d.ts → types.d.ts} +71 -2
  328. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  329. package/views/3d/analysis/Dimension/DimensionVisualization.js +1 -1
  330. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  331. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  332. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
  333. package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
  334. package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization3D.js +1 -1
  335. package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +1 -2
  336. package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
  337. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  338. package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
  339. package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +2 -2
  340. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  341. package/views/3d/analysis/Slice/ResizeManipulator.js +1 -1
  342. package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
  343. package/views/3d/analysis/Slice/ShiftManipulator.js +1 -1
  344. package/views/3d/analysis/Viewshed/ViewshedArrowManipulator.js +1 -1
  345. package/views/3d/analysis/Viewshed/ViewshedConfiguration.js +1 -1
  346. package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
  347. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
  348. package/views/3d/analysis/Viewshed/viewshedToolManipulatorUtils.js +1 -1
  349. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  350. package/views/3d/environment/ChapmanApproximation.glsl.js +9 -10
  351. package/views/3d/environment/ChapmanAtmosphere.glsl.js +1 -1
  352. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  353. package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
  354. package/views/3d/environment/ChapmanRaymarching.glsl.js +7 -9
  355. package/views/3d/environment/CloudsParameters.js +1 -1
  356. package/views/3d/environment/EnvironmentManager.js +1 -1
  357. package/views/3d/environment/PrecipitationTechnique.js +1 -1
  358. package/views/3d/environment/SceneViewEnvironment.d.ts +1 -1
  359. package/views/3d/environment/SimpleAtmosphereTechnique.js +1 -1
  360. package/views/3d/environment/types.d.ts +13 -0
  361. package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
  362. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  363. package/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation.js +1 -1
  364. package/views/3d/interactive/editingTools/manipulations/MoveXYDiscManipulation.js +1 -1
  365. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  366. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  367. package/views/3d/interactive/editingTools/settings.js +1 -1
  368. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
  369. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  370. package/views/3d/layers/I3SMeshView3D.js +1 -1
  371. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  372. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  373. package/views/3d/layers/SceneLayerWorker.js +1 -1
  374. package/views/3d/layers/{I3SMeshWorkerHandle.js → SceneLayerWorkerHandle.js} +1 -1
  375. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  376. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  377. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  378. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  379. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  380. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  381. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  382. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  383. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  384. package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +1 -1
  385. package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
  386. package/views/3d/layers/support/edgeUtils.js +1 -1
  387. package/views/3d/support/flow/geometryUtils.js +1 -1
  388. package/views/3d/support/viewpointUtils.js +1 -1
  389. package/views/3d/terrain/BlendLayersTechnique.js +1 -1
  390. package/views/3d/terrain/RasterColorizerTechnique.js +1 -1
  391. package/views/3d/terrain/TerrainRenderer.js +1 -1
  392. package/views/3d/webgl/ManagedFBO.d.ts +4 -5
  393. package/views/3d/webgl/RenderNode.d.ts +1 -1
  394. package/views/3d/{webgl-engine/lighting/SceneLighting.d.ts → webgl/types.d.ts} +4 -6
  395. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  396. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  397. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  398. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  399. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +2 -2
  400. package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +1 -1
  401. package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js +1 -2
  402. package/views/3d/webgl-engine/core/shaderLibrary/raster/RasterColorizer.glsl.js +1 -1
  403. package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +1 -1
  404. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +18 -27
  405. package/views/3d/webgl-engine/core/shaderModules/Float4sPassUniform.js +1 -1
  406. package/views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js +1 -1
  407. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  408. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  409. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +1 -1
  410. package/views/3d/webgl-engine/effects/focusArea/FocusAreaOutlineItem.js +1 -1
  411. package/views/3d/webgl-engine/effects/haze/Haze.glsl.js +1 -1
  412. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  413. package/views/3d/webgl-engine/effects/haze/HazeTechnique.js +1 -1
  414. package/views/3d/webgl-engine/effects/highlight/HighlightApplyTechnique.js +1 -1
  415. package/views/3d/webgl-engine/effects/highlight/HighlightBlurTechnique.js +1 -1
  416. package/views/3d/webgl-engine/effects/highlight/HighlightToSingleTechnique.js +1 -1
  417. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  418. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathData.js +1 -1
  419. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechnique.js +1 -1
  420. package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
  421. package/views/3d/webgl-engine/lib/CutFillColor.js +1 -1
  422. package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
  423. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  424. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  425. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechnique.js +1 -1
  426. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  427. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  428. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  429. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  430. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  431. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  432. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  433. package/views/3d/webgl-engine/shaders/CutFillMaskTechnique.js +1 -1
  434. package/views/3d/webgl-engine/shaders/CutFillTargetDepthTechnique.js +1 -1
  435. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  436. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  437. package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
  438. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  439. package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
  440. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  441. package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
  442. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  443. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  444. package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
  445. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  446. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  447. package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
  448. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +5 -5
  449. package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
  450. package/views/LinkChartView.d.ts +5 -5
  451. package/views/Magnifier.d.ts +1 -1
  452. package/views/MapView.d.ts +11 -12
  453. package/views/PopupView.d.ts +1 -1
  454. package/views/SceneView.d.ts +19 -23
  455. package/views/VideoView.d.ts +1 -2
  456. package/views/View.d.ts +2 -3
  457. package/views/View2D.d.ts +8 -9
  458. package/views/analysis/ElevationProfile/ElevationProfileHoveredPointVisualization.js +1 -1
  459. package/views/analysis/ElevationProfile/ElevationProfileResult.d.ts +1 -1
  460. package/views/analysis/ElevationProfile/types.d.ts +68 -0
  461. package/views/analysis/types.d.ts +2 -2
  462. package/views/draw/Draw.d.ts +1 -1
  463. package/views/draw/DrawAction.d.ts +1 -1
  464. package/views/draw/DrawOperation.js +1 -1
  465. package/views/draw/PolygonDrawAction.d.ts +1 -1
  466. package/views/draw/PolygonDrawAction.js +1 -1
  467. package/views/draw/PolylineDrawAction.d.ts +1 -1
  468. package/views/draw/PolylineDrawAction.js +1 -1
  469. package/views/draw/support/GraphicMover.js +1 -1
  470. package/views/draw/{interfaces.d.ts → types.d.ts} +3 -1
  471. package/views/input/IViewEvents.d.ts +1 -1
  472. package/views/interactive/Tooltip.d.ts +1 -1
  473. package/views/interactive/sketch/SketchValueOptions.d.ts +1 -1
  474. package/views/interactive/sketch/Units.d.ts +5 -1
  475. package/views/interactive/tooltip/types.d.ts +4 -0
  476. package/views/layers/BuildingComponentSublayerView.d.ts +1 -1
  477. package/views/layers/BuildingSceneLayerView.d.ts +1 -1
  478. package/views/layers/ImageryLayerViewMixin.d.ts +3 -4
  479. package/views/layers/PointCloudLayerView.d.ts +1 -1
  480. package/views/layers/support/highlightUtils.js +1 -1
  481. package/views/navigation/NavigationActionMap.d.ts +1 -1
  482. package/views/support/colorUtils.d.ts +1 -1
  483. package/views/{interfaces.d.ts → types.d.ts} +160 -6
  484. package/views/ui/DefaultUI.d.ts +1 -1
  485. package/views/ui/UI.d.ts +1 -1
  486. package/views/ui/{interfaces.d.ts → types.d.ts} +12 -1
  487. package/webdoc/widgets/FloorFilter.d.ts +2 -2
  488. package/webdoc/widgets/TimeSlider.d.ts +5 -5
  489. package/webmap/InitialViewProperties.d.ts +2 -2
  490. package/webscene/Environment.d.ts +5 -5
  491. package/webscene/InitialViewProperties.d.ts +0 -1
  492. package/webscene/Slide.d.ts +36 -4
  493. package/webscene/Slide.js +1 -1
  494. package/webscene/support/FeatureReference.d.ts +1 -1
  495. package/webscene/support/SlidePopupInfo.d.ts +2 -2
  496. package/webscene/types.d.ts +5 -1
  497. package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.d.ts +1 -1
  498. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.d.ts +7 -1
  499. package/widgets/AreaMeasurement3D.d.ts +1 -0
  500. package/widgets/Attachments/AttachmentsViewModel.d.ts +1 -1
  501. package/widgets/Attachments.d.ts +1 -1
  502. package/widgets/Attribution/AttributionViewModel.d.ts +2 -2
  503. package/widgets/BasemapGallery/support/LocalBasemapsSource.d.ts +1 -1
  504. package/widgets/BasemapGallery/support/PortalBasemapsSource.d.ts +1 -1
  505. package/widgets/BasemapGallery.d.ts +1 -1
  506. package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +3 -3
  507. package/widgets/BasemapLayerList.d.ts +2 -2
  508. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +4 -4
  509. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +1 -1
  510. package/widgets/BatchAttributeForm/inputs/EditableInput.d.ts +1 -1
  511. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +1 -1
  512. package/widgets/BatchAttributeForm/inputs/GroupInput.d.ts +1 -1
  513. package/widgets/BatchAttributeForm/inputs/InputBase.d.ts +1 -1
  514. package/widgets/BatchAttributeForm/inputs/SingleFeatureInput.d.ts +1 -1
  515. package/widgets/BatchAttributeForm.d.ts +2 -2
  516. package/widgets/Bookmarks/BookmarksViewModel.d.ts +5 -5
  517. package/widgets/Bookmarks/{interfaces.d.ts → types.d.ts} +1 -1
  518. package/widgets/Bookmarks.d.ts +6 -7
  519. package/widgets/BuildingExplorer/BuildingExplorerViewModel.d.ts +1 -0
  520. package/widgets/BuildingExplorer/BuildingLevel.d.ts +1 -0
  521. package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.d.ts +1 -0
  522. package/widgets/BuildingExplorer/BuildingPhase.d.ts +1 -0
  523. package/widgets/BuildingExplorer.d.ts +4 -1
  524. package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +3 -3
  525. package/widgets/CatalogLayerList.d.ts +2 -2
  526. package/widgets/Compass/CompassViewModel.d.ts +1 -1
  527. package/widgets/Compass.d.ts +1 -1
  528. package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +4 -4
  529. package/widgets/CoordinateConversion/support/Conversion.d.ts +1 -1
  530. package/widgets/CoordinateConversion/support/Format.d.ts +2 -2
  531. package/widgets/CoordinateConversion.d.ts +2 -3
  532. package/widgets/Daylight/DaylightViewModel.d.ts +3 -1
  533. package/widgets/Daylight/VisibleElements.d.ts +3 -0
  534. package/widgets/Daylight/types.d.ts +6 -0
  535. package/widgets/Daylight.d.ts +5 -3
  536. package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.d.ts +7 -1
  537. package/widgets/DirectLineMeasurement3D.d.ts +1 -0
  538. package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +1 -2
  539. package/widgets/DirectionalPad/{utils.d.ts → types.d.ts} +3 -1
  540. package/widgets/Directions/DirectionsViewModel.d.ts +3 -3
  541. package/widgets/Directions.d.ts +4 -5
  542. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.d.ts +1 -1
  543. package/widgets/Editor/CreateFeaturesWorkflow.d.ts +1 -1
  544. package/widgets/Editor/CreateFeaturesWorkflowData.d.ts +2 -2
  545. package/widgets/Editor/EditorViewModel.d.ts +5 -6
  546. package/widgets/Editor/MergeFeaturesWorkflow.d.ts +1 -1
  547. package/widgets/Editor/SplitFeatureWorkflow.d.ts +1 -2
  548. package/widgets/Editor/SplitFeatureWorkflowData.d.ts +2 -2
  549. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  550. package/widgets/Editor/UpdateFeaturesWorkflow.d.ts +1 -1
  551. package/widgets/Editor/UpdateFeaturesWorkflowData.d.ts +1 -1
  552. package/widgets/Editor/UpdateWorkflow.d.ts +1 -1
  553. package/widgets/Editor/Workflow.d.ts +1 -1
  554. package/widgets/Editor/support/EditorEditingCapabilities.d.ts +9 -9
  555. package/widgets/Editor/support/EditorItem.d.ts +4 -4
  556. package/widgets/Editor/support/SketchController.js +1 -1
  557. package/widgets/Editor/{interfaces.d.ts → types.d.ts} +9 -2
  558. package/widgets/Editor/workflowUtils.js +1 -1
  559. package/widgets/Editor.d.ts +10 -11
  560. package/widgets/ElevationProfile/ElevationProfileLine.d.ts +2 -1
  561. package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +1 -0
  562. package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +1 -0
  563. package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +2 -1
  564. package/widgets/ElevationProfile/ElevationProfileLineView.d.ts +2 -0
  565. package/widgets/ElevationProfile/ElevationProfileViewModel.d.ts +3 -5
  566. package/widgets/ElevationProfile/ElevationProfileVisibleElements.d.ts +3 -0
  567. package/widgets/ElevationProfile/support/ProfileLines3D.js +1 -1
  568. package/widgets/ElevationProfile/types.d.ts +149 -0
  569. package/widgets/ElevationProfile.d.ts +6 -5
  570. package/widgets/Expand/ExpandViewModel.d.ts +1 -1
  571. package/widgets/Expand.d.ts +2 -2
  572. package/widgets/Feature/FeatureViewModel.d.ts +5 -5
  573. package/widgets/Feature/{interfaces.d.ts → types.d.ts} +5 -1
  574. package/widgets/Feature.d.ts +3 -3
  575. package/widgets/FeatureForm/EditableInput.d.ts +1 -1
  576. package/widgets/FeatureForm/FeatureFormViewModel.d.ts +3 -3
  577. package/widgets/FeatureForm/FieldInput.d.ts +1 -1
  578. package/widgets/FeatureForm/GroupInput.d.ts +1 -1
  579. package/widgets/FeatureForm.d.ts +3 -3
  580. package/widgets/FeatureTable/AttachmentsColumn.d.ts +1 -1
  581. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +3 -4
  582. package/widgets/FeatureTable/Grid/Column.d.ts +2 -3
  583. package/widgets/FeatureTable/Grid/{support/interfaces.d.ts → types.d.ts} +57 -0
  584. package/widgets/FeatureTable/RelationshipColumn.d.ts +1 -1
  585. package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +2 -3
  586. package/widgets/FeatureTable/support/interfaces.d.ts +2 -3
  587. package/widgets/FeatureTable.d.ts +3 -4
  588. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.d.ts +4 -4
  589. package/widgets/FeatureTemplates/TemplateItem.d.ts +1 -1
  590. package/widgets/FeatureTemplates/{interfaces.d.ts → types.d.ts} +1 -1
  591. package/widgets/FeatureTemplates.d.ts +4 -4
  592. package/widgets/Features/FeaturesViewModel.d.ts +12 -12
  593. package/widgets/Features.d.ts +11 -12
  594. package/widgets/FloorFilter.d.ts +1 -1
  595. package/widgets/Histogram/HistogramViewModel.d.ts +3 -3
  596. package/widgets/Histogram.d.ts +3 -3
  597. package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.d.ts +3 -3
  598. package/widgets/HistogramRangeSlider.d.ts +11 -11
  599. package/widgets/Home.d.ts +1 -1
  600. package/widgets/LayerList/LayerListViewModel.d.ts +1 -1
  601. package/widgets/LayerList/ListItem.d.ts +1 -1
  602. package/widgets/LayerList/ListItemPanel.d.ts +1 -1
  603. package/widgets/LayerList/{interfaces.d.ts → types.d.ts} +2 -2
  604. package/widgets/LayerList.d.ts +2 -2
  605. package/widgets/Legend/LegendViewModel.d.ts +1 -1
  606. package/widgets/Legend/support/ActiveLayerInfo.d.ts +1 -1
  607. package/widgets/Legend.d.ts +2 -2
  608. package/widgets/LineOfSight/LineOfSightTarget.d.ts +1 -0
  609. package/widgets/LineOfSight/LineOfSightViewModel.d.ts +1 -0
  610. package/widgets/LineOfSight.d.ts +1 -0
  611. package/widgets/Locate/LocateViewModel.d.ts +1 -1
  612. package/widgets/Locate.d.ts +2 -2
  613. package/widgets/Measurement/MeasurementViewModel.d.ts +2 -2
  614. package/widgets/Measurement.d.ts +1 -1
  615. package/widgets/Popup/{interfaces.d.ts → types.d.ts} +2 -0
  616. package/widgets/Popup.d.ts +8 -9
  617. package/widgets/Print/CustomTemplate.d.ts +1 -1
  618. package/widgets/Print/PrintViewModel.d.ts +2 -2
  619. package/widgets/Print.d.ts +2 -2
  620. package/widgets/ScaleRangeSlider.d.ts +2 -2
  621. package/widgets/Search/LocatorSearchSource.d.ts +2 -2
  622. package/widgets/Search/SearchSource.d.ts +3 -3
  623. package/widgets/Search/types.d.ts +64 -0
  624. package/widgets/Search.d.ts +2 -2
  625. package/widgets/ShadowCast/DurationOptions.d.ts +1 -1
  626. package/widgets/ShadowCast/ShadowCastViewModel.d.ts +2 -2
  627. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  628. package/widgets/ShadowCast/{ShadowVisualizationType.d.ts → types.d.ts} +4 -1
  629. package/widgets/ShadowCast.d.ts +1 -1
  630. package/widgets/Sketch/SketchViewModel.d.ts +5 -5
  631. package/widgets/Sketch/{support/interfaces.d.ts → types.d.ts} +17 -17
  632. package/widgets/Sketch.d.ts +1 -1
  633. package/widgets/Slice/SliceViewModel.d.ts +1 -0
  634. package/widgets/Slice.d.ts +2 -1
  635. package/widgets/Slider/SliderViewModel.d.ts +3 -3
  636. package/widgets/Slider/{interfaces.d.ts → types.d.ts} +2 -2
  637. package/widgets/Slider.d.ts +4 -4
  638. package/widgets/Swipe/SwipeViewModel.d.ts +1 -1
  639. package/widgets/Swipe.d.ts +1 -1
  640. package/widgets/TableList/ListItem.d.ts +1 -1
  641. package/widgets/TableList/TableListViewModel.d.ts +2 -2
  642. package/widgets/TableList.d.ts +2 -2
  643. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +5 -5
  644. package/widgets/TimeSlider.d.ts +14 -15
  645. package/widgets/TimeZoneLabel.d.ts +1 -2
  646. package/widgets/Track/TrackViewModel.d.ts +1 -1
  647. package/widgets/Track.d.ts +1 -1
  648. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  649. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.d.ts +3 -3
  650. package/widgets/UtilityNetworkTrace/{support/ResultAreaHandler.d.ts → types.d.ts} +2 -2
  651. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
  652. package/widgets/ValuePicker/ValuePickerSlider.d.ts +1 -1
  653. package/widgets/ValuePicker.d.ts +2 -2
  654. package/widgets/VersionManagement/VersionManagementViewModel.d.ts +3 -3
  655. package/widgets/Weather/VisibleElements.d.ts +3 -0
  656. package/widgets/Weather/WeatherViewModel.d.ts +4 -3
  657. package/widgets/Weather/types.d.ts +9 -0
  658. package/widgets/Weather.d.ts +2 -1
  659. package/widgets/Widget.d.ts +2 -1
  660. package/widgets/smartMapping/BinaryColorSizeSlider.d.ts +0 -3
  661. package/widgets/smartMapping/ClassedColorSlider/ClassedColorSliderViewModel.d.ts +1 -3
  662. package/widgets/smartMapping/ClassedColorSlider.d.ts +2 -2
  663. package/widgets/smartMapping/ClassedSizeSlider/ClassedSizeSliderViewModel.d.ts +1 -2
  664. package/widgets/smartMapping/ClassedSizeSlider.d.ts +2 -2
  665. package/widgets/smartMapping/ColorSizeSlider/ColorSizeSliderViewModel.d.ts +5 -5
  666. package/widgets/smartMapping/ColorSizeSlider.d.ts +3 -2
  667. package/widgets/smartMapping/ColorSlider/ColorSliderViewModel.d.ts +1 -1
  668. package/widgets/smartMapping/ColorSlider.d.ts +1 -1
  669. package/widgets/smartMapping/HeatmapSlider/HeatmapSliderViewModel.d.ts +2 -4
  670. package/widgets/smartMapping/HeatmapSlider.d.ts +2 -4
  671. package/widgets/smartMapping/OpacitySlider/OpacitySliderViewModel.d.ts +1 -1
  672. package/widgets/smartMapping/OpacitySlider.d.ts +1 -1
  673. package/widgets/smartMapping/SizeSlider.d.ts +2 -2
  674. package/widgets/smartMapping/SmartMappingPrimaryHandleSliderViewModel.d.ts +2 -2
  675. package/widgets/smartMapping/SmartMappingSliderBase.d.ts +11 -14
  676. package/widgets/smartMapping/SmartMappingSliderViewModel.d.ts +5 -6
  677. package/widgets/smartMapping/{support/interfaces.d.ts → types.d.ts} +52 -5
  678. package/widgets/support/GeolocationPositioning.d.ts +1 -1
  679. package/widgets/support/GoTo.d.ts +1 -1
  680. package/widgets/support/GridControls/GridControlsViewModel.d.ts +1 -1
  681. package/widgets/support/forms/types.d.ts +4 -0
  682. package/widgets/support/{goToUtils.d.ts → types.d.ts} +9 -2
  683. package/widgets/{interfaces.d.ts → types.d.ts} +71 -15
  684. package/arcade/featureset/support/shared.d.ts +0 -16
  685. package/assets/esri/core/workers/chunks/0359ac6d938e0df936d0.js +0 -1
  686. package/assets/esri/core/workers/chunks/1db058f91a8e17b24db6.js +0 -1
  687. package/assets/esri/core/workers/chunks/1e286fb7bb833f00dd88.js +0 -1
  688. package/assets/esri/core/workers/chunks/262232437d37a7460b11.js +0 -1
  689. package/assets/esri/core/workers/chunks/2d6fa00273a73d44297d.js +0 -1
  690. package/assets/esri/core/workers/chunks/2fae37f34b28a46841e3.js +0 -1
  691. package/assets/esri/core/workers/chunks/3b1471f908fdecec2815.js +0 -1
  692. package/assets/esri/core/workers/chunks/48b3906ac3ec57253d90.js +0 -1
  693. package/assets/esri/core/workers/chunks/49b581782f63abb6dd9f.js +0 -1
  694. package/assets/esri/core/workers/chunks/4abe2c56aecc9e9b8e86.js +0 -1
  695. package/assets/esri/core/workers/chunks/51b78eca012eac92dd07.js +0 -1
  696. package/assets/esri/core/workers/chunks/5ce524e0060053f35592.js +0 -316
  697. package/assets/esri/core/workers/chunks/5d244fcf5c075afccdc6.js +0 -1
  698. package/assets/esri/core/workers/chunks/6b8c15f3970289e73a47.js +0 -1
  699. package/assets/esri/core/workers/chunks/6cfcfebe9a4c491e453a.js +0 -1
  700. package/assets/esri/core/workers/chunks/710b29729f252f11115d.js +0 -1
  701. package/assets/esri/core/workers/chunks/72a520802b8accfd4512.js +0 -1
  702. package/assets/esri/core/workers/chunks/73892ac79b24b05e6863.js +0 -33
  703. package/assets/esri/core/workers/chunks/75d8244b725a2aee2003.js +0 -1
  704. package/assets/esri/core/workers/chunks/93b139be6488a1b4ba19.js +0 -1
  705. package/assets/esri/core/workers/chunks/a5e7c9517939f762c518.js +0 -1
  706. package/assets/esri/core/workers/chunks/a63ff3e9a9f3853d12f3.js +0 -1
  707. package/assets/esri/core/workers/chunks/a81a7cba815adb575c36.js +0 -1
  708. package/assets/esri/core/workers/chunks/a8fd635d1165db8616ab.js +0 -1
  709. package/assets/esri/core/workers/chunks/b638ce18b93d3cfb9967.js +0 -1
  710. package/assets/esri/core/workers/chunks/ba7e97b1e324118b8156.js +0 -1
  711. package/assets/esri/core/workers/chunks/c0d6336c10b4081c4e32.js +0 -1
  712. package/assets/esri/core/workers/chunks/cc4ae105e727d9211d82.js +0 -1
  713. package/assets/esri/core/workers/chunks/d7a62504e00989202c45.js +0 -1
  714. package/assets/esri/core/workers/chunks/e25be3b6b67ce6b03011.js +0 -1
  715. package/assets/esri/core/workers/chunks/e5ac9b048b16fef9840c.js +0 -1
  716. package/assets/esri/core/workers/chunks/ec7e6427d99cf3148a61.js +0 -1
  717. package/assets/esri/core/workers/chunks/efa95c50d1ed8e74219f.js +0 -1
  718. package/assets/esri/core/workers/chunks/f379fd459a103f42d447.js +0 -1
  719. package/assets/esri/core/workers/chunks/ffcdc7ae03b0570e0db8.js +0 -1
  720. package/geometry/interfaces.d.ts +0 -2
  721. package/geometry/support/interfaces.d.ts +0 -3
  722. package/geometry/support/meshUtils/exporters/gltf/interfaces.d.ts +0 -11
  723. package/renderers/support/interfaces.d.ts +0 -2
  724. package/smartMapping/statistics/interfaces.d.ts +0 -571
  725. package/smartMapping/support/adapters/interfaces.d.ts +0 -18
  726. package/views/2d/ViewStateManager.d.ts +0 -2
  727. package/views/2d/interfaces.d.ts +0 -67
  728. package/views/2d/layers/support/clusterUtils.d.ts +0 -6
  729. package/views/3d/environment/lightingUtils.d.ts +0 -4
  730. package/views/3d/environment/weather.d.ts +0 -9
  731. package/views/3d/interactive/visualElements/DrapedVisualElementResources.d.ts +0 -2
  732. package/views/3d/support/QualityProfile.d.ts +0 -2
  733. package/views/SceneViewHitTestResult.d.ts +0 -64
  734. package/views/ViewingMode.d.ts +0 -2
  735. package/views/analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js +0 -5
  736. package/views/analysis/ElevationProfile/interfaces.d.ts +0 -73
  737. package/views/draw/DrawingMode.d.ts +0 -2
  738. package/views/draw/support/drawUtils.d.ts +0 -7
  739. package/views/interactive/sketch/interfaces.d.ts +0 -2
  740. package/views/interactive/tooltip/interfaces.d.ts +0 -2
  741. package/views/support/interfaces.d.ts +0 -87
  742. package/views/ui/Padding.d.ts +0 -11
  743. package/views/viewType.d.ts +0 -2
  744. package/views/webgl/enums.d.ts +0 -38
  745. package/webscene/support/featureReferenceUtils.d.ts +0 -4
  746. package/widgets/Daylight/support/daylightUtils.d.ts +0 -4
  747. package/widgets/DirectionalPad/constants.d.ts +0 -2
  748. package/widgets/Editor/support/splitFeatureUtils.d.ts +0 -7
  749. package/widgets/ElevationProfile/ElevationProfileInteraction.d.ts +0 -13
  750. package/widgets/ElevationProfile/elevationProfileLineTypes.d.ts +0 -6
  751. package/widgets/ElevationProfile/interfaces.d.ts +0 -103
  752. package/widgets/ElevationProfile/support/constants.d.ts +0 -14
  753. package/widgets/Feature/support/arcadeFeatureUtils.d.ts +0 -4
  754. package/widgets/FeatureTable/Grid/interfaces.d.ts +0 -57
  755. package/widgets/Popup/actions.d.ts +0 -4
  756. package/widgets/Search/support/interfaces.d.ts +0 -67
  757. package/widgets/ShadowCast/DurationMode.d.ts +0 -3
  758. package/widgets/Weather/enums.d.ts +0 -9
  759. package/widgets/smartMapping/ClassedColorSlider/interfaces.d.ts +0 -19
  760. package/widgets/smartMapping/ClassedSizeSlider/interfaces.d.ts +0 -18
  761. package/widgets/smartMapping/interfaces.d.ts +0 -13
  762. package/widgets/support/Heading.d.ts +0 -7
  763. package/widgets/support/forms/formUtils.d.ts +0 -2
  764. package/widgets/support/forms/interfaces.d.ts +0 -2
  765. package/widgets/support/interfaces.d.ts +0 -56
  766. /package/analysis/{interfaces.d.ts → types.d.ts} +0 -0
  767. /package/core/accessorSupport/{interfaces.d.ts → types.d.ts} +0 -0
  768. /package/core/{interfaces.d.ts → types.d.ts} +0 -0
  769. /package/editing/sharedTemplates/{interfaces.d.ts → types.d.ts} +0 -0
  770. /package/editing/{interfaces.d.ts → types.d.ts} +0 -0
  771. /package/layers/effects/{interfaces.d.ts → types.d.ts} +0 -0
  772. /package/layers/orientedImagery/{interfaces.d.ts → types.d.ts} +0 -0
  773. /package/layers/raster/datasets/{interfaces.d.ts → types.d.ts} +0 -0
  774. /package/layers/raster/functions/{interfaces.d.ts → types.d.ts} +0 -0
  775. /package/linkChart/{interfaces.d.ts → types.d.ts} +0 -0
  776. /package/popup/{interfaces.d.ts → types.d.ts} +0 -0
  777. /package/rest/lastMileDelivery/{interfaces.d.ts → types.d.ts} +0 -0
  778. /package/rest/{interfaces.d.ts → types.d.ts} +0 -0
  779. /package/smartMapping/popup/{interfaces.d.ts → types.d.ts} +0 -0
  780. /package/smartMapping/raster/support/adapters/{interfaces.d.ts → types.d.ts} +0 -0
  781. /package/smartMapping/symbology/{interfaces.d.ts → types.d.ts} +0 -0
  782. /package/statistics/{interfaces.d.ts → types.d.ts} +0 -0
  783. /package/symbols/support/{interfaces.d.ts → types.d.ts} +0 -0
  784. /package/symbols/{interfaces.d.ts → types.d.ts} +0 -0
  785. /package/time/{interfaces.d.ts → types.d.ts} +0 -0
  786. /package/versionManagement/versionAdapters/{interfaces.d.ts → types.d.ts} +0 -0
  787. /package/views/2d/analysis/{interfaces.d.ts → types.d.ts} +0 -0
  788. /package/views/3d/analysis/{interfaces.d.ts → types.d.ts} +0 -0
  789. /package/views/3d/{interfaces.d.ts → types.d.ts} +0 -0
  790. /package/views/animation/{easing.d.ts → types.d.ts} +0 -0
  791. /package/views/draw/{DrawingMode.js → drawingModes.js} +0 -0
  792. /package/views/input/{interfaces.d.ts → types.d.ts} +0 -0
  793. /package/views/navigation/{interfaces.d.ts → types.d.ts} +0 -0
  794. /package/widgets/Attachments/{interfaces.d.ts → types.d.ts} +0 -0
  795. /package/widgets/BasemapGallery/{interfaces.d.ts → types.d.ts} +0 -0
  796. /package/widgets/BasemapLayerList/{interfaces.d.ts → types.d.ts} +0 -0
  797. /package/widgets/BatchAttributeForm/inputs/{interfaces.d.ts → types.d.ts} +0 -0
  798. /package/widgets/BatchAttributeForm/{interfaces.d.ts → types.d.ts} +0 -0
  799. /package/widgets/CatalogLayerList/{interfaces.d.ts → types.d.ts} +0 -0
  800. /package/widgets/FeatureForm/{interfaces.d.ts → types.d.ts} +0 -0
  801. /package/widgets/Histogram/{interfaces.d.ts → types.d.ts} +0 -0
  802. /package/widgets/HistogramRangeSlider/{interfaces.d.ts → types.d.ts} +0 -0
  803. /package/widgets/Measurement/{interfaces.d.ts → types.d.ts} +0 -0
  804. /package/widgets/OrientedImageryViewer/{interfaces.d.ts → types.d.ts} +0 -0
  805. /package/widgets/Print/{interfaces.d.ts → types.d.ts} +0 -0
  806. /package/widgets/ScaleRangeSlider/{interfaces.d.ts → types.d.ts} +0 -0
  807. /package/widgets/Swipe/{interfaces.d.ts → types.d.ts} +0 -0
  808. /package/widgets/TableList/{interfaces.d.ts → types.d.ts} +0 -0
  809. /package/widgets/TimeSlider/{interfaces.d.ts → types.d.ts} +0 -0
  810. /package/widgets/Track/{interfaces.d.ts → types.d.ts} +0 -0
  811. /package/widgets/ValuePicker/{interfaces.d.ts → types.d.ts} +0 -0
  812. /package/widgets/support/GridControls/{interfaces.d.ts → types.d.ts} +0 -0
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../Color.js";import has from"../../../core/has.js";import{disposeMaybe as i}from"../../../core/maybe.js";import{MemCachePool as r}from"../../../core/MemCachePool.js";import s from"../../../core/ObjectPool.js";import{watch as n,sync as a}from"../../../core/reactiveUtils.js";import{property as l,subclass as o}from"../../../core/accessorSupport/decorators.js";import{e as c,h as d,g as h}from"../../../chunks/vec32.js";import{ZEROS as u,create as _,fromValues as g}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as f,ZEROS as p}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as m,set as y}from"../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as b}from"../../../geometry/support/buffer/BufferView.js";import{overlayRenderOccludedFlag as T}from"./OverlayRenderer.js";import{PatchRenderData as x}from"./PatchRenderData.js";import{TerrainAttributesCache as R}from"./TerrainAttributesCache.js";import{enableTerrainInternalChecks as v}from"./terrainUtils.js";import{TileRenderer as P}from"./TileRenderer.js";import{IteratorPreorder as O,sortTiles as w,compareTiles as D}from"./tileUtils.js";import{getOverlayContentForOutputTerrain as S}from"../webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{SyncRenderPlugin as B,ConsumesDepth as E,ConsumesNone as j}from"../webgl-engine/effects/RenderPlugin.js";import{Vertices as q}from"../webgl-engine/lib/Attribute.js";import{IntersectorResult as C}from"../webgl-engine/lib/IntersectorResult.js";import{intersectAabbInvDirBefore as F,MeshIntersectionOptions as A,intersectTriangles as M}from"../webgl-engine/lib/RayIntersections.js";import{TriangleIntersectionData as G}from"../webgl-engine/lib/TriangleIntersectionData.js";import{terrainId as k,getVerticalOffsetTerrain as U}from"../webgl-engine/lib/verticalOffsetUtils.js";import{DrawParameters as N}from"../webgl-engine/materials/DrawParameters.js";import{T as I}from"../../../chunks/Terrain.glsl.js";import{TerrainTechnique as L}from"../webgl-engine/shaders/TerrainTechnique.js";import{TerrainTechniqueConfiguration as V}from"../webgl-engine/shaders/TerrainTechniqueConfiguration.js";import{PrimitiveType as z}from"../../webgl/enums.js";const H=7,W=10,Q=200,Z=m();let J=class extends B{get visibleTiles(){return Array.from(this._visiblePatchesByOrigin.values()).flat()}get _isGlobal(){return 1===this._stage.viewingMode}get _techniques(){return this._context.techniques}get _rctx(){return this._context.renderContext.rctx}constructor(e,t,i,n,a){super({}),this._overlayRenderer=e,this._stage=t,this._allTiles=i,this._compressionTracker=n,this.type=7,this.isGround=!0,this._passParameters=new I,this._drawParameters=new N,this._renderDataPool=new s(()=>new x),this._visiblePatchesByOrigin=new Map,this._allPatchesByOrigin=new Map,this._patchesByOriginDirty=!0,this._patchSortingDirty=!0,this._tileIterator=new O,this._castShadows=!1,this._inViewshed=!1,this._cutFillEnabled=!1,this._tileRenderer=null,this._stencilEnabledLayerExtents=new Array,this._numTilesRendered=0,this._numTilesCulled=0,this._numOriginsRendered=0,this.renderOccludedFlags=1,this._oitGround=!!has("enable-feature:oit-ground"),this.produces=new Map([[1,()=>1===this._desiredSlot],[6,()=>6===this._desiredSlot],[7,()=>7===this._desiredSlot],[10,()=>this._produces()&&this.renderOccludedFlags===T]]),this._tileSize=256,this._configuration=new V(1===t.viewingMode),this._tileTextureCache=new r((e,t)=>a.newCache(e,t),"TileTexture"),this.tileGeometryCache=new R(a)}normalizeCtorArgs(){return{}}initialize(){this._stage.addRenderPlugin(this),this.addHandles(n(()=>this._overlayRenderer.renderOccludedFlags,e=>{this.renderOccludedFlags=e,this.setNeedsRender()},a))}destroy(){this._stage.removeRenderPlugin(this),this._tileTextureCache.destroy(),this.tileGeometryCache.destroy(),this._allTiles.prune(),this._tileRenderer=null}_produces(){return this.visible&&!!this._rootTiles&&!this.renderingDisabled}consumes(){return this._overlayRenderer.hasWater?E:j}set renderingDisabled(e){this._set("renderingDisabled",!!e),this.setDirty()}set visible(e){this._set("visible",!!e),this.setDirty()}updateHeading(e){this._tileRenderer?.updateHeading(e)}set transparency(e){this._configuration.transparencyMode!==e&&(this._configuration.transparencyMode=e,this.setNeedsRender())}get transparency(){return this._configuration.transparencyMode}get renderPatchBorders(){return this._configuration.tileBorders}set renderPatchBorders(e){this._configuration.tileBorders!==e&&(this._configuration.tileBorders=e,this.setNeedsRender(),this.notifyChange("renderPatchBorders"))}get layerViewUid(){return k}get slicePlaneEnabled(){return this._configuration.hasSlicePlane}set slicePlaneEnabled(e){this._configuration.hasSlicePlane!==e&&(this._configuration.hasSlicePlane=e,this.setNeedsRender())}set textureFadingEnabled(e){this._configuration.textureFadingEnabled!==e&&(this._configuration.textureFadingEnabled=e,this.setNeedsRender())}set pbrMode(e){this._configuration.pbrMode!==e&&(this._configuration.pbrMode=e,this.setNeedsRender())}setRootTiles(e){this._rootTiles=e,this.setDirty()}setStencilEnabledLayerExtents(e){this._stencilEnabledLayerExtents=e,this._setSortingDirty()}set tileSize(e){this._tileSize=e,null!=this._tileRenderer&&(this._tileRenderer.tileSize=e),this.setDirty()}get tileSize(){return this._tileSize}_ensureRenderData(e){e.renderData||(e.renderData=this._renderDataPool.acquire(),e.renderData.init(e,this._getLocalOriginOfTile(e)))}loadTile(e){this._ensureRenderData(e),this.updateTileGeometryState(e),this.reuseTextureFromParent(e)||this.updateTileTexture(e,32)}reuseTextureFromParent(e){const t=e.parent;if(!t)return!1;const i=f(1&e.lij[2]?.5:0,1&e.lij[1]?0:.5,.5,.5);return t.renderData?.reuseTexture(e.renderData,i)??!1}updateTileTexture(e,t){null!=this._tileRenderer&&(this._tileRenderer.updateTileTexture(e,32===t?0:2),this.setNeedsRender(),e.resetPendingUpdate(t))}updateTileGeometryState(e){for(const i of e.layerInfo[0])i.pendingUpdates&=-9;e.resetPendingUpdate(8);const t=e.renderData.updateGeometryState();return t&&this.setDirty(),t}updateGeometryIfNeeded(e){e.loaded&&e.renderData.updateGeometryIfNeeded(this._rctx)}unloadTile(e){const t=e.renderData;t&&(t.releaseGeometry(),this._renderDataPool.release(t),t.clear(),e.renderData=null,e.setMemoryDirty(),this.setDirty())}_getLocalOriginOfTile(e){const t=W-H,i=Math.max(0,Math.floor((e.level-t)/H)*H);if(this._isGlobal&&0===i)return u;for(;e.parent&&e.level>i;)e=e.parent;return e.centerAtSeaLevel}getStats(){return{numTilesRendered:this._numTilesRendered,numTilesCulled:this._numTilesCulled,numOriginsRendered:this._numOriginsRendered}}set wireframe(e){this._get("wireframe")!==e&&(this._set("wireframe",e),this.setNeedsRender())}setDirty(e=1){this._patchesByOriginDirty=!0,this._context.requestRender(e)}_setSortingDirty(e=1){this._patchSortingDirty=!0,this._context.requestRender(e)}setNeedsRender(e=1){this._context.requestRender(e)}initializeRenderContext(e){this._context=e,this._tileRenderer=new P(this._rctx,this._tileSize,this._techniques,this._tileTextureCache,this._compressionTracker),this.updateTileBackground()}uninitializeRenderContext(){this._tileRenderer=i(this._tileRenderer)}intersect(e,t,i,r){if(!this._rootTiles||e.options.selectOpaqueTerrainOnly&&e.options.selectionMode&&0!==this.transparency)return;const s=K,n=X;c(s,r,i),d(n,1/s[0],1/s[1],1/s[2]);const a=e.results.min,l=e.results.max,o=e.results.ground,u=0===e.options.store,_=!!e.results.ground.target,g=U(e.verticalOffset),f=e.tolerance;let p,m=u&&null!=a.distance?a.distance:1/0;const T=e.options,x=T.normalRequired||!T.backfacesTerrain,R=new A(f,!1,x),v=d=>{const _=d.renderData;if(!_?.vao)return;const v=_.geometry;y(Z,v.boundingBox);const P=_.localOrigin;null!=g&&(g.localOrigin=P,g.applyToAabb(Z));const O=Z;if(Y[0]=i[0]-P[0],Y[1]=i[1]-P[1],Y[2]=i[2]-P[2],!F(O,Y,n,f,m))return;const w=(e,t,i)=>{e.set(this.type,d,t,i),m=u&&null!=a.distance?a.distance:1/0},D=(n,c,d)=>{if((!x||null!=d)&&n>=0&&(T.backfacesTerrain||h(d,s)<0)&&(T.invisibleTerrain||!T.selectionMode||null==t||t(i,r,n))){if((null==o.distance||n<o.distance)&&w(o,n,d),T.isFiltered)return;2===T.store&&(null==p?(p=new C(e.ray),w(p,n,d),e.results.all.push(p)):n<p.distance&&w(p,n,d)),(null==a.distance||n<a.distance)&&w(a,n,d),0!==T.store&&(null==l.distance||n>l.distance)&&w(l,n,d)}},S=$;c(S,r,P);const{indices:B,indexCount:E}=v,j=v.vertexAttributes,A=j.getField("position",b),k=new q(A.typedBuffer,3,j.stride/4),U=E/3;if(!g&&U>Q){const e=d.renderData;e.intersectionData??=new G(B,U,k),e.intersectionData.intersectRay(Y,S,R,D)}else M(Y,S,0,U,B,k,g,R,D)},P=this._rootTiles;if(null!=P){(()=>{const t=this._tileIterator;t.reset(P);const r=e.options.invisibleTerrain;for(let e=t.next();e;e=t.next())!(e.visible||r&&e.intersectsClippingArea)||null==g&&!e.intersectsRay(i,s,f,m)||_&&this._useStencilForTile(e)?t.skipSubtree():v(e)})()}}processScaleRangeQueries(e,t){if(!t.done&&e)for(this._updatePatchGroups();e.updating&&!t.done;){e.prepare();for(const t of this._visiblePatchesByOrigin.values())for(const i of t)null!=i.renderData?.textureReference&&e.queriesForTile(i);e.process(),t.madeProgress()}}get _desiredSlot(){if(!this._produces())return null;switch(this.transparency){case 0:return 1;case 1:case 2:return this._oitGround?7:6;case 3:case 4:return null}}acquireTechniques(e){const{shadowMap:t,viewshedEnabled:i,cutFillEnabled:r,slot:s,oitPass:n,hasEmission:a}=e.bind,l=!!has("enable-feature:terrain-shadows")&&t.enabled;if(l!==this._castShadows&&(this._castShadows=l,this._patchesByOriginDirty=!0),this._inViewshed!==i&&(this._inViewshed=i,this._patchesByOriginDirty=!0),this._cutFillEnabled!==r&&(this._cutFillEnabled=r,this._patchesByOriginDirty=!0),3===this.transparency)return null;if(10===s){if(0===(e.renderOccludedMask&T))return null}else if(s!==this._desiredSlot)return null;const o=this._configuration;switch(o.screenSpaceReflections=o.cloudReflections=o.receiveShadows=o.receiveAmbientOcclusion=o.renderOccluded=o.hasHighlightMixTexture=o.hasEmission=!1,o.overlayMode=this._overlayRenderer.mode,o.oitPass=0,e.output){case 0:{const{ssr:i,clouds:r,ssao:l}=e.bind;o.screenSpaceReflections=null!=i.lastFrameColor,o.cloudReflections=null!=r.data;const c=10===s;return o.receiveShadows=t.ready&&!c,o.renderOccluded=c,o.receiveAmbientOcclusion=!c&&null!=l,o.oitPass=n,o.hasEmission=a,this._acquireTechnique(e.output)}case 3:case 5:return this._castShadows?this._acquireTechnique(3):null;case 6:return this._inViewshed?this._acquireTechnique(6):null;case 7:return this._cutFillEnabled?this._acquireTechnique(7):null;case 1:case 2:return this._acquireTechnique(e.output);case 9:return this._acquireTechnique(9);case 8:return o.hasHighlightMixTexture=null!=e.bind.highlightMixTexture,this._overlayRenderer.hasHighlights?this._acquireTechnique(8):null}return null}render(e,t){switch(this._updatePatchGroups(),t.useStencil=!1,this._passParameters.overlayContent=S(e.output,e.bind),e.output){case 0:return this._renderMaterialPass(e,t);case 1:case 2:case 9:return this._renderAuxiliaryPass(e,t,this._visiblePatchesByOrigin);case 8:{const i=e.bind.highlight?.name;i&&this._overlayRenderer.hasHighlights&&this._overlayRenderer.renders(2)&&this._overlayRenderer.hasHighlight(i)&&this._renderAuxiliaryPass(e,t,this._visiblePatchesByOrigin);break}case 3:case 5:case 6:case 7:return this._renderAuxiliaryPass(e,t,this._allPatchesByOrigin)}}updateTileBackground(e){if(null==this._tileRenderer)return;const i=this._tileRenderer;let r;if(null!=e){const i=t.toUnitRGBA(e);r=g(i[0]||0,i[1]||0,i[2]||0)}i.setBackground(r),this._allTiles.forAll(e=>i.updateTileTexture(e,0)),this._configuration.tileBlendInput=i.backgroundIsGrid?2:null!=i.backgroundColor?1:0,this.setNeedsRender()}_updatePatchGroups(){if(this._patchesByOriginDirty&&(this._rebuildPatchGroups(),this._patchesByOriginDirty=!1,this._patchSortingDirty=!0),this._patchSortingDirty){const e=Array.from(this._visiblePatchesByOrigin.values()),t=this._stencilEnabledLayerExtents;for(const i of e)w(i,t);e.sort((e,t)=>D(e[0],t[0])),this._visiblePatchesByOrigin=new Map(e.map(e=>[e[0].renderData.localOrigin,e])),this.notifyChange("visibleTiles"),this._patchSortingDirty=!1}}_rebuildPatchGroups(){const e=this._rootTiles;if(null!=e){e[0]?.surface.checkAllTilesWaterproofness(),this._visiblePatchesByOrigin.clear(),this._allPatchesByOrigin.clear();for(const t of e)this._rebuildPatchGroupsForRootTile(t)}}_rebuildPatchGroupsForRootTile(e){const t=this._tileIterator;for(t.resetOne(e);!t.done;){const e=t.next(),i=e.renderData;if(!i){this._numTilesCulled++;continue}const r=i.localOrigin;if(this._castShadows||this._inViewshed||this._cutFillEnabled){let t=this._allPatchesByOrigin.get(r);t||(t=[],this._allPatchesByOrigin.set(r,t)),t.push(e)}if(!e.visible){this._numTilesCulled++,t.skipSubtree();continue}let s=this._visiblePatchesByOrigin.get(r);s||(s=[],this._visiblePatchesByOrigin.set(r,s)),s.push(e),t.skipSubtree()}}_useStencilForTile(e){for(const t of this._stencilEnabledLayerExtents)if(e.intersectsExtent(t))return!0;return!1}_renderAuxiliaryPass(e,t,i){const{rctx:r,bind:s}=e;r.bindTechnique(t,s,this._passParameters);const n=this._stencilEnabledLayerExtents.length>0;i.forEach(i=>{this._drawParameters.origin=i[0].renderData.localOrigin,t.program.bindDraw(s,this._passParameters,this._drawParameters);for(let r=0;r<i.length;r++)this._renderPatch(e,t,i[r],z.TRIANGLES,n,null===this._passParameters.overlayContent)}),r.bindVAO(null)}_renderMaterialPass(e,t){const{rctx:i,bind:r}=e,s=i.bindTechnique(t,r,this._passParameters);this._numTilesRendered=0,this._numTilesCulled=0,this._numOriginsRendered=0;const n=10===r.slot;n&&(s.bindTexture("tex",i.emptyTexture),s.setUniform3fv("textureOpacities",u),s.setUniform4fv("texOffsetAndScale",p));const a=null!=this._tileRenderer?.backgroundColor?this._tileRenderer.backgroundColor:u;1===this._configuration.tileBlendInput&&s.setUniform3fv("backgroundColor",a);const l=this._stencilEnabledLayerExtents.length>0,o=this.wireframe?z.LINES:z.TRIANGLES;this._configuration.textureFadingEnabled&&s.bindTexture("texNext",i.emptyTexture);const c=this._visiblePatchesByOrigin;for(const d of c.values()){const i=d[0].renderData.localOrigin;this._drawParameters.origin=i,t.program.bindDraw(r,this._passParameters,this._drawParameters),this._numOriginsRendered++;for(const r of d){const i=r.renderData,a=i.textureReference;if(null!=a){if(!n){s.setUniform4fv("texOffsetAndScale",a.offsetAndScale),s.bindTexture("tex",a.texture.texture);const e=i.textureFadeFactor,t=e<1?i.nextTextureReference:null;this._configuration.textureFadingEnabled&&t&&e<1?(s.setUniform1f("fadeFactor",e),s.setUniform4fv("nextTexOffsetAndScale",t.offsetAndScale),s.setUniform3fv("nextTexOpacities",t.opacities),s.bindTexture("texNext",t.texture.texture)):s.setUniform1f("fadeFactor",1),i.textureIsFading&&this.setNeedsRender(2),s.setUniform3fv("textureOpacities",a.opacities)}this._renderPatch(e,t,r,o,l),r.renderOrder=this._numTilesRendered,this._numTilesRendered++}}}i.bindVAO(null)}_renderPatch(e,t,i,r,s,n=!1){const a=i.renderData,l=a.vao,o=l?.indexBuffer;if(!l||null==o)return void(v&&console.error("Rendered tile with no indices: ",i.lij," : ",a));const c=t.program;n||this._overlayRenderer.isEmpty||this._bindOverlayPatchData(c,a.overlay);const{rctx:d,bind:h}=e;s&&(t.useStencil=this._useStencilForTile(i),d.setPipelineState(t.getPipeline(h)));const u=a.geometry.indexCount;d.bindVAO(l),c.assertCompatibleVertexAttributeLocations(l),d.drawElements(r,u,o.indexType,0)}_bindOverlayPatchData(e,t){e.setUniform4fv("overlayTexOffset",t.offsets),e.setUniform4fv("overlayTexScale",t.scales)}_acquireTechnique(e){return this._configuration.output=e,this._techniques.get(L,this._configuration)}get test(){}hasHighlight(e){return this._overlayRenderer.hasHighlight(e)}};e([l({readOnly:!0})],J.prototype,"visibleTiles",null),e([l({readOnly:!0})],J.prototype,"_isGlobal",null),e([l()],J.prototype,"renderOccludedFlags",void 0),e([l({value:!1})],J.prototype,"renderingDisabled",null),e([l({value:!0})],J.prototype,"visible",null),e([l()],J.prototype,"renderPatchBorders",null),e([l()],J.prototype,"wireframe",null),J=e([o("esri.views.3d.terrain.TerrainRenderer")],J);const K=_(),X=_(),Y=_(),$=_();export{J as TerrainRenderer};
5
+ import{__decorate as e}from"tslib";import has from"../../../core/has.js";import{disposeMaybe as t}from"../../../core/maybe.js";import{MemCachePool as i}from"../../../core/MemCachePool.js";import r from"../../../core/ObjectPool.js";import{watch as s,sync as n}from"../../../core/reactiveUtils.js";import{property as a,subclass as l}from"../../../core/accessorSupport/decorators.js";import{e as o,h as c,g as d}from"../../../chunks/vec32.js";import{ZEROS as h,create as u,fromValues as _}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as g,ZEROS as f}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as p,set as m}from"../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as y}from"../../../geometry/support/buffer/BufferView.js";import{overlayRenderOccludedFlag as b}from"./OverlayRenderer.js";import{PatchRenderData as T}from"./PatchRenderData.js";import{TerrainAttributesCache as x}from"./TerrainAttributesCache.js";import{enableTerrainInternalChecks as R}from"./terrainUtils.js";import{TileRenderer as v}from"./TileRenderer.js";import{IteratorPreorder as P,sortTiles as O,compareTiles as w}from"./tileUtils.js";import{getOverlayContentForOutputTerrain as D}from"../webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{SyncRenderPlugin as S,ConsumesDepth as B,ConsumesNone as E}from"../webgl-engine/effects/RenderPlugin.js";import{Vertices as j}from"../webgl-engine/lib/Attribute.js";import{IntersectorResult as q}from"../webgl-engine/lib/IntersectorResult.js";import{intersectAabbInvDirBefore as C,MeshIntersectionOptions as F,intersectTriangles as A}from"../webgl-engine/lib/RayIntersections.js";import{TriangleIntersectionData as M}from"../webgl-engine/lib/TriangleIntersectionData.js";import{terrainId as G,getVerticalOffsetTerrain as k}from"../webgl-engine/lib/verticalOffsetUtils.js";import{DrawParameters as U}from"../webgl-engine/materials/DrawParameters.js";import{T as N}from"../../../chunks/Terrain.glsl.js";import{TerrainTechnique as I}from"../webgl-engine/shaders/TerrainTechnique.js";import{TerrainTechniqueConfiguration as L}from"../webgl-engine/shaders/TerrainTechniqueConfiguration.js";import{PrimitiveType as V}from"../../webgl/enums.js";const z=7,H=10,W=200,Q=p();let Z=class extends S{get visibleTiles(){return Array.from(this._visiblePatchesByOrigin.values()).flat()}get _isGlobal(){return 1===this._stage.viewingMode}get _techniques(){return this._context.techniques}get _rctx(){return this._context.renderContext.rctx}constructor(e,t,s,n,a){super({}),this._overlayRenderer=e,this._stage=t,this._allTiles=s,this._compressionTracker=n,this.type=7,this.isGround=!0,this._passParameters=new N,this._drawParameters=new U,this._renderDataPool=new r(()=>new T),this._visiblePatchesByOrigin=new Map,this._allPatchesByOrigin=new Map,this._patchesByOriginDirty=!0,this._patchSortingDirty=!0,this._tileIterator=new P,this._castShadows=!1,this._inViewshed=!1,this._cutFillEnabled=!1,this._tileRenderer=null,this._stencilEnabledLayerExtents=new Array,this._numTilesRendered=0,this._numTilesCulled=0,this._numOriginsRendered=0,this.renderOccludedFlags=1,this._oitGround=!!has("enable-feature:oit-ground"),this.produces=new Map([[1,()=>1===this._desiredSlot],[6,()=>6===this._desiredSlot],[7,()=>7===this._desiredSlot],[10,()=>this._produces()&&this.renderOccludedFlags===b]]),this._tileSize=256,this._configuration=new L(1===t.viewingMode),this._tileTextureCache=new i((e,t)=>a.newCache(e,t),"TileTexture"),this.tileGeometryCache=new x(a)}normalizeCtorArgs(){return{}}initialize(){this._stage.addRenderPlugin(this),this.addHandles(s(()=>this._overlayRenderer.renderOccludedFlags,e=>{this.renderOccludedFlags=e,this.setNeedsRender()},n))}destroy(){this._stage.removeRenderPlugin(this),this._tileTextureCache.destroy(),this.tileGeometryCache.destroy(),this._allTiles.prune(),this._tileRenderer=null}_produces(){return this.visible&&!!this._rootTiles&&!this.renderingDisabled}consumes(){return this._overlayRenderer.hasWater?B:E}set renderingDisabled(e){this._set("renderingDisabled",!!e),this.setDirty()}set visible(e){this._set("visible",!!e),this.setDirty()}updateHeading(e){this._tileRenderer?.updateHeading(e)}set transparency(e){this._configuration.transparencyMode!==e&&(this._configuration.transparencyMode=e,this.setNeedsRender())}get transparency(){return this._configuration.transparencyMode}get renderPatchBorders(){return this._configuration.tileBorders}set renderPatchBorders(e){this._configuration.tileBorders!==e&&(this._configuration.tileBorders=e,this.setNeedsRender(),this.notifyChange("renderPatchBorders"))}get layerViewUid(){return G}get slicePlaneEnabled(){return this._configuration.hasSlicePlane}set slicePlaneEnabled(e){this._configuration.hasSlicePlane!==e&&(this._configuration.hasSlicePlane=e,this.setNeedsRender())}set textureFadingEnabled(e){this._configuration.textureFadingEnabled!==e&&(this._configuration.textureFadingEnabled=e,this.setNeedsRender())}set pbrMode(e){this._configuration.pbrMode!==e&&(this._configuration.pbrMode=e,this.setNeedsRender())}setRootTiles(e){this._rootTiles=e,this.setDirty()}setStencilEnabledLayerExtents(e){this._stencilEnabledLayerExtents=e,this._setSortingDirty()}set tileSize(e){this._tileSize=e,null!=this._tileRenderer&&(this._tileRenderer.tileSize=e),this.setDirty()}get tileSize(){return this._tileSize}_ensureRenderData(e){e.renderData||(e.renderData=this._renderDataPool.acquire(),e.renderData.init(e,this._getLocalOriginOfTile(e)))}loadTile(e){this._ensureRenderData(e),this.updateTileGeometryState(e),this.reuseTextureFromParent(e)||this.updateTileTexture(e,32)}reuseTextureFromParent(e){const t=e.parent;if(!t)return!1;const i=g(1&e.lij[2]?.5:0,1&e.lij[1]?0:.5,.5,.5);return t.renderData?.reuseTexture(e.renderData,i)??!1}updateTileTexture(e,t){null!=this._tileRenderer&&(this._tileRenderer.updateTileTexture(e,32===t?0:2),this.setNeedsRender(),e.resetPendingUpdate(t))}updateTileGeometryState(e){for(const i of e.layerInfo[0])i.pendingUpdates&=-9;e.resetPendingUpdate(8);const t=e.renderData.updateGeometryState();return t&&this.setDirty(),t}updateGeometryIfNeeded(e){e.loaded&&e.renderData.updateGeometryIfNeeded(this._rctx)}unloadTile(e){const t=e.renderData;t&&(t.releaseGeometry(),this._renderDataPool.release(t),t.clear(),e.renderData=null,e.setMemoryDirty(),this.setDirty())}_getLocalOriginOfTile(e){const t=H-z,i=Math.max(0,Math.floor((e.level-t)/z)*z);if(this._isGlobal&&0===i)return h;for(;e.parent&&e.level>i;)e=e.parent;return e.centerAtSeaLevel}getStats(){return{numTilesRendered:this._numTilesRendered,numTilesCulled:this._numTilesCulled,numOriginsRendered:this._numOriginsRendered}}set wireframe(e){this._get("wireframe")!==e&&(this._set("wireframe",e),this.setNeedsRender())}setDirty(e=1){this._patchesByOriginDirty=!0,this._context.requestRender(e)}_setSortingDirty(e=1){this._patchSortingDirty=!0,this._context.requestRender(e)}setNeedsRender(e=1){this._context.requestRender(e)}initializeRenderContext(e){this._context=e,this._tileRenderer=new v(this._rctx,this._tileSize,this._techniques,this._tileTextureCache,this._compressionTracker),this.updateTileBackground()}uninitializeRenderContext(){this._tileRenderer=t(this._tileRenderer)}intersect(e,t,i,r){if(!this._rootTiles||e.options.selectOpaqueTerrainOnly&&e.options.selectionMode&&0!==this.transparency)return;const s=J,n=K;o(s,r,i),c(n,1/s[0],1/s[1],1/s[2]);const a=e.results.min,l=e.results.max,h=e.results.ground,u=0===e.options.store,_=!!e.results.ground.target,g=k(e.verticalOffset),f=e.tolerance;let p,b=u&&null!=a.distance?a.distance:1/0;const T=e.options,x=T.normalRequired||!T.backfacesTerrain,R=new F(f,!1,x),v=c=>{const _=c.renderData;if(!_?.vao)return;const v=_.geometry;m(Q,v.boundingBox);const P=_.localOrigin;null!=g&&(g.localOrigin=P,g.applyToAabb(Q));const O=Q;if(X[0]=i[0]-P[0],X[1]=i[1]-P[1],X[2]=i[2]-P[2],!C(O,X,n,f,b))return;const w=(e,t,i)=>{e.set(this.type,c,t,i),b=u&&null!=a.distance?a.distance:1/0},D=(n,o,c)=>{if((!x||null!=c)&&n>=0&&(T.backfacesTerrain||d(c,s)<0)&&(T.invisibleTerrain||!T.selectionMode||null==t||t(i,r,n))){if((null==h.distance||n<h.distance)&&w(h,n,c),T.isFiltered)return;2===T.store&&(null==p?(p=new q(e.ray),w(p,n,c),e.results.all.push(p)):n<p.distance&&w(p,n,c)),(null==a.distance||n<a.distance)&&w(a,n,c),0!==T.store&&(null==l.distance||n>l.distance)&&w(l,n,c)}},S=Y;o(S,r,P);const{indices:B,indexCount:E}=v,F=v.vertexAttributes,G=F.getField("position",y),k=new j(G.typedBuffer,3,F.stride/4),U=E/3;if(!g&&U>W){const e=c.renderData;e.intersectionData??=new M(B,U,k),e.intersectionData.intersectRay(X,S,R,D)}else A(X,S,0,U,B,k,g,R,D)},P=this._rootTiles;if(null!=P){(()=>{const t=this._tileIterator;t.reset(P);const r=e.options.invisibleTerrain;for(let e=t.next();e;e=t.next())!(e.visible||r&&e.intersectsClippingArea)||null==g&&!e.intersectsRay(i,s,f,b)||_&&this._useStencilForTile(e)?t.skipSubtree():v(e)})()}}processScaleRangeQueries(e,t){if(!t.done&&e)for(this._updatePatchGroups();e.updating&&!t.done;){e.prepare();for(const t of this._visiblePatchesByOrigin.values())for(const i of t)null!=i.renderData?.textureReference&&e.queriesForTile(i);e.process(),t.madeProgress()}}get _desiredSlot(){if(!this._produces())return null;switch(this.transparency){case 0:return 1;case 1:case 2:return this._oitGround?7:6;case 3:case 4:return null}}acquireTechniques(e){const{shadowMap:t,viewshedEnabled:i,cutFillEnabled:r,slot:s,oitPass:n,hasEmission:a}=e.bind,l=!!has("enable-feature:terrain-shadows")&&t.enabled;if(l!==this._castShadows&&(this._castShadows=l,this._patchesByOriginDirty=!0),this._inViewshed!==i&&(this._inViewshed=i,this._patchesByOriginDirty=!0),this._cutFillEnabled!==r&&(this._cutFillEnabled=r,this._patchesByOriginDirty=!0),3===this.transparency)return null;if(10===s){if(0===(e.renderOccludedMask&b))return null}else if(s!==this._desiredSlot)return null;const o=this._configuration;switch(o.screenSpaceReflections=o.cloudReflections=o.receiveShadows=o.receiveAmbientOcclusion=o.renderOccluded=o.hasHighlightMixTexture=o.hasEmission=!1,o.overlayMode=this._overlayRenderer.mode,o.oitPass=0,e.output){case 0:{const{ssr:i,clouds:r,ssao:l}=e.bind;o.screenSpaceReflections=null!=i.lastFrameColor,o.cloudReflections=null!=r.data;const c=10===s;return o.receiveShadows=t.ready&&!c,o.renderOccluded=c,o.receiveAmbientOcclusion=!c&&null!=l,o.oitPass=n,o.hasEmission=a,this._acquireTechnique(e.output)}case 3:case 5:return this._castShadows?this._acquireTechnique(3):null;case 6:return this._inViewshed?this._acquireTechnique(6):null;case 7:return this._cutFillEnabled?this._acquireTechnique(7):null;case 1:case 2:return this._acquireTechnique(e.output);case 9:return this._acquireTechnique(9);case 8:return o.hasHighlightMixTexture=null!=e.bind.highlightMixTexture,this._overlayRenderer.hasHighlights?this._acquireTechnique(8):null}return null}render(e,t){switch(this._updatePatchGroups(),t.useStencil=!1,this._passParameters.overlayContent=D(e.output,e.bind),e.output){case 0:return this._renderMaterialPass(e,t);case 1:case 2:case 9:return this._renderAuxiliaryPass(e,t,this._visiblePatchesByOrigin);case 8:{const i=e.bind.highlight?.name;i&&this._overlayRenderer.hasHighlights&&this._overlayRenderer.renders(2)&&this._overlayRenderer.hasHighlight(i)&&this._renderAuxiliaryPass(e,t,this._visiblePatchesByOrigin);break}case 3:case 5:case 6:case 7:return this._renderAuxiliaryPass(e,t,this._allPatchesByOrigin)}}updateTileBackground(e){if(null==this._tileRenderer)return;const t=this._tileRenderer;let i;if(null!=e){const t=e.toUnitRGBA();i=_(t[0]||0,t[1]||0,t[2]||0)}t.setBackground(i),this._allTiles.forAll(e=>t.updateTileTexture(e,0)),this._configuration.tileBlendInput=t.backgroundIsGrid?2:null!=t.backgroundColor?1:0,this.setNeedsRender()}_updatePatchGroups(){if(this._patchesByOriginDirty&&(this._rebuildPatchGroups(),this._patchesByOriginDirty=!1,this._patchSortingDirty=!0),this._patchSortingDirty){const e=Array.from(this._visiblePatchesByOrigin.values()),t=this._stencilEnabledLayerExtents;for(const i of e)O(i,t);e.sort((e,t)=>w(e[0],t[0])),this._visiblePatchesByOrigin=new Map(e.map(e=>[e[0].renderData.localOrigin,e])),this.notifyChange("visibleTiles"),this._patchSortingDirty=!1}}_rebuildPatchGroups(){const e=this._rootTiles;if(null!=e){e[0]?.surface.checkAllTilesWaterproofness(),this._visiblePatchesByOrigin.clear(),this._allPatchesByOrigin.clear();for(const t of e)this._rebuildPatchGroupsForRootTile(t)}}_rebuildPatchGroupsForRootTile(e){const t=this._tileIterator;for(t.resetOne(e);!t.done;){const e=t.next(),i=e.renderData;if(!i){this._numTilesCulled++;continue}const r=i.localOrigin;if(this._castShadows||this._inViewshed||this._cutFillEnabled){let t=this._allPatchesByOrigin.get(r);t||(t=[],this._allPatchesByOrigin.set(r,t)),t.push(e)}if(!e.visible){this._numTilesCulled++,t.skipSubtree();continue}let s=this._visiblePatchesByOrigin.get(r);s||(s=[],this._visiblePatchesByOrigin.set(r,s)),s.push(e),t.skipSubtree()}}_useStencilForTile(e){for(const t of this._stencilEnabledLayerExtents)if(e.intersectsExtent(t))return!0;return!1}_renderAuxiliaryPass(e,t,i){const{rctx:r,bind:s}=e;r.bindTechnique(t,s,this._passParameters);const n=this._stencilEnabledLayerExtents.length>0;i.forEach(i=>{this._drawParameters.origin=i[0].renderData.localOrigin,t.program.bindDraw(s,this._passParameters,this._drawParameters);for(let r=0;r<i.length;r++)this._renderPatch(e,t,i[r],V.TRIANGLES,n,null===this._passParameters.overlayContent)}),r.bindVAO(null)}_renderMaterialPass(e,t){const{rctx:i,bind:r}=e,s=i.bindTechnique(t,r,this._passParameters);this._numTilesRendered=0,this._numTilesCulled=0,this._numOriginsRendered=0;const n=10===r.slot;n&&(s.bindTexture("tex",i.emptyTexture),s.setUniform3fv("textureOpacities",h),s.setUniform4fv("texOffsetAndScale",f));const a=null!=this._tileRenderer?.backgroundColor?this._tileRenderer.backgroundColor:h;1===this._configuration.tileBlendInput&&s.setUniform3fv("backgroundColor",a);const l=this._stencilEnabledLayerExtents.length>0,o=this.wireframe?V.LINES:V.TRIANGLES;this._configuration.textureFadingEnabled&&s.bindTexture("texNext",i.emptyTexture);const c=this._visiblePatchesByOrigin;for(const d of c.values()){const i=d[0].renderData.localOrigin;this._drawParameters.origin=i,t.program.bindDraw(r,this._passParameters,this._drawParameters),this._numOriginsRendered++;for(const r of d){const i=r.renderData,a=i.textureReference;if(null!=a){if(!n){s.setUniform4fv("texOffsetAndScale",a.offsetAndScale),s.bindTexture("tex",a.texture.texture);const e=i.textureFadeFactor,t=e<1?i.nextTextureReference:null;this._configuration.textureFadingEnabled&&t&&e<1?(s.setUniform1f("fadeFactor",e),s.setUniform4fv("nextTexOffsetAndScale",t.offsetAndScale),s.setUniform3fv("nextTexOpacities",t.opacities),s.bindTexture("texNext",t.texture.texture)):s.setUniform1f("fadeFactor",1),i.textureIsFading&&this.setNeedsRender(2),s.setUniform3fv("textureOpacities",a.opacities)}this._renderPatch(e,t,r,o,l),r.renderOrder=this._numTilesRendered,this._numTilesRendered++}}}i.bindVAO(null)}_renderPatch(e,t,i,r,s,n=!1){const a=i.renderData,l=a.vao,o=l?.indexBuffer;if(!l||null==o)return void(R&&console.error("Rendered tile with no indices: ",i.lij," : ",a));const c=t.program;n||this._overlayRenderer.isEmpty||this._bindOverlayPatchData(c,a.overlay);const{rctx:d,bind:h}=e;s&&(t.useStencil=this._useStencilForTile(i),d.setPipelineState(t.getPipeline(h)));const u=a.geometry.indexCount;d.bindVAO(l),c.assertCompatibleVertexAttributeLocations(l),d.drawElements(r,u,o.indexType,0)}_bindOverlayPatchData(e,t){e.setUniform4fv("overlayTexOffset",t.offsets),e.setUniform4fv("overlayTexScale",t.scales)}_acquireTechnique(e){return this._configuration.output=e,this._techniques.get(I,this._configuration)}get test(){}hasHighlight(e){return this._overlayRenderer.hasHighlight(e)}};e([a({readOnly:!0})],Z.prototype,"visibleTiles",null),e([a({readOnly:!0})],Z.prototype,"_isGlobal",null),e([a()],Z.prototype,"renderOccludedFlags",void 0),e([a({value:!1})],Z.prototype,"renderingDisabled",null),e([a({value:!0})],Z.prototype,"visible",null),e([a()],Z.prototype,"renderPatchBorders",null),e([a()],Z.prototype,"wireframe",null),Z=e([l("esri.views.3d.terrain.TerrainRenderer")],Z);const J=u(),K=u(),X=u(),Y=u();export{Z as TerrainRenderer};
@@ -2,7 +2,6 @@ import type { RenderNodeInput } from "../webgl.js";
2
2
  import type { ManagedColorAttachment } from "./ManagedColorAttachment.js";
3
3
  import type { ManagedDepthAttachment } from "./ManagedDepthAttachment.js";
4
4
  import type { ManagedFBOResource } from "./ManagedFBOResource.js";
5
- import type { ColorAttachment, DepthStencilAttachment } from "../../webgl/enums.js";
6
5
  import type { Texture } from "../../webgl/Texture.js";
7
6
 
8
7
  /**
@@ -40,7 +39,7 @@ export default abstract class ManagedFBO extends ManagedFBOResource {
40
39
  *
41
40
  * @param attachment - the WebGL color attachment point for the texture
42
41
  */
43
- acquireColor(attachment: ColorAttachment): ManagedFBO;
42
+ acquireColor(attachment: number): ManagedFBO;
44
43
  /**
45
44
  * Acquire and attach a new depth buffer to this framebuffer.
46
45
  * The attached texture has a gl.PixelFormat.DEPTH_STENCIL pixel format.
@@ -55,7 +54,7 @@ export default abstract class ManagedFBO extends ManagedFBOResource {
55
54
  * @param color - the color texture to attach.
56
55
  * @param attachment - the gl.ColorFormat attachment point.
57
56
  */
58
- attachColor(color: ManagedColorAttachment, attachment: ColorAttachment): ManagedFBO;
57
+ attachColor(color: ManagedColorAttachment, attachment: number): ManagedFBO;
59
58
  /**
60
59
  * Attach a depth buffer texture to this framebuffer. This function will automatically
61
60
  * bind the framebuffer of this ManagedFBO if necessary.
@@ -71,13 +70,13 @@ export default abstract class ManagedFBO extends ManagedFBOResource {
71
70
  *
72
71
  * @param attachment - the WebGL color attachment point.
73
72
  */
74
- getAttachment(attachment?: ColorAttachment | DepthStencilAttachment): ManagedColorAttachment | ManagedDepthAttachment | null | undefined;
73
+ getAttachment(attachment?: number): ManagedColorAttachment | ManagedDepthAttachment | null | undefined;
75
74
  /**
76
75
  * Return the texture for a given color or depth attachment.
77
76
  *
78
77
  * @param attachment - a WebGL color or depth attachment point.
79
78
  */
80
- getTexture(attachment?: ColorAttachment | DepthStencilAttachment): Texture | null | undefined;
79
+ getTexture(attachment?: number): Texture | null | undefined;
81
80
  /** Detach the attached depth buffer texture and return ownership to the caller. */
82
81
  obtainDepthTexture(): any | null | undefined;
83
82
  /**
@@ -3,7 +3,7 @@ import type SceneView from "../../SceneView.js";
3
3
  import type ManagedFBO from "./ManagedFBO.js";
4
4
  import type RenderCamera from "./RenderCamera.js";
5
5
  import type { ConsumedNodes, RenderNodeOutput } from "../webgl.js";
6
- import type { SunLight } from "../webgl-engine/lighting/SceneLighting.js";
6
+ import type { SunLight } from "./types.js";
7
7
 
8
8
  export interface RenderNodeProperties extends Partial<Pick<RenderNode, "produces">> {
9
9
  /**
@@ -1,5 +1,6 @@
1
1
 
2
- export interface ReadonlyLightSpec {
2
+ /** Tuple of an RGB color value and an intensity value. */
3
+ export interface ColorAndIntensity {
3
4
  /** RGB color with values between 0 and 1. */
4
5
  color: [
5
6
  number,
@@ -16,7 +17,7 @@ export interface ReadonlyLightSpec {
16
17
  * Lambertian (`diffuse`) and a constant (`ambient`) term, which should be treated in the sense of the
17
18
  * [Phong Reflection Model](https://en.wikipedia.org/wiki/Phong_reflection_model).
18
19
  */
19
- export abstract class SunLight {
20
+ export interface SunLight {
20
21
  /** The ambient light color and intensity. */
21
22
  ambient: ColorAndIntensity;
22
23
  /** The diffuse light color and intensity. */
@@ -27,7 +28,4 @@ export abstract class SunLight {
27
28
  number,
28
29
  number
29
30
  ];
30
- }
31
-
32
- /** Tuple of an RGB color value and an intensity value. */
33
- export type ColorAndIntensity = ReadonlyLightSpec;
31
+ }
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../../core/has.js";import e from"../../../../../core/Logger.js";import t from"../../../../../core/PooledArray.js";import{isTypedArray as i}from"../../../../../core/typedArrayUtil.js";import{clone as n}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as o}from"../../../../../geometry/support/aaBoundingBox.js";import{compactIndices as r}from"../../../../../geometry/support/Indices.js";import{c as s}from"../../../../../chunks/vec3.js";import{c as a}from"../../../../../chunks/vec33.js";import{glLayout as c}from"../../../support/buffer/glUtil.js";import{ComponentData as l}from"./ComponentData.js";import{ComponentObject as m}from"./ComponentObject.js";import{IntersectionGeometry as h}from"./IntersectionGeometry.js";import{Renderable as f}from"./Renderable.js";import{RenderGeometry as p}from"./RenderGeometry.js";import{RenderSubmitSystem as g}from"./RenderSubmitSystem.js";import{createVertexBufferLayout as d}from"./SourceGeometry.js";import{ComponentMaterial as u}from"./Material/ComponentMaterial.js";import{VertexArrayObject as b}from"../../lib/VertexArrayObject.js";import{getVerticalOffsetI3S as v}from"../../lib/verticalOffsetUtils.js";import{BufferManager as y}from"../../lib/TextureBackedBuffer/BufferManager.js";import{getComponentDataLayout as _,indexGlLayout as M}from"../../materials/DefaultLayouts.js";import{BufferObject as C}from"../../../../webgl/BufferObject.js";import{PrimitiveType as j}from"../../../../webgl/enums.js";import{VertexBuffer as w}from"../../../../webgl/VertexBuffer.js";const O=()=>e.getLogger("esri.views.3d.webgl-engine.collections.Component.ComponentObjectCollection");class D{constructor(e,i,n){this._renderManager=e,this._viewingMode=i,this._sphericalSpatialReference=n,this._elevationRangeCacheVerticalOffset=NaN,this._elevationRangeCacheMin=NaN,this._elevationRangeCacheMax=NaN,this._activeHighlightOptions=new Map,this._visible=new t,this._hidden=new t,this._renderSubmit=new g(this),this._renderManager.register(this._renderSubmit),this._componentBufferManager=new y(e.rctx,_())}destroy(){this._componentBufferManager.destroy(),this._componentBufferManager=null,this._visible.forAll(e=>e.destroy()),this._visible.prune(),this._hidden.forAll(e=>e.destroy()),this._hidden.prune(),this._renderSubmit.destroy()}createObject(e){const{geometry:t}=e,i=new l(this._componentBufferManager,r(t.componentOffsets)),n=this._createRenderable(e,i),o=new h(this._viewingMode,t.positionData,i,e.elevationAlignable),s=new m(e.transform,e.obb.clone(),i,n,o);return(s.visible?this._visible:this._hidden).push(s),s}destroyObject(e){const t=e;(t.visible?this._visible:this._hidden).removeUnordered(t),t.destroy(),this._notifyDirty()}setObjectVisibility(e,t){const i=e;t!==i.visible&&(t?(this._hidden.removeUnordered(i),this._visible.push(i)):(this._visible.removeUnordered(i),this._hidden.push(i)),i.visible=t,this._notifyDirty())}preSubmit(e){const{camera:t}=e;this._componentBufferManager.updateTextures(),this.visibleObjects.forAll(e=>e.updateCameraDerivedParameters(t))}getMaterial(e){return e.renderable.material}updateMaterial(e,t){const i=e;i.updateMaterial(t),i.renderable.material.dirty&&this._notifyDirty()}setAllComponentVisibilities(e,t){const i=e;i.componentData.visibility.reset(t),i.componentData.markVisibilityDirty(),this._notifyDirty()}forEachVisibleComponent(e,t){return e.componentData.visibility.forEachComponent(t)}getComponentCount(e){const t=e,{componentData:i}=t,n=i.visibility.componentCount;return{visible:n,invisible:i.count-n}}setComponentData(e,t){e.setComponentData(t,this._viewingMode),this._elevationRangeCacheVerticalOffset=NaN,this._notifyDirty()}getComponentAabb(e,t,i,n=!1){e.intersectionGeometry.getComponentAabb(t,i);const o=e,r=o.componentData.verticalOffsets;if(n||null==r)return i;const s=r[t];if(2===this._viewingMode||0===s)return i[2]+=s,i[5]+=s,i;const a=v(s);return a.localOrigin=o.transform.position,a.applyToAabb(i)}getComponentObb(e){return e.obb}getObjectTransform(e){return e.transform}getComponentPositions(e,t,i){return e.intersectionGeometry.getComponentPositions(t,i)}expandRangeWithComponentObjectElevationRange(e,t,i,n){Number.isNaN(this._elevationRangeCacheVerticalOffset)||this._elevationRangeCacheVerticalOffset!==t||n.expandElevationRangeValues(this._elevationRangeCacheMin,this._elevationRangeCacheMax);const o=e,{componentData:r}=o,s=r.count,{verticalOffsets:a}=r,{intersectionGeometry:c}=o,l=2===this._viewingMode,m=c.getComponentAabbs(),h=R;let f=1/0,p=-1/0;for(let g=0;g<s;g++){const e=6*g,r=a?.[g]??0;let s=1/0,c=-1/0;if(l)s=m[e+2]+r+t,c=m[e+5]+r+t;else{if(h[0]=m[e],h[1]=m[e+1],h[2]=m[e+2],h[3]=m[e+3],h[4]=m[e+4],h[5]=m[e+5],0!==r){const e=v(r);e.localOrigin=o.transform.position,e.applyToAabb(h)}const s=Math.max(Math.abs(h[3]),Math.abs(h[0])),a=Math.max(Math.abs(h[4]),Math.abs(h[1])),c=t+h[5]+i;n.expandElevationRangeValues(t+h[2],Math.sqrt(s*s+a*a+c*c)-i)}n.expandElevationRangeValues(s,c),f=Math.min(f,s),p=Math.max(p,c)}this._elevationRangeCacheVerticalOffset=t,this._elevationRangeCacheMin=f,this._elevationRangeCacheMax=p}intersect(e,t,i,n,o,r){const s=e,{transform:a,componentData:c,intersectionGeometry:l}=s;return null!=n&&(n.localOrigin=a.position),l.intersect(t,i,n,c.verticalOffsets,a,o,r)}addEdges(e,t,i,n,o){const r=e,{indices:s,positions:a}=r.intersectionGeometry,c=r.componentData.offsets;return t.addComponentObject(r,a,s,c,i,n,o)}async extractEdgeInformation(e,t,i){const o=e,r=o.componentData.visibility;if(r.allInvisible()){const{extractComponentsEdgeLocationsLayout:e}=await import("../../lib/edgeRendering/edgeProcessing.js");return{buffer:e.createBuffer(0),origin:[0,0,0]}}const{indices:c,positions:l}=o.intersectionGeometry,m=o.componentData.offsets,{EdgeInputBufferLayout:h}=await import("../../lib/edgeRendering/bufferLayouts.js"),f=h.createBuffer(l.length/3);a(f.position.typedBuffer,l,f.position.typedBufferStride,3),s(f.position,f.position,o.transform.rotationScale),this._setComponentIndices(f.componentIndex,c,m);const p=f.count,g=this._computeVisibilityIndices(c,r,m,p);return{origin:n(o.transform.position),buffer:await t.extractComponentsEdgeLocations({indices:g,indicesLength:g.length,skipDeduplicate:!0,data:f,writerSettings:{reducedPrecision:!1,variants:0}},i)}}_setComponentIndices(e,t,i){let n=0;for(let o=0;o<i.length-1;o++){const r=i[o],s=i[o+1];for(let i=r;i<s;i++){const o=t?t[i]:i;e.set(o,n)}n++}}_computeVisibilityIndices(e,t,n,o){if(e&&t.allVisible())return e;let r=0;t.forEachComponentRange((e,t)=>(r+=n[t]-n[e],!0));const s=i(e)?2===e?.BYTES_PER_ELEMENT||o<=65536?new Uint16Array(r):new Uint32Array(r):new Array(r);let a=0;return t.forEachComponentRange((t,i)=>{const o=n[t],r=n[i];for(let n=o;n<r;n++)s[a++]=e?e[n]:n;return!0}),s}addComponentHighlight(e,t,i){const n=e;{const e=this._activeHighlightOptions.get(i)??0;this._activeHighlightOptions.set(i,e+1)}n.addComponentHighlight(t,i)&&this._notifyDirty()}removeComponentHighlight(e,t,i){const n=e.removeComponentHighlight(t,i);"notfound"!==n&&(this._removeActiveHighlight(i),n&&this._notifyDirty())}_removeActiveHighlight(e,t=1){const i=this._activeHighlightOptions.get(e);if(void 0===i)O().warn(`Removing non-existing highlight "${e}".`);else{const n=i-t;n<0&&O().warn(`Removing non-existing highlight "${e}".`),n<=0?this._activeHighlightOptions.delete(e):this._activeHighlightOptions.set(e,n)}}clearHighlights(e){const t=e,{componentData:i}=t,{componentHighlights:n}=t.componentData;if(n.size>0){for(const e of n)this._removeActiveHighlight(e[0],e[1][i.count]);t.clearHighlights(),this._notifyDirty()}}hasHighlight(e){return this._activeHighlightOptions.has(e)}getObjectGPUMemoryUsage(e){return e.renderable.meta.gpuMemoryEstimate}get visibleObjects(){return this._visible}_createRenderable(e,t){const i=this._renderManager.rctx,n=e.geometry,o=n.vertices.layoutParameters,r=c(d(o)),s=new w(i,r,n.vertices.data),a=n.indices?C.createIndex(i,35044,n.indices):null,l=new Uint16Array(n.vertices.count);for(let c=0;c<t.count;c++){const e=t.offsets[c],i=t.offsets[c+1],o=t.materialDataIndices[c];if(null!=n.indices)for(let t=e;t<i;t++){l[n.indices[t]]=o}else for(let t=e;t<i;t++)l[t]=o}const m=new w(i,M,l.buffer),h=new u(e.transform,e.toMapSpace,e.obb.radius<x,this._sphericalSpatialReference),g=new b(i,new Map([["geometry",s],["componentIndices",m]]),a),v=new p(g,j.TRIANGLES,o,null!=a),y={cameraDepthSquared:.5,gpuMemoryEstimate:s.usedMemory+m.usedMemory+(null!=a?a.usedMemory:0)};return new f(h,v,y)}_notifyDirty(){this._renderManager.notifyDirty()}}const R=o(),x=5e4;export{D as ComponentObjectCollection};
5
+ import"../../../../../core/has.js";import e from"../../../../../core/Logger.js";import t from"../../../../../core/PooledArray.js";import{isTypedArray as i}from"../../../../../core/typedArrayUtil.js";import{clone as n}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as o}from"../../../../../geometry/support/aaBoundingBox.js";import{compactIndices as r}from"../../../../../geometry/support/Indices.js";import{c as s}from"../../../../../chunks/vec3.js";import{c as a}from"../../../../../chunks/vec33.js";import{ComponentData as c}from"./ComponentData.js";import{ComponentObject as l}from"./ComponentObject.js";import{IntersectionGeometry as m}from"./IntersectionGeometry.js";import{Renderable as h}from"./Renderable.js";import{RenderGeometry as p}from"./RenderGeometry.js";import{RenderSubmitSystem as f}from"./RenderSubmitSystem.js";import{ComponentMaterial as g}from"./Material/ComponentMaterial.js";import{VertexArrayObject as d}from"../../lib/VertexArrayObject.js";import{getVerticalOffsetI3S as u}from"../../lib/verticalOffsetUtils.js";import{BufferManager as b}from"../../lib/TextureBackedBuffer/BufferManager.js";import{getComponentDataLayout as v,IndexGlLayout as y}from"../../materials/DefaultLayouts.js";import{BufferObject as _}from"../../../../webgl/BufferObject.js";import{PrimitiveType as M}from"../../../../webgl/enums.js";import{VertexBuffer as C}from"../../../../webgl/VertexBuffer.js";const j=()=>e.getLogger("esri.views.3d.webgl-engine.collections.Component.ComponentObjectCollection");class w{constructor(e,i,n){this._renderManager=e,this._viewingMode=i,this._sphericalSpatialReference=n,this._elevationRangeCacheVerticalOffset=NaN,this._elevationRangeCacheMin=NaN,this._elevationRangeCacheMax=NaN,this._activeHighlightOptions=new Map,this._visible=new t,this._hidden=new t,this._renderSubmit=new f(this),this._renderManager.register(this._renderSubmit),this._componentBufferManager=new b(e.rctx,v())}destroy(){this._componentBufferManager.destroy(),this._componentBufferManager=null,this._visible.forAll(e=>e.destroy()),this._visible.prune(),this._hidden.forAll(e=>e.destroy()),this._hidden.prune(),this._renderSubmit.destroy()}createObject(e){const{geometry:t}=e,i=new c(this._componentBufferManager,r(t.componentOffsets)),n=this._createRenderable(e,i),o=new m(this._viewingMode,t.positions,i,e.elevationAlignable),s=new l(e.transform,e.obb.clone(),i,n,o);return(s.visible?this._visible:this._hidden).push(s),s}destroyObject(e){const t=e;(t.visible?this._visible:this._hidden).removeUnordered(t),t.destroy(),this._notifyDirty()}setObjectVisibility(e,t){const i=e;t!==i.visible&&(t?(this._hidden.removeUnordered(i),this._visible.push(i)):(this._visible.removeUnordered(i),this._hidden.push(i)),i.visible=t,this._notifyDirty())}preSubmit(e){const{camera:t}=e;this._componentBufferManager.updateTextures(),this.visibleObjects.forAll(e=>e.updateCameraDerivedParameters(t))}getMaterial(e){return e.renderable.material}updateMaterial(e,t){const i=e;i.updateMaterial(t),i.renderable.material.dirty&&this._notifyDirty()}setAllComponentVisibilities(e,t){const i=e;i.componentData.visibility.reset(t),i.componentData.markVisibilityDirty(),this._notifyDirty()}forEachVisibleComponent(e,t){return e.componentData.visibility.forEachComponent(t)}getComponentCount(e){const t=e,{componentData:i}=t,n=i.visibility.componentCount;return{visible:n,invisible:i.count-n}}setComponentData(e,t){e.setComponentData(t,this._viewingMode),this._elevationRangeCacheVerticalOffset=NaN,this._notifyDirty()}getComponentAabb(e,t,i,n=!1){e.intersectionGeometry.getComponentAabb(t,i);const o=e,r=o.componentData.verticalOffsets;if(n||null==r)return i;const s=r[t];if(2===this._viewingMode||0===s)return i[2]+=s,i[5]+=s,i;const a=u(s);return a.localOrigin=o.transform.position,a.applyToAabb(i)}getComponentObb(e){return e.obb}getObjectTransform(e){return e.transform}getComponentPositions(e,t,i){return e.intersectionGeometry.getComponentPositions(t,i)}expandRangeWithComponentObjectElevationRange(e,t,i,n){Number.isNaN(this._elevationRangeCacheVerticalOffset)||this._elevationRangeCacheVerticalOffset!==t||n.expandElevationRangeValues(this._elevationRangeCacheMin,this._elevationRangeCacheMax);const o=e,{componentData:r}=o,s=r.count,{verticalOffsets:a}=r,{intersectionGeometry:c}=o,l=2===this._viewingMode,m=c.getComponentAabbs(),h=O;let p=1/0,f=-1/0;for(let g=0;g<s;g++){const e=6*g,r=a?.[g]??0;let s=1/0,c=-1/0;if(l)s=m[e+2]+r+t,c=m[e+5]+r+t;else{if(h[0]=m[e],h[1]=m[e+1],h[2]=m[e+2],h[3]=m[e+3],h[4]=m[e+4],h[5]=m[e+5],0!==r){const e=u(r);e.localOrigin=o.transform.position,e.applyToAabb(h)}const s=Math.max(Math.abs(h[3]),Math.abs(h[0])),a=Math.max(Math.abs(h[4]),Math.abs(h[1])),c=t+h[5]+i;n.expandElevationRangeValues(t+h[2],Math.sqrt(s*s+a*a+c*c)-i)}n.expandElevationRangeValues(s,c),p=Math.min(p,s),f=Math.max(f,c)}this._elevationRangeCacheVerticalOffset=t,this._elevationRangeCacheMin=p,this._elevationRangeCacheMax=f}intersect(e,t,i,n,o,r){const s=e,{transform:a,componentData:c,intersectionGeometry:l}=s;return null!=n&&(n.localOrigin=a.position),l.intersect(t,i,n,c.verticalOffsets,a,o,r)}addEdges(e,t,i,n,o){const r=e,{indices:s,positions:a}=r.intersectionGeometry,c=r.componentData.offsets;return t.addComponentObject(r,a,s,c,i,n,o)}async extractEdgeInformation(e,t,i){const o=e,r=o.componentData.visibility;if(r.allInvisible()){const{extractComponentsEdgeLocationsLayout:e}=await import("../../lib/edgeRendering/edgeProcessing.js");return{buffer:e.createBuffer(0),origin:[0,0,0]}}const{indices:c,positions:l}=o.intersectionGeometry,m=o.componentData.offsets,{EdgeInputBufferLayout:h}=await import("../../lib/edgeRendering/bufferLayouts.js"),p=h.createBuffer(l.length/3);a(p.position.typedBuffer,l,p.position.typedBufferStride,3),s(p.position,p.position,o.transform.rotationScale),this._setComponentIndices(p.componentIndex,c,m);const f=p.count,g=this._computeVisibilityIndices(c,r,m,f);return{origin:n(o.transform.position),buffer:await t.extractComponentsEdgeLocations({indices:g,indicesLength:g.length,skipDeduplicate:!0,data:p,writerSettings:{reducedPrecision:!1,variants:0}},i)}}_setComponentIndices(e,t,i){let n=0;for(let o=0;o<i.length-1;o++){const r=i[o],s=i[o+1];for(let i=r;i<s;i++){const o=t?t[i]:i;e.set(o,n)}n++}}_computeVisibilityIndices(e,t,n,o){if(e&&t.allVisible())return e;let r=0;t.forEachComponentRange((e,t)=>(r+=n[t]-n[e],!0));const s=i(e)?2===e?.BYTES_PER_ELEMENT||o<=65536?new Uint16Array(r):new Uint32Array(r):new Array(r);let a=0;return t.forEachComponentRange((t,i)=>{const o=n[t],r=n[i];for(let n=o;n<r;n++)s[a++]=e?e[n]:n;return!0}),s}addComponentHighlight(e,t,i){const n=e;{const e=this._activeHighlightOptions.get(i)??0;this._activeHighlightOptions.set(i,e+1)}n.addComponentHighlight(t,i)&&this._notifyDirty()}removeComponentHighlight(e,t,i){const n=e.removeComponentHighlight(t,i);"notfound"!==n&&(this._removeActiveHighlight(i),n&&this._notifyDirty())}_removeActiveHighlight(e,t=1){const i=this._activeHighlightOptions.get(e);if(void 0===i)j().warn(`Removing non-existing highlight "${e}".`);else{const n=i-t;n<0&&j().warn(`Removing non-existing highlight "${e}".`),n<=0?this._activeHighlightOptions.delete(e):this._activeHighlightOptions.set(e,n)}}clearHighlights(e){const t=e,{componentData:i}=t,{componentHighlights:n}=t.componentData;if(n.size>0){for(const e of n)this._removeActiveHighlight(e[0],e[1][i.count]);t.clearHighlights(),this._notifyDirty()}}hasHighlight(e){return this._activeHighlightOptions.has(e)}getObjectGPUMemoryUsage(e){return e.renderable.meta.gpuMemoryEstimate}get visibleObjects(){return this._visible}_createRenderable(e,t){const i=this._renderManager.rctx,n=e.geometry,o=n.parameters.layout,r=new C(i,o,n.vertices.data),s=n.indices?_.createIndex(i,35044,n.indices):null,a=new Uint16Array(n.vertices.count);for(let h=0;h<t.count;h++){const e=t.offsets[h],i=t.offsets[h+1],o=t.materialDataIndices[h];if(null!=n.indices)for(let t=e;t<i;t++){a[n.indices[t]]=o}else for(let t=e;t<i;t++)a[t]=o}const c=new C(i,y,a.buffer),l=new g(e.transform,e.toMapSpace,e.obb.radius<D,this._sphericalSpatialReference),m=new d(i,new Map([["geometry",r],["componentIndices",c]]),s),f=new p(m,M.TRIANGLES,n.parameters,null!=s),u={cameraDepthSquared:.5,gpuMemoryEstimate:r.usedMemory+c.usedMemory+(null!=s?s.usedMemory:0)};return new h(l,f,u)}_notifyDirty(){this._renderManager.notifyDirty()}}const O=o(),D=5e4;export{w as ComponentObjectCollection};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{invert as t,transpose as r}from"../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{clone as s}from"../../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{m as o,I as i}from"../../../../../../chunks/vec32.js";import{freeze as a,ZEROS as n}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{v as l}from"../../../../../../chunks/vec42.js";import{freeze as u,fromValues as h}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ComponentTechnique as p}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as c}from"./ComponentTechniqueConfiguration.js";import{parameter as d,parameterBlock as m,MaterialBase as v,MaterialParameterBlock as g}from"../../../core/material/MaterialBase.js";import{isColor as x}from"../../../core/shaderLibrary/ShaderOutput.js";import{TwoVectorPosition as f}from"../../../core/util/TwoVectorPosition.js";import{advancedMRRFactors as y}from"../../../materials/pbrUtils.js";import{defaultHighlightName as M}from"../../../../../support/HighlightDefaults.js";import{alphaCutoff as T}from"../../../../../../webscene/support/AlphaCutoff.js";class b extends v{constructor(e,o,i,n){super(),this.toMapSpace=o,this.useENUForGlobalOverlayUV=i,this.baseColor=u(1,1,1,1),this.usePBR=!1,this.hasParametersFromSource=!1,this.sphereDepthInterpolate=!1,this.mrrFactors=y,this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.normalTexture=null,this.occlusionTexture=null,this.emissionTexture=null,this.emissiveBaseColor=a(0,0,0),this.emissiveStrength=0,this.commonMaterialParameters=new S,this.componentParameters=new C,this.textureBackedBuffer=null,this.objectOpacity=1,this.textureAlphaCutoff=T,this.alphaDiscardMode=1,this.isIntegratedMesh=!1,this.polygonOffsetEnabled=!1,this.ellipsoidMode=1,this.hasOccludees=!1;const l=s(e.rotationScale);t(l,l),r(l,l),this.transformNormalGlobalFromModel=l;const h=new f(e.position);this.transformWorldFromModelTL=h.low,this.transformWorldFromModelTH=h.high,this.transformWorldFromModelRS=e.rotationScale,this._configuration=new c(n),this._updateMaterialConfiguration()}dispose(){this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null}get _hasEmissiveBase(){return null!=this.emissionTexture||!o(this.emissiveBaseColor,n)}get _hasEmissiveStrength(){return 2!==this.componentParameters.emissiveOverride}get hasEmissions(){return this._hasEmissiveStrength&&(this._hasEmissiveBase||2!==this.componentParameters.emissiveSourceOverride)}get texture(){return this.baseColorTexture?.texture}get textureMetallicRoughness(){return this.metallicRoughnessTexture?.texture}get textureEmissive(){return this.emissionTexture?.texture}get textureOcclusion(){return this.occlusionTexture?.texture}get textureNormal(){return this.normalTexture?.texture}update(e){e(this)}acquireTechnique(e,t,r,s){const o=this._updateConfiguration(t,r,s);return e.get(p,o)}_updateConfiguration(e,t,r){return this._updateMaterialConfiguration(),this._updateDrawConfiguration(e,t,r)}_updateMaterialConfiguration(){if(!this.dirty)return;const e=this._configuration;e.hasMetallicRoughnessTexture=null!=this.metallicRoughnessTexture,e.hasOcclusionTexture=null!=this.occlusionTexture,e.hasNormalTexture=null!=this.normalTexture,e.sphereDepthInterpolate=this.sphereDepthInterpolate&&e.spherical,e.ellipsoidMode=this.ellipsoidMode,e.componentData=this.componentParameters.type,e.cullFace=this.commonMaterialParameters.cullFace,e.doubleSidedMode=this.commonMaterialParameters.doubleSided?1:0,e.hasColorTexture=null!=this.baseColorTexture,e.alphaDiscardMode=this.alphaDiscardMode,e.hasPolygonOffset=this.polygonOffsetEnabled,this._setClean()}_updateDrawConfiguration(e,t,r){const s=this._configuration,o=e.identifier,i=0===o;s.hasEmission=t.hasEmission&&i,s.renderOccluded=10===t.slot,s.hasVertexColors=r.hasVertexColors,s.hasNormals=r.hasNormals,s.textureCoordinateType=r.textureCoordinateType,s.oitPass=i?t.oitPass:0,s.terrainDepthTest=i&&t.terrainDepthTest,s.cullAboveTerrain=!!i&&t.cullAboveTerrain,s.integratedMeshMode=this.isIntegratedMesh?D(t)?w(t)?3:2:1:0,s.pbrMode=3===s.integratedMeshMode?4:this.usePBR?this.hasParametersFromSource?r.shadeNormals&&this.isIntegratedMesh?0:2:1:0;const a=1===this.componentParameters.emissiveSourceOverride,n=2===this.componentParameters.emissiveSourceOverride,l=null!=this.emissionTexture;s.emissionSource=this.hasEmissions?this._hasEmissiveBase&&1===s.pbrMode?n?l?4:2:a?l?5:7:6:a?7:6:0,s.shadeNormals=r.shadeNormals,s.normalType=s.hasNormals?1:2;const u=null!=t.slicePlane&&this.commonMaterialParameters.hasSlicePlane;s.hasSlicePlane=u,s.isGroundSlice=u&&this.commonMaterialParameters.isGround;const h=this._computeMaterialPass();s.blendingEnabled=1===h||2===h||4===h||s.isGroundSlice,s.hasHighlightMixTexture=2===o&&null!=t.highlightMixTexture,s.output=e.output,s.snowCover=i&&t.snowCover>0,s.vertexDiscardMode=i&&2===h?e.transparent?2:1:0,s.olidColor=i&&9===e.output;const p=i&&x(e.output);return s.receiveAmbientOcclusion=p&&r.applySSAO&&null!=t.ssao?.getTexture(),s.hasOccludees=p&&t.hasOccludees,s.receiveShadows=p&&t.shadowMap.ready,s.screenSpaceReflections=p&&null!=t.ssr.lastFrameColor,s.cloudReflections=p&&null!=t.clouds.data?.cubeMap?.colorTexture,s}submit(e,t,r){if(this.objectOpacity<=0)return;const{componentData:s,renderable:o}=r,{geometry:i}=o,a=o.meta.cameraDepthSquared;s.updateHighlights(t.highlights);const{geometryRanges:n,highlightRangesMap:l,shadowmapRanges:u}=s,h=e=>e.submitDraw(this,i,n,a);switch(this._computeMaterialPass()){case 0:h(e.opaque);break;case 1:h(e.transparent);break;case 2:h(e.opaque),h(e.transparent);break;case 3:h(e.integratedMesh),j(t)&&h(e.occludedGround),P(t)&&h(e.highlightIntegratedMesh);break;case 4:h(e.transparentIntegratedMesh)}if(2!==this.componentParameters.castShadows){if(null!=l)for(const t of l)t[0]===M&&e.highlightShadowMap.submitDraw(this,i,t[1],a,t[0]);null!=u&&e.defaultShadowMap.submitDraw(this,i,u,a),h(e.shadowMap)}if(null!=l)for(const p of l)e.highlight.submitDraw(this,i,p[1],a,p[0]);t.viewshedEnabled&&h(e.viewshedShadowMap)}_computeMaterialPass(){if(this.isIntegratedMesh)return this.objectOpacity<1?4:3;if(this.objectOpacity<1)return this.isIntegratedMesh?4:1;if(0===this.componentParameters.opaqueOverride)return 0;if(this.baseColor[3]<1||0===this.alphaDiscardMode||3===this.alphaDiscardMode)return 1;switch(this.componentParameters.transparent){case 2:return 0;case 0:return 1;case 1:return 2}}}e([d({vectorOps:l})],b.prototype,"baseColor",void 0),e([d()],b.prototype,"usePBR",void 0),e([d()],b.prototype,"hasParametersFromSource",void 0),e([d()],b.prototype,"sphereDepthInterpolate",void 0),e([d({vectorOps:i})],b.prototype,"mrrFactors",void 0),e([d({dispose:!0})],b.prototype,"baseColorTexture",void 0),e([d({dispose:!0})],b.prototype,"metallicRoughnessTexture",void 0),e([d({dispose:!0})],b.prototype,"normalTexture",void 0),e([d({dispose:!0})],b.prototype,"occlusionTexture",void 0),e([d({dispose:!0})],b.prototype,"emissionTexture",void 0),e([d({vectorOps:i})],b.prototype,"emissiveBaseColor",void 0),e([d()],b.prototype,"emissiveStrength",void 0),e([m()],b.prototype,"commonMaterialParameters",void 0),e([m()],b.prototype,"componentParameters",void 0),e([d()],b.prototype,"textureBackedBuffer",void 0),e([d()],b.prototype,"objectOpacity",void 0),e([d()],b.prototype,"textureAlphaCutoff",void 0),e([d()],b.prototype,"alphaDiscardMode",void 0),e([d()],b.prototype,"isIntegratedMesh",void 0),e([d()],b.prototype,"polygonOffsetEnabled",void 0),e([d()],b.prototype,"ellipsoidMode",void 0),e([d()],b.prototype,"hasOccludees",void 0);class S extends g{constructor(){super(...arguments),this.doubleSided=!1,this.cullFace=2,this.isGround=!1,this.hasSlicePlane=!0}}e([d()],S.prototype,"doubleSided",void 0),e([d()],S.prototype,"cullFace",void 0),e([d()],S.prototype,"isGround",void 0),e([d()],S.prototype,"hasSlicePlane",void 0);class C extends g{constructor(){super(...arguments),this.externalColor=h(1,1,1,1),this.externalColorMixMode=1,this.emissiveStrength=0,this.emissiveSource=0,this.castShadows=0}get transparent(){return this.externalColor[3]<1?0:2}get opaqueOverride(){return 3===this.externalColorMixMode&&1===this.externalColor[3]?0:2}get emissiveOverride(){return this.emissiveStrength>0?0:2}get emissiveSourceOverride(){return 1===this.emissiveSource?0:2}get visible(){return this.externalColor[3]>0?0:2}get type(){return 0}}e([d({vectorOps:l})],C.prototype,"externalColor",void 0),e([d()],C.prototype,"externalColorMixMode",void 0),e([d()],C.prototype,"emissiveStrength",void 0),e([d()],C.prototype,"emissiveSource",void 0),e([d()],C.prototype,"castShadows",void 0);class O extends g{constructor(){super(...arguments),this.transparent=2,this.opaqueOverride=2,this.emissiveOverride=2,this.emissiveSourceOverride=2,this.castShadows=2}get type(){return 1}}function P(e){return null!=e.overlay?.getTexture(2)}function w(e){return null!=e.overlay?.getTexture(3)}function D(e){return null!=e.overlay?.getTexture(1)}function j(e){return null!=e.overlay?.getTexture(e.overlay?.allSourcesOccluders?1:4)}e([d()],O.prototype,"transparent",void 0),e([d()],O.prototype,"opaqueOverride",void 0),e([d()],O.prototype,"emissiveOverride",void 0),e([d()],O.prototype,"emissiveSourceOverride",void 0),e([d()],O.prototype,"castShadows",void 0);export{S as CommonMaterialParameters,b as ComponentMaterial,C as ComponentParametersUniform,O as ComponentParametersVarying};
5
+ import{__decorate as e}from"tslib";import{invert as t,transpose as r}from"../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{clone as s}from"../../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{m as o,I as i}from"../../../../../../chunks/vec32.js";import{freeze as a,ZEROS as n}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{v as l}from"../../../../../../chunks/vec42.js";import{freeze as u,fromValues as h}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ComponentTechnique as p}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as c}from"./ComponentTechniqueConfiguration.js";import{parameter as d,parameterBlock as m,MaterialBase as v,MaterialParameterBlock as g}from"../../../core/material/MaterialBase.js";import{isColor as x}from"../../../core/shaderLibrary/ShaderOutput.js";import{TwoVectorPosition as f}from"../../../core/util/TwoVectorPosition.js";import{advancedMRRFactors as y}from"../../../materials/pbrUtils.js";import{defaultHighlightName as M}from"../../../../../support/HighlightDefaults.js";import{alphaCutoff as T}from"../../../../../../webscene/support/AlphaCutoff.js";class b extends v{constructor(e,o,i,n){super(),this.toMapSpace=o,this.useENUForGlobalOverlayUV=i,this.baseColor=u(1,1,1,1),this.usePBR=!1,this.hasParametersFromSource=!1,this.sphereDepthInterpolate=!1,this.mrrFactors=y,this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.normalTexture=null,this.occlusionTexture=null,this.emissionTexture=null,this.emissiveBaseColor=a(0,0,0),this.emissiveStrength=0,this.commonMaterialParameters=new S,this.componentParameters=new C,this.textureBackedBuffer=null,this.objectOpacity=1,this.textureAlphaCutoff=T,this.alphaDiscardMode=1,this.isIntegratedMesh=!1,this.polygonOffsetEnabled=!1,this.ellipsoidMode=1,this.hasOccludees=!1;const l=s(e.rotationScale);t(l,l),r(l,l),this.transformNormalGlobalFromModel=l;const h=new f(e.position);this.transformWorldFromModelTL=h.low,this.transformWorldFromModelTH=h.high,this.transformWorldFromModelRS=e.rotationScale,this._configuration=new c(n),this._updateMaterialConfiguration()}dispose(){this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null}get _hasEmissiveBase(){return null!=this.emissionTexture||!o(this.emissiveBaseColor,n)}get _hasEmissiveStrength(){return 2!==this.componentParameters.emissiveOverride}get hasEmissions(){return this._hasEmissiveStrength&&(this._hasEmissiveBase||2!==this.componentParameters.emissiveSourceOverride)}get texture(){return this.baseColorTexture?.texture}get textureMetallicRoughness(){return this.metallicRoughnessTexture?.texture}get textureEmissive(){return this.emissionTexture?.texture}get textureOcclusion(){return this.occlusionTexture?.texture}get textureNormal(){return this.normalTexture?.texture}update(e){e(this)}acquireTechnique(e,t,r,s){const o=this._updateConfiguration(t,r,s);return e.get(p,o,s.layout)}_updateConfiguration(e,t,r){return this._updateMaterialConfiguration(),this._updateDrawConfiguration(e,t,r)}_updateMaterialConfiguration(){if(!this.dirty)return;const e=this._configuration;e.hasMetallicRoughnessTexture=null!=this.metallicRoughnessTexture,e.hasOcclusionTexture=null!=this.occlusionTexture,e.hasNormalTexture=null!=this.normalTexture,e.sphereDepthInterpolate=this.sphereDepthInterpolate&&e.spherical,e.ellipsoidMode=this.ellipsoidMode,e.componentData=this.componentParameters.type,e.cullFace=this.commonMaterialParameters.cullFace,e.doubleSidedMode=this.commonMaterialParameters.doubleSided?1:0,e.hasColorTexture=null!=this.baseColorTexture,e.alphaDiscardMode=this.alphaDiscardMode,e.hasPolygonOffset=this.polygonOffsetEnabled,this._setClean()}_updateDrawConfiguration(e,t,r){const s=this._configuration,o=e.identifier,i=0===o;s.hasEmission=t.hasEmission&&i,s.renderOccluded=10===t.slot,s.hasVertexColors=r.hasVertexColors,s.hasNormals=r.hasNormals,s.textureCoordinateType=r.textureCoordinateType,s.oitPass=i?t.oitPass:0,s.terrainDepthTest=i&&t.terrainDepthTest,s.cullAboveTerrain=!!i&&t.cullAboveTerrain,s.integratedMeshMode=this.isIntegratedMesh?D(t)?w(t)?3:2:1:0,s.pbrMode=3===s.integratedMeshMode?4:this.usePBR?this.hasParametersFromSource?r.shadeNormals&&this.isIntegratedMesh?0:2:1:0;const a=1===this.componentParameters.emissiveSourceOverride,n=2===this.componentParameters.emissiveSourceOverride,l=null!=this.emissionTexture;s.emissionSource=this.hasEmissions?this._hasEmissiveBase&&1===s.pbrMode?n?l?4:2:a?l?5:7:6:a?7:6:0,s.shadeNormals=r.shadeNormals,s.normalType=s.hasNormals?1:2;const u=null!=t.slicePlane&&this.commonMaterialParameters.hasSlicePlane;s.hasSlicePlane=u,s.isGroundSlice=u&&this.commonMaterialParameters.isGround;const h=this._computeMaterialPass();s.blendingEnabled=1===h||2===h||4===h||s.isGroundSlice,s.hasHighlightMixTexture=2===o&&null!=t.highlightMixTexture,s.output=e.output,s.snowCover=i&&t.snowCover>0,s.vertexDiscardMode=i&&2===h?e.transparent?2:1:0,s.olidColor=i&&9===e.output;const p=i&&x(e.output);return s.receiveAmbientOcclusion=p&&r.applySSAO&&null!=t.ssao?.getTexture(),s.hasOccludees=p&&t.hasOccludees,s.receiveShadows=p&&t.shadowMap.ready,s.screenSpaceReflections=p&&null!=t.ssr.lastFrameColor,s.cloudReflections=p&&null!=t.clouds.data?.cubeMap?.colorTexture,s}submit(e,t,r){if(this.objectOpacity<=0)return;const{componentData:s,renderable:o}=r,{geometry:i}=o,a=o.meta.cameraDepthSquared;s.updateHighlights(t.highlights);const{geometryRanges:n,highlightRangesMap:l,shadowmapRanges:u}=s,h=e=>e.submitDraw(this,i,n,a);switch(this._computeMaterialPass()){case 0:h(e.opaque);break;case 1:h(e.transparent);break;case 2:h(e.opaque),h(e.transparent);break;case 3:h(e.integratedMesh),j(t)&&h(e.occludedGround),P(t)&&h(e.highlightIntegratedMesh);break;case 4:h(e.transparentIntegratedMesh)}if(2!==this.componentParameters.castShadows){if(null!=l)for(const t of l)t[0]===M&&e.highlightShadowMap.submitDraw(this,i,t[1],a,t[0]);null!=u&&e.defaultShadowMap.submitDraw(this,i,u,a),h(e.shadowMap)}if(null!=l)for(const p of l)e.highlight.submitDraw(this,i,p[1],a,p[0]);t.viewshedEnabled&&h(e.viewshedShadowMap)}_computeMaterialPass(){if(this.isIntegratedMesh)return this.objectOpacity<1?4:3;if(this.objectOpacity<1)return this.isIntegratedMesh?4:1;if(0===this.componentParameters.opaqueOverride)return 0;if(this.baseColor[3]<1||0===this.alphaDiscardMode||3===this.alphaDiscardMode)return 1;switch(this.componentParameters.transparent){case 2:return 0;case 0:return 1;case 1:return 2}}}e([d({vectorOps:l})],b.prototype,"baseColor",void 0),e([d()],b.prototype,"usePBR",void 0),e([d()],b.prototype,"hasParametersFromSource",void 0),e([d()],b.prototype,"sphereDepthInterpolate",void 0),e([d({vectorOps:i})],b.prototype,"mrrFactors",void 0),e([d({dispose:!0})],b.prototype,"baseColorTexture",void 0),e([d({dispose:!0})],b.prototype,"metallicRoughnessTexture",void 0),e([d({dispose:!0})],b.prototype,"normalTexture",void 0),e([d({dispose:!0})],b.prototype,"occlusionTexture",void 0),e([d({dispose:!0})],b.prototype,"emissionTexture",void 0),e([d({vectorOps:i})],b.prototype,"emissiveBaseColor",void 0),e([d()],b.prototype,"emissiveStrength",void 0),e([m()],b.prototype,"commonMaterialParameters",void 0),e([m()],b.prototype,"componentParameters",void 0),e([d()],b.prototype,"textureBackedBuffer",void 0),e([d()],b.prototype,"objectOpacity",void 0),e([d()],b.prototype,"textureAlphaCutoff",void 0),e([d()],b.prototype,"alphaDiscardMode",void 0),e([d()],b.prototype,"isIntegratedMesh",void 0),e([d()],b.prototype,"polygonOffsetEnabled",void 0),e([d()],b.prototype,"ellipsoidMode",void 0),e([d()],b.prototype,"hasOccludees",void 0);class S extends g{constructor(){super(...arguments),this.doubleSided=!1,this.cullFace=2,this.isGround=!1,this.hasSlicePlane=!0}}e([d()],S.prototype,"doubleSided",void 0),e([d()],S.prototype,"cullFace",void 0),e([d()],S.prototype,"isGround",void 0),e([d()],S.prototype,"hasSlicePlane",void 0);class C extends g{constructor(){super(...arguments),this.externalColor=h(1,1,1,1),this.externalColorMixMode=1,this.emissiveStrength=0,this.emissiveSource=0,this.castShadows=0}get transparent(){return this.externalColor[3]<1?0:2}get opaqueOverride(){return 3===this.externalColorMixMode&&1===this.externalColor[3]?0:2}get emissiveOverride(){return this.emissiveStrength>0?0:2}get emissiveSourceOverride(){return 1===this.emissiveSource?0:2}get visible(){return this.externalColor[3]>0?0:2}get type(){return 0}}e([d({vectorOps:l})],C.prototype,"externalColor",void 0),e([d()],C.prototype,"externalColorMixMode",void 0),e([d()],C.prototype,"emissiveStrength",void 0),e([d()],C.prototype,"emissiveSource",void 0),e([d()],C.prototype,"castShadows",void 0);class O extends g{constructor(){super(...arguments),this.transparent=2,this.opaqueOverride=2,this.emissiveOverride=2,this.emissiveSourceOverride=2,this.castShadows=2}get type(){return 1}}function P(e){return null!=e.overlay?.getTexture(2)}function w(e){return null!=e.overlay?.getTexture(3)}function D(e){return null!=e.overlay?.getTexture(1)}function j(e){return null!=e.overlay?.getTexture(e.overlay?.allSourcesOccluders?1:4)}e([d()],O.prototype,"transparent",void 0),e([d()],O.prototype,"opaqueOverride",void 0),e([d()],O.prototype,"emissiveOverride",void 0),e([d()],O.prototype,"emissiveSourceOverride",void 0),e([d()],O.prototype,"castShadows",void 0);export{S as CommonMaterialParameters,b as ComponentMaterial,C as ComponentParametersUniform,O as ComponentParametersVarying};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../../../support/buffer/glUtil.js";import{createVertexBufferLayout as o}from"../SourceGeometry.js";import{C as i}from"../../../../../../chunks/ComponentShader.glsl.js";import{isColor as n}from"../../../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as l}from"../../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s,depthOnlyOutputBuffersOr as a}from"../../../core/shaderTechnique/ShaderTechnique.js";import{OITPolygonOffset as p,depthTest as u,blending as m,drawBuffers as d}from"../../../lib/OrderIndependentTransparency.js";import{replaceBitWhenDepthTestPasses as c,stencilBaseAllZerosParams as h,stencilWriteMaskOn as f}from"../../../lib/StencilUtils.js";import{indexGlLayout as b}from"../../../materials/DefaultLayouts.js";import{cullingParams as g,makePipelineState as j,defaultColorWrite as P,defaultDepthWrite as w,premultipliedAlpha as S}from"../../../../../webgl/renderState.js";import{fromLayouts as T}from"../../../../../webgl/VertexAttributeLocations.js";let y=class extends s{constructor(e,r){super(e,r,T([t(o(r)),b])),this.shader=new l(i,()=>import("./ComponentShader.glsl.js"))}getPipeline(e){return e.camera.aboveGround||null==this._belowGroundPipeline?super.getPipeline(e):this._belowGroundPipeline}initializePipeline(e){return this._belowGroundPipeline=0===e.integratedMeshMode?null:this._makePipeline(e,!0),this._makePipeline(e,!1)}_makePipeline(e,r){const{integratedMeshMode:t,output:o,blendingEnabled:i,cullFace:l,hasEmission:s,hasOccludees:b,hasPolygonOffset:T,oitPass:y,renderOccluded:O}=e,_=0!==t,C=0===y,G=2===y;let M=g(l);return r&&M&&(M={...M,mode:2304}),j({blending:O?S:n(o)&&i?m(y):null,culling:M,depthTest:O?null:u(y),depthWrite:O||!C&&!G?null:w,drawBuffers:a(o,d(y,s)),colorWrite:P,stencilWrite:!O&&_||b?f:null,stencilTest:_?c(1):b?h:null,polygonOffset:C||G?T?{factor:2,units:2}:null:p})}};y=e([r("esri.views.3d.webgl-engine.collections.Component.Material.ComponentTechnique")],y);export{y as ComponentTechnique};
5
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../../core/accessorSupport/decorators.js";import{C as t}from"../../../../../../chunks/ComponentShader.glsl.js";import{isColor as i}from"../../../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as n}from"../../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o,depthOnlyOutputBuffersOr as l}from"../../../core/shaderTechnique/ShaderTechnique.js";import{OITPolygonOffset as s,depthTest as a,blending as d,drawBuffers as p}from"../../../lib/OrderIndependentTransparency.js";import{replaceBitWhenDepthTestPasses as u,stencilBaseAllZerosParams as c,stencilWriteMaskOn as m}from"../../../lib/StencilUtils.js";import{IndexGlLayout as h}from"../../../materials/DefaultLayouts.js";import{cullingParams as f,makePipelineState as b,defaultColorWrite as g,defaultDepthWrite as P,premultipliedAlpha as j}from"../../../../../webgl/renderState.js";let w=class extends o{constructor(e,r,i){super(e,r,i.concat(h)),this.shader=new n(t,()=>import("./ComponentShader.glsl.js"))}getPipeline(e){return e.camera.aboveGround||null==this._belowGroundPipeline?super.getPipeline(e):this._belowGroundPipeline}initializePipeline(e){return this._belowGroundPipeline=0===e.integratedMeshMode?null:this._makePipeline(e,!0),this._makePipeline(e,!1)}_makePipeline(e,r){const{integratedMeshMode:t,output:n,blendingEnabled:o,cullFace:h,hasEmission:w,hasOccludees:S,hasPolygonOffset:T,oitPass:O,renderOccluded:_}=e,y=0!==t,C=0===O,M=2===O;let k=f(h);return r&&k&&(k={...k,mode:2304}),b({blending:_?j:i(n)&&o?d(O):null,culling:k,depthTest:_?null:a(O),depthWrite:_||!C&&!M?null:P,drawBuffers:l(n,p(O,w)),colorWrite:g,stencilWrite:!_&&y||S?m:null,stencilTest:y?u(1):S?c:null,polygonOffset:C||M?T?{factor:2,units:2}:null:s})}};w=e([r("esri.views.3d.webgl-engine.collections.Component.Material.ComponentTechnique")],w);export{w as ComponentTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{newLayout as e}from"../../../support/buffer/InterleavedLayout.js";import{NoParameters as o}from"../../../../webgl/NoParameters.js";class t{constructor(e,o,t,s){this.vertices=e,this.positionData=o,this.indices=t,this.componentOffsets=s}}class s extends o{constructor(e,o,t,s,r){super(),this.hasVertexColors=e,this.textureCoordinateType=o,this.hasNormals=t,this.shadeNormals=s,this.applySSAO=r}}function r(o){const t=e().vec3f("position");return o.hasNormals&&t.vec2i16("normalCompressed",{glNormalized:!0}),1===o.textureCoordinateType?t.vec2f("uv0"):2===o.textureCoordinateType&&(t.vec2f("uv0"),t.vec4u16("uvRegion",{glNormalized:!0})),o.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),t.freeze()}export{s as GeometryParameters,t as SourceGeometry,r as createVertexBufferLayout};
5
+ import{newLayout as e}from"../../../support/buffer/InterleavedLayout.js";import{NoParameters as s}from"../../../../webgl/NoParameters.js";class t{constructor(e,s,t,o,r){this.vertices=e,this.positions=s,this.indices=t,this.componentOffsets=o,this.parameters=r}}class o extends s{constructor(e,s,t,o){super(),this.layout=e,this.shadeNormals=s,this.applySSAO=t,this.textureCoordinateType=o}get hasVertexColors(){return this.layout.some(({name:e})=>"color"===e)}get hasNormals(){return this.layout.some(({name:e})=>"normalCompressed"===e)}}class r extends s{constructor(e,s,t,o,r){super(),this.hasVertexColors=e,this.textureCoordinateType=s,this.hasNormals=t,this.shadeNormals=o,this.applySSAO=r}}function a(s){const t=e().vec3f("position");return s.hasNormals&&t.vec2i16("normalCompressed",{glNormalized:!0}),1===s.textureCoordinateType?t.vec2f("uv0"):2===s.textureCoordinateType&&(t.vec2f("uv0"),t.vec4u16("uvRegion",{glNormalized:!0})),s.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),t.freeze()}export{r as GeometryParameters,t as SourceGeometry,o as SourceParameters,a as createVertexBufferLayout};
@@ -12,7 +12,7 @@ return vvSizeFallback.xz;
12
12
  return size * clamp(vvSizeOffset + value * vvSizeFactor, vvSizeMinSize, vvSizeMaxSize).xz;
13
13
  }`)):u.code.add(v`vec2 getSize(){
14
14
  return size;
15
- }`),x?(f.add("opacityFeatureAttribute","float"),u.constants.add("vvOpacityNumber","int",p),u.uniforms.add(new l("vvOpacityValues",e=>e.vvOpacity.values,p),new l("vvOpacityOpacities",e=>e.vvOpacity.opacityValues,p),new t("vvOpacityFallback",e=>e.vvOpacity.fallback,{supportsNaN:!0})),u.code.add(v`
15
+ }`),x?(f.add("opacityFeatureAttribute","float"),u.constants.add("vvOpacityNumber","int",p),u.uniforms.add(new l("vvOpacityValues",p,e=>e.vvOpacity.values),new l("vvOpacityOpacities",p,e=>e.vvOpacity.opacityValues),new t("vvOpacityFallback",e=>e.vvOpacity.fallback,{supportsNaN:!0})),u.code.add(v`
16
16
  vec4 applyOpacity(vec4 color) {
17
17
  // if we encounter NaN in the color it means the color is in the fallback case where the symbol color
18
18
  // is not defined and there is no valid color visual variable override. In this case just return a fully
@@ -43,7 +43,7 @@ return size;
43
43
  }
44
44
  `)):u.code.add(v`vec4 applyOpacity(vec4 color){
45
45
  return color;
46
- }`),m?(f.add("colorFeatureAttribute","float"),u.constants.add("vvColorNumber","int",n),u.uniforms.add(new l("vvColorValues",e=>e.vvColor.values,n),new i("vvColorColors",e=>e.vvColor.colors,n),new a("vvColorFallback",e=>e.vvColor.fallback)),u.code.add(v`vec4 getColor() {
46
+ }`),m?(f.add("colorFeatureAttribute","float"),u.constants.add("vvColorNumber","int",n),u.uniforms.add(new l("vvColorValues",n,e=>e.vvColor.values),new i("vvColorColors",n,e=>e.vvColor.colors),new a("vvColorFallback",e=>e.vvColor.fallback)),u.code.add(v`vec4 getColor() {
47
47
  float value = colorFeatureAttribute;
48
48
  if (isnan(value)) {
49
49
  return applyOpacity(vvColorFallback);
@@ -25,7 +25,7 @@ return size;
25
25
  float fullSize = intrinsicWidth * size;
26
26
  return ${p(y,"applyLineSizeScreenSizePerspective(fullSize, pos)","fullSize")};
27
27
  }
28
- `)),f.hasVVOpacity?(m.add("opacityFeatureAttribute","float"),S.constants.add("vvOpacityNumber","int",8),S.uniforms.add(new v("vvOpacityValues",e=>e.vvOpacity.values,u),new v("vvOpacityOpacities",e=>e.vvOpacity.opacityValues,u),new s("vvOpacityFallback",e=>e.vvOpacity.fallback,{supportsNaN:!0})),S.code.add(n`
28
+ `)),f.hasVVOpacity?(m.add("opacityFeatureAttribute","float"),S.constants.add("vvOpacityNumber","int",8),S.uniforms.add(new v("vvOpacityValues",u,e=>e.vvOpacity.values),new v("vvOpacityOpacities",u,e=>e.vvOpacity.opacityValues),new s("vvOpacityFallback",e=>e.vvOpacity.fallback,{supportsNaN:!0})),S.code.add(n`
29
29
  float interpolateOpacity(float value) {
30
30
  if (value <= vvOpacityValues[0]) {
31
31
  return vvOpacityOpacities[0];
@@ -15,8 +15,7 @@ float depthNonlinear01 = (depthNdc + 1.0 ) / 2.0;
15
15
  return depthNonlinear01;
16
16
  }`),e.code.add(o`float depthFromTexture(sampler2D depthTexture, vec2 uv) {
17
17
  ivec2 iuv = ivec2(uv * vec2(textureSize(depthTexture, 0)));
18
- float depth = texelFetch(depthTexture, iuv, 0).r;
19
- return depth;
18
+ return texelFetch(depthTexture, iuv, 0).r;
20
19
  }`),e.code.add(o`float linearDepthFromTexture(sampler2D depthTexture, vec2 uv) {
21
20
  return linearizeDepth(depthFromTexture(depthTexture, uv));
22
21
  }`)}function d(t){const r=t.projectionMatrix;return e(c,r[14],r[10])}const c=t();export{a as ReadDepth};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"./Colormap.glsl.js";import"./Common.glsl.js";import"../terrain/TileBackground.glsl.js";import"../terrain/TileComposite.glsl.js";import"../util/ColorConversion.glsl.js";import"../../shaderModules/BooleanPassUniform.js";import"../../shaderModules/Float2PassUniform.js";import"../../shaderModules/FloatPassUniform.js";import"../../shaderModules/FloatsPassUniform.js";import"../../shaderModules/glsl.js";import"../../shaderModules/IntegerPassUniform.js";import"../../shaderModules/Texture2DPassUniform.js";import"../../../../../webgl/ShaderBuilder.js";export{b as ColorizerHillshadeUniforms,a as ColorizerStretchUniforms,C as ColorizerUniforms,c as build}from"../../../../../../chunks/RasterColorizer.glsl.js";
5
+ import"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"./Colormap.glsl.js";import"./Common.glsl.js";import"../terrain/TileBackground.glsl.js";import"../terrain/TileComposite.glsl.js";import"../util/ColorConversion.glsl.js";import"../../shaderModules/BooleanPassUniform.js";import"../../shaderModules/Float2PassUniform.js";import"../../shaderModules/Float3PassUniform.js";import"../../shaderModules/FloatPassUniform.js";import"../../shaderModules/FloatsPassUniform.js";import"../../shaderModules/glsl.js";import"../../shaderModules/IntegerPassUniform.js";import"../../shaderModules/Texture2DPassUniform.js";import"../../../../../webgl/ShaderBuilder.js";export{b as ColorizerHillshadeUniforms,a as ColorizerStretchUniforms,C as ColorizerUniforms,c as build}from"../../../../../../chunks/RasterColorizer.glsl.js";
@@ -26,7 +26,7 @@ return vec4(vvSymbolRotationMatrix * ( vvScale(_featureAttribute) * (position +
26
26
  return vvTransformPosition(position, instanceFeatureAttribute);
27
27
  }`:""}
28
28
  `)):m.code.add(i`vec4 localPosition() { return vec4(position, 1.0); }
29
- vec4 vvLocalNormal(vec3 _normal) { return vec4(_normal, 1.0); }`),u.vertex.include(o),c.hasVVColor?(m.constants.add("vvColorNumber","int",n),m.uniforms.add(new l("vvColorValues",o=>o.vvColor.values,n),new v("vvColorColors",o=>o.vvColor.colors,n),new t("vvColorFallback",o=>o.vvColor.fallback,{supportsNaN:!0})),c.hasVVInstancing&&(u.vertex.include(e),u.vertex.include(r)),m.code.add(i`
29
+ vec4 vvLocalNormal(vec3 _normal) { return vec4(_normal, 1.0); }`),u.vertex.include(o),c.hasVVColor?(m.constants.add("vvColorNumber","int",n),m.uniforms.add(new l("vvColorValues",n,o=>o.vvColor.values),new v("vvColorColors",n,o=>o.vvColor.colors),new t("vvColorFallback",o=>o.vvColor.fallback,{supportsNaN:!0})),c.hasVVInstancing&&(u.vertex.include(e),u.vertex.include(r)),m.code.add(i`
30
30
  vec4 interpolateVVColor(float value) {
31
31
  if (isnan(value)) {
32
32
  return vvColorFallback;
@@ -2,44 +2,35 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{fromValues as o}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{earth as t}from"../../../../../../geometry/support/Ellipsoid.js";import{cloudsHeight as e}from"../../../../environment/weather.js";import{addMainLightDirection as a,addMainLightIntensity as r}from"../shading/MainLighting.glsl.js";import{LookupCloudsFromTextureArray as i}from"./LookupCloudsFromTextureArray.glsl.js";import{BooleanBindUniform as c}from"../../shaderModules/BooleanBindUniform.js";import{Float3BindUniform as d}from"../../shaderModules/Float3BindUniform.js";import{FloatBindUniform as n}from"../../shaderModules/FloatBindUniform.js";import{glsl as l}from"../../shaderModules/glsl.js";import{Matrix4BindUniform as s}from"../../shaderModules/Matrix4BindUniform.js";import{Texture2DArrayBindUniform as u}from"../../shaderModules/Texture2DArrayBindUniform.js";function m(t){const e=t.fragment;e.constants.add("radiusCloudsSquared","float",h).code.add(l`vec3 intersectWithCloudLayer(vec3 dir, vec3 cameraPosition, vec3 spherePos) {
5
+ import{fromValues as o}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{earth as t}from"../../../../../../geometry/support/Ellipsoid.js";import{cloudsHeight as a}from"../../../../environment/weather.js";import{addMainLightDirection as r,addMainLightIntensity as e}from"../shading/MainLighting.glsl.js";import{LookupCloudsFromTextureArray as i}from"./LookupCloudsFromTextureArray.glsl.js";import{BooleanBindUniform as c}from"../../shaderModules/BooleanBindUniform.js";import{Float3BindUniform as n}from"../../shaderModules/Float3BindUniform.js";import{FloatBindUniform as d}from"../../shaderModules/FloatBindUniform.js";import{glsl as l}from"../../shaderModules/glsl.js";import{Matrix4BindUniform as s}from"../../shaderModules/Matrix4BindUniform.js";import{Texture2DArrayBindUniform as u}from"../../shaderModules/Texture2DArrayBindUniform.js";function m(t){const a=t.fragment;a.constants.add("radiusCloudsSquared","float",C).code.add(l`vec3 intersectWithCloudLayer(vec3 dir, vec3 cameraPosition, vec3 spherePos) {
6
6
  float B = 2.0 * dot(cameraPosition, dir);
7
7
  float C = dot(cameraPosition, cameraPosition) - radiusCloudsSquared;
8
8
  float det = B * B - 4.0 * C;
9
9
  float pointIntDist = max(0.0, 0.5 *(-B + sqrt(det)));
10
10
  return (cameraPosition + dir * pointIntDist) - spherePos;
11
- }`),e.uniforms.add(new n("radiusCurvatureCorrection",({clouds:o})=>o.parallax.radiusCurvatureCorrection)).code.add(l`vec3 correctForPlanetCurvature(vec3 dir) {
11
+ }`),a.uniforms.add(new d("radiusCurvatureCorrection",({clouds:o})=>o.parallax.radiusCurvatureCorrection)).code.add(l`vec3 correctForPlanetCurvature(vec3 dir) {
12
12
  dir.z = dir.z * (1.0 - radiusCurvatureCorrection) + radiusCurvatureCorrection;
13
13
  return dir;
14
- }`),e.code.add(l`vec3 rotateDirectionToAnchorPoint(mat4 rotMat, vec3 inVec) {
14
+ }`),a.code.add(l`vec3 rotateDirectionToAnchorPoint(mat4 rotMat, vec3 inVec) {
15
15
  return (rotMat * vec4(inVec, 0.0)).xyz;
16
- }`),a(e),r(e);const m=o(.28,.175,.035);e.constants.add("RIM_COLOR","vec3",m);const C=.3,v=140,f=.2,p=10,g=.3;e.code.add(l`
17
- vec3 calculateCloudColor(vec3 cameraPosition, vec3 worldSpaceRay, vec4 clouds) {
18
- float upDotLight = dot(cameraPosition, mainLightDirection);
19
- float dirDotLight = max(dot(worldSpaceRay, mainLightDirection), 0.0);
20
- float sunsetTransition = clamp(pow(max(upDotLight, 0.0), ${l.float(C)}), 0.0, 1.0);
21
-
22
- // Base color of the clouds that depends on lighting of the sun and sky
23
- vec3 ambientLight = calculateAmbientIrradiance(cameraPosition, 0.0);
24
- vec3 combinedLight = clamp((mainLightIntensity + ambientLight )/PI, vec3(0.0), vec3(1.0));
25
- vec3 baseCloudColor = pow(combinedLight * pow(clouds.xyz, vec3(GAMMA)), vec3(INV_GAMMA));
26
-
27
- // Rim light around the edge of the clouds simulating scattering of the direct lun light
28
- float scatteringMod = max(clouds.a < 0.5 ? clouds.a / 0.5 : - clouds.a / 0.5 + 2.0, 0.0);
29
- float rimLightIntensity = 0.5 + 0.5 * pow(max(upDotLight, 0.0), 0.35);
30
- vec3 directSunScattering = RIM_COLOR * rimLightIntensity * (pow(dirDotLight, ${l.float(v)})) * scatteringMod;
31
-
32
- // Brighten the clouds around the sun at the sunsets
33
- float additionalLight = ${l.float(f)} * pow(dirDotLight, ${l.float(p)}) * (1. - pow(sunsetTransition, ${l.float(g)})) ;
34
-
35
- return vec3(baseCloudColor * (1.0 + additionalLight) + directSunScattering);
36
- }
37
- `),t.include(i),e.uniforms.add(new c("readChannelsRG",o=>0===o.clouds.readChannels),new u("cubeMap",o=>o.clouds.data?.cubeMap?.colorTexture)).code.add(l`vec4 sampleCloud(vec3 rayDir, bool readOtherChannel) {
16
+ }`),r(a),e(a),a.constants.add("RIM_COLOR","vec3",o(.28,.175,.035)),a.constants.add("sunsetTransitionFactor","float",.3),a.constants.add("rimScattering","float",140),a.constants.add("backlightFactor","float",.2),a.constants.add("backlightScattering","float",10),a.constants.add("backlightTransition","float",.3),a.code.add(l`vec3 calculateCloudColor(vec3 cameraPosition, vec3 worldSpaceRay, vec4 clouds) {
17
+ float upDotLight = dot(cameraPosition, mainLightDirection);
18
+ float dirDotLight = max(dot(worldSpaceRay, mainLightDirection), 0.0);
19
+ float sunsetTransition = clamp(pow(max(upDotLight, 0.0), sunsetTransitionFactor), 0.0, 1.0);
20
+ vec3 ambientLight = calculateAmbientIrradiance(cameraPosition, 0.0);
21
+ vec3 combinedLight = clamp((mainLightIntensity + ambientLight )/PI, vec3(0.0), vec3(1.0));
22
+ vec3 baseCloudColor = pow(combinedLight * pow(clouds.xyz, vec3(GAMMA)), vec3(INV_GAMMA));
23
+ float scatteringMod = max(clouds.a < 0.5 ? clouds.a / 0.5 : - clouds.a / 0.5 + 2.0, 0.0);
24
+ float rimLightIntensity = 0.5 + 0.5 * pow(max(upDotLight, 0.0), 0.35);
25
+ vec3 directSunScattering = RIM_COLOR * rimLightIntensity * (pow(dirDotLight, rimScattering)) * scatteringMod;
26
+ float additionalLight = backlightFactor * pow(dirDotLight, backlightScattering) * (1. - pow(sunsetTransition, backlightTransition)) ;
27
+ return vec3(baseCloudColor * (1.0 + additionalLight) + directSunScattering);
28
+ }`),t.include(i),a.uniforms.add(new c("readChannelsRG",o=>0===o.clouds.readChannels),new u("cubeMap",o=>o.clouds.data?.cubeMap?.colorTexture)).code.add(l`vec4 sampleCloud(vec3 rayDir, bool readOtherChannel) {
38
29
  vec4 s = lookupCloudsFromTextureArray(cubeMap, rayDir);
39
30
  bool readRG = readChannelsRG ^^ readOtherChannel;
40
31
  s = readRG ? vec4(vec3(s.r), s.g) : vec4(vec3(s.b), s.a);
41
32
  return length(s) == 0.0 ? vec4(s.rgb, 1.0) : s;
42
- }`),e.uniforms.add(new d("anchorPoint",o=>o.clouds.parallax.anchorPoint),new d("anchorPointNew",o=>o.clouds.parallaxNew.anchorPoint),new s("rotationClouds",o=>o.clouds.parallax.transform),new s("rotationCloudsNew",o=>o.clouds.parallaxNew.transform),new n("cloudsOpacity",o=>o.clouds.opacity),new n("fadeFactor",o=>o.clouds.fadeFactor),new c("crossFade",o=>3===o.clouds.fadeState)).code.add(l`vec4 renderClouds(vec3 worldRay, vec3 cameraPosition) {
33
+ }`),a.uniforms.add(new n("anchorPoint",o=>o.clouds.parallax.anchorPoint),new n("anchorPointNew",o=>o.clouds.parallaxNew.anchorPoint),new s("rotationClouds",o=>o.clouds.parallax.transform),new s("rotationCloudsNew",o=>o.clouds.parallaxNew.transform),new d("cloudsOpacity",o=>o.clouds.opacity),new d("fadeFactor",o=>o.clouds.fadeFactor),new c("crossFade",o=>3===o.clouds.fadeState)).code.add(l`vec4 renderClouds(vec3 worldRay, vec3 cameraPosition) {
43
34
  vec3 intersectionPoint = intersectWithCloudLayer(worldRay, cameraPosition, anchorPoint);
44
35
  vec3 worldRayRotated = rotateDirectionToAnchorPoint(rotationClouds, normalize(intersectionPoint));
45
36
  vec3 worldRayRotatedCorrected = correctForPlanetCurvature(worldRayRotated);
@@ -58,4 +49,4 @@ float totalTransmittance = length(cloudColor.rgb) == 0.0 ?
58
49
  1.0 :
59
50
  clamp(cloudColor.a * cloudsOpacity + (1.0 - cloudsOpacity), 0.0 , 1.0);
60
51
  return vec4(cloudColor.rgb, totalTransmittance);
61
- }`)}const h=(t.radius+e)**2;export{m as CloudsParallaxShading};
52
+ }`)}const C=(t.radius+a)**2;export{m as CloudsParallaxShading};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{Uniform as r}from"../../../../webgl/Uniform.js";class e extends r{constructor(r,e,o,s){super(r,"vec4",1,(o,t,c)=>o.setUniform4fv(r,e(t,c),s),o)}}export{e as Float4sPassUniform};
5
+ import{Uniform as r}from"../../../../webgl/Uniform.js";class e extends r{constructor(r,e,o,s){super(r,"vec4",1,(e,t,c)=>e.setUniform4fv(r,o(t,c),s),e)}}export{e as Float4sPassUniform};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{Uniform as o}from"../../../../webgl/Uniform.js";class r extends o{constructor(o,r,s,t){super(o,"float",1,(s,e,f)=>s.setUniform1fv(o,r(e,f),t),s)}}export{r as FloatsPassUniform};
5
+ import{Uniform as o}from"../../../../webgl/Uniform.js";class r extends o{constructor(o,r,s,t){super(o,"float",1,(r,e,f)=>r.setUniform1fv(o,s(e,f),t),r)}}export{r as FloatsPassUniform};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import i from"../../../../../core/Accessor.js";import r from"../../../../../core/Logger.js";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators.js";import{isDepthOrShadowLikeOutput as o}from"../shaderLibrary/ShaderOutput.js";import{Pos2Locations as a}from"../../lib/DefaultVertexBufferLayouts.js";import{Program as n}from"../../lib/Program.js";import{PrimitiveType as h,DrawBufferNone as l}from"../../../../webgl/enums.js";import{makePipelineState as p,defaultColorWrite as c,premultipliedAlpha as m}from"../../../../webgl/renderState.js";const u=()=>r.getLogger("esri.views.3d.webgl.ShaderTechnique");let g=class extends i{constructor(e,i,r=a){super({}),this._context=e,this._configuration=i,this.locations=r,this.primitiveType=h.TRIANGLES,this.key=i.key,this._pipeline=this.initializePipeline(i),this.reload=async s=>{s&&await this.shader.reload(),this.key.equals(i.key)||u().warn("Configuration was changed after construction, cannot reload shader.",this.shader),t(this._program);const o=this.shader.get().build(i);o.debugName=this.declaredClass,this._program=new n(e.rctx,o,r),this._pipeline=this.initializePipeline(i)}}initialize(){const e=this.shader.get().build(this._configuration);e.debugName=this.declaredClass,this._program=new n(this._context.rctx,e,this.locations)}destroy(){this._program=t(this._program),this._pipeline=null}get program(){return this._program}get compiled(){return this.program.compiled}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}getPipeline(e,i){return this._pipeline}initializePipeline(e){return p({blending:m,colorWrite:c})}};function d(e,i){return o(e)?{buffers:[l]}:i??null}g=e([s("esri.views.3d.webgl-engine.core.shaderTechnique.ShaderTechnique")],g);export{g as ShaderTechnique,d as depthOnlyOutputBuffersOr};
5
+ import{__decorate as e}from"tslib";import i from"../../../../../core/Accessor.js";import r from"../../../../../core/Logger.js";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators.js";import{isDepthOrShadowLikeOutput as o}from"../shaderLibrary/ShaderOutput.js";import{Pos2 as a}from"../../lib/DefaultVertexBufferLayouts.js";import{Program as n}from"../../lib/Program.js";import{PrimitiveType as l,DrawBufferNone as h}from"../../../../webgl/enums.js";import{makePipelineState as c,defaultColorWrite as p,premultipliedAlpha as m}from"../../../../webgl/renderState.js";import{fromLayout as u}from"../../../../webgl/VertexAttributeLocations.js";const d=()=>r.getLogger("esri.views.3d.webgl.ShaderTechnique");let g=class extends i{constructor(e,i,r){super({}),this._context=e,this._configuration=i,this.primitiveType=l.TRIANGLES,this.key=i.key,this.locations=u(r??a),this._pipeline=this.initializePipeline(i),this.reload=async r=>{if(r&&await this.shader.reload(),!this.key.equals(i.key))return void d().warn(`Configuration was changed after construction, cannot reload shader for ${this.declaredClass}.`);t(this._program);const s=this.shader.get().build(i);s.debugName=this.declaredClass,this._program=new n(e.rctx,s,this.locations),this._pipeline=this.initializePipeline(i)}}initialize(){const e=this.shader.get().build(this._configuration);e.debugName=this.declaredClass,this._program=new n(this._context.rctx,e,this.locations)}destroy(){this._program=t(this._program),this._pipeline=null}get program(){return this._program}get compiled(){return this.program.compiled}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}getPipeline(e,i){return this._pipeline}initializePipeline(e){return c({blending:m,colorWrite:p})}};function f(e,i){return o(e)?{buffers:[h]}:i??null}g=e([s("esri.views.3d.webgl-engine.core.shaderTechnique.ShaderTechnique")],g);export{g as ShaderTechnique,f as depthOnlyOutputBuffersOr};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../../core/Error.js";import"../../../../../core/has.js";import{NestedMap as t}from"../../../../../core/NestedMap.js";import{ShaderTechniqueConfiguration as i}from"./ShaderTechniqueConfiguration.js";class o{constructor(e){this._context=e,this._debug=!1,this._precompiling=this._debug?0:1,this._cache=new t}get context(){return this._context}get precompiling(){return this._precompiling}set precompiling(e){this._precompiling=e,0===e&&this.context.rctx.gl.flush()}get viewingMode(){return this.context.viewingMode}destroy(){this._cache.forAll(e=>e.destroy()),this._cache.clear(),this._context=null}precompile(e,t=r){++this.precompiling,this.get(e,t),--this.precompiling}get(t,i=r){const o=i.key.code;let c=this._cache.get(t,o);if(null==c){if(0===this._precompiling){let o=`Uncached shader compile in ${(new Error).stack}\n for configuration\n${i.decode()}`;const c=this._cache.getInner(t);throw c?.size&&(o+="\n\n cached configurations:\n",o+=Array.from(c.values()).map(e=>i.decode(e.key)).sort().join("\n\n")),console.log(o),new e("shader:uncached-compile",o)}c=new t(this.context,i),this._cache.set(t,o,c)}return c}async reloadAll(){const e=new Array;this._cache.forEach(t=>e.push(c(t))),await Promise.all(e)}}async function c(e){let t=!0;e.forEach(async e=>{await e.reload(t),t=!1})}const r=new i;export{r as NoConfiguration,o as ShaderTechniqueRepository};
5
+ import e from"../../../../../core/Error.js";import"../../../../../core/has.js";import{NestedMap as t}from"../../../../../core/NestedMap.js";import{ShaderTechniqueConfiguration as i}from"./ShaderTechniqueConfiguration.js";class o{constructor(e){this._context=e,this._debug=!1,this._precompiling=this._debug?0:1,this._cache=new t}get context(){return this._context}get precompiling(){return this._precompiling}set precompiling(e){this._precompiling=e,0===e&&this.context.rctx.gl.flush()}get viewingMode(){return this.context.viewingMode}destroy(){this._cache.forAll(e=>e.destroy()),this._cache.clear(),this._context=null}precompile(e,t=r){++this.precompiling,this.get(e,t),--this.precompiling}get(t,i=r,o){const c=i.key.code;let n=this._cache.get(t,c);if(null==n){if(0===this._precompiling){let o=`Uncached shader compile in ${(new Error).stack}\n for configuration\n${i.decode()}`;const c=this._cache.getInner(t);throw c?.size&&(o+="\n\n cached configurations:\n",o+=Array.from(c.values()).map(e=>i.decode(e.key)).sort().join("\n\n")),console.log(o),new e("shader:uncached-compile",o)}n=new t(this.context,i,o),this._cache.set(t,c,n)}return n}async reloadAll(){const e=new Array;this._cache.forEach(t=>e.push(c(t))),await Promise.all(e)}}async function c(e){let t=!0;e.forEach(async e=>{await e.reload(t),t=!1})}const r=new i;export{r as NoConfiguration,o as ShaderTechniqueRepository};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../../core/shaderTechnique/ShaderTechnique.js";import{a as t}from"../../../../../chunks/FocusAreaMask.glsl.js";import{Pos3Locations as i}from"../../lib/DefaultVertexBufferLayouts.js";import{makePipelineState as a,defaultColorWrite as c}from"../../../../webgl/renderState.js";let u=class extends o{constructor(e,r){super(e,r,i),this.shader=new s(t,()=>import("./FocusAreaMask.glsl.js"))}initializePipeline(){return a({colorWrite:c,depthTest:{func:515}})}};u=e([r("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaMaskTechnique")],u);export{u as FocusAreaMaskTechnique};
5
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../../core/shaderTechnique/ShaderTechnique.js";import{a as t}from"../../../../../chunks/FocusAreaMask.glsl.js";import{Pos3 as i}from"../../lib/DefaultVertexBufferLayouts.js";import{makePipelineState as a,defaultColorWrite as c}from"../../../../webgl/renderState.js";let u=class extends o{constructor(e,r){super(e,r,i),this.shader=new s(t,()=>import("./FocusAreaMask.glsl.js"))}initializePipeline(){return a({colorWrite:c,depthTest:{func:515}})}};u=e([r("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaMaskTechnique")],u);export{u as FocusAreaMaskTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../../Color.js";import o from"../../../../../core/Accessor.js";import{destroyMaybe as i}from"../../../../../core/maybe.js";import{watch as r,initial as s}from"../../../../../core/reactiveUtils.js";import{property as n,subclass as l}from"../../../../../core/accessorSupport/decorators.js";import{OutlineVisualElement as a}from"../../../interactive/visualElements/OutlineVisualElement.js";let m=class extends o{constructor(e){super(e)}initialize(){this.addHandles([r(()=>this.area.enabled,()=>this._ensureElement(),s),r(()=>this.area.outline?.color,e=>this._updateColor(e),s),r(()=>this.area.geometries,e=>this._updateGeometries(e),s)])}destroy(){this.removeAllHandles(),this._outlineElement=i(this._outlineElement)}_ensureElement(){this.area.enabled&&this.area.outline?.color?this._outlineElement??=new a({view:this.view,geometry:this._mergePolygons(this.area.geometries),isDraped:!0,attached:!0,isDecoration:!1,color:t.toUnitRGBA(this.area.outline?.color),renderOccluded:4,width:3}):this._outlineElement=i(this._outlineElement)}_updateGeometries(e){this._ensureElement(),this._outlineElement&&(this._outlineElement.geometry=this._mergePolygons(e))}_updateColor(e){this._ensureElement(),this._outlineElement&&e&&(this._outlineElement.color=t.toUnitRGBA(e))}_mergePolygons(e){if(!e||0===e.length)return null;const t=e.at(0).clone();return t.rings.length=0,e.forEach(e=>t.rings.push(...e.rings)),t}};e([n({constructOnly:!0})],m.prototype,"view",void 0),e([n({constructOnly:!0})],m.prototype,"area",void 0),m=e([l("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaOutlineItem")],m);export{m as FocusAreaOutlineItem};
5
+ import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{destroyMaybe as o}from"../../../../../core/maybe.js";import{watch as i,initial as r}from"../../../../../core/reactiveUtils.js";import{property as s,subclass as n}from"../../../../../core/accessorSupport/decorators.js";import{OutlineVisualElement as l}from"../../../interactive/visualElements/OutlineVisualElement.js";let a=class extends t{constructor(e){super(e)}initialize(){this.addHandles([i(()=>this.area.enabled,()=>this._ensureElement(),r),i(()=>this.area.outline?.color,e=>this._updateColor(e),r),i(()=>this.area.geometries,e=>this._updateGeometries(e),r)])}destroy(){this.removeAllHandles(),this._outlineElement=o(this._outlineElement)}_ensureElement(){this.area.enabled&&this.area.outline?.color?this._outlineElement??=new l({view:this.view,geometry:this._mergePolygons(this.area.geometries),isDraped:!0,attached:!0,isDecoration:!1,color:this.area.outline?.color.toUnitRGBA(),renderOccluded:4,width:3}):this._outlineElement=o(this._outlineElement)}_updateGeometries(e){this._ensureElement(),this._outlineElement&&(this._outlineElement.geometry=this._mergePolygons(e))}_updateColor(e){this._ensureElement(),this._outlineElement&&e&&(this._outlineElement.color=e.toUnitRGBA())}_mergePolygons(e){if(!e||0===e.length)return null;const t=e.at(0).clone();return t.rings.length=0,e.forEach(e=>t.rings.push(...e.rings)),t}};e([s({constructOnly:!0})],a.prototype,"view",void 0),e([s({constructOnly:!0})],a.prototype,"area",void 0),a=e([n("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaOutlineItem")],a);export{a as FocusAreaOutlineItem};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import"../../../environment/ChapmanRaymarching.glsl.js";import"../../core/shaderLibrary/output/ReadDepth.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderLibrary/shading/MainLighting.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../shaders/ScreenSpacePassAtmosphere.glsl.js";import"../../shaders/SphereIntersect.glsl.js";import"../../shaders/ToneMapping.glsl.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/Haze.glsl.js";
5
+ import"../../../environment/ChapmanApproximation.glsl.js";import"../../../environment/ChapmanRaymarching.glsl.js";import"../../core/shaderLibrary/output/ReadDepth.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderLibrary/shading/MainLighting.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/FloatsPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../shaders/ScreenSpacePassAtmosphere.glsl.js";import"../../shaders/SphereIntersect.glsl.js";import"../../shaders/ToneMapping.glsl.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/Haze.glsl.js";
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{lerp as t,clamp as s,smoothstep as i}from"../../../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../../../core/maybe.js";import{watch as a,syncAndInitial as o}from"../../../../../core/reactiveUtils.js";import{subclass as n}from"../../../../../core/accessorSupport/decorators.js";import{set as h}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{b as m,F as p}from"../../../../../chunks/vec32.js";import{c}from"../../../../../chunks/vec42.js";import{earth as d}from"../../../../../geometry/support/Ellipsoid.js";import{InternalRenderCategory as u}from"../../../webgl.js";import{TransparentEnvironment as f}from"../TransparentEnvironment.js";import{H as _}from"../../../../../chunks/HazeCompositing.glsl.js";import{HazeCompositingTechnique as l}from"./HazeCompositingTechnique.js";import{HazePassParameters as g,HazeTechnique as b}from"./HazeTechnique.js";import{HazeTechniqueConfiguration as w}from"./HazeTechniqueConfiguration.js";import{createQuadVAO as P}from"../../lib/glUtil3D.js";import{applyTextureResizeModulo as v}from"../../lib/textureUtils.js";import{DepthStencilAttachment as j,PrimitiveType as A}from"../../../../webgl/enums.js";let T=class extends f{constructor(e){super(e),this._compositingPassParameters=new _,this._passParameters=new g,this._hazeConfiguration=new w,this.requireGeometryDepth=!0,this._oldAmount=1,this._newAmount=1,this._amount=this._newAmount;const t=e.view.stage.renderView.techniques;t.precompile(b,new w);const s=new w;s.reduced=!0,t.precompile(b,s),t.precompile(l)}initialize(){this.addHandles([a(()=>this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),o),a(()=>this.view.stage?.renderer.renderContext.bind.clouds.fadeFactor??1,e=>this._fade(e),o),a(()=>this.view.environment.weather.type,e=>this._newAmount="rainy"===e?0:1,o),a(()=>this.view.stage.renderer?.highResolutionAtmosphere,e=>this._hazeConfiguration.reduced=!e,o)])}_fade(e){e>=1?(this._amount=this._newAmount,this._oldAmount=this._newAmount):this._amount=e<=0?this._oldAmount:t(this._oldAmount,this._newAmount,e)}destroy(){this._vao=r(this._vao)}render(e){const s=e.find(({name:e})=>e===u.TRANSPARENT_ENVIRONMENT);if(!this.bindParameters.mainDepth)return s;const i=this.renderingContext,r=this.techniques.get(b,this._hazeConfiguration);if(!r.compiled)return s;const a=s.getAttachment(j);if(this._update(),!this._hazeConfiguration.reduced)return s.detachDepth(),i.bindFramebuffer(s.fbo),i.bindTechnique(r,this.bindParameters,this._passParameters),this._renderCommon(i),s.attachDepth(a),s;const o=this.techniques.get(l);if(!o.compiled)return s;const n=i.getViewport(),h=this.camera,p=m(h.eye)-d.radius;let c;const f=d.atmosphereHeight;if(p<f){const e=Math.min(1,Math.max(0,p/f));c=t(.4,.5,e)}else{const e=Math.min(1,Math.max(0,(p-f)/(15*f)));c=t(.5,1,e)}const _=this.renderingContext.parameters.maxTextureSize,g=v(Math.round(c*h.fullViewport[2]),_),w=v(Math.round(c*h.fullViewport[3]),_);i.setViewport(0,0,g,w);const P=this.fboCache.acquire(g,w,"haze",5);return i.bindFramebuffer(P.fbo),i.clearFramebuffer([0,0,0,1],!0,!0),i.bindTechnique(r,this.bindParameters,this._passParameters),this._renderCommon(i),i.setViewport(n.x,n.y,n.width,n.height),this._compositingPassParameters.color=P.getTexture(),s.detachDepth(),i.bindFramebuffer(s.fbo),i.bindTechnique(o,this.bindParameters,this._compositingPassParameters),i.screen.draw(),s.attachDepth(a),P.release(),s}_renderCommon(e){this._vao??=P(e,1),e.bindVAO(this._vao),e.drawArrays(A.TRIANGLE_STRIP,0,4)}_update(){const e=this.bindParameters.camera,r=p(e.eye),a=Math.sqrt(r),o=r-this._passParameters.radii[1]*this._passParameters.radii[1],n=s((a-this._passParameters.radii[0])/d.atmosphereHeight,0,1);c(this._passParameters.heightParameters,a,r,o,n);const m=this.view.basemapTerrain?.getLowerBoundRadius()??0;h(this._passParameters.radii,m,m+d.atmosphereHeight),this._passParameters.hazeStrength=t(t(.6,1,i(9500,10500,a-d.radius)),1,this._amount)}};T=e([n("esri.views.3d.webgl-engine.effects.haze.Haze")],T);export{T as Haze};
5
+ import{__decorate as e}from"tslib";import{lerp as t,smoothstep as i}from"../../../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../../../core/maybe.js";import{watch as s,syncAndInitial as o}from"../../../../../core/reactiveUtils.js";import{subclass as n}from"../../../../../core/accessorSupport/decorators.js";import{set as a}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{b as m}from"../../../../../chunks/vec32.js";import{earth as h}from"../../../../../geometry/support/Ellipsoid.js";import{InternalRenderCategory as c}from"../../../webgl.js";import{TransparentEnvironment as d}from"../TransparentEnvironment.js";import{H as u}from"../../../../../chunks/HazeCompositing.glsl.js";import{HazeCompositingTechnique as p}from"./HazeCompositingTechnique.js";import{HazePassParameters as f,HazeTechnique as l}from"./HazeTechnique.js";import{HazeTechniqueConfiguration as _}from"./HazeTechniqueConfiguration.js";import{createQuadVAO as b}from"../../lib/glUtil3D.js";import{applyTextureResizeModulo as g}from"../../lib/textureUtils.js";import{DepthStencilAttachment as w,PrimitiveType as P}from"../../../../webgl/enums.js";let v=class extends d{constructor(e){super(e),this._compositingPassParameters=new u,this._passParameters=new f,this._hazeConfiguration=new _,this.requireGeometryDepth=!0,this._oldAmount=1,this._newAmount=1,this._amount=this._newAmount;const t=e.view.stage.renderView.techniques;t.precompile(l,new _);const i=new _;i.reduced=!0,t.precompile(l,i),t.precompile(p)}initialize(){this.addHandles([s(()=>this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),o),s(()=>this.view.stage?.renderer.renderContext.bind.clouds.fadeFactor??1,e=>this._fade(e),o),s(()=>this.view.environment.weather.type,e=>this._newAmount="rainy"===e?0:1,o),s(()=>this.view.stage.renderer?.highResolutionAtmosphere,e=>this._hazeConfiguration.reduced=!e,o)])}_fade(e){e>=1?(this._amount=this._newAmount,this._oldAmount=this._newAmount):this._amount=e<=0?this._oldAmount:t(this._oldAmount,this._newAmount,e)}destroy(){this._vao=r(this._vao)}render(e){const i=e.find(({name:e})=>e===c.TRANSPARENT_ENVIRONMENT);if(!this.bindParameters.mainDepth)return i;const r=this.techniques.get(l,this._hazeConfiguration);if(!r.compiled)return i;const s=this.renderingContext,o=i.getAttachment(w);if(this._update(),!this._hazeConfiguration.reduced)return i.detachDepth(),s.bindFramebuffer(i.fbo),s.bindTechnique(r,this.bindParameters,this._passParameters),this._renderCommon(s),i.attachDepth(o),i;const n=this.techniques.get(p);if(!n.compiled)return i;const a=s.getViewport(),d=this.camera,u=m(d.eye)-h.radius;let f;const _=h.atmosphereHeight;if(u<_){const e=Math.min(1,Math.max(0,u/_));f=t(.4,.5,e)}else{const e=Math.min(1,Math.max(0,(u-_)/(15*_)));f=t(.5,1,e)}const b=this.renderingContext.parameters.maxTextureSize,P=g(Math.round(f*d.fullViewport[2]),b),v=g(Math.round(f*d.fullViewport[3]),b);s.setViewport(0,0,P,v);const A=this.fboCache.acquire(P,v,"haze",5);return s.bindFramebuffer(A.fbo),s.clearFramebuffer([0,0,0,1],!0,!0),s.bindTechnique(r,this.bindParameters,this._passParameters),this._renderCommon(s),s.setViewport(a.x,a.y,a.width,a.height),this._compositingPassParameters.color=A.getTexture(),i.detachDepth(),s.bindFramebuffer(i.fbo),s.bindTechnique(n,this.bindParameters,this._compositingPassParameters),s.screen.draw(),i.attachDepth(o),A.release(),i}_renderCommon(e){this._vao??=b(e,1),e.bindVAO(this._vao),e.drawArrays(P.TRIANGLE_STRIP,0,4)}_update(){const e=this.view.basemapTerrain?.getLowerBoundRadius()??0;a(this._passParameters.radii,e,e+h.atmosphereHeight);const r=m(this.bindParameters.camera.eye);this._passParameters.hazeStrength=t(t(.6,1,i(9500,10500,r-h.radius)),1,this._amount)}};v=e([n("esri.views.3d.webgl-engine.effects.haze.Haze")],v);export{v as Haze};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ChapmanApproximationParameters as t}from"../../../environment/ChapmanApproximation.glsl.js";import{ReloadableShader as o}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../../core/shaderTechnique/ShaderTechnique.js";import{H as i}from"../../../../../chunks/Haze.glsl.js";import{Pos2TexF16 as n}from"../../lib/DefaultVertexBufferLayouts.js";import{PrimitiveType as m}from"../../../../webgl/enums.js";import{makePipelineState as a,defaultColorWrite as l,copySource as c,separateBlendingParams as p}from"../../../../webgl/renderState.js";import{fromLayout as h}from"../../../../webgl/VertexAttributeLocations.js";class u extends t{constructor(){super(...arguments),this.hazeStrength=1}}let d=class extends s{constructor(e,r){super(e,r,h(n)),this.shader=new o(i,()=>import("./Haze.glsl.js")),this.primitiveType=m.TRIANGLE_STRIP}initializePipeline(e){return e.reduced?a({blending:c,depthTest:{func:519},colorWrite:l}):a({blending:p(1,0,769,1),colorWrite:l})}};d=e([r("esri.views.3d.webgl-engine.effects.haze.HazeTechnique")],d);export{u as HazePassParameters,d as HazeTechnique};
5
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ChapmanApproximationPassParameters as t}from"../../../environment/ChapmanApproximation.glsl.js";import{ReloadableShader as o}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../../core/shaderTechnique/ShaderTechnique.js";import{H as i}from"../../../../../chunks/Haze.glsl.js";import{Pos2TexF16 as n}from"../../lib/DefaultVertexBufferLayouts.js";import{PrimitiveType as a}from"../../../../webgl/enums.js";import{makePipelineState as m,defaultColorWrite as l,copySource as c,separateBlendingParams as p}from"../../../../webgl/renderState.js";class h extends t{constructor(){super(...arguments),this.hazeStrength=1}}let u=class extends s{constructor(e,r){super(e,r,n),this.shader=new o(i,()=>import("./Haze.glsl.js")),this.primitiveType=a.TRIANGLE_STRIP}initializePipeline(e){return e.reduced?m({blending:c,depthTest:{func:519},colorWrite:l}):m({blending:p(1,0,769,1),colorWrite:l})}};u=e([r("esri.views.3d.webgl-engine.effects.haze.HazeTechnique")],u);export{h as HazePassParameters,u as HazeTechnique};