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

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