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

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 (724) hide show
  1. package/Basemap.d.ts +1 -1
  2. package/Color.js +1 -1
  3. package/PopupTemplate.d.ts +2 -2
  4. package/WebLinkChart.d.ts +1 -1
  5. package/applications/Components/QuantityFormatter.d.ts +7 -7
  6. package/applications/Components/analysisUtils.d.ts +28 -53
  7. package/applications/Components/baUtils.d.ts +8 -0
  8. package/applications/Components/featureUtils.d.ts +1 -1
  9. package/applications/Components/imageryUtils.d.ts +2 -2
  10. package/applications/Components/layerOriginUtils.d.ts +3 -3
  11. package/applications/Components/reactiveUtils.d.ts +24 -5
  12. package/applications/Excalibur/videoViewUtils.d.ts +2 -2
  13. package/applications/ExperienceBuilder/sketchUtils.d.ts +6 -6
  14. package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +7 -13
  15. package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +7 -7
  16. package/applications/KnowledgeStudio/reshape.d.ts +6 -15
  17. package/applications/MapViewer/mediaUtils.d.ts +4 -4
  18. package/applications/MapViewer/templateUtils.d.ts +3 -3
  19. package/applications/PortalApp/layerUtils.d.ts +10 -0
  20. package/applications/PortalApp/layerUtils.js +5 -0
  21. package/arcade/featureSetUtils.js +1 -1
  22. package/arcade/featureset/support/shared.js +1 -1
  23. package/arcade.d.ts +33 -17
  24. package/assets/esri/core/workers/RemoteClient.js +1 -1
  25. package/assets/esri/core/workers/chunks/{5aa354854219361f722b.js → 0099f4729c94c779ba35.js} +1 -1
  26. package/assets/esri/core/workers/chunks/00e407d262c49890afa8.js +1 -0
  27. package/assets/esri/core/workers/chunks/{15a0750c10b510564a42.js → 01d38a9ca9e88c38aab9.js} +1 -1
  28. package/assets/esri/core/workers/chunks/087cf25ca211836a084a.js +1 -0
  29. package/assets/esri/core/workers/chunks/{a3f23f08337e101e4e64.js → 097001462d93b78b64f4.js} +1 -1
  30. package/assets/esri/core/workers/chunks/0a39c6dc57bd60d5587e.js +1 -0
  31. package/assets/esri/core/workers/chunks/0d1e8d5d9abee38e275e.js +316 -0
  32. package/assets/esri/core/workers/chunks/{cef873da468668eb95cb.js → 18cc131fd63d8c15df54.js} +3 -4
  33. package/assets/esri/core/workers/chunks/{da922e861d5845ae0979.js → 1ab98591d2f2bc604505.js} +1 -1
  34. package/assets/esri/core/workers/chunks/1b2e17c04c34cfa671a1.js +1 -0
  35. package/assets/esri/core/workers/chunks/211837df0edada4414c5.js +1 -0
  36. package/assets/esri/core/workers/chunks/22b07c54a5fcc27771b0.js +1 -0
  37. package/assets/esri/core/workers/chunks/{cd8fec3500e6503ae020.js → 23a9dd9454d5249bbd59.js} +1 -1
  38. package/assets/esri/core/workers/chunks/311c4914a4f69f3c1525.js +1 -0
  39. package/assets/esri/core/workers/chunks/316f3e93aa0db48ef129.js +1 -0
  40. package/assets/esri/core/workers/chunks/{108675a17e432a02cf66.js → 35cbc61a006351620ead.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{1bf4b5e5402790ccb450.js → 369f37060608342a4262.js} +1 -1
  42. package/assets/esri/core/workers/chunks/3b5e71b156244789f624.js +1 -0
  43. package/assets/esri/core/workers/chunks/3f0959b1abafe516146e.js +1 -0
  44. package/assets/esri/core/workers/chunks/{553ca1e55e9f1359839c.js → 44c228388a95fa958827.js} +1 -1
  45. package/assets/esri/core/workers/chunks/454c15367cccbf63af7a.js +1 -0
  46. package/assets/esri/core/workers/chunks/{f3d8d5fe15501220792d.js → 495b11fdecc3ba90d454.js} +1 -1
  47. package/assets/esri/core/workers/chunks/4f33a2ecb154a2c2449c.js +1 -0
  48. package/assets/esri/core/workers/chunks/{b1d3d2c93c189e215f67.js → 5047acfd66539eefe353.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{cddce67919e13e2f365e.js → 51fd6662245b920af652.js} +1 -1
  50. package/assets/esri/core/workers/chunks/52726458f590e726d52c.js +1 -0
  51. package/assets/esri/core/workers/chunks/{d677b378449257103ec4.js → 58cf5b9a6aa685fc3367.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{395a0773ccafd1f24c4d.js → 5d31fbabaa875f8627c0.js} +1 -1
  53. package/assets/esri/core/workers/chunks/67a45faa80316f43c51b.js +1 -0
  54. package/assets/esri/core/workers/chunks/6d09965ab2bff9da88b6.js +1 -0
  55. package/assets/esri/core/workers/chunks/{521aac8a665e98e4ca78.js → 700122f775b98a7ed353.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{a92c1171314a68504c1b.js → 7353d78feba7e6302b6e.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{13ce8e8d45779b11ee12.js → 7f4fa2f2e85863d3cfb9.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{a4f89568205d78d91cfe.js → 80c36f1786ae0be00962.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{549f4ab9e285deaf04fb.js → 81d89107ff82604a3ea0.js} +1 -1
  60. package/assets/esri/core/workers/chunks/8208c073e606973ea1ad.js +1 -0
  61. package/assets/esri/core/workers/chunks/{62ed6b45482e39d67785.js → 893a5ab0c2df9262efd8.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{1f0c7ab33e466a37c7f9.js → 8c1f1eb36198ce40ef13.js} +1 -1
  63. package/assets/esri/core/workers/chunks/92928c56b312e1514600.js +1 -0
  64. package/assets/esri/core/workers/chunks/94929cf2b9fc66a93882.js +1 -0
  65. package/assets/esri/core/workers/chunks/94f02082a006003ef5a9.js +1 -0
  66. package/assets/esri/core/workers/chunks/951e3c911a3486b1e609.js +1 -0
  67. package/assets/esri/core/workers/chunks/{54666586754949bfa584.js → 983356eb4fd0a0dcf3fd.js} +1 -1
  68. package/assets/esri/core/workers/chunks/a16e75ff5cd9b22be197.js +1 -0
  69. package/assets/esri/core/workers/chunks/{36d9208895abd1ba4ff1.js → a623676c74745e040a2a.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{1065fd655bb7cee243fd.js → a624dd283d264dce35a8.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{2dfaead2ec6434513d45.js → a6742abe3ebe371e85f1.js} +1 -1
  72. package/assets/esri/core/workers/chunks/acc7ff44bfcb5c195114.js +1 -0
  73. package/assets/esri/core/workers/chunks/ad92427bf597a6e0a299.js +1 -0
  74. package/assets/esri/core/workers/chunks/{640085b5ade5c7f16228.js → b285de471ca90f38ec25.js} +1 -1
  75. package/assets/esri/core/workers/chunks/b8f83a272fc41765031d.js +1 -0
  76. package/assets/esri/core/workers/chunks/{19270a2de33f2662005b.js → b93f2bd6429879f92143.js} +1 -1
  77. package/assets/esri/core/workers/chunks/be6cc8a1485961f22372.js +1 -0
  78. package/assets/esri/core/workers/chunks/{bf5a120bc0c4851dbb69.js → bef2a70d382515b3c84e.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{e2973e5626e5039209f9.js → c448540065690cac0744.js} +1 -1
  80. package/assets/esri/core/workers/chunks/cc67f066c3c0c2a1a37c.js +33 -0
  81. package/assets/esri/core/workers/chunks/{95057105f1b3bf805140.js → cd2ea924cb91cdb6dde9.js} +1 -1
  82. package/assets/esri/core/workers/chunks/d199deff988eaefe18b4.js +1 -0
  83. package/assets/esri/core/workers/chunks/{2ef4c0092c59a98a5532.js → d54988c21ea5667d00b7.js} +1 -1
  84. package/assets/esri/core/workers/chunks/d94a2ad5a91de7086fbe.js +1 -0
  85. package/assets/esri/core/workers/chunks/{23396a6318edf9264c1f.js → dcf6f7001f470f76bd3e.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{cd39a53ef74f47604977.js → e03c706e327f4989280a.js} +1 -1
  87. package/assets/esri/core/workers/chunks/e47535f795b15608a6cb.js +1 -0
  88. package/assets/esri/core/workers/chunks/e572ffc1d000e4e6325f.js +1 -0
  89. package/assets/esri/core/workers/chunks/ed38c1043e6a83f49f93.js +1 -0
  90. package/assets/esri/core/workers/chunks/{11ab10668632648b2ba7.js → f2e8abb556a380cc2941.js} +1 -1
  91. package/assets/esri/core/workers/chunks/f44f358db5c56d5bbc0c.js +1 -0
  92. package/assets/esri/core/workers/chunks/fa95c9248fbfab338f2e.js +1 -0
  93. package/chunks/ComponentShader.glsl.js +29 -29
  94. package/chunks/Haze.glsl.js +15 -21
  95. package/config.d.ts +1 -1
  96. package/config.js +1 -1
  97. package/core/Collection.d.ts +1 -1
  98. package/core/Error.d.ts +1 -1
  99. package/core/Evented.d.ts +1 -1
  100. package/core/accessorSupport/decorators.d.ts +1 -1
  101. package/core/colorUtils.js +1 -1
  102. package/editing/sharedTemplates/SharedTemplate.d.ts +1 -1
  103. package/editing/sharedTemplates/SharedTemplateMetadata.d.ts +1 -1
  104. package/geometry/Mesh.d.ts +1 -2
  105. package/geometry/coordinateFormatter.d.ts +1 -1
  106. package/geometry/projectionUtils.js +1 -1
  107. package/geometry/support/MeshMaterial.d.ts +1 -1
  108. package/geometry/support/MeshMaterialMetallicRoughness.d.ts +1 -1
  109. package/geometry/support/MeshTexture.d.ts +1 -1
  110. package/geometry/support/meshUtils/{interfaces.d.ts → types.d.ts} +10 -1
  111. package/geometry/support/meshUtils.d.ts +1 -1
  112. package/geometry/support/normalizeUtils.d.ts +1 -1
  113. package/geometry/support/typeUtils.d.ts +3 -1
  114. package/geometry/support/typeUtils.js +1 -1
  115. package/geometry/types.d.ts +5 -0
  116. package/interfaces.d.ts +758 -786
  117. package/intl/date.d.ts +1 -1
  118. package/kernel.js +1 -1
  119. package/layers/CSVLayer.d.ts +3 -3
  120. package/layers/CatalogLayer.d.ts +1 -1
  121. package/layers/FeatureLayer.d.ts +1 -1
  122. package/layers/GaussianSplatLayer.d.ts +22 -0
  123. package/layers/GeoJSONLayer.d.ts +3 -3
  124. package/layers/ImageryTileLayer.d.ts +9 -9
  125. package/layers/MapImageLayer.d.ts +2 -2
  126. package/layers/OrientedImageryLayer.d.ts +2 -2
  127. package/layers/ParquetLayer.d.ts +1 -1
  128. package/layers/RouteLayer.d.ts +3 -3
  129. package/layers/SceneLayer.d.ts +3 -3
  130. package/layers/SubtypeGroupLayer.d.ts +1 -1
  131. package/layers/VectorTileLayer.d.ts +3 -3
  132. package/layers/VideoLayer.d.ts +2 -2
  133. package/layers/WCSLayer.d.ts +1 -1
  134. package/layers/WFSLayer.d.ts +3 -3
  135. package/layers/catalog/CatalogFootprintLayer.d.ts +3 -3
  136. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  137. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  138. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  139. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -2
  140. package/layers/knowledgeGraph/layerUtils.js +1 -1
  141. package/layers/mixins/ArcGISImageService.d.ts +7 -7
  142. package/layers/mixins/BlendLayer.d.ts +2 -2
  143. package/layers/mixins/EditBusLayer.d.ts +6 -0
  144. package/layers/mixins/FeatureLayerBase.d.ts +2 -2
  145. package/layers/mixins/ImageryTileMixin.d.ts +4 -4
  146. package/layers/mixins/properties/ILayerWithGetFeatureTitle.d.ts +1 -1
  147. package/layers/ogc/wcsUtils.d.ts +1 -1
  148. package/layers/orientedImagery/transformations/imageToWorld.d.ts +2 -2
  149. package/layers/orientedImagery/transformations/{interfaces.d.ts → types.d.ts} +1 -1
  150. package/layers/orientedImagery/transformations/worldToImage.d.ts +2 -2
  151. package/layers/raster/datasets/wcsCapabilitiesParser.d.ts +1 -1
  152. package/layers/raster/datasets/wcsCoverageParser.d.ts +1 -1
  153. package/layers/raster/functions/creators/createAppearenceFunctions.d.ts +2 -2
  154. package/layers/raster/functions/creators/createBandIndexFunctions.d.ts +1 -1
  155. package/layers/raster/functions/creators/createChangeFunctions.d.ts +1 -1
  156. package/layers/raster/functions/creators/createConversionFunctions.d.ts +1 -1
  157. package/layers/raster/functions/creators/createDataManagementFunctions.d.ts +2 -2
  158. package/layers/raster/functions/creators/createLocalFunctions.d.ts +1 -1
  159. package/layers/raster/functions/creators/createMultiRasterAnalysisFunctions.d.ts +1 -1
  160. package/layers/raster/functions/creators/createStatisticsFunctions.d.ts +1 -1
  161. package/layers/raster/functions/creators/createSurfaceFunctions.d.ts +1 -1
  162. package/layers/support/ControlPoint.d.ts +3 -3
  163. package/layers/support/ControlPointsGeoreference.d.ts +6 -6
  164. package/layers/support/EditingCapabilities.d.ts +2 -2
  165. package/layers/support/FeatureEffect.d.ts +3 -3
  166. package/layers/support/LabelClass.d.ts +1 -1
  167. package/layers/support/RasterInfo.d.ts +1 -1
  168. package/layers/support/SpriteSource.d.ts +1 -1
  169. package/layers/support/StreamConnection.d.ts +1 -1
  170. package/layers/support/Sublayer.d.ts +1 -1
  171. package/layers/support/SubtypeSublayer.d.ts +2 -2
  172. package/layers/support/TimeInfo.d.ts +1 -1
  173. package/layers/support/capabilities.js +1 -1
  174. package/layers/support/layerUtils.js +1 -1
  175. package/layers/support/rasterFunctionUtils.d.ts +1 -1
  176. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  177. package/layers/support/{interfaces.d.ts → types.d.ts} +6 -6
  178. package/layers/{interfaces.d.ts → types.d.ts} +18 -1
  179. package/linkChart/ChronologicalLayoutSettings.d.ts +1 -1
  180. package/linkChart/OrganicLayoutSettings.d.ts +1 -1
  181. package/networks/Network.d.ts +4 -4
  182. package/networks/UtilityNetwork.d.ts +8 -8
  183. package/networks/support/TopologyValidationJobInfo.d.ts +1 -1
  184. package/networks/support/TraceJobInfo.d.ts +1 -1
  185. package/package.json +1 -1
  186. package/popup/content/CustomContent.d.ts +1 -1
  187. package/portal/PortalItem.d.ts +1 -1
  188. package/portal/PortalItemResource.d.ts +1 -1
  189. package/portal/PortalUser.d.ts +2 -2
  190. package/renderers/FlowRenderer.d.ts +1 -1
  191. package/renderers/RasterStretchRenderer.d.ts +2 -2
  192. package/renderers/Renderer.d.ts +1 -1
  193. package/renderers/VectorFieldRenderer.d.ts +1 -1
  194. package/renderers/mixins/VisualVariablesMixin.d.ts +3 -3
  195. package/renderers/support/AuthoringInfo.d.ts +1 -1
  196. package/renderers/support/rasterRendererHelper.d.ts +1 -1
  197. package/renderers/support/renderingInfoUtils.js +1 -1
  198. package/renderers/{interfaces.d.ts → types.d.ts} +3 -1
  199. package/renderers/visualVariables/SizeVariable.d.ts +1 -1
  200. package/renderers/visualVariables/VisualVariable.d.ts +1 -1
  201. package/request/{interfaces.d.ts → types.d.ts} +10 -10
  202. package/request.d.ts +4 -4
  203. package/rest/closestFacility.d.ts +1 -1
  204. package/rest/featureService/FeatureService.d.ts +1 -1
  205. package/rest/featureService/FeatureService.js +1 -1
  206. package/rest/featureService/{interfaces.d.ts → types.d.ts} +16 -3
  207. package/rest/featureService/utils.d.ts +1 -1
  208. package/rest/find.d.ts +1 -1
  209. package/rest/geometryService.d.ts +1 -1
  210. package/rest/geoprocessor.d.ts +1 -1
  211. package/rest/identify.d.ts +1 -1
  212. package/rest/imageService.d.ts +5 -5
  213. package/rest/knowledgeGraphService.d.ts +19 -19
  214. package/rest/lastMileDelivery.d.ts +1 -1
  215. package/rest/locator.d.ts +1 -1
  216. package/rest/networkService.d.ts +1 -1
  217. package/rest/networks/queryAssociations.d.ts +1 -1
  218. package/rest/networks/synthesizeAssociationGeometries.d.ts +1 -1
  219. package/rest/networks/trace.d.ts +1 -1
  220. package/rest/places.d.ts +1 -1
  221. package/rest/print.d.ts +2 -2
  222. package/rest/query.d.ts +2 -2
  223. package/rest/route.d.ts +1 -1
  224. package/rest/serviceArea.d.ts +1 -1
  225. package/rest/support/AddressToLocationsParameters.d.ts +1 -1
  226. package/rest/support/AddressesToLocationsParameters.d.ts +1 -1
  227. package/rest/support/AttributeBinsQuery.d.ts +3 -3
  228. package/rest/support/JobInfo.d.ts +2 -2
  229. package/rest/support/LastMileDeliveryParameters.d.ts +1 -1
  230. package/rest/support/LocationToAddressParameters.d.ts +1 -1
  231. package/rest/support/ParameterValue.d.ts +1 -1
  232. package/rest/support/ProjectParameters.d.ts +1 -1
  233. package/rest/symbolService.d.ts +3 -3
  234. package/smartMapping/heuristics/binLevel.d.ts +1 -1
  235. package/smartMapping/heuristics/scaleRange.d.ts +1 -1
  236. package/smartMapping/heuristics/sizeRange.d.ts +1 -1
  237. package/smartMapping/heuristics/{interfaces.d.ts → types.d.ts} +1 -1
  238. package/smartMapping/popup/clusters.d.ts +1 -1
  239. package/smartMapping/popup/templates.d.ts +1 -1
  240. package/smartMapping/raster/renderers/classBreaks.d.ts +2 -2
  241. package/smartMapping/raster/renderers/colormap.d.ts +1 -1
  242. package/smartMapping/raster/renderers/flow.d.ts +4 -4
  243. package/smartMapping/raster/renderers/rgb.d.ts +2 -2
  244. package/smartMapping/raster/renderers/shadedRelief.d.ts +1 -1
  245. package/smartMapping/raster/renderers/stretch.d.ts +2 -2
  246. package/smartMapping/raster/renderers/{interfaces.d.ts → types.d.ts} +1 -1
  247. package/smartMapping/raster/renderers/uniqueValue.d.ts +1 -1
  248. package/smartMapping/raster/renderers/vectorField.d.ts +1 -1
  249. package/smartMapping/raster/support/utils.d.ts +1 -1
  250. package/smartMapping/renderers/color.d.ts +4 -4
  251. package/smartMapping/renderers/dotDensity.d.ts +3 -3
  252. package/smartMapping/renderers/heatmap.d.ts +3 -3
  253. package/smartMapping/renderers/location.d.ts +2 -2
  254. package/smartMapping/renderers/opacity.d.ts +3 -3
  255. package/smartMapping/renderers/pieChart.d.ts +3 -3
  256. package/smartMapping/renderers/predominance.d.ts +2 -2
  257. package/smartMapping/renderers/relationship.d.ts +4 -4
  258. package/smartMapping/renderers/size.d.ts +4 -4
  259. package/smartMapping/renderers/support/rendererUtils.d.ts +1 -1
  260. package/smartMapping/renderers/type.d.ts +3 -3
  261. package/smartMapping/renderers/univariateColorSize.d.ts +4 -4
  262. package/smartMapping/statistics/classBreaks.d.ts +2 -2
  263. package/smartMapping/statistics/heatmapStatistics.d.ts +2 -2
  264. package/smartMapping/statistics/histogram.d.ts +1 -2
  265. package/smartMapping/statistics/predominantCategories.d.ts +2 -2
  266. package/smartMapping/statistics/summaryStatistics.d.ts +2 -2
  267. package/smartMapping/statistics/summaryStatisticsForAge.d.ts +1 -1
  268. package/smartMapping/statistics/support/ageUtils.d.ts +1 -1
  269. package/smartMapping/statistics/types.d.ts +571 -0
  270. package/smartMapping/statistics/uniqueValues.d.ts +2 -2
  271. package/smartMapping/symbology/color.d.ts +1 -1
  272. package/smartMapping/symbology/dotDensity.d.ts +1 -1
  273. package/smartMapping/symbology/flow.d.ts +1 -1
  274. package/smartMapping/symbology/heatmap.d.ts +1 -1
  275. package/smartMapping/symbology/location.d.ts +1 -1
  276. package/smartMapping/symbology/pieChart.d.ts +1 -1
  277. package/smartMapping/symbology/predominance.d.ts +1 -1
  278. package/smartMapping/symbology/relationship.d.ts +1 -1
  279. package/smartMapping/symbology/size.d.ts +1 -1
  280. package/smartMapping/symbology/support/colorRamps.d.ts +1 -1
  281. package/smartMapping/symbology/type.d.ts +1 -1
  282. package/smartMapping/types.d.ts +18 -0
  283. package/support/revision.js +1 -1
  284. package/support/tests/setupServiceMocksMesh.js +1 -1
  285. package/support/timeUtils.d.ts +1 -1
  286. package/symbols/LineStyleMarker3D.d.ts +1 -1
  287. package/symbols/LineSymbol3DLayer.d.ts +1 -1
  288. package/symbols/LineSymbolMarker.d.ts +1 -1
  289. package/symbols/PathSymbol3DLayer.d.ts +1 -1
  290. package/symbols/SimpleLineSymbol.d.ts +1 -1
  291. package/symbols/patterns/LineStylePattern3D.d.ts +1 -1
  292. package/symbols/patterns/StylePattern3D.d.ts +1 -1
  293. package/symbols/support/ElevationInfo.d.ts +1 -1
  294. package/symbols/support/Symbol3DOutline.d.ts +1 -1
  295. package/symbols/support/symbolUtils.d.ts +2 -2
  296. package/time/TimeExtent.d.ts +1 -1
  297. package/unionTypes.d.ts +3 -3
  298. package/versionManagement/VersionManagementService.d.ts +1 -1
  299. package/versionManagement/VersionManager.d.ts +3 -3
  300. package/versionManagement/VersioningState.d.ts +1 -1
  301. package/versionManagement/utils.d.ts +1 -1
  302. package/versionManagement/versionAdapters/utils.d.ts +7 -7
  303. package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
  304. package/views/2d/analysis/ElevationProfile/ElevationProfileVisualization2D.js +1 -1
  305. package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +1 -2
  306. package/views/2d/engine/vectorTiles/style/StyleProperty.js +1 -1
  307. package/views/2d/layers/BaseLayerView2D.d.ts +2 -2
  308. package/views/2d/layers/BaseLayerViewGL2D.d.ts +9 -9
  309. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  310. package/views/2d/{layers/support/interfaces.d.ts → types.d.ts} +68 -1
  311. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  312. package/views/3d/analysis/Dimension/DimensionVisualization.js +1 -1
  313. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  314. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  315. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
  316. package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
  317. package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization3D.js +1 -1
  318. package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +1 -2
  319. package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
  320. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  321. package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
  322. package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +2 -2
  323. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  324. package/views/3d/analysis/Slice/ResizeManipulator.js +1 -1
  325. package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
  326. package/views/3d/analysis/Slice/ShiftManipulator.js +1 -1
  327. package/views/3d/analysis/Viewshed/ViewshedArrowManipulator.js +1 -1
  328. package/views/3d/analysis/Viewshed/ViewshedConfiguration.js +1 -1
  329. package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
  330. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
  331. package/views/3d/analysis/Viewshed/viewshedToolManipulatorUtils.js +1 -1
  332. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  333. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  334. package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
  335. package/views/3d/environment/ChapmanRaymarching.glsl.js +6 -7
  336. package/views/3d/environment/PrecipitationTechnique.js +1 -1
  337. package/views/3d/environment/SimpleAtmosphereTechnique.js +1 -1
  338. package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
  339. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  340. package/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation.js +1 -1
  341. package/views/3d/interactive/editingTools/manipulations/MoveXYDiscManipulation.js +1 -1
  342. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  343. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  344. package/views/3d/interactive/editingTools/settings.js +1 -1
  345. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
  346. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  347. package/views/3d/layers/I3SMeshView3D.js +1 -1
  348. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  349. package/views/3d/layers/SceneLayerWorker.js +1 -1
  350. package/views/3d/layers/{I3SMeshWorkerHandle.js → SceneLayerWorkerHandle.js} +1 -1
  351. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  352. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  353. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  354. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  355. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  356. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  357. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  358. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  359. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  360. package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +1 -1
  361. package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
  362. package/views/3d/layers/support/edgeUtils.js +1 -1
  363. package/views/3d/support/flow/geometryUtils.js +1 -1
  364. package/views/3d/support/viewpointUtils.js +1 -1
  365. package/views/3d/terrain/BlendLayersTechnique.js +1 -1
  366. package/views/3d/terrain/RasterColorizerTechnique.js +1 -1
  367. package/views/3d/terrain/TerrainRenderer.js +1 -1
  368. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  369. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  370. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  371. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  372. package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js +1 -2
  373. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +18 -27
  374. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  375. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  376. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +1 -1
  377. package/views/3d/webgl-engine/effects/focusArea/FocusAreaOutlineItem.js +1 -1
  378. package/views/3d/webgl-engine/effects/haze/HazeTechnique.js +1 -1
  379. package/views/3d/webgl-engine/effects/highlight/HighlightApplyTechnique.js +1 -1
  380. package/views/3d/webgl-engine/effects/highlight/HighlightBlurTechnique.js +1 -1
  381. package/views/3d/webgl-engine/effects/highlight/HighlightToSingleTechnique.js +1 -1
  382. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  383. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathData.js +1 -1
  384. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechnique.js +1 -1
  385. package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
  386. package/views/3d/webgl-engine/lib/CutFillColor.js +1 -1
  387. package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
  388. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  389. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  390. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechnique.js +1 -1
  391. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  392. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  393. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  394. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  395. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  396. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  397. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  398. package/views/3d/webgl-engine/shaders/CutFillMaskTechnique.js +1 -1
  399. package/views/3d/webgl-engine/shaders/CutFillTargetDepthTechnique.js +1 -1
  400. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  401. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  402. package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
  403. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  404. package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
  405. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  406. package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
  407. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  408. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  409. package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
  410. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  411. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  412. package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
  413. package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
  414. package/views/LinkChartView.d.ts +5 -5
  415. package/views/Magnifier.d.ts +1 -1
  416. package/views/MapView.d.ts +11 -12
  417. package/views/PopupView.d.ts +1 -1
  418. package/views/SceneView.d.ts +6 -7
  419. package/views/SceneViewHitTestResult.d.ts +1 -1
  420. package/views/View2D.d.ts +8 -8
  421. package/views/analysis/ElevationProfile/ElevationProfileHoveredPointVisualization.js +1 -1
  422. package/views/analysis/ElevationProfile/ElevationProfileResult.d.ts +1 -1
  423. package/views/analysis/ElevationProfile/types.d.ts +68 -0
  424. package/views/analysis/types.d.ts +2 -2
  425. package/views/draw/Draw.d.ts +1 -1
  426. package/views/draw/DrawAction.d.ts +1 -1
  427. package/views/input/IViewEvents.d.ts +1 -1
  428. package/views/interactive/Tooltip.d.ts +1 -1
  429. package/views/interactive/sketch/SketchValueOptions.d.ts +1 -1
  430. package/views/interactive/tooltip/types.d.ts +4 -0
  431. package/views/layers/BuildingComponentSublayerView.d.ts +1 -1
  432. package/views/layers/BuildingSceneLayerView.d.ts +1 -1
  433. package/views/layers/ImageryLayerViewMixin.d.ts +1 -1
  434. package/views/layers/PointCloudLayerView.d.ts +1 -1
  435. package/views/navigation/NavigationActionMap.d.ts +1 -1
  436. package/views/support/colorUtils.d.ts +1 -1
  437. package/views/{interfaces.d.ts → types.d.ts} +91 -5
  438. package/views/ui/DefaultUI.d.ts +1 -1
  439. package/views/ui/UI.d.ts +1 -1
  440. package/webdoc/widgets/FloorFilter.d.ts +2 -2
  441. package/webdoc/widgets/TimeSlider.d.ts +5 -5
  442. package/webmap/InitialViewProperties.d.ts +2 -2
  443. package/webscene/Environment.d.ts +3 -3
  444. package/webscene/InitialViewProperties.d.ts +0 -1
  445. package/webscene/Slide.d.ts +36 -4
  446. package/webscene/Slide.js +1 -1
  447. package/webscene/support/SlidePopupInfo.d.ts +2 -2
  448. package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.d.ts +1 -1
  449. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.d.ts +7 -1
  450. package/widgets/AreaMeasurement3D.d.ts +1 -0
  451. package/widgets/Attachments/AttachmentsViewModel.d.ts +1 -1
  452. package/widgets/Attachments.d.ts +1 -1
  453. package/widgets/Attribution/AttributionViewModel.d.ts +2 -2
  454. package/widgets/BasemapGallery/support/LocalBasemapsSource.d.ts +1 -1
  455. package/widgets/BasemapGallery/support/PortalBasemapsSource.d.ts +1 -1
  456. package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +2 -2
  457. package/widgets/BasemapLayerList.d.ts +1 -1
  458. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +4 -4
  459. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +1 -1
  460. package/widgets/BatchAttributeForm/inputs/EditableInput.d.ts +1 -1
  461. package/widgets/BatchAttributeForm/inputs/GroupInput.d.ts +1 -1
  462. package/widgets/BatchAttributeForm/inputs/InputBase.d.ts +1 -1
  463. package/widgets/BatchAttributeForm/inputs/SingleFeatureInput.d.ts +1 -1
  464. package/widgets/BatchAttributeForm.d.ts +1 -1
  465. package/widgets/Bookmarks/BookmarksViewModel.d.ts +5 -5
  466. package/widgets/Bookmarks/{interfaces.d.ts → types.d.ts} +1 -1
  467. package/widgets/Bookmarks.d.ts +5 -5
  468. package/widgets/BuildingExplorer/BuildingExplorerViewModel.d.ts +1 -0
  469. package/widgets/BuildingExplorer/BuildingLevel.d.ts +1 -0
  470. package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.d.ts +1 -0
  471. package/widgets/BuildingExplorer/BuildingPhase.d.ts +1 -0
  472. package/widgets/BuildingExplorer.d.ts +3 -0
  473. package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +2 -2
  474. package/widgets/CatalogLayerList.d.ts +1 -1
  475. package/widgets/Compass/CompassViewModel.d.ts +1 -1
  476. package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +4 -4
  477. package/widgets/CoordinateConversion/support/Conversion.d.ts +1 -1
  478. package/widgets/CoordinateConversion/support/Format.d.ts +2 -2
  479. package/widgets/CoordinateConversion.d.ts +1 -1
  480. package/widgets/Daylight/DaylightViewModel.d.ts +3 -1
  481. package/widgets/Daylight/VisibleElements.d.ts +3 -0
  482. package/widgets/Daylight/types.d.ts +6 -0
  483. package/widgets/Daylight.d.ts +4 -2
  484. package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.d.ts +7 -1
  485. package/widgets/DirectLineMeasurement3D.d.ts +1 -0
  486. package/widgets/Directions/DirectionsViewModel.d.ts +3 -3
  487. package/widgets/Directions.d.ts +3 -3
  488. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.d.ts +1 -1
  489. package/widgets/Editor/CreateFeaturesWorkflow.d.ts +1 -1
  490. package/widgets/Editor/CreateFeaturesWorkflowData.d.ts +2 -2
  491. package/widgets/Editor/EditorViewModel.d.ts +5 -5
  492. package/widgets/Editor/MergeFeaturesWorkflow.d.ts +1 -1
  493. package/widgets/Editor/SplitFeatureWorkflow.d.ts +1 -1
  494. package/widgets/Editor/SplitFeatureWorkflowData.d.ts +1 -1
  495. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  496. package/widgets/Editor/UpdateFeaturesWorkflow.d.ts +1 -1
  497. package/widgets/Editor/UpdateFeaturesWorkflowData.d.ts +1 -1
  498. package/widgets/Editor/UpdateWorkflow.d.ts +1 -1
  499. package/widgets/Editor/Workflow.d.ts +1 -1
  500. package/widgets/Editor/support/EditorEditingCapabilities.d.ts +9 -9
  501. package/widgets/Editor/support/EditorItem.d.ts +4 -4
  502. package/widgets/Editor/support/SketchController.js +1 -1
  503. package/widgets/Editor/{interfaces.d.ts → types.d.ts} +1 -1
  504. package/widgets/Editor.d.ts +9 -9
  505. package/widgets/ElevationProfile/ElevationProfileLine.d.ts +2 -1
  506. package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +1 -0
  507. package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +1 -0
  508. package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +2 -1
  509. package/widgets/ElevationProfile/ElevationProfileLineView.d.ts +2 -0
  510. package/widgets/ElevationProfile/ElevationProfileViewModel.d.ts +3 -5
  511. package/widgets/ElevationProfile/ElevationProfileVisibleElements.d.ts +3 -0
  512. package/widgets/ElevationProfile/support/ProfileLines3D.js +1 -1
  513. package/widgets/ElevationProfile/types.d.ts +149 -0
  514. package/widgets/ElevationProfile.d.ts +6 -5
  515. package/widgets/Expand/ExpandViewModel.d.ts +1 -1
  516. package/widgets/Expand.d.ts +2 -2
  517. package/widgets/Feature/FeatureViewModel.d.ts +5 -5
  518. package/widgets/Feature.d.ts +2 -2
  519. package/widgets/FeatureForm/EditableInput.d.ts +1 -1
  520. package/widgets/FeatureForm/FeatureFormViewModel.d.ts +3 -3
  521. package/widgets/FeatureForm/GroupInput.d.ts +1 -1
  522. package/widgets/FeatureForm.d.ts +2 -2
  523. package/widgets/FeatureTable/AttachmentsColumn.d.ts +1 -1
  524. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +3 -4
  525. package/widgets/FeatureTable/Grid/Column.d.ts +2 -3
  526. package/widgets/FeatureTable/Grid/{support/interfaces.d.ts → types.d.ts} +57 -0
  527. package/widgets/FeatureTable/RelationshipColumn.d.ts +1 -1
  528. package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +2 -3
  529. package/widgets/FeatureTable/support/interfaces.d.ts +2 -3
  530. package/widgets/FeatureTable.d.ts +3 -4
  531. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.d.ts +4 -4
  532. package/widgets/FeatureTemplates/TemplateItem.d.ts +1 -1
  533. package/widgets/FeatureTemplates/{interfaces.d.ts → types.d.ts} +1 -1
  534. package/widgets/FeatureTemplates.d.ts +3 -3
  535. package/widgets/Features/FeaturesViewModel.d.ts +11 -11
  536. package/widgets/Features.d.ts +10 -10
  537. package/widgets/Histogram/HistogramViewModel.d.ts +3 -3
  538. package/widgets/Histogram.d.ts +3 -3
  539. package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.d.ts +3 -3
  540. package/widgets/HistogramRangeSlider.d.ts +11 -11
  541. package/widgets/LayerList/LayerListViewModel.d.ts +1 -1
  542. package/widgets/LayerList/ListItem.d.ts +1 -1
  543. package/widgets/LayerList.d.ts +1 -1
  544. package/widgets/Legend/LegendViewModel.d.ts +1 -1
  545. package/widgets/Legend/support/ActiveLayerInfo.d.ts +1 -1
  546. package/widgets/Legend.d.ts +1 -1
  547. package/widgets/LineOfSight/LineOfSightTarget.d.ts +1 -0
  548. package/widgets/LineOfSight/LineOfSightViewModel.d.ts +1 -0
  549. package/widgets/LineOfSight.d.ts +1 -0
  550. package/widgets/Locate/LocateViewModel.d.ts +1 -1
  551. package/widgets/Locate.d.ts +1 -1
  552. package/widgets/Measurement/MeasurementViewModel.d.ts +2 -2
  553. package/widgets/Measurement.d.ts +1 -1
  554. package/widgets/Popup.d.ts +7 -7
  555. package/widgets/Print/CustomTemplate.d.ts +1 -1
  556. package/widgets/Print/PrintViewModel.d.ts +2 -2
  557. package/widgets/Print.d.ts +1 -1
  558. package/widgets/ScaleRangeSlider.d.ts +2 -2
  559. package/widgets/Search/LocatorSearchSource.d.ts +2 -2
  560. package/widgets/Search/SearchSource.d.ts +3 -3
  561. package/widgets/Search/types.d.ts +64 -0
  562. package/widgets/Search.d.ts +1 -1
  563. package/widgets/ShadowCast/ShadowCastViewModel.d.ts +1 -1
  564. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  565. package/widgets/Sketch/SketchViewModel.d.ts +5 -5
  566. package/widgets/Sketch/{support/interfaces.d.ts → types.d.ts} +17 -17
  567. package/widgets/Sketch.d.ts +1 -1
  568. package/widgets/Slice/SliceViewModel.d.ts +1 -0
  569. package/widgets/Slice.d.ts +1 -0
  570. package/widgets/Slider/SliderViewModel.d.ts +3 -3
  571. package/widgets/Slider/{interfaces.d.ts → types.d.ts} +2 -2
  572. package/widgets/Slider.d.ts +4 -4
  573. package/widgets/Swipe/SwipeViewModel.d.ts +1 -1
  574. package/widgets/Swipe.d.ts +1 -1
  575. package/widgets/TableList/ListItem.d.ts +1 -1
  576. package/widgets/TableList/TableListViewModel.d.ts +2 -2
  577. package/widgets/TableList.d.ts +1 -1
  578. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +5 -5
  579. package/widgets/TimeSlider.d.ts +14 -15
  580. package/widgets/TimeZoneLabel.d.ts +1 -2
  581. package/widgets/Track/TrackViewModel.d.ts +1 -1
  582. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  583. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.d.ts +2 -2
  584. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
  585. package/widgets/ValuePicker/ValuePickerSlider.d.ts +1 -1
  586. package/widgets/ValuePicker.d.ts +2 -2
  587. package/widgets/VersionManagement/VersionManagementViewModel.d.ts +3 -3
  588. package/widgets/Weather/VisibleElements.d.ts +3 -0
  589. package/widgets/Weather/WeatherViewModel.d.ts +2 -1
  590. package/widgets/Weather/types.d.ts +9 -0
  591. package/widgets/Weather.d.ts +1 -0
  592. package/widgets/Widget.d.ts +2 -1
  593. package/widgets/smartMapping/BinaryColorSizeSlider.d.ts +0 -3
  594. package/widgets/smartMapping/ClassedColorSlider/ClassedColorSliderViewModel.d.ts +1 -3
  595. package/widgets/smartMapping/ClassedColorSlider.d.ts +2 -2
  596. package/widgets/smartMapping/ClassedSizeSlider/ClassedSizeSliderViewModel.d.ts +1 -2
  597. package/widgets/smartMapping/ClassedSizeSlider.d.ts +2 -2
  598. package/widgets/smartMapping/ColorSizeSlider/ColorSizeSliderViewModel.d.ts +5 -5
  599. package/widgets/smartMapping/ColorSizeSlider.d.ts +3 -2
  600. package/widgets/smartMapping/ColorSlider/ColorSliderViewModel.d.ts +1 -1
  601. package/widgets/smartMapping/ColorSlider.d.ts +1 -1
  602. package/widgets/smartMapping/HeatmapSlider/HeatmapSliderViewModel.d.ts +2 -4
  603. package/widgets/smartMapping/HeatmapSlider.d.ts +2 -4
  604. package/widgets/smartMapping/OpacitySlider/OpacitySliderViewModel.d.ts +1 -1
  605. package/widgets/smartMapping/OpacitySlider.d.ts +1 -1
  606. package/widgets/smartMapping/SizeSlider.d.ts +2 -2
  607. package/widgets/smartMapping/SmartMappingPrimaryHandleSliderViewModel.d.ts +2 -2
  608. package/widgets/smartMapping/SmartMappingSliderBase.d.ts +11 -14
  609. package/widgets/smartMapping/SmartMappingSliderViewModel.d.ts +5 -6
  610. package/widgets/smartMapping/{support/interfaces.d.ts → types.d.ts} +52 -5
  611. package/widgets/support/GeolocationPositioning.d.ts +1 -1
  612. package/widgets/support/GridControls/GridControlsViewModel.d.ts +1 -1
  613. package/widgets/support/goToUtils.d.ts +1 -1
  614. package/widgets/{interfaces.d.ts → types.d.ts} +71 -15
  615. package/arcade/featureset/support/shared.d.ts +0 -16
  616. package/assets/esri/core/workers/chunks/0359ac6d938e0df936d0.js +0 -1
  617. package/assets/esri/core/workers/chunks/1db058f91a8e17b24db6.js +0 -1
  618. package/assets/esri/core/workers/chunks/1e286fb7bb833f00dd88.js +0 -1
  619. package/assets/esri/core/workers/chunks/262232437d37a7460b11.js +0 -1
  620. package/assets/esri/core/workers/chunks/2d6fa00273a73d44297d.js +0 -1
  621. package/assets/esri/core/workers/chunks/2fae37f34b28a46841e3.js +0 -1
  622. package/assets/esri/core/workers/chunks/3b1471f908fdecec2815.js +0 -1
  623. package/assets/esri/core/workers/chunks/48b3906ac3ec57253d90.js +0 -1
  624. package/assets/esri/core/workers/chunks/49b581782f63abb6dd9f.js +0 -1
  625. package/assets/esri/core/workers/chunks/4abe2c56aecc9e9b8e86.js +0 -1
  626. package/assets/esri/core/workers/chunks/51b78eca012eac92dd07.js +0 -1
  627. package/assets/esri/core/workers/chunks/5ce524e0060053f35592.js +0 -316
  628. package/assets/esri/core/workers/chunks/5d244fcf5c075afccdc6.js +0 -1
  629. package/assets/esri/core/workers/chunks/6b8c15f3970289e73a47.js +0 -1
  630. package/assets/esri/core/workers/chunks/6cfcfebe9a4c491e453a.js +0 -1
  631. package/assets/esri/core/workers/chunks/710b29729f252f11115d.js +0 -1
  632. package/assets/esri/core/workers/chunks/72a520802b8accfd4512.js +0 -1
  633. package/assets/esri/core/workers/chunks/73892ac79b24b05e6863.js +0 -33
  634. package/assets/esri/core/workers/chunks/75d8244b725a2aee2003.js +0 -1
  635. package/assets/esri/core/workers/chunks/93b139be6488a1b4ba19.js +0 -1
  636. package/assets/esri/core/workers/chunks/a5e7c9517939f762c518.js +0 -1
  637. package/assets/esri/core/workers/chunks/a63ff3e9a9f3853d12f3.js +0 -1
  638. package/assets/esri/core/workers/chunks/a81a7cba815adb575c36.js +0 -1
  639. package/assets/esri/core/workers/chunks/a8fd635d1165db8616ab.js +0 -1
  640. package/assets/esri/core/workers/chunks/b638ce18b93d3cfb9967.js +0 -1
  641. package/assets/esri/core/workers/chunks/ba7e97b1e324118b8156.js +0 -1
  642. package/assets/esri/core/workers/chunks/c0d6336c10b4081c4e32.js +0 -1
  643. package/assets/esri/core/workers/chunks/cc4ae105e727d9211d82.js +0 -1
  644. package/assets/esri/core/workers/chunks/d7a62504e00989202c45.js +0 -1
  645. package/assets/esri/core/workers/chunks/e25be3b6b67ce6b03011.js +0 -1
  646. package/assets/esri/core/workers/chunks/e5ac9b048b16fef9840c.js +0 -1
  647. package/assets/esri/core/workers/chunks/efa95c50d1ed8e74219f.js +0 -1
  648. package/assets/esri/core/workers/chunks/f379fd459a103f42d447.js +0 -1
  649. package/assets/esri/core/workers/chunks/ffcdc7ae03b0570e0db8.js +0 -1
  650. package/geometry/interfaces.d.ts +0 -2
  651. package/geometry/support/interfaces.d.ts +0 -3
  652. package/geometry/support/meshUtils/exporters/gltf/interfaces.d.ts +0 -11
  653. package/renderers/support/interfaces.d.ts +0 -2
  654. package/smartMapping/statistics/interfaces.d.ts +0 -571
  655. package/smartMapping/support/adapters/interfaces.d.ts +0 -18
  656. package/views/2d/interfaces.d.ts +0 -67
  657. package/views/analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js +0 -5
  658. package/views/analysis/ElevationProfile/interfaces.d.ts +0 -73
  659. package/views/interactive/sketch/interfaces.d.ts +0 -2
  660. package/views/interactive/tooltip/interfaces.d.ts +0 -2
  661. package/views/support/interfaces.d.ts +0 -87
  662. package/widgets/Daylight/support/daylightUtils.d.ts +0 -4
  663. package/widgets/ElevationProfile/ElevationProfileInteraction.d.ts +0 -13
  664. package/widgets/ElevationProfile/elevationProfileLineTypes.d.ts +0 -6
  665. package/widgets/ElevationProfile/interfaces.d.ts +0 -103
  666. package/widgets/ElevationProfile/support/constants.d.ts +0 -14
  667. package/widgets/FeatureTable/Grid/interfaces.d.ts +0 -57
  668. package/widgets/Search/support/interfaces.d.ts +0 -67
  669. package/widgets/Weather/enums.d.ts +0 -9
  670. package/widgets/smartMapping/ClassedColorSlider/interfaces.d.ts +0 -19
  671. package/widgets/smartMapping/ClassedSizeSlider/interfaces.d.ts +0 -18
  672. package/widgets/smartMapping/interfaces.d.ts +0 -13
  673. package/widgets/support/interfaces.d.ts +0 -56
  674. /package/analysis/{interfaces.d.ts → types.d.ts} +0 -0
  675. /package/core/accessorSupport/{interfaces.d.ts → types.d.ts} +0 -0
  676. /package/core/{interfaces.d.ts → types.d.ts} +0 -0
  677. /package/editing/sharedTemplates/{interfaces.d.ts → types.d.ts} +0 -0
  678. /package/editing/{interfaces.d.ts → types.d.ts} +0 -0
  679. /package/layers/effects/{interfaces.d.ts → types.d.ts} +0 -0
  680. /package/layers/orientedImagery/{interfaces.d.ts → types.d.ts} +0 -0
  681. /package/layers/raster/datasets/{interfaces.d.ts → types.d.ts} +0 -0
  682. /package/layers/raster/functions/{interfaces.d.ts → types.d.ts} +0 -0
  683. /package/linkChart/{interfaces.d.ts → types.d.ts} +0 -0
  684. /package/popup/{interfaces.d.ts → types.d.ts} +0 -0
  685. /package/rest/lastMileDelivery/{interfaces.d.ts → types.d.ts} +0 -0
  686. /package/rest/{interfaces.d.ts → types.d.ts} +0 -0
  687. /package/smartMapping/popup/{interfaces.d.ts → types.d.ts} +0 -0
  688. /package/smartMapping/raster/support/adapters/{interfaces.d.ts → types.d.ts} +0 -0
  689. /package/smartMapping/symbology/{interfaces.d.ts → types.d.ts} +0 -0
  690. /package/statistics/{interfaces.d.ts → types.d.ts} +0 -0
  691. /package/symbols/support/{interfaces.d.ts → types.d.ts} +0 -0
  692. /package/symbols/{interfaces.d.ts → types.d.ts} +0 -0
  693. /package/time/{interfaces.d.ts → types.d.ts} +0 -0
  694. /package/versionManagement/versionAdapters/{interfaces.d.ts → types.d.ts} +0 -0
  695. /package/views/2d/analysis/{interfaces.d.ts → types.d.ts} +0 -0
  696. /package/views/3d/analysis/{interfaces.d.ts → types.d.ts} +0 -0
  697. /package/views/3d/{interfaces.d.ts → types.d.ts} +0 -0
  698. /package/views/draw/{interfaces.d.ts → types.d.ts} +0 -0
  699. /package/views/input/{interfaces.d.ts → types.d.ts} +0 -0
  700. /package/views/navigation/{interfaces.d.ts → types.d.ts} +0 -0
  701. /package/views/ui/{interfaces.d.ts → types.d.ts} +0 -0
  702. /package/widgets/Attachments/{interfaces.d.ts → types.d.ts} +0 -0
  703. /package/widgets/BasemapGallery/{interfaces.d.ts → types.d.ts} +0 -0
  704. /package/widgets/BasemapLayerList/{interfaces.d.ts → types.d.ts} +0 -0
  705. /package/widgets/BatchAttributeForm/inputs/{interfaces.d.ts → types.d.ts} +0 -0
  706. /package/widgets/BatchAttributeForm/{interfaces.d.ts → types.d.ts} +0 -0
  707. /package/widgets/CatalogLayerList/{interfaces.d.ts → types.d.ts} +0 -0
  708. /package/widgets/Feature/{interfaces.d.ts → types.d.ts} +0 -0
  709. /package/widgets/FeatureForm/{interfaces.d.ts → types.d.ts} +0 -0
  710. /package/widgets/Histogram/{interfaces.d.ts → types.d.ts} +0 -0
  711. /package/widgets/HistogramRangeSlider/{interfaces.d.ts → types.d.ts} +0 -0
  712. /package/widgets/LayerList/{interfaces.d.ts → types.d.ts} +0 -0
  713. /package/widgets/Measurement/{interfaces.d.ts → types.d.ts} +0 -0
  714. /package/widgets/OrientedImageryViewer/{interfaces.d.ts → types.d.ts} +0 -0
  715. /package/widgets/Popup/{interfaces.d.ts → types.d.ts} +0 -0
  716. /package/widgets/Print/{interfaces.d.ts → types.d.ts} +0 -0
  717. /package/widgets/ScaleRangeSlider/{interfaces.d.ts → types.d.ts} +0 -0
  718. /package/widgets/Swipe/{interfaces.d.ts → types.d.ts} +0 -0
  719. /package/widgets/TableList/{interfaces.d.ts → types.d.ts} +0 -0
  720. /package/widgets/TimeSlider/{interfaces.d.ts → types.d.ts} +0 -0
  721. /package/widgets/Track/{interfaces.d.ts → types.d.ts} +0 -0
  722. /package/widgets/ValuePicker/{interfaces.d.ts → types.d.ts} +0 -0
  723. /package/widgets/support/GridControls/{interfaces.d.ts → types.d.ts} +0 -0
  724. /package/widgets/support/forms/{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 e from"../../../../Color.js";import"../../../../core/has.js";import t from"../../../../core/Logger.js";import{ONES as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{f as i,s as o}from"../../../../chunks/vec42.js";import{fromValues as s,ONES as n,ZEROS as a,fromArray as l}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{closeRings as p}from"../../../../geometry/support/coordsUtils.js";import{defaultSymbolLayerComplexity as c}from"./defaultSymbolComplexity.js";import{ElevationContext as d}from"./ElevationContext.js";import{zeroContext as h}from"./featureExpressionInfoUtils.js";import{mixinColorAndOpacity as u}from"./graphicUtils.js";import{Loadable as y}from"./Loadable.js";import{getAttributeValue as f}from"../support/FastSymbolUpdates.js";import{encodeNaNUInt8 as v}from"../support/symbolColorUtils.js";const g=()=>t.getLogger("esri.views.3d.layers.graphics.Graphics3DSymbolLayer");class m extends y{constructor(e,t,r,i,o=!0){super(r.schedule),this.symbol=e,this.symbolLayer=t,this._context=r,this._drivenOpacityFallbackAlwaysOpaque=o,this.ignoreDrivers=!1,this._drivenProperties={color:!1,opacity:!1,opacityAlwaysOpaque:!0,size:!1,rotation:!1},this._materials=[],this.logger=g(),this._elevationOptions={supportsOffsetAdjustment:!1,supportsOnTheGround:!0},this.skipHighSymbolLodsChanged=!0,this._renderPriority=i.renderPriority,this._renderPriorityStep=i.renderPriorityStep,this._elevationContext=new d,this.updateComplexity(),this.ignoreDrivers=i.ignoreDrivers,this.ignoreDrivers||(this._drivenProperties=_(this._context.renderer,o)),this._updateElevationContext()}destroy(){this.complexity=null,this._materials.length=0,super.destroy()}get view(){return this._context.stage.view}getCachedSize(){return null}get extentPadding(){return 0}get materials(){return this._materials}get estimatedMemory(){const{complexity:e}=this;if(null==e)return 0;return(this.draped?e.memory.draped:e.memory).bytesPerFeature}get usedMemory(){return this.estimatedMemory}_drivenPropertiesChanged(e){if(this.ignoreDrivers)return!1;const t=this._drivenProperties,r=_(e,this._drivenOpacityFallbackAlwaysOpaque);return r.color!==t.color||r.opacity!==t.opacity||r.opacityAlwaysOpaque!==t.opacityAlwaysOpaque||r.size!==t.size||r.rotation!==t.rotation}get needsDrivenTransparentPass(){return this._hasDrivenColorOrOpacity&&!this._drivenProperties.opacityAlwaysOpaque}get _hasDrivenColorOrOpacity(){return this._drivenProperties.color||this._drivenProperties.opacity}_logGeometryCreationWarnings(e,t,r,i){const o=e.projectionSuccess,s="polygons"in e?e.polygons:null,n=`${i} geometry failed to be created`;o?!this._logGeometryValidationWarnings(t,r,i)&&0===s?.length&&"rings"===r&&t.length>0&&t[0].length>2&&g().warnOncePerTick(`${n} (filled rings should use clockwise winding - try reversing the order of vertices)`):g().warnOncePerTick(`${n} (failed to project geometry to view spatial reference)`)}get needsUpdateFocus(){return!1}_logGeometryValidationWarnings(e,t,r){const i=`${r} geometry failed to be created`;return!e.length||1===e.length&&!e[0].length?(g().warnOncePerTick(`${i} (no ${t} were defined)`),!0):(!Array.isArray(e)||!Array.isArray(e[0]))&&(g().warnOncePerTick(`${i} (${t} should be defined as a 2D array)`),!0)}_validateGeometry(e,t=null,r=null){if(null!=t&&!t.includes(e.type))return this.logger.warn("unsupported geometry type for "+r+` symbol: ${e.type}`),!1;switch(e.type){case"point":{const t=e;if(!isFinite(t.x)||!isFinite(t.y))return g().warn("point coordinate is not a valid number, graphic skipped"),!1;break}case"polygon":p(e)}return!0}_defaultElevationInfoNoZ(){return x}_defaultElevationInfoZ(){return C}_updateElevationContext(){null!=this._elevationInfoOverride?(this._elevationContext.setFromElevationInfo(this._elevationInfoOverride),this._elevationContext.setFeatureExpressionInfoContext(null)):this._context.layer.elevationInfo?(this._elevationContext.setFromElevationInfo(this._context.layer.elevationInfo),this._elevationContext.setFeatureExpressionInfoContext(this._context.featureExpressionInfoContext)):this._elevationContext.reset()}getDefaultElevationInfo(e){return e.hasZ?this._defaultElevationInfoZ():this._defaultElevationInfoNoZ()}getGeometryElevationMode(e,t=this.getDefaultElevationInfo(e)){return this._elevationContext.mode||t.mode}setElevationInfoOverride(e){this._elevationInfoOverride=e,this._updateElevationContext()}createElevationContextForGraphic(e){const t=new d;return this.updateElevationContextForGraphic(t,e),t}updateElevationContextForGraphic(e,t){const r=t.geometry,i=this.getDefaultElevationInfo(r);e.unit=null!=this._elevationContext.unit?this._elevationContext.unit:i.unit,e.mode=this.getGeometryElevationMode(r,i),e.offsetMeters=this._elevationContext.meterUnitOffset??i.offset??0;const o=!this._elevationOptions.supportsOnTheGround&&"on-the-ground"===e.mode;o&&(e.mode="relative-to-ground",e.offsetMeters=0);const s=o?h:this._elevationContext.featureExpressionInfoContext;s?e.updateFeatureExpressionInfoContextForGraphic(s,t,this._context.layer):e.setFeatureExpressionInfoContext(null)}prepareSymbolLayerPatch(e){}onRemoveGraphic(e){}_getLayerOpacity(){if(this._context.graphicsCoreOwner&&"fullOpacity"in this._context.graphicsCoreOwner)return this._context.graphicsCoreOwner.fullOpacity??0;const e=this._context.layer.opacity;return e??1}_getCombinedOpacity(e,t=b){const r=this.draped?1:this._getLayerOpacity();return this._drivenProperties.color?r:e?r*(this._drivenProperties.opacity?1:e.a):t.hasIntrinsicColor?r:0}_getCombinedOpacityAndColor(t,i=b){const o=this._getCombinedOpacity(t,i);if(this._drivenProperties.color)return u(null,o);const s=null!=t?e.toUnitRGB(t):r;return u(s,o)}_getDrivenUInt8Color({color:t,opacity:r},i,o){const{color:s,opacity:l}=this._drivenProperties,p=e.toUnitRGBA(i)??(o?n:a),c=s?t??p:null,d=t||i||o,h=s?null:p[3];return u(c,l&&d?r??h:null,255)}_getDrivenUInt8ColorWithNaNSupport({color:t,opacity:r},n,a){const p=n?l(e.toUnitRGBA(n)):s(NaN,NaN,NaN,a?NaN:0);return this._drivenProperties.color&&null!=t&&i(p,t),this._drivenProperties.opacity&&null!=r&&(p[3]=r),o(p,p,255),v(p,p)}isFastUpdatesEnabled(){return null!=this._fastUpdates}updateComplexity(){this.complexity=this.computeComplexity()}computeComplexity(){return c(this.symbol,this.symbolLayer)}globalPropertyChanged(e,t,r){switch(e){case"opacity":return this.layerOpacityChanged(t,r),!0;case"screenSizePerspectiveEnabled":return this.layerScreenSizePerspectiveChanged(t,r),!0;case"elevationInfo":{const e=this._elevationContext.mode;this._updateElevationContext();return 2!==this.layerElevationInfoChanged(t,r,e)}case"slicePlaneEnabled":return this.slicePlaneEnabledChanged(t,r);case"physicalBasedRenderingEnabled":return this.physicalBasedRenderingChanged();case"pixelRatio":return this.pixelRatioChanged;case"skipHighSymbolLods":return this.skipHighSymbolLodsChanged;default:return!1}}get pixelRatioChanged(){return!0}updateGraphics3DGraphicElevationInfo(e,t,r){let i=1;return e?.forEach(e=>{const o=t(e);if(null!=o){const t=e.graphic;this.updateElevationContextForGraphic(o.elevationContext,t),o.needsElevationUpdates=r(o.elevationContext.mode)}else i=2}),i}applyRendererDiff(e,t){return 0}getFastUpdateAttrValues(e){if(!this._fastUpdates)return null;const t=this._fastUpdates.visualVariables,r=t.size?f(t.size.field,e):0,i=t.color?f(t.color.field,e):0,o=t.opacity?f(t.opacity.field,e):0;return s(r,i,o,0)}get draped(){return this._draped}ensureDrapedStatus(e){return null==this._draped?(this._draped=e,!0):(e!==this.draped&&g().warnOnce("A symbol can only produce either draped or non-draped visualizations. Use two separate symbol instances for draped and non-draped graphics if necessary."),!1)}test(){const e=()=>({size:this._fastUpdates?.visualVariables.size?.field??null,color:this._fastUpdates?.visualVariables.color?.field??null,opacity:this._fastUpdates?.visualVariables.opacity?.field??null,rotation:this._fastUpdates?.visualVariables.rotation?.field??null});return{drivenProperties:this._drivenProperties,getVisVarFields:e}}}function _(e,t){const r={color:!1,opacity:!1,opacityAlwaysOpaque:t,size:!1,rotation:!1};return e&&"visualVariables"in e&&e.visualVariables&&e.visualVariables.forEach(e=>{switch(e.type){case"color":if(r.color=!0,e.stops)for(let t=0;t<e.stops.length;t++){const i=e.stops[t].color;i&&i.a<1&&(r.opacityAlwaysOpaque=!1)}break;case"opacity":r.opacity=!0,r.opacityAlwaysOpaque=!1;break;case"size":r.size=!0;break;case"rotation":r.rotation=!0}}),r}const x={mode:"on-the-ground",offset:0,unit:"meters"},C={mode:"absolute-height",offset:0,unit:"meters"},b={hasIntrinsicColor:!1},O=s(NaN,NaN,NaN,NaN);export{m as Graphics3DSymbolLayer,_ as getDrivenProperties,O as nanFallbackColor};
5
+ import"../../../../core/has.js";import e from"../../../../core/Logger.js";import{ONES as t}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{f as r,s as i}from"../../../../chunks/vec42.js";import{fromValues as o,ONES as s,ZEROS as n,fromArray as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{closeRings as l}from"../../../../geometry/support/coordsUtils.js";import{defaultSymbolLayerComplexity as p}from"./defaultSymbolComplexity.js";import{ElevationContext as c}from"./ElevationContext.js";import{zeroContext as d}from"./featureExpressionInfoUtils.js";import{mixinColorAndOpacity as h}from"./graphicUtils.js";import{Loadable as u}from"./Loadable.js";import{getAttributeValue as y}from"../support/FastSymbolUpdates.js";import{encodeNaNUInt8 as f}from"../support/symbolColorUtils.js";const v=()=>e.getLogger("esri.views.3d.layers.graphics.Graphics3DSymbolLayer");class g extends u{constructor(e,t,r,i,o=!0){super(r.schedule),this.symbol=e,this.symbolLayer=t,this._context=r,this._drivenOpacityFallbackAlwaysOpaque=o,this.ignoreDrivers=!1,this._drivenProperties={color:!1,opacity:!1,opacityAlwaysOpaque:!0,size:!1,rotation:!1},this._materials=[],this.logger=v(),this._elevationOptions={supportsOffsetAdjustment:!1,supportsOnTheGround:!0},this.skipHighSymbolLodsChanged=!0,this._renderPriority=i.renderPriority,this._renderPriorityStep=i.renderPriorityStep,this._elevationContext=new c,this.updateComplexity(),this.ignoreDrivers=i.ignoreDrivers,this.ignoreDrivers||(this._drivenProperties=m(this._context.renderer,o)),this._updateElevationContext()}destroy(){this.complexity=null,this._materials.length=0,super.destroy()}get view(){return this._context.stage.view}getCachedSize(){return null}get extentPadding(){return 0}get materials(){return this._materials}get estimatedMemory(){const{complexity:e}=this;if(null==e)return 0;return(this.draped?e.memory.draped:e.memory).bytesPerFeature}get usedMemory(){return this.estimatedMemory}_drivenPropertiesChanged(e){if(this.ignoreDrivers)return!1;const t=this._drivenProperties,r=m(e,this._drivenOpacityFallbackAlwaysOpaque);return r.color!==t.color||r.opacity!==t.opacity||r.opacityAlwaysOpaque!==t.opacityAlwaysOpaque||r.size!==t.size||r.rotation!==t.rotation}get needsDrivenTransparentPass(){return this._hasDrivenColorOrOpacity&&!this._drivenProperties.opacityAlwaysOpaque}get _hasDrivenColorOrOpacity(){return this._drivenProperties.color||this._drivenProperties.opacity}_logGeometryCreationWarnings(e,t,r,i){const o=e.projectionSuccess,s="polygons"in e?e.polygons:null,n=`${i} geometry failed to be created`;o?!this._logGeometryValidationWarnings(t,r,i)&&0===s?.length&&"rings"===r&&t.length>0&&t[0].length>2&&v().warnOncePerTick(`${n} (filled rings should use clockwise winding - try reversing the order of vertices)`):v().warnOncePerTick(`${n} (failed to project geometry to view spatial reference)`)}get needsUpdateFocus(){return!1}_logGeometryValidationWarnings(e,t,r){const i=`${r} geometry failed to be created`;return!e.length||1===e.length&&!e[0].length?(v().warnOncePerTick(`${i} (no ${t} were defined)`),!0):(!Array.isArray(e)||!Array.isArray(e[0]))&&(v().warnOncePerTick(`${i} (${t} should be defined as a 2D array)`),!0)}_validateGeometry(e,t=null,r=null){if(null!=t&&!t.includes(e.type))return this.logger.warn("unsupported geometry type for "+r+` symbol: ${e.type}`),!1;switch(e.type){case"point":{const t=e;if(!isFinite(t.x)||!isFinite(t.y))return v().warn("point coordinate is not a valid number, graphic skipped"),!1;break}case"polygon":l(e)}return!0}_defaultElevationInfoNoZ(){return _}_defaultElevationInfoZ(){return x}_updateElevationContext(){null!=this._elevationInfoOverride?(this._elevationContext.setFromElevationInfo(this._elevationInfoOverride),this._elevationContext.setFeatureExpressionInfoContext(null)):this._context.layer.elevationInfo?(this._elevationContext.setFromElevationInfo(this._context.layer.elevationInfo),this._elevationContext.setFeatureExpressionInfoContext(this._context.featureExpressionInfoContext)):this._elevationContext.reset()}getDefaultElevationInfo(e){return e.hasZ?this._defaultElevationInfoZ():this._defaultElevationInfoNoZ()}getGeometryElevationMode(e,t=this.getDefaultElevationInfo(e)){return this._elevationContext.mode||t.mode}setElevationInfoOverride(e){this._elevationInfoOverride=e,this._updateElevationContext()}createElevationContextForGraphic(e){const t=new c;return this.updateElevationContextForGraphic(t,e),t}updateElevationContextForGraphic(e,t){const r=t.geometry,i=this.getDefaultElevationInfo(r);e.unit=null!=this._elevationContext.unit?this._elevationContext.unit:i.unit,e.mode=this.getGeometryElevationMode(r,i),e.offsetMeters=this._elevationContext.meterUnitOffset??i.offset??0;const o=!this._elevationOptions.supportsOnTheGround&&"on-the-ground"===e.mode;o&&(e.mode="relative-to-ground",e.offsetMeters=0);const s=o?d:this._elevationContext.featureExpressionInfoContext;s?e.updateFeatureExpressionInfoContextForGraphic(s,t,this._context.layer):e.setFeatureExpressionInfoContext(null)}prepareSymbolLayerPatch(e){}onRemoveGraphic(e){}_getLayerOpacity(){if(this._context.graphicsCoreOwner&&"fullOpacity"in this._context.graphicsCoreOwner)return this._context.graphicsCoreOwner.fullOpacity??0;const e=this._context.layer.opacity;return e??1}_getCombinedOpacity(e,t=C){const r=this.draped?1:this._getLayerOpacity();return this._drivenProperties.color?r:e?r*(this._drivenProperties.opacity?1:e.a):t.hasIntrinsicColor?r:0}_getCombinedOpacityAndColor(e,r=C){const i=this._getCombinedOpacity(e,r);if(this._drivenProperties.color)return h(null,i);const o=e?.toUnitRGB()??t;return h(o,i)}_getDrivenUInt8Color({color:e,opacity:t},r,i){const{color:o,opacity:a}=this._drivenProperties,l=r?.toUnitRGBA()??(i?s:n),p=o?e??l:null,c=e||r||i,d=o?null:l[3];return h(p,a&&c?t??d:null,255)}_getDrivenUInt8ColorWithNaNSupport({color:e,opacity:t},s,n){const l=s?a(s.toUnitRGBA()):o(NaN,NaN,NaN,n?NaN:0);return this._drivenProperties.color&&null!=e&&r(l,e),this._drivenProperties.opacity&&null!=t&&(l[3]=t),i(l,l,255),f(l,l)}isFastUpdatesEnabled(){return null!=this._fastUpdates}updateComplexity(){this.complexity=this.computeComplexity()}computeComplexity(){return p(this.symbol,this.symbolLayer)}globalPropertyChanged(e,t,r){switch(e){case"opacity":return this.layerOpacityChanged(t,r),!0;case"screenSizePerspectiveEnabled":return this.layerScreenSizePerspectiveChanged(t,r),!0;case"elevationInfo":{const e=this._elevationContext.mode;this._updateElevationContext();return 2!==this.layerElevationInfoChanged(t,r,e)}case"slicePlaneEnabled":return this.slicePlaneEnabledChanged(t,r);case"physicalBasedRenderingEnabled":return this.physicalBasedRenderingChanged();case"pixelRatio":return this.pixelRatioChanged;case"skipHighSymbolLods":return this.skipHighSymbolLodsChanged;default:return!1}}get pixelRatioChanged(){return!0}updateGraphics3DGraphicElevationInfo(e,t,r){let i=1;return e?.forEach(e=>{const o=t(e);if(null!=o){const t=e.graphic;this.updateElevationContextForGraphic(o.elevationContext,t),o.needsElevationUpdates=r(o.elevationContext.mode)}else i=2}),i}applyRendererDiff(e,t){return 0}getFastUpdateAttrValues(e){if(!this._fastUpdates)return null;const t=this._fastUpdates.visualVariables,r=t.size?y(t.size.field,e):0,i=t.color?y(t.color.field,e):0,s=t.opacity?y(t.opacity.field,e):0;return o(r,i,s,0)}get draped(){return this._draped}ensureDrapedStatus(e){return null==this._draped?(this._draped=e,!0):(e!==this.draped&&v().warnOnce("A symbol can only produce either draped or non-draped visualizations. Use two separate symbol instances for draped and non-draped graphics if necessary."),!1)}test(){const e=()=>({size:this._fastUpdates?.visualVariables.size?.field??null,color:this._fastUpdates?.visualVariables.color?.field??null,opacity:this._fastUpdates?.visualVariables.opacity?.field??null,rotation:this._fastUpdates?.visualVariables.rotation?.field??null});return{drivenProperties:this._drivenProperties,getVisVarFields:e}}}function m(e,t){const r={color:!1,opacity:!1,opacityAlwaysOpaque:t,size:!1,rotation:!1};return e&&"visualVariables"in e&&e.visualVariables&&e.visualVariables.forEach(e=>{switch(e.type){case"color":if(r.color=!0,e.stops)for(let t=0;t<e.stops.length;t++){const i=e.stops[t].color;i&&i.a<1&&(r.opacityAlwaysOpaque=!1)}break;case"opacity":r.opacity=!0,r.opacityAlwaysOpaque=!1;break;case"size":r.size=!0;break;case"rotation":r.rotation=!0}}),r}const _={mode:"on-the-ground",offset:0,unit:"meters"},x={mode:"absolute-height",offset:0,unit:"meters"},C={hasIntrinsicColor:!1},b=o(NaN,NaN,NaN,NaN);export{g as Graphics3DSymbolLayer,m as getDrivenProperties,b as nanFallbackColor};
@@ -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"../../../../Color.js";import{getMetersPerUnitForSR as t}from"../../../../core/units.js";import{e as r}from"../../../../chunks/earcut.js";import{set as i}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as o,create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{s}from"../../../../chunks/vec42.js";import{toRadian as a}from"../../../../core/libs/gl-matrix-2/math/common.js";import{fromBuffer as l,create as c,intersectsClippingArea as h,empty as p,expandWithAABB as m}from"../../../../geometry/support/aaBoundingBox.js";import{empty as u,create as d,expandPointInPlace as g}from"../../../../geometry/support/aaBoundingRect.js";import{newFloatArray as y,floatSubArray as f}from"../../../../geometry/support/FloatArray.js";import{perVertexElevationAligner as v}from"./ElevationAligners.js";import{elevationModeChangeUpdateType as x,needsElevationUpdates2D as _}from"./elevationAlignmentUtils.js";import{Graphics3DDrapedGraphicLayer as w}from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as b}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as D}from"./Graphics3DSymbolLayer.js";import{geometryAsPolygon as S,createWaterGeometry as C,PolygonCreationDataBase as j}from"./polygonUtils.js";import{polygonToRenderInfo as G,polygonToRenderInfoDraped as P}from"../../support/renderInfoUtils/polygon.js";import{Object3D as L}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as O}from"../../webgl-engine/lib/RenderGeometry.js";import{Parameters as A,WaterMaterial as E}from"../../webgl-engine/materials/WaterMaterial.js";import{wavePresets as T}from"../../webgl-engine/materials/internal/waterMaterialUtils.js";const U=["polyline","polygon","extent"];class B extends D{static{this.unitSizeOfTexture=100}static{this.elevationModeChangeTypes={definedChanged:2,staysOnTheGround:0,onTheGroundChanged:2}}constructor(e,t,r,i){super(e,t,r,i)}async doLoad(){}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,U,this.symbolLayer.type))return null;const r=this.createElevationContextForGraphic(t);return this.ensureDrapedStatus("on-the-ground"===r.mode),this.ensureMaterial(),this.draped?this._createAsOverlay(t):this._createAs3DShape(t,r,t.uid)}ensureMaterial(){if(this._materials[0])return;const t=new A,r=e.toUnitRGBA(this.symbolLayer.color);r[3]*=this._getLayerOpacity(),t.color=r,t.transparent=r[3]<1||this.needsDrivenTransparentPass,t.waveDirection=null!=this.symbolLayer.waveDirection?M(this.symbolLayer.waveDirection):o(0,0);const i=this.symbolLayer.waveStrength+"-"+this.symbolLayer.waterbodySize,n=T[i];t.waveStrength=n.waveStrength,t.waveTextureRepeat=n.textureRepeat,t.waveVelocity=n.waveVelocity,t.flowStrength=n.perturbationStrength,t.hasSlicePlane=this._context.slicePlaneEnabled,t.draped=this.draped,this._materials[0]=new E(t,this._context)}layerOpacityChanged(){if(null==this._materials[0])return;const e=this._materials[0].parameters.color,t=this.symbolLayer.color.a*this._getLayerOpacity(),r=t<1||this.needsDrivenTransparentPass;this._materials[0].setParameters({color:[e[0],e[1],e[2],t],transparent:r})}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,o=x(B.elevationModeChangeTypes,r,i);if(1!==o)return o;const n=_(i);return this.updateGraphics3DGraphicElevationInfo(e,t,()=>n)}slicePlaneEnabledChanged(){return this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),!0}physicalBasedRenderingChanged(){return!0}get needsDrivenTransparentPass(){return!1}_createAs3DShape(e,t,r){const i=S(e.geometry);if(null==i)return null;const o=G(i,this._context.elevationProvider,this._context.renderCoordsHelper,t),n=o.position.length/3,s=y(2*n);R(s,o.mapPositions,n,this._context.elevationProvider.spatialReference);const a=new k(o,s,this._context.layerViewUid,e.uid);if(a.olidColor=this._context.stage.renderView?.getObjectAndLayerIdColor(a),this._create3DShapeGeometries(a),this._logGeometryCreationWarnings(a.renderData,i.rings,"rings","WaterSymbol3DLayer"),0===a.outGeometries.length)return null;const l=new L({geometries:a.outGeometries,castShadow:!1,layerViewUid:this._context.layerViewUid,graphicUid:r}),c=new b(this,l,null,v,t);return c.alignedSampledElevation=a.renderData.sampledElevation,c.needsElevationUpdates=_(t.mode),c}_create3DShapeGeometries(e){const t=e.renderData.polygons,i=e.uvCoords;for(const{count:o,index:n,position:s,mapPositions:a,holeIndices:c}of t){if(null!=this._context.clippingExtent&&(l(a,W),!h(W,this._context.clippingExtent)))continue;const t=r(a,c,3);if(0===t.length)continue;const p=f(i,2*n,2*o),m=C({material:this._materials[0],indices:t,mapPositions:a,attributeData:{position:s,uv0:p}},e.olidColor);e.outGeometries.push(m)}}_createAsOverlay(e){const t=S(e.geometry);if(null==t)return null;this._materials[0].renderPriority=this._renderPriority;const r=P(t,this._context.overlaySR),i=r.position.length/3,o=y(2*i);R(o,r.position,i,this._context.overlaySR);const n=new F(r,o,this._context.layerViewUid,e.uid);return n.olidColor=this._context.stage.renderView?.getObjectAndLayerIdColor(n),n.outBoundingBox=p(),this._createAsOverlayWater(n),this._logGeometryCreationWarnings(n.renderData,t.rings,"rings","WaterSymbol3DLayer"),0===n.outGeometries.length?null:new w(this,n.outGeometries,n.outBoundingBox,this._context.drapeSourceRenderer)}_createAsOverlayWater(e){const t=e.uvCoords,i=e.renderData.polygons;for(const{position:o,holeIndices:n,index:s,count:a}of i){if(l(o,W),!h(W,this._context.clippingExtent))continue;m(e.outBoundingBox,W);const i=r(o,n,3);if(0===i.length)continue;const c=f(t,2*s,2*a),p=C({material:this._materials[0],indices:i,attributeData:{position:o,uv0:c}},e.olidColor);e.outGeometries.push(new O(p,e))}}test(){return{...super.test(),create3DShape:e=>this._createAs3DShape(e.graphic,e.elevationContext,e.graphicUid),ensureMaterial:()=>this.ensureMaterial()}}}function M(e){const t=n(),r=a(e);return t[0]=Math.sin(r),t[1]=Math.cos(r),t}function R(e,r,o,n){const a=t(n);u(z);for(let t=0;t<o;t++)i(I,r[3*t],r[3*t+1]),g(z,I);s(z,z,a);const l=z[0]%B.unitSizeOfTexture,c=z[1]%B.unitSizeOfTexture;V[0]=z[0]-l,V[1]=z[1]-c;for(let t=0;t<o;t++)e[2*t]=(r[3*t]*a-V[0])/B.unitSizeOfTexture,e[2*t+1]=(r[3*t+1]*a-V[1])/B.unitSizeOfTexture}const V=n(),z=d(),I=n(),W=c();class k extends j{constructor(e,t,r,i){super(e,r,i),this.uvCoords=t}}class F extends j{constructor(e,t,r,i){super(e,r,i),this.uvCoords=t}}export{B as Graphics3DWaterSymbolLayer,M as headingVectorFromAngle};
5
+ import{getMetersPerUnitForSR as e}from"../../../../core/units.js";import{e as t}from"../../../../chunks/earcut.js";import{set as r}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as i,create as o}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{s as n}from"../../../../chunks/vec42.js";import{toRadian as s}from"../../../../core/libs/gl-matrix-2/math/common.js";import{fromBuffer as a,create as l,intersectsClippingArea as c,empty as h,expandWithAABB as p}from"../../../../geometry/support/aaBoundingBox.js";import{empty as m,create as u,expandPointInPlace as d}from"../../../../geometry/support/aaBoundingRect.js";import{newFloatArray as g,floatSubArray as y}from"../../../../geometry/support/FloatArray.js";import{perVertexElevationAligner as f}from"./ElevationAligners.js";import{elevationModeChangeUpdateType as v,needsElevationUpdates2D as x}from"./elevationAlignmentUtils.js";import{Graphics3DDrapedGraphicLayer as _}from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as w}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as b}from"./Graphics3DSymbolLayer.js";import{geometryAsPolygon as D,createWaterGeometry as S,PolygonCreationDataBase as C}from"./polygonUtils.js";import{polygonToRenderInfo as G,polygonToRenderInfoDraped as j}from"../../support/renderInfoUtils/polygon.js";import{Object3D as P}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as L}from"../../webgl-engine/lib/RenderGeometry.js";import{Parameters as O,WaterMaterial as A}from"../../webgl-engine/materials/WaterMaterial.js";import{wavePresets as E}from"../../webgl-engine/materials/internal/waterMaterialUtils.js";const T=["polyline","polygon","extent"];class U extends b{static{this.unitSizeOfTexture=100}static{this.elevationModeChangeTypes={definedChanged:2,staysOnTheGround:0,onTheGroundChanged:2}}constructor(e,t,r,i){super(e,t,r,i)}async doLoad(){}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,T,this.symbolLayer.type))return null;const r=this.createElevationContextForGraphic(t);return this.ensureDrapedStatus("on-the-ground"===r.mode),this.ensureMaterial(),this.draped?this._createAsOverlay(t):this._createAs3DShape(t,r,t.uid)}ensureMaterial(){if(this._materials[0])return;const e=new O,t=this.symbolLayer.color.toUnitRGBA();t[3]*=this._getLayerOpacity(),e.color=t,e.transparent=t[3]<1||this.needsDrivenTransparentPass,e.waveDirection=null!=this.symbolLayer.waveDirection?B(this.symbolLayer.waveDirection):i(0,0);const r=this.symbolLayer.waveStrength+"-"+this.symbolLayer.waterbodySize,o=E[r];e.waveStrength=o.waveStrength,e.waveTextureRepeat=o.textureRepeat,e.waveVelocity=o.waveVelocity,e.flowStrength=o.perturbationStrength,e.hasSlicePlane=this._context.slicePlaneEnabled,e.draped=this.draped,this._materials[0]=new A(e,this._context)}layerOpacityChanged(){if(null==this._materials[0])return;const e=this._materials[0].parameters.color,t=this.symbolLayer.color.a*this._getLayerOpacity(),r=t<1||this.needsDrivenTransparentPass;this._materials[0].setParameters({color:[e[0],e[1],e[2],t],transparent:r})}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,o=v(U.elevationModeChangeTypes,r,i);if(1!==o)return o;const n=x(i);return this.updateGraphics3DGraphicElevationInfo(e,t,()=>n)}slicePlaneEnabledChanged(){return this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),!0}physicalBasedRenderingChanged(){return!0}get needsDrivenTransparentPass(){return!1}_createAs3DShape(e,t,r){const i=D(e.geometry);if(null==i)return null;const o=G(i,this._context.elevationProvider,this._context.renderCoordsHelper,t),n=o.position.length/3,s=g(2*n);M(s,o.mapPositions,n,this._context.elevationProvider.spatialReference);const a=new W(o,s,this._context.layerViewUid,e.uid);if(a.olidColor=this._context.stage.renderView?.getObjectAndLayerIdColor(a),this._create3DShapeGeometries(a),this._logGeometryCreationWarnings(a.renderData,i.rings,"rings","WaterSymbol3DLayer"),0===a.outGeometries.length)return null;const l=new P({geometries:a.outGeometries,castShadow:!1,layerViewUid:this._context.layerViewUid,graphicUid:r}),c=new w(this,l,null,f,t);return c.alignedSampledElevation=a.renderData.sampledElevation,c.needsElevationUpdates=x(t.mode),c}_create3DShapeGeometries(e){const r=e.renderData.polygons,i=e.uvCoords;for(const{count:o,index:n,position:s,mapPositions:l,holeIndices:h}of r){if(null!=this._context.clippingExtent&&(a(l,I),!c(I,this._context.clippingExtent)))continue;const r=t(l,h,3);if(0===r.length)continue;const p=y(i,2*n,2*o),m=S({material:this._materials[0],indices:r,mapPositions:l,attributeData:{position:s,uv0:p}},e.olidColor);e.outGeometries.push(m)}}_createAsOverlay(e){const t=D(e.geometry);if(null==t)return null;this._materials[0].renderPriority=this._renderPriority;const r=j(t,this._context.overlaySR),i=r.position.length/3,o=g(2*i);M(o,r.position,i,this._context.overlaySR);const n=new k(r,o,this._context.layerViewUid,e.uid);return n.olidColor=this._context.stage.renderView?.getObjectAndLayerIdColor(n),n.outBoundingBox=h(),this._createAsOverlayWater(n),this._logGeometryCreationWarnings(n.renderData,t.rings,"rings","WaterSymbol3DLayer"),0===n.outGeometries.length?null:new _(this,n.outGeometries,n.outBoundingBox,this._context.drapeSourceRenderer)}_createAsOverlayWater(e){const r=e.uvCoords,i=e.renderData.polygons;for(const{position:o,holeIndices:n,index:s,count:l}of i){if(a(o,I),!c(I,this._context.clippingExtent))continue;p(e.outBoundingBox,I);const i=t(o,n,3);if(0===i.length)continue;const h=y(r,2*s,2*l),m=S({material:this._materials[0],indices:i,attributeData:{position:o,uv0:h}},e.olidColor);e.outGeometries.push(new L(m,e))}}test(){return{...super.test(),create3DShape:e=>this._createAs3DShape(e.graphic,e.elevationContext,e.graphicUid),ensureMaterial:()=>this.ensureMaterial()}}}function B(e){const t=o(),r=s(e);return t[0]=Math.sin(r),t[1]=Math.cos(r),t}function M(t,i,o,s){const a=e(s);m(V);for(let e=0;e<o;e++)r(z,i[3*e],i[3*e+1]),d(V,z);n(V,V,a);const l=V[0]%U.unitSizeOfTexture,c=V[1]%U.unitSizeOfTexture;R[0]=V[0]-l,R[1]=V[1]-c;for(let e=0;e<o;e++)t[2*e]=(i[3*e]*a-R[0])/U.unitSizeOfTexture,t[2*e+1]=(i[3*e+1]*a-R[1])/U.unitSizeOfTexture}const R=o(),V=u(),z=o(),I=l();class W extends C{constructor(e,t,r,i){super(e,r,i),this.uvCoords=t}}class k extends C{constructor(e,t,r,i){super(e,r,i),this.uvCoords=t}}export{U as Graphics3DWaterSymbolLayer,B as headingVectorFromAngle};
@@ -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"../../../../../../Color.js";import{create as t}from"../../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{ONES as r}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ZEROS as i}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{defaultPrimitive as n}from"../../../../../../symbols/support/IconSymbol3DLayerResource.js";import{mixinColorAndOpacity as o}from"../../graphicUtils.js";import{namedAnchorToHUDMaterialAnchorPos as a}from"../../placementUtils.js";import{PipelineCommand as l}from"../PipelineCommand.js";import{computeTileCenterRenderCoordinates as s,readObjectIds as m,readMapCoordinates as c,projectToRenderCoordinates as d}from"../featureData/processingUtils.js";import{inputAttributesToAttributesMap as u}from"./symbolizationUtils.js";import{createTextureInfo as y,requiresHalfTexelOffset as p,defaultBoundingBox as _}from"../../../../support/engineContent/sdfPrimitives.js";import{Attribute as C}from"../../../../webgl-engine/lib/Attribute.js";class h{constructor(e,t){this._context=null,this._symbolLayer=null,this._draped=!1,this._loaded=!1,this._loadingPromise=null,this._iconTextureID=null,this._materialId=null,this._context=t,this._symbolLayer=e}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}_destroy(){this._iconTextureID=null}async _load(){const e=this._context.renderCommandContext,t=await e.createTexture(()=>y("circle"));this._iconTextureID=t;const r={anchorPosition:a.center,occlusionTest:!0,hasSlicePlane:!1,color:this._getFillColor(),outlineColor:this._getOutlineColor(),outlineSize:1,distanceFieldBoundingBox:_,textureId:t,textureIsSignedDistanceField:!0,sampleSignedDistanceFieldTexelCenter:p("circle")},i=new Uint8Array(8),n=0,o=255;i[0]=n,i[1]=n,i[2]=n,i[3]=o,i[4]=o,i[5]=n,i[6]=o,i[7]=o,this._materialId=await e.createMaterial({type:"hud",parameters:r}),await e.createDirectRenderer(this._materialId),await e.setBaseInstance(this._materialId,{data:i.buffer,elementCount:4}),this._loaded=!0}async createAddCommand(e){const{_materialId:t,_context:r}=this,{renderCommandContext:i}=r;if(null==t)throw new Error("expected material not to be null");const n=await this._createGeometry(e);if(null==n)return r.createPipelineCommand();const o=s(e,r);return r.createPipelineCommand(i.addDirectRendererGeometry(e.id,n,o))}async _createGeometry(e){const{_materialId:r,_context:i}=this,{mainThreadDelegate:n}=i,{featureCount:o}=e;if(0===o||null==r)return null;const a=m(e),l=c(e),s=await n.applyElevationAlignmentTo(l),y=d(s,i),p=new Float64Array([0,0,1]),_=new Float64Array([255,255,255,255]),h=new Float64Array([24,24]),f=new Float64Array([0,0,0,1]),g=new Float64Array([0]),x=new Uint32Array(o);for(let t=0;t<o;++t)x[t]=t;const w=new Uint32Array(o);for(let t=0;t<o;++t)w[t]=0;const b=[["position",new C(y,x,3,!0)],["normal",new C(p,w,3,!0)],["color",new C(_,w,4,!0)],["rotation",new C(g,w,1,!0)],["size",new C(h,w,2,!0)],["centerOffsetAndDistance",new C(f,w,4,!0)]],I=new Uint8Array(o);e.getVisibilityArray(I);return{attributes:u(b),olidColor:void 0,transformation:t(),materialId:r,objectIds:a,visibilities:I}}async createRemoveCommand(e){const{_materialId:t,_context:r}=this,i=r.renderCommandContext;return null==t?r.createPipelineCommand():r.createPipelineCommand(i.removeDirectRendererGeometryBuffer(t,e))}async createUpdateVisibilityCommand(e){const{_materialId:t,_context:r}=this,i=r.renderCommandContext;if(null==t)return r.createPipelineCommand();const n=new Uint8Array(e.featureCount);return e.getVisibilityArray(n),r.createPipelineCommand(i.updateVisibility(t,e.id,n))}async createUpdateLayerViewOpacityCommand(e){const{_context:t,_materialId:r}=this,i=t.renderCommandContext;return null==r?t.createPipelineCommand():t.createPipelineCommand(i.updateMaterial({type:"hud",materialId:r,parameters:{color:this._getFillColor(),outlineColor:this._getOutlineColor()}}))}async createUpdateElevationCommand(e){const{_materialId:t,_context:r}=this,{renderCommandContext:i}=r,{featureCount:n,id:o}=e;if(null==t||0===n)return r.createPipelineCommand();const a=await this._createGeometry(e);if(null==a)return r.createPipelineCommand();const l=s(e,r);return r.createPipelineCommand(i.updateDirectRendererGeometry(o,a,l))}async createDestroyCommand(){const{_iconTextureID:e,_context:t}=this,r=t.renderCommandContext;let i;return i=null!=e?await r.releaseTexture(e):l.create(r),i.appendPipelineStateCommand(()=>this._destroy()),i}_getOutlineColor(){const t=this._getLayerOpacity(),r=this._symbolLayer,i=r?.outline?.color;if(null!=i){const r=e.toUnitRGB(i),n=i.a*t;return[r[0],r[1],r[2],n]}return[0,0,0,0]}_getFillColor(){if(f(this._getPrimitive()))return w;const e=null==this._getPrimitive(),t=this._symbolLayer?.material?.color;return this._getCombinedOpacityAndColor(t,{hasIntrinsicColor:e})}_getLayerOpacity(){return this._context.layerViewInfo.fullOpacity}_getCombinedOpacity(e,t=x){const r=this._draped?1:this._getLayerOpacity();return e?r*e.a:t.hasIntrinsicColor?r:0}_getCombinedOpacityAndColor(t,i=x){const n=this._getCombinedOpacity(t,i),a=null!=t?e.toUnitRGB(t):r;return o(a,n)}_getPrimitive(){return g(this._symbolLayer)}}function f(e){return null!=e&&("cross"===e||"x"===e)}function g(e){return e.resource?.href?null:e.resource?.primitive??n}const x={hasIntrinsicColor:!1},w=i;export{h as IconSymbolLayerRenderer,x as defaultMaterialOptions,g as getPrimitive,f as isOutlineOnly,w as transparentUnit};
5
+ import{create as e}from"../../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{ONES as t}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ZEROS as r}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{defaultPrimitive as i}from"../../../../../../symbols/support/IconSymbol3DLayerResource.js";import{mixinColorAndOpacity as n}from"../../graphicUtils.js";import{namedAnchorToHUDMaterialAnchorPos as o}from"../../placementUtils.js";import{PipelineCommand as a}from"../PipelineCommand.js";import{computeTileCenterRenderCoordinates as l,readObjectIds as s,readMapCoordinates as m,projectToRenderCoordinates as c}from"../featureData/processingUtils.js";import{inputAttributesToAttributesMap as d}from"./symbolizationUtils.js";import{createTextureInfo as u,requiresHalfTexelOffset as y,defaultBoundingBox as _}from"../../../../support/engineContent/sdfPrimitives.js";import{Attribute as p}from"../../../../webgl-engine/lib/Attribute.js";class h{constructor(e,t){this._context=null,this._symbolLayer=null,this._draped=!1,this._loaded=!1,this._loadingPromise=null,this._iconTextureID=null,this._materialId=null,this._context=t,this._symbolLayer=e}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}_destroy(){this._iconTextureID=null}async _load(){const e=this._context.renderCommandContext,t=await e.createTexture(()=>u("circle"));this._iconTextureID=t;const r={anchorPosition:o.center,occlusionTest:!0,hasSlicePlane:!1,color:this._getFillColor(),outlineColor:this._getOutlineColor(),outlineSize:1,distanceFieldBoundingBox:_,textureId:t,textureIsSignedDistanceField:!0,sampleSignedDistanceFieldTexelCenter:y("circle")},i=new Uint8Array(8),n=0,a=255;i[0]=n,i[1]=n,i[2]=n,i[3]=a,i[4]=a,i[5]=n,i[6]=a,i[7]=a,this._materialId=await e.createMaterial({type:"hud",parameters:r}),await e.createDirectRenderer(this._materialId),await e.setBaseInstance(this._materialId,{data:i.buffer,elementCount:4}),this._loaded=!0}async createAddCommand(e){const{_materialId:t,_context:r}=this,{renderCommandContext:i}=r;if(null==t)throw new Error("expected material not to be null");const n=await this._createGeometry(e);if(null==n)return r.createPipelineCommand();const o=l(e,r);return r.createPipelineCommand(i.addDirectRendererGeometry(e.id,n,o))}async _createGeometry(t){const{_materialId:r,_context:i}=this,{mainThreadDelegate:n}=i,{featureCount:o}=t;if(0===o||null==r)return null;const a=s(t),l=m(t),u=await n.applyElevationAlignmentTo(l),y=c(u,i),_=new Float64Array([0,0,1]),h=new Float64Array([255,255,255,255]),C=new Float64Array([24,24]),f=new Float64Array([0,0,0,1]),g=new Float64Array([0]),x=new Uint32Array(o);for(let e=0;e<o;++e)x[e]=e;const w=new Uint32Array(o);for(let e=0;e<o;++e)w[e]=0;const b=[["position",new p(y,x,3,!0)],["normal",new p(_,w,3,!0)],["color",new p(h,w,4,!0)],["rotation",new p(g,w,1,!0)],["size",new p(C,w,2,!0)],["centerOffsetAndDistance",new p(f,w,4,!0)]],I=new Uint8Array(o);t.getVisibilityArray(I);return{attributes:d(b),olidColor:void 0,transformation:e(),materialId:r,objectIds:a,visibilities:I}}async createRemoveCommand(e){const{_materialId:t,_context:r}=this,i=r.renderCommandContext;return null==t?r.createPipelineCommand():r.createPipelineCommand(i.removeDirectRendererGeometryBuffer(t,e))}async createUpdateVisibilityCommand(e){const{_materialId:t,_context:r}=this,i=r.renderCommandContext;if(null==t)return r.createPipelineCommand();const n=new Uint8Array(e.featureCount);return e.getVisibilityArray(n),r.createPipelineCommand(i.updateVisibility(t,e.id,n))}async createUpdateLayerViewOpacityCommand(e){const{_context:t,_materialId:r}=this,i=t.renderCommandContext;return null==r?t.createPipelineCommand():t.createPipelineCommand(i.updateMaterial({type:"hud",materialId:r,parameters:{color:this._getFillColor(),outlineColor:this._getOutlineColor()}}))}async createUpdateElevationCommand(e){const{_materialId:t,_context:r}=this,{renderCommandContext:i}=r,{featureCount:n,id:o}=e;if(null==t||0===n)return r.createPipelineCommand();const a=await this._createGeometry(e);if(null==a)return r.createPipelineCommand();const s=l(e,r);return r.createPipelineCommand(i.updateDirectRendererGeometry(o,a,s))}async createDestroyCommand(){const{_iconTextureID:e,_context:t}=this,r=t.renderCommandContext;let i;return i=null!=e?await r.releaseTexture(e):a.create(r),i.appendPipelineStateCommand(()=>this._destroy()),i}_getOutlineColor(){const e=this._getLayerOpacity(),t=this._symbolLayer,r=t?.outline?.color;if(null!=r){const t=r.toUnitRGB(),i=r.a*e;return[t[0],t[1],t[2],i]}return[0,0,0,0]}_getFillColor(){if(C(this._getPrimitive()))return x;const e=null==this._getPrimitive(),t=this._symbolLayer?.material?.color;return this._getCombinedOpacityAndColor(t,{hasIntrinsicColor:e})}_getLayerOpacity(){return this._context.layerViewInfo.fullOpacity}_getCombinedOpacity(e,t=g){const r=this._draped?1:this._getLayerOpacity();return e?r*e.a:t.hasIntrinsicColor?r:0}_getCombinedOpacityAndColor(e,r=g){const i=this._getCombinedOpacity(e,r),o=e?.toUnitRGB()??t;return n(o,i)}_getPrimitive(){return f(this._symbolLayer)}}function C(e){return null!=e&&("cross"===e||"x"===e)}function f(e){return e.resource?.href?null:e.resource?.primitive??i}const g={hasIntrinsicColor:!1},x=r;export{h as IconSymbolLayerRenderer,g as defaultMaterialOptions,f as getPrimitive,C as isOutlineOnly,x as transparentUnit};
@@ -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"../../../../Color.js";import o from"../../../../core/Error.js";import{loadImage as t}from"../../../../request/loadImage.js";import{EncodedMeshTexture as r}from"../../glTF/internal/resourceUtils.js";import{useSchematicPBR as a,schematicMRRFactors as s}from"../../webgl-engine/materials/pbrUtils.js";import{alphaCutoff as n}from"../../../../webscene/support/AlphaCutoff.js";async function l(o){const t=[],r=[];if(null==o){return{material:{alphaMode:"opaque",alphaCutoff:n,doubleSided:!0,cullFace:0,normalTextureId:-1,emissiveTextureId:-1,occlusionTextureId:-1,emissiveFactor:[0,0,0],metallicRoughness:{baseColorFactor:[1,1,1,1],baseColorTextureId:-1,metallicRoughnessTextureId:-1,metallicFactor:0,roughnessFactor:.6000000238418579},wrapTextures:!1,hasParametersFromSource:!0},requiredTextures:t,textureData:r}}const l=i(o);"auto"===o.alphaMode&&console.warn('alphaMode "auto" not supported by I3S PBRMaterial - defaulting to "blend".');const c=a({normalTexture:o.normalTexture,emissiveTexture:l?o.emissiveTexture:null,emissiveFactor:l?e.toUnitRGB(o.emissiveColor):null,occlusionTexture:l?o.occlusionTexture:null,metallicRoughnessTexture:l?o.metallicRoughnessTexture:null,metallicFactor:l?o.metallic:null,roughnessFactor:l?o.roughness:null}),d=c?s[0]:l?o.metallic:0,m=c?s[1]:l?o.roughness:0;return{material:{alphaMode:"auto"===o.alphaMode?"blend":o.alphaMode,alphaCutoff:o.alphaCutoff,doubleSided:o.doubleSided,cullFace:o.doubleSided?0:2,normalTextureId:await u(o.normalTexture,t,r,4),emissiveTextureId:l?await u(o.emissiveTexture,t,r,16):-1,occlusionTextureId:l?await u(o.occlusionTexture,t,r,8):-1,emissiveFactor:l&&null!=o.emissiveColor?e.toUnitRGB(o.emissiveColor):[0,0,0],metallicRoughness:{baseColorFactor:null!=o.color?e.toUnitRGBA(o.color):[1,1,1,1],baseColorTextureId:await u(o.colorTexture,t,r,1),metallicRoughnessTextureId:l?await u(o.metallicRoughnessTexture,t,r,2):-1,metallicFactor:d,roughnessFactor:m},wrapTextures:!0,hasParametersFromSource:c},requiredTextures:t,textureData:r}}async function u(e,a,s,n){if(null==e)return-1;const l=s.length,u=e.data,i=e.url;if(null!=u){if(u instanceof HTMLImageElement||u instanceof HTMLCanvasElement)return s.push({id:l,usage:n,data:u,encoding:8}),a.push({id:l,usage:n,encodings:[{name:void 0,encoding:8}]}),l;if(u instanceof HTMLVideoElement)return-1;if(u instanceof ImageData)throw new o("scenelayer","ImageData textures not supported yet for client side I3S nodes");if(u instanceof r)return s.push({id:l,usage:n,data:u.data.buffer,encoding:1}),a.push({id:l,usage:n,encodings:[{name:void 0,encoding:1}]}),l}else if(null!=i){const e=new Image;e.src=i;const o=await t(e,e.src,!1,void 0);return s.push({id:l,usage:n,data:o,encoding:8}),a.push({id:l,usage:n,encodings:[{name:void 0,encoding:8}]}),l}return-1}function i(e){return e.hasOwnProperty("metallicRoughnessTexture")}export{l as convertMeshMaterialToPBRMaterial};
5
+ import e from"../../../../core/Error.js";import{ZEROS as t}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{loadImage as o}from"../../../../request/loadImage.js";import{EncodedMeshTexture as a}from"../../glTF/internal/resourceUtils.js";import{useSchematicPBR as r,schematicMRRFactors as s}from"../../webgl-engine/materials/pbrUtils.js";import{alphaCutoff as n}from"../../../../webscene/support/AlphaCutoff.js";async function u(e){const o=[],a=[];if(null==e){return{material:{alphaMode:"opaque",alphaCutoff:n,doubleSided:!0,cullFace:0,normalTextureId:-1,emissiveTextureId:-1,occlusionTextureId:-1,emissiveFactor:[0,0,0],metallicRoughness:{baseColorFactor:[1,1,1,1],baseColorTextureId:-1,metallicRoughnessTextureId:-1,metallicFactor:0,roughnessFactor:.6000000238418579},wrapTextures:!1,hasParametersFromSource:!0},requiredTextures:o,textureData:a}}const u=l(e);"auto"===e.alphaMode&&console.warn('alphaMode "auto" not supported by I3S PBRMaterial - defaulting to "blend".');const c=r({normalTexture:e.normalTexture,emissiveTexture:u?e.emissiveTexture:null,emissiveFactor:u&&e.emissiveColor?.toUnitRGB()||null,occlusionTexture:u?e.occlusionTexture:null,metallicRoughnessTexture:u?e.metallicRoughnessTexture:null,metallicFactor:u?e.metallic:null,roughnessFactor:u?e.roughness:null}),d=c?s[0]:u?e.metallic:0,m=c?s[1]:u?e.roughness:0;return{material:{alphaMode:"auto"===e.alphaMode?"blend":e.alphaMode,alphaCutoff:e.alphaCutoff,doubleSided:e.doubleSided,cullFace:e.doubleSided?0:2,normalTextureId:await i(e.normalTexture,o,a,4),emissiveTextureId:u?await i(e.emissiveTexture,o,a,16):-1,occlusionTextureId:u?await i(e.occlusionTexture,o,a,8):-1,emissiveFactor:u&&e.emissiveColor?.toUnitRGB()||t,metallicRoughness:{baseColorFactor:null!=e.color?e.color.toUnitRGBA():[1,1,1,1],baseColorTextureId:await i(e.colorTexture,o,a,1),metallicRoughnessTextureId:u?await i(e.metallicRoughnessTexture,o,a,2):-1,metallicFactor:d,roughnessFactor:m},wrapTextures:!0,hasParametersFromSource:c},requiredTextures:o,textureData:a}}async function i(t,r,s,n){if(null==t)return-1;const u=s.length,i=t.data,l=t.url;if(null!=i){if(i instanceof HTMLImageElement||i instanceof HTMLCanvasElement)return s.push({id:u,usage:n,data:i,encoding:8}),r.push({id:u,usage:n,encodings:[{name:void 0,encoding:8}]}),u;if(i instanceof HTMLVideoElement)return-1;if(i instanceof ImageData)throw new e("scenelayer","ImageData textures not supported yet for client side I3S nodes");if(i instanceof a)return s.push({id:u,usage:n,data:i.data.buffer,encoding:1}),r.push({id:u,usage:n,encodings:[{name:void 0,encoding:1}]}),u}else if(null!=l){const e=new Image;e.src=l;const t=await o(e,e.src,!1,void 0);return s.push({id:u,usage:n,data:t,encoding:8}),r.push({id:u,usage:n,encodings:[{name:void 0,encoding:8}]}),u}return-1}function l(e){return e.hasOwnProperty("metallicRoughnessTexture")}export{u as convertMeshMaterialToPBRMaterial};
@@ -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"../../../../Color.js";import"../../../../core/has.js";import{pt2px as n}from"../../../../core/screenUtils.js";import{fromValues as t,fromArray as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isExtrudeSymbol3DLayer as r,isFillSymbol3DLayer as i}from"./layerUtils.js";function s(e){return e&&e.enabled&&(r(e)||i(e))&&null!=e.edges}function c(e){return e&&e.enabled&&e.edges||null}function l(e,n){return u(c(e),n)}function u(r,i){if(null==r)return null;const s=null!=r.color?o(e.toUnitRGBA(r.color)):t(0,0,0,0),c=n(r.size),l=n(r.extensionLength);switch(r.type){case"solid":return a({color:s,size:c,extensionLength:l,...i});case"sketch":return f({color:s,size:c,extensionLength:l,...i});default:return}}function a(e){return{...p,...e,type:0}}function f(e){return{...h,...e,type:1}}const p={color:t(0,0,0,.2),size:1,extensionLength:0,opacity:1,objectTransparency:1,hasSlicePlane:!1},h={color:t(0,0,0,.2),size:1,extensionLength:0,opacity:1,objectTransparency:1,hasSlicePlane:!1};export{l as createMaterial,u as createMaterialFromEdges,a as createSolidEdgeMaterial,s as hasEdges};
5
+ import"../../../../core/has.js";import{pt2px as e}from"../../../../core/screenUtils.js";import{fromValues as n,fromArray as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isExtrudeSymbol3DLayer as o,isFillSymbol3DLayer as r}from"./layerUtils.js";function i(e){return e&&e.enabled&&(o(e)||r(e))&&null!=e.edges}function s(e){return e&&e.enabled&&e.edges||null}function c(e,n){return l(s(e),n)}function l(o,r){if(null==o)return null;const i=null!=o.color?t(o.color.toUnitRGBA()):n(0,0,0,0),s=e(o.size),c=e(o.extensionLength);switch(o.type){case"solid":return u({color:i,size:s,extensionLength:c,...r});case"sketch":return a({color:i,size:s,extensionLength:c,...r});default:return}}function u(e){return{...f,...e,type:0}}function a(e){return{...p,...e,type:1}}const f={color:n(0,0,0,.2),size:1,extensionLength:0,opacity:1,objectTransparency:1,hasSlicePlane:!1},p={color:n(0,0,0,.2),size:1,extensionLength:0,opacity:1,objectTransparency:1,hasSlicePlane:!1};export{c as createMaterial,l as createMaterialFromEdges,u as createSolidEdgeMaterial,i as hasEdges};
@@ -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 o from"../../../../Color.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{newFloatArray as e}from"../../../../geometry/support/FloatArray.js";import{newHalfFloatArray as r}from"../../../../geometry/support/HalfFloatArray.js";import{zValueInAbsoluteHeightMode as i}from"../../../../support/elevationInfoUtils.js";import{convertVisualVariables as s,ConvertOptions as n}from"../../layers/support/FastSymbolUpdates.js";import{animatedLineStripsToParameters as a,createGeometry as l}from"../engineContent/line.js";import{valuesPerFlowVertex as p}from"./loadUtils.js";import{drapedZ as m}from"../../terrain/OverlayRenderer.js";function c(o,t,{vertices:i,stage:s,hasMagnitude:n},c,f,d){const{spatialReference:v}=t.extent,h=[],y=p(n),g=t.flowExtentInfo.modelSize[0];let j=0;for(let e=0;e<i.length;e+=y){if(d&&e>0){const o=i[e]-i[e-y];o>g/2?j-=g:-o>g/2&&(j+=g)}const[r,s]=t.modelToMapSpace(i[e]+j,i[e+1],!1),n=d?[r,s,m]:u(r,s,v,o,c);h.push(n)}const S=Math.floor(i.length/y),V=r(S);for(let e=0;e<S;e++)V[e]=i[e*y+2];const{hasVVColor:C,hasVVOpacity:b,hasVVSize:z}=f.parameters;let w,x,R;if(n&&(C||b||z)){const o=e(S);for(let t=0;t<S;t++)o[t]=i[t*y+3];C&&(w=[o]),b&&(x=[o]),z&&(R=[o])}const U=a([h],void 0,[{timeStamps:V,streamlineType:s}],w,x,R);return l(f,U[0])}function f(t,e,r){if(null==t)return{};let i=null;if(t.visualVariables){const o=[],e=t.visualVariables,r=new n({supports:{size:!0,color:!0,rotation:!1,opacity:!0}});i=s(e,r,o)}const a=i?.color?[1,1,1,1]:o.toUnitRGBA(t.color);a[3]*=e;return{color:a,width:t.trailWidth,cap:0,animationSpeed:t.flowSpeed,trailLength:t.trailLength,animation:3,emissiveStrength:r,vvColor:i?.color,vvOpacity:i?.opacity,vvSize:i?.size}}function u(o,e,r,s,n){const{absoluteZ:a}=i(o,e,0,r,s,n),l=t(o,e,a);return s.renderCoordsHelper.toRenderCoords(l,r,l),l}export{c as createStreamlineGeometry,f as materialParametersFromRenderer};
5
+ import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{newFloatArray as o}from"../../../../geometry/support/FloatArray.js";import{newHalfFloatArray as e}from"../../../../geometry/support/HalfFloatArray.js";import{zValueInAbsoluteHeightMode as r}from"../../../../support/elevationInfoUtils.js";import{convertVisualVariables as i,ConvertOptions as s}from"../../layers/support/FastSymbolUpdates.js";import{animatedLineStripsToParameters as n,createGeometry as a}from"../engineContent/line.js";import{valuesPerFlowVertex as l}from"./loadUtils.js";import{drapedZ as p}from"../../terrain/OverlayRenderer.js";function c(t,r,{vertices:i,stage:s,hasMagnitude:c},m,u,d){const{spatialReference:v}=r.extent,h=[],y=l(c),g=r.flowExtentInfo.modelSize[0];let S=0;for(let o=0;o<i.length;o+=y){if(d&&o>0){const t=i[o]-i[o-y];t>g/2?S-=g:-t>g/2&&(S+=g)}const[e,s]=r.modelToMapSpace(i[o]+S,i[o+1],!1),n=d?[e,s,p]:f(e,s,v,t,m);h.push(n)}const j=Math.floor(i.length/y),V=e(j);for(let o=0;o<j;o++)V[o]=i[o*y+2];const{hasVVColor:b,hasVVOpacity:z,hasVVSize:C}=u.parameters;let w,x,R;if(c&&(b||z||C)){const t=o(j);for(let o=0;o<j;o++)t[o]=i[o*y+3];b&&(w=[t]),z&&(x=[t]),C&&(R=[t])}const U=n([h],void 0,[{timeStamps:V,streamlineType:s}],w,x,R);return a(u,U[0])}function m(t,o,e){if(null==t)return{};let r=null;if(t.visualVariables){const o=[],e=t.visualVariables,n=new s({supports:{size:!0,color:!0,rotation:!1,opacity:!0}});r=i(e,n,o)}const n=r?.color?[1,1,1,1]:t.color.toUnitRGBA();n[3]*=o;return{color:n,width:t.trailWidth,cap:0,animationSpeed:t.flowSpeed,trailLength:t.trailLength,animation:3,emissiveStrength:e,vvColor:r?.color,vvOpacity:r?.opacity,vvSize:r?.size}}function f(o,e,i,s,n){const{absoluteZ:a}=r(o,e,0,i,s,n),l=t(o,e,a);return s.renderCoordsHelper.toRenderCoords(l,i,l),l}export{c as createStreamlineGeometry,m as materialParametersFromRenderer};
@@ -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 t from"../../../Camera.js";import e from"../../../Graphic.js";import n from"../../../Viewpoint.js";import{result as r}from"../../../core/asyncUtils.js";import"../../../core/has.js";import{cyclicalDegrees as a}from"../../../core/Cyclical.js";import o from"../../../core/Error.js";import{throwIfAborted as i}from"../../../core/promiseUtils.js";import{fromMat4 as s,transpose as c}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as l}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{j as u,i as f,D as p,d as g,e as y,h,t as d}from"../../../chunks/vec32.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import x from"../../../geometry/Extent.js";import j from"../../../geometry/Geometry.js";import v from"../../../geometry/Multipoint.js";import b from"../../../geometry/Point.js";import{projectAsync as R,tryProject as z}from"../../../geometry/projectionUtils.js";import G from"../../../geometry/SpatialReference.js";import{computeTranslationToOriginAndRotation as B}from"../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectPointToVectorAsync as M}from"../../../geometry/projection/projectPointToVector.js";import{projectVectorToPoint as S}from"../../../geometry/projection/projectVectorToPoint.js";import{projectVectorToVector as Z}from"../../../geometry/projection/projectVectorToVector.js";import{create as F,center as T,toRect as P,isPoint as A,empty as E,expandWithVec3 as V,expandWithAABB as k,width as O,height as U,depth as N}from"../../../geometry/support/aaBoundingBox.js";import{create as I,isPoint as C}from"../../../geometry/support/aaBoundingRect.js";import{polygonCentroidPoint as D}from"../../../geometry/support/centroid.js";import{intersectsPoint as W}from"../../../geometry/support/frustum.js";import{getResolutionInMetersForScale as Y}from"../../../geometry/support/scaleUtils.js";import{fromRenderCamera as q,toRenderCamera as J}from"../webgl.js";import{cameraOnContentAlongViewDirection as X}from"../camera/intersectionUtils.js";import{getViewSR as _,fromExtentAsync as H,scaleToDistance as K,fromCenterDistanceAsync as L,fromExtentSync as Q,distanceToScale as $,fromCenterDistanceSync as tt,fromCenterScale as et,zoomToScale as nt}from"./cameraUtils.js";import{getElevationAtPoint as rt}from"./ElevationProvider.js";import{directionToHeadingTilt as at}from"./viewingModeUtils.js";const ot=.66;function it(t){return 360-a.normalize(t)}function st(t){return a.normalize(360-t)}function ct(t,e,n){const r=e.camera;if(null!=r)return mt(r,_(t));const{targetGeometry:a}=e;if(null==a)return null;const{camera:o,mode:i}=ft(t,e.rotation,n);if("point"===a.type)return pt(t,e,a,o,i);const s=a.extent;return null==s?null:Q(t,s,o.heading,o.tilt,i)}async function lt(t,e,n,r){const a=e.camera;if(null!=a)return ut(a,_(t),r);const{targetGeometry:o}=e;if(null==o)throw new Error("Viewpoint has no targetGeometry!");const{camera:i,mode:s}=ft(t,e.rotation,n);if("point"===o.type)return gt(t,e,o,i,s,r);const c=o.extent;if(null==c)throw new Error("Target geometry has no extent!");return H(t,c,i.heading,i.tilt,s,r)}function mt(t,e){const n=t.position;let r;try{r=z(n,e)}catch(o){return null}if(!r)return null;const a=t.clone();return a.position=r.clone(),a}async function ut(t,e,n){const r=t.position,a=await R(r,e,{signal:n});i(n);const o=t.clone();return o.position=a.clone(),o}function ft(t,e,n){const r=q(t,t.state.camera);let a=1;return null!=e&&(r.heading=it(e),a=0),null!=n&&(r.tilt=n),{camera:r,mode:a}}function pt(t,e,n,r,a){const o=t.spatialReference;let i;try{i=z(n.clone(),o)}catch(c){return null}if(!i)return null;const s=null!=e.scale?K(t,e.scale):t.state.camera.distance;return tt(t,i,s,r,a)}async function gt(t,e,n,r,a,o){const s=t.spatialReference,c=await R(n.clone(),s,{signal:o});i(o);const l=null!=e.scale?K(t,e.scale):t.state.camera.distance;return L(t,c,l,r,a,o)}function yt(t,e,r=null){return null==r&&(r=new n),jt(t,null,e.clone(),r)}async function ht(e,r,a){const i=At(e,r);if(!i)throw new o("viewpointutils-create:no-target","Missing target for creating viewpoint");const s=new t({fov:e.camera.fov}),c=new n({camera:s});if(i.target instanceof n){return Et(await zt(e,i.target,i,a,c))}if(i.target instanceof t)return Et(await Gt(e,i.target,a,c));const l=null!=i.scale||null!=i.zoom;if(i.target instanceof x){const t=i.target.xmin===i.target.xmax||i.target.ymin===i.target.ymax;return Et(l||t?await Mt(e,i,i.target.center,s,a,c):await Ft(e,i,i.target,s,a,c))}const m=new kt,u=l?wt(e,i):void 0;if(await Rt(e,i.target,u,m,a),isFinite(m.boundingBox[0])){let t;if(T(m.boundingBox,Ot),Jt.x=Ot[0],Jt.y=Ot[1],Jt.z=Ot[2],Jt.spatialReference=e.spatialReference,isFinite(Jt.z)&&m.hasZ?t=A(m.boundingBox):(Jt.z=void 0,t=C(P(m.boundingBox,Ct))),l||t)return Et(await Mt(e,i,Jt,s,a,c));const n=Vt(e,m.screenSpaceObjects);return Et(await Pt(e,i,Jt,m.boundingBox,n,s,a,c))}return i.position?Et(await St(e,i,s,c,a)):Et(await Zt(e,i,s,a,c))}function dt(t,e){return null==e.scale&&null!=e.zoom?nt(t,e.zoom):e.scale}function wt(t,e){const n=dt(t,e);return n?Y(n):void 0}function xt(t,e){let n=!1;return null!=e.heading?(t.heading=e.heading,n=!0):null!=e.rotation&&(t.heading=it(e.rotation),n=!0),null!=e.tilt&&(t.tilt=e.tilt,n=!0),null!=e.fov&&(t.fov=e.fov),n}function jt(t,e,n,r){const a=t.spatialReference||G.WGS84;if(e??=J(t,n),null==e)return r;const o=new b({spatialReference:a});return S(e.center,t.renderSpatialReference,o)?(r.targetGeometry=o,r.scale=$(t,e.distance),r.rotation=st(n.heading),r.camera=n,r):r}async function vt(t,e,n,r){const a=()=>new o("viewpointutils:invalid-geometry","The target is missing a valid geometry");if(!e)throw a();"mesh"===e.type&&(e=e.extent);const i=t.basemapTerrain.spatialReference;if(!e.hasZ&&t.basemapTerrain){let n;switch(e.type){case"point":n=e;break;case"multipoint":case"polyline":n=e.extent?.center;break;case"extent":n=e.center;break;case"polygon":{const t=D(e);n=t?b.fromJSON(t):null;break}}null!=n&&i&&t.elevationProvider?(n=await R(n,i,{signal:r}),Ot[2]=rt(t.elevationProvider,n)??0):Ot[2]=0}const s=Xt[e.type],c=new Array;if(s(e,e.hasZ?t=>{c.push([t[0],t[1],t[2]])}:t=>{c.push([t[0],t[1]])},Ot),0===c.length)throw a();const l=e.spatialReference,m=t.spatialReference,u=await R(new v({spatialReference:l,hasZ:e.hasZ,hasM:!1,points:c}),m,{signal:r});if(e.hasZ&&(n.hasZ=!0),e.hasZ)for(const[o,f,p]of u.points)Ot[0]=o,Ot[1]=f,Ot[2]=p,V(n.boundingBox,Ot);else for(const[o,f]of u.points)Ot[0]=o,Ot[1]=f,V(n.boundingBox,Ot)}async function bt(t,e,n,a,o){const i=await r(t.whenViewForGraphic(e));if(!1===i.ok||null==i.value||!("whenGraphicBounds"in i.value))return void await vt(t,e.geometry,a,o);const s=i.value,c=await r(s.whenGraphicBounds(e,{minDemResolution:n}));if(!1===c.ok||!c.value)return void await vt(t,e.geometry,a,o);const{screenSpaceObjects:l,boundingBox:m}=c.value;k(a.boundingBox,m),l&&l.forEach(t=>{a.screenSpaceObjects.push(t)}),isFinite(m[2])&&(a.hasZ=!0)}async function Rt(t,n,r,a,o){if(Array.isArray(n)&&2===n.length){const e=n[0],r=n[1];if("number"==typeof e&&"number"==typeof r)return Jt.x=e,Jt.y=r,Jt.z=void 0,Jt.spatialReference=t.spatialReference?.isGeographic?t.spatialReference:G.WGS84,void await vt(t,Jt,a,o)}n&&"map"in n&&"function"==typeof n.map?await Promise.allSettled(n.map(e=>Rt(t,e,r,a,o))):n instanceof j?await vt(t,n,a,o):n instanceof e&&await bt(t,n,r,a,o)}async function zt(t,e,n,r,a){if(e.camera)return Gt(t,e.camera,r,a);a.scale=e.scale,a.rotation=e.rotation,a.targetGeometry=null!=e.targetGeometry?e.targetGeometry.clone():null,a.camera=null,null!=n.heading?a.rotation=st(n.heading):null!=n.rotation&&(a.rotation=n.rotation);const o=dt(t,n);return null!=o&&(a.scale=o),a.camera=await lt(t,a,n.tilt,r),a}async function Gt(t,e,n,r){const a=t.spatialReference,o=await R(e.position,a,{signal:n}),i=e.clone();return i.position=o,jt(t,null,i,r)}async function Bt(t,e,n,r,a,o,i){const s=t.renderSpatialReference;return await M(e,Yt,s,{signal:i}),await M(n,Wt,s,{signal:i}),o.targetGeometry=new b(e),a.position=new b(n),y(Dt,Yt,Wt),at(t,Wt,Dt,r.up,a),o.scale=$(t,p(Wt,Yt)),o.rotation=st(a.heading),o.camera=a,o}async function Mt(t,e,n,r,a,o){o.targetGeometry=n.clone();const i=X(t);if(e.position)return Bt(t,o.targetGeometry,e.position,i,r,o,a);if(e.zoomFactor){const n=i.distance/e.zoomFactor,r=u(Ot,i.viewForward,-n);i.eye=f(Ot,i.center,r),o.scale=$(t,n)}q(t,i,r);const s=xt(r,e)?0:1;if(!e.zoomFactor){const n=dt(t,e);if(null==n){await M(o.targetGeometry,Ot,t.renderSpatialReference,{signal:a});const e=W(i.frustum,Ot)?p(i.eye,Ot):i.distance;o.camera=await L(t,o.targetGeometry,e,r,s),o.scale=$(t,e)}else o.scale=n,o.camera=await et(t,o.targetGeometry,o.scale,r,s,a)}return o}async function St(t,e,n,r,a){const o=X(t);g(Dt,o.viewForward),at(t,o.eye,Dt,o.up,qt);const i=t.spatialReference,{position:s}=e;if(s){const t=await R(s,i,{signal:a});n.position=t}else n.position=new b;return n.heading=null!=e.heading?e.heading:qt.heading,n.tilt=null!=e.tilt?e.tilt:qt.tilt,jt(t,null,n,r)}async function Zt(t,e,n,r,a){if(null!=e.heading||null!=e.rotation||null!=e.scale||null!=e.tilt||null!=e.zoom||null!=e.zoomFactor){const o=X(t),{spatialReference:i,renderSpatialReference:s}=t,c=new b({spatialReference:i});return S(o.center,s,c)?Mt(t,e,c,n,r,a):a}return a.scale=t.scale,a.camera=t.camera.clone(),xt(a.camera,e),a}async function Ft(t,e,n,r,a,o){o.targetGeometry=n.clone();const i=X(t);q(t,i,r);const s=xt(r,e)?0:1;return o.camera=await H(t,n,r.heading,r.tilt,s,a),o}function Tt(t,e,n,r,a){let o=0;null!=n.z?o=n.z:t.basemapTerrain&&t.elevationProvider&&(o=rt(t.elevationProvider,n)),h(Ot,n.x,n.y,o),B(t.spatialReference,Ot,Ut,t.renderSpatialReference),s(Nt,Ut),c(Nt,Nt),E(It);const i=[[0,1,2],[3,1,2],[0,4,2],[3,4,2],[0,1,5],[3,1,5],[0,4,5],[3,4,5]];for(let s=0;s<i.length;s++){const e=i[s];let n=r[e[2]];isFinite(n)||(n=o),h(Ot,r[e[0]],r[e[1]],n),Z(Ot,t.spatialReference,Ot,t.renderSpatialReference),V(It,d(Ot,Ot,Nt))}const l=O(It),m=U(It),u=N(It),f=1/Math.tan(e.fovX/2),p=1/Math.tan(e.fovY/2),g=.5*Math.sqrt(l*l+u*u)*Math.max(p,f)+.5*m,y=.5*m*p+.5*Math.max(l,u);return Math.max(g,y)/a}async function Pt(t,e,n,r,a,o,i,s){s.targetGeometry=n.clone();const c=X(t),l=Tt(t,c,n,r,a);q(t,c,o);const m=xt(o,e)?0:1;return s.camera=await L(t,s.targetGeometry,l,o,m,i),s.scale=$(t,l),s}function At(t,e){if(!e||!t.spatialReference)return null;const n={target:void 0};return"declaredClass"in e||Array.isArray(e)?n.target=e:(Object.assign(n,e),!n.target&&"center"in e&&e.center&&(n.target=e.center)),n}function Et(t){return null!=t?.camera&&(t.rotation=st(t.camera.heading)),t}function Vt(t,e){const n=ot;if(!e.length)return n;let r=Number.NEGATIVE_INFINITY;for(let a=0;a<e.length;a++){const t=e[a].screenSpaceBoundingRect;r=Math.max(r,Math.abs(t[0]),Math.abs(t[1]),Math.abs(t[2]),Math.abs(t[3]))}return n-r/Math.min(t.width,t.height)*2}class kt{constructor(){this.hasZ=!1,this.boundingBox=E(),this.screenSpaceObjects=new Array}}const Ot=w(),Ut=m(),Nt=l(),It=F(),Ct=I(),Dt=w(),Wt=w(),Yt=w(),qt={heading:0,tilt:0},Jt=new b,Xt={point(t,e,n){n[0]=t.x,n[1]=t.y,null!=t.z&&(n[2]=t.z),e(n)},polygon(t,e,n){const r=t.hasZ;for(let a=0;a<t.rings.length;a++){const o=t.rings[a];for(let t=0;t<o.length;t++)n[0]=o[t][0],n[1]=o[t][1],r&&(n[2]=o[t][2]),e(n)}},polyline(t,e,n){const r=t.hasZ;for(let a=0;a<t.paths.length;a++){const o=t.paths[a];for(let t=0;t<o.length;t++)n[0]=o[t][0],n[1]=o[t][1],r&&(n[2]=o[t][2]),e(n)}},multipoint(t,e,n){const r=t.points,a=t.hasZ;for(let o=0;o<r.length;o++)n[0]=r[o][0],n[1]=r[o][1],a&&(n[2]=r[o][2]),e(n)},extent(t,e,n){null!=t.zmin&&null!=t.zmax?(e(h(n,t.xmin,t.ymin,t.zmin)),e(h(n,t.xmax,t.ymin,t.zmin)),e(h(n,t.xmin,t.ymax,t.zmin)),e(h(n,t.xmax,t.ymax,t.zmin)),e(h(n,t.xmin,t.ymin,t.zmax)),e(h(n,t.xmax,t.ymin,t.zmax)),e(h(n,t.xmin,t.ymax,t.zmax)),e(h(n,t.xmax,t.ymax,t.zmax))):(e(h(n,t.xmin,t.ymin,n[2])),e(h(n,t.xmax,t.ymin,n[2])),e(h(n,t.xmin,t.ymax,n[2])),e(h(n,t.xmax,t.ymax,n[2])))}};export{ht as create,yt as fromCamera,lt as toCameraAsync,ct as toCameraSync};
5
+ import t from"../../../Camera.js";import e from"../../../Graphic.js";import n from"../../../Viewpoint.js";import{result as a}from"../../../core/asyncUtils.js";import"../../../core/has.js";import{cyclicalDegrees as r}from"../../../core/Cyclical.js";import o from"../../../core/Error.js";import{throwIfAborted as i}from"../../../core/promiseUtils.js";import{fromMat4 as s,transpose as c}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as l}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{j as u,i as f,D as p,d as g,e as y,h,t as d}from"../../../chunks/vec32.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import x from"../../../geometry/Extent.js";import j from"../../../geometry/Geometry.js";import v from"../../../geometry/Multipoint.js";import b from"../../../geometry/Point.js";import{projectAsync as R,tryProject as z}from"../../../geometry/projectionUtils.js";import G from"../../../geometry/SpatialReference.js";import{computeTranslationToOriginAndRotation as B}from"../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectPointToVectorAsync as M}from"../../../geometry/projection/projectPointToVector.js";import{projectVectorToPoint as S}from"../../../geometry/projection/projectVectorToPoint.js";import{projectVectorToVector as Z}from"../../../geometry/projection/projectVectorToVector.js";import{create as F,center as T,toRect as P,isPoint as A,empty as E,expandWithVec3 as V,expandWithAABB as k,width as O,height as U,depth as N}from"../../../geometry/support/aaBoundingBox.js";import{create as I,isPoint as C}from"../../../geometry/support/aaBoundingRect.js";import{polygonCentroidPoint as D}from"../../../geometry/support/centroid.js";import{intersectsPoint as W}from"../../../geometry/support/frustum.js";import{getResolutionInMetersForScale as Y}from"../../../geometry/support/scaleUtils.js";import{fromRenderCamera as q,toRenderCamera as J}from"../webgl.js";import{cameraOnContentAlongViewDirection as X}from"../camera/intersectionUtils.js";import{getViewSR as _,fromExtentAsync as H,scaleToDistance as K,fromCenterDistanceAsync as L,fromExtentSync as Q,distanceToScale as $,fromCenterDistanceSync as tt,fromCenterScale as et,zoomToScale as nt}from"./cameraUtils.js";import{getElevationAtPoint as at}from"./ElevationProvider.js";import{directionToHeadingTilt as rt}from"./viewingModeUtils.js";const ot=.66;function it(t){return 360-r.normalize(t)}function st(t){return r.normalize(360-t)}function ct(t,e,n){const a=e.camera;if(null!=a)return mt(a,_(t));const{targetGeometry:r}=e;if(null==r)return null;const{camera:o,mode:i}=ft(t,e.rotation,n);if("point"===r.type)return pt(t,e,r,o,i);const s=r.extent;return null==s?null:Q(t,s,o.heading,o.tilt,i)}async function lt(t,e,n,a){const r=e.camera;if(null!=r)return ut(r,_(t),a);const{targetGeometry:o}=e;if(null==o)throw new Error("Viewpoint has no targetGeometry!");const{camera:i,mode:s}=ft(t,e.rotation,n);if("point"===o.type)return gt(t,e,o,i,s,a);const c=o.extent;if(null==c)throw new Error("Target geometry has no extent!");return H(t,c,i.heading,i.tilt,s,a)}function mt(t,e){const n=t.position,a=z(n,e);if(!a)return null;const r=t.clone();return r.position=a.clone(),r}async function ut(t,e,n){const a=t.position,r=await R(a,e,{signal:n});i(n);const o=t.clone();return o.position=r.clone(),o}function ft(t,e,n){const a=q(t,t.state.camera);let r=1;return null!=e&&(a.heading=it(e),r=0),null!=n&&(a.tilt=n),{camera:a,mode:r}}function pt(t,e,n,a,r){const o=t.spatialReference,i=z(n.clone(),o);if(!i)return null;const s=null!=e.scale?K(t,e.scale):t.state.camera.distance;return tt(t,i,s,a,r)}async function gt(t,e,n,a,r,o){const s=t.spatialReference,c=await R(n.clone(),s,{signal:o});i(o);const l=null!=e.scale?K(t,e.scale):t.state.camera.distance;return L(t,c,l,a,r,o)}function yt(t,e,a=null){return null==a&&(a=new n),jt(t,null,e.clone(),a)}async function ht(e,a,r){const i=At(e,a);if(!i)throw new o("viewpointutils-create:no-target","Missing target for creating viewpoint");const s=new t({fov:e.camera.fov}),c=new n({camera:s});if(i.target instanceof n){return Et(await zt(e,i.target,i,r,c))}if(i.target instanceof t)return Et(await Gt(e,i.target,r,c));const l=null!=i.scale||null!=i.zoom;if(i.target instanceof x){const t=i.target.xmin===i.target.xmax||i.target.ymin===i.target.ymax;return Et(l||t?await Mt(e,i,i.target.center,s,r,c):await Ft(e,i,i.target,s,r,c))}const m=new kt,u=l?wt(e,i):void 0;if(await Rt(e,i.target,u,m,r),isFinite(m.boundingBox[0])){let t;if(T(m.boundingBox,Ot),Jt.x=Ot[0],Jt.y=Ot[1],Jt.z=Ot[2],Jt.spatialReference=e.spatialReference,isFinite(Jt.z)&&m.hasZ?t=A(m.boundingBox):(Jt.z=void 0,t=C(P(m.boundingBox,Ct))),l||t)return Et(await Mt(e,i,Jt,s,r,c));const n=Vt(e,m.screenSpaceObjects);return Et(await Pt(e,i,Jt,m.boundingBox,n,s,r,c))}return i.position?Et(await St(e,i,s,c,r)):Et(await Zt(e,i,s,r,c))}function dt(t,e){return null==e.scale&&null!=e.zoom?nt(t,e.zoom):e.scale}function wt(t,e){const n=dt(t,e);return n?Y(n):void 0}function xt(t,e){let n=!1;return null!=e.heading?(t.heading=e.heading,n=!0):null!=e.rotation&&(t.heading=it(e.rotation),n=!0),null!=e.tilt&&(t.tilt=e.tilt,n=!0),null!=e.fov&&(t.fov=e.fov),n}function jt(t,e,n,a){const r=t.spatialReference||G.WGS84;if(e??=J(t,n),null==e)return a;const o=new b({spatialReference:r});return S(e.center,t.renderSpatialReference,o)?(a.targetGeometry=o,a.scale=$(t,e.distance),a.rotation=st(n.heading),a.camera=n,a):a}async function vt(t,e,n,a){const r=()=>new o("viewpointutils:invalid-geometry","The target is missing a valid geometry");if(!e)throw r();"mesh"===e.type&&(e=e.extent);const i=t.basemapTerrain.spatialReference;if(!e.hasZ&&t.basemapTerrain){let n;switch(e.type){case"point":n=e;break;case"multipoint":case"polyline":n=e.extent?.center;break;case"extent":n=e.center;break;case"polygon":{const t=D(e);n=t?b.fromJSON(t):null;break}}null!=n&&i&&t.elevationProvider?(n=await R(n,i,{signal:a}),Ot[2]=at(t.elevationProvider,n)??0):Ot[2]=0}const s=Xt[e.type],c=new Array;if(s(e,e.hasZ?t=>{c.push([t[0],t[1],t[2]])}:t=>{c.push([t[0],t[1]])},Ot),0===c.length)throw r();const l=e.spatialReference,m=t.spatialReference,u=await R(new v({spatialReference:l,hasZ:e.hasZ,hasM:!1,points:c}),m,{signal:a});if(e.hasZ&&(n.hasZ=!0),e.hasZ)for(const[o,f,p]of u.points)Ot[0]=o,Ot[1]=f,Ot[2]=p,V(n.boundingBox,Ot);else for(const[o,f]of u.points)Ot[0]=o,Ot[1]=f,V(n.boundingBox,Ot)}async function bt(t,e,n,r,o){const i=await a(t.whenViewForGraphic(e));if(!1===i.ok||null==i.value||!("whenGraphicBounds"in i.value))return void await vt(t,e.geometry,r,o);const s=i.value,c=await a(s.whenGraphicBounds(e,{minDemResolution:n}));if(!1===c.ok||!c.value)return void await vt(t,e.geometry,r,o);const{screenSpaceObjects:l,boundingBox:m}=c.value;k(r.boundingBox,m),l&&l.forEach(t=>{r.screenSpaceObjects.push(t)}),isFinite(m[2])&&(r.hasZ=!0)}async function Rt(t,n,a,r,o){if(Array.isArray(n)&&2===n.length){const e=n[0],a=n[1];if("number"==typeof e&&"number"==typeof a)return Jt.x=e,Jt.y=a,Jt.z=void 0,Jt.spatialReference=t.spatialReference?.isGeographic?t.spatialReference:G.WGS84,void await vt(t,Jt,r,o)}n&&"map"in n&&"function"==typeof n.map?await Promise.allSettled(n.map(e=>Rt(t,e,a,r,o))):n instanceof j?await vt(t,n,r,o):n instanceof e&&await bt(t,n,a,r,o)}async function zt(t,e,n,a,r){if(e.camera)return Gt(t,e.camera,a,r);r.scale=e.scale,r.rotation=e.rotation,r.targetGeometry=null!=e.targetGeometry?e.targetGeometry.clone():null,r.camera=null,null!=n.heading?r.rotation=st(n.heading):null!=n.rotation&&(r.rotation=n.rotation);const o=dt(t,n);return null!=o&&(r.scale=o),r.camera=await lt(t,r,n.tilt,a),r}async function Gt(t,e,n,a){const r=t.spatialReference,o=await R(e.position,r,{signal:n}),i=e.clone();return i.position=o,jt(t,null,i,a)}async function Bt(t,e,n,a,r,o,i){const s=t.renderSpatialReference;return await M(e,Yt,s,{signal:i}),await M(n,Wt,s,{signal:i}),o.targetGeometry=new b(e),r.position=new b(n),y(Dt,Yt,Wt),rt(t,Wt,Dt,a.up,r),o.scale=$(t,p(Wt,Yt)),o.rotation=st(r.heading),o.camera=r,o}async function Mt(t,e,n,a,r,o){o.targetGeometry=n.clone();const i=X(t);if(e.position)return Bt(t,o.targetGeometry,e.position,i,a,o,r);if(e.zoomFactor){const n=i.distance/e.zoomFactor,a=u(Ot,i.viewForward,-n);i.eye=f(Ot,i.center,a),o.scale=$(t,n)}q(t,i,a);const s=xt(a,e)?0:1;if(!e.zoomFactor){const n=dt(t,e);if(null==n){await M(o.targetGeometry,Ot,t.renderSpatialReference,{signal:r});const e=W(i.frustum,Ot)?p(i.eye,Ot):i.distance;o.camera=await L(t,o.targetGeometry,e,a,s),o.scale=$(t,e)}else o.scale=n,o.camera=await et(t,o.targetGeometry,o.scale,a,s,r)}return o}async function St(t,e,n,a,r){const o=X(t);g(Dt,o.viewForward),rt(t,o.eye,Dt,o.up,qt);const i=t.spatialReference,{position:s}=e;if(s){const t=await R(s,i,{signal:r});n.position=t}else n.position=new b;return n.heading=null!=e.heading?e.heading:qt.heading,n.tilt=null!=e.tilt?e.tilt:qt.tilt,jt(t,null,n,a)}async function Zt(t,e,n,a,r){if(null!=e.heading||null!=e.rotation||null!=e.scale||null!=e.tilt||null!=e.zoom||null!=e.zoomFactor){const o=X(t),{spatialReference:i,renderSpatialReference:s}=t,c=new b({spatialReference:i});return S(o.center,s,c)?Mt(t,e,c,n,a,r):r}return r.scale=t.scale,r.camera=t.camera.clone(),xt(r.camera,e),r}async function Ft(t,e,n,a,r,o){o.targetGeometry=n.clone();const i=X(t);q(t,i,a);const s=xt(a,e)?0:1;return o.camera=await H(t,n,a.heading,a.tilt,s,r),o}function Tt(t,e,n,a,r){let o=0;null!=n.z?o=n.z:t.basemapTerrain&&t.elevationProvider&&(o=at(t.elevationProvider,n)),h(Ot,n.x,n.y,o),B(t.spatialReference,Ot,Ut,t.renderSpatialReference),s(Nt,Ut),c(Nt,Nt),E(It);const i=[[0,1,2],[3,1,2],[0,4,2],[3,4,2],[0,1,5],[3,1,5],[0,4,5],[3,4,5]];for(let s=0;s<i.length;s++){const e=i[s];let n=a[e[2]];isFinite(n)||(n=o),h(Ot,a[e[0]],a[e[1]],n),Z(Ot,t.spatialReference,Ot,t.renderSpatialReference),V(It,d(Ot,Ot,Nt))}const l=O(It),m=U(It),u=N(It),f=1/Math.tan(e.fovX/2),p=1/Math.tan(e.fovY/2),g=.5*Math.sqrt(l*l+u*u)*Math.max(p,f)+.5*m,y=.5*m*p+.5*Math.max(l,u);return Math.max(g,y)/r}async function Pt(t,e,n,a,r,o,i,s){s.targetGeometry=n.clone();const c=X(t),l=Tt(t,c,n,a,r);q(t,c,o);const m=xt(o,e)?0:1;return s.camera=await L(t,s.targetGeometry,l,o,m,i),s.scale=$(t,l),s}function At(t,e){if(!e||!t.spatialReference)return null;const n={target:void 0};return"declaredClass"in e||Array.isArray(e)?n.target=e:(Object.assign(n,e),!n.target&&"center"in e&&e.center&&(n.target=e.center)),n}function Et(t){return null!=t?.camera&&(t.rotation=st(t.camera.heading)),t}function Vt(t,e){const n=ot;if(!e.length)return n;let a=Number.NEGATIVE_INFINITY;for(let r=0;r<e.length;r++){const t=e[r].screenSpaceBoundingRect;a=Math.max(a,Math.abs(t[0]),Math.abs(t[1]),Math.abs(t[2]),Math.abs(t[3]))}return n-a/Math.min(t.width,t.height)*2}class kt{constructor(){this.hasZ=!1,this.boundingBox=E(),this.screenSpaceObjects=new Array}}const Ot=w(),Ut=m(),Nt=l(),It=F(),Ct=I(),Dt=w(),Wt=w(),Yt=w(),qt={heading:0,tilt:0},Jt=new b,Xt={point(t,e,n){n[0]=t.x,n[1]=t.y,null!=t.z&&(n[2]=t.z),e(n)},polygon(t,e,n){const a=t.hasZ;for(let r=0;r<t.rings.length;r++){const o=t.rings[r];for(let t=0;t<o.length;t++)n[0]=o[t][0],n[1]=o[t][1],a&&(n[2]=o[t][2]),e(n)}},polyline(t,e,n){const a=t.hasZ;for(let r=0;r<t.paths.length;r++){const o=t.paths[r];for(let t=0;t<o.length;t++)n[0]=o[t][0],n[1]=o[t][1],a&&(n[2]=o[t][2]),e(n)}},multipoint(t,e,n){const a=t.points,r=t.hasZ;for(let o=0;o<a.length;o++)n[0]=a[o][0],n[1]=a[o][1],r&&(n[2]=a[o][2]),e(n)},extent(t,e,n){null!=t.zmin&&null!=t.zmax?(e(h(n,t.xmin,t.ymin,t.zmin)),e(h(n,t.xmax,t.ymin,t.zmin)),e(h(n,t.xmin,t.ymax,t.zmin)),e(h(n,t.xmax,t.ymax,t.zmin)),e(h(n,t.xmin,t.ymin,t.zmax)),e(h(n,t.xmax,t.ymin,t.zmax)),e(h(n,t.xmin,t.ymax,t.zmax)),e(h(n,t.xmax,t.ymax,t.zmax))):(e(h(n,t.xmin,t.ymin,n[2])),e(h(n,t.xmax,t.ymin,n[2])),e(h(n,t.xmin,t.ymax,n[2])),e(h(n,t.xmax,t.ymax,n[2])))}};export{ht as create,yt as fromCamera,lt as toCameraAsync,ct as toCameraSync};
@@ -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{ZEROS as s}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{TileCompositePassParameters as t}from"../webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js";import{B as i}from"../../../chunks/BlendLayers.glsl.js";import{ReloadableShader as o}from"../webgl-engine/core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as l}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{Pos2TexF16 as a}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{PrimitiveType as n}from"../../webgl/enums.js";import{fromLayout as c}from"../../webgl/VertexAttributeLocations.js";class m extends t{constructor(){super(...arguments),this.opacity=1,this.baseOpacity=1,this.texture=null,this.fboTexture=null,this.backgroundColor=s}}let p=class extends l{constructor(e,r){super(e,r,c(a)),this.shader=new o(i,()=>import("../webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js")),this.primitiveType=n.TRIANGLE_STRIP}};p=e([r("esri.views.3d.terrain.BlendLayersTechnique")],p);export{m as BlendLayersPassParameters,p as BlendLayersTechnique};
5
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../core/accessorSupport/decorators.js";import{ZEROS as s}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{TileCompositePassParameters as i}from"../webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js";import{B as o}from"../../../chunks/BlendLayers.glsl.js";import{ReloadableShader as t}from"../webgl-engine/core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as l}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{Pos2TexF16 as a}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{PrimitiveType as n}from"../../webgl/enums.js";class c extends i{constructor(){super(...arguments),this.opacity=1,this.baseOpacity=1,this.texture=null,this.fboTexture=null,this.backgroundColor=s}}let m=class extends l{constructor(e,r){super(e,r,a),this.shader=new t(o,()=>import("../webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js")),this.primitiveType=n.TRIANGLE_STRIP}};m=e([r("esri.views.3d.terrain.BlendLayersTechnique")],m);export{c as BlendLayersPassParameters,m as BlendLayersTechnique};
@@ -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{R as o}from"../../../chunks/RasterColorizer.glsl.js";import{ReloadableShader as s}from"../webgl-engine/core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as i}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{Pos2TexF16 as t}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{PrimitiveType as a}from"../../webgl/enums.js";import{fromLayout as l}from"../../webgl/VertexAttributeLocations.js";let m=class extends i{constructor(e,r){super(e,r,l(t)),this.shader=new s(o,()=>import("../webgl-engine/core/shaderLibrary/raster/RasterColorizer.glsl.js")),this.primitiveType=a.TRIANGLE_STRIP}};m=e([r("esri.views.3d.terrain.RasterColorizerTechnique")],m);export{m as RasterColorizerTechnique};
5
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../core/accessorSupport/decorators.js";import{R as o}from"../../../chunks/RasterColorizer.glsl.js";import{ReloadableShader as s}from"../webgl-engine/core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as i}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{Pos2TexF16 as t}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{PrimitiveType as a}from"../../webgl/enums.js";let l=class extends i{constructor(e,r){super(e,r,t),this.shader=new s(o,()=>import("../webgl-engine/core/shaderLibrary/raster/RasterColorizer.glsl.js")),this.primitiveType=a.TRIANGLE_STRIP}};l=e([r("esri.views.3d.terrain.RasterColorizerTechnique")],l);export{l as RasterColorizerTechnique};
@@ -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,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};
@@ -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};