@arcgis/core 5.0.0-next.70 → 5.0.0-next.72

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 (636) hide show
  1. package/Ground.js +1 -1
  2. package/analysis/Dimension/types.d.ts +5 -1
  3. package/analysis/DistanceMeasurementAnalysis.d.ts +22 -3
  4. package/analysis/ElevationProfile/types.d.ts +10 -2
  5. package/analysis/ShadowCast/DiscreteOptions.d.ts +4 -0
  6. package/analysis/ShadowCast/MinDurationOptions.d.ts +7 -0
  7. package/analysis/ShadowCast/TotalDurationOptions.d.ts +4 -0
  8. package/analysis/ShadowCastAnalysis.d.ts +51 -8
  9. package/analysis/Slice/types.d.ts +5 -1
  10. package/analysis/VolumeMeasurement/types.d.ts +5 -1
  11. package/analysis/VolumeMeasurement/volumeMeasurementConfiguration.js +1 -1
  12. package/analysis/types.d.ts +39 -7
  13. package/applications/Components/QuantityFormatter.js +1 -1
  14. package/applications/Components/analysisUtils.d.ts +1 -2
  15. package/applications/Components/analysisUtils.js +1 -1
  16. package/applications/Components/imageryUtils.d.ts +2 -2
  17. package/applications/Components/testUtils.d.ts +2 -0
  18. package/applications/KnowledgeStudio/dataModelVisualization.d.ts +1 -0
  19. package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +59 -13
  20. package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +1 -1
  21. package/applications/PortalApp/layerUtils.d.ts +1 -0
  22. package/applications/Urban/LineImagePattern3D.d.ts +2 -0
  23. package/applications/Urban/imagePatternUtils.d.ts +4 -0
  24. package/arcade.d.ts +20 -11
  25. package/assets/esri/core/workers/RemoteClient.js +1 -1
  26. package/assets/esri/core/workers/chunks/00631252e8bd4a456253.js +1 -0
  27. package/assets/esri/core/workers/chunks/{322085d63719da6e443c.js → 0c02b084ae30ba138c5d.js} +1 -1
  28. package/assets/esri/core/workers/chunks/0f2f1731543ed21db0a8.js +1 -0
  29. package/assets/esri/core/workers/chunks/1b201d83e9ba7d8615c0.js +1 -0
  30. package/assets/esri/core/workers/chunks/1b284a6f32effe28aafc.js +1 -0
  31. package/assets/esri/core/workers/chunks/1bd5b421152fb0f46aa5.js +37 -0
  32. package/assets/esri/core/workers/chunks/{2e2c47f8a80ee9234350.js → 1d8fc0239c907ff5d1e8.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{b4f944ef6c174b20b619.js → 23545a9adc75564ecf6e.js} +1 -1
  34. package/assets/esri/core/workers/chunks/261b5a5db022ef580a1b.js +1 -0
  35. package/assets/esri/core/workers/chunks/2bd59ece927b5c1c9f80.js +1 -0
  36. package/assets/esri/core/workers/chunks/{37e46461da3000949a26.js → 2d8b8880e6bff4414e95.js} +1 -1
  37. package/assets/esri/core/workers/chunks/2fba74bae99ece15706c.js +1 -0
  38. package/assets/esri/core/workers/chunks/2fc64404bc42b7250086.js +1 -0
  39. package/assets/esri/core/workers/chunks/33cbfc34d5e2fc1a1a4f.js +1 -0
  40. package/assets/esri/core/workers/chunks/35887be3e4a218268d99.js +1 -0
  41. package/assets/esri/core/workers/chunks/3596ae4cb2bd2f3f35d9.js +1 -0
  42. package/assets/esri/core/workers/chunks/37814bf052ab59a5fb9e.js +1 -0
  43. package/assets/esri/core/workers/chunks/4e0d299054da075e5103.js +1 -0
  44. package/assets/esri/core/workers/chunks/50186162cd6d7c2ef0f9.js +1 -0
  45. package/assets/esri/core/workers/chunks/543ea1a0e7a6f1d267d1.js +1 -0
  46. package/assets/esri/core/workers/chunks/{dbfb00fb28b8b9f687a1.js → 5bbf20135c87a1cc8a18.js} +1 -1
  47. package/assets/esri/core/workers/chunks/5ed31ec0f53c1d55c4ea.js +1 -0
  48. package/assets/esri/core/workers/chunks/{c448540065690cac0744.js → 6087d5dc40bb62ec48c8.js} +1 -1
  49. package/assets/esri/core/workers/chunks/6309e8beedf5e7f2a50f.js +1 -0
  50. package/assets/esri/core/workers/chunks/{1a45b4b4803337f4b99f.js → 64985e9b6e2edb3ceb37.js} +38 -38
  51. package/assets/esri/core/workers/chunks/65475370cc4ebe2aa657.js +1 -0
  52. package/assets/esri/core/workers/chunks/65d9f3bc88472008443a.js +1 -0
  53. package/assets/esri/core/workers/chunks/6ab0f16f5c8806855c47.js +1 -0
  54. package/assets/esri/core/workers/chunks/7e37a3005f2ad2c0a918.js +1 -0
  55. package/assets/esri/core/workers/chunks/7f2496a59379e1a61ee5.js +1 -0
  56. package/assets/esri/core/workers/chunks/88379cd8e8e1c7ae3c7c.js +1 -0
  57. package/assets/esri/core/workers/chunks/{244006d4b0547d574401.js → 935a6dccb88557f98189.js} +143 -140
  58. package/assets/esri/core/workers/chunks/{a808be466812db51813d.js → 9382af94bf6bf1b09c8c.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{8e83c133b201b9b61e70.js → 979bc762ccc0d3fc2467.js} +1 -1
  60. package/assets/esri/core/workers/chunks/9c417f4dfb19e4c4bd71.js +1 -0
  61. package/assets/esri/core/workers/chunks/a554ad74be03b1ed1a72.js +1 -0
  62. package/assets/esri/core/workers/chunks/{e6e837e43b9348050832.js → a67c86f4254807eb6a05.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{1ec1a1997b5577619040.js → b211b53aa7616a093b90.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{866477acdf03b8a40bc9.js → bd1d159dce4094694c93.js} +1 -1
  65. package/assets/esri/core/workers/chunks/c31babdb59382b6bc007.js +1 -0
  66. package/assets/esri/core/workers/chunks/c8182c2cbb0ead202af6.js +1 -0
  67. package/assets/esri/core/workers/chunks/ce218c10b209b58e04fd.js +1 -0
  68. package/assets/esri/core/workers/chunks/ceef586d8cc8adc4d249.js +1 -0
  69. package/assets/esri/core/workers/chunks/d13e8ce9270dc0662b87.js +1 -0
  70. package/assets/esri/core/workers/chunks/db28d00171240b4fffac.js +1 -0
  71. package/assets/esri/core/workers/chunks/{8d6641d0f7c93f83c414.js → db9c7182847e8f96ffe3.js} +1 -1
  72. package/assets/esri/core/workers/chunks/dbd382546837aa7709e2.js +1 -0
  73. package/assets/esri/core/workers/chunks/{6c9dac4a869742cc2718.js → e246b256347a281c13fd.js} +1 -1
  74. package/assets/esri/core/workers/chunks/ea6f897f21b4f30e8e99.js +1 -0
  75. package/assets/esri/core/workers/chunks/{a10c6dd3bb8b3602de68.js → ee175fd4ec706f7878c0.js} +1 -1
  76. package/assets/esri/core/workers/chunks/{e8a3ad00936f2ccaf362.js → f0a667d8d33bc51c795d.js} +1 -1
  77. package/assets/esri/core/workers/chunks/f65b27fc0bc2f242aac7.js +1 -0
  78. package/assets/esri/core/workers/chunks/{29b09db309ff75fb3e97.js → f65d26588d2d80680a26.js} +1 -1
  79. package/assets/esri/core/workers/chunks/f72e6c903f55ce95a6c5.js +1 -0
  80. package/assets/esri/core/workers/chunks/{5dd5be91038df8902dc4.js → f7dfbf24859f4ac2421b.js} +1 -1
  81. package/assets/esri/core/workers/chunks/f893e10d660e819cca45.js +1 -0
  82. package/assets/esri/core/workers/chunks/{878010ca23da0bca9405.js → fb1ed5ef2f95ab093346.js} +1 -1
  83. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  84. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  85. package/chunks/lyr3DMain.js +1 -1
  86. package/config.js +1 -1
  87. package/core/Version.d.ts +11 -2
  88. package/core/accessorSupport/types.d.ts +35 -5
  89. package/core/quantityFormatUtils.js +1 -1
  90. package/core/sql/types.d.ts +226 -31
  91. package/core/types.d.ts +24 -4
  92. package/core/workers/registry.js +1 -1
  93. package/editing/sharedTemplates/types.d.ts +1 -0
  94. package/editing/types.d.ts +2 -0
  95. package/effects/types.d.ts +1 -0
  96. package/form/ExpressionInfo.d.ts +1 -1
  97. package/form/FormTemplate.d.ts +4 -4
  98. package/form/elements/GroupElement.d.ts +1 -1
  99. package/form/elements/RelationshipElement.d.ts +3 -3
  100. package/form/elements/inputs/attachments/AttachmentInput.d.ts +2 -1
  101. package/form/elements/inputs/attachments/AudioInput.d.ts +1 -0
  102. package/form/elements/inputs/attachments/DocumentInput.d.ts +1 -0
  103. package/form/elements/inputs/attachments/ImageInput.d.ts +1 -0
  104. package/form/elements/inputs/attachments/Input.d.ts +5 -1
  105. package/form/elements/inputs/attachments/SignatureInput.d.ts +1 -0
  106. package/form/elements/inputs/attachments/VideoInput.d.ts +1 -0
  107. package/form/elements/inputs/attachments/types.d.ts +12 -3
  108. package/form/elements/inputs.d.ts +2 -2
  109. package/form/types.d.ts +3 -0
  110. package/geometry/geometryEngineTypes.d.ts +49 -9
  111. package/geometry/operators/types.d.ts +29 -4
  112. package/geometry/spatialReferenceEllipsoidUtils.js +1 -1
  113. package/geometry/support/MeshVertexAttributes.d.ts +21 -2
  114. package/geometry/support/meshUtils/types.d.ts +126 -18
  115. package/geometry/types.d.ts +37 -6
  116. package/ground/NavigationConstraint.d.ts +3 -0
  117. package/identity/IdentityManagerBase.d.ts +153 -27
  118. package/interfaces.d.ts +27 -27
  119. package/intl/date.d.ts +5 -0
  120. package/intl/locale.d.ts +1 -0
  121. package/intl/messages.d.ts +12 -2
  122. package/intl/number.d.ts +5 -0
  123. package/intl/substitute.d.ts +28 -5
  124. package/intl/t9n.d.ts +13 -2
  125. package/kernel.js +1 -1
  126. package/layers/GaussianSplatLayer.d.ts +87 -6
  127. package/layers/ImageryTileLayer.d.ts +8 -8
  128. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  129. package/layers/LinkChartLayer.d.ts +1 -1
  130. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  131. package/layers/RouteLayer.d.ts +3 -3
  132. package/layers/buildingSublayers/utils.d.ts +1 -0
  133. package/layers/effects/types.d.ts +12 -2
  134. package/layers/graphics/editingSupport.d.ts +202 -38
  135. package/layers/graphics/sources/ParquetSource.d.ts +23 -4
  136. package/layers/knowledgeGraph/IdTypePair.d.ts +15 -3
  137. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.d.ts +61 -9
  138. package/layers/knowledgeGraph/LayoutMode.d.ts +1 -0
  139. package/layers/knowledgeGraph/dataModelVisualizationUtils.d.ts +6 -0
  140. package/layers/media/types.d.ts +25 -4
  141. package/layers/mixins/ArcGISImageService.d.ts +8 -9
  142. package/layers/mixins/ArcGISMapService.d.ts +5 -1
  143. package/layers/mixins/EditBusLayer.d.ts +3 -5
  144. package/layers/mixins/ImageryTileMixin.d.ts +2 -4
  145. package/layers/mixins/RasterJobHandlerMixin.js +1 -1
  146. package/layers/mixins/ScaleRange.d.ts +11 -2
  147. package/layers/mixins/properties/ILayerWithGetFeatureTitle.d.ts +11 -2
  148. package/layers/mixins/properties/ILayerWithGetField.d.ts +6 -1
  149. package/layers/ogc/ogcFeatureUtils.d.ts +2 -0
  150. package/layers/ogc/types.d.ts +55 -10
  151. package/layers/ogc/wcsUtils.d.ts +1 -0
  152. package/layers/ogc/wfsUtils.d.ts +8 -17
  153. package/layers/orientedImagery/core/ElevationSourceDefinitions.d.ts +6 -1
  154. package/layers/orientedImagery/transformations/types.d.ts +117 -21
  155. package/layers/orientedImagery/types.d.ts +37 -6
  156. package/layers/pointCloudFilters/typeUtils.d.ts +1 -0
  157. package/layers/raster/datasets/TIFFRaster.js +1 -1
  158. package/layers/raster/datasets/pixelReader.d.ts +2 -0
  159. package/layers/raster/datasets/types.d.ts +1 -0
  160. package/layers/raster/datasets/wcsCapabilitiesParser.d.ts +86 -17
  161. package/layers/raster/datasets/wcsCoverageParser.d.ts +601 -115
  162. package/layers/raster/formats/ImageCanvasDecoder.js +1 -1
  163. package/layers/raster/formats/JpgPlus.js +1 -1
  164. package/layers/raster/formats/RasterCodec.js +1 -1
  165. package/layers/raster/formats/Raw.js +1 -1
  166. package/layers/raster/formats/TiffDecoder.js +1 -1
  167. package/layers/raster/functions/changeDetectionUtils.d.ts +1 -0
  168. package/layers/raster/functions/creators/createAppearenceFunctions.d.ts +82 -15
  169. package/layers/raster/functions/creators/createBandIndexFunctions.d.ts +380 -70
  170. package/layers/raster/functions/creators/createChangeFunctions.d.ts +11 -2
  171. package/layers/raster/functions/creators/createConversionFunctions.d.ts +18 -3
  172. package/layers/raster/functions/creators/createDataManagementFunctions.d.ts +179 -35
  173. package/layers/raster/functions/creators/createLocalFunctions.d.ts +47 -9
  174. package/layers/raster/functions/creators/createMultiRasterAnalysisFunctions.d.ts +47 -9
  175. package/layers/raster/functions/creators/createStatisticsFunctions.d.ts +42 -8
  176. package/layers/raster/functions/creators/createSurfaceFunctions.d.ts +72 -11
  177. package/layers/raster/functions/focalStatUtils.d.ts +1 -0
  178. package/layers/raster/functions/rasterProjectionHelper.js +1 -1
  179. package/layers/raster/functions/types.d.ts +29 -5
  180. package/layers/raster/types.d.ts +498 -6
  181. package/layers/support/BuildingFilterBlock.d.ts +19 -3
  182. package/layers/support/BuildingFilterMode.d.ts +1 -0
  183. package/layers/support/BuildingFilterModeSolid.d.ts +7 -1
  184. package/layers/support/BuildingFilterModeWireFrame.d.ts +17 -3
  185. package/layers/support/BuildingFilterModeXRay.d.ts +7 -1
  186. package/layers/support/CodedValue.d.ts +16 -3
  187. package/layers/support/ControlPoint.d.ts +17 -3
  188. package/layers/support/EditFieldsInfo.d.ts +21 -4
  189. package/layers/support/EditingCapabilities.d.ts +36 -7
  190. package/layers/support/ElevationQuery.js +1 -1
  191. package/layers/support/ElevationTileData.d.ts +25 -5
  192. package/layers/support/FieldFormat.d.ts +1 -0
  193. package/layers/support/GeometryDescriptor.js +1 -1
  194. package/layers/support/GeoreferenceBase.d.ts +1 -0
  195. package/layers/support/KMLMapImage.d.ts +13 -2
  196. package/layers/support/LabelExpressionInfo.d.ts +9 -1
  197. package/layers/support/MosaicRule.d.ts +41 -1
  198. package/layers/support/ParquetGeometryEncodingLocation.d.ts +13 -2
  199. package/layers/support/ParquetGeometryEncodingWkb.d.ts +7 -0
  200. package/layers/support/PixelBlock.d.ts +9 -4
  201. package/layers/support/PurgeOptions.d.ts +15 -2
  202. package/layers/support/RasterInfo.d.ts +1 -2
  203. package/layers/support/RasterJobHandler.js +1 -1
  204. package/layers/support/RasterWorker.js +1 -1
  205. package/layers/support/SpriteSource.d.ts +28 -6
  206. package/layers/support/layerUtils.d.ts +4 -0
  207. package/layers/support/rasterFunctionConstants.d.ts +39 -0
  208. package/layers/support/types.d.ts +423 -227
  209. package/layers/types.d.ts +771 -196
  210. package/layers/video/types.d.ts +72 -14
  211. package/layers/voxel/VoxelColorStop.d.ts +17 -3
  212. package/layers/voxel/VoxelFormat.d.ts +15 -2
  213. package/layers/voxel/VoxelIsosurface.d.ts +17 -2
  214. package/layers/voxel/VoxelOpacityStop.d.ts +8 -1
  215. package/layers/voxel/VoxelRangeFilter.d.ts +12 -2
  216. package/layers/voxel/VoxelUniqueValue.d.ts +19 -3
  217. package/layers/wms/types.d.ts +104 -19
  218. package/layers/wmts/types.d.ts +1 -0
  219. package/linkChart/ChronologicalLayoutSettings.d.ts +1 -1
  220. package/linkChart/OrganicLayoutSettings.d.ts +1 -1
  221. package/linkChart/types.d.ts +2 -0
  222. package/networks/UtilityNetworkTraceAnalysis.d.ts +61 -10
  223. package/networks/support/jsonTypes.d.ts +373 -71
  224. package/networks/support/typeUtils.d.ts +10 -0
  225. package/networks/support/utils.d.ts +30 -6
  226. package/package.json +1 -1
  227. package/popup/content/types.d.ts +1 -0
  228. package/popup/types.d.ts +33 -5
  229. package/portal/jsonTypes.d.ts +231 -39
  230. package/portal/support/resourceUtils.d.ts +49 -9
  231. package/portal/types.d.ts +98 -14
  232. package/renderers/FlowRenderer.js +1 -1
  233. package/renderers/RasterStretchRenderer.d.ts +1 -1
  234. package/renderers/support/AuthoringInfoClassBreakInfo.d.ts +4 -0
  235. package/renderers/support/AuthoringInfoFieldInfo.d.ts +15 -2
  236. package/renderers/support/DotDensityLegendOptions.d.ts +4 -0
  237. package/renderers/support/HeatmapLegendOptions.d.ts +8 -0
  238. package/renderers/support/OthersCategory.d.ts +6 -0
  239. package/renderers/support/RendererLegendOptions.d.ts +14 -2
  240. package/renderers/support/pointCloud/ColorClassBreakInfo.d.ts +13 -1
  241. package/renderers/support/pointCloud/ColorModulation.d.ts +6 -0
  242. package/renderers/support/pointCloud/ColorUniqueValueInfo.d.ts +19 -3
  243. package/renderers/support/pointCloud/PointSizeAlgorithm.d.ts +1 -0
  244. package/renderers/support/pointCloud/PointSizeFixedSizeAlgorithm.d.ts +14 -2
  245. package/renderers/support/pointCloud/PointSizeSplatAlgorithm.d.ts +9 -1
  246. package/renderers/support/pointCloud/types.d.ts +7 -1
  247. package/renderers/support/raster/types.d.ts +22 -2
  248. package/renderers/support/types.d.ts +29 -2
  249. package/renderers/types.d.ts +47 -4
  250. package/renderers/visualVariables/support/SizeVariableLegendOptions.d.ts +4 -0
  251. package/renderers/visualVariables/support/VisualVariableLegendOptions.d.ts +9 -1
  252. package/request/types.d.ts +152 -24
  253. package/rest/featureService/FeatureService.d.ts +1 -1
  254. package/rest/featureService/types.d.ts +426 -80
  255. package/rest/geometryService/types.d.ts +23 -1
  256. package/rest/geoprocessor/GPOptions.d.ts +5 -5
  257. package/rest/geoprocessor/execute.d.ts +6 -0
  258. package/rest/imageService.d.ts +5 -5
  259. package/rest/knowledgeGraph/DataModel.d.ts +2 -2
  260. package/rest/knowledgeGraph/GraphAnyValue.d.ts +1 -0
  261. package/rest/knowledgeGraph/GraphDataModelSingletonOperationResult.d.ts +12 -2
  262. package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.d.ts +1 -1
  263. package/rest/knowledgeGraph/GraphDeletePropertyResult.d.ts +1 -1
  264. package/rest/knowledgeGraph/GraphQuery.d.ts +1 -1
  265. package/rest/knowledgeGraph/GraphSearch.d.ts +3 -3
  266. package/rest/knowledgeGraph/GraphSearchStreaming.d.ts +3 -3
  267. package/rest/knowledgeGraph/SearchIndex.d.ts +1 -1
  268. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsPathFilter.d.ts +3 -3
  269. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsResultJSON.d.ts +151 -29
  270. package/rest/knowledgeGraph/toolService/findPaths/CIMKGTraversalDirection.d.ts +1 -1
  271. package/rest/knowledgeGraph/wasmInterface/KnowledgeWasmInterface.d.ts +1 -0
  272. package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.d.ts +9 -0
  273. package/rest/knowledgeGraphService.d.ts +4 -4
  274. package/rest/lastMileDelivery/types.d.ts +5 -0
  275. package/rest/layerSources/DynamicDataLayer.d.ts +14 -2
  276. package/rest/layerSources/DynamicMapLayer.d.ts +14 -2
  277. package/rest/layerSources/JoinTableDataSource.d.ts +21 -2
  278. package/rest/layerSources/QueryTableDataSource.d.ts +33 -6
  279. package/rest/layerSources/RasterDataSource.d.ts +17 -3
  280. package/rest/layerSources/TableDataSource.d.ts +22 -4
  281. package/rest/networks/circuits/support/ExportCircuitsParameters.d.ts +8 -1
  282. package/rest/networks/circuits/support/QueryCircuitsParameters.d.ts +18 -3
  283. package/rest/networks/support/QueryNamedTraceConfigurationsParameters.d.ts +22 -4
  284. package/rest/print.d.ts +1 -1
  285. package/rest/query/support/AttachmentInfo.d.ts +1 -1
  286. package/rest/support/AddressToLocationsParameters.d.ts +39 -3
  287. package/rest/support/AddressesToLocationsParameters.d.ts +14 -0
  288. package/rest/support/BaseImageMeasureResultValue.d.ts +21 -4
  289. package/rest/support/ClosestFacilityParameters.d.ts +3 -3
  290. package/rest/support/ClosestFacilitySolveResult.d.ts +2 -2
  291. package/rest/support/DirectionsString.d.ts +16 -3
  292. package/rest/support/ImageMeasureResultAngleValue.d.ts +12 -2
  293. package/rest/support/ImageMeasureResultAreaValue.d.ts +12 -2
  294. package/rest/support/ImageMeasureResultLengthValue.d.ts +12 -2
  295. package/rest/support/LocateSetting.d.ts +12 -2
  296. package/rest/support/LocateSettingBase.d.ts +14 -2
  297. package/rest/support/LocateSettingSource.d.ts +12 -2
  298. package/rest/support/LocateSettings.d.ts +22 -4
  299. package/rest/support/LocateSettingsOverrides.d.ts +42 -8
  300. package/rest/support/LocationToAddressParameters.d.ts +7 -0
  301. package/rest/support/NetworkAttribute.d.ts +11 -2
  302. package/rest/support/NetworkServiceDescription.d.ts +20 -4
  303. package/rest/support/QuantizationParameters.d.ts +9 -0
  304. package/rest/support/Query.d.ts +2 -2
  305. package/rest/support/RouteParameters.d.ts +2 -5
  306. package/rest/support/RouteResult.d.ts +1 -1
  307. package/rest/support/ServiceAreaParameters.d.ts +1 -1
  308. package/rest/support/ServiceAreaSolveResult.d.ts +2 -2
  309. package/rest/support/SuggestLocationsParameters.d.ts +10 -0
  310. package/rest/support/SuggestionCandidate.d.ts +14 -2
  311. package/rest/support/types.d.ts +54 -4
  312. package/rest/symbolService.d.ts +2 -2
  313. package/rest/types.d.ts +50 -5
  314. package/rest/versionManagement/gdbVersion/support/AlterVersionParameters.d.ts +22 -4
  315. package/rest/versionManagement/gdbVersion/support/PostResult.d.ts +6 -1
  316. package/rest/versionManagement/gdbVersion/support/ReconcileParameters.d.ts +10 -1
  317. package/rest/versionManagement/gdbVersion/support/ReconcileResult.d.ts +8 -1
  318. package/rest/versionManagement/support/CreateVersionParameters.d.ts +13 -2
  319. package/rest/versionManagement/support/GetVersionInfosParameters.d.ts +8 -1
  320. package/smartMapping/heuristics/types.d.ts +50 -6
  321. package/smartMapping/popup/types.d.ts +29 -5
  322. package/smartMapping/raster/renderers/types.d.ts +12 -1
  323. package/smartMapping/raster/support/adapters/types.d.ts +1 -0
  324. package/smartMapping/renderers/color.d.ts +9 -3
  325. package/smartMapping/renderers/dotDensity.d.ts +3 -1
  326. package/smartMapping/renderers/heatmap.d.ts +3 -1
  327. package/smartMapping/renderers/location.d.ts +3 -1
  328. package/smartMapping/renderers/opacity.d.ts +3 -1
  329. package/smartMapping/renderers/pieChart.d.ts +3 -1
  330. package/smartMapping/renderers/predominance.d.ts +3 -1
  331. package/smartMapping/renderers/relationship.d.ts +3 -1
  332. package/smartMapping/renderers/size.d.ts +23 -7
  333. package/smartMapping/renderers/support/rendererUtils.d.ts +3 -1
  334. package/smartMapping/renderers/type.d.ts +3 -1
  335. package/smartMapping/renderers/univariateColorSize.d.ts +3 -1
  336. package/smartMapping/statistics/types.d.ts +16 -4
  337. package/smartMapping/symbology/type.d.ts +5 -1
  338. package/smartMapping/symbology/types.d.ts +1303 -241
  339. package/smartMapping/types.d.ts +5 -0
  340. package/statistics/types.d.ts +13 -2
  341. package/support/revision.js +1 -1
  342. package/symbols/callouts/LineCallout3DBorder.d.ts +4 -0
  343. package/symbols/cim/types.d.ts +764 -111
  344. package/symbols/patterns/LinePattern3D.d.ts +1 -0
  345. package/symbols/patterns/Pattern3D.d.ts +1 -0
  346. package/symbols/support/IconSymbol3DLayerResource.d.ts +7 -0
  347. package/symbols/support/ObjectSymbol3DLayerResource.d.ts +7 -0
  348. package/symbols/support/OccludedVisibility.d.ts +3 -0
  349. package/symbols/support/Symbol3DAnchorPosition2D.d.ts +4 -0
  350. package/symbols/support/Symbol3DAnchorPosition3D.d.ts +5 -0
  351. package/symbols/support/Symbol3DFillMaterial.d.ts +4 -0
  352. package/symbols/support/Symbol3DHalo.d.ts +10 -0
  353. package/symbols/support/Symbol3DIconOutline.d.ts +10 -0
  354. package/symbols/support/Symbol3DMaterial.d.ts +6 -0
  355. package/symbols/support/Symbol3DOutline.d.ts +21 -2
  356. package/symbols/support/Symbol3DTextBackground.d.ts +12 -2
  357. package/symbols/support/symbolUtils.d.ts +5 -1
  358. package/symbols/support/types.d.ts +4 -0
  359. package/symbols/types.d.ts +67 -7
  360. package/tables/AttributeTableTemplate.d.ts +2 -2
  361. package/tables/elements/AttributeTableAttachmentElement.d.ts +1 -1
  362. package/tables/elements/AttributeTableElement.d.ts +2 -2
  363. package/tables/elements/AttributeTableFieldElement.d.ts +1 -1
  364. package/tables/elements/AttributeTableGroupElement.d.ts +1 -1
  365. package/tables/elements/AttributeTableRelationshipElement.d.ts +1 -1
  366. package/tables/support/FieldOrder.d.ts +16 -3
  367. package/tables/support/tablesUtils.d.ts +1 -0
  368. package/time/types.d.ts +4 -0
  369. package/versionManagement/VersionManagementService.d.ts +3 -6
  370. package/versionManagement/VersionManager.d.ts +126 -23
  371. package/versionManagement/VersioningState.d.ts +1 -1
  372. package/versionManagement/support/jsonTypes.d.ts +152 -30
  373. package/versionManagement/support/type.d.ts +2 -0
  374. package/versionManagement/versionAdapters/types.d.ts +25 -5
  375. package/views/2d/MapViewConstraints.d.ts +37 -5
  376. package/views/2d/analysis/AnalysisView2D.d.ts +5 -1
  377. package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +28 -4
  378. package/views/2d/analysis/DistanceMeasurementAnalysisView2D.d.ts +28 -4
  379. package/views/2d/analysis/types.d.ts +5 -1
  380. package/views/2d/engine/flow/BrushFlow.js +1 -1
  381. package/views/2d/engine/flow/FlowDisplayObject.js +1 -1
  382. package/views/2d/engine/flow/FlowStrategy.js +1 -1
  383. package/views/2d/engine/flow/FlowView2D.js +1 -1
  384. package/views/2d/engine/flow/ProcessingTimeEstimate.js +5 -0
  385. package/views/2d/engine/flow/animatedValues.js +5 -0
  386. package/views/2d/engine/flow/dataUtils.js +1 -1
  387. package/views/2d/engine/flow/flowPathsIO.js +5 -0
  388. package/views/2d/engine/flow/styles/AFlowResources.js +5 -0
  389. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  390. package/views/2d/engine/flow/styles/Particles.js +1 -1
  391. package/views/2d/engine/flow/styles/Stack.js +1 -1
  392. package/views/2d/engine/flow/styles/Streamlines.js +1 -1
  393. package/views/2d/engine/flow/utils.js +1 -1
  394. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
  395. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  396. package/views/2d/layers/support/MediaLayerInteractionOptions.d.ts +1 -0
  397. package/views/2d/layers/types.d.ts +1 -0
  398. package/views/2d/types.d.ts +93 -6
  399. package/views/3d/analysis/AnalysisView3D.d.ts +5 -1
  400. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementController.js +1 -1
  401. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  402. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  403. package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
  404. package/views/3d/analysis/DirectLineMeasurement/types.d.ts +24 -4
  405. package/views/3d/analysis/LineOfSight/types.d.ts +1 -0
  406. package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +19 -3
  407. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  408. package/views/3d/analysis/VolumeMeasurement/types.d.ts +5 -1
  409. package/views/3d/analysis/support/measurementUtils.js +1 -1
  410. package/views/3d/analysis/types.d.ts +25 -3
  411. package/views/3d/constraints/AltitudeConstraint.d.ts +5 -0
  412. package/views/3d/constraints/ClipDistanceConstraint.d.ts +13 -2
  413. package/views/3d/constraints/Constraints.d.ts +26 -4
  414. package/views/3d/constraints/TiltConstraint.d.ts +5 -0
  415. package/views/3d/environment/SceneViewEnvironment.d.ts +9 -0
  416. package/views/3d/environment/types.d.ts +3 -0
  417. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
  418. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  419. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  420. package/views/3d/interactive/visualElements/support/Segment.js +1 -1
  421. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  422. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  423. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  424. package/views/3d/layers/support/MediaLayerInteractionOptions.d.ts +15 -2
  425. package/views/3d/layers/support/MediaLayerInteractionReshapeOptions.d.ts +3 -0
  426. package/views/3d/types.d.ts +52 -0
  427. package/views/3d/webgl/ManagedColorAttachment.d.ts +2 -0
  428. package/views/3d/webgl/ManagedDepthAttachment.d.ts +2 -0
  429. package/views/3d/webgl/ManagedFBO.d.ts +4 -0
  430. package/views/3d/webgl/ManagedFBOAttachment.d.ts +1 -0
  431. package/views/3d/webgl/ManagedFBOResource.d.ts +5 -0
  432. package/views/3d/webgl/types.d.ts +32 -6
  433. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +20 -22
  434. package/views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js +9 -5
  435. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +8 -6
  436. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  437. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  438. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  439. package/views/3d/webgl-engine/lib/Material.js +1 -1
  440. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  441. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  442. package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
  443. package/views/3d/webgl-engine/materials/VisualVariablePassParameters.js +1 -1
  444. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  445. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  446. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +9 -8
  447. package/views/MapViewOrSceneView.d.ts +1 -0
  448. package/views/SceneView.d.ts +59 -0
  449. package/views/SceneView.js +1 -1
  450. package/views/View.d.ts +2 -2
  451. package/views/View2D.d.ts +37 -0
  452. package/views/View2D.js +1 -1
  453. package/views/Viewport2DMixin.d.ts +9 -6
  454. package/views/analysis/AnalysisView.d.ts +2 -0
  455. package/views/analysis/AreaMeasurement/types.d.ts +18 -3
  456. package/views/analysis/DistanceMeasurement/types.d.ts +13 -2
  457. package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +1 -1
  458. package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
  459. package/views/analysis/types.d.ts +7 -1
  460. package/views/animation/easing.js +1 -1
  461. package/views/animation/types.d.ts +3 -4
  462. package/views/draw/CursorUpdateEvent.d.ts +24 -4
  463. package/views/draw/DrawAction.d.ts +4 -6
  464. package/views/draw/DrawCompleteEvent.d.ts +18 -3
  465. package/views/draw/VertexAddEvent.d.ts +19 -3
  466. package/views/draw/VertexRemoveEvent.d.ts +19 -3
  467. package/views/draw/types.d.ts +4 -0
  468. package/views/input/types.d.ts +371 -57
  469. package/views/interactive/sketch/SketchTooltipVisibleElements.d.ts +19 -1
  470. package/views/interactive/sketch/Units.d.ts +5 -0
  471. package/views/interactive/tooltip/types.d.ts +2 -0
  472. package/views/layers/HighlightLayerViewMixin.d.ts +59 -1
  473. package/views/layers/HighlightLayerViewMixin.js +1 -1
  474. package/views/layers/ImageryLayerViewMixin.d.ts +60 -2
  475. package/views/layers/ImageryTileLayerViewMixin.d.ts +2 -0
  476. package/views/layers/LayerView.d.ts +6 -0
  477. package/views/layers/MediaLayerViewMixin.d.ts +8 -1
  478. package/views/layers/types.d.ts +3 -0
  479. package/views/navigation/types.d.ts +6 -1
  480. package/views/support/AttributionItem.d.ts +10 -2
  481. package/views/support/MeasurementWorker.js +5 -0
  482. package/views/support/MeasurementWorkerHandle.js +5 -0
  483. package/views/support/automaticAreaMeasurementUtils.js +1 -1
  484. package/views/support/geodesicAreaMeasurementUtils.js +1 -1
  485. package/views/support/geodesicLengthMeasurementUtils.js +1 -1
  486. package/views/types.d.ts +306 -53
  487. package/views/ui/types.d.ts +42 -6
  488. package/webdoc/Widgets.d.ts +26 -5
  489. package/webdoc/geotriggersInfo/support/typeUtils.d.ts +3 -0
  490. package/webdoc/support/SlideThumbnail.d.ts +4 -0
  491. package/webdoc/support/types.d.ts +11 -2
  492. package/webdoc/support/webdocSaveUtils.d.ts +6 -0
  493. package/webdoc/widgets/FloorFilter.d.ts +25 -4
  494. package/webmap/Version.d.ts +1 -0
  495. package/webscene/Version.d.ts +1 -0
  496. package/webscene/support/Description.d.ts +3 -0
  497. package/webscene/support/SlideEnvironment.d.ts +6 -0
  498. package/webscene/support/SlideGround.d.ts +7 -1
  499. package/webscene/support/SlideVisibleLayer.d.ts +5 -0
  500. package/webscene/support/Title.d.ts +3 -0
  501. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
  502. package/widgets/Attachments/types.d.ts +32 -6
  503. package/widgets/BasemapGallery/types.d.ts +3 -0
  504. package/widgets/BasemapLayerList/BasemapLayerListVisibleElements.d.ts +14 -0
  505. package/widgets/BasemapLayerList/types.d.ts +1 -0
  506. package/widgets/BatchAttributeForm/VisibleElements.d.ts +7 -1
  507. package/widgets/BatchAttributeForm/inputs/SingleFeatureInput.d.ts +2 -0
  508. package/widgets/BatchAttributeForm/inputs/TextElementInput.d.ts +14 -2
  509. package/widgets/BatchAttributeForm/inputs/types.d.ts +2 -0
  510. package/widgets/BatchAttributeForm/types.d.ts +75 -14
  511. package/widgets/BatchAttributeForm.d.ts +2 -2
  512. package/widgets/Bookmarks/BookmarksVisibleElements.d.ts +30 -9
  513. package/widgets/Bookmarks/types.d.ts +32 -10
  514. package/widgets/CatalogLayerList/CatalogLayerListVisibleElements.d.ts +11 -0
  515. package/widgets/CatalogLayerList/types.d.ts +1 -0
  516. package/widgets/Daylight/VisibleElements.d.ts +11 -1
  517. package/widgets/Daylight/types.d.ts +8 -2
  518. package/widgets/DirectionalPad/VisibleElements.d.ts +6 -0
  519. package/widgets/DirectionalPad/types.d.ts +13 -2
  520. package/widgets/Directions/DirectionsViewModel.d.ts +2 -2
  521. package/widgets/Directions/DirectionsVisibleElements.d.ts +8 -0
  522. package/widgets/Editor/CreateFeaturesWorkflowData.d.ts +3 -3
  523. package/widgets/Editor/EditorViewModel.d.ts +2 -3
  524. package/widgets/Editor/Edits.d.ts +1 -2
  525. package/widgets/Editor/SplitFeatureWorkflow.d.ts +2 -2
  526. package/widgets/Editor/VisibleElements.d.ts +46 -13
  527. package/widgets/Editor/support/EditorEditingCapabilities.d.ts +46 -9
  528. package/widgets/Editor/types.d.ts +149 -24
  529. package/widgets/ElevationProfile/ElevationProfileVisibleElements.d.ts +13 -1
  530. package/widgets/ElevationProfile/types.d.ts +87 -14
  531. package/widgets/Expand.d.ts +2 -2
  532. package/widgets/Feature/types.d.ts +105 -18
  533. package/widgets/FeatureForm/GroupInput.d.ts +1 -1
  534. package/widgets/FeatureForm/RelationshipInput.d.ts +1 -1
  535. package/widgets/FeatureForm/TextElementInput.d.ts +3 -5
  536. package/widgets/FeatureForm/UtilityNetworkAssociationInput.d.ts +1 -1
  537. package/widgets/FeatureForm/VisibleElements.d.ts +7 -1
  538. package/widgets/FeatureForm/types.d.ts +3 -0
  539. package/widgets/FeatureForm.d.ts +1 -1
  540. package/widgets/FeatureTable/ColumnMenuVisibleElements.d.ts +4 -0
  541. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +14 -4
  542. package/widgets/FeatureTable/Grid/Column.d.ts +1 -1
  543. package/widgets/FeatureTable/Grid/GridViewModel.d.ts +2 -0
  544. package/widgets/FeatureTable/Grid/types.d.ts +137 -24
  545. package/widgets/FeatureTable/TableMenuVisibleElements.d.ts +10 -0
  546. package/widgets/FeatureTable/VisibleElements.d.ts +16 -2
  547. package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +1 -1
  548. package/widgets/FeatureTable/support/types.d.ts +155 -27
  549. package/widgets/FeatureTable.d.ts +3 -3
  550. package/widgets/FeatureTemplates/VisibleElements.d.ts +4 -0
  551. package/widgets/FeatureTemplates/types.d.ts +17 -2
  552. package/widgets/Features/FeaturesVisibleElements.d.ts +12 -0
  553. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  554. package/widgets/Histogram/types.d.ts +14 -2
  555. package/widgets/HistogramRangeSlider/types.d.ts +1 -0
  556. package/widgets/LayerList/LayerListVisibleElements.d.ts +10 -0
  557. package/widgets/LayerList/types.d.ts +8 -0
  558. package/widgets/Legend/styles/card/CardView.d.ts +13 -2
  559. package/widgets/Legend/styles/classic/ClassicView.d.ts +11 -2
  560. package/widgets/Measurement/types.d.ts +3 -0
  561. package/widgets/OrientedImageryViewer/types.d.ts +15 -3
  562. package/widgets/Popup/PopupVisibleElements.d.ts +11 -0
  563. package/widgets/Popup/types.d.ts +64 -7
  564. package/widgets/Print/FileLink.d.ts +36 -6
  565. package/widgets/Print/types.d.ts +77 -13
  566. package/widgets/ScaleRangeSlider/types.d.ts +4 -0
  567. package/widgets/ScaleRangeSlider.d.ts +5 -1
  568. package/widgets/Search/SearchResultRenderer.d.ts +0 -2
  569. package/widgets/Search/SearchSource.d.ts +2 -2
  570. package/widgets/Search/SearchViewModel.d.ts +6 -7
  571. package/widgets/Search/types.d.ts +4 -4
  572. package/widgets/ShadowCast/ShadowCastVisibleElements.d.ts +15 -1
  573. package/widgets/ShadowCast/types.d.ts +8 -2
  574. package/widgets/Sketch/CreateToolVisibilityMap.d.ts +19 -4
  575. package/widgets/Sketch/SelectionToolVisibilityMap.d.ts +4 -0
  576. package/widgets/Sketch/VisibleElements.d.ts +38 -6
  577. package/widgets/Sketch/types.d.ts +364 -60
  578. package/widgets/Slider/types.d.ts +249 -46
  579. package/widgets/Swipe/types.d.ts +6 -0
  580. package/widgets/TableList/TableListVisibleElements.d.ts +11 -0
  581. package/widgets/TableList/types.d.ts +5 -0
  582. package/widgets/TimeSlider/types.d.ts +45 -7
  583. package/widgets/Track/types.d.ts +4 -1
  584. package/widgets/UtilityNetworkAssociations/VisibleElements.d.ts +23 -4
  585. package/widgets/UtilityNetworkAssociations/VisibleElementsSettingsPane.d.ts +7 -0
  586. package/widgets/UtilityNetworkTrace/types.d.ts +26 -5
  587. package/widgets/ValuePicker/ValuePickerBaseComponent.d.ts +2 -0
  588. package/widgets/ValuePicker/ValuePickerSliderVisibleElements.d.ts +7 -1
  589. package/widgets/ValuePicker/ValuePickerVisibleElements.d.ts +9 -1
  590. package/widgets/ValuePicker/types.d.ts +8 -0
  591. package/widgets/Weather/VisibleElements.d.ts +6 -1
  592. package/widgets/Weather/types.d.ts +1 -0
  593. package/widgets/smartMapping/types.d.ts +63 -6
  594. package/widgets/support/GridControls/VisibleElements.d.ts +11 -0
  595. package/widgets/support/GridControls/types.d.ts +1 -0
  596. package/widgets/support/SnappingControls/VisibleElements.d.ts +26 -4
  597. package/widgets/support/forms/types.d.ts +2 -0
  598. package/widgets/support/types.d.ts +19 -3
  599. package/widgets/types.d.ts +549 -89
  600. package/assets/esri/core/workers/chunks/0367a8580fede8f804f9.js +0 -1
  601. package/assets/esri/core/workers/chunks/14f4f5b7549cea7b5a6a.js +0 -1
  602. package/assets/esri/core/workers/chunks/1b475593c80d7bccdda5.js +0 -1
  603. package/assets/esri/core/workers/chunks/27ec8688f72130239b98.js +0 -1
  604. package/assets/esri/core/workers/chunks/2dd347aa2a061d536e69.js +0 -1
  605. package/assets/esri/core/workers/chunks/2f6fa33692478e99d24b.js +0 -1
  606. package/assets/esri/core/workers/chunks/329b10897c6965948b84.js +0 -1
  607. package/assets/esri/core/workers/chunks/35593a9790818b689455.js +0 -1
  608. package/assets/esri/core/workers/chunks/3e7ea06b342e33bc48a5.js +0 -1
  609. package/assets/esri/core/workers/chunks/401ce5cb98fa14c1a725.js +0 -1
  610. package/assets/esri/core/workers/chunks/4387aaf9d5e8f6d1833d.js +0 -1
  611. package/assets/esri/core/workers/chunks/668a868fe2dcb6384ac9.js +0 -1
  612. package/assets/esri/core/workers/chunks/6acfa51b81e6f4255118.js +0 -1
  613. package/assets/esri/core/workers/chunks/6f8098f9fe233833245a.js +0 -1
  614. package/assets/esri/core/workers/chunks/76dbaef0d0794913f36f.js +0 -1
  615. package/assets/esri/core/workers/chunks/7c5218eae13d3bd30598.js +0 -1
  616. package/assets/esri/core/workers/chunks/7fc09382f934e9223a9b.js +0 -1
  617. package/assets/esri/core/workers/chunks/822ef6a043c7e147b4b6.js +0 -1
  618. package/assets/esri/core/workers/chunks/980313a6c35e79812d17.js +0 -1
  619. package/assets/esri/core/workers/chunks/98d68b145226e7527c84.js +0 -33
  620. package/assets/esri/core/workers/chunks/9c157c0eeadb824ad01e.js +0 -1
  621. package/assets/esri/core/workers/chunks/a39ac9127a215d14d412.js +0 -1
  622. package/assets/esri/core/workers/chunks/a893f8db2477cf677ac8.js +0 -1
  623. package/assets/esri/core/workers/chunks/a95e28ade258b144cbb5.js +0 -1
  624. package/assets/esri/core/workers/chunks/abcee7cfd53cfe1d91e9.js +0 -1
  625. package/assets/esri/core/workers/chunks/b9f0d313f59fc7c43560.js +0 -1
  626. package/assets/esri/core/workers/chunks/bbe2eaef7edfa33b6eea.js +0 -1
  627. package/assets/esri/core/workers/chunks/bfdf646d4c8f175a4236.js +0 -1
  628. package/assets/esri/core/workers/chunks/d749aa62ad694147aebe.js +0 -1
  629. package/assets/esri/core/workers/chunks/d7d9656b990ce8be2152.js +0 -1
  630. package/assets/esri/core/workers/chunks/df92239eefff04471a0b.js +0 -1
  631. package/assets/esri/core/workers/chunks/ee2ca25048a920e43743.js +0 -1
  632. package/assets/esri/core/workers/chunks/eeb24a4ab4993f1f4e8e.js +0 -1
  633. package/assets/esri/core/workers/chunks/fe5d2735f057c7789f4b.js +0 -1
  634. package/views/2d/engine/flow/FlowDisplayData.js +0 -5
  635. package/views/support/GeodesicMeasurementWorker.js +0 -5
  636. package/views/support/GeodesicMeasurementWorkerHandle.js +0 -5
@@ -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{update as t}from"../../../../core/arrayUtils.js";import{createTask as r}from"../../../../core/asyncUtils.js";import"../../../../core/has.js";import{clamp as i,lerp as s}from"../../../../core/mathUtils.js";import{removeMaybe as a,abortMaybe as n,destroyMaybe as h,releaseMaybe as o}from"../../../../core/maybe.js";import{throwIfAborted as d}from"../../../../core/promiseUtils.js";import{watch as _,syncAndInitial as l,initial as u,sync as p}from"../../../../core/reactiveUtils.js";import{signal as m}from"../../../../core/signal.js";import{Milliseconds as c}from"../../../../core/time.js";import{property as f,subclass as g}from"../../../../core/accessorSupport/decorators.js";import{equals as b,invert as P,multiply as C}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as w,create as T}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{c as S}from"../../../../chunks/vec42.js";import{ZEROS as E}from"../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{fromValues as x,ZEROS as A}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{pruneIndexArrays as D}from"../../../../geometry/support/Indices.js";import{RenderCategory as I,InternalRenderCategory as R}from"../../webgl.js";import{innerAtmosphereFadeStart as y}from"../../environment/atmosphereUtils.js";import{minNearDistanceInMeters as O}from"../../state/NearFarHeuristic.js";import{debugFlags as F}from"../../support/debugFlags.js";import{FBOCache as H,defaultWebGLFBO as v}from"../core/FBOCache.js";import{RenderPassManager as M}from"../core/renderPasses/RenderPassManager.js";import{isColor as N}from"../core/shaderLibrary/ShaderOutput.js";import{distanceFadeEnd as q}from"../core/shaderLibrary/shading/ScreenSpaceConstants.js";import{RenderNodes as G}from"../effects/RenderNodes.js";import{RenderPluginManager as L}from"../effects/RenderPluginManager.js";import{Blit as U}from"../effects/blit/Blit.js";import{maxHighlightsPerChannel as V,renderHighlightBuffer as j}from"../effects/highlight/Highlight.js";import{OITBlend as B}from"../effects/transparency/OITBlend.js";import{AnimationTimer as k}from"./AnimationTimer.js";import{AnimationTimeStep as z}from"./AnimationTimeStep.js";import{BoundingInfo as W}from"./BoundingInfo.js";import{DepthRange as Q}from"./DepthRange.js";import{depthRangeFromScene as Y}from"./depthRangeUtils.js";import{hudFragmentOpacityParameters as Z}from"./hudFragmentOpacityParameters.js";import{MainFramebuffer as J}from"./MainFramebuffer.js";import{RenderContext as K,defaultRenderOccludedMask as X}from"./RenderContext.js";import{RendererBase as $}from"./RendererBase.js";import{setupFeatureDefaults as ee}from"./RenderFeature.js";import{RenderPluginInput as te}from"./RenderPluginInput.js";import{ShadowAccumulator as re}from"./ShadowAccumulator.js";import{ShadowMap as ie}from"./ShadowMap.js";import se from"./SliceHelper.js";import{MergedRenderer as ae}from"../materials/renderers/MergedRenderer.js";import{RenderSceneResult as ne}from"../parts/renderUtils.js";import{RendererPerformanceInfo as he,PerformanceCategory as oe}from"../statistics/RendererPerformanceInfo.js";import{PixelType as de,ColorAttachment1 as _e,ColorAttachment2 as le}from"../../../webgl/enums.js";let ue=class extends ${constructor(e,t,r,i,s,a){super({stage:e}),this._techniques=r,this._rctx=i,this._compositingHelper=s,this._requestRender=a,this._pluginsHas={hudElements:!1,water:!1},this.renderPassManager=new M,this._isRendering=!1,this._inGlobeView=!1,this._backgroundColor=x(0,0,0,1),this._sliceHelper=new se,this.sceneDepthRange=m(Q.Infinite),this._state=m(2),this._hasAnimations=!1,this._animationTimestep=new z,this._loadEdgeViewTask=null,this._edgeViewCallbacks=[],this._reprojectionMatrixVersion=m(0),this._lastFrameTime=c(0),this._renderHiddenTransparentEdges=()=>{},this._pluginInput=new te,this._releaseNormals=e=>{e.some(({name:e})=>"normals"===e)&&this._pluginInput.release("normals")},this._debugNeedsDepth=!1,this._fboCache=new H(i),this._renderStateFeatures=m(ee(e.view.qualityProfile)),this._framebuffer=new J(this.fboCache),this._performanceInfo=new he(this._rctx),this._shadowMap=new ie(this.fboCache,e.viewingMode),this._shadowAccumulator=new re(this.fboCache,r,e,e=>{const t=this.shadowsEnabled;this._shadowMap.enabled=!0,this._ensureBindParametersCamera(e.camera,e.contentCamera),this._plugins.prepareRender(),this._shadowMap.enabled=t},(t,r,i)=>{const s=e.view.qualitySettings.maximumPixelRatio;t.shadowMap.start(t.camera,r,i,!0,s),this._renderShadowCascades(3,t.shadowMap),t.shadowMap.finish(),t.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(t.camera,t.contentCamera)},a),this._renderContext=new K(this._rctx,this._shadowMap,r),this._nodes=new G(this._renderContext),this._plugins=new L({renderContext:this._renderContext,techniques:r,materials:t,requestRender:a,controller:e,fbos:this.fboCache,isFeatureEnabled:e=>this.isFeatureEnabled(e)}),this._plugins.add(this.renderPassManager),this.addHandles([_(()=>e.view.state.camera,()=>a(),l),_(()=>F.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES,e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(0):()=>{},a()},u),_(()=>e.view.environment.background?.color,e=>{const t=e?e.toUnitRGBA():A;S(this._backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]),a()},l),_(()=>e.view.state.camera.relativeElevation,e=>this._inGlobeView=(e??1/0)>=q,l),_(()=>this._bindParameters.clouds.fadeFactor,()=>{this._bindParameters.fadeLighting(),this._requestRender(2)},p),_(()=>this._bindParameters.clouds.data?.state,()=>a(),p),_(()=>e.view.state.highlights,e=>{this._bindParameters.highlights=e,a()},u)])}destroy(){this._gpuTimerHandle=a(this._gpuTimerHandle),this._nodes.destroy(),this._framebuffer.dispose(),this._shadowMap.dispose(),this._shadowAccumulator.destroy(),this._shadowAccumulator=null,this._loadEdgeViewTask=n(this._loadEdgeViewTask),this._edgeView=h(this._edgeView),this.renderPassManager.dispose(),this._releaseFBOs(),this._disposeOffscreenBuffers(),this._fboCache.destroy(),this._fboCache=null,this._plugins.destroy(),this._plugins=null,this._pluginInput=null,this._blit=null,this._oitBlend=null,this._compositingHelper=null,this._nodes=null,this._framebuffer=null,this._shadowMap=null,this._renderContext=null,this._performanceInfo=null,W.prune(),ae.prune(),D()}get renderContext(){return this._renderContext}get _bindParameters(){return this._renderContext.bind}get _framebufferSize(){return this._framebuffer.size}get performanceInfo(){return this._performanceInfo}updateRenderFeatures(e){this._renderStateFeatures.value=ee(e),this._requestRender()}isFeatureEnabled(e,t=this._state.value){return this._renderStateFeatures.value.get(t,e)??!1}setFeatureEnabled(e,t,r){this._renderStateFeatures.mutate(i=>i.set(t,e,r)),this._requestRender()}get _highQualityTransparency(){return this.isFeatureEnabled(1)}get hasReflections(){return this._pluginsHas.water&&this.isFeatureEnabled(6)}get _hasHighlights(){return this._plugins.produces(8,2,4,19,14,15)}hasHighlight(e){return this._plugins.hasHighlight(e)}get _hasHUDHighlights(){return this._plugins.produces(8,14,15)}get hasSSAO(){return this.isFeatureEnabled(5)&&!this._inGlobeView}get hasSMAA(){return this.isFeatureEnabled(0)}get hasEmitters(){return this._plugins.hasEmitters&&this._hasFloatBufferBlendSupport}get highResolutionAtmosphere(){return this.isFeatureEnabled(4)}get fboCache(){return this._fboCache}_releaseFBOs(){this._bindParameters.ssr.lastFrameColor=o(this._bindParameters.ssr.lastFrameColor),this._bindParameters.terrainDepth=o(this._bindParameters.terrainDepth),this._bindParameters.geometryDepth=o(this._bindParameters.geometryDepth)}_disposeOffscreenBuffers(){this._framebuffer.dispose(),this._disposeBindBuffers()}_disposeBindBuffers(){this._shadowMap.disposeOffscreenBuffers(),this._bindParameters.depth=o(this._bindParameters.depth),this._bindParameters.hudVisibility=o(this._bindParameters.hudVisibility)}get updating(){return this._loadEdgeViewTask&&!this._loadEdgeViewTask.finished||this._edgeView?.updating||this._shadowAccumulator.readyToRun||this._plugins.updating||!this.isCameraFinal}loadEdgeView(){return this._loadEdgeViewTask||(this._loadEdgeViewTask=r(async e=>{const{EdgeView:t}=await import("./edgeRendering/EdgeView.js");d(e);const r=this._edgeView=new t({rctx:this._rctx,renderSR:this.stage.view.renderSpatialReference,viewingMode:this.stage.view.stage.viewingMode,techniques:this._techniques,setNeedsRender:()=>this._requestRender(),schedule:Ee(this.stage.view.resourceController)});return this.addHandles(_(()=>r.updating,()=>this._requestRender(),p)),this._requestRender(),this._edgeViewCallbacks.forEach(e=>e(r)),this._edgeViewCallbacks.length=0,r})),this._loadEdgeViewTask.promise}withEdgeView(e){this.loadEdgeView(),null==this._edgeView?this._edgeViewCallbacks.push(e):e(this._edgeView)}get edgeView(){return this._edgeView}get isCameraFinal(){return this._reprojectionMatrixVersion.value>=0&&b(this._bindParameters.ssr.reprojectionMatrix,w)}set _reprojectionMatrix(e){t(this._bindParameters.ssr.reprojectionMatrix,e)&&this._reprojectionMatrixVersion.value++}get shadowsEnabled(){return!!this._shadowMap?.enabled}setParameters(e){const{_shadowMap:t,_bindParameters:r}=this;if(void 0!==e.shadowMap&&this._shadowMap.enabled!==e.shadowMap&&(this._shadowMap.enabled=e.shadowMap,this._requestRender()),void 0!==e.shadowMapMaxCascades&&t.maxCascades!==e.shadowMapMaxCascades&&(t.maxCascades=e.shadowMapMaxCascades,this._requestRender()),e.environment){void 0!==e.environment.weather&&(this._bindParameters.weather=e.environment.weather);const t="virtual"!==e.environment.lighting.type;r.enableFillLights!==t&&(r.enableFillLights=t,this._requestRender())}void 0!==e.shadowCast&&this._shadowAccumulator.setOptions(e.shadowCast)}set slice(e){this._sliceHelper.update(e)&&this._requestRender()}get plugins(){return this._plugins}get _hasFloatBufferBlendSupport(){return this._rctx.driverTest.floatBufferBlend.result}get _oitEnabled(){return this.isFeatureEnabled(2)&&this._hasFloatBufferBlendSupport}commit(e,t){return this._isRendering&&console.warn("Renderer.modify called while rendering"),!!super.commit(e,t,this._plugins.context)&&(this.updateHasFlags(),!0)}rendererAdded(e){this._plugins.add(e)}rendererRemoved(e){this._plugins.remove(e)}get occludedRequiresStencil(){return this.occludedRequiresOccludeeStencil||this.occludedRequiresIntegratedMeshStencil}get occludedRequiresOccludeeStencil(){return this._bindParameters.hasOccludees&&!!(8&this.plugins.renderOccludedFlags)}get occludedRequiresIntegratedMeshStencil(){return this._plugins.produces(0,0)&&this._plugins.produces(0,10)}updateHasFlags(){const has=this._pluginsHas;has.hudElements=this._plugins.produces(0,...Pe),has.water=this._plugins.produces(2,20),this._bindParameters.hasOccludees=this._plugins.hasOccludees,this._requestRender()}updateAnimation(e,t){this._animationTimer??=new k(e.camera,t),this._animationTimer.advance(e.camera,t,this._animationTimeDilation);const r=this._hasAnimations;return this._hasAnimations=this._plugins.updateAnimation(this._animationTimer),this._hasAnimations=this._nodes.updateAnimation(this._animationTimer)||this._hasAnimations,this._hasAnimations!==r&&(this._gpuTimerHandle=r?a(this._gpuTimerHandle):this.performanceInfo.enableGPUPerformanceInfo()),this._hasAnimations}get animationTimestep(){return this._animationTimestep.value}get _animationTimeDilation(){return this._animationTimestep.timeDilation}resetAnimation(){this._animationTimestep.clear()}tick(){this.fboCache.clean()}render(e,t,r,i=!1){try{return this._isRendering=!0,this._render(e,t,r,i)}catch(s){console.error(`Exception during rendering: ${s}`)}finally{this._isRendering=!1}return new ne(this._pluginInput.get(I.FINAL),null)}_render(e,t,r,i){const s=0===r;this.performanceInfo.startFrame(),this.fboCache.frameStart(),this.fboCache.interactive=s,this._disposeBindBuffers();const{camera:a,contentCamera:n,mode:h,alignPixelEnabled:o}=e;this._state.value=h;const d=this._nodes.produces("magnifier-color"),_=this._nodes.produces(I.FINAL);this._renderContext.time=t,this._renderContext.output=0,this._bindParameters.hasEmission=this.hasEmitters,this._bindParameters.oitPass=0,this._bindParameters.alignPixelEnabled=o,this._bindParameters.decorations=!i,this._bindParameters.mainDepth=null;const l=!i||!this._sliceHelper.isDecoration;this._bindParameters.slicePlane=l?this._sliceHelper.plane:null,this._bindParameters.viewshedEnabled=this._nodes.produces(R.VIEWSHED),this._bindParameters.cutFillEnabled=this._nodes.produces(R.CUTFILL_DEPTH),this._renderOverlay(),a.setGLViewport(this._rctx);const u=this._framebuffer,p=u.initialize(a.fullWidth,a.fullHeight,this._backgroundColor,this._bindParameters.hasEmission);this.hasReflections?(p?.setName("last frame color"),this._bindParameters.ssr.lastFrameColor=p):p?.release(),this._ensureBindParametersCamera(a,n),this._updateHUDOccludedFragmentOpacity(h,t),this._plugins.prepareRender(),this._bindParameters.shadowHighlightsVisible=this._needsShadowHighlight&&!i;const m=this._plugins.produces(0,...me);this._precompilePrepasses(),this.performanceInfo.advance(oe.PREPARE);const c=this._computeShadowDepthRange(a);this._renderShadowMap(a,this._bindParameters.lighting.mainLight.direction,c),this._pluginInput.set("normals",this._renderNormals()),this._renderRemainingGeometryDepth(),this._renderShadowAccumulation(c,a,n,!s),this._ensureBindParametersSSR(t),this._precompileShaders(m),this._renderContext.output=0,u.bind(),this._bindParameters.mainDepth=u.depth.attachment,this._renderOpaque(),this._renderTransparent(m),this._shadowMap.disposeMainBuffer(),this._pluginInput.set(R.FOCUSAREA,this._renderFocusAreaGeometry()),this._pluginInput.set(R.CUTFILL_DEPTH,this._renderCutFillDepth()),u.update(e=>this._renderNodes(R.TRANSPARENT_ENVIRONMENT,e)),u.update(e=>this._renderNodes(R.VIEWSHED,e)),u.update(e=>this._renderNodes(R.LASERLINES,e)),u.update(e=>this._renderNodes(R.FOCUSAREA_COLOR,e)),this._pluginInput.release(R.FOCUSAREA),this._pluginInput.release(R.CUTFILL_DEPTH),u.update(e=>this._renderNodes(R.OCCLUDED,e)),this._pluginInput.set("highlights",this._renderHighlightPrepass()),this._renderHighlightShadowMap(a,this._bindParameters.lighting.mainLight.direction,c);const f=2===r?this._renderObjectAndLayerIdColor():null;u.update(e=>this._renderNodes(I.COMPOSITE,e)),this._shadowMap.disposeOffscreenBuffers();const g=s&&!_&&!(d&&!i),b=this._pluginInput.get(I.COMPOSITE),P=g?v:this.fboCache.acquire(b.fbo.width,b.fbo.height,R.ANTIALIASING),C=this._nodes.produces(R.ANTIALIASING)?this._renderNodes(R.ANTIALIASING,P):this.blitFBO(b,P,!1);let w;this._pluginInput.set(R.ANTIALIASING,C),this._hasHUDHighlights?(this._renderHUD(1,C),w=this._renderNodes(R.HIGHLIGHTS,C)):(w=this._renderNodes(R.HIGHLIGHTS,C),this._renderHUD(1,w));const T=this._renderNodes(R.MAGNIFIER,w);return s&&d&&!i&&!_&&this.blitFBO(T),_?(T.attachDepth(u.depth),this.blitFBO(this._renderNodes(I.FINAL,T)),T.detachDepth()):this._pluginInput.set(I.FINAL,T),this._pluginInput.release("highlights"),this.onPostRender&&this.onPostRender(),this._releaseFBOs(),u.releaseDepth(),this._renderContext.lastFrameCamera.copyFrom(this._bindParameters.camera),this.fboCache.frameEnd(),this.performanceInfo.finishFrame(),s||(this._releaseFBOs(),this._disposeOffscreenBuffers()),new ne(this._pluginInput.get(I.FINAL),f)}_precompileShaders(e){++this._plugins.context.techniques.precompiling,this._renderContext.output=0,this._precompileOpaqueGeometry(),this._nodes.precompile(R.OPAQUE_ENVIRONMENT),this._bindParameters.terrainDepthTest=this._bindParameters.cullAboveTerrain=this._needsTerrainDepth,this._renderContext.output=1,this._plugins.precompile(...ce),this._needsTerrainDepth&&(this._precompileOpaqueGeometry(),this._precompileTransparentGeometry()),this._renderContext.output=0,this._plugins.precompile(...ce),e&&(this._precompileTransparentGeometry(),this._hasPhotoshopTerrain&&(this._bindParameters.cullAboveTerrain=!1,this._precompileTransparentGeometry(),this._bindParameters.cullAboveTerrain=this._needsTerrainDepth)),this._nodes.precompile(R.FOCUSAREA),this._needsHUDVisibility&&this._plugins.precompile(13),this._plugins.precompile(16),this._precompileHUD(0),this._bindParameters.terrainDepthTest=!1,this._bindParameters.cullAboveTerrain=!1,this._nodes.precompile(R.VIEWSHED,R.CUTFILL_DEPTH,R.CUTFILL_COLOR,R.LASERLINES,R.FOCUSAREA_COLOR,R.OCCLUDED,R.ANTIALIASING,R.HIGHLIGHTS);const t=this._bindParameters;t.highlightMixTexture=t.highlights.length>1?this._rctx.emptyTexture:null,this._precompileHUD(1),this._hasHighlights&&(t.highlights.forEach((e,r)=>{t.highlightLevel=r,this._precompileAllGeometry(8)}),t.highlightLevel=null),t.highlightMixTexture=null,this._nodes.precompile(I.COMPOSITE,R.MAGNIFIER),this._shadowAccumulator.precompile(),this._plugins.precompile(9),--this._plugins.context.techniques.precompiling}_renderFocusAreaGeometry(){const e=this._nodes.produce(R.FOCUSAREA,this._pluginInput);return e&&this.performanceInfo.advance(oe.FOCUS_AREA_MASK),e}_renderObjectAndLayerIdColor(){if(!this._nodes.produces("olid"))return null;const e=this._renderContext.output;++this._techniques.precompiling;const t=this._framebufferSize;let r=this.fboCache.acquire(t.width,t.height,"olid");return r.acquireDepth(14),r=this._nodes.render(r,this._pluginInput),--this._techniques.precompiling,this.performanceInfo.advance(oe.OBJECT_AND_LAYER_ID_COLOR),this._renderContext.output=e,r}finish(e){this._hasAnimations||this._animationTimestep.clear();const t=this.performanceInfo.gpuSamplingEnabled,r=0===e;if(r||t){const e=r?this.performanceInfo.elapsedTime:0;let i=0;t?i=this.performanceInfo.totalGPUTimeSampler.last:this._rctx.gl.finish();const s=Math.max(e,i);this._animationTimestep.frame(s,r)}}readMainDepth(e,t){const{mainDepth:r,camera:i}=this._bindParameters;if(!r)return;const s=this.fboCache.acquire(this._framebufferSize.width,this._framebufferSize.height,"linear depth");this._rctx.bindFramebuffer(s.fbo),i.setGLViewport(this._rctx),this._rctx.setScissorRect(e[0],e[1],e[2],e[3]),this._rctx.setScissorTestEnabled(!0),this._rctx.clearFramebuffer(A),this._compositingHelper.blitDepthToLinearDepth(this._bindParameters,r),this._rctx.setScissorTestEnabled(!1),this._rctx.setScissorRect(0,0,this._rctx.gl.canvas.width,this._rctx.gl.canvas.width),s.fbo?.readPixels(e[0],e[1],e[2],e[3],6408,de.UNSIGNED_BYTE,t),s.release()}readHUDVisibility(e,t,r,i,s){this._bindParameters.hudVisibility?.fbo?.readPixels(e,t,r,i,6408,de.UNSIGNED_BYTE,s)}readAccumulatedShadow(e){return this._shadowAccumulator.readAccumulatedShadow(e[0],e[1])}_renderEdges(e){const t=this._edgeView;if(!t?.shouldRender())return;const r=this._framebufferSize,i=this.fboCache.acquire(r.width,r.height,"edges"),s=this._bindParameters.geometryDepth,a=()=>t.render(this._bindParameters,e);this.renderToTargets(a,i,s??this._framebuffer.depth,A),this._framebuffer.bind(),this._compositingHelper.composite(this._bindParameters,i.getTexture()),i.release(),this.performanceInfo.advance(1===e?oe.OPAQUE_EDGES:oe.TRANSPARENT_EDGES)}_renderOverlay(){this._bindParameters.overlay=this.overlay?.render(this._renderContext.time),this._bindParameters.overlay&&this.performanceInfo.advance(oe.OVERLAY)}_renderShadowMap(e,t,r){if(!this.shadowsEnabled)return;const i=this._shadowMap;i.start(e,t,r,this.isFeatureEnabled(7),this.stage.view.qualitySettings.maximumPixelRatio),this._needsShadowHighlight?(this._renderShadowCascades(5,this._shadowMap),i.copySnapshot(1),this._renderShadowCascades(4,this._shadowMap)):this._renderShadowCascades(3),i.finish(),e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,this._bindParameters.contentCamera),this.performanceInfo.advance(oe.SHADOW_MAP)}_renderHighlightShadowMap(e,t,r){if(!this.shadowsEnabled||!this._needsShadowHighlight)return;const i=this._shadowMap;i.start(e,t,r,this.isFeatureEnabled(7),this.stage.view.qualitySettings.maximumPixelRatio),this._renderShadowCascades(4,this._shadowMap),i.moveSnapshot(0),i.finish(),e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,this._bindParameters.contentCamera),this.performanceInfo.advance(oe.SHADOW_MAP)}_renderCutFillDepth(){return this._nodes.produce(R.CUTFILL_DEPTH,this._pluginInput)}_precompileShadowCascades(e){0!==this._shadowMap.cascades.length&&this._precompileAllGeometry(e)}_renderShadowCascades(e,t=this._shadowMap){t.bindFbo();for(const r of t.cascades)r.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(r.camera,r.camera),this.renderAllGeometry(e)}get _needsDepth(){return this._plugins.consumes(1)||this._nodes.requireGeometryDepth()||this.hasReflections||this._needsShadowHighlight||this._shadowAccumulator.active||this._debugNeedsDepth}_renderRemainingGeometryDepth(){const e=this._pluginInput.get("normals");e?(this._pluginInput.set(R.SSAO,this._renderSSAO()),this._needsDepth?(this._rctx.bindFramebuffer(e.fbo),this._rctx.clear(1024),this._renderGeometryWithoutNormals(1),this._bindParameters.depth?.release(),this._bindParameters.depth=e.obtainDepthTexture(),this.performanceInfo.advance(oe.DEPTH)):(e.detachDepth(),this._bindParameters.depth=o(this._bindParameters.depth)),this.hasSSAO&&this._pluginInput.release("normals")):this._renderAllGeometryDepth()}_renderAllGeometryDepth(){if(this._bindParameters.depth=o(this._bindParameters.depth),!this._needsDepth)return;const e=this._framebufferSize,t=this.fboCache.acquire(e.width,e.height,"geometry depth",14);this._rctx.bindFramebuffer(t.fbo),this._rctx.clear(1280),this.renderAllGeometry(1),this._bindParameters.depth=t.obtainDepthTexture(),t.release(),this.performanceInfo.advance(oe.DEPTH)}_renderTerrainDepth(){if(this._bindParameters.terrainDepth=o(this._bindParameters.terrainDepth),this._bindParameters.terrainDepthTest=this._bindParameters.cullAboveTerrain=this._needsTerrainDepth,!this._needsTerrainDepth)return;const e=this._renderContext.output;this._renderContext.output=1;const t=this._framebufferSize,r=this.fboCache.acquire(t.width,t.height,"terrain depth",14);this._rctx.bindFramebuffer(r.fbo),this._rctx.clear(1280),this._renderTransparentGround(),this._bindParameters.terrainDepth=r.obtainDepthTexture(),r.release(),this._renderContext.output=e}_renderGeometryDepth(){if(this._bindParameters.geometryDepth=o(this._bindParameters.geometryDepth),!this._needsTerrainDepth)return;const e=this._renderContext.output,{width:t,height:r}=this._framebufferSize,i=this.fboCache.acquire(t,r,"geometry depth",14);this._rctx.bindFramebuffer(i.fbo),this._rctx.clear(1280),this._renderOpaqueAndTransparentGeometry(1),this._renderContext.output=e,this._bindParameters.geometryDepth=i.obtainDepthTexture(),i.release()}get _needsShadowDepthRange(){return this._shadowMap.enabled||this._shadowAccumulator.active}_computeShadowDepthRange(e){if(!this._needsShadowDepthRange)return Q.Zero;const t=Y(e,this._plugins.plugins,this.stage.layers,0);return t.union(this._plugins.queryDepthRange(e)),t.near=Math.max(e.near,t.near),t.far=Math.min(e.far,t.far),t}updateSceneDepthRange(e){if(!this.stage.view.state.isGlobal)return void(this.sceneDepthRange.value=Q.Infinite);if((this.stage.view.renderCoordsHelper?.getAltitude(e.eye)??0)<y)return void(this.sceneDepthRange.value=Q.Infinite);const t=e.clone();t.near=O,t.far=1e10;const r=Y(t,this._plugins.plugins,this.stage.layers,1);r.union(this._plugins.queryDepthRange(t)),this.sceneDepthRange.value.equals(r)||(this.sceneDepthRange.value=r)}get _normalsRequired(){const e=this._nodes.require("normals",I.FINAL,I.COMPOSITE,I.OPAQUE,I.TRANSPARENT,R.VIEWSHED,R.LASERLINES);return(this.hasSSAO?1:0)+e}_updateHUDOccludedFragmentOpacity(e,t){const{idleOpacity:r,navigatingOpacity:a,maxDelta:n,tiltFadeStart:h,tiltFadeEnd:o,altitudeStart:d,altitudeEnd:_}=Z,l=this.stage.view,u=l.stateManager.camera,p=l.qualitySettings.fadeDuration,m=2===e?r:a,c=i((u.tilt-h)/(o-h),0,1),f=i(((u.position.z??0)-d)/(_-d),0,1),g=s(s(1,m,c),1,f),b=this._bindParameters.hudOccludedFragmentOpacity;if(p<=0||b===g||0===this._lastFrameTime||this._lastFrameTime>t)return this._bindParameters.hudOccludedFragmentOpacity=g,void(this._lastFrameTime=t);const P=t-this._lastFrameTime;this._lastFrameTime=t;const C=Math.max(1-r,Math.abs(r-a)),w=Math.min(C*P/p,n);w>=Math.abs(g-b)?this._bindParameters.hudOccludedFragmentOpacity=g:(this._bindParameters.hudOccludedFragmentOpacity=b+Math.sign(g-b)*w,this._requestRender())}_precompilePrepasses(){this._normalsRequired&&this._precompileAllGeometry(2),this._needsDepth&&this._precompileAllGeometry(1),this.shadowsEnabled&&(this._needsShadowHighlight?(this._precompileShadowCascades(4),this._precompileShadowCascades(5)):this._precompileShadowCascades(3)),this._shadowAccumulator.active&&this._precompileAllGeometry(3)}_renderNormals(){const e=this._normalsRequired;if(0===e)return;const t=this._framebufferSize,r=this.fboCache.acquire(t.width,t.height,"normals",5);r.acquireDepth(14),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer(A,!0,!0),this._renderContext.output=2,this._plugins.render(...fe);const i=this._nodes.optional("normals",I.FINAL,I.COMPOSITE,I.OPAQUE,I.TRANSPARENT,R.VIEWSHED);return r.retain(e+i-1),this.performanceInfo.advance(oe.NORMALS),r}_renderSSAO(){const e=this._pluginInput.get("normals");if(!this.hasSSAO||!e)return;const t=this._nodes.produce(R.SSAO,this._pluginInput);return this._bindParameters.ssao=t,t&&this.performanceInfo.advance(oe.SSAO),t}_precompileAllGeometry(e){const t=this._renderContext.output;this._renderContext.output=e,this._precompileOpaqueGeometry(),this._precompileTransparentGeometry(),this._plugins.precompile(...ce),this._renderContext.output=t}renderAllGeometry(e){this._renderContext.output=e,this._renderOpaqueAndTransparentGeometry(e),this._renderTransparentGround()}precompileSlots(e,...t){for(const r of t)this._bindParameters.slot=r,e.precompile(this._renderContext)}precompileOccludedSlots(e,t){for(const r of t)this._renderContext.renderOccludedMask=r,this.precompileSlots(e,...be);this._renderContext.renderOccludedMask=X}renderSlots(e,...t){for(const r of t)this._bindParameters.slot=r,e.forAll(e=>{const t=e.acquireTechniques(this._renderContext);t&&e.render(this._renderContext,t)})}renderOccludedSlots(e,t){this._renderContext.renderOccludedMask=t,this.plugins.renderOccludedFlags>1&&this._plugins.render(10),this.renderSlots(e,...be),this._renderContext.renderOccludedMask=X}renderHUD(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(14)}precompileViewshedShadowMap(){this._precompileAllGeometry(6)}precompileCutFill(){const e=7,t=this._renderContext.output;this._renderContext.output=e,this._plugins.precompile(0,1,...ce),this._renderContext.output=t}renderViewshedShadowMap(e){const{camera:t,contentCamera:r}=this._bindParameters,i=this._renderContext.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this.renderAllGeometry(6),this._ensureBindParametersCamera(t,r),this._bindParameters.camera.setGLViewport(this._rctx),this._renderContext.output=i}renderCutFillReferenceDepth(e){const{camera:t,contentCamera:r}=this._bindParameters,i=this._renderContext.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this._renderContext.output=7,this._plugins.render(0,1,...ce),this._ensureBindParametersCamera(t,r),t.setGLViewport(this._rctx),this._renderContext.output=i}_renderOpaqueAndTransparentGeometry(e){this._renderContext.output=e,this._renderOpaqueGeometry(),this._renderTransparentGeometry()}_renderGeometryWithoutNormals(e){this._renderContext.output=e,this._plugins.render(...ge)}_precompileOpaqueGeometry(){this._plugins.precompile(...pe),this._nodes.precompile("opaque-color")}_renderOpaqueGeometry(){this._plugins.render(...pe)}_renderTransparentGeometry(){this._plugins.render(...me)}get _hasPhotoshopTerrain(){return this._plugins.produces(0,6)}get _needsTerrainDepth(){return this._highQualityTransparency&&this._hasPhotoshopTerrain}_renderPhotoshopTerrain(){if(!this._hasPhotoshopTerrain)return null;const e=this._framebufferSize,t=this.fboCache.acquire(e.width,e.height,"transparent terrain");return this.renderToTargets(()=>this._plugins.render(6),t,this._framebuffer.depth,A),this.performanceInfo.advance(oe.TRANSPARENT_TERRAIN),t}_renderTransparentGround(){this._plugins.render(...ce)}get _needsHUDVisibility(){return this._plugins.produces(this._renderContext.output,13)}_renderHUDVisibility(){if(!this._needsHUDVisibility)return void(this._bindParameters.hudVisibility=o(this._bindParameters.hudVisibility));const{width:e,height:t}=this._framebufferSize;let r=this._bindParameters.hudVisibility;r?.fbo?.width===e&&r?.fbo?.height===t||(r?.release(),r=this.fboCache.acquire(e,t,"hud visibility",4),this._bindParameters.hudVisibility=r);const i=this._bindParameters.geometryDepth;r.attachDepth(i||this._framebuffer.depth),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer([0,1,0,1]),this._plugins.render(13),r.detachDepth(),this._framebuffer.bind(),this.performanceInfo.advance(oe.HUD_VISIBILITY)}_renderLineCallouts(e){if(this._bindParameters.hudRenderStyle=e,0===e){const e=()=>this._plugins.render(16),t=this._framebufferSize,r=this.fboCache.acquireDepth(13,t.width,t.height,"line callouts");this.renderToTargets(e,this._framebuffer.color,r,void 0,!0,!0),r.release()}else this._plugins.render(16)}_precompileHUD(e){if(this._precompileHUDOutput(e),this._hasHighlights){const t=this._renderContext.output;this._renderContext.output=8,this._precompileHUDOutput(e),this._renderContext.output=t}}_precompileHUDOutput(e){const t=this._bindParameters.hudRenderStyle;this._bindParameters.hudRenderStyle=e,this._oitEnabled&&N(this._renderContext.output)?(this._bindParameters.oitPass=1,this._plugins.precompile(...Pe),this._bindParameters.oitPass=2,this._plugins.precompile(...Pe),this._bindParameters.oitPass=0):this._plugins.precompile(...Pe),this._bindParameters.hudRenderStyle=t}_renderHUD(e,t){if(this._pluginsHas.hudElements){if(this._oitEnabled){const r=this._renderOIT(1,e);this._rctx.bindFramebuffer(t.fbo),this._compositingHelper.compositePreMultipliedAlpha(this._bindParameters,r.getTexture(),!1),r.release()}else if(this._renderContext.output=0,0===e){const t=()=>this._renderHUDElements(e),r=this._framebufferSize,i=this.fboCache.acquireDepth(13,r.width,r.height,"hud");this.renderToTargets(t,this._framebuffer.color,i,void 0,!0,!0),i.release()}else t.acquireDepth(13),this._rctx.bindFramebuffer(t.fbo),this._renderHUDElements(e),t.detachDepth();this.performanceInfo.advance(0===e?oe.HUD_OCCLUDED:oe.HUD)}}_renderHUDElements(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(...Pe)}get _needsShadowHighlight(){return this.shadowsEnabled&&this._plugins.produces(4,2)}_renderHighlightPrepass(){if(!this._hasHighlights)return;const{fboCache:e,_rctx:t,_bindParameters:r}=this,i=this._framebufferSize,{highlights:s}=r,a=e.acquire(i.width,i.height,"highlights",s.length>V?3:1);a.acquireDepth(14);const n=this._plugins.produces(8,0);return n&&this._framebuffer.color.fbo&&a.fbo&&t.blitFramebuffer(this._framebuffer.color.fbo,a.fbo,1024),t.bindFramebuffer(a.fbo),t.gl.clearBufferuiv(6144,0,[0,0,0,0]),n||t.clear(1024),this._renderContext.output=8,t.bindFramebuffer(a.fbo),j(t,e,i,r,()=>this._renderHighlightGeometries()),a.detachDepth(),this.performanceInfo.advance(oe.HIGHLIGHTS),a}_renderHighlightGeometries(){this._plugins.render(...Ce),this._rctx.clear(256),this._renderHUDElements(2)}_renderShadowAccumulation(e,t,r,i){this._shadowAccumulator.updateDepthRange(e),this._shadowAccumulator.accumulating&&this._bindParameters.depth&&this._shadowAccumulator.renderAccumulation(this._bindParameters.depth,t,r,i)&&this.performanceInfo.advance(oe.ACCUMULATED_SHADOWS)}_precompileTransparentGeometry(){this._oitEnabled&&N(this._renderContext.output)?(this._bindParameters.oitPass=1,this._plugins.precompile(...me),this._bindParameters.oitPass=2,this._plugins.precompile(...me),this._bindParameters.oitPass=0):this._plugins.precompile(...me)}_renderOIT(e,t=2){const r=1===e,i=this._framebufferSize,s=r?()=>this._renderHUDElements(t):()=>this._renderTransparentGeometry(),a=this._bindParameters,n=this._renderContext.output;this._renderContext.output=0,a.oitPass=1;const h=r?"oit hud":"oit",o=this.fboCache.acquire(i.width,i.height,h,8),d=this._bindParameters.hasEmission;d&&o.acquireColor(_e,8,"oit emissive"),o.acquireColor(d?le:_e,7,"oit alpha"),r||o.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(o.fbo),this._rctx.clearFramebuffer([0,0,0,1]),d&&this._rctx.clearBuffer(1,E),s(),o.detachDepth(),a.oitPass=2;const _=this.fboCache.acquire(i.width,i.height,r?"oit hud front":"oit front");let l;return d&&_.acquireColor(_e,8,"oit emissive front"),r?_.acquireDepth(13):_.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(_.fbo),this._rctx.clearFramebuffer(A,r),s(),_.detachDepth(),a.oitPass=0,r?(l=this.fboCache.acquire(i.width,i.height,"oit hud composite"),this._rctx.bindFramebuffer(l.fbo),this._rctx.setClearColor(0,0,0,1e-13),this._rctx.clear(16384)):this._framebuffer.bind(),this._oitBlend??=new B(this._techniques),this._oitBlend.blend(this._rctx,o,_,a,d,!r),l?.detachDepth(),_.release(),o.release(),this._renderContext.output=n,l}_renderOpaque(){const e=this.plugins.produces(0,...pe);if(e){this._plugins.render(0,1);const e=this._framebuffer;e.update(e=>this._renderNodes(R.CUTFILL_COLOR,e)),e.update(e=>this._renderNodes(R.OPAQUE_TERRAIN,e)),e.bind(),this._plugins.render(2,3)}const t=this._framebuffer;this._renderTerrainDepth(),t.update(t=>this._renderNodes(I.OPAQUE,t,e)),this.fboCache.debugCallback?.(I.OPAQUE,t.color.fbo),t.update(e=>this._renderNodes(R.OPAQUE_ENVIRONMENT,e)),this.fboCache.debugCallback?.(R.OPAQUE_ENVIRONMENT,t.color.fbo),this._renderEdges(1)}_renderTransparent(e){const t=this._framebuffer;t.bind(),this._renderPlugins(21,oe.VOXEL),this._renderHiddenTransparentEdges(),e&&(this._oitEnabled?this._renderOIT(0):this._renderTransparentGeometry()),t.update(t=>this._renderNodes(I.TRANSPARENT,t,e)),this.fboCache.debugCallback?.(I.TRANSPARENT,t.color.fbo),this._renderGeometryDepth(),this._renderHUDVisibility(),this._needsTerrainDepth||this._plugins.render(16),this._renderEdges(0);const r=this._renderPhotoshopTerrain(),i=r?.getTexture();i&&this._bindParameters.hudVisibility&&(this._needsTerrainDepth?this._renderLineCallouts(0):(this._rctx.bindFramebuffer(this._bindParameters.hudVisibility?.fbo),this._compositingHelper.compositeHUD(this._bindParameters,i)),this._renderHUD(0,t.color)),this._bindParameters.cullAboveTerrain=!1,i&&(t.bind(),this._compositingHelper.compositePreMultipliedAlpha(this._bindParameters,i),r?.release(),this._needsTerrainDepth&&(this._renderEdges(1),e&&(this._oitEnabled?this._renderOIT(0):this._renderTransparentGeometry(),this.performanceInfo.advance(oe.TRANSPARENT)),this._renderEdges(0))),this._bindParameters.ssao=o(this._bindParameters.ssao),this._needsTerrainDepth&&this._renderLineCallouts(1),this._bindParameters.terrainDepthTest=!1,this._renderTransparentEnvironment()}_renderTransparentEnvironment(){this._shadowAccumulator.render(this._bindParameters),this.performanceInfo.advance(oe.APPLY_ACCUMULATED_SHADOWS),this._framebuffer.bind(),this._plugins.render(9),this.performanceInfo.advance(oe.TRANSPARENT_MATERIAL_WITHOUT_DEPTH)}_renderPlugins(e,t){this._plugins.produces(this._renderContext.output,e)&&(this._plugins.render(e),this.performanceInfo.advance(t))}_renderNodes(e,t,r=!1){if(t.setName(e),this._pluginInput.set(e,t),!this._nodes.produces(e))return r&&this.performanceInfo.advance(e),t;const i=this._nodes.render(t,this._pluginInput,this._releaseNormals);return this.performanceInfo.advance(e),i}blitFBO(e,t=v,r=!0){return this._blit??=new U(this._techniques),this._blit.blit(this._rctx,e,t,this._bindParameters),this._pluginInput.set(e.name,t),r&&e.release(),t}_ensureBindParametersCamera(e,t){this._bindParameters.camera=e,this._bindParameters.contentCamera=t}_ensureBindParametersSSR(e){if(this._bindParameters.ssr.lastFrameColor){null==this._ssrEnableTime&&(this._ssrEnableTime=e),this._renderContext.lastFrameCamera.equals(this._bindParameters.camera)?this._reprojectionMatrix=w:(P(Te,this._bindParameters.camera.viewMatrix),P(we,this._bindParameters.camera.projectionMatrix),C(Se,Te,we),C(Se,this._renderContext.lastFrameCamera.viewMatrix,Se),C(Se,this._renderContext.lastFrameCamera.projectionMatrix,Se),this._reprojectionMatrix=Se);const t=this.stage.view.qualitySettings.fadeDuration;this._bindParameters.ssr.fadeFactor=t>0?Math.min(t,e-this._ssrEnableTime)/t:1,this._bindParameters.ssr.fadeFactor<1&&this._requestRender()}else this._reprojectionMatrix=w,this._ssrEnableTime=null}addRenderNode(e){this._nodes.add(e),this._requestRender()}removeRenderNode(e){this._nodes.remove(e),this._requestRender()}updateLighting(e,t,r,i){this._bindParameters.updateLighting(e,t,r,i),this._requestRender(1)}get usedMemory(){return{fbos:this.fboCache.usedMemory,plugins:this._plugins.usedMemory,edges:this.edgeView?.usedMemory??0}}renderToTargets(e,t,r,i,s=!1,a=!1){t.attachDepth(r),this._rctx.bindFramebuffer(t.fbo),this._rctx.clearFramebuffer(i,s,a),e(),t.detachDepth()}get test(){}};e([f({readOnly:!0})],ue.prototype,"highResolutionAtmosphere",null),e([f()],ue.prototype,"_edgeView",void 0),e([f()],ue.prototype,"updating",null),ue=e([g("esri.views.3d.webgl-engine.lib.Renderer")],ue);const pe=[0,1,2,3],me=[7,8,4,5],ce=[6,7,8],fe=[0,1,2,4,...ce],ge=[3,5],be=[2,4,9],Pe=[17,14,15],Ce=[4,5,2,3,0,1,...ce],we=T(),Te=T(),Se=T();function Ee(e){return t=>e.immediate.schedule(t)}export{ue as Renderer};
5
+ import{__decorate as e}from"tslib";import{update as t}from"../../../../core/arrayUtils.js";import{createTask as r}from"../../../../core/asyncUtils.js";import"../../../../core/has.js";import{clamp as i,lerp as s}from"../../../../core/mathUtils.js";import{removeMaybe as a,abortMaybe as n,destroyMaybe as h,releaseMaybe as o}from"../../../../core/maybe.js";import{throwIfAborted as d}from"../../../../core/promiseUtils.js";import{watch as _,syncAndInitial as l,initial as u,sync as p}from"../../../../core/reactiveUtils.js";import{signal as m}from"../../../../core/signal.js";import{Milliseconds as c}from"../../../../core/time.js";import{property as f,subclass as g}from"../../../../core/accessorSupport/decorators.js";import{equals as b,invert as P,multiply as C}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as w,create as T}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{c as S}from"../../../../chunks/vec42.js";import{ZEROS as E}from"../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{fromValues as x,ZEROS as A}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{pruneIndexArrays as D}from"../../../../geometry/support/Indices.js";import{RenderCategory as I,InternalRenderCategory as R}from"../../webgl.js";import{innerAtmosphereFadeStart as y}from"../../environment/atmosphereUtils.js";import{minNearDistanceInMeters as O}from"../../state/NearFarHeuristic.js";import{debugFlags as F}from"../../support/debugFlags.js";import{FBOCache as H,defaultWebGLFBO as v}from"../core/FBOCache.js";import{RenderPassManager as M}from"../core/renderPasses/RenderPassManager.js";import{isColor as N}from"../core/shaderLibrary/ShaderOutput.js";import{distanceFadeEnd as q}from"../core/shaderLibrary/shading/ScreenSpaceConstants.js";import{RenderNodes as G}from"../effects/RenderNodes.js";import{RenderPluginManager as L}from"../effects/RenderPluginManager.js";import{Blit as U}from"../effects/blit/Blit.js";import{maxHighlightsPerChannel as V,renderHighlightBuffer as j}from"../effects/highlight/Highlight.js";import{OITBlend as B}from"../effects/transparency/OITBlend.js";import{AnimationTimer as k}from"./AnimationTimer.js";import{AnimationTimeStep as z}from"./AnimationTimeStep.js";import{BoundingInfo as W}from"./BoundingInfo.js";import{DepthRange as Q}from"./DepthRange.js";import{depthRangeFromScene as Y}from"./depthRangeUtils.js";import{hudFragmentOpacityParameters as Z}from"./hudFragmentOpacityParameters.js";import{MainFramebuffer as J}from"./MainFramebuffer.js";import{RenderContext as K,defaultRenderOccludedMask as X}from"./RenderContext.js";import{RendererBase as $}from"./RendererBase.js";import{setupFeatureDefaults as ee}from"./RenderFeature.js";import{RenderPluginInput as te}from"./RenderPluginInput.js";import{ShadowAccumulator as re}from"./ShadowAccumulator.js";import{ShadowMap as ie}from"./ShadowMap.js";import se from"./SliceHelper.js";import{MergedRenderer as ae}from"../materials/renderers/MergedRenderer.js";import{RenderSceneResult as ne}from"../parts/renderUtils.js";import{RendererPerformanceInfo as he,PerformanceCategory as oe}from"../statistics/RendererPerformanceInfo.js";import{PixelType as de,ColorAttachment1 as _e,ColorAttachment2 as le}from"../../../webgl/enums.js";let ue=class extends ${constructor(e,t,r,i,s,a){super({stage:e}),this._techniques=r,this._rctx=i,this._compositingHelper=s,this._requestRender=a,this._pluginsHas={hudElements:!1,water:!1},this.renderPassManager=new M,this._isRendering=!1,this._inGlobeView=!1,this._backgroundColor=x(0,0,0,1),this._sliceHelper=new se,this.sceneDepthRange=m(Q.Infinite),this._state=m(2),this._hasAnimations=!1,this._animationTimestep=new z,this._loadEdgeViewTask=null,this._edgeViewCallbacks=[],this._reprojectionMatrixVersion=m(0),this._lastFrameTime=c(0),this._renderHiddenTransparentEdges=()=>{},this._pluginInput=new te,this._releaseNormals=e=>{e.some(({name:e})=>"normals"===e)&&this._pluginInput.release("normals")},this._debugNeedsDepth=!1,this._fboCache=new H(i),this._renderStateFeatures=m(ee(e.view.qualityProfile)),this._framebuffer=new J(this.fboCache),this._performanceInfo=new he(this._rctx),this._shadowMap=new ie(this.fboCache,e.viewingMode),this._shadowAccumulator=new re(this.fboCache,r,e,e=>{const t=this.shadowsEnabled;this._shadowMap.enabled=!0,this._ensureBindParametersCamera(e.camera,e.contentCamera),this._plugins.prepareRender(),this._shadowMap.enabled=t},(t,r,i)=>{const s=e.view.qualitySettings.maximumPixelRatio;t.shadowMap.start(t.camera,r,i,!0,s),this._renderShadowCascades(3,t.shadowMap),t.shadowMap.finish(),t.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(t.camera,t.contentCamera)},a),this._renderContext=new K(this._rctx,this._shadowMap,r),this._nodes=new G(this._renderContext),this._plugins=new L({renderContext:this._renderContext,techniques:r,materials:t,requestRender:a,controller:e,fbos:this.fboCache,isFeatureEnabled:e=>this.isFeatureEnabled(e)}),this._plugins.add(this.renderPassManager),this.addHandles([_(()=>e.view.state.camera,()=>a(),l),_(()=>F.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES,e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(0):()=>{},a()},u),_(()=>e.view.environment.background?.color,e=>{const t=e?e.toUnitRGBA():A;S(this._backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]),a()},l),_(()=>e.view.state.camera.relativeElevation,e=>this._inGlobeView=(e??1/0)>=q,l),_(()=>this._bindParameters.clouds.fadeFactor,()=>{this._bindParameters.fadeLighting(),this._requestRender(2)},p),_(()=>this._bindParameters.clouds.data?.state,()=>a(),p),_(()=>e.view.state.highlights,e=>{this._bindParameters.highlights=e,a()},u)])}destroy(){this._gpuTimerHandle=a(this._gpuTimerHandle),this._nodes.destroy(),this._framebuffer.dispose(),this._shadowMap.dispose(),this._shadowAccumulator.destroy(),this._shadowAccumulator=null,this._loadEdgeViewTask=n(this._loadEdgeViewTask),this._edgeView=h(this._edgeView),this.renderPassManager.dispose(),this._releaseFBOs(),this._disposeOffscreenBuffers(),this._fboCache.destroy(),this._fboCache=null,this._plugins.destroy(),this._plugins=null,this._pluginInput=null,this._blit=null,this._oitBlend=null,this._compositingHelper=null,this._nodes=null,this._framebuffer=null,this._shadowMap=null,this._renderContext=null,this._performanceInfo=null,W.prune(),ae.prune(),D()}get renderContext(){return this._renderContext}get _bindParameters(){return this._renderContext.bind}get _framebufferSize(){return this._framebuffer.size}get performanceInfo(){return this._performanceInfo}updateRenderFeatures(e){this._renderStateFeatures.value=ee(e),this._requestRender()}isFeatureEnabled(e,t=this._state.value){return this._renderStateFeatures.value.get(t,e)??!1}setFeatureEnabled(e,t,r){this._renderStateFeatures.mutate(i=>i.set(t,e,r)),this._requestRender()}get _highQualityTransparency(){return this.isFeatureEnabled(1)}get hasReflections(){return this._pluginsHas.water&&this.isFeatureEnabled(6)}get _hasHighlights(){return this._plugins.produces(8,2,4,19,14,15)}hasHighlight(e){return this._plugins.hasHighlight(e)}get _hasHUDHighlights(){return this._plugins.produces(8,14,15)}get hasSSAO(){return this.isFeatureEnabled(5)&&!this._inGlobeView}get hasSMAA(){return this.isFeatureEnabled(0)}get hasEmitters(){return this._plugins.hasEmitters&&this._hasFloatBufferBlendSupport}get highResolutionAtmosphere(){return this.isFeatureEnabled(4)}get fboCache(){return this._fboCache}_releaseFBOs(){this._bindParameters.ssr.lastFrameColor=o(this._bindParameters.ssr.lastFrameColor),this._bindParameters.terrainDepth=o(this._bindParameters.terrainDepth),this._bindParameters.geometryDepth=o(this._bindParameters.geometryDepth)}_disposeOffscreenBuffers(){this._framebuffer.dispose(),this._disposeBindBuffers()}_disposeBindBuffers(){this._shadowMap.disposeOffscreenBuffers(),this._bindParameters.depth=o(this._bindParameters.depth),this._bindParameters.hudVisibility=o(this._bindParameters.hudVisibility)}get updating(){return this._loadEdgeViewTask&&!this._loadEdgeViewTask.finished||this._edgeView?.updating||this._shadowAccumulator.readyToRun||this._plugins.updating||!this.isCameraFinal}loadEdgeView(){return this._loadEdgeViewTask||(this._loadEdgeViewTask=r(async e=>{const{EdgeView:t}=await import("./edgeRendering/EdgeView.js");d(e);const r=this._edgeView=new t({rctx:this._rctx,renderSR:this.stage.view.renderSpatialReference,viewingMode:this.stage.view.stage.viewingMode,techniques:this._techniques,setNeedsRender:()=>this._requestRender(),schedule:xe(this.stage.view.resourceController)});return this.addHandles(_(()=>r.updating,()=>this._requestRender(),p)),this._requestRender(),this._edgeViewCallbacks.forEach(e=>e(r)),this._edgeViewCallbacks.length=0,r})),this._loadEdgeViewTask.promise}withEdgeView(e){this.loadEdgeView(),null==this._edgeView?this._edgeViewCallbacks.push(e):e(this._edgeView)}get edgeView(){return this._edgeView}get isCameraFinal(){return this._reprojectionMatrixVersion.value>=0&&b(this._bindParameters.ssr.reprojectionMatrix,w)}set _reprojectionMatrix(e){t(this._bindParameters.ssr.reprojectionMatrix,e)&&this._reprojectionMatrixVersion.value++}get shadowsEnabled(){return!!this._shadowMap?.enabled}setParameters(e){const{_shadowMap:t,_bindParameters:r}=this;if(void 0!==e.shadowMap&&this._shadowMap.enabled!==e.shadowMap&&(this._shadowMap.enabled=e.shadowMap,this._requestRender()),void 0!==e.shadowMapMaxCascades&&t.maxCascades!==e.shadowMapMaxCascades&&(t.maxCascades=e.shadowMapMaxCascades,this._requestRender()),e.environment){void 0!==e.environment.weather&&(this._bindParameters.weather=e.environment.weather);const t="virtual"!==e.environment.lighting.type;r.enableFillLights!==t&&(r.enableFillLights=t,this._requestRender())}void 0!==e.shadowCast&&this._shadowAccumulator.setOptions(e.shadowCast)}set slice(e){this._sliceHelper.update(e)&&this._requestRender()}get plugins(){return this._plugins}get _hasFloatBufferBlendSupport(){return this._rctx.driverTest.floatBufferBlend.result}get _oitEnabled(){return this.isFeatureEnabled(2)&&this._hasFloatBufferBlendSupport}commit(e,t){return this._isRendering&&console.warn("Renderer.modify called while rendering"),!!super.commit(e,t,this._plugins.context)&&(this.updateHasFlags(),!0)}rendererAdded(e){this._plugins.add(e)}rendererRemoved(e){this._plugins.remove(e)}get occludedRequiresStencil(){return this.occludedRequiresOccludeeStencil||this.occludedRequiresIntegratedMeshStencil}get occludedRequiresOccludeeStencil(){return this._bindParameters.hasOccludees&&!!(8&this.plugins.renderOccludedFlags)}get occludedRequiresIntegratedMeshStencil(){return this._plugins.produces(0,0)&&this._plugins.produces(0,10)}updateHasFlags(){const has=this._pluginsHas;has.hudElements=this._plugins.produces(0,...Pe),has.water=this._plugins.produces(2,20),this._bindParameters.hasOccludees=this._plugins.hasOccludees,this._requestRender()}updateAnimation(e,t){this._animationTimer??=new k(e.camera,t),this._animationTimer.advance(e.camera,t,this._animationTimeDilation);const r=this._hasAnimations;return this._hasAnimations=this._plugins.updateAnimation(this._animationTimer),this._hasAnimations=this._nodes.updateAnimation(this._animationTimer)||this._hasAnimations,this._hasAnimations!==r&&(this._gpuTimerHandle=r?a(this._gpuTimerHandle):this.performanceInfo.enableGPUPerformanceInfo()),this._hasAnimations}get animationTimestep(){return this._animationTimestep.value}get _animationTimeDilation(){return this._animationTimestep.timeDilation}resetAnimation(){this._animationTimestep.clear()}tick(){this.fboCache.clean()}render(e,t,r,i=!1){try{return this._isRendering=!0,this._render(e,t,r,i)}catch(s){console.error(`Exception during rendering: ${s}`)}finally{this._isRendering=!1}return new ne(this._pluginInput.get(I.FINAL),null)}_render(e,t,r,i){const s=0===r;this.performanceInfo.startFrame(),this.fboCache.frameStart(),this.fboCache.interactive=s,this._disposeBindBuffers();const{camera:a,contentCamera:n,mode:h,alignPixelEnabled:o}=e;this._state.value=h;const d=this._nodes.produces("magnifier-color"),_=this._nodes.produces(I.FINAL);this._renderContext.time=t,this._renderContext.output=0,this._bindParameters.hasEmission=this.hasEmitters,this._bindParameters.oitPass=0,this._bindParameters.alignPixelEnabled=o,this._bindParameters.decorations=!i,this._bindParameters.mainDepth=null;const l=!i||!this._sliceHelper.isDecoration;this._bindParameters.slicePlane=l?this._sliceHelper.plane:null,this._bindParameters.viewshedEnabled=this._nodes.produces(R.VIEWSHED),this._bindParameters.cutFillEnabled=this._nodes.produces(R.CUTFILL_DEPTH),this._renderOverlay(),a.setGLViewport(this._rctx);const u=this._framebuffer,p=u.initialize(a.fullWidth,a.fullHeight,this._backgroundColor,this._bindParameters.hasEmission);this.hasReflections?(p?.setName("last frame color"),this._bindParameters.ssr.lastFrameColor=p):p?.release(),this._ensureBindParametersCamera(a,n),this._updateHUDOccludedFragmentOpacity(h,t),this._plugins.sortTestsTransparentOrderedSlots(we),this._plugins.prepareRender(),this._bindParameters.shadowHighlightsVisible=this._needsShadowHighlight&&!i;const m=this._plugins.produces(0,...me);this._precompilePrepasses(),this.performanceInfo.advance(oe.PREPARE);const c=this._computeShadowDepthRange(a);this._renderShadowMap(a,this._bindParameters.lighting.mainLight.direction,c),this._pluginInput.set("normals",this._renderNormals()),this._renderRemainingGeometryDepth(),this._renderShadowAccumulation(c,a,n,!s),this._ensureBindParametersSSR(t),this._precompileShaders(m),this._renderContext.output=0,u.bind(),this._bindParameters.mainDepth=u.depth.attachment,this._renderOpaque(),this._renderTransparent(m),this._shadowMap.disposeMainBuffer(),this._pluginInput.set(R.FOCUSAREA,this._renderFocusAreaGeometry()),this._pluginInput.set(R.CUTFILL_DEPTH,this._renderCutFillDepth()),u.update(e=>this._renderNodes(R.TRANSPARENT_ENVIRONMENT,e)),u.update(e=>this._renderNodes(R.VIEWSHED,e)),u.update(e=>this._renderNodes(R.LASERLINES,e)),u.update(e=>this._renderNodes(R.FOCUSAREA_COLOR,e)),this._pluginInput.release(R.FOCUSAREA),this._pluginInput.release(R.CUTFILL_DEPTH),u.update(e=>this._renderNodes(R.OCCLUDED,e)),this._pluginInput.set("highlights",this._renderHighlightPrepass()),this._renderHighlightShadowMap(a,this._bindParameters.lighting.mainLight.direction,c);const f=2===r?this._renderObjectAndLayerIdColor():null;u.update(e=>this._renderNodes(I.COMPOSITE,e)),this._shadowMap.disposeOffscreenBuffers();const g=s&&!_&&!(d&&!i),b=this._pluginInput.get(I.COMPOSITE),P=g?v:this.fboCache.acquire(b.fbo.width,b.fbo.height,R.ANTIALIASING),C=this._nodes.produces(R.ANTIALIASING)?this._renderNodes(R.ANTIALIASING,P):this.blitFBO(b,P,!1);let w;this._pluginInput.set(R.ANTIALIASING,C),this._hasHUDHighlights?(this._renderHUD(1,C),w=this._renderNodes(R.HIGHLIGHTS,C)):(w=this._renderNodes(R.HIGHLIGHTS,C),this._renderHUD(1,w));const T=this._renderNodes(R.MAGNIFIER,w);return s&&d&&!i&&!_&&this.blitFBO(T),_?(T.attachDepth(u.depth),this.blitFBO(this._renderNodes(I.FINAL,T)),T.detachDepth()):this._pluginInput.set(I.FINAL,T),this._pluginInput.release("highlights"),this.onPostRender&&this.onPostRender(),this._releaseFBOs(),u.releaseDepth(),this._renderContext.lastFrameCamera.copyFrom(this._bindParameters.camera),this.fboCache.frameEnd(),this.performanceInfo.finishFrame(),s||(this._releaseFBOs(),this._disposeOffscreenBuffers()),new ne(this._pluginInput.get(I.FINAL),f)}_precompileShaders(e){++this._plugins.context.techniques.precompiling,this._renderContext.output=0,this._precompileOpaqueGeometry(),this._nodes.precompile(R.OPAQUE_ENVIRONMENT),this._bindParameters.terrainDepthTest=this._bindParameters.cullAboveTerrain=this._needsTerrainDepth,this._renderContext.output=1,this._plugins.precompile(...ce),this._needsTerrainDepth&&(this._precompileOpaqueGeometry(),this._precompileTransparentGeometry()),this._renderContext.output=0,this._plugins.precompile(...ce),e&&(this._precompileTransparentGeometry(),this._hasPhotoshopTerrain&&(this._bindParameters.cullAboveTerrain=!1,this._precompileTransparentGeometry(),this._bindParameters.cullAboveTerrain=this._needsTerrainDepth)),this._nodes.precompile(R.FOCUSAREA),this._needsHUDVisibility&&this._plugins.precompile(13),this._plugins.precompile(16),this._precompileHUD(0),this._bindParameters.terrainDepthTest=!1,this._bindParameters.cullAboveTerrain=!1,this._nodes.precompile(R.VIEWSHED,R.CUTFILL_DEPTH,R.CUTFILL_COLOR,R.LASERLINES,R.FOCUSAREA_COLOR,R.OCCLUDED,R.ANTIALIASING,R.HIGHLIGHTS);const t=this._bindParameters;t.highlightMixTexture=t.highlights.length>1?this._rctx.emptyTexture:null,this._precompileHUD(1),this._hasHighlights&&(t.highlights.forEach((e,r)=>{t.highlightLevel=r,this._precompileAllGeometry(8)}),t.highlightLevel=null),t.highlightMixTexture=null,this._nodes.precompile(I.COMPOSITE,R.MAGNIFIER),this._shadowAccumulator.precompile(),this._plugins.precompile(9),--this._plugins.context.techniques.precompiling}_renderFocusAreaGeometry(){const e=this._nodes.produce(R.FOCUSAREA,this._pluginInput);return e&&this.performanceInfo.advance(oe.FOCUS_AREA_MASK),e}_renderObjectAndLayerIdColor(){if(!this._nodes.produces("olid"))return null;const e=this._renderContext.output;++this._techniques.precompiling;const t=this._framebufferSize;let r=this.fboCache.acquire(t.width,t.height,"olid");return r.acquireDepth(14),r=this._nodes.render(r,this._pluginInput),--this._techniques.precompiling,this.performanceInfo.advance(oe.OBJECT_AND_LAYER_ID_COLOR),this._renderContext.output=e,r}finish(e){this._hasAnimations||this._animationTimestep.clear();const t=this.performanceInfo.gpuSamplingEnabled,r=0===e;if(r||t){const e=r?this.performanceInfo.elapsedTime:0;let i=0;t?i=this.performanceInfo.totalGPUTimeSampler.last:this._rctx.gl.finish();const s=Math.max(e,i);this._animationTimestep.frame(s,r)}}readMainDepth(e,t){const{mainDepth:r,camera:i}=this._bindParameters;if(!r)return;const s=this.fboCache.acquire(this._framebufferSize.width,this._framebufferSize.height,"linear depth");this._rctx.bindFramebuffer(s.fbo),i.setGLViewport(this._rctx),this._rctx.setScissorRect(e[0],e[1],e[2],e[3]),this._rctx.setScissorTestEnabled(!0),this._rctx.clearFramebuffer(A),this._compositingHelper.blitDepthToLinearDepth(this._bindParameters,r),this._rctx.setScissorTestEnabled(!1),this._rctx.setScissorRect(0,0,this._rctx.gl.canvas.width,this._rctx.gl.canvas.width),s.fbo?.readPixels(e[0],e[1],e[2],e[3],6408,de.UNSIGNED_BYTE,t),s.release()}readHUDVisibility(e,t,r,i,s){this._bindParameters.hudVisibility?.fbo?.readPixels(e,t,r,i,6408,de.UNSIGNED_BYTE,s)}readAccumulatedShadow(e){return this._shadowAccumulator.readAccumulatedShadow(e[0],e[1])}_renderEdges(e){const t=this._edgeView;if(!t?.shouldRender())return;const r=this._framebufferSize,i=this.fboCache.acquire(r.width,r.height,"edges"),s=this._bindParameters.geometryDepth,a=()=>t.render(this._bindParameters,e);this.renderToTargets(a,i,s??this._framebuffer.depth,A),this._framebuffer.bind(),this._compositingHelper.composite(this._bindParameters,i.getTexture()),i.release(),this.performanceInfo.advance(1===e?oe.OPAQUE_EDGES:oe.TRANSPARENT_EDGES)}_renderOverlay(){this._bindParameters.overlay=this.overlay?.render(this._renderContext.time),this._bindParameters.overlay&&this.performanceInfo.advance(oe.OVERLAY)}_renderShadowMap(e,t,r){if(!this.shadowsEnabled)return;const i=this._shadowMap;i.start(e,t,r,this.isFeatureEnabled(7),this.stage.view.qualitySettings.maximumPixelRatio),this._needsShadowHighlight?(this._renderShadowCascades(5,this._shadowMap),i.copySnapshot(1),this._renderShadowCascades(4,this._shadowMap)):this._renderShadowCascades(3),i.finish(),e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,this._bindParameters.contentCamera),this.performanceInfo.advance(oe.SHADOW_MAP)}_renderHighlightShadowMap(e,t,r){if(!this.shadowsEnabled||!this._needsShadowHighlight)return;const i=this._shadowMap;i.start(e,t,r,this.isFeatureEnabled(7),this.stage.view.qualitySettings.maximumPixelRatio),this._renderShadowCascades(4,this._shadowMap),i.moveSnapshot(0),i.finish(),e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,this._bindParameters.contentCamera),this.performanceInfo.advance(oe.SHADOW_MAP)}_renderCutFillDepth(){return this._nodes.produce(R.CUTFILL_DEPTH,this._pluginInput)}_precompileShadowCascades(e){0!==this._shadowMap.cascades.length&&this._precompileAllGeometry(e)}_renderShadowCascades(e,t=this._shadowMap){t.bindFbo();for(const r of t.cascades)r.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(r.camera,r.camera),this.renderAllGeometry(e)}get _needsDepth(){return this._plugins.consumes(1)||this._nodes.requireGeometryDepth()||this.hasReflections||this._needsShadowHighlight||this._shadowAccumulator.active||this._debugNeedsDepth}_renderRemainingGeometryDepth(){const e=this._pluginInput.get("normals");e?(this._pluginInput.set(R.SSAO,this._renderSSAO()),this._needsDepth?(this._rctx.bindFramebuffer(e.fbo),this._rctx.clear(1024),this._renderGeometryWithoutNormals(1),this._bindParameters.depth?.release(),this._bindParameters.depth=e.obtainDepthTexture(),this.performanceInfo.advance(oe.DEPTH)):(e.detachDepth(),this._bindParameters.depth=o(this._bindParameters.depth)),this.hasSSAO&&this._pluginInput.release("normals")):this._renderAllGeometryDepth()}_renderAllGeometryDepth(){if(this._bindParameters.depth=o(this._bindParameters.depth),!this._needsDepth)return;const e=this._framebufferSize,t=this.fboCache.acquire(e.width,e.height,"geometry depth",14);this._rctx.bindFramebuffer(t.fbo),this._rctx.clear(1280),this.renderAllGeometry(1),this._bindParameters.depth=t.obtainDepthTexture(),t.release(),this.performanceInfo.advance(oe.DEPTH)}_renderTerrainDepth(){if(this._bindParameters.terrainDepth=o(this._bindParameters.terrainDepth),this._bindParameters.terrainDepthTest=this._bindParameters.cullAboveTerrain=this._needsTerrainDepth,!this._needsTerrainDepth)return;const e=this._renderContext.output;this._renderContext.output=1;const t=this._framebufferSize,r=this.fboCache.acquire(t.width,t.height,"terrain depth",14);this._rctx.bindFramebuffer(r.fbo),this._rctx.clear(1280),this._renderTransparentGround(),this._bindParameters.terrainDepth=r.obtainDepthTexture(),r.release(),this._renderContext.output=e}_renderGeometryDepth(){if(this._bindParameters.geometryDepth=o(this._bindParameters.geometryDepth),!this._needsTerrainDepth)return;const e=this._renderContext.output,{width:t,height:r}=this._framebufferSize,i=this.fboCache.acquire(t,r,"geometry depth",14);this._rctx.bindFramebuffer(i.fbo),this._rctx.clear(1280),this._renderOpaqueAndTransparentGeometry(1),this._renderContext.output=e,this._bindParameters.geometryDepth=i.obtainDepthTexture(),i.release()}get _needsShadowDepthRange(){return this._shadowMap.enabled||this._shadowAccumulator.active}_computeShadowDepthRange(e){if(!this._needsShadowDepthRange)return Q.Zero;const t=Y(e,this._plugins.plugins,this.stage.layers,0);return t.union(this._plugins.queryDepthRange(e)),t.near=Math.max(e.near,t.near),t.far=Math.min(e.far,t.far),t}updateSceneDepthRange(e){if(!this.stage.view.state.isGlobal)return void(this.sceneDepthRange.value=Q.Infinite);if((this.stage.view.renderCoordsHelper?.getAltitude(e.eye)??0)<y)return void(this.sceneDepthRange.value=Q.Infinite);const t=e.clone();t.near=O,t.far=1e10;const r=Y(t,this._plugins.plugins,this.stage.layers,1);r.union(this._plugins.queryDepthRange(t)),this.sceneDepthRange.value.equals(r)||(this.sceneDepthRange.value=r)}get _normalsRequired(){const e=this._nodes.require("normals",I.FINAL,I.COMPOSITE,I.OPAQUE,I.TRANSPARENT,R.VIEWSHED,R.LASERLINES);return(this.hasSSAO?1:0)+e}_updateHUDOccludedFragmentOpacity(e,t){const{idleOpacity:r,navigatingOpacity:a,maxDelta:n,tiltFadeStart:h,tiltFadeEnd:o,altitudeStart:d,altitudeEnd:_}=Z,l=this.stage.view,u=l.stateManager.camera,p=l.qualitySettings.fadeDuration,m=2===e?r:a,c=i((u.tilt-h)/(o-h),0,1),f=i(((u.position.z??0)-d)/(_-d),0,1),g=s(s(1,m,c),1,f),b=this._bindParameters.hudOccludedFragmentOpacity;if(p<=0||b===g||0===this._lastFrameTime||this._lastFrameTime>t)return this._bindParameters.hudOccludedFragmentOpacity=g,void(this._lastFrameTime=t);const P=t-this._lastFrameTime;this._lastFrameTime=t;const C=Math.max(1-r,Math.abs(r-a)),w=Math.min(C*P/p,n);w>=Math.abs(g-b)?this._bindParameters.hudOccludedFragmentOpacity=g:(this._bindParameters.hudOccludedFragmentOpacity=b+Math.sign(g-b)*w,this._requestRender())}_precompilePrepasses(){this._normalsRequired&&this._precompileAllGeometry(2),this._needsDepth&&this._precompileAllGeometry(1),this.shadowsEnabled&&(this._needsShadowHighlight?(this._precompileShadowCascades(4),this._precompileShadowCascades(5)):this._precompileShadowCascades(3)),this._shadowAccumulator.active&&this._precompileAllGeometry(3)}_renderNormals(){const e=this._normalsRequired;if(0===e)return;const t=this._framebufferSize,r=this.fboCache.acquire(t.width,t.height,"normals",5);r.acquireDepth(14),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer(A,!0,!0),this._renderContext.output=2,this._plugins.render(...fe);const i=this._nodes.optional("normals",I.FINAL,I.COMPOSITE,I.OPAQUE,I.TRANSPARENT,R.VIEWSHED);return r.retain(e+i-1),this.performanceInfo.advance(oe.NORMALS),r}_renderSSAO(){const e=this._pluginInput.get("normals");if(!this.hasSSAO||!e)return;const t=this._nodes.produce(R.SSAO,this._pluginInput);return this._bindParameters.ssao=t,t&&this.performanceInfo.advance(oe.SSAO),t}_precompileAllGeometry(e){const t=this._renderContext.output;this._renderContext.output=e,this._precompileOpaqueGeometry(),this._precompileTransparentGeometry(),this._plugins.precompile(...ce),this._renderContext.output=t}renderAllGeometry(e){this._renderContext.output=e,this._renderOpaqueAndTransparentGeometry(e),this._renderTransparentGround()}precompileSlots(e,...t){for(const r of t)this._bindParameters.slot=r,e.precompile(this._renderContext)}precompileOccludedSlots(e,t){for(const r of t)this._renderContext.renderOccludedMask=r,this.precompileSlots(e,...be);this._renderContext.renderOccludedMask=X}renderSlots(e,...t){for(const r of t)this._bindParameters.slot=r,e.forAll(e=>{const t=e.acquireTechniques(this._renderContext);t&&e.render(this._renderContext,t)})}renderOccludedSlots(e,t){this._renderContext.renderOccludedMask=t,this.plugins.renderOccludedFlags>1&&this._plugins.render(10),this.renderSlots(e,...be),this._renderContext.renderOccludedMask=X}renderHUD(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(14)}precompileViewshedShadowMap(){this._precompileAllGeometry(6)}precompileCutFill(){const e=7,t=this._renderContext.output;this._renderContext.output=e,this._plugins.precompile(0,1,...ce),this._renderContext.output=t}renderViewshedShadowMap(e){const{camera:t,contentCamera:r}=this._bindParameters,i=this._renderContext.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this.renderAllGeometry(6),this._ensureBindParametersCamera(t,r),this._bindParameters.camera.setGLViewport(this._rctx),this._renderContext.output=i}renderCutFillReferenceDepth(e){const{camera:t,contentCamera:r}=this._bindParameters,i=this._renderContext.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this._renderContext.output=7,this._plugins.render(0,1,...ce),this._ensureBindParametersCamera(t,r),t.setGLViewport(this._rctx),this._renderContext.output=i}_renderOpaqueAndTransparentGeometry(e){this._renderContext.output=e,this._renderOpaqueGeometry(),this._renderTransparentGeometry()}_renderGeometryWithoutNormals(e){this._renderContext.output=e,this._plugins.render(...ge)}_precompileOpaqueGeometry(){this._plugins.precompile(...pe),this._nodes.precompile("opaque-color")}_renderOpaqueGeometry(){this._plugins.render(...pe)}_renderTransparentGeometry(){this._plugins.render(...me)}get _hasPhotoshopTerrain(){return this._plugins.produces(0,6)}get _needsTerrainDepth(){return this._highQualityTransparency&&this._hasPhotoshopTerrain}_renderPhotoshopTerrain(){if(!this._hasPhotoshopTerrain)return null;const e=this._framebufferSize,t=this.fboCache.acquire(e.width,e.height,"transparent terrain");return this.renderToTargets(()=>this._plugins.render(6),t,this._framebuffer.depth,A),this.performanceInfo.advance(oe.TRANSPARENT_TERRAIN),t}_renderTransparentGround(){this._plugins.render(...ce)}get _needsHUDVisibility(){return this._plugins.produces(this._renderContext.output,13)}_renderHUDVisibility(){if(!this._needsHUDVisibility)return void(this._bindParameters.hudVisibility=o(this._bindParameters.hudVisibility));const{width:e,height:t}=this._framebufferSize;let r=this._bindParameters.hudVisibility;r?.fbo?.width===e&&r?.fbo?.height===t||(r?.release(),r=this.fboCache.acquire(e,t,"hud visibility",4),this._bindParameters.hudVisibility=r);const i=this._bindParameters.geometryDepth;r.attachDepth(i||this._framebuffer.depth),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer([0,1,0,1]),this._plugins.render(13),r.detachDepth(),this._framebuffer.bind(),this.performanceInfo.advance(oe.HUD_VISIBILITY)}_renderLineCallouts(e){if(this._bindParameters.hudRenderStyle=e,0===e){const e=()=>this._plugins.render(16),t=this._framebufferSize,r=this.fboCache.acquireDepth(13,t.width,t.height,"line callouts");this.renderToTargets(e,this._framebuffer.color,r,void 0,!0,!0),r.release()}else this._plugins.render(16)}_precompileHUD(e){if(this._precompileHUDOutput(e),this._hasHighlights){const t=this._renderContext.output;this._renderContext.output=8,this._precompileHUDOutput(e),this._renderContext.output=t}}_precompileHUDOutput(e){const t=this._bindParameters.hudRenderStyle;this._bindParameters.hudRenderStyle=e,this._oitEnabled&&N(this._renderContext.output)?(this._bindParameters.oitPass=1,this._plugins.precompile(...Pe),this._bindParameters.oitPass=2,this._plugins.precompile(...Pe),this._bindParameters.oitPass=0):this._plugins.precompile(...Pe),this._bindParameters.hudRenderStyle=t}_renderHUD(e,t){if(this._pluginsHas.hudElements){if(this._oitEnabled){const r=this._renderOIT(1,e);this._rctx.bindFramebuffer(t.fbo),this._compositingHelper.compositePreMultipliedAlpha(this._bindParameters,r.getTexture(),!1),r.release()}else if(this._renderContext.output=0,0===e){const t=()=>this._renderHUDElements(e),r=this._framebufferSize,i=this.fboCache.acquireDepth(13,r.width,r.height,"hud");this.renderToTargets(t,this._framebuffer.color,i,void 0,!0,!0),i.release()}else t.acquireDepth(13),this._rctx.bindFramebuffer(t.fbo),this._renderHUDElements(e),t.detachDepth();this.performanceInfo.advance(0===e?oe.HUD_OCCLUDED:oe.HUD)}}_renderHUDElements(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(...Pe)}get _needsShadowHighlight(){return this.shadowsEnabled&&this._plugins.produces(4,2)}_renderHighlightPrepass(){if(!this._hasHighlights)return;const{fboCache:e,_rctx:t,_bindParameters:r}=this,i=this._framebufferSize,{highlights:s}=r,a=e.acquire(i.width,i.height,"highlights",s.length>V?3:1);a.acquireDepth(14);const n=this._plugins.produces(8,0);return n&&this._framebuffer.color.fbo&&a.fbo&&t.blitFramebuffer(this._framebuffer.color.fbo,a.fbo,1024),t.bindFramebuffer(a.fbo),t.gl.clearBufferuiv(6144,0,[0,0,0,0]),n||t.clear(1024),this._renderContext.output=8,t.bindFramebuffer(a.fbo),j(t,e,i,r,()=>this._renderHighlightGeometries()),a.detachDepth(),this.performanceInfo.advance(oe.HIGHLIGHTS),a}_renderHighlightGeometries(){this._plugins.render(...Ce),this._rctx.clear(256),this._renderHUDElements(2)}_renderShadowAccumulation(e,t,r,i){this._shadowAccumulator.updateDepthRange(e),this._shadowAccumulator.accumulating&&this._bindParameters.depth&&this._shadowAccumulator.renderAccumulation(this._bindParameters.depth,t,r,i)&&this.performanceInfo.advance(oe.ACCUMULATED_SHADOWS)}_precompileTransparentGeometry(){this._oitEnabled&&N(this._renderContext.output)?(this._bindParameters.oitPass=1,this._plugins.precompile(...me),this._bindParameters.oitPass=2,this._plugins.precompile(...me),this._bindParameters.oitPass=0):this._plugins.precompile(...me)}_renderOIT(e,t=2){const r=1===e,i=this._framebufferSize,s=r?()=>this._renderHUDElements(t):()=>this._renderTransparentGeometry(),a=this._bindParameters,n=this._renderContext.output;this._renderContext.output=0,a.oitPass=1;const h=r?"oit hud":"oit",o=this.fboCache.acquire(i.width,i.height,h,8),d=this._bindParameters.hasEmission;d&&o.acquireColor(_e,8,"oit emissive"),o.acquireColor(d?le:_e,7,"oit alpha"),r||o.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(o.fbo),this._rctx.clearFramebuffer([0,0,0,1]),d&&this._rctx.clearBuffer(1,E),s(),o.detachDepth(),a.oitPass=2;const _=this.fboCache.acquire(i.width,i.height,r?"oit hud front":"oit front");let l;return d&&_.acquireColor(_e,8,"oit emissive front"),r?_.acquireDepth(13):_.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(_.fbo),this._rctx.clearFramebuffer(A,r),s(),_.detachDepth(),a.oitPass=0,r?(l=this.fboCache.acquire(i.width,i.height,"oit hud composite"),this._rctx.bindFramebuffer(l.fbo),this._rctx.setClearColor(0,0,0,1e-13),this._rctx.clear(16384)):this._framebuffer.bind(),this._oitBlend??=new B(this._techniques),this._oitBlend.blend(this._rctx,o,_,a,d,!r),l?.detachDepth(),_.release(),o.release(),this._renderContext.output=n,l}_renderOpaque(){const e=this.plugins.produces(0,...pe);if(e){this._plugins.render(0,1);const e=this._framebuffer;e.update(e=>this._renderNodes(R.CUTFILL_COLOR,e)),e.update(e=>this._renderNodes(R.OPAQUE_TERRAIN,e)),e.bind(),this._plugins.render(2,3)}const t=this._framebuffer;this._renderTerrainDepth(),t.update(t=>this._renderNodes(I.OPAQUE,t,e)),this.fboCache.debugCallback?.(I.OPAQUE,t.color.fbo),t.update(e=>this._renderNodes(R.OPAQUE_ENVIRONMENT,e)),this.fboCache.debugCallback?.(R.OPAQUE_ENVIRONMENT,t.color.fbo),this._renderEdges(1)}_renderTransparent(e){const t=this._framebuffer;t.bind(),this._renderPlugins(21,oe.VOXEL),this._renderHiddenTransparentEdges(),e&&(this._oitEnabled?this._renderOIT(0):this._renderTransparentGeometry()),t.update(t=>this._renderNodes(I.TRANSPARENT,t,e)),this.fboCache.debugCallback?.(I.TRANSPARENT,t.color.fbo),this._renderGeometryDepth(),this._renderHUDVisibility(),this._needsTerrainDepth||this._plugins.render(16),this._renderEdges(0);const r=this._renderPhotoshopTerrain(),i=r?.getTexture();i&&this._bindParameters.hudVisibility&&(this._needsTerrainDepth?this._renderLineCallouts(0):(this._rctx.bindFramebuffer(this._bindParameters.hudVisibility?.fbo),this._compositingHelper.compositeHUD(this._bindParameters,i)),this._renderHUD(0,t.color)),this._bindParameters.cullAboveTerrain=!1,i&&(t.bind(),this._compositingHelper.compositePreMultipliedAlpha(this._bindParameters,i),r?.release(),this._needsTerrainDepth&&(this._renderEdges(1),e&&(this._oitEnabled?this._renderOIT(0):this._renderTransparentGeometry(),this.performanceInfo.advance(oe.TRANSPARENT)),this._renderEdges(0))),this._bindParameters.ssao=o(this._bindParameters.ssao),this._needsTerrainDepth&&this._renderLineCallouts(1),this._bindParameters.terrainDepthTest=!1,this._renderTransparentEnvironment()}_renderTransparentEnvironment(){this._shadowAccumulator.render(this._bindParameters),this.performanceInfo.advance(oe.APPLY_ACCUMULATED_SHADOWS),this._framebuffer.bind(),this._plugins.render(9),this.performanceInfo.advance(oe.TRANSPARENT_MATERIAL_WITHOUT_DEPTH)}_renderPlugins(e,t){this._plugins.produces(this._renderContext.output,e)&&(this._plugins.render(e),this.performanceInfo.advance(t))}_renderNodes(e,t,r=!1){if(t.setName(e),this._pluginInput.set(e,t),!this._nodes.produces(e))return r&&this.performanceInfo.advance(e),t;const i=this._nodes.render(t,this._pluginInput,this._releaseNormals);return this.performanceInfo.advance(e),i}blitFBO(e,t=v,r=!0){return this._blit??=new U(this._techniques),this._blit.blit(this._rctx,e,t,this._bindParameters),this._pluginInput.set(e.name,t),r&&e.release(),t}_ensureBindParametersCamera(e,t){this._bindParameters.camera=e,this._bindParameters.contentCamera=t}_ensureBindParametersSSR(e){if(this._bindParameters.ssr.lastFrameColor){null==this._ssrEnableTime&&(this._ssrEnableTime=e),this._renderContext.lastFrameCamera.equals(this._bindParameters.camera)?this._reprojectionMatrix=w:(P(Se,this._bindParameters.camera.viewMatrix),P(Te,this._bindParameters.camera.projectionMatrix),C(Ee,Se,Te),C(Ee,this._renderContext.lastFrameCamera.viewMatrix,Ee),C(Ee,this._renderContext.lastFrameCamera.projectionMatrix,Ee),this._reprojectionMatrix=Ee);const t=this.stage.view.qualitySettings.fadeDuration;this._bindParameters.ssr.fadeFactor=t>0?Math.min(t,e-this._ssrEnableTime)/t:1,this._bindParameters.ssr.fadeFactor<1&&this._requestRender()}else this._reprojectionMatrix=w,this._ssrEnableTime=null}addRenderNode(e){this._nodes.add(e),this._requestRender()}removeRenderNode(e){this._nodes.remove(e),this._requestRender()}updateLighting(e,t,r,i){this._bindParameters.updateLighting(e,t,r,i),this._requestRender(1)}get usedMemory(){return{fbos:this.fboCache.usedMemory,plugins:this._plugins.usedMemory,edges:this.edgeView?.usedMemory??0}}renderToTargets(e,t,r,i,s=!1,a=!1){t.attachDepth(r),this._rctx.bindFramebuffer(t.fbo),this._rctx.clearFramebuffer(i,s,a),e(),t.detachDepth()}get test(){}};e([f({readOnly:!0})],ue.prototype,"highResolutionAtmosphere",null),e([f()],ue.prototype,"_edgeView",void 0),e([f()],ue.prototype,"updating",null),ue=e([g("esri.views.3d.webgl-engine.lib.Renderer")],ue);const pe=[0,1,2,3],me=[7,8,4,5],ce=[6,7,8],fe=[0,1,2,4,...ce],ge=[3,5],be=[2,4,9],Pe=[17,14,15],Ce=[4,5,2,3,0,1,...ce],we=[4,9,5,12],Te=T(),Se=T(),Ee=T();function xe(e){return t=>e.immediate.schedule(t)}export{ue as Renderer};
@@ -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{clamp as e,deg2rad as t}from"../../../../core/mathUtils.js";import{fromMat4 as i}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as r}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as n,rotate as o}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as l,create as c}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{h as u,p as f,n as p,e as h,j as d,t as m,c as g,d as b,b as v,B as x,a as S,g as y,i as z}from"../../../../chunks/vec32.js";import{create as O,fromValues as P}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromArray as _,create as j,freeze as D}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as M}from"../../../../geometry/support/aaBoundingRect.js";import{BufferViewVec4u8 as R}from"../../../../geometry/support/buffer/BufferView.js";import{evaluateModelTransformScale as V}from"../../layers/support/FastSymbolUpdates.js";import{debugFlags as C}from"../../support/debugFlags.js";import{isColorHighlightOrOLID as A,isColor as F}from"../core/shaderLibrary/ShaderOutput.js";import{HUDVerticalPixelOffset as w}from"../core/shaderLibrary/hud/HUD.glsl.js";import{GLTextureMaterialBindParameters as E,GLTextureMaterial as L}from"../lib/GLTextureMaterial.js";import{Material as T}from"../lib/Material.js";import{SeparateScreenSizePerspectiveEvaluators as U}from"../lib/screenSizePerspectiveUtils.js";import{assert as B}from"../lib/Util.js";import{writePosition as I,writeNormal as W,writeColor as H,writeBufferVec2 as G,writeBufferFloat as N,writeBufferVec4 as X,writeBufferVec4Zeros as Y,writeOlidColor as q}from"./internal/bufferWriterUtils.js";import{verticalOffsetAtDistance as k}from"./internal/MaterialUtil.js";import{c as J,f as K}from"../../../../chunks/HUDMaterial.glsl.js";import{getInstanceLayout as Q,baseLayout as Z,HUDMaterialTechnique as $}from"../shaders/HUDMaterialTechnique.js";import{HUDMaterialTechniqueConfiguration as ee}from"../shaders/HUDMaterialTechniqueConfiguration.js";import{alphaCutoff as te}from"../../../../webscene/support/AlphaCutoff.js";class ie extends T{constructor(e,t){super(e,je),this.produces=new Map([[14,e=>A(e)&&!this.parameters.drawAsLabel],[15,e=>A(e)&&this.parameters.drawAsLabel],[13,()=>this.parameters.useVisibilityPixel],[19,e=>this.parameters.draped&&A(e)]]),this._visible=!0,this._configuration=new ee(t)}getConfiguration(e,t){const i=this.parameters.draped;return super.getConfiguration(e,t,this._configuration),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVerticalOffset=!!this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasPolygonOffset=this.parameters.polygonOffset,this._configuration.draped=i,this._configuration.visibilityPixelEnabled=this.parameters.useVisibilityPixel,this._configuration.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this._configuration.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,this._configuration.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,this._configuration.hasRotation=this.parameters.hasRotation,this._configuration.hasVVSize=!!this.parameters.vvSize,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.occlusionPass=13===t.slot,this._configuration.occludedFragmentFade=!i&&this.parameters.occludedFragmentFade,this._configuration.horizonCullingEnabled=this.parameters.horizonCullingEnabled,this._configuration.isFocused=this.parameters.isFocused,this._configuration.depthTestEnabled=this.parameters.depthEnabled||13===t.slot,F(e)&&(this._configuration.debugDrawLabelBorder=!!C.LABELS_SHOW_BORDER),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}intersect(e,t,s,a,n,o){const{options:{selectionMode:l,hud:c,excludeLabels:S},point:y,camera:z}=s,{parameters:P}=this;if(!l||!c||S&&P.isLabel||!e.visible||!y||!z)return;const j=e.attributes.get("featureAttribute"),D=null==j?null:_(j.data,Se),{scaleX:M,scaleY:R}=Me(D,P,z.pixelRatio),V=e.attributes.get("position"),C=e.attributes.get("size"),A=e.attributes.get("normal"),F=e.attributes.get("rotation"),w=e.attributes.get("centerOffsetAndDistance");B(V.size>=3);const E=J(P),L="screen"===this.parameters.centerOffsetUnits;for(let _=0;_<V.data.length/V.size;_++){const e=_*V.size;u(le,V.data[e],V.data[e+1],V.data[e+2]),f(le,le,t),f(le,le,z.viewMatrix);const a=_*w.size;if(u(ve,w.data[a],w.data[a+1],w.data[a+2]),!L&&(le[0]+=ve[0],le[1]+=ve[1],0!==ve[2])){const e=ve[2];p(ve,le),h(le,le,d(ve,ve,e))}const n=_*A.size;u(ce,A.data[n],A.data[n+1],A.data[n+2]),m(ce,ce,i(me,t));const{normal:l,cosAngle:c}=ae(ce,z,ye),S=Ve(this.parameters,le,c,z,oe);if(g(le,le,l,S),z.applyProjection(le,ue),ue[0]>-1){L&&(ve[0]||ve[1])&&(ue[0]+=ve[0]*z.pixelRatio,0!==ve[1]&&(ue[1]+=oe.alignmentEvaluator.apply(ve[1])*z.pixelRatio),z.unapplyProjection(ue,le)),ue[0]+=this.parameters.screenOffset[0]*z.pixelRatio,ue[1]+=this.parameters.screenOffset[1]*z.pixelRatio,ue[0]=Math.floor(ue[0]),ue[1]=Math.floor(ue[1]);const e=_*C.size;Pe[0]=C.data[e],Pe[1]=C.data[e+1],oe.evaluator.applyVec2(Pe,Pe);const t=ze*z.pixelRatio;let i=0;if(P.textureIsSignedDistanceField){i=Math.min(P.outlineSize,.5*Pe[0])*z.pixelRatio/2}Pe[0]*=M,Pe[1]*=R;const a=_*F.size,n=P.rotation+F.data[a];if(ne(y,ue[0],ue[1],Pe,t,i,n,P,E)){const e=s.ray;if(f(pe,le,r(ge,z.viewMatrix)),ue[0]=y[0],ue[1]=y[1],z.unprojectFromRenderScreen(ue,le)){const t=O();b(t,e.direction);const i=1/v(t);d(t,t,i);o(x(e.origin,le)*i,t,-1,pe)}}}}}intersectDraped(e,t,i,s,r){const a=e.attributes.get("position"),n=e.attributes.get("size"),o=e.attributes.get("rotation"),l=this.parameters,c=J(l),u=e.attributes.get("featureAttribute"),f=null==u?null:_(u.data,Se),{scaleX:p,scaleY:h}=Me(f,l,e.screenToWorldRatio),d=Oe*e.screenToWorldRatio;for(let m=0;m<a.data.length/a.size;m++){const t=m*a.size,u=a.data[t],f=a.data[t+1],g=m*n.size;Pe[0]=n.data[g],Pe[1]=n.data[g+1];let b=0;if(l.textureIsSignedDistanceField){b=Math.min(l.outlineSize,.5*Pe[0])*e.screenToWorldRatio/2}Pe[0]*=p,Pe[1]*=h;const v=m*o.size,x=l.rotation+o.data[v];ne(i,u,f,Pe,d,b,x,l,c)&&s(r.distance,r.normal,-1)}}createBufferWriter(){return new De}applyShaderOffsets(e,t,s,r,a,n,o){m(fe,s,i(me,r));const l=ae(fe,n,ye),c=Re(v(t),n),u=Ve(this.parameters,t,l.cosAngle,n,o);g(t,t,l.normal,u+c),g(e,e,fe,u+c);const f=a[3]+u;this._applyPolygonOffsetView(t,l,f,n,t),this._applyCenterOffsetView(t,a,t)}applyShaderOffsetsNDC(e,t,i,s,r){return this._applyCenterOffsetNDC(e,t,i,s),null!=r&&b(r,s),this._applyPolygonOffsetNDC(s,t,i,s),s}_applyPolygonOffsetView(t,i,s,r,a){const n=r.aboveGround?1:-1;let o=Math.sign(s);0===o&&(o=n);const l=n*o;if(this.parameters.shaderPolygonOffset<=0)return b(a,t);const c=e(Math.abs(i.cosAngle),.01,1),u=1-Math.sqrt(1-c*c)/c/r.viewport[2];return d(a,t,l>0?u:1/u),a}_applyCenterOffsetView(e,t,i){const s="screen"!==this.parameters.centerOffsetUnits;return i!==e&&b(i,e),s&&(i[0]+=t[0],i[1]+=t[1],t[2]&&(p(ce,i),S(i,i,d(ce,ce,t[2])))),i}_applyCenterOffsetNDC(e,t,i,s){const r="screen"!==this.parameters.centerOffsetUnits;return s!==e&&b(s,e),r||(s[0]+=t[0]/i.fullWidth*2,s[1]+=t[1]/i.fullHeight*2),s}_applyPolygonOffsetNDC(e,t,i,s){const r=this.parameters.shaderPolygonOffset;if(e!==s&&b(s,e),r){const e=i.aboveGround?1:-1,a=e*Math.sign(t[3]);s[2]-=(a||e)*r}return s}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:i}=this.parameters,s=e[3]>=te||t>=te&&i[3]>=te;return this._visible&&s}createGLMaterial(e){return new se(e)}calculateRelativeScreenBounds(e,t,i=M()){return re(this.parameters,e,t,i),i[2]=i[0]+e[0],i[3]=i[1]+e[1],i}}class se extends L{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.getTechnique($,e)}}function re(e,t,i,s){s[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*i,s[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*i}function ae(e,t,i){return f(i.normal,e,t.viewInverseTransposeMatrix),i.cosAngle=y(i.normal,_e),i}function ne(e,i,s,r,a,l,c,u,f){let p=i-a-r[0]*f[0],h=p+r[0]+2*a,d=s-a-r[1]*f[1],m=d+r[1]+2*a;const g=u.distanceFieldBoundingBox;return u.textureIsSignedDistanceField&&null!=g&&(p+=r[0]*g[0],d+=r[1]*g[1],h-=r[0]*(1-g[2]),m-=r[1]*(1-g[3]),p-=l,h+=l,d-=l,m+=l),n(de,i,s),o(he,e,de,t(c)),he[0]>p&&he[0]<h&&he[1]>d&&he[1]<m}const oe=new U,le=O(),ce=O(),ue=j(),fe=O(),pe=O(),he=c(),de=c(),me=s(),ge=a(),be=j(),ve=O(),xe=O(),Se=j(),ye={normal:O(),cosAngle:0},ze=1,Oe=2,Pe=l(0,0),_e=P(0,0,1);class je extends E{constructor(){super(...arguments),this.renderOccluded=1,this.isDecoration=!1,this.color=D(1,1,1,1),this.polygonOffset=!1,this.anchorPosition=l(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=D(1,1,1,1),this.outlineSize=0,this.distanceFieldBoundingBox=j(),this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.useVisibilityPixel=!0,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!1,this.occludedVisibilityMode="hidden",this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.isFocused=!0,this.focusStyle="bright",this.draped=!1,this.isLabel=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class De{constructor(){this.layout=Q(),this.baseInstanceLayout=Z}elementCount(e){return e.get("position").indices.length}elementCountBaseInstance(e){return e.get("uv0").indices.length}write(e,t,i,s,r,a){const{position:n,normal:o,color:l,size:c,rotation:u,centerOffsetAndDistance:f,featureAttribute:p,uvi:h}=r;I(i.get("position"),e,n,a),W(i.get("normal"),t,o,a);const d=i.get("position").indices.length;let m=0,g=0,b=K,v=K;const x=i.get("uvi")?.data;x&&x.length>=4&&(m=x[0],g=x[1],b=x[2],v=x[3]);for(let S=0;S<d;++S){const e=a+S;h.setValues(e,m,g,b,v)}if(H(i.get("color"),4,l,a),G(i.get("size"),c,a),N(i.get("rotation"),u,a),i.get("centerOffsetAndDistance")?X(i.get("centerOffsetAndDistance"),f,a):Y(f,a,d),i.get("featureAttribute")?X(i.get("featureAttribute"),p,a):Y(p,a,d),null!=s){const e=i.get("position")?.indices;if(e){const t=e.length,i=r.getField("olidColor",R);q(s,i,t,a)}}return{numVerticesPerItem:1,numItems:d}}writeBaseInstance(e,t){const{uv0:i}=t;G(e.get("uv0"),i,0)}intersect(e,t,i,s,a,n,o){const{options:{selectionMode:l,hud:c,excludeLabels:m},point:S,camera:y}=s;if(!l||!c||m&&t.isLabel||!S)return;const P=this.layout.createView(e),{position:_,normal:j,rotation:D,size:M,featureAttribute:R,centerOffsetAndDistance:V}=P,C="screen"===t.centerOffsetUnits,A=J(t);if(null==_||null==j||null==D||null==M||null==V||null==y)return;const F=null==R?null:R.getVec(0,Se),{scaleX:w,scaleY:E}=Me(F,t,y.pixelRatio),L=_.count;for(let T=0;T<L;T++){if(_.getVec(T,le),null!=i&&z(le,le,i),f(le,le,y.viewMatrix),V.getVec(T,be),u(ve,be[0],be[1],be[2]),!C&&(le[0]+=ve[0],le[1]+=ve[1],0!==ve[2])){const e=ve[2];p(ve,le),h(le,le,d(ve,ve,e))}j.getVec(T,ce),ae(ce,y,ye);const e=Ve(t,le,ye.cosAngle,y,oe);if(g(le,le,ye.normal,e),y.applyProjection(le,ue),ue[0]>-1){C&&(ve[0]||ve[1])&&(ue[0]+=ve[0]*y.pixelRatio,0!==ve[1]&&(ue[1]+=oe.alignmentEvaluator.apply(ve[1])*y.pixelRatio),y.unapplyProjection(ue,le)),ue[0]+=t.screenOffset[0]*y.pixelRatio,ue[1]+=t.screenOffset[1]*y.pixelRatio,ue[0]=Math.floor(ue[0]),ue[1]=Math.floor(ue[1]),M.getVec(T,Pe),oe.evaluator.applyVec2(Pe,Pe);const e=ze*y.pixelRatio;let i=0;if(t.textureIsSignedDistanceField){i=Math.min(t.outlineSize,.5*Pe[0])*y.pixelRatio/2}Pe[0]*=w,Pe[1]*=E;const a=D.get(T),n=t.rotation+a;if(ne(S,ue[0],ue[1],Pe,e,i,n,t,A)){const e=s.ray;if(f(pe,le,r(ge,y.viewMatrix)),ue[0]=S[0],ue[1]=S[1],y.unprojectFromRenderScreen(ue,le)){const t=O();b(t,e.direction);const i=1/v(t);d(t,t,i);o(x(e.origin,le)*i,t,T,pe)}}}}}}function Me(e,t,i){return null==e||null==t.vvSize?{scaleX:i,scaleY:i}:(V(xe,t,e),{scaleX:xe[0]*i,scaleY:xe[1]*i})}function Re(e,t){const i=t.computeRenderPixelSizeAtDist(e)*w;return(t.aboveGround?1:-1)*i}function Ve(e,t,i,s,r){if(!e.verticalOffset?.screenLength){const s=v(t);return r.update(i,s,e.screenSizePerspective,e.screenSizePerspectiveMinPixelReferenceSize,e.screenSizePerspectiveAlignment,null),0}const a=v(t),n=e.screenSizePerspectiveAlignment??e.screenSizePerspective,o=k(s,a,e.verticalOffset,i,n,e.screenSizePerspectiveMinPixelReferenceSize);return r.update(i,a,e.screenSizePerspective,e.screenSizePerspectiveMinPixelReferenceSize,e.screenSizePerspectiveAlignment,null),o}export{ie as HUDMaterial,je as Parameters};
5
+ import{clamp as e,deg2rad as t}from"../../../../core/mathUtils.js";import{fromMat4 as i}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as r}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as n,rotate as o}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as l,create as c}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{h as u,p as f,n as p,e as h,j as d,t as m,c as g,d as b,b as v,B as x,a as S,g as y,i as z}from"../../../../chunks/vec32.js";import{create as O,fromValues as P}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromArray as _,create as j,freeze as R}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as D}from"../../../../geometry/support/aaBoundingRect.js";import{BufferViewVec4u8 as M}from"../../../../geometry/support/buffer/BufferView.js";import{evaluateModelTransformScale as V}from"../../layers/support/FastSymbolUpdates.js";import{debugFlags as C}from"../../support/debugFlags.js";import{isColorHighlightOrOLID as A,isColor as F}from"../core/shaderLibrary/ShaderOutput.js";import{HUDVerticalPixelOffset as w}from"../core/shaderLibrary/hud/HUD.glsl.js";import{GLTextureMaterialBindParameters as T,GLTextureMaterial as E}from"../lib/GLTextureMaterial.js";import{Material as L}from"../lib/Material.js";import{SeparateScreenSizePerspectiveEvaluators as U}from"../lib/screenSizePerspectiveUtils.js";import{assert as B}from"../lib/Util.js";import{writePosition as I,writeNormal as W,writeColor as H,writeBufferVec2 as G,writeBufferFloat as N,writeBufferVec4 as X,writeBufferVec4Zeros as Y,writeOlidColor as q}from"./internal/bufferWriterUtils.js";import{verticalOffsetAtDistance as k}from"./internal/MaterialUtil.js";import{c as J,f as K}from"../../../../chunks/HUDMaterial.glsl.js";import{getInstanceLayout as Q,baseLayout as Z,HUDMaterialTechnique as $}from"../shaders/HUDMaterialTechnique.js";import{HUDMaterialTechniqueConfiguration as ee}from"../shaders/HUDMaterialTechniqueConfiguration.js";import{alphaCutoff as te}from"../../../../webscene/support/AlphaCutoff.js";class ie extends L{constructor(e,t){super(e,je),this.produces=new Map([[14,e=>A(e)&&!this.parameters.drawAsLabel],[15,e=>A(e)&&this.parameters.drawAsLabel],[13,()=>this.parameters.useVisibilityPixel],[19,e=>this.parameters.draped&&A(e)]]),this._visible=!0,this._configuration=new ee(t)}getConfiguration(e,t){const i=this.parameters.draped;return super.getConfiguration(e,t,this._configuration),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVerticalOffset=!!this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasPolygonOffset=this.parameters.polygonOffset,this._configuration.draped=i,this._configuration.visibilityPixelEnabled=this.parameters.useVisibilityPixel,this._configuration.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this._configuration.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,this._configuration.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,this._configuration.hasRotation=this.parameters.hasRotation,this._configuration.hasVVSize=!!this.parameters.vvSize,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.occlusionPass=13===t.slot,this._configuration.occludedFragmentFade=!i&&this.parameters.occludedFragmentFade,this._configuration.horizonCullingEnabled=this.parameters.horizonCullingEnabled,this._configuration.isFocused=this.parameters.isFocused,this._configuration.depthTestEnabled=this.parameters.depthEnabled||13===t.slot,F(e)&&(this._configuration.debugDrawLabelBorder=!!C.LABELS_SHOW_BORDER),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}intersect(e,t,s,a,n,o){const{options:{selectionMode:l,hud:c,excludeLabels:S},point:y,camera:z}=s,{parameters:P}=this;if(!l||!c||S&&P.isLabel||!e.visible||!y||!z)return;const j=e.attributes.get("featureAttribute"),R=null==j?null:_(j.data,Se),{scaleX:D,scaleY:M}=De(R,P,z.pixelRatio),V=e.attributes.get("position"),C=e.attributes.get("size"),A=e.attributes.get("normal"),F=e.attributes.get("rotation"),w=e.attributes.get("centerOffsetAndDistance");B(V.size>=3);const T=J(P),E="screen"===this.parameters.centerOffsetUnits;for(let _=0;_<V.data.length/V.size;_++){const e=_*V.size;u(le,V.data[e],V.data[e+1],V.data[e+2]),f(le,le,t),f(le,le,z.viewMatrix);const a=_*w.size;if(u(ve,w.data[a],w.data[a+1],w.data[a+2]),!E&&(le[0]+=ve[0],le[1]+=ve[1],0!==ve[2])){const e=ve[2];p(ve,le),h(le,le,d(ve,ve,e))}const n=_*A.size;u(ce,A.data[n],A.data[n+1],A.data[n+2]),m(ce,ce,i(me,t));const{normal:l,cosAngle:c}=ae(ce,z,ye),S=Ve(this.parameters,le,c,z,oe);if(g(le,le,l,S),z.applyProjection(le,ue),ue[0]>-1){E&&(ve[0]||ve[1])&&(ue[0]+=ve[0]*z.pixelRatio,0!==ve[1]&&(ue[1]+=oe.alignmentEvaluator.apply(ve[1])*z.pixelRatio),z.unapplyProjection(ue,le)),ue[0]+=this.parameters.screenOffset[0]*z.pixelRatio,ue[1]+=this.parameters.screenOffset[1]*z.pixelRatio,ue[0]=Math.floor(ue[0]),ue[1]=Math.floor(ue[1]);const e=_*C.size;Pe[0]=C.data[e],Pe[1]=C.data[e+1],oe.evaluator.applyVec2(Pe,Pe);const t=ze*z.pixelRatio;let i=0;if(P.textureIsSignedDistanceField){i=Math.min(P.outlineSize,.5*Pe[0])*z.pixelRatio/2}Pe[0]*=D,Pe[1]*=M;const a=_*F.size,n=P.rotation+F.data[a];if(ne(y,ue[0],ue[1],Pe,t,i,n,P,T)){const e=s.ray;if(f(pe,le,r(ge,z.viewMatrix)),ue[0]=y[0],ue[1]=y[1],z.unprojectFromRenderScreen(ue,le)){const t=O();b(t,e.direction);const i=1/v(t);d(t,t,i);o(x(e.origin,le)*i,t,-1,pe)}}}}}intersectDraped(e,t,i,s,r){const a=e.attributes.get("position"),n=e.attributes.get("size"),o=e.attributes.get("rotation"),l=this.parameters,c=J(l),u=e.attributes.get("featureAttribute"),f=null==u?null:_(u.data,Se),{scaleX:p,scaleY:h}=De(f,l,e.screenToWorldRatio),d=Oe*e.screenToWorldRatio;for(let m=0;m<a.data.length/a.size;m++){const t=m*a.size,u=a.data[t],f=a.data[t+1],g=m*n.size;Pe[0]=n.data[g],Pe[1]=n.data[g+1];let b=0;if(l.textureIsSignedDistanceField){b=Math.min(l.outlineSize,.5*Pe[0])*e.screenToWorldRatio/2}Pe[0]*=p,Pe[1]*=h;const v=m*o.size,x=l.rotation+o.data[v];ne(i,u,f,Pe,d,b,x,l,c)&&s(r.distance,r.normal,-1)}}createBufferWriter(){return new Re}applyShaderOffsets(e,t,s,r,a,n,o){m(fe,s,i(me,r));const l=ae(fe,n,ye),c=Me(v(t),n),u=Ve(this.parameters,t,l.cosAngle,n,o);g(t,t,l.normal,u+c),g(e,e,fe,u+c);const f=a[3]+u;this._applyPolygonOffsetView(t,l,f,n,t),this._applyCenterOffsetView(t,a,t)}applyShaderOffsetsNDC(e,t,i,s,r){return this._applyCenterOffsetNDC(e,t,i,s),null!=r&&b(r,s),this._applyPolygonOffsetNDC(s,t,i,s),s}_applyPolygonOffsetView(t,i,s,r,a){const n=r.aboveGround?1:-1;let o=Math.sign(s);0===o&&(o=n);const l=n*o;if(this.parameters.shaderPolygonOffset<=0)return b(a,t);const c=e(Math.abs(i.cosAngle),.01,1),u=1-Math.sqrt(1-c*c)/c/r.viewport[2];return d(a,t,l>0?u:1/u),a}_applyCenterOffsetView(e,t,i){const s="screen"!==this.parameters.centerOffsetUnits;return i!==e&&b(i,e),s&&(i[0]+=t[0],i[1]+=t[1],t[2]&&(p(ce,i),S(i,i,d(ce,ce,t[2])))),i}_applyCenterOffsetNDC(e,t,i,s){const r="screen"!==this.parameters.centerOffsetUnits;return s!==e&&b(s,e),r||(s[0]+=t[0]/i.fullWidth*2,s[1]+=t[1]/i.fullHeight*2),s}_applyPolygonOffsetNDC(e,t,i,s){const r=this.parameters.shaderPolygonOffset;if(e!==s&&b(s,e),r){const e=i.aboveGround?1:-1,a=e*Math.sign(t[3]);s[2]-=(a||e)*r}return s}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:i}=this.parameters,s=e[3]>=te||t>=te&&i[3]>=te;return this._visible&&s}createGLMaterial(e){return new se(e)}calculateRelativeScreenBounds(e,t,i=D()){return re(this.parameters,e,t,i),i[2]=i[0]+e[0],i[3]=i[1]+e[1],i}}class se extends E{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.getTechnique($,e)}}function re(e,t,i,s){s[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*i,s[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*i}function ae(e,t,i){return f(i.normal,e,t.viewInverseTransposeMatrix),i.cosAngle=y(i.normal,_e),i}function ne(e,i,s,r,a,l,c,u,f){let p=i-a-r[0]*f[0],h=p+r[0]+2*a,d=s-a-r[1]*f[1],m=d+r[1]+2*a;const g=u.distanceFieldBoundingBox;return u.textureIsSignedDistanceField&&null!=g&&(p+=r[0]*g[0],d+=r[1]*g[1],h-=r[0]*(1-g[2]),m-=r[1]*(1-g[3]),p-=l,h+=l,d-=l,m+=l),n(de,i,s),o(he,e,de,t(c)),he[0]>p&&he[0]<h&&he[1]>d&&he[1]<m}const oe=new U,le=O(),ce=O(),ue=j(),fe=O(),pe=O(),he=c(),de=c(),me=s(),ge=a(),be=j(),ve=O(),xe=O(),Se=j(),ye={normal:O(),cosAngle:0},ze=1,Oe=2,Pe=l(0,0),_e=P(0,0,1);class je extends T{constructor(){super(...arguments),this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1,this.color=R(1,1,1,1),this.polygonOffset=!1,this.anchorPosition=l(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=R(1,1,1,1),this.outlineSize=0,this.distanceFieldBoundingBox=j(),this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.useVisibilityPixel=!0,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!1,this.occludedVisibilityMode="hidden",this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.isFocused=!0,this.focusStyle="bright",this.draped=!1,this.isLabel=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class Re{constructor(){this.layout=Q(),this.baseInstanceLayout=Z}elementCount(e){return e.get("position").indices.length}elementCountBaseInstance(e){return e.get("uv0").indices.length}write(e,t,i,s,r,a){const{position:n,normal:o,color:l,size:c,rotation:u,centerOffsetAndDistance:f,featureAttribute:p,uvi:h}=r;I(i.get("position"),e,n,a),W(i.get("normal"),t,o,a);const d=i.get("position").indices.length;let m=0,g=0,b=K,v=K;const x=i.get("uvi")?.data;x&&x.length>=4&&(m=x[0],g=x[1],b=x[2],v=x[3]);for(let S=0;S<d;++S){const e=a+S;h.setValues(e,m,g,b,v)}if(H(i.get("color"),4,l,a),G(i.get("size"),c,a),N(i.get("rotation"),u,a),i.get("centerOffsetAndDistance")?X(i.get("centerOffsetAndDistance"),f,a):Y(f,a,d),i.get("featureAttribute")?X(i.get("featureAttribute"),p,a):Y(p,a,d),null!=s){const e=i.get("position")?.indices;if(e){const t=e.length,i=r.getField("olidColor",M);q(s,i,t,a)}}return{numVerticesPerItem:1,numItems:d}}writeBaseInstance(e,t){const{uv0:i}=t;G(e.get("uv0"),i,0)}intersect(e,t,i,s,a,n,o){const{options:{selectionMode:l,hud:c,excludeLabels:m},point:S,camera:y}=s;if(!l||!c||m&&t.isLabel||!S)return;const P=this.layout.createView(e),{position:_,normal:j,rotation:R,size:D,featureAttribute:M,centerOffsetAndDistance:V}=P,C="screen"===t.centerOffsetUnits,A=J(t);if(null==_||null==j||null==R||null==D||null==V||null==y)return;const F=null==M?null:M.getVec(0,Se),{scaleX:w,scaleY:T}=De(F,t,y.pixelRatio),E=_.count;for(let L=0;L<E;L++){if(_.getVec(L,le),null!=i&&z(le,le,i),f(le,le,y.viewMatrix),V.getVec(L,be),u(ve,be[0],be[1],be[2]),!C&&(le[0]+=ve[0],le[1]+=ve[1],0!==ve[2])){const e=ve[2];p(ve,le),h(le,le,d(ve,ve,e))}j.getVec(L,ce),ae(ce,y,ye);const e=Ve(t,le,ye.cosAngle,y,oe);if(g(le,le,ye.normal,e),y.applyProjection(le,ue),ue[0]>-1){C&&(ve[0]||ve[1])&&(ue[0]+=ve[0]*y.pixelRatio,0!==ve[1]&&(ue[1]+=oe.alignmentEvaluator.apply(ve[1])*y.pixelRatio),y.unapplyProjection(ue,le)),ue[0]+=t.screenOffset[0]*y.pixelRatio,ue[1]+=t.screenOffset[1]*y.pixelRatio,ue[0]=Math.floor(ue[0]),ue[1]=Math.floor(ue[1]),D.getVec(L,Pe),oe.evaluator.applyVec2(Pe,Pe);const e=ze*y.pixelRatio;let i=0;if(t.textureIsSignedDistanceField){i=Math.min(t.outlineSize,.5*Pe[0])*y.pixelRatio/2}Pe[0]*=w,Pe[1]*=T;const a=R.get(L),n=t.rotation+a;if(ne(S,ue[0],ue[1],Pe,e,i,n,t,A)){const e=s.ray;if(f(pe,le,r(ge,y.viewMatrix)),ue[0]=S[0],ue[1]=S[1],y.unprojectFromRenderScreen(ue,le)){const t=O();b(t,e.direction);const i=1/v(t);d(t,t,i);o(x(e.origin,le)*i,t,L,pe)}}}}}}function De(e,t,i){return null==e||null==t.vvSize?{scaleX:i,scaleY:i}:(V(xe,t,e),{scaleX:xe[0]*i,scaleY:xe[1]*i})}function Me(e,t){const i=t.computeRenderPixelSizeAtDist(e)*w;return(t.aboveGround?1:-1)*i}function Ve(e,t,i,s,r){if(!e.verticalOffset?.screenLength){const s=v(t);return r.update(i,s,e.screenSizePerspective,e.screenSizePerspectiveMinPixelReferenceSize,e.screenSizePerspectiveAlignment,null),0}const a=v(t),n=e.screenSizePerspectiveAlignment??e.screenSizePerspective,o=k(s,a,e.verticalOffset,i,n,e.screenSizePerspectiveMinPixelReferenceSize);return r.update(i,a,e.screenSizePerspective,e.screenSizePerspectiveMinPixelReferenceSize,e.screenSizePerspectiveAlignment,null),o}export{ie as HUDMaterial,je as Parameters};
@@ -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{isColor as r}from"../core/shaderLibrary/ShaderOutput.js";import{InstancedDoubleConfiguration as e}from"../core/shaderLibrary/attributes/InstancedDoubleConfiguration.js";import t from"../lib/GLMaterial.js";import{DefaultBufferWriter as i}from"./DefaultBufferWriter.js";import{PositionUvLayout as s}from"./DefaultLayouts.js";import{TriangleMaterial as o}from"./TriangleMaterial.js";import{SlicePlaneMaterialPassParameters as a,SlicePlaneMaterialTechnique as n}from"../shaders/SlicePlaneMaterialTechnique.js";class u extends o{constructor(t){super(t,f),this.visible=!0,this.produces=new Map([[9,e=>r(e)]]),this._configuration=new e}createGLMaterial(r){return new c(r)}createBufferWriter(){return new i(s)}getConfiguration(){return this._configuration}}class c extends t{constructor(r){super(r)}beginSlot(r){return this.getTechnique(n,r)}}class f extends a{constructor(){super(...arguments),this.renderOccluded=1,this.isDecoration=!1}}export{f as Parameters,u as SlicePlaneMaterial};
5
+ import{isColor as r}from"../core/shaderLibrary/ShaderOutput.js";import{InstancedDoubleConfiguration as e}from"../core/shaderLibrary/attributes/InstancedDoubleConfiguration.js";import t from"../lib/GLMaterial.js";import{DefaultBufferWriter as s}from"./DefaultBufferWriter.js";import{PositionUvLayout as i}from"./DefaultLayouts.js";import{TriangleMaterial as o}from"./TriangleMaterial.js";import{SlicePlaneMaterialPassParameters as a,SlicePlaneMaterialTechnique as n}from"../shaders/SlicePlaneMaterialTechnique.js";class u extends o{constructor(t){super(t,f),this.visible=!0,this.produces=new Map([[9,e=>r(e)]]),this._configuration=new e}createGLMaterial(r){return new c(r)}createBufferWriter(){return new s(i)}getConfiguration(){return this._configuration}}class c extends t{constructor(r){super(r)}beginSlot(r){return this.getTechnique(n,r)}}class f extends a{constructor(){super(...arguments),this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}}export{f as Parameters,u as SlicePlaneMaterial};
@@ -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{VisualVariablesParameters as s}from"../../layers/support/FastSymbolUpdates.js";class t extends s{constructor(){super(...arguments),this.renderOccluded=1,this.isDecoration=!1}}const r=8;export{t as VisualVariablePassParameters,r as vvColorNumber};
5
+ import{VisualVariablesParameters as s}from"../../layers/support/FastSymbolUpdates.js";class r extends s{constructor(){super(...arguments),this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}}const t=8;export{r as VisualVariablePassParameters,t as vvColorNumber};
@@ -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"../../../../../core/has.js";import{property as t,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{SyncRenderPlugin as s}from"../../effects/RenderPlugin.js";import{MergedBuffer as i}from"./MergedBuffer.js";import{VaoRenderer as a}from"./VaoRenderer.js";let n=class extends s{constructor(e){super(e),this._dataByBaseInstance=new Map,this._buffer=null,this._renderer=null,this.drapedPriority=0}initialize(){this._buffer=new i({material:this.material,dataByBaseInstance:this._dataByBaseInstance,highlightOrderMap:this.highlightOrderMap}),this._renderer=new a({material:this.material,dataByBaseInstance:this._dataByBaseInstance})}destroy(){for(const e of this._dataByBaseInstance.values())e.dispose();this._dataByBaseInstance.clear(),this._buffer.destroy(),this._renderer.destroy()}hasHighlight(e){return this._renderer.hasHighlight(e)}initializeRenderContext(e){this._buffer.initializeRenderContext(e),this._renderer.initializeRenderContext(e)}uninitializeRenderContext(){this._buffer.uninitializeRenderContext(),this._renderer.uninitializeRenderContext()}get produces(){return this._renderer.produces}get hasOccludees(){return this._buffer.hasOccludees}get hasOnlyOccluders(){return!!(-2&this.renderOccludedFlags)}get hasEmitters(){return this.material.hasEmissions}get isDecoration(){return this.material.parameters.isDecoration}get renderOccludedFlags(){return this.material.renderOccludedFlags}get numGeometries(){let e=0;for(const t of this._dataByBaseInstance.values())for(const r of t.dataByOrigin.values())e+=r.buffers.reduce((e,t)=>e+t.instances.size,0);return e}get usedMemory(){let e=0;for(const t of this._dataByBaseInstance.values())for(const r of t.dataByOrigin.values())e+=r.buffers.reduce((e,t)=>e+t.vao.usedMemory,0);return e}forEachGeometry(e){for(const t of this._dataByBaseInstance.values())for(const r of t.dataByOrigin.values())for(const t of r.buffers)for(const{geometry:r}of t.instances.values())e(r)}modify(e,t){this._buffer.modify(e,t),this._renderer.updateHighlights()}get canCompact(){return this._buffer.canCompact}compact(e){return this._buffer.compact(e)}updateHighlights(e){this.highlightOrderMap=e,this._buffer.updateHighlights(e),this._renderer.updateHighlights()}updateAnimation(e){return this.material.update(e)}acquireTechniques(e){return this._renderer.acquireTechniques(e)}render(e,t){return this._renderer.render(e,t)}static prune(){i.prune()}get test(){}};e([t({constructOnly:!0})],n.prototype,"material",void 0),e([t()],n.prototype,"highlightOrderMap",void 0),n=e([r("esri.views.3d.webgl-engine.materials.renderers.MergedRenderer")],n);export{n as MergedRenderer};
5
+ import{__decorate as e}from"tslib";import"../../../../../core/has.js";import{property as t,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{SyncRenderPlugin as s}from"../../effects/RenderPlugin.js";import{MergedBuffer as i}from"./MergedBuffer.js";import{VaoRenderer as a}from"./VaoRenderer.js";let n=class extends s{constructor(e){super(e),this._dataByBaseInstance=new Map,this._buffer=null,this._renderer=null,this.drapedPriority=0}initialize(){this._buffer=new i({material:this.material,dataByBaseInstance:this._dataByBaseInstance,highlightOrderMap:this.highlightOrderMap}),this._renderer=new a({material:this.material,dataByBaseInstance:this._dataByBaseInstance})}destroy(){for(const e of this._dataByBaseInstance.values())e.dispose();this._dataByBaseInstance.clear(),this._buffer.destroy(),this._renderer.destroy()}hasHighlight(e){return this._renderer.hasHighlight(e)}initializeRenderContext(e){this._buffer.initializeRenderContext(e),this._renderer.initializeRenderContext(e)}uninitializeRenderContext(){this._buffer.uninitializeRenderContext(),this._renderer.uninitializeRenderContext()}get produces(){return this._renderer.produces}get hasOccludees(){return this._buffer.hasOccludees}get hasOnlyOccluders(){return!!(-2&this.renderOccludedFlags)}get hasEmitters(){return this.material.hasEmissions}get isDecoration(){return this.material.parameters.isDecoration}get renderOccludedFlags(){return this.material.renderOccludedFlags}get testsTransparentRenderOrder(){return 0}get numGeometries(){let e=0;for(const t of this._dataByBaseInstance.values())for(const r of t.dataByOrigin.values())e+=r.buffers.reduce((e,t)=>e+t.instances.size,0);return e}get usedMemory(){let e=0;for(const t of this._dataByBaseInstance.values())for(const r of t.dataByOrigin.values())e+=r.buffers.reduce((e,t)=>e+t.vao.usedMemory,0);return e}forEachGeometry(e){for(const t of this._dataByBaseInstance.values())for(const r of t.dataByOrigin.values())for(const t of r.buffers)for(const{geometry:r}of t.instances.values())e(r)}modify(e,t){this._buffer.modify(e,t),this._renderer.updateHighlights()}get canCompact(){return this._buffer.canCompact}compact(e){return this._buffer.compact(e)}updateHighlights(e){this.highlightOrderMap=e,this._buffer.updateHighlights(e),this._renderer.updateHighlights()}updateAnimation(e){return this.material.update(e)}acquireTechniques(e){return this._renderer.acquireTechniques(e)}render(e,t){return this._renderer.render(e,t)}static prune(){i.prune()}get test(){}};e([t({constructOnly:!0})],n.prototype,"material",void 0),e([t()],n.prototype,"highlightOrderMap",void 0),n=e([r("esri.views.3d.webgl-engine.materials.renderers.MergedRenderer")],n);export{n as MergedRenderer};
@@ -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 t}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as i,freeze as s,create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{glLayout as l}from"../../support/buffer/glUtil.js";import{newLayout as n}from"../../support/buffer/InterleavedLayout.js";import{isColor as a}from"../core/shaderLibrary/ShaderOutput.js";import{VertexNormalPassParameters as c,VertexNormalDrawParameters as h}from"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import{ReloadableShader as u}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as m,depthOnlyOutputBuffersOr as p}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as d}from"../effects/geometry/olidUtils.js";import{oitPolygonOffset as f,depthWrite as v,depthTest as b,blending as g,drawBuffers as S}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as y,stencilBaseAllZerosParams as j,stencilWriteMaskOn as x}from"../lib/StencilUtils.js";import{getRenderInstanceDataLayout as C}from"../lib/lodRendering/RenderInstanceData.js";import{advancedMRRFactors as P}from"../materials/pbrUtils.js";import{D as T}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as O,cullingParams as D,defaultColorWrite as w}from"../../../webgl/renderState.js";import{alphaCutoff as V}from"../../../../webscene/support/AlphaCutoff.js";class A extends c{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=P,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=i,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=s(.2,.2,.2),this.diffuse=s(.8,.8,.8),this.externalColor=o(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=r(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=V,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class M extends h{constructor(){super(...arguments),this.origin=r(),this.slicePlaneLocalOrigin=this.origin}}let F=class extends m{constructor(e,t){let i=l(z(t));t.instanced&&t.instancedDoublePrecision&&(i=i.concat(l(C(t)))),super(e,t,i),this.shader=new u(T,()=>import("./DefaultMaterial.glsl.js"))}_makePipeline(e,t){const{oitPass:i,output:s,hasEmission:r,transparent:o,cullFace:l,customDepthTest:n,hasOccludees:c}=e;return O({blending:a(s)&&o?g(i):null,culling:k(e)?D(l):null,depthTest:b(i,R(n)),depthWrite:v(e),drawBuffers:p(s,S(i,r)),colorWrite:w,stencilWrite:c?x:null,stencilTest:c?t?y:j:null,polygonOffset:f(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:super.getPipeline(e)}};function R(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function k(e){return 0!==e.cullFace||!e.hasSlicePlane&&(!e.transparent&&!e.doubleSidedMode)}function z(e){const t=n().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color"),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&d()&&t.vec4u8("olidColor"),t}F=e([t("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],F);export{M as DefaultMaterialDrawParameters,A as DefaultMaterialPassParameters,F as DefaultMaterialTechnique,z as getLayout};
5
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as i,freeze as s,create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{glLayout as l}from"../../support/buffer/glUtil.js";import{newLayout as n}from"../../support/buffer/InterleavedLayout.js";import{isColor as a}from"../core/shaderLibrary/ShaderOutput.js";import{VertexNormalPassParameters as c,VertexNormalDrawParameters as h}from"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import{ReloadableShader as u}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as m,depthOnlyOutputBuffersOr as p}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as d}from"../effects/geometry/olidUtils.js";import{oitPolygonOffset as f,depthWrite as v,depthTest as b,blending as g,drawBuffers as S}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as y,stencilBaseAllZerosParams as j,stencilWriteMaskOn as x}from"../lib/StencilUtils.js";import{getRenderInstanceDataLayout as T}from"../lib/lodRendering/RenderInstanceData.js";import{advancedMRRFactors as C}from"../materials/pbrUtils.js";import{D as P}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as O,cullingParams as D,defaultColorWrite as w}from"../../../webgl/renderState.js";import{alphaCutoff as V}from"../../../../webscene/support/AlphaCutoff.js";class A extends c{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=C,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=i,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=s(.2,.2,.2),this.diffuse=s(.8,.8,.8),this.externalColor=o(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=r(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=V,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class M extends h{constructor(){super(...arguments),this.origin=r(),this.slicePlaneLocalOrigin=this.origin}}let R=class extends m{constructor(e,t){let i=l(z(t));t.instanced&&t.instancedDoublePrecision&&(i=i.concat(l(T(t)))),super(e,t,i),this.shader=new u(P,()=>import("./DefaultMaterial.glsl.js"))}_makePipeline(e,t){const{oitPass:i,output:s,hasEmission:r,transparent:o,cullFace:l,customDepthTest:n,hasOccludees:c}=e;return O({blending:a(s)&&o?g(i):null,culling:k(e)?D(l):null,depthTest:b(i,F(n)),depthWrite:v(e),drawBuffers:p(s,S(i,r)),colorWrite:w,stencilWrite:c?x:null,stencilTest:c?t?y:j:null,polygonOffset:f(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:super.getPipeline(e)}};function F(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function k(e){return 0!==e.cullFace||!e.hasSlicePlane&&(!e.transparent&&!e.doubleSidedMode)}function z(e){const t=n().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color"),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&d()&&t.vec4u8("olidColor"),t}R=e([t("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],R);export{M as DefaultMaterialDrawParameters,A as DefaultMaterialPassParameters,R as DefaultMaterialTechnique,z as getLayout};
@@ -2,16 +2,17 @@
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{isColor as o}from"../core/shaderLibrary/ShaderOutput.js";import{Emissions as r}from"../core/shaderLibrary/output/Emissions.glsl.js";import{OutputHighlight as l}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{ColorConversion as i}from"../core/shaderLibrary/util/ColorConversion.glsl.js";import{If as s,glsl as a}from"../core/shaderModules/glsl.js";import{alphaCutoff as t}from"../../../../webscene/support/AlphaCutoff.js";function e(e,n){e.include(l,n),e.include(r,n),e.fragment.include(i);const{output:f,oitPass:u,hasEmission:d,discardInvisibleFragments:m,oitPremultipliedAlpha:p,snowCover:c}=n,C=9===f,g=o(f)&&1===u,h=o(f)&&1!==u;let v=0;(h||g)&&e.outputs.add("fragColor","vec4",v++),d&&e.outputs.add("fragEmission","vec4",v++),g&&e.outputs.add("fragAlpha","float",v++),e.fragment.code.add(a`
6
- void outputColorHighlightOLID(vec4 finalColor, const in vec3 vWorldPosition, vec3 emissiveSymbolColor ${s(c,", float snow")}) {
7
- ${s(C,"finalColor.a = 1.0;")}
8
- ${s(m,`if (finalColor.a < ${a.float(t)}) { discard; }`)}
5
+ import{isColor as o}from"../core/shaderLibrary/ShaderOutput.js";import{Emissions as r}from"../core/shaderLibrary/output/Emissions.glsl.js";import{OutputHighlight as l}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{ColorConversion as i}from"../core/shaderLibrary/util/ColorConversion.glsl.js";import{If as a,glsl as s}from"../core/shaderModules/glsl.js";import{alphaCutoff as t}from"../../../../webscene/support/AlphaCutoff.js";function e(e,n){e.include(l,n),e.include(r,n),e.fragment.include(i);const{output:f,oitPass:u,hasEmission:d,discardInvisibleFragments:m,oitPremultipliedAlpha:p,snowCover:c}=n,C=9===f,g=o(f)&&1===u,h=o(f)&&2===u,v=o(f)&&1!==u;let b=0;(v||g)&&e.outputs.add("fragColor","vec4",b++),d&&e.outputs.add("fragEmission","vec4",b++),g&&e.outputs.add("fragAlpha","float",b++),e.fragment.code.add(s`
6
+ void outputColorHighlightOLID(vec4 finalColor, const in vec3 vWorldPosition, vec3 emissiveSymbolColor ${a(c,", float snow")}) {
7
+ ${a(C,"finalColor.a = 1.0;")}
8
+ ${a(m,`if (finalColor.a < ${s.float(t)}) { discard; }`)}
9
9
  finalColor = applySlice(finalColor, vWorldPosition);
10
10
 
11
- ${s(g,`${s(p,"fragColor = finalColor;","fragColor = premultiplyAlpha(finalColor);")}\n fragAlpha = finalColor.a;`)}
12
- ${s(h,"fragColor = finalColor;")}
13
- ${s(d,`fragEmission = ${s(c,"mix(finalColor.a * getEmissions(emissiveSymbolColor), vec4(0.0), snow);","finalColor.a * getEmissions(emissiveSymbolColor);")}`)}
11
+ ${a(g,`${a(p,"fragColor = finalColor;","fragColor = premultiplyAlpha(finalColor);")}\n fragAlpha = finalColor.a;`)}
12
+ ${a(h&&p&&m,"finalColor.rgb /= finalColor.a;")}
13
+ ${a(v,"fragColor = finalColor;")}
14
+ ${a(d,`fragEmission = ${a(c,"mix(finalColor.a * getEmissions(emissiveSymbolColor), vec4(0.0), snow);","finalColor.a * getEmissions(emissiveSymbolColor);")}`)}
14
15
  calculateOcclusionAndOutputHighlight();
15
- ${s(C,"outputObjectAndLayerIdColor();")}
16
+ ${a(C,"outputObjectAndLayerIdColor();")}
16
17
  }
17
18
  `)}export{e as outputColorHighlightOLID};
@@ -1,4 +1,5 @@
1
1
  import type MapView from "./MapView.js";
2
2
  import type SceneView from "./SceneView.js";
3
3
 
4
+ /** @since 5.0 */
4
5
  export type MapViewOrSceneView = MapView | SceneView;
@@ -15,6 +15,7 @@ import type Constraints from "./3d/constraints/Constraints.js";
15
15
  import type SceneViewEnvironment from "./3d/environment/SceneViewEnvironment.js";
16
16
  import type SceneViewPerformanceInfo from "./3d/support/SceneViewPerformanceInfo.js";
17
17
  import type LayerView from "./layers/LayerView.js";
18
+ import type HighlightOptions from "./support/HighlightOptions.js";
18
19
  import type { CameraProperties } from "../Camera.js";
19
20
  import type { ReadonlyArrayOrCollection } from "../core/Collection.js";
20
21
  import type { EventNames } from "../core/Evented.js";
@@ -32,6 +33,7 @@ import type { ExtentProperties } from "../geometry/Extent.js";
32
33
  import type { ConstraintsProperties } from "./3d/constraints/Constraints.js";
33
34
  import type { SpatialReferenceProperties } from "../geometry/SpatialReference.js";
34
35
  import type { ViewpointProperties } from "../Viewpoint.js";
36
+ import type { HighlightOptionsProperties } from "./support/HighlightOptions.js";
35
37
  import type { ViewProperties } from "./View.js";
36
38
 
37
39
  export interface SceneViewProperties extends ViewProperties, DOMContainerProperties, PopupViewProperties, BreakpointsOwnerProperties, Partial<Pick<SceneView, "alphaCompositingEnabled" | "qualityProfile" | "scale" | "zoom">> {
@@ -297,6 +299,34 @@ export interface SceneViewProperties extends ViewProperties, DOMContainerPropert
297
299
  * @since 4.19
298
300
  */
299
301
  floors?: ReadonlyArrayOrCollection<string>;
302
+ /**
303
+ * Options for configuring the highlight. Use the highlight method on the
304
+ * appropriate [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) to highlight a feature.
305
+ *
306
+ * Release-specific changes:
307
+ * * As of 4.32, it is recommended to use the [highlights](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#highlights) property instead. These two properties should
308
+ * not be used simultaneously.
309
+ * * As of 4.19, highlighting a feature influences the shadow of the feature as well. By default, the shadow of the
310
+ * highlighted feature is displayed in a darker shade.
311
+ *
312
+ * @deprecated since version 4.32. Use the [highlights](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#highlights) property instead.
313
+ * @since 4.4
314
+ * @see [FeatureLayerView#highlight()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#highlight)
315
+ * @see [Sample: Highlight SceneLayer](https://developers.arcgis.com/javascript/latest/sample-code/highlight-scenelayer/)
316
+ * @example
317
+ * const view = new SceneView({
318
+ * map: map,
319
+ * highlightOptions: {
320
+ * color: [255, 255, 0, 1],
321
+ * haloColor: "white",
322
+ * haloOpacity: 0.9,
323
+ * fillOpacity: 0.2,
324
+ * shadowColor: "black",
325
+ * shadowOpacity: 0.5
326
+ * }
327
+ * });
328
+ */
329
+ highlightOptions?: HighlightOptionsProperties;
300
330
  /**
301
331
  * The spatial reference of the view.
302
332
  *
@@ -1094,6 +1124,35 @@ export default class SceneView extends SceneViewSuperclass {
1094
1124
  * @since 4.7
1095
1125
  */
1096
1126
  get groundView(): GroundView;
1127
+ /**
1128
+ * Options for configuring the highlight. Use the highlight method on the
1129
+ * appropriate [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) to highlight a feature.
1130
+ *
1131
+ * Release-specific changes:
1132
+ * * As of 4.32, it is recommended to use the [highlights](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#highlights) property instead. These two properties should
1133
+ * not be used simultaneously.
1134
+ * * As of 4.19, highlighting a feature influences the shadow of the feature as well. By default, the shadow of the
1135
+ * highlighted feature is displayed in a darker shade.
1136
+ *
1137
+ * @deprecated since version 4.32. Use the [highlights](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#highlights) property instead.
1138
+ * @since 4.4
1139
+ * @see [FeatureLayerView#highlight()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#highlight)
1140
+ * @see [Sample: Highlight SceneLayer](https://developers.arcgis.com/javascript/latest/sample-code/highlight-scenelayer/)
1141
+ * @example
1142
+ * const view = new SceneView({
1143
+ * map: map,
1144
+ * highlightOptions: {
1145
+ * color: [255, 255, 0, 1],
1146
+ * haloColor: "white",
1147
+ * haloOpacity: 0.9,
1148
+ * fillOpacity: 0.2,
1149
+ * shadowColor: "black",
1150
+ * shadowOpacity: 0.5
1151
+ * }
1152
+ * });
1153
+ */
1154
+ get highlightOptions(): HighlightOptions;
1155
+ set highlightOptions(value: HighlightOptionsProperties);
1097
1156
  /**
1098
1157
  * This property contains performance information in a SceneView like global memory usage and additional details for
1099
1158
  * layers about memory consumption and number of features.