@arcgis/core 5.0.0-next.85 → 5.0.0-next.87

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 (992) hide show
  1. package/Basemap.d.ts +2 -2
  2. package/Camera.d.ts +3 -3
  3. package/CameraLayout.d.ts +2 -2
  4. package/Graphic.d.ts +3 -3
  5. package/Ground.d.ts +2 -2
  6. package/Ground.js +1 -1
  7. package/Map.d.ts +2 -2
  8. package/PopupTemplate.d.ts +3 -3
  9. package/Viewpoint.d.ts +2 -2
  10. package/WebDocument2D.d.ts +3 -3
  11. package/WebScene.d.ts +3 -3
  12. package/WebScene.js +1 -1
  13. package/analysis/Analysis.d.ts +3 -3
  14. package/analysis/Dimension/types.d.ts +0 -1
  15. package/analysis/DimensionSimpleStyle.d.ts +3 -3
  16. package/analysis/ElevationProfile/ElevationProfileDisplayUnits.d.ts +2 -2
  17. package/analysis/ElevationProfile/ElevationProfileLine.d.ts +2 -2
  18. package/analysis/ElevationProfile/ElevationProfileLineChartOptions.d.ts +2 -2
  19. package/analysis/ElevationProfile/ElevationProfileLineViewOptions.d.ts +2 -2
  20. package/analysis/ElevationProfile/ElevationProfileViewOptions.d.ts +2 -2
  21. package/analysis/LengthDimension.d.ts +3 -3
  22. package/analysis/LineOfSightAnalysisObserver.d.ts +3 -3
  23. package/analysis/LineOfSightAnalysisTarget.d.ts +3 -3
  24. package/analysis/ShadowCast/DiscreteOptions.d.ts +2 -2
  25. package/analysis/ShadowCast/MinDurationOptions.d.ts +2 -2
  26. package/analysis/ShadowCast/TotalDurationOptions.d.ts +2 -2
  27. package/analysis/ShadowCast/types.d.ts +0 -1
  28. package/analysis/SlicePlane.d.ts +3 -3
  29. package/analysis/Viewshed.d.ts +3 -3
  30. package/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.d.ts +3 -3
  31. package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +16 -4
  32. package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.js +1 -1
  33. package/analysis/VolumeMeasurement/VolumeMeasurementInputUnits.d.ts +3 -3
  34. package/analysis/VolumeMeasurement/types.d.ts +0 -1
  35. package/analysis/support/AnalysisOriginWebScene.d.ts +2 -2
  36. package/applications/Components/OrientedImageryViewer/galleryUtils.d.ts +80 -0
  37. package/applications/Components/OrientedImageryViewer/galleryUtils.js +5 -0
  38. package/applications/Components/clipboard.d.ts +106 -0
  39. package/applications/Components/clipboard.js +5 -0
  40. package/applications/Components/templateUtils.d.ts +30 -1
  41. package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
  42. package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
  43. package/assets/esri/core/t9n/Units.json +1 -1
  44. package/assets/esri/core/workers/RemoteClient.js +1 -1
  45. package/assets/esri/core/workers/chunks/{3b6fc34b6d92eef030e5.js → 0276e689e1371b40cff3.js} +1 -1
  46. package/assets/esri/core/workers/chunks/045a9cc900bb4ac8afde.js +1 -0
  47. package/assets/esri/core/workers/chunks/048173088bbeb1f6b8b6.js +1 -0
  48. package/assets/esri/core/workers/chunks/09ca0d05b090e9a70e61.js +1 -0
  49. package/assets/esri/core/workers/chunks/0be8b9d9ef56c37e74c3.js +1 -0
  50. package/assets/esri/core/workers/chunks/0bef671165e64f90ac86.js +1 -0
  51. package/assets/esri/core/workers/chunks/0c025d2b0d3162b07feb.js +1 -0
  52. package/assets/esri/core/workers/chunks/{84a4390b1c277c415d44.js → 0c358199ada2ff71e7d9.js} +1 -1
  53. package/assets/esri/core/workers/chunks/0c4ed18d67dea0c99f01.js +1 -0
  54. package/assets/esri/core/workers/chunks/0e0208b87566f4470f1d.js +1 -0
  55. package/assets/esri/core/workers/chunks/{c791e8ebf3ee0805c479.js → 0fc0fd7618ef25dd6b67.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{59e7a0215791b2b51180.js → 126183819921e6025c90.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{a09099697955eb44bfac.js → 15c180deb8d09127ad31.js} +1 -1
  58. package/assets/esri/core/workers/chunks/1616ee2f6dce0203f1d5.js +1 -0
  59. package/assets/esri/core/workers/chunks/1919ed99166e70021917.js +1 -0
  60. package/assets/esri/core/workers/chunks/1c68befc39d39799fcb8.js +1 -0
  61. package/assets/esri/core/workers/chunks/21bb414cb0623ffad577.js +1 -0
  62. package/assets/esri/core/workers/chunks/21c84e014c73bd85f4a3.js +1 -0
  63. package/assets/esri/core/workers/chunks/262677294d8c653e2b0b.js +1 -0
  64. package/assets/esri/core/workers/chunks/{04fddd41a8e6a4c1bc57.js → 28a6a59033baa44bafab.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{f5b32bc3f7ee911e3c59.js → 28c273f34ffde25cebc6.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{b7e40118b4d645e9f8e1.js → 2a12026f1ca9e8900a8b.js} +1 -1
  67. package/assets/esri/core/workers/chunks/2bc9f407f89d554a43ce.js +1 -0
  68. package/assets/esri/core/workers/chunks/2f21c5ae4fbe85c2792b.js +1 -0
  69. package/assets/esri/core/workers/chunks/3332ee9727874953523c.js +1 -0
  70. package/assets/esri/core/workers/chunks/{c477b0ce55211339c4cb.js → 33f44cc192c72064b5b6.js} +1 -1
  71. package/assets/esri/core/workers/chunks/365cb8aab4ca56999b47.js +1 -0
  72. package/assets/esri/core/workers/chunks/{b190a776de4859ac00f8.js → 3672125daca3df24c8ab.js} +1 -1
  73. package/assets/esri/core/workers/chunks/37a607f3835ec6f60834.js +1 -0
  74. package/assets/esri/core/workers/chunks/{c46a4681cbba638b58c1.js → 39dd80c184ac48f877f1.js} +1 -1
  75. package/assets/esri/core/workers/chunks/3a3adf9b6502ad698aea.js +1 -0
  76. package/assets/esri/core/workers/chunks/3b5f24bb824c95996308.js +1 -0
  77. package/assets/esri/core/workers/chunks/{304ea784c28dc78e5e65.js → 3c663035cf872b66cb98.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{055aead7135a2f8bca29.js → 3d924488471601a17915.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{98e04c2382fa5ba382fc.js → 3dc1ae04cfa2c06daf48.js} +1 -1
  80. package/assets/esri/core/workers/chunks/{156c73a948bde11f0d53.js → 42b56932340b6d0bc712.js} +1 -1
  81. package/assets/esri/core/workers/chunks/45c1a3376b138eeee329.js +1 -0
  82. package/assets/esri/core/workers/chunks/{301fa6276f4098521106.js → 476e51284e6ed7dc5c99.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{18cdd268fc921ffd92e2.js → 47bea83ae7fe0e1acee0.js} +1 -1
  84. package/assets/esri/core/workers/chunks/4de93e9f91fd891ed96f.js +1 -0
  85. package/assets/esri/core/workers/chunks/4eb02a03956d1c9c77ee.js +1 -0
  86. package/assets/esri/core/workers/chunks/{1a41c9127ca5a260d5ef.js → 555a252bdb87e340bd02.js} +1 -1
  87. package/assets/esri/core/workers/chunks/5670e430584f020a3530.js +1 -0
  88. package/assets/esri/core/workers/chunks/5734aefbce8b6425630c.js +1 -0
  89. package/assets/esri/core/workers/chunks/{1fe1a131be1d5e1e23ed.js → 5a1921c177580f17ff96.js} +1 -1
  90. package/assets/esri/core/workers/chunks/{70df4331ed29d823bf38.js → 5b297353b058323f8080.js} +1 -1
  91. package/assets/esri/core/workers/chunks/5ef5dcca7c9b376f7f77.js +1 -0
  92. package/assets/esri/core/workers/chunks/{3849dc35941e569fae5f.js → 614c63dae0158da0ed3d.js} +1 -1
  93. package/assets/esri/core/workers/chunks/{c500b59cd7da54fe72ec.js → 641450da2680ae09b8e7.js} +1 -1
  94. package/assets/esri/core/workers/chunks/{ec03d59984782529031a.js → 687677acc05b5e87effe.js} +1 -1
  95. package/assets/esri/core/workers/chunks/{6de843d1809cba61ded3.js → 727321c615f35d708d46.js} +1 -1
  96. package/assets/esri/core/workers/chunks/782c24211daacb47b0b2.js +1 -0
  97. package/assets/esri/core/workers/chunks/79067e7d1ebc46afd775.js +1 -0
  98. package/assets/esri/core/workers/chunks/7a454e4d6df3360e0ab9.js +1 -0
  99. package/assets/esri/core/workers/chunks/7da56ba34c81d2bbaf25.js +1 -0
  100. package/assets/esri/core/workers/chunks/7f15d15c7e2c5d3e70c3.js +1 -0
  101. package/assets/esri/core/workers/chunks/{ce9467dc1ff695d795e5.js → 824b45b04b4f4f91dbce.js} +1 -1
  102. package/assets/esri/core/workers/chunks/836d10ceb93ed19f0aa6.js +1 -0
  103. package/assets/esri/core/workers/chunks/{854adab6a06af861c104.js → 837d39e70880e4310bda.js} +1 -1
  104. package/assets/esri/core/workers/chunks/890833e98e79b8fd3747.js +1 -0
  105. package/assets/esri/core/workers/chunks/{d6e11f05db698d14f21d.js → 8a7f56139b7de0011a37.js} +1 -1
  106. package/assets/esri/core/workers/chunks/8bcb2180ecc88a39b317.js +1 -0
  107. package/assets/esri/core/workers/chunks/8c5d827cbf8869defb87.js +1 -0
  108. package/assets/esri/core/workers/chunks/{db9a9712038df76e3eda.js → 8ef337e25d65670eb73b.js} +1 -1
  109. package/assets/esri/core/workers/chunks/{e201bfe3158c025edc99.js → 93faad2a759b08dce619.js} +1 -1
  110. package/assets/esri/core/workers/chunks/{1779e6eabc299831fc9f.js → 94c4ef224ff38eca7b87.js} +1 -1
  111. package/assets/esri/core/workers/chunks/{9ff1e650ce0912afa780.js → 97155c8ac832d7c46f24.js} +1 -1
  112. package/assets/esri/core/workers/chunks/{14f8215ab716c6d9d5f8.js → 98cb131b62e30aee35e1.js} +1 -1
  113. package/assets/esri/core/workers/chunks/{b586d7e608e8ba8b88fe.js → 9b3b9df0aa0fdcc77aa2.js} +1 -1
  114. package/assets/esri/core/workers/chunks/{841058de8bc6e328fd68.js → 9d77a7d04872b4535e9e.js} +1 -1
  115. package/assets/esri/core/workers/chunks/{338768f94cc49559b209.js → 9ebc4303e29ee0fc1716.js} +1 -1
  116. package/assets/esri/core/workers/chunks/{5543de9a0435c319f4f9.js → 9fa1512baa6e95d3f878.js} +20 -20
  117. package/assets/esri/core/workers/chunks/{e8f6305744f87bbed961.js → a5ed35f53769feb751db.js} +1 -1
  118. package/assets/esri/core/workers/chunks/a6b8ce1c2996ee392bdf.js +1 -0
  119. package/assets/esri/core/workers/chunks/{a2c0c1bb5e775abefc90.js → aa09e261d1f7dffaad8c.js} +1 -1
  120. package/assets/esri/core/workers/chunks/b268b4cbf5b0c856f88e.js +1 -0
  121. package/assets/esri/core/workers/chunks/b2f6cee006788ce3bd16.js +1 -0
  122. package/assets/esri/core/workers/chunks/{9fac9eda0a41f7f4c2c6.js → b46e772e415e2cfca896.js} +1 -1
  123. package/assets/esri/core/workers/chunks/b4ab715a3c506e122f35.js +1 -0
  124. package/assets/esri/core/workers/chunks/{b91a157fb5f729de6597.js → b9756dce0b3af1a9dc54.js} +1 -1
  125. package/assets/esri/core/workers/chunks/baa7e90ec5259057d86b.js +1 -0
  126. package/assets/esri/core/workers/chunks/{52ae2073604deef63ea2.js → c083045d21636b95f26f.js} +1 -1
  127. package/assets/esri/core/workers/chunks/{348560f083350ad0bf2e.js → c38098f7073a10efdb1e.js} +1 -1
  128. package/assets/esri/core/workers/chunks/{4ff3c03cfbec928c0720.js → c4fb3f0b0cfb21e68413.js} +1 -1
  129. package/assets/esri/core/workers/chunks/{adecd31fd64d6753682d.js → c7c865dc1a93e781a3e3.js} +1 -1
  130. package/assets/esri/core/workers/chunks/c8e56dc1239118ac2a60.js +1 -0
  131. package/assets/esri/core/workers/chunks/{181fab86394f1f912490.js → cc464d5a83f8f405e66c.js} +1 -1
  132. package/assets/esri/core/workers/chunks/{d9d2178d436597b1afaf.js → cc6d9b2062b9de629111.js} +1 -1
  133. package/assets/esri/core/workers/chunks/d5386c0e77063c87fddd.js +1 -0
  134. package/assets/esri/core/workers/chunks/d782671235af2db1c458.js +1 -0
  135. package/assets/esri/core/workers/chunks/{f0eb2bfe5a8607b251f5.js → dc2c9b584f8e4627de7f.js} +1 -1
  136. package/assets/esri/core/workers/chunks/de33ce9b6f4e6c0e1389.js +1 -0
  137. package/assets/esri/core/workers/chunks/{0abb084b8a137f4fcdfc.js → e1c5773c12d9947bdc5f.js} +1 -1
  138. package/assets/esri/core/workers/chunks/e55ce8466aa979ac1e6b.js +1 -0
  139. package/assets/esri/core/workers/chunks/{21739c37160061f229ef.js → e585883d0036aa866420.js} +1 -1
  140. package/assets/esri/core/workers/chunks/e6d6d664fc9f2cd6a042.js +1 -0
  141. package/assets/esri/core/workers/chunks/e7cdc2a21104d84aec4a.js +1 -0
  142. package/assets/esri/core/workers/chunks/e9edf3987039def65859.js +1 -0
  143. package/assets/esri/core/workers/chunks/eb063660c37093f85349.js +1 -0
  144. package/assets/esri/core/workers/chunks/{c825ca22894bdb4d01ba.js → edbe52c2848486d64b16.js} +1 -1
  145. package/assets/esri/core/workers/chunks/{4f8895eb57ec6ab4b318.js → f5a61fa75ac877b5bb74.js} +1 -1
  146. package/assets/esri/core/workers/chunks/f9bc4edfdb1590be2d92.js +1 -0
  147. package/assets/esri/core/workers/chunks/fc763ce37d631e006199.js +1 -0
  148. package/assets/esri/core/workers/chunks/ff2a170acd98edfd0e06.js +1 -0
  149. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  150. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  151. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  152. package/assets/esri/themes/base/widgets/_FeatureTable.scss +9 -1
  153. package/assets/esri/themes/dark/main.css +1 -1
  154. package/assets/esri/themes/light/main.css +1 -1
  155. package/assets/esri/themes/light/view.css +1 -1
  156. package/chunks/bundle.js +1 -1
  157. package/chunks/libtess-f32.js +1 -1
  158. package/chunks/libtess-f64.js +1 -1
  159. package/config.js +1 -1
  160. package/copyright.txt +84 -0
  161. package/core/Clonable.d.ts +0 -2
  162. package/core/Collection.d.ts +1 -1
  163. package/core/Error.d.ts +0 -1
  164. package/core/Evented.d.ts +0 -2
  165. package/core/Identifiable.d.ts +0 -1
  166. package/core/JSONSupport.d.ts +0 -2
  167. package/core/MultiOriginJSONSupport.d.ts +1 -3
  168. package/core/Promise.d.ts +9 -5
  169. package/core/ReadOnlyMultiOriginJSONSupport.d.ts +0 -2
  170. package/core/Version.d.ts +0 -1
  171. package/core/accessorSupport/types.d.ts +0 -1
  172. package/core/quantity.js +1 -1
  173. package/core/quantityFormatUtils.js +1 -1
  174. package/core/sql/types.d.ts +0 -1
  175. package/core/timeUtils.js +1 -1
  176. package/core/types.d.ts +0 -1
  177. package/core/units.d.ts +2 -2
  178. package/core/units.js +1 -1
  179. package/core/workers/WorkerHandle.js +1 -1
  180. package/editing/Clipboard.js +5 -0
  181. package/editing/sharedTemplates/types.d.ts +0 -1
  182. package/effects/FocusArea.d.ts +3 -3
  183. package/effects/FocusAreaOutline.d.ts +3 -3
  184. package/effects/FocusAreas.d.ts +3 -3
  185. package/effects/types.d.ts +0 -1
  186. package/form/ExpressionInfo.d.ts +2 -2
  187. package/form/FormTemplate.d.ts +2 -2
  188. package/form/elements/Element.d.ts +2 -2
  189. package/form/elements/UtilityNetworkAssociationsElement.d.ts +2 -2
  190. package/geometry/Geometry.d.ts +2 -2
  191. package/geometry/HeightModelInfo.d.ts +2 -2
  192. package/geometry/Mesh.d.ts +3 -3
  193. package/geometry/SpatialReference.d.ts +2 -2
  194. package/geometry/ellipsoidUtils.js +1 -1
  195. package/geometry/geometryEngineTypes.d.ts +0 -1
  196. package/geometry/libtess.js +1 -1
  197. package/geometry/projection/projectors.js +1 -1
  198. package/geometry/projectionUtils.js +1 -1
  199. package/geometry/support/MeshComponent.d.ts +3 -3
  200. package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +3 -3
  201. package/geometry/support/MeshLocalVertexSpace.d.ts +3 -3
  202. package/geometry/support/MeshMaterial.d.ts +3 -3
  203. package/geometry/support/MeshTexture.d.ts +3 -3
  204. package/geometry/support/MeshTextureTransform.d.ts +3 -3
  205. package/geometry/support/MeshTransform.d.ts +3 -3
  206. package/geometry/support/MeshVertexAttributes.d.ts +3 -3
  207. package/geometry/support/meshUtils/projection.js +1 -1
  208. package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
  209. package/geometry/support/planetGCSUtils.js +1 -1
  210. package/geometry/support/spatialReferenceUtils.js +1 -1
  211. package/graphic/GraphicOrigin.d.ts +0 -1
  212. package/ground/NavigationConstraint.d.ts +2 -2
  213. package/identity/Credential.d.ts +2 -2
  214. package/identity/IdentityModal.js +1 -1
  215. package/identity/OAuthInfo.d.ts +2 -2
  216. package/identity/ServerInfo.d.ts +2 -2
  217. package/interfaces.d.ts +2 -3
  218. package/intl/locale.d.ts +0 -1
  219. package/intl/messages.d.ts +0 -1
  220. package/intl/number.d.ts +0 -1
  221. package/intl/substitute.d.ts +0 -1
  222. package/intl/t9n.d.ts +0 -1
  223. package/kernel.js +1 -1
  224. package/layers/BaseElevationLayer.d.ts +3 -4
  225. package/layers/BingMapsLayer.d.ts +2 -2
  226. package/layers/BuildingSceneLayer.d.ts +5 -4
  227. package/layers/CatalogLayer.d.ts +3 -3
  228. package/layers/DimensionLayer.d.ts +2 -2
  229. package/layers/ElevationLayer.d.ts +3 -4
  230. package/layers/ElevationLayer.js +1 -1
  231. package/layers/FeatureLayer.d.ts +4 -4
  232. package/layers/GaussianSplatLayer.d.ts +2 -2
  233. package/layers/GeoJSONLayer.d.ts +2 -2
  234. package/layers/GeoRSSLayer.d.ts +2 -2
  235. package/layers/GroupLayer.d.ts +2 -2
  236. package/layers/ImageryLayer.d.ts +3 -3
  237. package/layers/ImageryTileLayer.d.ts +3 -3
  238. package/layers/IntegratedMesh3DTilesLayer.d.ts +2 -2
  239. package/layers/IntegratedMeshLayer.d.ts +5 -4
  240. package/layers/KMLLayer.d.ts +2 -2
  241. package/layers/KnowledgeGraphLayer.d.ts +2 -2
  242. package/layers/Layer.d.ts +2 -2
  243. package/layers/LineOfSightLayer.d.ts +2 -2
  244. package/layers/LinkChartLayer.d.ts +2 -2
  245. package/layers/MapImageLayer.d.ts +2 -2
  246. package/layers/MapNotesLayer.d.ts +2 -2
  247. package/layers/MediaLayer.d.ts +2 -2
  248. package/layers/OGCFeatureLayer.d.ts +2 -2
  249. package/layers/ParquetLayer.d.ts +3 -3
  250. package/layers/PointCloudLayer.d.ts +5 -4
  251. package/layers/RouteLayer.d.ts +2 -2
  252. package/layers/SceneLayer.d.ts +6 -5
  253. package/layers/StreamLayer.d.ts +3 -3
  254. package/layers/SubtypeGroupLayer.d.ts +4 -4
  255. package/layers/TileLayer.d.ts +2 -2
  256. package/layers/UnknownLayer.d.ts +2 -2
  257. package/layers/UnsupportedLayer.d.ts +2 -2
  258. package/layers/VectorTileLayer.d.ts +2 -2
  259. package/layers/VideoLayer.d.ts +2 -2
  260. package/layers/ViewshedLayer.d.ts +2 -2
  261. package/layers/VoxelLayer.d.ts +2 -2
  262. package/layers/WCSLayer.d.ts +3 -3
  263. package/layers/WFSLayer.d.ts +2 -2
  264. package/layers/WMSLayer.d.ts +2 -2
  265. package/layers/WMTSLayer.d.ts +2 -2
  266. package/layers/WebTileLayer.d.ts +2 -2
  267. package/layers/buildingSublayers/BuildingComponentSublayer.d.ts +2 -2
  268. package/layers/buildingSublayers/BuildingGroupSublayer.d.ts +1 -1
  269. package/layers/buildingSublayers/BuildingSublayer.d.ts +2 -2
  270. package/layers/catalog/CatalogDynamicGroupLayer.d.ts +2 -2
  271. package/layers/catalog/CatalogFootprintLayer.d.ts +2 -2
  272. package/layers/effects/types.d.ts +0 -1
  273. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  274. package/layers/knowledgeGraph/IdTypePair.d.ts +0 -1
  275. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -2
  276. package/layers/mixins/APIKeyMixin.d.ts +0 -1
  277. package/layers/mixins/ArcGISImageService.d.ts +30 -16
  278. package/layers/mixins/CustomParametersMixin.d.ts +0 -1
  279. package/layers/mixins/EditBusLayer.d.ts +0 -2
  280. package/layers/mixins/ImageryTileMixin.d.ts +2 -1
  281. package/layers/mixins/ImageryTileMixin.js +1 -1
  282. package/layers/mixins/OperationalLayer.d.ts +0 -1
  283. package/layers/mixins/ScaleRangeLayer.d.ts +0 -1
  284. package/layers/mixins/SceneService.d.ts +0 -6
  285. package/layers/orientedImagery/transformations/utils.js +1 -1
  286. package/layers/pointCloudFilters/PointCloudFilter.d.ts +2 -2
  287. package/layers/raster/datasets/pixelReader.d.ts +0 -1
  288. package/layers/raster/datasets/types.d.ts +0 -1
  289. package/layers/raster/functions/SpectralConversionFunction.js +5 -0
  290. package/layers/raster/functions/SpectralConversionFunctionArguments.js +5 -0
  291. package/layers/raster/functions/changeDetectionUtils.d.ts +0 -1
  292. package/layers/raster/functions/conversionUtils.js +1 -1
  293. package/layers/raster/functions/focalStatUtils.d.ts +0 -1
  294. package/layers/raster/functions/rasterFunctionHelper.js +1 -1
  295. package/layers/raster/functions/vectorFieldUtils.js +1 -1
  296. package/layers/scene/types.d.ts +11 -0
  297. package/layers/support/AggregateField.d.ts +2 -2
  298. package/layers/support/BuildingFilter.d.ts +2 -2
  299. package/layers/support/BuildingFilterBlock.d.ts +2 -2
  300. package/layers/support/BuildingSummaryStatistics.d.ts +3 -3
  301. package/layers/support/CodedValue.d.ts +2 -2
  302. package/layers/support/ControlPoint.d.ts +2 -2
  303. package/layers/support/ControlPointsGeoreference.d.ts +2 -2
  304. package/layers/support/DimensionalDefinition.d.ts +2 -2
  305. package/layers/support/DisplayFilter.d.ts +3 -3
  306. package/layers/support/DisplayFilterInfo.d.ts +3 -3
  307. package/layers/support/Domain.d.ts +2 -2
  308. package/layers/support/EditFieldsInfo.d.ts +3 -3
  309. package/layers/support/ElevationQuery.js +1 -1
  310. package/layers/support/ElevationTileData.js +1 -1
  311. package/layers/support/ExpressionInfo.d.ts +3 -3
  312. package/layers/support/FacilityLayerInfo.d.ts +2 -2
  313. package/layers/support/FeatureEffect.d.ts +2 -2
  314. package/layers/support/FeatureFilter.d.ts +2 -2
  315. package/layers/support/FeatureReductionBinning.d.ts +2 -2
  316. package/layers/support/FeatureReductionCluster.d.ts +2 -2
  317. package/layers/support/FeatureReductionSelection.d.ts +2 -2
  318. package/layers/support/FeatureTemplate.d.ts +3 -3
  319. package/layers/support/FeatureType.d.ts +3 -3
  320. package/layers/support/Field.d.ts +2 -2
  321. package/layers/support/FieldConfiguration.d.ts +3 -3
  322. package/layers/support/GeometryFieldsInfo.d.ts +3 -3
  323. package/layers/support/KMLSublayer.d.ts +3 -3
  324. package/layers/support/LOD.d.ts +2 -2
  325. package/layers/support/LabelClass.d.ts +2 -2
  326. package/layers/support/LabelExpressionInfo.d.ts +2 -2
  327. package/layers/support/LayerFloorInfo.d.ts +2 -2
  328. package/layers/support/LevelLayerInfo.d.ts +2 -2
  329. package/layers/support/LocalMediaElementSource.d.ts +3 -3
  330. package/layers/support/MapImage.d.ts +2 -2
  331. package/layers/support/MediaElementBase.d.ts +2 -2
  332. package/layers/support/MosaicRule.d.ts +2 -2
  333. package/layers/support/MultidimensionalSubset.d.ts +13 -4
  334. package/layers/support/OrderByInfo.d.ts +2 -2
  335. package/layers/support/ParquetGeometryEncodingLocation.d.ts +3 -3
  336. package/layers/support/ParquetGeometryEncodingWkb.d.ts +3 -3
  337. package/layers/support/PixelBlock.d.ts +2 -2
  338. package/layers/support/PlaybackInfo.d.ts +3 -3
  339. package/layers/support/PurgeOptions.d.ts +2 -2
  340. package/layers/support/RasterBandInfo.d.ts +2 -2
  341. package/layers/support/RasterFunction.d.ts +2 -2
  342. package/layers/support/RasterInfo.d.ts +2 -2
  343. package/layers/support/RasterSensorInfo.d.ts +2 -2
  344. package/layers/support/Relationship.d.ts +5 -3
  345. package/layers/support/RouteStopSymbols.d.ts +2 -2
  346. package/layers/support/RouteSymbols.d.ts +2 -2
  347. package/layers/support/SceneFilter.d.ts +2 -2
  348. package/layers/support/SceneLayerViewFilter.js +5 -0
  349. package/layers/support/SceneModification.d.ts +2 -2
  350. package/layers/support/SceneModifications.d.ts +1 -1
  351. package/layers/support/SiteLayerInfo.d.ts +2 -2
  352. package/layers/support/Sublayer.d.ts +2 -2
  353. package/layers/support/Subtype.d.ts +3 -3
  354. package/layers/support/SubtypeSublayer.d.ts +3 -3
  355. package/layers/support/TelemetryData.d.ts +3 -3
  356. package/layers/support/TelemetryDisplay.d.ts +3 -3
  357. package/layers/support/TileInfo.d.ts +2 -2
  358. package/layers/support/TileMatrixSet.d.ts +2 -2
  359. package/layers/support/TimeInfo.d.ts +3 -3
  360. package/layers/support/TrackInfo.d.ts +3 -3
  361. package/layers/support/TrackPartInfo.d.ts +3 -3
  362. package/layers/support/VideoTimeExtent.d.ts +3 -3
  363. package/layers/support/WMSSublayer.d.ts +2 -2
  364. package/layers/support/WMTSStyle.d.ts +2 -2
  365. package/layers/support/WMTSSublayer.d.ts +2 -2
  366. package/layers/support/rasterFunctionUtils.d.ts +0 -4
  367. package/layers/support/types.d.ts +32 -0
  368. package/layers/video/types.d.ts +0 -1
  369. package/layers/voxel/VoxelColorStop.d.ts +3 -3
  370. package/layers/voxel/VoxelDynamicSection.d.ts +3 -3
  371. package/layers/voxel/VoxelIsosurface.d.ts +3 -3
  372. package/layers/voxel/VoxelOpacityStop.d.ts +3 -3
  373. package/layers/voxel/VoxelRangeFilter.d.ts +3 -3
  374. package/layers/voxel/VoxelSlice.d.ts +3 -3
  375. package/layers/voxel/VoxelTransferFunctionStyle.d.ts +3 -3
  376. package/layers/voxel/VoxelUniqueValue.d.ts +3 -3
  377. package/layers/voxel/VoxelVariable.d.ts +2 -2
  378. package/layers/voxel/VoxelVariableStyle.d.ts +2 -2
  379. package/layers/voxel/VoxelVolumeStyle.d.ts +2 -2
  380. package/layers/wms/types.d.ts +0 -1
  381. package/layers/wmts/types.d.ts +0 -1
  382. package/linkChart/ChronologicalLayoutSettings.d.ts +3 -3
  383. package/linkChart/LayoutSettings.d.ts +3 -3
  384. package/linkChart/LinkChartProperties.d.ts +3 -3
  385. package/linkChart/NonspatialDataDisplay.d.ts +3 -3
  386. package/linkChart/OrganicLayoutSettings.d.ts +3 -3
  387. package/linkChart/types.d.ts +0 -1
  388. package/networks/CircuitManager.d.ts +2 -2
  389. package/networks/Network.d.ts +2 -2
  390. package/networks/UnitIdentifierManager.d.ts +2 -2
  391. package/networks/support/Circuit.d.ts +2 -2
  392. package/networks/support/CircuitLocation.d.ts +2 -2
  393. package/networks/support/CircuitPath.d.ts +2 -2
  394. package/networks/support/CircuitPathConnectivityElement.d.ts +2 -2
  395. package/networks/support/CircuitSection.d.ts +2 -2
  396. package/networks/support/NamedTraceConfiguration.d.ts +2 -2
  397. package/networks/support/Subcircuit.d.ts +2 -2
  398. package/networks/support/Terminal.d.ts +2 -2
  399. package/networks/support/TerminalConfiguration.d.ts +2 -2
  400. package/networks/support/TraceConfiguration.d.ts +2 -2
  401. package/networks/support/UNTraceConfiguration.d.ts +2 -2
  402. package/networks/support/typeUtils.d.ts +0 -1
  403. package/package.json +1 -1
  404. package/popup/ElementExpressionInfo.d.ts +2 -2
  405. package/popup/ExpressionInfo.d.ts +2 -2
  406. package/popup/FieldInfo.d.ts +3 -3
  407. package/popup/LayerOptions.d.ts +2 -2
  408. package/popup/RelatedRecordsInfo.d.ts +2 -2
  409. package/popup/content/AttachmentsContent.d.ts +2 -2
  410. package/popup/content/Content.d.ts +2 -2
  411. package/popup/content/RelationshipContent.d.ts +2 -2
  412. package/popup/content/UtilityNetworkAssociationsContent.d.ts +2 -2
  413. package/popup/content/mixins/MediaInfo.d.ts +2 -2
  414. package/popup/content/support/ChartMediaInfoValue.d.ts +2 -2
  415. package/popup/content/support/ImageMediaInfoValue.d.ts +2 -2
  416. package/popup/support/AttachmentsOrderByInfo.d.ts +3 -3
  417. package/popup/support/FieldInfoFormat.d.ts +3 -3
  418. package/popup/support/RelatedRecordsInfoFieldOrder.d.ts +2 -2
  419. package/popup/support/UtilityNetworkAssociationType.d.ts +3 -3
  420. package/portal/Portal.d.ts +2 -2
  421. package/portal/PortalFolder.d.ts +2 -2
  422. package/portal/PortalGroup.d.ts +2 -2
  423. package/portal/PortalItem.d.ts +2 -2
  424. package/portal/PortalUser.d.ts +2 -2
  425. package/portal/timeUnitKebabDictionary.js +1 -1
  426. package/renderers/FlowRenderer.d.ts +2 -2
  427. package/renderers/PieChartRenderer.d.ts +2 -2
  428. package/renderers/PointCloudRenderer.d.ts +2 -2
  429. package/renderers/RasterColormapRenderer.d.ts +2 -2
  430. package/renderers/RasterShadedReliefRenderer.d.ts +2 -2
  431. package/renderers/RasterStretchRenderer.d.ts +2 -2
  432. package/renderers/Renderer.d.ts +2 -2
  433. package/renderers/VectorFieldRenderer.d.ts +2 -2
  434. package/renderers/support/AttributeColorInfo.d.ts +2 -2
  435. package/renderers/support/AuthoringInfo.d.ts +2 -2
  436. package/renderers/support/AuthoringInfoClassBreakInfo.d.ts +2 -2
  437. package/renderers/support/AuthoringInfoFieldInfo.d.ts +2 -2
  438. package/renderers/support/AuthoringInfoVisualVariable.d.ts +2 -2
  439. package/renderers/support/ClassBreakInfo.d.ts +2 -2
  440. package/renderers/support/ColormapInfo.d.ts +2 -2
  441. package/renderers/support/DotDensityLegendOptions.d.ts +2 -2
  442. package/renderers/support/HeatmapColorStop.d.ts +2 -2
  443. package/renderers/support/HeatmapLegendOptions.d.ts +3 -3
  444. package/renderers/support/OthersCategory.d.ts +3 -3
  445. package/renderers/support/RasterPresetRenderer.d.ts +3 -3
  446. package/renderers/support/RendererLegendOptions.d.ts +3 -3
  447. package/renderers/support/UniqueValue.d.ts +3 -3
  448. package/renderers/support/UniqueValueClass.d.ts +3 -3
  449. package/renderers/support/UniqueValueGroup.d.ts +3 -3
  450. package/renderers/support/UniqueValueInfo.d.ts +2 -2
  451. package/renderers/support/pointCloud/ColorClassBreakInfo.d.ts +2 -2
  452. package/renderers/support/pointCloud/ColorModulation.d.ts +2 -2
  453. package/renderers/support/pointCloud/ColorUniqueValueInfo.d.ts +2 -2
  454. package/renderers/visualVariables/VisualVariable.d.ts +2 -2
  455. package/renderers/visualVariables/support/ColorSizeStop.d.ts +2 -2
  456. package/renderers/visualVariables/support/ColorStop.d.ts +2 -2
  457. package/renderers/visualVariables/support/OpacityStop.d.ts +2 -2
  458. package/renderers/visualVariables/support/SizeStop.d.ts +2 -2
  459. package/renderers/visualVariables/support/VisualVariableLegendOptions.d.ts +3 -3
  460. package/rest/featureService/FeatureService.d.ts +2 -2
  461. package/rest/geoprocessor/GPOptions.d.ts +2 -2
  462. package/rest/geoprocessor/utils.js +1 -1
  463. package/rest/imageService.d.ts +36 -19
  464. package/rest/imageService.js +1 -1
  465. package/rest/knowledgeGraph/DataModel.d.ts +2 -2
  466. package/rest/knowledgeGraph/FieldIndex.d.ts +2 -2
  467. package/rest/knowledgeGraph/GraphObject.d.ts +2 -2
  468. package/rest/knowledgeGraph/GraphObjectType.d.ts +2 -2
  469. package/rest/knowledgeGraph/GraphProperty.d.ts +2 -2
  470. package/rest/knowledgeGraph/KnowledgeGraph.d.ts +2 -2
  471. package/rest/knowledgeGraph/Path.d.ts +2 -2
  472. package/rest/knowledgeGraph/ServiceDefinition.d.ts +2 -2
  473. package/rest/knowledgeGraph/SourceTypeValueBehavior.d.ts +2 -2
  474. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsConfiguration.d.ts +2 -2
  475. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsEntity.d.ts +2 -2
  476. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsPathFilter.d.ts +2 -2
  477. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsResultJSON.d.ts +0 -1
  478. package/rest/knowledgeGraph/toolService/findPaths/CIMKGTraversalDirection.d.ts +2 -2
  479. package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.d.ts +0 -1
  480. package/rest/lastMileDelivery/types.d.ts +0 -1
  481. package/rest/layerSources/DynamicDataLayer.d.ts +2 -2
  482. package/rest/layerSources/DynamicMapLayer.d.ts +2 -2
  483. package/rest/layerSources/JoinTableDataSource.d.ts +2 -2
  484. package/rest/layerSources/QueryTableDataSource.d.ts +2 -2
  485. package/rest/layerSources/RasterDataSource.d.ts +2 -2
  486. package/rest/layerSources/TableDataSource.d.ts +2 -2
  487. package/rest/networks/circuits/support/CircuitTraceResult.d.ts +2 -2
  488. package/rest/networks/circuits/support/ExportCircuitsParameters.d.ts +2 -2
  489. package/rest/networks/circuits/support/QueryCircuitsParameters.d.ts +2 -2
  490. package/rest/networks/support/AggregatedGeometry.d.ts +2 -2
  491. package/rest/networks/support/Association.d.ts +2 -2
  492. package/rest/networks/support/AssociationGeometriesResult.d.ts +2 -2
  493. package/rest/networks/support/FunctionResult.d.ts +2 -2
  494. package/rest/networks/support/NetworkElement.d.ts +2 -2
  495. package/rest/networks/support/QueryAssociationsParameters.d.ts +2 -2
  496. package/rest/networks/support/QueryAssociationsResult.d.ts +2 -2
  497. package/rest/networks/support/QueryNamedTraceConfigurationsParameters.d.ts +2 -2
  498. package/rest/networks/support/SynthesizeAssociationGeometriesParameters.d.ts +2 -2
  499. package/rest/networks/support/TraceLocation.d.ts +3 -3
  500. package/rest/networks/support/TraceParameters.d.ts +2 -2
  501. package/rest/networks/support/TraceResult.d.ts +2 -2
  502. package/rest/networks/support/ValidateNetworkTopologyParameters.d.ts +2 -2
  503. package/rest/networks/support/ValidateNetworkTopologyResult.d.ts +2 -2
  504. package/rest/query/support/AttachmentInfo.d.ts +2 -2
  505. package/rest/support/AddressCandidate.d.ts +2 -2
  506. package/rest/support/AddressToLocationsParameters.d.ts +2 -2
  507. package/rest/support/AddressesToLocationsParameters.d.ts +2 -2
  508. package/rest/support/ArealUnit.d.ts +2 -2
  509. package/rest/support/AreasAndLengthsParameters.d.ts +2 -2
  510. package/rest/support/AttachmentQuery.d.ts +2 -2
  511. package/rest/support/AttributeBinsFeatureSet.d.ts +2 -2
  512. package/rest/support/AttributeBinsGrouping.d.ts +3 -3
  513. package/rest/support/AttributeBinsQuery.d.ts +3 -3
  514. package/rest/support/BaseImageMeasureParameters.d.ts +2 -2
  515. package/rest/support/BaseImageMeasureResult.d.ts +2 -2
  516. package/rest/support/BaseImageMeasureResultValue.d.ts +2 -2
  517. package/rest/support/BinParametersBase.d.ts +3 -3
  518. package/rest/support/BufferParameters.d.ts +2 -2
  519. package/rest/support/CameraInfo.d.ts +2 -2
  520. package/rest/support/CameraInfoMixin.d.ts +0 -1
  521. package/rest/support/ClosestFacilityParameters.d.ts +3 -3
  522. package/rest/support/ClosestFacilitySolveResult.d.ts +2 -2
  523. package/rest/support/ColorRamp.d.ts +2 -2
  524. package/rest/support/DataFile.d.ts +2 -2
  525. package/rest/support/DataLayer.d.ts +3 -3
  526. package/rest/support/DateBinTimeInterval.d.ts +3 -3
  527. package/rest/support/DensifyParameters.d.ts +2 -2
  528. package/rest/support/DirectionLine.d.ts +3 -3
  529. package/rest/support/DirectionPoint.d.ts +3 -3
  530. package/rest/support/DirectionsEvent.d.ts +2 -2
  531. package/rest/support/DirectionsString.d.ts +2 -2
  532. package/rest/support/FeatureSet.d.ts +2 -2
  533. package/rest/support/FindImagesParameters.d.ts +3 -3
  534. package/rest/support/FindImagesResult.d.ts +2 -2
  535. package/rest/support/FindParameters.d.ts +2 -2
  536. package/rest/support/FindResult.d.ts +2 -2
  537. package/rest/support/GPMessage.d.ts +2 -2
  538. package/rest/support/GeneralizeParameters.d.ts +2 -2
  539. package/rest/support/IdentifyParameters.d.ts +2 -2
  540. package/rest/support/IdentifyResult.d.ts +2 -2
  541. package/rest/support/ImageAngleParameters.d.ts +2 -2
  542. package/rest/support/ImageAngleResult.d.ts +2 -2
  543. package/rest/support/ImageBoundaryParameters.d.ts +3 -3
  544. package/rest/support/ImageBoundaryResult.d.ts +2 -2
  545. package/rest/support/ImageGPSInfo.d.ts +2 -2
  546. package/rest/support/ImageGPSInfoParameters.d.ts +3 -3
  547. package/rest/support/ImageGPSInfoResult.d.ts +2 -2
  548. package/rest/support/ImageHistogramParameters.d.ts +2 -2
  549. package/rest/support/ImageIdentifyParameters.d.ts +2 -2
  550. package/rest/support/ImageIdentifyResult.d.ts +2 -2
  551. package/rest/support/ImageInspectionInfo.d.ts +2 -2
  552. package/rest/support/ImagePixelLocationParameters.d.ts +2 -2
  553. package/rest/support/ImagePixelLocationResult.d.ts +2 -2
  554. package/rest/support/ImageSample.d.ts +2 -2
  555. package/rest/support/ImageSampleParameters.d.ts +2 -2
  556. package/rest/support/ImageSampleResult.d.ts +2 -2
  557. package/rest/support/ImageToMapMultirayParameters.d.ts +3 -3
  558. package/rest/support/ImageToMapParameters.d.ts +3 -3
  559. package/rest/support/ImageUrlParameters.d.ts +3 -3
  560. package/rest/support/ImageUrlResult.d.ts +2 -2
  561. package/rest/support/ImageVolume.d.ts +2 -2
  562. package/rest/support/ImageVolumeParameters.d.ts +3 -3
  563. package/rest/support/ImageVolumeResult.d.ts +2 -2
  564. package/rest/support/JobInfo.d.ts +2 -2
  565. package/rest/support/LastMileDeliveryParameters.d.ts +3 -3
  566. package/rest/support/LegendLayer.d.ts +2 -2
  567. package/rest/support/LengthsParameters.d.ts +2 -2
  568. package/rest/support/LinearUnit.d.ts +2 -2
  569. package/rest/support/LocateSettingBase.d.ts +3 -3
  570. package/rest/support/LocateSettingSource.d.ts +3 -3
  571. package/rest/support/LocateSettings.d.ts +3 -3
  572. package/rest/support/LocateSettingsOverrides.d.ts +3 -3
  573. package/rest/support/LocationToAddressParameters.d.ts +2 -2
  574. package/rest/support/MapToImageParameters.d.ts +3 -3
  575. package/rest/support/MeasureAreaFromImageResult.d.ts +2 -2
  576. package/rest/support/MeasureFromImageParameters.d.ts +2 -2
  577. package/rest/support/MeasureLengthFromImageResult.d.ts +2 -2
  578. package/rest/support/NetworkUrl.d.ts +3 -3
  579. package/rest/support/NormalizationBinParametersMixin.d.ts +0 -1
  580. package/rest/support/OffsetParameters.d.ts +2 -2
  581. package/rest/support/ParameterValue.d.ts +4 -2
  582. package/rest/support/PointBarrier.d.ts +3 -3
  583. package/rest/support/PolygonBarrier.d.ts +3 -3
  584. package/rest/support/PolylineBarrier.d.ts +3 -3
  585. package/rest/support/ProjectParameters.d.ts +2 -2
  586. package/rest/support/QuantizationParameters.d.ts +2 -2
  587. package/rest/support/Query.d.ts +2 -2
  588. package/rest/support/RasterData.d.ts +2 -2
  589. package/rest/support/RelationParameters.d.ts +2 -2
  590. package/rest/support/RelationshipQuery.d.ts +2 -2
  591. package/rest/support/RouteInfo.d.ts +3 -3
  592. package/rest/support/RouteParameters.d.ts +3 -3
  593. package/rest/support/RouteResult.d.ts +2 -2
  594. package/rest/support/RouteSolveResult.d.ts +2 -2
  595. package/rest/support/ServiceAreaParameters.d.ts +3 -3
  596. package/rest/support/ServiceAreaSolveResult.d.ts +2 -2
  597. package/rest/support/StatisticDefinition.d.ts +2 -2
  598. package/rest/support/Stop.d.ts +3 -3
  599. package/rest/support/SuggestLocationsParameters.d.ts +2 -2
  600. package/rest/support/TimeUnit.d.ts +42 -0
  601. package/rest/support/TimeUnit.js +5 -0
  602. package/rest/support/TopFeaturesQuery.d.ts +2 -2
  603. package/rest/support/TopFilter.d.ts +2 -2
  604. package/rest/support/TravelMode.d.ts +3 -3
  605. package/rest/support/TrimExtendParameters.d.ts +2 -2
  606. package/rest/support/parameterValueUtils.js +1 -1
  607. package/rest/types.d.ts +1 -1
  608. package/rest/versionManagement/gdbVersion/support/AlterVersionParameters.d.ts +2 -2
  609. package/rest/versionManagement/gdbVersion/support/ReconcileParameters.d.ts +2 -2
  610. package/rest/versionManagement/support/CreateVersionParameters.d.ts +2 -2
  611. package/rest/versionManagement/support/GetVersionInfosParameters.d.ts +2 -2
  612. package/smartMapping/raster/support/adapters/ImageryLayerAdapter.js +1 -1
  613. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  614. package/statistics/types.d.ts +0 -1
  615. package/support/MapFloorInfo.d.ts +2 -2
  616. package/support/revision.js +1 -1
  617. package/symbols/Font.d.ts +2 -2
  618. package/symbols/LineStyleMarker3D.d.ts +3 -3
  619. package/symbols/LineSymbolMarker.d.ts +2 -2
  620. package/symbols/Symbol.d.ts +2 -2
  621. package/symbols/Symbol3DLayer.d.ts +2 -2
  622. package/symbols/callouts/Callout3D.d.ts +2 -2
  623. package/symbols/callouts/LineCallout3DBorder.d.ts +2 -2
  624. package/symbols/edges/Edges3D.d.ts +2 -2
  625. package/symbols/patterns/LinePattern3D.d.ts +2 -2
  626. package/symbols/patterns/Pattern3D.d.ts +2 -2
  627. package/symbols/support/ElevationInfo.d.ts +10 -4
  628. package/symbols/support/FeatureExpressionInfo.d.ts +2 -2
  629. package/symbols/support/IconSymbol3DLayerResource.d.ts +2 -2
  630. package/symbols/support/ObjectSymbol3DLayerResource.d.ts +2 -2
  631. package/symbols/support/OccludedVisibility.d.ts +3 -3
  632. package/symbols/support/Symbol3DFillMaterial.js +1 -1
  633. package/symbols/support/Symbol3DHalo.d.ts +2 -2
  634. package/symbols/support/Symbol3DIconOutline.d.ts +2 -2
  635. package/symbols/support/Symbol3DMaterial.d.ts +6 -4
  636. package/symbols/support/Symbol3DMaterial.js +1 -1
  637. package/symbols/support/Symbol3DOutline.d.ts +2 -2
  638. package/symbols/support/Symbol3DTextBackground.d.ts +3 -3
  639. package/symbols/support/Symbol3DVerticalOffset.d.ts +2 -2
  640. package/symbols/support/types.d.ts +0 -1
  641. package/tables/AttributeTableTemplate.d.ts +2 -2
  642. package/tables/elements/AttributeTableAttachmentElement.d.ts +2 -2
  643. package/tables/elements/AttributeTableElement.d.ts +2 -2
  644. package/tables/elements/AttributeTableFieldElement.d.ts +2 -2
  645. package/tables/elements/AttributeTableGroupElement.d.ts +2 -2
  646. package/tables/elements/AttributeTableRelationshipElement.d.ts +2 -2
  647. package/tables/support/FieldOrder.d.ts +3 -3
  648. package/time/TimeExtent.d.ts +2 -2
  649. package/time/TimeExtent.js +1 -1
  650. package/time/TimeInterval.d.ts +3 -3
  651. package/time/types.d.ts +0 -1
  652. package/versionManagement/VersionManagementService.d.ts +2 -2
  653. package/versionManagement/VersioningState.d.ts +2 -2
  654. package/versionManagement/support/type.d.ts +0 -1
  655. package/views/2d/ViewState.d.ts +2 -2
  656. package/views/2d/engine/imagery/RasterVFContainer.js +1 -1
  657. package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
  658. package/views/2d/engine/imagery/RasterVFTileContainer.js +1 -1
  659. package/views/2d/engine/rasterBrushes.js +1 -1
  660. package/views/2d/engine/webgl/shaderGraph/techniques/raster/VectorFieldTechnique.js +5 -0
  661. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/AspectTechnique.js +1 -1
  662. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BandArithmeticTechnique.js +1 -1
  663. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ColormapToRGBTechnique.js +1 -1
  664. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/CompositeBandTechnique.js +1 -1
  665. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ComputeChangeTechnique.js +1 -1
  666. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ContrastBrightnessTechnique.js +1 -1
  667. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ConvolutionTechnique.js +1 -1
  668. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/CurvatureTechnique.js +1 -1
  669. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ExtractBandTechnique.js +1 -1
  670. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/FocalStatisticsTechnique.js +1 -1
  671. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/GrayscaleTechnique.js +1 -1
  672. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/HillshadeTechnique.js +1 -1
  673. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/LocalTechnique.js +1 -1
  674. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/MaskTechnique.js +1 -1
  675. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/NDVITechnique.js +1 -1
  676. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/RemapTechnique.js +1 -1
  677. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ReprojectTechnique.js +1 -1
  678. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ShadedReliefTechnique.js +1 -1
  679. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/SlopeTechnique.js +1 -1
  680. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/StretchTechnique.js +1 -1
  681. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/MagDirShader.js +5 -0
  682. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/ScalarShader.js +5 -0
  683. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  684. package/views/2d/layers/MediaLayerView2D.js +1 -1
  685. package/views/2d/layers/TileLayerView2D.js +1 -1
  686. package/views/2d/layers/imagery/ImageryVFStrategy.js +1 -1
  687. package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
  688. package/views/2d/layers/support/MediaLayerInteractionOptions.d.ts +0 -1
  689. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  690. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  691. package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
  692. package/views/3d/analysis/Dimension/types.d.ts +0 -1
  693. package/views/3d/analysis/Slice/types.d.ts +0 -1
  694. package/views/3d/analysis/Viewshed/types.d.ts +0 -1
  695. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  696. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementRawResult.js +5 -0
  697. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementResult.d.ts +5 -1
  698. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementResult.js +1 -1
  699. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  700. package/views/3d/constraints/AltitudeConstraint.d.ts +2 -2
  701. package/views/3d/constraints/ClipDistanceConstraint.d.ts +2 -2
  702. package/views/3d/constraints/Constraints.d.ts +2 -2
  703. package/views/3d/constraints/TiltConstraint.d.ts +2 -2
  704. package/views/3d/environment/CloudyWeather.d.ts +2 -2
  705. package/views/3d/environment/EnvironmentManager.js +1 -1
  706. package/views/3d/environment/FoggyWeather.d.ts +2 -2
  707. package/views/3d/environment/RainyWeather.d.ts +2 -2
  708. package/views/3d/environment/SnowyWeather.d.ts +2 -2
  709. package/views/3d/environment/SunLighting.d.ts +2 -2
  710. package/views/3d/environment/SunnyWeather.d.ts +2 -2
  711. package/views/3d/environment/VirtualLighting.d.ts +2 -2
  712. package/views/3d/layers/ElevationLayerView3D.js +1 -1
  713. package/views/3d/layers/FlowSubView3D.js +1 -1
  714. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  715. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  716. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  717. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  718. package/views/3d/layers/graphics/emissiveUtils.js +5 -0
  719. package/views/3d/layers/support/layerUtils.js +1 -1
  720. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  721. package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
  722. package/views/3d/support/mathUtils.js +1 -1
  723. package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
  724. package/views/3d/support/supportedSpatialReference.js +1 -1
  725. package/views/3d/terrain/terrainUtils.js +1 -1
  726. package/views/3d/webgl/ManagedFBO.js +1 -1
  727. package/views/3d/webgl/ManagedFBOResource.d.ts +0 -1
  728. package/views/3d/webgl/RenderNode.d.ts +1 -1
  729. package/views/3d/webgl/RenderNode.js +1 -1
  730. package/views/3d/webgl/types.d.ts +0 -1
  731. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  732. package/views/3d/webgl-engine/core/shaderLibrary/util/EllipsoidMode.js +1 -1
  733. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  734. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  735. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  736. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  737. package/views/3d/webgl-engine/lib/CutFillColor.js +1 -1
  738. package/views/3d/webgl-engine/lib/CutFillDepth.js +1 -1
  739. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  740. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  741. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  742. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  743. package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +31 -23
  744. package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
  745. package/views/3d/webgl.d.ts +16 -8
  746. package/views/3d/webgl.js +1 -1
  747. package/views/Theme.d.ts +2 -2
  748. package/views/VideoView.d.ts +4 -4
  749. package/views/VideoView.js +1 -1
  750. package/views/View.d.ts +3 -3
  751. package/views/View2D.d.ts +2 -2
  752. package/views/ViewAnimation.d.ts +2 -2
  753. package/views/Viewport2DMixin.d.ts +0 -2
  754. package/views/analysis/ElevationProfile/ElevationProfileResult.d.ts +2 -2
  755. package/views/animation/types.d.ts +0 -1
  756. package/views/draw/CursorUpdateEvent.d.ts +0 -1
  757. package/views/draw/DrawAction.d.ts +3 -3
  758. package/views/draw/DrawCompleteEvent.d.ts +0 -1
  759. package/views/draw/VertexAddEvent.d.ts +0 -1
  760. package/views/draw/VertexRemoveEvent.d.ts +0 -1
  761. package/views/draw/support/managers/{DrawTooltipManager.js → TooltipManager.js} +1 -1
  762. package/views/draw/types.d.ts +0 -1
  763. package/views/input/ViewEvents.js +1 -1
  764. package/views/input/recognizers/VerticalTwoFingerDrag.js +1 -1
  765. package/views/input/types.d.ts +94 -0
  766. package/views/interactive/Tooltip.d.ts +2 -2
  767. package/views/interactive/tooltip/components/DrawHeaderActions.js +1 -1
  768. package/views/interactive/tooltip/types.d.ts +0 -1
  769. package/views/layers/ImageryTileLayerViewMixin.d.ts +0 -1
  770. package/views/layers/LayerView.d.ts +3 -3
  771. package/views/layers/SceneLayerView.js +1 -1
  772. package/views/layers/types.d.ts +0 -1
  773. package/views/navigation/types.d.ts +0 -1
  774. package/views/support/AttributionItem.d.ts +0 -1
  775. package/views/support/MeasurementWorker.js +1 -1
  776. package/views/support/MeasurementWorkerHandle.js +1 -1
  777. package/views/support/measurementUtils.js +1 -1
  778. package/views/support/screenUtils.js +1 -1
  779. package/views/ui/UI.d.ts +2 -2
  780. package/webdoc/GeotriggersInfo.d.ts +3 -3
  781. package/webdoc/IPSInfo.d.ts +3 -3
  782. package/webdoc/Widgets.d.ts +2 -2
  783. package/webdoc/applicationProperties/Search.d.ts +2 -2
  784. package/webdoc/applicationProperties/SearchLayer.d.ts +2 -2
  785. package/webdoc/applicationProperties/SearchLayerField.d.ts +2 -2
  786. package/webdoc/applicationProperties/SearchTable.d.ts +2 -2
  787. package/webdoc/applicationProperties/SearchTableField.d.ts +2 -2
  788. package/webdoc/applicationProperties/Viewing.d.ts +2 -2
  789. package/webdoc/geotriggersInfo/DeviceLocationFeed.d.ts +3 -3
  790. package/webdoc/geotriggersInfo/ExpressionInfo.d.ts +3 -3
  791. package/webdoc/geotriggersInfo/FeatureFenceParameters.d.ts +3 -3
  792. package/webdoc/geotriggersInfo/FeatureFilter.d.ts +3 -3
  793. package/webdoc/geotriggersInfo/FeatureLayerSource.d.ts +3 -3
  794. package/webdoc/geotriggersInfo/Geotrigger.d.ts +3 -3
  795. package/webdoc/geotriggersInfo/GeotriggerNotificationOptions.d.ts +3 -3
  796. package/webdoc/geotriggersInfo/support/typeUtils.d.ts +0 -1
  797. package/webdoc/ips/AppleIPSProperties.d.ts +3 -3
  798. package/webdoc/ips/Configuration.d.ts +3 -3
  799. package/webdoc/ips/GNSSProperties.d.ts +3 -3
  800. package/webdoc/ips/PathSnappingProperties.d.ts +3 -3
  801. package/webdoc/ips/PositioningService.d.ts +3 -3
  802. package/webdoc/ips/SmoothingProperties.d.ts +3 -3
  803. package/webdoc/support/SlideThumbnail.d.ts +3 -3
  804. package/webdoc/support/types.d.ts +0 -1
  805. package/webdoc/widgets/FloorFilter.d.ts +2 -2
  806. package/webdoc/widgets/TimeSlider.d.ts +2 -2
  807. package/webmap/ApplicationProperties.d.ts +2 -2
  808. package/webmap/Bookmark.d.ts +2 -2
  809. package/webmap/InitialViewProperties.d.ts +2 -2
  810. package/webmap/background/ColorBackground.d.ts +2 -2
  811. package/webscene/ApplicationProperties.d.ts +2 -2
  812. package/webscene/Environment.d.ts +2 -2
  813. package/webscene/InitialViewProperties.d.ts +3 -3
  814. package/webscene/Presentation.d.ts +3 -3
  815. package/webscene/Slide.d.ts +4 -4
  816. package/webscene/SlideLegendInfo.d.ts +3 -3
  817. package/webscene/SunLighting.d.ts +2 -2
  818. package/webscene/VirtualLighting.d.ts +2 -2
  819. package/webscene/background/Background.d.ts +2 -2
  820. package/webscene/support/Description.d.ts +3 -3
  821. package/webscene/support/FeatureReference.d.ts +3 -3
  822. package/webscene/support/FeatureReferenceId.d.ts +3 -3
  823. package/webscene/support/LayerReference.d.ts +3 -3
  824. package/webscene/support/SlideElements.d.ts +3 -3
  825. package/webscene/support/SlideEnvironment.d.ts +3 -3
  826. package/webscene/support/SlideGround.d.ts +3 -3
  827. package/webscene/support/SlidePopupInfo.d.ts +3 -3
  828. package/webscene/support/SlideVisibleLayer.d.ts +3 -3
  829. package/webscene/support/Title.d.ts +3 -3
  830. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  831. package/widgets/AreaMeasurement2D.d.ts +1 -0
  832. package/widgets/AreaMeasurement2D.js +1 -1
  833. package/widgets/Attachments/types.d.ts +0 -1
  834. package/widgets/BasemapGallery/support/PortalBasemapsSource.d.ts +2 -2
  835. package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +2 -2
  836. package/widgets/BasemapLayerList/types.d.ts +0 -1
  837. package/widgets/BasemapLayerList.d.ts +1 -0
  838. package/widgets/BasemapLayerList.js +1 -1
  839. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +2 -2
  840. package/widgets/Bookmarks/BookmarksViewModel.d.ts +2 -2
  841. package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +2 -2
  842. package/widgets/CatalogLayerList/types.d.ts +0 -1
  843. package/widgets/CatalogLayerList.d.ts +1 -0
  844. package/widgets/CatalogLayerList.js +1 -1
  845. package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +2 -2
  846. package/widgets/Daylight/DaylightViewModel.d.ts +2 -2
  847. package/widgets/Daylight/types.d.ts +0 -1
  848. package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +2 -2
  849. package/widgets/DirectionalPad/types.d.ts +0 -1
  850. package/widgets/Directions/DirectionsViewModel.d.ts +2 -2
  851. package/widgets/Directions.d.ts +1 -0
  852. package/widgets/Directions.js +1 -1
  853. package/widgets/DistanceMeasurement2D.d.ts +1 -0
  854. package/widgets/DistanceMeasurement2D.js +1 -1
  855. package/widgets/Editor/EditorViewModel.d.ts +2 -2
  856. package/widgets/Editor/UpdateFeaturesWorkflowData.d.ts +2 -2
  857. package/widgets/Editor/Workflow.d.ts +2 -2
  858. package/widgets/Editor.d.ts +1 -0
  859. package/widgets/Editor.js +1 -1
  860. package/widgets/ElevationProfile/ElevationProfileLine.d.ts +2 -2
  861. package/widgets/FeatureForm/FeatureFormViewModel.d.ts +3 -3
  862. package/widgets/FeatureForm.d.ts +1 -0
  863. package/widgets/FeatureForm.js +1 -1
  864. package/widgets/FeatureTable/Grid/GridViewModel.d.ts +2 -2
  865. package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +3 -3
  866. package/widgets/FeatureTable/support/EditableColumnTemplateMixin.d.ts +0 -1
  867. package/widgets/FeatureTable/support/TableTemplate.d.ts +3 -3
  868. package/widgets/FeatureTable.d.ts +1 -0
  869. package/widgets/FeatureTable.js +1 -1
  870. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.d.ts +2 -2
  871. package/widgets/Features/FeaturesViewModel.d.ts +2 -2
  872. package/widgets/FloorFilter.d.ts +1 -0
  873. package/widgets/FloorFilter.js +1 -1
  874. package/widgets/Histogram/types.d.ts +0 -1
  875. package/widgets/HistogramRangeSlider/types.d.ts +0 -1
  876. package/widgets/Home/HomeViewModel.d.ts +2 -2
  877. package/widgets/Home.d.ts +1 -2
  878. package/widgets/LayerList/LayerListViewModel.d.ts +2 -2
  879. package/widgets/LayerList.d.ts +1 -0
  880. package/widgets/LayerList.js +1 -1
  881. package/widgets/LinkChartLayoutSwitcher/LinkChartLayoutSwitcherViewModel.d.ts +2 -2
  882. package/widgets/Measurement/types.d.ts +0 -1
  883. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.d.ts +3 -3
  884. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  885. package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
  886. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  887. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  888. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  889. package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
  890. package/widgets/OrientedImageryViewer/components/OverlayLayersListViewModel.js +1 -1
  891. package/widgets/OrientedImageryViewer/services/TransformationService.js +5 -0
  892. package/widgets/OrientedImageryViewer/support/dataCaptureUtils.js +5 -0
  893. package/widgets/OrientedImageryViewer/support/geometryUtils.js +5 -0
  894. package/widgets/OrientedImageryViewer/support/typeUtils.js +5 -0
  895. package/widgets/OrientedImageryViewer/types.d.ts +0 -1
  896. package/widgets/Print/CustomTemplate.d.ts +2 -2
  897. package/widgets/Print/PrintViewModel.d.ts +3 -3
  898. package/widgets/ScaleRangeSlider/types.d.ts +0 -1
  899. package/widgets/ScaleRangeSlider.d.ts +1 -0
  900. package/widgets/ScaleRangeSlider.js +1 -1
  901. package/widgets/Search/SearchSource.d.ts +2 -2
  902. package/widgets/Search/SearchViewModel.d.ts +3 -4
  903. package/widgets/ShadowCast/types.d.ts +0 -1
  904. package/widgets/Sketch/SketchViewModel.d.ts +2 -2
  905. package/widgets/Sketch.d.ts +1 -0
  906. package/widgets/Sketch.js +1 -1
  907. package/widgets/Swipe/types.d.ts +0 -1
  908. package/widgets/TableList/TableListViewModel.d.ts +2 -2
  909. package/widgets/TableList.d.ts +1 -0
  910. package/widgets/TableList.js +1 -1
  911. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +2 -2
  912. package/widgets/TimeSlider.d.ts +1 -0
  913. package/widgets/TimeSlider.js +1 -1
  914. package/widgets/Track/types.d.ts +0 -1
  915. package/widgets/UtilityNetworkAssociations.d.ts +1 -0
  916. package/widgets/UtilityNetworkAssociations.js +1 -1
  917. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.d.ts +2 -2
  918. package/widgets/UtilityNetworkTrace.d.ts +1 -0
  919. package/widgets/UtilityNetworkTrace.js +1 -1
  920. package/widgets/UtilityNetworkValidateTopology.d.ts +1 -0
  921. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  922. package/widgets/ValuePicker/types.d.ts +0 -1
  923. package/widgets/ValuePicker.d.ts +1 -0
  924. package/widgets/ValuePicker.js +1 -1
  925. package/widgets/Weather/types.d.ts +0 -1
  926. package/widgets/Widget.d.ts +3 -3
  927. package/widgets/support/GeolocationPositioning.d.ts +2 -2
  928. package/widgets/support/GridControls/GridControlsViewModel.d.ts +2 -2
  929. package/widgets/support/GridControls/types.d.ts +0 -1
  930. package/widgets/support/forms/types.d.ts +0 -1
  931. package/widgets/types.d.ts +1 -2
  932. package/assets/esri/core/workers/chunks/00e135dc1b4cb024973d.js +0 -1
  933. package/assets/esri/core/workers/chunks/03da31c7635d077e8d99.js +0 -1
  934. package/assets/esri/core/workers/chunks/185c97bc63ce546995ce.js +0 -1
  935. package/assets/esri/core/workers/chunks/1a13b472e0cf9f88e8de.js +0 -1
  936. package/assets/esri/core/workers/chunks/1a62c456e791c82050fe.js +0 -1
  937. package/assets/esri/core/workers/chunks/25dead73dfc5a4c19285.js +0 -1
  938. package/assets/esri/core/workers/chunks/2767b69085c9f7a1e1af.js +0 -1
  939. package/assets/esri/core/workers/chunks/3606fc5537c4d11b9554.js +0 -1
  940. package/assets/esri/core/workers/chunks/3ad7ec46adecf00ae1c2.js +0 -1
  941. package/assets/esri/core/workers/chunks/3b67aa46a60e35469bf8.js +0 -1
  942. package/assets/esri/core/workers/chunks/43e9eaedf65921b58eb2.js +0 -1
  943. package/assets/esri/core/workers/chunks/4b09d92c51c4619b548a.js +0 -1
  944. package/assets/esri/core/workers/chunks/4caec60ac0a5851730c6.js +0 -1
  945. package/assets/esri/core/workers/chunks/5119e3159617b8e1ea13.js +0 -1
  946. package/assets/esri/core/workers/chunks/52684c2abc9e8ce793cf.js +0 -1
  947. package/assets/esri/core/workers/chunks/532935f420ed5f13c011.js +0 -1
  948. package/assets/esri/core/workers/chunks/5348e4dc55428de9bba7.js +0 -1
  949. package/assets/esri/core/workers/chunks/53a1c6e008287d1f12f0.js +0 -1
  950. package/assets/esri/core/workers/chunks/59d3f3fbae775fd7686e.js +0 -1
  951. package/assets/esri/core/workers/chunks/5a706eecd8a988fae6b7.js +0 -1
  952. package/assets/esri/core/workers/chunks/5ba2bbbb42ef1920579d.js +0 -1
  953. package/assets/esri/core/workers/chunks/5cc731f161012b63c77a.js +0 -1
  954. package/assets/esri/core/workers/chunks/5fa8fe6353dbdda0b06a.js +0 -1
  955. package/assets/esri/core/workers/chunks/5fc6cada83bf8462d54c.js +0 -1
  956. package/assets/esri/core/workers/chunks/6107b58457a70c8de9da.js +0 -1
  957. package/assets/esri/core/workers/chunks/654eef3ad30f34c42e12.js +0 -1
  958. package/assets/esri/core/workers/chunks/7130b09300032d3a5925.js +0 -1
  959. package/assets/esri/core/workers/chunks/7a1ec6ac88d974cc5074.js +0 -1
  960. package/assets/esri/core/workers/chunks/7f76566d9b3801742387.js +0 -1
  961. package/assets/esri/core/workers/chunks/7f7c4ffbdf7b20dc7a54.js +0 -1
  962. package/assets/esri/core/workers/chunks/81e395a93c67749c6487.js +0 -1
  963. package/assets/esri/core/workers/chunks/8deae3a426eceae73186.js +0 -1
  964. package/assets/esri/core/workers/chunks/97ad3eb25ad003c16148.js +0 -1
  965. package/assets/esri/core/workers/chunks/9919b3c345785e910c38.js +0 -1
  966. package/assets/esri/core/workers/chunks/a4ee92867ad5cde25aed.js +0 -1
  967. package/assets/esri/core/workers/chunks/a56a5e00964d4cd59a66.js +0 -1
  968. package/assets/esri/core/workers/chunks/a774b4fc7df801503bea.js +0 -1
  969. package/assets/esri/core/workers/chunks/ab3e457c82fa9bd0203f.js +0 -1
  970. package/assets/esri/core/workers/chunks/ac0949ea3d2cf3eb7383.js +0 -1
  971. package/assets/esri/core/workers/chunks/af3d4eba6fe24db3ceba.js +0 -1
  972. package/assets/esri/core/workers/chunks/b1015e1f25b60c08d2cf.js +0 -1
  973. package/assets/esri/core/workers/chunks/b1085fa91724e2d3b24f.js +0 -1
  974. package/assets/esri/core/workers/chunks/b48b0f512a1cd7226bdc.js +0 -1
  975. package/assets/esri/core/workers/chunks/bbb409e54db77bfabdee.js +0 -1
  976. package/assets/esri/core/workers/chunks/c0265669fb616f052b65.js +0 -1
  977. package/assets/esri/core/workers/chunks/c18a2948ae3cb527d8bb.js +0 -1
  978. package/assets/esri/core/workers/chunks/d3c69c9cb3d9c3f5c67a.js +0 -1
  979. package/assets/esri/core/workers/chunks/d477def8bfd8482596d1.js +0 -1
  980. package/assets/esri/core/workers/chunks/d4f4c0201d8b641709c0.js +0 -1
  981. package/assets/esri/core/workers/chunks/dd30c1f5da0af72becd1.js +0 -1
  982. package/assets/esri/core/workers/chunks/dedd9d47ccc019ffc484.js +0 -1
  983. package/assets/esri/core/workers/chunks/dfef6e3d7bbf099de498.js +0 -1
  984. package/assets/esri/core/workers/chunks/ecf7d34b37ce6f0877af.js +0 -1
  985. package/assets/esri/core/workers/chunks/f3fdf9970b3c7acd071d.js +0 -1
  986. package/layers/support/ElevationTileData.d.ts +0 -32
  987. package/rest/geoprocessor/execute.d.ts +0 -6
  988. package/views/2d/engine/imagery/BrushVectorField.js +0 -5
  989. package/views/3d/analysis/AreaMeasurement/support/utils.js +0 -5
  990. package/views/3d/analysis/VolumeMeasurement/volumeMeasurementUtils.js +0 -5
  991. package/widgets/OrientedImageryViewer/dataCaptureUtils.js +0 -5
  992. /package/layers/buildingSublayers/{utils.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{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{length as n,negate as l,copy as c,multiply as h,add as d,set as m}from"../../../../core/libs/gl-matrix-2/math/vec3.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 w}from"../../../../geometry/support/aaBoundingBox.js";import{getEmissiveMode as L}from"../../../../symbols/support/materialUtils.js";import{defaultObjectPrimitive as O}from"../../../../symbols/support/primitives.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=L(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),w=await this._createLodRenderer(m,s);return new oe(m,w,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,w(e)),l(r,r);break;case"top":{const t=w(e);m(r,-t[0],-t[1],-e[5]);break}case"bottom":{const t=w(e);m(r,-t[0],-t[1],-e[2]);break}case"relative":{const t=w(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};
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{length as n,negate as l,copy as c,multiply as h,add as d,set as m}from"../../../../core/libs/gl-matrix-2/math/vec3.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 w}from"../../../../geometry/support/aaBoundingBox.js";import{getEmissiveMode as L}from"../../../../symbols/support/materialUtils.js";import{defaultObjectPrimitive as U}from"../../../../symbols/support/primitives.js";import{objectSymbolLayerPrimitiveBoundingBox as O,objectSymbolLayerSizeWithResourceSize as E}from"../../../../symbols/support/symbolLayerUtils3D.js";import{estimateNumVerticesForLods as j,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{preparePatchEmissiveStrength as V}from"./emissiveUtils.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(e,t){const s=this.symbolLayer,r=R(O(e)),i=u(S(r)),a=u(E(i,s)),o=n(a),l=!1,c=!1,h=s?.material,d={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,mrrFactors:oe,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 re(f.verticalOffset),d.castShadows=!1),this._context.screenSizePerspectiveEnabled&&(d.screenSizePerspective=this.view.screenSizePerspective.parameters),this._hasDrivenColorOrOpacity?d.externalColor=I:d.externalColor=this._materialColor?.toUnitRGBA()??g,this._fastUpdates=X(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 ae(d,this._context);y.setParameters({cullFace:me(y.transparent)});const _=J(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 ne(_,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=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: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=L(l?.emissive?.source??"emissive");const c=await N(e,i),h=c.isEsriSymbolResource,d=c.isWosr,m=W(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(E(b,this.symbolLayer)),x=n(P),R=this._fastUpdates;Y(R,this._context.renderer,this._fastVisualVariableConvertOptions(g,P,b,v))&&_.forEach(e=>e.setParameters(R.materialParameters));const C=await this._createStageResources(m,o,s),w=await this._createLodRenderer(m,s);return new ne(m,w,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 ie({symbol:e,metadata:r,shaderTransformation:i?{applyTransform:(e,t,s)=>{e.getFeatureAttribute(t,ye),a(s,se(i.materialParameters,ye,s))},scaleFactor:(e,t,s)=>{t.getFeatureAttribute(s,ye),te(e,i.materialParameters,ye)}}: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=I,!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=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,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(!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=j(e.levels),s=e.computeUsedMemory(),r={...T(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(x(t,ue,this._context.elevationProvider.spatialReference),null!=o&&!C(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,B,r,this._context.stage.view.state.highlightOrderMap);return n&&(u.alignedSampledElevation=_e.sampledElevation),u.needsElevationUpdates=G(r.mode),$(u,t,this._context.elevationProvider),u}_computeGlobalTransform(e,t,s,r){return D(e,this._context.elevationProvider,t,this._context.renderCoordsHelper,r),ue[0]=e.x,ue[1]=e.y,ue[2]=r.z,P(e.spatialReference,ue,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=H(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),this._preparePatchEmissive(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=u(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(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:me(t.transparent)})}})}_preparePatchEmissive(e,t){return V(e,t,e=>{this._resources?.stageResources.materials.forEach(t=>t.setParameters({emissiveStrengthFromSymbol:e??(this._isPrimitive?0:1)}))},this.view.stage.renderView.renderingContext.driverTest.floatBufferBlend.result)}_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&&i(s,s,r)}_fastVisualVariableConvertOptions(e,t,s,r){const i=null!=e?u(S(e)):p,a=null!=e?ce(e,r,this.symbolLayer):y,o=this._context.renderCoordsHelper.unitInMeters,n=H(null!=t?t:void 0,t,s,o),l=_(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??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??U}_getFallbackOpacityAndColor(){return this._materialColor?.toUnitRGBA()??(this._isPrimitive?g:I)}get _materialColor(){return this.symbolLayer.material?.color}}function ce(e,t,s){const r=f();switch(s.anchor){case"center":c(r,w(e)),l(r,r);break;case"top":{const t=w(e);m(r,-t[0],-t[1],-e[5]);break}case"bottom":{const t=w(e);m(r,-t[0],-t[1],-e[2]);break}case"relative":{const t=w(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 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=f(),pe=o(),fe=o(),ye=v(),_e=new z;export{le as Graphics3DObjectSymbolLayer};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
+ */
5
+ function e(e,t,i,s){if(!s||!t.material||"partial"!==t.material.type||!t.material.diff)return;const r=t.material.diff;if(!r.emissive)return;const a=r.emissive.type;if("collection"===a||"complete"===a)return;const l=r.emissive.diff,m=l?.strength,n=l?.source;l&&!n&&m&&"complete"===m.type&&(e.symbolLayerStatePatches.push(()=>{i(m.newValue)}),delete r.emissive)}export{e as preparePatchEmissiveStrength};
@@ -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
- function t(t){return"fill"===t.type}function e(t){return"extrude"===t.type}export{e as isExtrudeSymbol3DLayer,t as isFillSymbol3DLayer};
5
+ function t(t){return"fill"===t?.type}function n(t){return"extrude"===t?.type}function e(t){return"object"===t?.type}function r(r){return e(r)||n(r)||t(r)}export{n as isExtrudeSymbol3DLayer,t as isFillSymbol3DLayer,e as isObjectSymbol3DLayer,r as supportsEmissive};
@@ -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{watch as t,when as s,syncAndInitial as i,sync as l}from"../../../../core/reactiveUtils.js";import{throttle as a}from"../../../../core/throttle.js";import{property as r,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{clone as n,create as d}from"../../../../geometry/support/aaBoundingRect.js";import{toFlowData as h}from"../../../2d/engine/flow/dataUtils.js";import u from"../../layers/FlowSubView3D.js";import{getFeatureTileId as p}from"../../layers/support/FeatureTileDescriptor.js";import{tilesWaitingTime as c}from"./constants.js";import{FlowDataTile as f}from"./loadUtils.js";import{isRasterTile as T}from"../../terrain/TerrainData.js";import{descendantsAtLevel as g}from"../../terrain/tileUtils.js";const _={type:"delete"},y={type:"invalid"};let D=class extends u{constructor(e){super(e),this._flowDataTiles=m(),this._resetTileData=!0,this._flowDataTilesSet=!1,this._throttledTriggerLoad=null,this._throttling=!1}initialize(){this.addHandles([this.surface.on("tile-data-changed",({tile:e,layerIndex:t,layerClass:s})=>{if(t!==this._layerIndex||1!==s)return;const i=this.frameTask.schedule(()=>{this._applyTileDataUpdate(e)&&this.triggerLoad()});this.updatingHandles.addPromise(i)}),t(()=>this.renderedTiles,e=>{const t=this.frameTask.scheduleGenerator(this.loadAllTiles?t=>this._applyTileDataUpdates(e,t):t=>this._syncToTiles(e,t));this.updatingHandles.addPromise(t)},i),s(()=>null!=this.renderedTiles&&null!=this.extent&&this.loadAllTiles,()=>{const e=this.frameTask.scheduleGenerator(e=>this._enterAllTilesMode(e));this.updatingHandles.addPromise(e)},i),t(()=>this._pixelSize,()=>{this.invalidateTileData(),this._resetTileData=!0},l),this.layerView.on("data-changed",()=>{this.invalidateTileData(),this._resetTileData=!0})]),this._throttledTriggerLoad=a(()=>{super.triggerLoad(),this._throttling=!1},()=>this._throttling=!0,c,this),this.addHandles(this._throttledTriggerLoad)}*_enterAllTilesMode(e){const{targetTiles:t,_flowDataTiles:s}=this,i=m();for(const[l,a]of s)t.has(l)&&i.set(l,a);this._setFlowDataTiles(i),e.madeProgress(),e.done&&(e=yield),yield*this._applyTileDataUpdates(new Set(this.surface.allTiles),e),this.triggerLoad()}*_syncToTiles(e,t){const s=m();for(const i of e??[]){const e=this._flowDataTiles.get(i.key),l=null==e||"delete"===e.type||"invalid"===e.type?this._getLoadedState(i):e;null!=l&&s.set(i.key,l),t.madeProgress(),t.done&&(t=yield)}this._setFlowDataTiles(s),this.triggerLoad()}*_applyTileDataUpdates(e,t){let s=!1;for(const i of e??[]){const e=this._applyTileDataUpdate(i);s||=e,t.madeProgress(),t.done&&(t=yield)}s&&this.triggerLoad()}abort(){super.abort(),this._throttling=!1}get _layerIndex(){return this.surface.getLayerIndexByUID(1,this.layerView.uid)}get _pixelSize(){return this.surface.tilingScheme.pixelSize}doRefresh(){this.invalidateTileData(),super.doRefresh()}triggerLoad(){const{_throttledTriggerLoad:e}=this;this._allTilesLoaded?(e.hasPendingUpdates()||e(),e.forceUpdate()):e()}async fetchDataAndGenerateStreamlines(e,t){const{_flowDataTiles:s,needsMagnitude:i,workerHandle:l}=this,a=this.getSimulationSettings(e);if(null==a||null==l||0===s.size)return;const r=this._resetTileData;this._resetTileData=!1;const o=m();s.forEach((e,t)=>{"delete"===e.type?(o.set(t,_),s.delete(t)):(r||"on-worker"!==e.type&&"invalid"!==e.type)&&(o.set(t,e),s.set(t,"invalid"===e.type?y:{type:"on-worker",sourceLevel:e.sourceLevel}))});const n={simulationSettings:a,flowExtentInfo:e.flowExtentInfo,flowDataTiles:o,reset:r,needsMagnitude:i,startPositions:this.startPositions(e)},{streamlines:d}=await l.generateTiledStreamlines(n,t);return d}getUpdating(){return super.getUpdating()||this._throttling}get loadRequirementsMet(){return super.loadRequirementsMet&&this._flowDataTilesSet}_getLoadedState(e){const{_layerIndex:t}=this,s=e.isDisposed;if(null==t||s)return null;const i=e.getLayerInfo(t,1);if(null==i)return null;const l=this._getRasterTile(i,e,t);return null==l?this._upsampleFlowData(t,i.upsampleInfo,e.lij,e.extent):{type:"loaded",data:this._createFlowDataTile(l,e.lij,e.extent,this._pixelSize),sourceLevel:e.level}}_upsampleFlowData(e,t,s,i){if(null==t)return null;const l=t.tile;if(null==l)return null;const a=l.getLayerInfo(e,1);if(null==a)return null;const r=this._getRasterTile(a,l,e);if(null==r)return null;const{scale:o,offset:n}=t,d=Math.max(Math.floor(this._pixelSize*o),1),h=r.source,u=Math.floor(n[0]*h.width),p=Math.floor((1-n[1]-o)*h.height);return{type:"loaded",data:this._createFlowDataTile(r,s,i,d,u,p),sourceLevel:l.level}}_getRasterTile(e,t,s){const{data:i}=e;return!e.dataMissing&&t.hasLayerData(s,1)&&T(i)?i:null}_createFlowDataTile(e,t,s,i,l,a){const r=h(this.layer.serviceRasterInfo.dataType,e.source,i,i,l,a),o=r.mask.slice();return new f(r.data,o,r.width,r.height,t,n(s))}_applyTileDataUpdate(e){const{renderedTiles:t,_layerIndex:s,loadAllTiles:i,loadAllTilesLevel:l}=this;if(null==t||null==s||i&&e.level>l)return!1;if(t.has(e))return this._updateRenderedTile(e);const a=e.key;let r=this._setTileData(a,_);const o=this._updateUpsampledTiles(t,e,s);r||=o;const n=i&&this._updateDescendants(e,s);return r||=n,r}_updateRenderedTile(e){const t=e.key,{_flowDataTiles:s}=this;if(w(s.get(t),e))return!1;const i=this._getLoadedState(e);return this._setTileData(t,i)}_updateUpsampledTiles(e,t,s){const{_flowDataTiles:i}=this;let l=!1;for(const a of e.values()){const e=a.key;if(w(i.get(e),t))continue;const r=a.getLayerInfo(s,1);if(null==r)continue;if(null!=this._getRasterTile(r,a,s))continue;const o=r.upsampleInfo?.tile;if(o!==t)continue;const n=this._getLoadedState(a),d=this._setTileData(e,n);l||=d}return l}_updateDescendants(e,t){let s=!1;const{tilingScheme:i,upsampleInfoPool:l}=this.surface,{targetTiles:a,_flowDataTiles:r,loadAllTilesLevel:o}=this,n=e.lij,h=g(n,o).map(e=>[p(e[0],e[1],e[2]),e]).filter(([e])=>a.has(e));if(0===h.length)return s;const u=1<<o-n[0],c=1/u,f=n[1]*u,T=n[2]*u,_=l.acquire();for(const[p,g]of h){if(w(r.get(p),e))continue;const l=d();i.getExtent(g[0],g[1],g[2],l);const a=1-(g[1]-f)*c-c,o=(g[2]-T)*c;_.init(e,o,a,c);const n=this._upsampleFlowData(t,_,g,l),h=this._setTileData(p,n);s||=h}return l.release(_),s}_setTileData(e,t){if(null==t)return!1;const{_flowDataTiles:s}=this;return(null!=s.get(e)||"delete"!==t.type)&&(s.set(e,t),!0)}_setFlowDataTiles(e){this._flowDataTiles=e,this._resetTileData=!0,this._flowDataTilesSet=!0}get _allTilesLoaded(){let e=0;for(const t of this._flowDataTiles.values()??[])"delete"!==t.type&&"invalid"!==t.type&&e++;return this.loadAllTiles?e===this.targetTiles.size:e===this.renderedTiles?.size}invalidateTileData(){const{_flowDataTiles:e}=this;for(const t of e.keys())e.set(t,y)}get usedMemory(){const e=9*this._pixelSize**2,t=(this._flowDataTiles.size??0)*e;return super.usedMemory+t}get test(){return{...super.test,loadedTiles:this._flowDataTiles}}};function m(){return new Map}function w(e,t){return null!=e&&("loaded"===e.type||"on-worker"===e.type)&&e.sourceLevel>=t.level}e([r()],D.prototype,"_throttling",void 0),D=e([o("esri.views.3d.support.flow.FlowSubViewTiles3D")],D);export{D as default};
5
+ import{__decorate as e}from"tslib";import{watch as t,when as s,syncAndInitial as i,sync as l}from"../../../../core/reactiveUtils.js";import{throttle as a}from"../../../../core/throttle.js";import{property as r,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{clone as n,create as d}from"../../../../geometry/support/aaBoundingRect.js";import{toFlowData as h}from"../../../2d/engine/flow/dataUtils.js";import u from"../../layers/FlowSubView3D.js";import{getFeatureTileId as p}from"../../layers/support/FeatureTileDescriptor.js";import{tilesWaitingTime as c}from"./constants.js";import{FlowDataTile as f}from"./loadUtils.js";import{isRasterTile as T}from"../../terrain/TerrainData.js";import{descendantsAtLevel as _}from"../../terrain/tileUtils.js";const g={type:"delete"},D={type:"invalid"};let y=class extends u{constructor(e){super(e),this._flowDataTiles=m(),this._flowDataTilesSet=!1,this._throttledTriggerLoad=null,this._throttling=!1,this._resetTileData=!0}initialize(){this.addHandles([this.surface.on("tile-data-changed",({tile:e,layerIndex:t,layerClass:s})=>{if(t!==this._layerIndex||1!==s)return;const i=this.frameTask.schedule(()=>{this._applyTileDataUpdate(e)&&this.triggerLoad()});this.updatingHandles.addPromise(i)}),t(()=>this.renderedTiles,e=>{const t=this.frameTask.scheduleGenerator(this.loadAllTiles?t=>this._applyTileDataUpdates(e,t):t=>this._syncToTiles(e,t));this.updatingHandles.addPromise(t)},i),s(()=>null!=this.renderedTiles&&null!=this.extent&&this.loadAllTiles,()=>{const e=this.frameTask.scheduleGenerator(e=>this._enterAllTilesMode(e));this.updatingHandles.addPromise(e)},i),t(()=>this._pixelSize,()=>{this.invalidateTileData(),this._resetTileData=!0},l),this.layerView.on("data-changed",()=>{this.invalidateTileData(),this._resetTileData=!0})]),this._throttledTriggerLoad=a(()=>{super.triggerLoad(),this._throttling=!1},()=>this._throttling=!0,c,this),this.addHandles(this._throttledTriggerLoad)}*_enterAllTilesMode(e){const{targetTiles:t,_flowDataTiles:s}=this,i=m();for(const[l,a]of s)t.has(l)&&i.set(l,a);this._setFlowDataTiles(i),e.madeProgress(),e.done&&(e=yield),yield*this._applyTileDataUpdates(new Set(this.surface.allTiles),e),this.triggerLoad()}*_syncToTiles(e,t){const s=m();for(const i of e??[]){const e=this._flowDataTiles.get(i.key),l=null==e||"delete"===e.type||"invalid"===e.type?this._getLoadedState(i):e;null!=l&&s.set(i.key,l),t.madeProgress(),t.done&&(t=yield)}this._setFlowDataTiles(s),this.triggerLoad()}*_applyTileDataUpdates(e,t){let s=!1;for(const i of e??[]){const e=this._applyTileDataUpdate(i);s||=e,t.madeProgress(),t.done&&(t=yield)}s&&this.triggerLoad()}abort(){super.abort(),this._throttling=!1}get _layerIndex(){return this.surface.getLayerIndexByUID(1,this.layerView.uid)}get _pixelSize(){return this.surface.tilingScheme.pixelSize}doRefresh(){this.invalidateTileData(),super.doRefresh()}triggerLoad(){const{_throttledTriggerLoad:e}=this;this._allTilesLoaded?(e.hasPendingUpdates()||e(),e.forceUpdate()):e()}async fetchDataAndGenerateStreamlines(e,t){const{_flowDataTiles:s,needsMagnitude:i,workerHandle:l}=this,a=this.getSimulationSettings(e);if(null==a||null==l||0===s.size)return;const r=this._resetTileData;this._resetTileData=!1;const o=m();s.forEach((e,t)=>{"delete"===e.type?(o.set(t,g),s.delete(t)):(r||"on-worker"!==e.type&&"invalid"!==e.type)&&(o.set(t,e),s.set(t,"invalid"===e.type?D:{type:"on-worker",sourceLevel:e.sourceLevel}))});const n={simulationSettings:a,flowExtentInfo:e.flowExtentInfo,flowDataTiles:o,reset:r,needsMagnitude:i,startPositions:this.startPositions(e)},{streamlines:d}=await l.generateTiledStreamlines(n,t);return d}hasWork(){return super.hasWork()||this._throttling||this._resetTileData}get loadRequirementsMet(){return super.loadRequirementsMet&&this._flowDataTilesSet}_getLoadedState(e){const{_layerIndex:t}=this,s=e.isDisposed;if(null==t||s)return null;const i=e.getLayerInfo(t,1);if(null==i)return null;const l=this._getRasterTile(i,e,t);return null==l?this._upsampleFlowData(t,i.upsampleInfo,e.lij,e.extent):{type:"loaded",data:this._createFlowDataTile(l,e.lij,e.extent,this._pixelSize),sourceLevel:e.level}}_upsampleFlowData(e,t,s,i){if(null==t)return null;const l=t.tile;if(null==l)return null;const a=l.getLayerInfo(e,1);if(null==a)return null;const r=this._getRasterTile(a,l,e);if(null==r)return null;const{scale:o,offset:n}=t,d=Math.max(Math.floor(this._pixelSize*o),1),h=r.source,u=Math.floor(n[0]*h.width),p=Math.floor((1-n[1]-o)*h.height);return{type:"loaded",data:this._createFlowDataTile(r,s,i,d,u,p),sourceLevel:l.level}}_getRasterTile(e,t,s){const{data:i}=e;return!e.dataMissing&&t.hasLayerData(s,1)&&T(i)?i:null}_createFlowDataTile(e,t,s,i,l,a){const r=h(this.layer.serviceRasterInfo.dataType,e.source,i,i,l,a),o=r.mask.slice();return new f(r.data,o,r.width,r.height,t,n(s))}_applyTileDataUpdate(e){const{renderedTiles:t,_layerIndex:s,loadAllTiles:i,loadAllTilesLevel:l}=this;if(null==t||null==s||i&&e.level>l)return!1;if(t.has(e))return this._updateRenderedTile(e);const a=e.key;let r=this._setTileData(a,g);const o=this._updateUpsampledTiles(t,e,s);r||=o;const n=i&&this._updateDescendants(e,s);return r||=n,r}_updateRenderedTile(e){const t=e.key,{_flowDataTiles:s}=this;if(w(s.get(t),e))return!1;const i=this._getLoadedState(e);return this._setTileData(t,i)}_updateUpsampledTiles(e,t,s){const{_flowDataTiles:i}=this;let l=!1;for(const a of e.values()){const e=a.key;if(w(i.get(e),t))continue;const r=a.getLayerInfo(s,1);if(null==r)continue;if(null!=this._getRasterTile(r,a,s))continue;const o=r.upsampleInfo?.tile;if(o!==t)continue;const n=this._getLoadedState(a),d=this._setTileData(e,n);l||=d}return l}_updateDescendants(e,t){let s=!1;const{tilingScheme:i,upsampleInfoPool:l}=this.surface,{targetTiles:a,_flowDataTiles:r,loadAllTilesLevel:o}=this,n=e.lij,h=_(n,o).map(e=>[p(e[0],e[1],e[2]),e]).filter(([e])=>a.has(e));if(0===h.length)return s;const u=1<<o-n[0],c=1/u,f=n[1]*u,T=n[2]*u,g=l.acquire();for(const[p,_]of h){if(w(r.get(p),e))continue;const l=d();i.getExtent(_[0],_[1],_[2],l);const a=1-(_[1]-f)*c-c,o=(_[2]-T)*c;g.init(e,o,a,c);const n=this._upsampleFlowData(t,g,_,l),h=this._setTileData(p,n);s||=h}return l.release(g),s}_setTileData(e,t){if(null==t)return!1;const{_flowDataTiles:s}=this;return(null!=s.get(e)||"delete"!==t.type)&&(s.set(e,t),!0)}_setFlowDataTiles(e){this._flowDataTiles=e,this._resetTileData=!0,this._flowDataTilesSet=!0}get _allTilesLoaded(){let e=0;for(const t of this._flowDataTiles.values()??[])"delete"!==t.type&&"invalid"!==t.type&&e++;return this.loadAllTiles?e===this.targetTiles.size:e===this.renderedTiles?.size}invalidateTileData(){const{_flowDataTiles:e}=this;for(const t of e.keys())e.set(t,D)}get usedMemory(){const e=9*this._pixelSize**2,t=(this._flowDataTiles.size??0)*e;return super.usedMemory+t}get test(){return{...super.test,loadedTiles:this._flowDataTiles}}};function m(){return new Map}function w(e,t){return null!=e&&("loaded"===e.type||"on-worker"===e.type)&&e.sourceLevel>=t.level}e([r()],y.prototype,"_throttling",void 0),e([r()],y.prototype,"_resetTileData",void 0),y=e([o("esri.views.3d.support.flow.FlowSubViewTiles3D")],y);export{y as default};
@@ -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{signal as i}from"../../../../core/signal.js";class e{static{this.fadeInEase=i=>i*(2-i)}static{this.fadeOutEase=i=>i*i}constructor(e){this.layerView=e,this._numFadingTiles=i(0)}get numFadingTiles(){return this._numFadingTiles.value}fadeTile(i,e){const t=this._getTargetOpacity(e);if(i.fadeDirection=e,0===this.fadeDuration)return void this._instantTileFading(i,t);const a=i.opacityModifier;if(a!==t){const e=1-Math.abs(t-a);this._startTileFading(i,e)}else this._stopTileFading(i)}updateAllTileFading(i){this.layerView.tileHandles.forEach(e=>this._updateTileFading(e,i)),this.layerView.updateGaussians()}onFadeDurationChanged(i){0===i&&this.numFadingTiles>0&&this._instantlyFullyFadeAllTiles()}isTileFadingOut(i){return null!=i.fadeProgress&&1===i.fadeDirection}isUpdating(){return this._numFadingTiles.value>0}get fadeDuration(){return 2*this.layerView.view.qualitySettings.fadeDuration}get fadingEnabled(){return 0!==this.fadeDuration}_startTileFading(i,e){null==i.fadeProgress&&this._numFadingTiles.value++,i.fadeProgress=e}_stopTileFading(i){null!=i.fadeProgress&&(1===i.fadeDirection&&this._onTileFullyFadedOut(i),this._numFadingTiles.value--,i.fadeProgress=null)}_updateTileFading(i,t){const{fadeProgress:a,fadeDirection:s}=i;if(null==a)return;const n=this._fadeDirectionToSign(s),l=n*this.fadeDuration,d=this._getTargetOpacity(s),r=t/Math.abs(l||1),o=Math.min(a+r,1),u=n*(1-(0===s?e.fadeInEase:e.fadeOutEase)(o)),g=1===o;i.opacityModifier=g?d:d-u,g?this._stopTileFading(i):i.fadeProgress=o,this._updateOpacityModifier(i)}_updateOpacityModifier(i){const e=255*i.opacityModifier;for(let t=0;t<i.pageIds.length;t++){const a=i.pageIds[t];this.layerView.data.fadingTexture.updateBuffer(e,a)}}_instantTileFading(i,e){i.fadeProgress=null,i.opacityModifier=e,this._updateOpacityModifier(i),1===i.fadeDirection&&this._onTileFullyFadedOut(i)}_instantlyFullyFadeAllTiles(){this.layerView.tileHandles.forEach(i=>{null!=i.fadeProgress&&this._instantTileFading(i,this._getTargetOpacity(i.fadeDirection))}),this.layerView.updateGaussians(),this._numFadingTiles.value=0}_onTileFullyFadedOut(i){i.isVisible=!1,this.layerView.moveTileToCache(i)}_fadeDirectionToSign(i){return 0===i?1:-1}_getTargetOpacity(i){return 0===i?1:0}}export{e as GaussianSplatFadeHelper};
5
+ import{signal as i}from"../../../../core/signal.js";class e{static{this.fadeInEase=i=>i*(2-i)}static{this.fadeOutEase=i=>i*i}constructor(e){this.layerView=e,this._numFadingTiles=i(0)}get numFadingTiles(){return this._numFadingTiles.value}fadeTile(i,e){const t=this._getTargetOpacity(e);if(i.fadeDirection=e,0===this.fadeDuration)return void this._instantTileFading(i,t);const a=i.opacityModifier;if(a!==t){const e=1-Math.abs(t-a);this._startTileFading(i,e)}else this._stopTileFading(i)}updateAllTileFading(i){this.layerView.tileHandles.forEach(e=>this._updateTileFading(e,i)),this.layerView.updateGaussians()}onFadeDurationChanged(i){0===i&&this.numFadingTiles>0&&this._instantlyFullyFadeAllTiles()}isTileFadingOut(i){return null!=i.fadeProgress&&1===i.fadeDirection}isUpdating(){return this._numFadingTiles.value>0}get fadeDuration(){return this.layerView.view.qualitySettings.fadeDuration}get fadingEnabled(){return 0!==this.fadeDuration}_startTileFading(i,e){null==i.fadeProgress&&this._numFadingTiles.value++,i.fadeProgress=e}_stopTileFading(i){null!=i.fadeProgress&&(1===i.fadeDirection&&this._onTileFullyFadedOut(i),this._numFadingTiles.value--,i.fadeProgress=null)}_updateTileFading(i,t){const{fadeProgress:a,fadeDirection:s}=i;if(null==a)return;const n=this._fadeDirectionToSign(s),l=n*this.fadeDuration,d=this._getTargetOpacity(s),r=t/Math.abs(l||1),o=Math.min(a+r,1),u=n*(1-(0===s?e.fadeInEase:e.fadeOutEase)(o)),g=1===o;i.opacityModifier=g?d:d-u,g?this._stopTileFading(i):i.fadeProgress=o,this._updateOpacityModifier(i)}_updateOpacityModifier(i){const e=255*i.opacityModifier;for(let t=0;t<i.pageIds.length;t++){const a=i.pageIds[t];this.layerView.data.fadingTexture.updateBuffer(e,a)}}_instantTileFading(i,e){i.fadeProgress=null,i.opacityModifier=e,this._updateOpacityModifier(i),1===i.fadeDirection&&this._onTileFullyFadedOut(i)}_instantlyFullyFadeAllTiles(){this.layerView.tileHandles.forEach(i=>{null!=i.fadeProgress&&this._instantTileFading(i,this._getTargetOpacity(i.fadeDirection))}),this.layerView.updateGaussians(),this._numFadingTiles.value=0}_onTileFullyFadedOut(i){i.isVisible=!1,this.layerView.moveTileToCache(i)}_fadeDirectionToSign(i){return 0===i?1:-1}_getTargetOpacity(i){return 0===i?1:0}}export{e as GaussianSplatFadeHelper};
@@ -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{acosClamped as t}from"../../../core/mathUtils.js";import{length as n,dot as r,scale as o,add as c,lerp as s,set as a,cross as i,normalize as u,subtract as e}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";function f(t,n){return t>n?Math.cos(n):Math.cos(t)}function M(t,n,r){return 2*Math.atan(r*Math.tan(.5*t)/n)}function l(t,n,r){return 2*Math.atan(n*Math.tan(.5*t)/r)}function m(t){const n=t[0]*t[0]+t[4]*t[4]+t[8]*t[8],r=t[1]*t[1]+t[5]*t[5]+t[9]*t[9],o=t[2]*t[2]+t[6]*t[6]+t[10]*t[10];return Math.sqrt(Math.max(n,r,o))}function g(t,n){const r=Math.sqrt(n[0]*n[0]+n[4]*n[4]+n[8]*n[8]),o=Math.sqrt(n[1]*n[1]+n[5]*n[5]+n[9]*n[9]),c=Math.sqrt(n[2]*n[2]+n[6]*n[6]+n[10]*n[10]);return a(t,r,o,c),t}function b(t,n,o){o=o||t;const c=r(t,n);a(o,t[0]-c*n[0],t[1]-c*n[1],t[2]-c*n[2]),u(o,o)}function p(t,n,r){Math.abs(t[0])>Math.abs(t[1])?a(n,0,1,0):a(n,1,0,0),i(r,t,n),i(n,r,t),u(r,r),u(n,n)}function q(t,n,r,o,c,s){const a=t+(n-t)*c;return a+(r+(o-r)*c-a)*s}function x(t,a,i,u=h()){const e=n(t),f=n(a),M=r(t,a)/(e*f);if(M<.9999999999999999){const n=Math.acos(M),r=((1-i)*e+i*f)/Math.sin(n),s=r/e*Math.sin((1-i)*n),h=r/f*Math.sin(i*n);return o(A,t,s),o(B,a,h),c(u,A,B)}return s(u,t,a,i)}function j(t,a,i,f=h(),M=h()){const l=n(t),m=n(a),g=r(t,a)/(l*m);if(g<.9999999999999999){const n=Math.acos(g),r=Math.sin(n),s=Math.sin(i*n),u=Math.sin((1-i)*n),e=(1-i)*l+i*m;{const n=e/r,i=n/m*s;o(A,t,n/l*u),o(B,a,i),c(f,A,B)}{const h=1/l*(-Math.cos((1-i)*n)*n*e+u*(-l+m));o(A,t,h);const f=1/m*(Math.cos(i*n)*n*e+s*(-l+m));o(B,a,f),c(M,A,B),o(M,M,1/r)}return M}return s(f,t,a,i),e(M,a,t),u(M,M),M}function v(n,o,c){n=u(A,n),o=u(B,o);const s=t(r(n,o));if(c){const t=i(z,n,o);if(r(t,c)<0)return-s}return s}function U(t){const n=t.length;return r=>{if(r<=t[0][0])return t[0][1];if(r>=t[n-1][0])return t[n-1][1];let o=1;for(;r>t[o][0];)o++;const c=t[o-1][0],s=t[o][0],a=(s-r)/(s-c);return a*t[o-1][1]+(1-a)*t[o][1]}}function d(t,n,o,c){e(w,n,t),e(y,o,t),i(c,w,y),u(c,c),c[3]=-r(t,c)}function k(t,n){if(a(n,0,0,0),t.length>0){for(let r=0;r<t.length;++r)c(n,n,t[r]);o(n,n,1/t.length)}}const w=h(),y=h(),z=h(),A=h(),B=h();export{v as angle,q as bilerp,f as cosCapped,M as fovx2fovy,l as fovy2fovx,b as makeOrthonormal,U as makePiecewiseLinearFunction,m as maxScale,k as midpoint3d,d as planeFromPoints,g as scaleFromMatrix,x as slerp,j as slerpTangent,p as tangentFrame};
5
+ import{acosClamped as t}from"../../../core/mathUtils.js";import{dot as n,set as r,normalize as o,length as c,scale as s,add as a,lerp as i,cross as u,subtract as e}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";function f(t,n){return t>n?Math.cos(n):Math.cos(t)}function M(t,n,r){return 2*Math.atan(r*Math.tan(.5*t)/n)}function l(t,n,r){return 2*Math.atan(n*Math.tan(.5*t)/r)}function m(t){const n=t[0]*t[0]+t[4]*t[4]+t[8]*t[8],r=t[1]*t[1]+t[5]*t[5]+t[9]*t[9],o=t[2]*t[2]+t[6]*t[6]+t[10]*t[10];return Math.sqrt(Math.max(n,r,o))}function g(t,n){const o=Math.sqrt(n[0]*n[0]+n[4]*n[4]+n[8]*n[8]),c=Math.sqrt(n[1]*n[1]+n[5]*n[5]+n[9]*n[9]),s=Math.sqrt(n[2]*n[2]+n[6]*n[6]+n[10]*n[10]);return r(t,o,c,s),t}function b(t,c,s){s=s||t;const a=n(t,c);r(s,t[0]-a*c[0],t[1]-a*c[1],t[2]-a*c[2]),o(s,s)}function p(t,n,c){Math.abs(t[0])>Math.abs(t[1])?r(n,0,1,0):r(n,1,0,0),u(c,t,n),u(n,c,t),o(c,c),o(n,n)}function q(t,n,r,o,c,s){const a=t+(n-t)*c;return a+(r+(o-r)*c-a)*s}function x(t,r,o,u=h()){const e=c(t),f=c(r),M=n(t,r)/(e*f);if(M<.9999999999999999){const n=Math.acos(M),c=((1-o)*e+o*f)/Math.sin(n),i=c/e*Math.sin((1-o)*n),h=c/f*Math.sin(o*n);return s(A,t,i),s(B,r,h),a(u,A,B)}return i(u,t,r,o)}function j(t,r,u,f=h(),M=h()){const l=c(t),m=c(r),g=n(t,r)/(l*m);if(g<.9999999999999999){const n=Math.acos(g),o=Math.sin(n),c=Math.sin(u*n),i=Math.sin((1-u)*n),e=(1-u)*l+u*m;{const n=e/o,u=n/m*c;s(A,t,n/l*i),s(B,r,u),a(f,A,B)}{const h=1/l*(-Math.cos((1-u)*n)*n*e+i*(-l+m));s(A,t,h);const f=1/m*(Math.cos(u*n)*n*e+c*(-l+m));s(B,r,f),a(M,A,B),s(M,M,1/o)}return M}return i(f,t,r,u),e(M,r,t),o(M,M),M}function v(r,c,s){r=o(A,r),c=o(B,c);const a=t(n(r,c));if(s){const t=u(z,r,c);if(n(t,s)<0)return-a}return a}function U(t){const n=t.length;return r=>{if(r<=t[0][0])return t[0][1];if(r>=t[n-1][0])return t[n-1][1];let o=1;for(;r>t[o][0];)o++;const c=t[o-1][0],s=t[o][0],a=(s-r)/(s-c);return a*t[o-1][1]+(1-a)*t[o][1]}}function d(t,r,c,s){e(w,r,t),e(y,c,t),u(s,w,y),o(s,s),s[3]=-n(t,s)}function k(t,n){if(r(n,0,0,0),t.length>0){for(let r=0;r<t.length;++r)a(n,n,t[r]);s(n,n,1/t.length)}}const w=h(),y=h(),z=h(),A=h(),B=h();export{v as angle,q as bilerp,f as cosCapped,M as fovx2fovy,l as fovy2fovx,b as makeOrthonormal,U as makePiecewiseLinearFunction,m as maxScale,k as midpoint3d,d as planeFromPoints,g as scaleFromMatrix,x as slerp,j as slerpTangent,p as tangentFrame};
@@ -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 t}from"tslib";import e from"../../../../core/Accessor.js";import"../../../../core/has.js";import{abortMaybe as o}from"../../../../core/maybe.js";import"../../../../core/RandomLCG.js";import"../../../../core/Logger.js";import{watch as r,on as i}from"../../../../core/reactiveUtils.js";import{property as s,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import p from"../../../../geometry/Point.js";import{center as a}from"../../../../geometry/support/aaBoundingRect.js";import"../../../../core/asyncUtils.js";import"../../../../core/units.js";import"../../../../geometry/ellipsoidUtils.js";import"../../../../geometry/Extent.js";import"../../../../geometry/Geometry.js";import"../../../../geometry/Multipoint.js";import"../../../../geometry/Polygon.js";import"../../../../geometry/Polyline.js";import"../../../../geometry/SpatialReference.js";import"../../../../geometry/operators/support/GeographicTransformation.js";import"../../../../geometry/projection/projectors.js";import"../../../../geometry/support/spatialReferenceUtils.js";import"../../../../layers/support/TileElevationSampler.js";let u=class extends e{constructor(t){super(t),this.location=null,this._updateController=null}initialize(){this.view.state.isLocal&&(this.addHandles([r(()=>[this._groundView?.spatialReference,this._groundView?.groundExtent],()=>this._update()),i(()=>this._ground?.layers,"change",()=>this._update())]),this._update())}destroy(){this._updateController=o(this._updateController)}get renderLocation(){if(!this.location)return null;const t=l();return this.view.renderCoordsHelper.toRenderCoords(this.location,t),t}get _ground(){return this.view.map?.ground}get _groundView(){return this.view.groundView}_update(){if(this._updateController=o(this._updateController),null==this._groundView?.groundExtent||null==this._groundView?.spatialReference)return void this._set("location",null);const t=a(this._groundView.groundExtent),e=new p({x:t[0],y:t[1],z:0,spatialReference:this._groundView.spatialReference});this._ground&&this._ground.layers.length>0?(this._set("location",null),this._updateController=new AbortController,this._ground.queryElevation(e,{noDataValue:0,signal:this._updateController.signal,cache:this.cache}).then(t=>{this._updateController=null,this._set("location",t.geometry)}).catch(t=>{})):this._set("location",e)}};t([s({constructOnly:!0})],u.prototype,"view",void 0),t([s({constructOnly:!0})],u.prototype,"cache",void 0),t([s({readOnly:!0})],u.prototype,"location",void 0),t([s({readOnly:!0})],u.prototype,"renderLocation",null),t([s()],u.prototype,"_ground",null),t([s()],u.prototype,"_groundView",null),u=t([n("esri.views.3d.support.pointsOfInterest.StableSurfaceCenter")],u);export{u as StableSurfaceCenter};
5
+ import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import"../../../../core/has.js";import{abortMaybe as o}from"../../../../core/maybe.js";import"../../../../core/RandomLCG.js";import"../../../../core/Logger.js";import{watch as r,on as i}from"../../../../core/reactiveUtils.js";import{property as s,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import p from"../../../../geometry/Point.js";import{center as a}from"../../../../geometry/support/aaBoundingRect.js";import"../../../../core/asyncUtils.js";import"../../../../core/units.js";import"../../../../geometry/ellipsoidUtils.js";import"../../../../geometry/Extent.js";import"../../../../geometry/Geometry.js";import"../../../../geometry/Multipoint.js";import"../../../../geometry/Polygon.js";import"../../../../geometry/Polyline.js";import"../../../../geometry/SpatialReference.js";import"../../../../geometry/spatialReferenceEllipsoidUtils.js";import"../../../../geometry/operators/support/GeographicTransformation.js";import"../../../../geometry/projection/projectors.js";import"../../../../geometry/support/spatialReferenceUtils.js";import"../../../../layers/support/ElevationTileData.js";import"../../../../layers/support/TileElevationSampler.js";let u=class extends e{constructor(t){super(t),this.location=null,this._updateController=null}initialize(){this.view.state.isLocal&&(this.addHandles([r(()=>[this._groundView?.spatialReference,this._groundView?.groundExtent],()=>this._update()),i(()=>this._ground?.layers,"change",()=>this._update())]),this._update())}destroy(){this._updateController=o(this._updateController)}get renderLocation(){if(!this.location)return null;const t=l();return this.view.renderCoordsHelper.toRenderCoords(this.location,t),t}get _ground(){return this.view.map?.ground}get _groundView(){return this.view.groundView}_update(){if(this._updateController=o(this._updateController),null==this._groundView?.groundExtent||null==this._groundView?.spatialReference)return void this._set("location",null);const t=a(this._groundView.groundExtent),e=new p({x:t[0],y:t[1],z:0,spatialReference:this._groundView.spatialReference});this._ground&&this._ground.layers.length>0?(this._set("location",null),this._updateController=new AbortController,this._ground.queryElevation(e,{noDataValue:0,signal:this._updateController.signal,cache:this.cache}).then(t=>{this._updateController=null,this._set("location",t.geometry)}).catch(t=>{})):this._set("location",e)}};t([s({constructOnly:!0})],u.prototype,"view",void 0),t([s({constructOnly:!0})],u.prototype,"cache",void 0),t([s({readOnly:!0})],u.prototype,"location",void 0),t([s({readOnly:!0})],u.prototype,"renderLocation",null),t([s()],u.prototype,"_ground",null),t([s()],u.prototype,"_groundView",null),u=t([n("esri.views.3d.support.pointsOfInterest.StableSurfaceCenter")],u);export{u as StableSurfaceCenter};
@@ -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{isWGS84 as r,isCGCS2000 as t,isMars as e,isMoon as n}from"../../../geometry/support/spatialReferenceUtils.js";function o(r){return i(r)||e(r)||n(r)}function i(e){return r(e)||t(e)}export{i as isSupportedEarthGCS,o as isSupportedGCSOnGlobe};
5
+ import{isMars as r,isMoon as t}from"../../../geometry/ellipsoidUtils.js";import{isWGS84 as e,isCGCS2000 as o}from"../../../geometry/support/spatialReferenceUtils.js";function i(e){return n(e)||r(e)||t(e)}function n(r){return e(r)||o(r)}export{n as isSupportedEarthGCS,i as isSupportedGCSOnGlobe};
@@ -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 n from"../../../core/Collection.js";import{isCGCS2000 as t,isEarth as e}from"../../../geometry/support/spatialReferenceUtils.js";import{getTileMaxtrixSetFromActiveLayer as r}from"../../../layers/support/layerUtils.js";import{isRasterTile as o,isImageWithType as i,isTileTexture as u,isVectorTile as l}from"./TerrainData.js";import{t as f}from"../../../chunks/terrainUtilsPlanar.js";import{t as c}from"../../../chunks/terrainUtilsSpherical.js";const a={1:c,2:f};function s(n,t){n||console.warn("Terrain: "+t)}let p=!1,m=!1;function I(n){m=n,p=p||n}function y(n){p=n}function d(n,t){if(p&&!n){const n=(new Error).stack?.slice(5);throw console.warn("Terrain internal: "+(t??"")+" at "+n),new Error("Assertion failed"+(t?": "+t:""))}}function E(n){return"imagery-tile"===n?.type||"wcs"===n?.type}function T(n){return"imagery-tile-3d"===n?.type}function x(n){return"tile-3d"===n?.type}function h(n){return"vector-tile-3d"===n?.type}function L(n){return"wmts-3d"===n?.type}function g(n){return"elevation-3d"===n?.type}function w(n){return"group"===n?.type}function C(n){return n&&(x(n)||L(n)||T(n)||h(n))}function v(n){return n&&(x(n)||T(n)||h(n)||L(n))}function j(n){return v(n)||g(n)}function b(n){return o(n?.sourceLayerInfo?.data)}function k(n){return F(n?.sourceLayerInfo)||!!n?.isVTLBackground}function M(n){return u(n?.sourceLayerInfo?.data)}function V(n){const t=n?.sourceLayerInfo?.data;return i(t)||t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageData}function F(n){return l(n?.data)}function S(n){return null!=n&&"release"in n&&n.release(),null}function U(n){return n.fetchTile&&!1!==n.hasOverriddenFetchTile}function D(n,t,e,r,o){return a[r].checkIfTileInfoSupportedForViewSR(n,e,t,o)}function H(n,t,e){let r=null,o=null;if("wmts"===n?.type){const i=O(n,t,e);r=i.tileInfo,o=i.fullExtent}else{o=E(n)?n.getCompatibleFullExtent(t):n.fullExtent;const i=2===e;if(E(n))r=n.getCompatibleTileInfo(t,o,i);else if("vector-tile"===n?.type){r=i&&!R(t)||W.force512VTL?n.tileInfo:n.tileInfo.getCompatibleForVTL(256)}else r=n.tileInfo}const i="tilemapCache"in n?n.tilemapCache?.effectiveMaxLOD:void 0;return null!=r&&null!=o&&null==D(r,o,t,e,i)?{tileInfo:r,fullExtent:o}:null}function O(t,e,o){const i=r(t);if(null!=i){if(!n.isCollection(i))return{tileInfo:i.tileInfo,fullExtent:i.fullExtent};{const n=i.find(n=>null==D(n.tileInfo,n.fullExtent,e,o));if(n)return{tileInfo:n.tileInfo,fullExtent:n.fullExtent}}}return{tileInfo:null,fullExtent:null}}function R(n){return n.isWGS84||n.isWebMercator||t(n)||!e(n)}const W={force512VTL:!1};function A(n){return"["+n[0]+","+n[1]+","+n[2]+"]"}function B(n){return"("+n[0]+","+n[1]+","+n[2]+")"}function G(n,t,e=$){return Math.abs(n-t)<e}function P(n){return 1===n?5:7===n?3:5===n?1:7}function q(n){return 0===n?4:2===n?6:4===n?0:2}function z(n){return 7===n||5===n}function J(n){return 7===n||1===n}function K(n){return 7===n||6===n||5===n}function N(n){return 1===n||2===n||3===n}function Q(n){return 3===n||4===n||5===n}function X(n){return 1===n||0===n||7===n}const Y=[0,2,4,6],Z=[1,3,5,7],$=1e-5;export{G as almostEquals,D as checkIfTileInfoSupportedForView,y as enableInternalTerrainChecks,p as enableTerrainInternalChecks,I as enableTerrainWaterproofChecks,m as enableWaterproofTests,$ as eps,O as getTileInfoAndExtentFromWMTSLayer,H as getTiledLayerInfo,d as internalAssert,C as isBlendableLayerView,N as isEast,g as isElevationLayerView,w as isGroupLayerView,V as isImageSourceRenderInfo,T as isImageryTileLayerView,b as isImageryTileRenderInfo,v as isMapTileLayerView,X as isNorth,J as isNorthCorner,E as isProjectableRasterLayer,Q as isSouth,j as isSurfaceLayerView,M as isTextureTileRenderInfo,x as isTileLayerView,h as isVectorTileLayerView,F as isVectorTilePerLayerInfo,k as isVectorTileRenderInfo,L as isWMTSLayerView,K as isWest,z as isWestCorner,A as lij2s,Z as neighborCornerIndices,Y as neighborEdgeIndices,P as oppositeCorner,q as oppositeEdge,S as releaseTerrainData,W as test,U as useFetchTileForLayer,B as v32s,R as vtlAssumes256PixelSizeAsDefault,s as weakAssert};
5
+ import n from"../../../core/Collection.js";import{isEarth as t}from"../../../geometry/ellipsoidUtils.js";import{isCGCS2000 as e}from"../../../geometry/support/spatialReferenceUtils.js";import{getTileMaxtrixSetFromActiveLayer as r}from"../../../layers/support/layerUtils.js";import{isRasterTile as o,isImageWithType as i,isTileTexture as u,isVectorTile as l}from"./TerrainData.js";import{t as f}from"../../../chunks/terrainUtilsPlanar.js";import{t as c}from"../../../chunks/terrainUtilsSpherical.js";const a={1:c,2:f};function s(n,t){n||console.warn("Terrain: "+t)}let p=!1,m=!1;function y(n){m=n,p=p||n}function I(n){p=n}function d(n,t){if(p&&!n){const n=(new Error).stack?.slice(5);throw console.warn("Terrain internal: "+(t??"")+" at "+n),new Error("Assertion failed"+(t?": "+t:""))}}function E(n){return"imagery-tile"===n?.type||"wcs"===n?.type}function T(n){return"imagery-tile-3d"===n?.type}function x(n){return"tile-3d"===n?.type}function g(n){return"vector-tile-3d"===n?.type}function h(n){return"wmts-3d"===n?.type}function L(n){return"elevation-3d"===n?.type}function w(n){return"group"===n?.type}function C(n){return n&&(x(n)||h(n)||T(n)||g(n))}function j(n){return n&&(x(n)||T(n)||g(n)||h(n))}function v(n){return j(n)||L(n)}function b(n){return o(n?.sourceLayerInfo?.data)}function k(n){return V(n?.sourceLayerInfo)||!!n?.isVTLBackground}function M(n){return u(n?.sourceLayerInfo?.data)}function U(n){const t=n?.sourceLayerInfo?.data;return i(t)||t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageData}function V(n){return l(n?.data)}function F(n){return null!=n&&"release"in n&&n.release(),null}function S(n){return n.fetchTile&&!1!==n.hasOverriddenFetchTile}function D(n,t,e,r,o){return a[r].checkIfTileInfoSupportedForViewSR(n,e,t,o)}function H(n,t,e){let r=null,o=null;if("wmts"===n?.type){const i=O(n,t,e);r=i.tileInfo,o=i.fullExtent}else{o=E(n)?n.getCompatibleFullExtent(t):n.fullExtent;const i=2===e;if(E(n))r=n.getCompatibleTileInfo(t,o,i);else if("vector-tile"===n?.type){r=i&&!R(t)||W.force512VTL?n.tileInfo:n.tileInfo.getCompatibleForVTL(256)}else r=n.tileInfo}const i="tilemapCache"in n?n.tilemapCache?.effectiveMaxLOD:void 0;return null!=r&&null!=o&&null==D(r,o,t,e,i)?{tileInfo:r,fullExtent:o}:null}function O(t,e,o){const i=r(t);if(null!=i){if(!n.isCollection(i))return{tileInfo:i.tileInfo,fullExtent:i.fullExtent};{const n=i.find(n=>null==D(n.tileInfo,n.fullExtent,e,o));if(n)return{tileInfo:n.tileInfo,fullExtent:n.fullExtent}}}return{tileInfo:null,fullExtent:null}}function R(n){return n.isWGS84||n.isWebMercator||e(n)||!t(n)}const W={force512VTL:!1};function A(n){return"["+n[0]+","+n[1]+","+n[2]+"]"}function B(n){return"("+n[0]+","+n[1]+","+n[2]+")"}function G(n,t,e=$){return Math.abs(n-t)<e}function P(n){return 1===n?5:7===n?3:5===n?1:7}function q(n){return 0===n?4:2===n?6:4===n?0:2}function z(n){return 7===n||5===n}function J(n){return 7===n||1===n}function K(n){return 7===n||6===n||5===n}function N(n){return 1===n||2===n||3===n}function Q(n){return 3===n||4===n||5===n}function X(n){return 1===n||0===n||7===n}const Y=[0,2,4,6],Z=[1,3,5,7],$=1e-5;export{G as almostEquals,D as checkIfTileInfoSupportedForView,I as enableInternalTerrainChecks,p as enableTerrainInternalChecks,y as enableTerrainWaterproofChecks,m as enableWaterproofTests,$ as eps,O as getTileInfoAndExtentFromWMTSLayer,H as getTiledLayerInfo,d as internalAssert,C as isBlendableLayerView,N as isEast,L as isElevationLayerView,w as isGroupLayerView,U as isImageSourceRenderInfo,T as isImageryTileLayerView,b as isImageryTileRenderInfo,j as isMapTileLayerView,X as isNorth,J as isNorthCorner,E as isProjectableRasterLayer,Q as isSouth,v as isSurfaceLayerView,M as isTextureTileRenderInfo,x as isTileLayerView,g as isVectorTileLayerView,V as isVectorTilePerLayerInfo,k as isVectorTileRenderInfo,h as isWMTSLayerView,K as isWest,z as isWestCorner,A as lij2s,Z as neighborCornerIndices,Y as neighborEdgeIndices,P as oppositeCorner,q as oppositeEdge,F as releaseTerrainData,W as test,S as useFetchTileForLayer,B as v32s,R as vtlAssumes256PixelSizeAsDefault,s as weakAssert};
@@ -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{someMap as t}from"../../../core/MapUtils.js";import{releaseMaybe as e}from"../../../core/maybe.js";import{RenderCategory as h}from"../webgl.js";import{isManagedDepthTexture as o}from"./ManagedDepthTexture.js";import r from"./ManagedFBOResource.js";import{ColorAttachment0 as s,DepthStencilAttachment as i}from"../../webgl/enums.js";class a extends r{constructor(t,e,o,r,s,i){super(t,i),this.fbo=o,this.type=0,this._colors=new Map,this._name=h.COMPOSITE,this.acquireColor=null,this.acquireDepth=null,this._name=e,this.acquireColor=r,this.acquireDepth=s}dispose(){this.fbo?.dispose()}get usedMemory(){return this.fbo?.usedMemory||0}get numberOfColorAttachments(){return this._colors.size}get name(){return this._name}setName(t){this._name=t}getTexture(t=s){return t===i?this.fbo?.depthStencilTexture:this.fbo?.getColorTexture(t)}get depthTexture(){return this.getTexture(i)}getAttachment(t=s){return t===i?this._depth:this._colors.get(t)}hasAttachment(e){return t(this._colors,t=>t.name===e)}attachDepth(t){return t?.retain(),this.detachDepth(),t&&this.fbo?.attachDepthStencil(t.attachment),this._depth=t,this}detachDepth(){this.fbo?.detachDepthStencilTexture(),this.fbo?.detachDepthStencilBuffer(),this._depth=e(this._depth)}obtainDepthTexture(){const t=this._depth;return o(t)?(this.fbo?.detachDepthStencilTexture(),this._depth=null,t):null}attachColor(t,e){return t.retain(),this.detachColor(e),this.fbo?.attachColorTexture(t.attachment,e),this._colors.set(e,t),this}detachColor(t){this.fbo?.detachColorTexture(t);const e=this._colors.get(t);this._colors.delete(t),e?.release()}detachAllColors(){this._colors.forEach((t,e)=>this.detachColor(e))}detachAll(){this.detachAllColors(),this.detachDepth()}detachAllColorsBut0(){this._colors.forEach((t,e)=>{e!==s&&this.detachColor(e)})}detachAllButColor0(){this.detachAllColorsBut0(),this.detachDepth()}}export{a as default};
5
+ import{someMap as t}from"../../../core/MapUtils.js";import{releaseMaybe as e}from"../../../core/maybe.js";import{RenderNodeOutput as h}from"../webgl.js";import{isManagedDepthTexture as o}from"./ManagedDepthTexture.js";import r from"./ManagedFBOResource.js";import{ColorAttachment0 as s,DepthStencilAttachment as i}from"../../webgl/enums.js";class a extends r{constructor(t,e,o,r,s,i){super(t,i),this.fbo=o,this.type=0,this._colors=new Map,this._name=h.COMPOSITE,this.acquireColor=null,this.acquireDepth=null,this._name=e,this.acquireColor=r,this.acquireDepth=s}dispose(){this.fbo?.dispose()}get usedMemory(){return this.fbo?.usedMemory||0}get numberOfColorAttachments(){return this._colors.size}get name(){return this._name}setName(t){this._name=t}getTexture(t=s){return t===i?this.fbo?.depthStencilTexture:this.fbo?.getColorTexture(t)}get depthTexture(){return this.getTexture(i)}getAttachment(t=s){return t===i?this._depth:this._colors.get(t)}hasAttachment(e){return t(this._colors,t=>t.name===e)}attachDepth(t){return t?.retain(),this.detachDepth(),t&&this.fbo?.attachDepthStencil(t.attachment),this._depth=t,this}detachDepth(){this.fbo?.detachDepthStencilTexture(),this.fbo?.detachDepthStencilBuffer(),this._depth=e(this._depth)}obtainDepthTexture(){const t=this._depth;return o(t)?(this.fbo?.detachDepthStencilTexture(),this._depth=null,t):null}attachColor(t,e){return t.retain(),this.detachColor(e),this.fbo?.attachColorTexture(t.attachment,e),this._colors.set(e,t),this}detachColor(t){this.fbo?.detachColorTexture(t);const e=this._colors.get(t);this._colors.delete(t),e?.release()}detachAllColors(){this._colors.forEach((t,e)=>this.detachColor(e))}detachAll(){this.detachAllColors(),this.detachDepth()}detachAllColorsBut0(){this._colors.forEach((t,e)=>{e!==s&&this.detachColor(e)})}detachAllButColor0(){this.detachAllColorsBut0(),this.detachDepth()}}export{a as default};
@@ -1,4 +1,3 @@
1
-
2
1
  /** @since 5.0 */
3
2
  export default abstract class ManagedFBOResource {
4
3
  /**
@@ -2,7 +2,7 @@ import type Accessor from "../../../core/Accessor.js";
2
2
  import type SceneView from "../../SceneView.js";
3
3
  import type ManagedFBO from "./ManagedFBO.js";
4
4
  import type RenderCamera from "./RenderCamera.js";
5
- import type { ConsumedNodes, RenderNodeOutput } from "../webgl.js";
5
+ import type { RenderNodeOutput, ConsumedNodes } from "../webgl.js";
6
6
  import type { SunLight } from "./types.js";
7
7
 
8
8
  export interface RenderNodeProperties extends Partial<Pick<RenderNode, "produces">> {
@@ -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 r from"../../../core/Accessor.js";import t from"../../../core/Error.js";import{watch as i,initial as s}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{RenderCategory as d}from"../webgl.js";let a=class extends r{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=d.COMPOSITE,this.requireGeometryDepth=!1,this._dirty=!0}initialize(){this.addHandles([i(()=>this.view.ready,e=>{e&&this.view.stage?.renderer.addRenderNode(this)},s)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new t("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const e=this._frameBuffer?.getTexture()?.descriptor,r=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return r.fbo?.initializeAndBind(),r}bindRenderTarget(){return this._frameBuffer?.fbo?.initializeAndBind(),this._frameBuffer}requestRender(e){switch(e){case 2:this.view.state.fading=!0;case 1:this.view.stage?.renderView.requestRender(e);case 0:case void 0:this._dirty=!0}}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find(({name:e})=>e===this.produces);try{return this.render(e)}finally{this._frameBuffer=null}}};e([n({constructOnly:!0})],a.prototype,"view",void 0),e([n({constructOnly:!0})],a.prototype,"consumes",void 0),e([n()],a.prototype,"produces",void 0),e([n({readOnly:!0})],a.prototype,"techniques",null),a=e([o("esri.views.3d.webgl.RenderNode")],a);export{a as default};
5
+ import{__decorate as e}from"tslib";import r from"../../../core/Accessor.js";import t from"../../../core/Error.js";import{watch as i,initial as s}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{RenderNodeOutput as d}from"../webgl.js";let a=class extends r{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=d.COMPOSITE,this.requireGeometryDepth=!1,this._dirty=!0}initialize(){this.addHandles([i(()=>this.view.ready,e=>{e&&this.view.stage?.renderer.addRenderNode(this)},s)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new t("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const e=this._frameBuffer?.getTexture()?.descriptor,r=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return r.fbo?.initializeAndBind(),r}bindRenderTarget(){return this._frameBuffer?.fbo?.initializeAndBind(),this._frameBuffer}requestRender(e){switch(e){case 2:this.view.state.fading=!0;case 1:this.view.stage?.renderView.requestRender(e);case 0:case void 0:this._dirty=!0}}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find(({name:e})=>e===this.produces);try{return this.render(e)}finally{this._frameBuffer=null}}};e([n({constructOnly:!0})],a.prototype,"view",void 0),e([n({constructOnly:!0})],a.prototype,"consumes",void 0),e([n()],a.prototype,"produces",void 0),e([n({readOnly:!0})],a.prototype,"techniques",null),a=e([o("esri.views.3d.webgl.RenderNode")],a);export{a as default};
@@ -1,4 +1,3 @@
1
-
2
1
  /**
3
2
  * Tuple of an RGB color value and an intensity value.
4
3
  *
@@ -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{exactEquals as s}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as t}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{defaultComponentParameters as i}from"../ComponentDrawParameters.js";import{ComponentTechnique as r}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as o}from"./ComponentTechniqueConfiguration.js";import{parameter as a,MaterialBase as n}from"../../../core/material/MaterialBase.js";import{isColor as l}from"../../../core/shaderLibrary/ShaderOutput.js";class u extends n{constructor(e,r,a,n,l,u){super(),this.floatBufferBlendSupported=l,this.emissiveOverride=i.emissiveOverride,this.emissiveSourceOverride=i.emissiveSourceOverride,this.transparent=i.transparent,this.opaqueOverride=i.opaqueOverride,this.castShadows=i.castShadows,this.baseColorTranslucent=e.baseColor[3]<1,this.usePBR=e.usePBR,this.hasParametersFromSource=e.hasParametersFromSource,this.hasEmissiveBase=null!=e.emissionTexture||!s(e.emissiveBaseColor,t),this.isGround=e.isGround,this.slicePlaneEnabled=e.slicePlaneEnabled,this.updateOpacity(e.objectOpacity),this.isIntegratedMesh=e.isIntegratedMesh,this.polygonOffsetEnabled=e.polygonOffsetEnabled,this.applySSAO=e.applySSAO,this.hasEmissiveTexture=null!=e.emissionTexture,this._configuration=new o(n),this._initializeMaterialConfiguration(e,r,u),this.updateComponentParameters(a)}dispose(){}get _hasEmissiveStrength(){return 2!==this.emissiveOverride}get hasEmissions(){return this.floatBufferBlendSupported&&this._hasEmissiveStrength&&(this.hasEmissiveBase||2!==this.emissiveSourceOverride)}acquireTechnique(e,s,t,i){const o=this._updateConfiguration(s,t);return e.get(r,o,i.layout)}_initializeMaterialConfiguration(e,s,t){const i=this._configuration;i.hasMetallicRoughnessTexture=null!=e.metallicRoughnessTexture,i.hasOcclusionTexture=null!=e.occlusionTexture,i.hasNormalTexture=null!=e.normalTexture,i.sphereDepthInterpolate=e.sphereDepthInterpolate&&i.spherical,i.ellipsoidMode=e.ellipsoidMode,i.doubleSidedMode=e.doubleSided?1:0,i.hasColorTexture=null!=e.baseColorTexture,i.cullFace=e.cullFace,i.alphaDiscardMode=e.alphaDiscardMode,i.hasVertexColors=s.hasVertexColors,i.textureCoordinateType=s.textureCoordinateType,i.shadeNormals=s.shadeNormals,i.normalType=s.hasNormals?1:2,i.hasPolygonOffset=this.polygonOffsetEnabled,i.hasModelRotationScale=t}_updateConfiguration(e,s){const t=this._configuration,i=e.identifier,r=0===i;t.hasEmission=s.hasEmission&&r,t.renderOccluded=10===s.slot,t.oitPass=r?s.oitPass:0,t.terrainDepthTest=r&&s.terrainDepthTest,t.cullAboveTerrain=!!r&&s.cullAboveTerrain;const o=this.isIntegratedMesh?d(s)?h(s)?3:2:1:0;t.integratedMeshMode=o,t.pbrMode=3===o?4:this.usePBR?this.hasParametersFromSource?t.shadeNormals&&this.isIntegratedMesh?0:2:1:0;const{hasEmissiveTexture:a,emissiveSourceOverride:n}=this,u=1===n,c=2===n;t.emissionSource=this.hasEmissions?this.hasEmissiveBase?c?a?4:2:u?a?5:7:6:u?7:6:0;const p=null!=s.slicePlane&&this.slicePlaneEnabled;t.hasSlicePlane=p;const m=p&&this.isGround;t.isGroundSlice=m;const v=this.computeMaterialPass();t.blendingEnabled=1===v||2===v||4===v||m,t.hasHighlightMixTexture=2===i&&null!=s.highlightMixTexture,t.output=e.output,t.snowCover=r&&s.snowCover>0,t.vertexDiscardMode=r&&2===v?e.transparent?2:1:0;const f=r&&l(e.output);return t.receiveAmbientOcclusion=f&&this.applySSAO&&null!=s.ssao?.getTexture(),t.hasOccludees=f&&s.hasOccludees,t.receiveShadows=f&&s.shadowMap.ready,t.screenSpaceReflections=f&&null!=s.ssr.lastFrameColor,t.cloudReflections=f&&null!=s.clouds.data?.cubeMap?.colorTexture,t}computeMaterialPass(){const{_configuration:e,objectTranslucent:s,baseColorTranslucent:t,isIntegratedMesh:i,transparent:r,opaqueOverride:o}=this,{alphaDiscardMode:a}=e;if(i)return s?4:3;if(s)return i?4:1;if(0===o)return 0;if(t||0===a||3===a)return 1;switch(r){case 2:return 0;case 0:return 1;case 1:return 2}}updateOpacity(e){this.objectTranslucent=e<1}updateComponentParameters(e){this.transparent=e.transparent,this.opaqueOverride=e.opaqueOverride,this.emissiveOverride=e.emissiveOverride,this.emissiveSourceOverride=e.emissiveSourceOverride,this.castShadows=e.castShadows,this._configuration.componentDataType=e.componentDataType,this._setDirty()}update(e){void 0!==e.usePBR&&(this.usePBR=e.usePBR),void 0!==e.slicePlaneEnabled&&(this.slicePlaneEnabled=e.slicePlaneEnabled),void 0!==e.polygonOffsetEnabled&&(this.polygonOffsetEnabled=e.polygonOffsetEnabled,this._configuration.hasPolygonOffset=this.polygonOffsetEnabled,this._setDirty())}}function h(e){return null!=e.overlay?.getTexture(3)}function d(e){return null!=e.overlay?.getTexture(1)}e([a()],u.prototype,"objectTranslucent",void 0),e([a()],u.prototype,"polygonOffsetEnabled",void 0),e([a()],u.prototype,"slicePlaneEnabled",void 0),e([a()],u.prototype,"usePBR",void 0),e([a()],u.prototype,"emissiveOverride",void 0),e([a()],u.prototype,"emissiveSourceOverride",void 0),e([a()],u.prototype,"transparent",void 0),e([a()],u.prototype,"opaqueOverride",void 0),e([a()],u.prototype,"castShadows",void 0);export{u as ComponentMaterial};
5
+ import{__decorate as e}from"tslib";import{exactEquals as s}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as t}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{defaultComponentParameters as i}from"../ComponentDrawParameters.js";import{ComponentTechnique as r}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as o}from"./ComponentTechniqueConfiguration.js";import{parameter as a,MaterialBase as n}from"../../../core/material/MaterialBase.js";import{isColor as l}from"../../../core/shaderLibrary/ShaderOutput.js";class u extends n{constructor(e,r,a,n,l,u){super(),this.floatBufferBlendSupported=l,this.objectTransparent=!1,this.emissiveOverride=i.emissiveOverride,this.emissiveSourceOverride=i.emissiveSourceOverride,this.transparent=i.transparent,this.opaqueOverride=i.opaqueOverride,this.castShadows=i.castShadows,this.baseColorTranslucent=e.baseColor[3]<1,this.usePBR=e.usePBR,this.hasParametersFromSource=e.hasParametersFromSource,this.hasEmissiveBase=null!=e.emissionTexture||!s(e.emissiveBaseColor,t),this.isGround=e.isGround,this.slicePlaneEnabled=e.slicePlaneEnabled,this.updateOpacity(e.objectOpacity),this.isIntegratedMesh=e.isIntegratedMesh,this.polygonOffsetEnabled=e.polygonOffsetEnabled,this.applySSAO=e.applySSAO,this.hasEmissiveTexture=null!=e.emissionTexture,this._configuration=new o(n),this._initializeMaterialConfiguration(e,r,u),this.updateComponentParameters(a)}dispose(){}get _hasEmissiveStrength(){return 2!==this.emissiveOverride}get hasEmissions(){return this.floatBufferBlendSupported&&this._hasEmissiveStrength&&(this.hasEmissiveBase||2!==this.emissiveSourceOverride)}acquireTechnique(e,s,t,i){const o=this._updateConfiguration(s,t);return e.get(r,o,i.layout)}_initializeMaterialConfiguration(e,s,t){const i=this._configuration;i.hasMetallicRoughnessTexture=null!=e.metallicRoughnessTexture,i.hasOcclusionTexture=null!=e.occlusionTexture,i.hasNormalTexture=null!=e.normalTexture,i.sphereDepthInterpolate=e.sphereDepthInterpolate&&i.spherical,i.ellipsoidMode=e.ellipsoidMode,i.doubleSidedMode=e.doubleSided?1:0,i.hasColorTexture=null!=e.baseColorTexture,i.cullFace=e.cullFace,i.alphaDiscardMode=e.alphaDiscardMode,i.hasVertexColors=s.hasVertexColors,i.textureCoordinateType=s.textureCoordinateType,i.shadeNormals=s.shadeNormals,i.normalType=s.hasNormals?1:2,i.hasPolygonOffset=this.polygonOffsetEnabled,i.hasModelRotationScale=t}_updateConfiguration(e,s){const t=this._configuration,i=e.identifier,r=0===i;t.hasEmission=s.hasEmission&&r,t.renderOccluded=10===s.slot,t.oitPass=r?s.oitPass:0,t.terrainDepthTest=r&&s.terrainDepthTest,t.cullAboveTerrain=!!r&&s.cullAboveTerrain;const o=this.isIntegratedMesh?d(s)?h(s)?3:2:1:0;t.integratedMeshMode=o,t.pbrMode=3===o?4:this.usePBR?this.hasParametersFromSource?t.shadeNormals&&this.isIntegratedMesh?0:2:1:0;const{hasEmissiveTexture:a,emissiveSourceOverride:n}=this,u=1===n,c=2===n;t.emissionSource=this.hasEmissions?this.hasEmissiveBase?c?a?4:2:u?a?5:7:6:u?7:6:0,t.hasSlicePlane=null!=s.slicePlane&&this.slicePlaneEnabled,t.isGroundSlice=t.hasSlicePlane&&this.isGround;const p=this.computeMaterialPass();t.blendingEnabled=1===p||2===p||4===p||t.isGroundSlice,t.hasHighlightMixTexture=2===i&&null!=s.highlightMixTexture,t.output=e.output,t.snowCover=r&&s.snowCover>0,t.vertexDiscardMode=r&&2===p?e.transparent?2:1:0;const m=r&&l(e.output);return t.receiveAmbientOcclusion=m&&this.applySSAO&&null!=s.ssao?.getTexture(),t.hasOccludees=m&&s.hasOccludees,t.receiveShadows=m&&s.shadowMap.ready,t.screenSpaceReflections=m&&null!=s.ssr.lastFrameColor,t.cloudReflections=m&&null!=s.clouds.data?.cubeMap?.colorTexture,t}computeMaterialPass(){const{_configuration:e,objectTransparent:s,baseColorTranslucent:t,isIntegratedMesh:i,transparent:r,opaqueOverride:o}=this,{alphaDiscardMode:a,hasSlicePlane:n}=e;if(i)return s||n?4:3;if(s)return 1;if(0===o)return 0;if(t||0===a||3===a)return 1;switch(r){case 2:return 0;case 0:return 1;case 1:return 2}}updateOpacity(e){this.objectTransparent=e<1}updateComponentParameters(e){this.transparent=e.transparent,this.opaqueOverride=e.opaqueOverride,this.emissiveOverride=e.emissiveOverride,this.emissiveSourceOverride=e.emissiveSourceOverride,this.castShadows=e.castShadows,this._configuration.componentDataType=e.componentDataType,this._setDirty()}update(e){void 0!==e.usePBR&&(this.usePBR=e.usePBR),void 0!==e.slicePlaneEnabled&&(this.slicePlaneEnabled=e.slicePlaneEnabled),void 0!==e.polygonOffsetEnabled&&(this.polygonOffsetEnabled=e.polygonOffsetEnabled,this._configuration.hasPolygonOffset=this.polygonOffsetEnabled,this._setDirty())}}function h(e){return null!=e.overlay?.getTexture(3)}function d(e){return null!=e.overlay?.getTexture(1)}e([a()],u.prototype,"objectTransparent",void 0),e([a()],u.prototype,"polygonOffsetEnabled",void 0),e([a()],u.prototype,"slicePlaneEnabled",void 0),e([a()],u.prototype,"usePBR",void 0),e([a()],u.prototype,"emissiveOverride",void 0),e([a()],u.prototype,"emissiveSourceOverride",void 0),e([a()],u.prototype,"transparent",void 0),e([a()],u.prototype,"opaqueOverride",void 0),e([a()],u.prototype,"castShadows",void 0);export{u as ComponentMaterial};
@@ -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{isMars as e,isMoon as r}from"../../../../../../geometry/support/spatialReferenceUtils.js";function t(t){return t&&e(t)?2:t&&r(t)?3:1}export{t as getEllipsoidMode};
5
+ import{isMars as o,isMoon as r}from"../../../../../../geometry/ellipsoidUtils.js";function t(t){return t&&o(t)?2:t&&r(t)?3:1}export{t as getEllipsoidMode};
@@ -2,7 +2,7 @@
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{property as r,subclass as t}from"../../../../../core/accessorSupport/decorators.js";import{ZEROS as o}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{RenderCategory as n}from"../../../webgl.js";import i from"../../../webgl/RenderNode.js";import{If as a,glsl as s}from"../../core/shaderModules/glsl.js";import{Pos2Locations as c}from"../../lib/DefaultVertexBufferLayouts.js";import{checkWebGLError as l}from"../../../../webgl/checkWebGLError.js";import{ColorAttachment0 as u,SizedPixelFormat as h,DataType as p}from"../../../../webgl/enums.js";let f=class extends i{constructor(e){super(e),this.destroyedCB=null,this.produces=n.FINAL,this.consumes={required:[n.FINAL]},this.clearColor=o,this._focusedFBOType=7,this._program=new Map}destroy(){this._program.forEach(e=>e.dispose()),this._program.clear(),this.destroyedCB()}render(e){const r=e.find(({name:e})=>e===n.FINAL);if(!this._focusedFBO)return r;const t=this.renderingContext;t.bindFramebuffer(r.fbo),t.setClearColor(0,0,0,0),t.clear(16384);const o=this._focusedFBO.getTexture(),i=[m(o)],a=this._ensureProgram(t,!1,i);return t.useProgram(a),t.bindTexture(o,0),a.setUniform1i("colorTex0",0),a.setUniform1i("inputType",this._focusedFBOType),3===this._focusedFBOType&&a.setUniform2fv("nearFar",this.camera.nearFar),t.screen.draw(),r}getDownscaledFBO(e,r,t,o,n){0===r&&(o=e.width,n=e.height);const i=e.colorAttachments.length,a=[],s=new Array;for(let l=0;l<i;++l){const r=e.getColorTexture(u+l);if(r){const e=m(r);a.push(e);const{descriptor:t}=r;"float"!==e||t.hasMipmap||t.isImmutable||(r.generateMipmap(),s[l]=!0)}}const c=this.renderingContext,{depthStencilTexture:p}=e,f=this._ensureProgram(c,null!=p,a),d=this.fboCache.acquire(o,n,"fbo visualizer");c.useProgram(f),c.bindFramebuffer(d.fbo);const g=[];for(let l=0;l<i;++l){const r=u+l,t=`colorTex${l.toFixed()}`;c.bindTexture(e.getColorTexture(r),l),f.setUniform1i(t,l),l>0&&d.acquireColor(r,5,"fbo visualizer"),g.push(r)}const v=p?.descriptor.linearFilterDepth??!1;if(p){const e=i;p.setShadowFiltering(!1),c.bindTexture(p,e),f.setUniform1i("depthTex",e);const r=u+e;r>u&&d.acquireColor(r,5,"fbo visualizer"),g.push(r)}c.gl.drawBuffers(g),l(c.gl);const x=c.getViewport();c.setViewport(0,0,o,n),c.setClearColor(0,0,0,0),c.clear(16384),c.setBlendingEnabled(!0),c.setBlendFunction(1,771);const F="linear depth"===t||t.includes("shadow"),T="overlay highlight"===t||"highlights"===t||"highlight mix"===t,b="highlight coverage"===t,C=e.colorTexture?.descriptor,R=C?.internalFormat,B=F?0:T?1:b?2:R===h.R16F||R===h.R32F||R===h.R8?3:R===h.RG8?4:R===h.RGBA16F?5:R===h.RG8UI?6:7;f.setUniform1i("inputType",B),f.setUniform2fv("nearFar",this.camera.nearFar),c.screen.draw(),l(c.gl),c.bindFramebuffer(null),c.setViewport(x.x,x.y,x.width,x.height),0===r&&(this._focusedFBO=d,this._focusedFBOType=B);for(let l=0;l<i;++l)if(s[l]){const r=e.getColorTexture(u+l);r?.clearMipmap()}return p&&p.setShadowFiltering(v),d}clearFocusedFBO(){this._focusedFBO=null}getPreviewContent(e,r,t,o){const n=this.renderingContext,i=o.includes("\ndepth"),a=this.fboCache.acquire(e,r,"fbo visualizer");n.bindFramebuffer(a?.fbo);const s=n.getViewport();n.setViewport(0,0,e,r),n.setClearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),n.clear(16384),n.setBlendingEnabled(!0),n.setBlendFunction(1,771);const c=t.attachment,u=this._ensureProgram(n,!1,[m(c)]);n.useProgram(u),n.bindTexture(c,0),u.setUniform1i("colorTex0",0),u.setUniform1i("inputType",i||c.descriptor.internalFormat!==h.RGBA16F?7:5),n.screen.draw();const f=new ImageData(new Uint8ClampedArray(e*r*4),e,r);return n.gl.readPixels(0,0,e,r,6408,p.UNSIGNED_BYTE,new Uint8Array(f.data.buffer)),l(n.gl),n.bindFramebuffer(null),n.setViewport(s.x,s.y,s.width,s.height),a?.release(),f}_ensureProgram(e,r,t){const o=g({hasDepthAttachment:r,colorAttachmentTypes:t}),n=this._program.get(o);if(n)return n;const i="#version 300 es\n in vec2 position;\n out vec2 uv;\n\n void main() {\n gl_Position = vec4(position, 0.0, 1.0);\n uv = position * 0.5 + vec2(0.5);\n }",l=e=>{let r="";for(let t=0;t<e.length;++t){const o=e[t];r+=`layout(location = ${s.int(t)}) out vec4 fragColor${s.int(t)};\n uniform ${d(o)} colorTex${s.int(t)};`}return r},u=e=>{let r="";for(let t=1;t<e.length;++t){const o=e[t],n="float"===o?`vec4(texture(colorTex${t.toFixed()}, uv).rgb, 1.0)`:`texture(colorTex${t.toFixed()}, uv)`,i="float"===o?n:`vec4(vec2(${n}), 0.0, 1.0)`;r+=`fragColor${t.toFixed()} = ${i};`}return r},h=t.length,p=`#version 300 es\n precision highp float;\n precision highp usampler2D;\n\n in vec2 uv;\n ${l(t)}\n ${a(r,`layout(location = ${s.int(h)}) out vec4 fragDepth;\n uniform sampler2D depthTex;`)}\n\n uniform int inputType;\n uniform vec2 nearFar;\n\n // Factors to convert rgba back to float\n const vec4 RGBA_2_FLOAT_FACTORS = vec4(\n 255.0 / (256.0),\n 255.0 / (256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0 * 256.0)\n );\n\n\n float rgbaTofloat(vec4 rgba) {\n // Convert components from 0->1 back to 0->255 and then add the components together with their corresponding\n // fixed point factors, i.e. (256^1, 256^2, 256^3, 256^4)\n return dot(rgba, RGBA_2_FLOAT_FACTORS);\n }\n\n float linearDepthFromFloat(float depth) {\n depth = pow(depth, 0.2);\n return -(depth * (nearFar[1] - nearFar[0]) + nearFar[0]);\n }\n\n float linearDepthFromRGBA(vec4 depth) {\n return linearDepthFromFloat(rgbaTofloat(depth));\n }\n\n ${"float"===t[0]?"float linearDepthFromTexture(sampler2D depthTex, vec2 uv) {\n ivec2 iuv = ivec2(uv * vec2(textureSize(depthTex, 0)));\n return linearDepthFromRGBA(texelFetch(depthTex, iuv, 0));\n }":"float linearDepthFromTexture(usampler2D depthTex, vec2 uv) {\n ivec2 iuv = ivec2(uv * vec2(textureSize(depthTex, 0)));\n return linearDepthFromRGBA(vec4(texelFetch(depthTex, iuv, 0)) * 255.0);\n }"}\n\n void main() {\n ${a(t.length>0,s`
5
+ import{__decorate as e}from"tslib";import{property as r,subclass as t}from"../../../../../core/accessorSupport/decorators.js";import{ZEROS as o}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{RenderNodeOutput as n}from"../../../webgl.js";import i from"../../../webgl/RenderNode.js";import{If as a,glsl as s}from"../../core/shaderModules/glsl.js";import{Pos2Locations as c}from"../../lib/DefaultVertexBufferLayouts.js";import{checkWebGLError as l}from"../../../../webgl/checkWebGLError.js";import{ColorAttachment0 as u,SizedPixelFormat as h,DataType as p}from"../../../../webgl/enums.js";let f=class extends i{constructor(e){super(e),this.destroyedCB=null,this.produces=n.FINAL,this.consumes={required:[n.FINAL]},this.clearColor=o,this._focusedFBOType=7,this._program=new Map}destroy(){this._program.forEach(e=>e.dispose()),this._program.clear(),this.destroyedCB()}render(e){const r=e.find(({name:e})=>e===n.FINAL);if(!this._focusedFBO)return r;const t=this.renderingContext;t.bindFramebuffer(r.fbo),t.setClearColor(0,0,0,0),t.clear(16384);const o=this._focusedFBO.getTexture(),i=[m(o)],a=this._ensureProgram(t,!1,i);return t.useProgram(a),t.bindTexture(o,0),a.setUniform1i("colorTex0",0),a.setUniform1i("inputType",this._focusedFBOType),3===this._focusedFBOType&&a.setUniform2fv("nearFar",this.camera.nearFar),t.screen.draw(),r}getDownscaledFBO(e,r,t,o,n){0===r&&(o=e.width,n=e.height);const i=e.colorAttachments.length,a=[],s=new Array;for(let l=0;l<i;++l){const r=e.getColorTexture(u+l);if(r){const e=m(r);a.push(e);const{descriptor:t}=r;"float"!==e||t.hasMipmap||t.isImmutable||(r.generateMipmap(),s[l]=!0)}}const c=this.renderingContext,{depthStencilTexture:p}=e,f=this._ensureProgram(c,null!=p,a),d=this.fboCache.acquire(o,n,"fbo visualizer");c.useProgram(f),c.bindFramebuffer(d.fbo);const g=[];for(let l=0;l<i;++l){const r=u+l,t=`colorTex${l.toFixed()}`;c.bindTexture(e.getColorTexture(r),l),f.setUniform1i(t,l),l>0&&d.acquireColor(r,5,"fbo visualizer"),g.push(r)}const v=p?.descriptor.linearFilterDepth??!1;if(p){const e=i;p.setShadowFiltering(!1),c.bindTexture(p,e),f.setUniform1i("depthTex",e);const r=u+e;r>u&&d.acquireColor(r,5,"fbo visualizer"),g.push(r)}c.gl.drawBuffers(g),l(c.gl);const x=c.getViewport();c.setViewport(0,0,o,n),c.setClearColor(0,0,0,0),c.clear(16384),c.setBlendingEnabled(!0),c.setBlendFunction(1,771);const F="linear depth"===t||t.includes("shadow"),T="overlay highlight"===t||"highlights"===t||"highlight mix"===t,b="highlight coverage"===t,C=e.colorTexture?.descriptor,R=C?.internalFormat,B=F?0:T?1:b?2:R===h.R16F||R===h.R32F||R===h.R8?3:R===h.RG8?4:R===h.RGBA16F?5:R===h.RG8UI?6:7;f.setUniform1i("inputType",B),f.setUniform2fv("nearFar",this.camera.nearFar),c.screen.draw(),l(c.gl),c.bindFramebuffer(null),c.setViewport(x.x,x.y,x.width,x.height),0===r&&(this._focusedFBO=d,this._focusedFBOType=B);for(let l=0;l<i;++l)if(s[l]){const r=e.getColorTexture(u+l);r?.clearMipmap()}return p&&p.setShadowFiltering(v),d}clearFocusedFBO(){this._focusedFBO=null}getPreviewContent(e,r,t,o){const n=this.renderingContext,i=o.includes("\ndepth"),a=this.fboCache.acquire(e,r,"fbo visualizer");n.bindFramebuffer(a?.fbo);const s=n.getViewport();n.setViewport(0,0,e,r),n.setClearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),n.clear(16384),n.setBlendingEnabled(!0),n.setBlendFunction(1,771);const c=t.attachment,u=this._ensureProgram(n,!1,[m(c)]);n.useProgram(u),n.bindTexture(c,0),u.setUniform1i("colorTex0",0),u.setUniform1i("inputType",i||c.descriptor.internalFormat!==h.RGBA16F?7:5),n.screen.draw();const f=new ImageData(new Uint8ClampedArray(e*r*4),e,r);return n.gl.readPixels(0,0,e,r,6408,p.UNSIGNED_BYTE,new Uint8Array(f.data.buffer)),l(n.gl),n.bindFramebuffer(null),n.setViewport(s.x,s.y,s.width,s.height),a?.release(),f}_ensureProgram(e,r,t){const o=g({hasDepthAttachment:r,colorAttachmentTypes:t}),n=this._program.get(o);if(n)return n;const i="#version 300 es\n in vec2 position;\n out vec2 uv;\n\n void main() {\n gl_Position = vec4(position, 0.0, 1.0);\n uv = position * 0.5 + vec2(0.5);\n }",l=e=>{let r="";for(let t=0;t<e.length;++t){const o=e[t];r+=`layout(location = ${s.int(t)}) out vec4 fragColor${s.int(t)};\n uniform ${d(o)} colorTex${s.int(t)};`}return r},u=e=>{let r="";for(let t=1;t<e.length;++t){const o=e[t],n="float"===o?`vec4(texture(colorTex${t.toFixed()}, uv).rgb, 1.0)`:`texture(colorTex${t.toFixed()}, uv)`,i="float"===o?n:`vec4(vec2(${n}), 0.0, 1.0)`;r+=`fragColor${t.toFixed()} = ${i};`}return r},h=t.length,p=`#version 300 es\n precision highp float;\n precision highp usampler2D;\n\n in vec2 uv;\n ${l(t)}\n ${a(r,`layout(location = ${s.int(h)}) out vec4 fragDepth;\n uniform sampler2D depthTex;`)}\n\n uniform int inputType;\n uniform vec2 nearFar;\n\n // Factors to convert rgba back to float\n const vec4 RGBA_2_FLOAT_FACTORS = vec4(\n 255.0 / (256.0),\n 255.0 / (256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0 * 256.0)\n );\n\n\n float rgbaTofloat(vec4 rgba) {\n // Convert components from 0->1 back to 0->255 and then add the components together with their corresponding\n // fixed point factors, i.e. (256^1, 256^2, 256^3, 256^4)\n return dot(rgba, RGBA_2_FLOAT_FACTORS);\n }\n\n float linearDepthFromFloat(float depth) {\n depth = pow(depth, 0.2);\n return -(depth * (nearFar[1] - nearFar[0]) + nearFar[0]);\n }\n\n float linearDepthFromRGBA(vec4 depth) {\n return linearDepthFromFloat(rgbaTofloat(depth));\n }\n\n ${"float"===t[0]?"float linearDepthFromTexture(sampler2D depthTex, vec2 uv) {\n ivec2 iuv = ivec2(uv * vec2(textureSize(depthTex, 0)));\n return linearDepthFromRGBA(texelFetch(depthTex, iuv, 0));\n }":"float linearDepthFromTexture(usampler2D depthTex, vec2 uv) {\n ivec2 iuv = ivec2(uv * vec2(textureSize(depthTex, 0)));\n return linearDepthFromRGBA(vec4(texelFetch(depthTex, iuv, 0)) * 255.0);\n }"}\n\n void main() {\n ${a(t.length>0,s`
6
6
  if (inputType == ${3..toFixed()}) {
7
7
  fragColor0 = vec4(vec3(texture(colorTex0, uv).r), 1.0);
8
8
  } else if (inputType == ${4..toFixed()}) {
@@ -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{property as t,subclass as s}from"../../../../../core/accessorSupport/decorators.js";import{RenderCategory as r,InternalRenderCategory as i}from"../../../webgl.js";import o from"../../../webgl/RenderNode.js";import{F as n}from"../../../../../chunks/FocusAreaMask.glsl.js";import{FocusAreaMaskTechnique as a}from"./FocusAreaMaskTechnique.js";import{Pos3 as h}from"../../lib/DefaultVertexBufferLayouts.js";import{VertexArrayObject as c}from"../../lib/VertexArrayObject.js";import{DepthStencilAttachment as l,PrimitiveType as u}from"../../../../webgl/enums.js";import{noParameters as p}from"../../../../webgl/NoParameters.js";import{VertexBuffer as m}from"../../../../webgl/VertexBuffer.js";let d=class extends o{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[r.TRANSPARENT]},this.produces=i.FOCUSAREA,this._vaos=new Array,this._counts=new Array,this._origins=new Array,this._maskParameters=new n}initialize(){this.updateGeometries()}destroy(){this._vaos.forEach(e=>e.dispose()),this._vaos.length=this._counts.length=this._origins.length=0}precompile(){this.techniques.precompile(a)}render(e){const t=this.techniques.get(a),s=this.bindParameters,o=s.camera,n=o.fullViewport[2],h=o.fullViewport[3];if(!t.compiled||!this._vaos)return void this.requestRender(1);const c=e.find(({name:e})=>e===r.TRANSPARENT),m=this.renderingContext,d=this.fboCache.acquire(n,h,i.FOCUSAREA,2);this.view.stage.renderer.occludedRequiresStencil?(d.acquireDepth(14),m.blitFramebuffer(c.fbo,d.fbo,256)):d.attachDepth(c.getAttachment(l)),m.bindFramebuffer(d.fbo),m.setClearColor(0,0,0,1),m.clear(17408),m.setViewport(0,0,n,h);const f=m.bindTechnique(t,s);m.setFaceCullingEnabled(!1),m.setStencilTestEnabled(!0),m.setStencilOpSeparate(1028,7680,34055,7680),m.setStencilOpSeparate(1029,7680,34056,7680),m.setDepthWriteEnabled(!1);for(let r=0;r<this._vaos.length;r++){const e=this._vaos[r],t=this._counts[r];this._maskParameters.origin=this._origins[r],f.bindDraw(s,p,this._maskParameters),m.bindVAO(e),m.setDepthTestEnabled(!0),m.setStencilWriteMask(255),m.setStencilFunction(519,0,255),m.setColorMask(!1,!1,!1,!1),m.drawArrays(u.TRIANGLES,0,t),m.setDepthTestEnabled(!1),m.setStencilWriteMask(0),m.setStencilFunction(517,0,255),m.setColorMask(!0,!0,!0,!0),m.drawArrays(u.TRIANGLES,0,t)}return d}updateGeometries(){if(!this.view.stage)return;this._vaos.forEach(e=>e.dispose()),this._vaos.length=this._counts.length=this._origins.length=0;this.focusAreasView.volumes.forEach(e=>{const t=new Array;let s=0,r=0;e.geometryVolumes.forEach(e=>{const i=e.indicesBottom;s+=i.length;for(let s=0;s<i.length;s++)t.push(e.positions[3*(i[s]-1)]),t.push(e.positions[3*(i[s]-1)+1]),t.push(e.positions[3*(i[s]-1)+2]);const o=e.indicesExtruded;r+=o.length;for(let s=0;s<o.length;s++)t.push(e.positions[3*o[s]]),t.push(e.positions[3*o[s]+1]),t.push(e.positions[3*o[s]+2])});const i=new c(this.renderingContext,new m(this.renderingContext,h,new Float32Array(t)));this._vaos.push(i),this._counts.push(s+r),this._origins.push(e.origin)}),this.requestRender(1)}};e([t()],d.prototype,"consumes",void 0),e([t()],d.prototype,"produces",void 0),e([t({constructOnly:!0})],d.prototype,"focusAreasView",void 0),d=e([s("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaMaskNode")],d);export{d as FocusAreaMaskNode};
5
+ import{__decorate as e}from"tslib";import{property as t,subclass as s}from"../../../../../core/accessorSupport/decorators.js";import{RenderNodeOutput as r,InternalRenderCategory as i}from"../../../webgl.js";import o from"../../../webgl/RenderNode.js";import{F as n}from"../../../../../chunks/FocusAreaMask.glsl.js";import{FocusAreaMaskTechnique as a}from"./FocusAreaMaskTechnique.js";import{Pos3 as h}from"../../lib/DefaultVertexBufferLayouts.js";import{VertexArrayObject as c}from"../../lib/VertexArrayObject.js";import{DepthStencilAttachment as l,PrimitiveType as u}from"../../../../webgl/enums.js";import{noParameters as p}from"../../../../webgl/NoParameters.js";import{VertexBuffer as m}from"../../../../webgl/VertexBuffer.js";let d=class extends o{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[r.TRANSPARENT]},this.produces=i.FOCUSAREA,this._vaos=new Array,this._counts=new Array,this._origins=new Array,this._maskParameters=new n}initialize(){this.updateGeometries()}destroy(){this._vaos.forEach(e=>e.dispose()),this._vaos.length=this._counts.length=this._origins.length=0}precompile(){this.techniques.precompile(a)}render(e){const t=this.techniques.get(a),s=this.bindParameters,o=s.camera,n=o.fullViewport[2],h=o.fullViewport[3];if(!t.compiled||!this._vaos)return void this.requestRender(1);const c=e.find(({name:e})=>e===r.TRANSPARENT),m=this.renderingContext,d=this.fboCache.acquire(n,h,i.FOCUSAREA,2);this.view.stage.renderer.occludedRequiresStencil?(d.acquireDepth(14),m.blitFramebuffer(c.fbo,d.fbo,256)):d.attachDepth(c.getAttachment(l)),m.bindFramebuffer(d.fbo),m.setClearColor(0,0,0,1),m.clear(17408),m.setViewport(0,0,n,h);const f=m.bindTechnique(t,s);m.setFaceCullingEnabled(!1),m.setStencilTestEnabled(!0),m.setStencilOpSeparate(1028,7680,34055,7680),m.setStencilOpSeparate(1029,7680,34056,7680),m.setDepthWriteEnabled(!1);for(let r=0;r<this._vaos.length;r++){const e=this._vaos[r],t=this._counts[r];this._maskParameters.origin=this._origins[r],f.bindDraw(s,p,this._maskParameters),m.bindVAO(e),m.setDepthTestEnabled(!0),m.setStencilWriteMask(255),m.setStencilFunction(519,0,255),m.setColorMask(!1,!1,!1,!1),m.drawArrays(u.TRIANGLES,0,t),m.setDepthTestEnabled(!1),m.setStencilWriteMask(0),m.setStencilFunction(517,0,255),m.setColorMask(!0,!0,!0,!0),m.drawArrays(u.TRIANGLES,0,t)}return d}updateGeometries(){if(!this.view.stage)return;this._vaos.forEach(e=>e.dispose()),this._vaos.length=this._counts.length=this._origins.length=0;this.focusAreasView.volumes.forEach(e=>{const t=new Array;let s=0,r=0;e.geometryVolumes.forEach(e=>{const i=e.indicesBottom;s+=i.length;for(let s=0;s<i.length;s++)t.push(e.positions[3*(i[s]-1)]),t.push(e.positions[3*(i[s]-1)+1]),t.push(e.positions[3*(i[s]-1)+2]);const o=e.indicesExtruded;r+=o.length;for(let s=0;s<o.length;s++)t.push(e.positions[3*o[s]]),t.push(e.positions[3*o[s]+1]),t.push(e.positions[3*o[s]+2])});const i=new c(this.renderingContext,new m(this.renderingContext,h,new Float32Array(t)));this._vaos.push(i),this._counts.push(s+r),this._origins.push(e.origin)}),this.requestRender(1)}};e([t()],d.prototype,"consumes",void 0),e([t()],d.prototype,"produces",void 0),e([t({constructOnly:!0})],d.prototype,"focusAreasView",void 0),d=e([s("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaMaskNode")],d);export{d as FocusAreaMaskNode};
@@ -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{smoothstep as t,clamp as s}from"../../../../../core/mathUtils.js";import{watch as i,syncAndInitial as r}from"../../../../../core/reactiveUtils.js";import{property as a,subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{normalize as h,set as c,dot as p}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getDefaultHighlightOptions as d}from"../../../../2d/support/highlightOptionsUtils.js";import{RenderCategory as m}from"../../../webgl.js";import l from"../../../webgl/RenderNode.js";import{ShadowHighlightPassParameters as u,ShadowHighlightTechnique as g}from"./ShadowHighlightTechnique.js";import{defaultShadowOpacity as f,defaultShadowDifference as w,defaultShadowColor as _}from"../../../../support/HighlightDefaults.js";const O=1/512,y=4e4,P=5e4;let v=class extends l{constructor(e){super(e),this.produces=m.COMPOSITE,this.consumes={required:[m.COMPOSITE,"highlights"]},this._passParameters=new u,this._maxOpacity=1,this._shadowDifference=.2}initialize(){this.addHandles([i(()=>d(this.view)?.shadowOpacity,e=>{this._passParameters.shadowOpacity=e??f,this._updateOccludedShadowOpacity(),this._ensureMaxOpacity()},r),i(()=>d(this.view)?.shadowDifference,e=>{this._shadowDifference=e??w,this._updateOccludedShadowOpacity(),this._ensureMaxOpacity()},r),i(()=>d(this.view)?.shadowColor,e=>{this._passParameters.shadowColor=(e??_).toUnitRGBA(),this._ensureMaxOpacity()},r)])}_updateOccludedShadowOpacity(){this._passParameters.occludedShadowOpacity=this._passParameters.shadowOpacity*(1-this._shadowDifference)}_ensureMaxOpacity(){const e=Math.max(this._passParameters.shadowOpacity,this._passParameters.occludedShadowOpacity);this._maxOpacity=e*this._passParameters.shadowColor[3],this.requestRender(1)}precompile(){this.techniques.precompile(g)}render(e){const t=e.find(({name:e})=>e===m.COMPOSITE),s=this.bindParameters;if(!s.shadowHighlightsVisible||!s.depth||!this._ensureIfVisible(s.camera,s.lighting.mainLight.direction))return t;const i=this.techniques.get(g);if(!i.compiled)return this.requestRender(1),t;this._passParameters.highlightTexture=e.find(({name:e})=>"highlights"===e)?.getTexture(),this._passParameters.origin=s.camera.center;const r=this.renderingContext;return r.bindFramebuffer(t.fbo),r.bindTechnique(i,s,this._passParameters),r.screen.draw(),t}_ensureIfVisible(e,i){this._passParameters.opacityElevation=1-t(y,P,e.relativeElevation);const r=1===this.viewingMode?h(x,e.center):c(x,0,0,1),a=p(r,i);return this._passParameters.dayNightTerminator=t(0,1,s(30*a,0,1)),this._maxOpacity*this._passParameters.opacityElevation*this._passParameters.dayNightTerminator>=O}};e([a()],v.prototype,"produces",void 0),e([a()],v.prototype,"consumes",void 0),e([a({constructOnly:!0})],v.prototype,"viewingMode",void 0),v=e([o("esri.views.3d.webgl-engine.effects.highlight.ShadowHighlight")],v);const x=n();export{v as ShadowHighlight};
5
+ import{__decorate as e}from"tslib";import{smoothstep as t,clamp as s}from"../../../../../core/mathUtils.js";import{watch as i,syncAndInitial as r}from"../../../../../core/reactiveUtils.js";import{property as a,subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{normalize as h,set as c,dot as p}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getDefaultHighlightOptions as d}from"../../../../2d/support/highlightOptionsUtils.js";import{RenderNodeOutput as m}from"../../../webgl.js";import l from"../../../webgl/RenderNode.js";import{ShadowHighlightPassParameters as u,ShadowHighlightTechnique as g}from"./ShadowHighlightTechnique.js";import{defaultShadowOpacity as f,defaultShadowDifference as w,defaultShadowColor as _}from"../../../../support/HighlightDefaults.js";const O=1/512,y=4e4,P=5e4;let v=class extends l{constructor(e){super(e),this.produces=m.COMPOSITE,this.consumes={required:[m.COMPOSITE,"highlights"]},this._passParameters=new u,this._maxOpacity=1,this._shadowDifference=.2}initialize(){this.addHandles([i(()=>d(this.view)?.shadowOpacity,e=>{this._passParameters.shadowOpacity=e??f,this._updateOccludedShadowOpacity(),this._ensureMaxOpacity()},r),i(()=>d(this.view)?.shadowDifference,e=>{this._shadowDifference=e??w,this._updateOccludedShadowOpacity(),this._ensureMaxOpacity()},r),i(()=>d(this.view)?.shadowColor,e=>{this._passParameters.shadowColor=(e??_).toUnitRGBA(),this._ensureMaxOpacity()},r)])}_updateOccludedShadowOpacity(){this._passParameters.occludedShadowOpacity=this._passParameters.shadowOpacity*(1-this._shadowDifference)}_ensureMaxOpacity(){const e=Math.max(this._passParameters.shadowOpacity,this._passParameters.occludedShadowOpacity);this._maxOpacity=e*this._passParameters.shadowColor[3],this.requestRender(1)}precompile(){this.techniques.precompile(g)}render(e){const t=e.find(({name:e})=>e===m.COMPOSITE),s=this.bindParameters;if(!s.shadowHighlightsVisible||!s.depth||!this._ensureIfVisible(s.camera,s.lighting.mainLight.direction))return t;const i=this.techniques.get(g);if(!i.compiled)return this.requestRender(1),t;this._passParameters.highlightTexture=e.find(({name:e})=>"highlights"===e)?.getTexture(),this._passParameters.origin=s.camera.center;const r=this.renderingContext;return r.bindFramebuffer(t.fbo),r.bindTechnique(i,s,this._passParameters),r.screen.draw(),t}_ensureIfVisible(e,i){this._passParameters.opacityElevation=1-t(y,P,e.relativeElevation);const r=1===this.viewingMode?h(x,e.center):c(x,0,0,1),a=p(r,i);return this._passParameters.dayNightTerminator=t(0,1,s(30*a,0,1)),this._maxOpacity*this._passParameters.opacityElevation*this._passParameters.dayNightTerminator>=O}};e([a()],v.prototype,"produces",void 0),e([a()],v.prototype,"consumes",void 0),e([a({constructOnly:!0})],v.prototype,"viewingMode",void 0),v=e([o("esri.views.3d.webgl-engine.effects.highlight.ShadowHighlight")],v);const x=n();export{v as ShadowHighlight};
@@ -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 r from"../../../../../core/Logger.js";import{abortMaybe as t,disposeMaybe as s}from"../../../../../core/maybe.js";import{throwIfAborted as i,isAbortError as a}from"../../../../../core/promiseUtils.js";import{watch as o,syncAndInitial as n}from"../../../../../core/reactiveUtils.js";import{property as h,subclass as l}from"../../../../../core/accessorSupport/decorators.js";import{requestImage as u}from"../../../../../request/image.js";import{RenderCategory as c,InternalRenderCategory as m}from"../../../webgl.js";import d from"../../../webgl/RenderNode.js";import{SMAABlendWeightsTechnique as p}from"./SMAABlendWeightsTechnique.js";import{SMAABlurTechnique as b}from"./SMAABlurTechnique.js";import{SMAAEdgeDetectTechnique as f}from"./SMAAEdgeDetectTechnique.js";import{SMAAPassParameters as T}from"./SMAAPassParameters.js";import x from"../../../../webgl/Texture.js";import{TextureDescriptor as _}from"../../../../webgl/TextureDescriptor.js";let g=class extends d{constructor(e){super(e),this.produces="disabled",this.consumes={required:[m.ANTIALIASING],optional:[c.COMPOSITE]},this._areaTexture=null,this._searchTexture=null,this._smaaParameters=new T}initialize(){this.addHandles([o(()=>this.isEnabled(),e=>e?this.enable():this.disable(),n)])}async enable(){if(this.destroyed)return;if(this.produces=m.ANTIALIASING,this.requestRender(1),this._abortController||this._areaTexture&&this._searchTexture)return;this._abortController=new AbortController;const e=this._abortController.signal;try{const r=await import("./SMAAData.js");i(e),await this._loadTextures(r,e),i(e),this.requestRender(1)}catch(t){a(t)||r.getLogger(this).errorOnce(t)}this._abortController=null}async _loadTextures(e,r){i(r);const[t,s]=await Promise.allSettled([u(e.areaTexture,{signal:r}),u(e.searchTexure,{signal:r})]);if(i(r),"fulfilled"!==t.status||"fulfilled"!==s.status)return;const a=this.renderingContext;this._areaTexture=w(a,9729,6407,t.value),this._searchTexture=w(a,9728,6409,s.value)}disable(){this.produces="disabled",this.requestRender(1)}destroy(){this._abortController=t(this._abortController),this._searchTexture=s(this._searchTexture),this._areaTexture=s(this._areaTexture)}precompile(){this.techniques.precompile(f),this.techniques.precompile(p),this.techniques.precompile(b)}render(e){const r=e.find(({name:e})=>e===m.ANTIALIASING),t=e.find(({name:e})=>e===c.COMPOSITE);if(!t)return r;if(!this._areaTexture||!this._searchTexture)return this.view.stage.renderer.blitFBO(t,r,!1),this.requestRender(1),r;const s=this.techniques.get(f),i=this.techniques.get(p),a=this.techniques.get(b);if(!s.compiled||!i.compiled||!a.compiled)return this.view.stage.renderer.blitFBO(t,r,!1),this.requestRender(1),r;const o=t.fbo.width,n=t.fbo.height,h=this.renderingContext;h.setViewport(0,0,o,n);const l=this.fboCache.acquire(o,n,"smaa edges",2);h.bindFramebuffer(l.fbo),h.setClearColor(0,0,0,1),h.clear(16384),this._smaaParameters.color=t.getTexture();const u=this.bindParameters;h.bindTechnique(s,u,this._smaaParameters),h.screen.draw();const d=this.fboCache.acquire(o,n,"smaa blend");return h.bindFramebuffer(d.fbo),h.setClearColor(0,0,1,1),h.clear(16384),this._smaaParameters.inputTexture=l.getTexture(),this._smaaParameters.areaTexture=this._areaTexture,this._smaaParameters.searchTexture=this._searchTexture,h.bindTechnique(i,u,this._smaaParameters),h.screen.draw(),l.release(),h.bindFramebuffer(r.fbo),h.setClearColor(0,1,0,1),h.clear(16384),this._smaaParameters.inputTexture=d.getTexture(),h.bindTechnique(a,u,this._smaaParameters),h.screen.draw(),d.release(),r}};function w(e,r,t,s){const i=new _(s.width,s.height);return i.pixelFormat=t,i.wrapMode=33071,i.samplingMode=r,new x(e,i,s)}e([h()],g.prototype,"produces",void 0),e([h()],g.prototype,"consumes",void 0),e([h({constructOnly:!0})],g.prototype,"isEnabled",void 0),e([h()],g.prototype,"_abortController",void 0),g=e([l("esri.views.3d.webgl-engine.effects.smaa.SMAA")],g);export{g as SMAA};
5
+ import{__decorate as e}from"tslib";import r from"../../../../../core/Logger.js";import{abortMaybe as t,disposeMaybe as s}from"../../../../../core/maybe.js";import{throwIfAborted as i,isAbortError as a}from"../../../../../core/promiseUtils.js";import{watch as o,syncAndInitial as n}from"../../../../../core/reactiveUtils.js";import{property as h,subclass as l}from"../../../../../core/accessorSupport/decorators.js";import{requestImage as u}from"../../../../../request/image.js";import{RenderNodeOutput as c,InternalRenderCategory as m}from"../../../webgl.js";import d from"../../../webgl/RenderNode.js";import{SMAABlendWeightsTechnique as p}from"./SMAABlendWeightsTechnique.js";import{SMAABlurTechnique as b}from"./SMAABlurTechnique.js";import{SMAAEdgeDetectTechnique as f}from"./SMAAEdgeDetectTechnique.js";import{SMAAPassParameters as T}from"./SMAAPassParameters.js";import x from"../../../../webgl/Texture.js";import{TextureDescriptor as _}from"../../../../webgl/TextureDescriptor.js";let g=class extends d{constructor(e){super(e),this.produces="disabled",this.consumes={required:[m.ANTIALIASING],optional:[c.COMPOSITE]},this._areaTexture=null,this._searchTexture=null,this._smaaParameters=new T}initialize(){this.addHandles([o(()=>this.isEnabled(),e=>e?this.enable():this.disable(),n)])}async enable(){if(this.destroyed)return;if(this.produces=m.ANTIALIASING,this.requestRender(1),this._abortController||this._areaTexture&&this._searchTexture)return;this._abortController=new AbortController;const e=this._abortController.signal;try{const r=await import("./SMAAData.js");i(e),await this._loadTextures(r,e),i(e),this.requestRender(1)}catch(t){a(t)||r.getLogger(this).errorOnce(t)}this._abortController=null}async _loadTextures(e,r){i(r);const[t,s]=await Promise.allSettled([u(e.areaTexture,{signal:r}),u(e.searchTexure,{signal:r})]);if(i(r),"fulfilled"!==t.status||"fulfilled"!==s.status)return;const a=this.renderingContext;this._areaTexture=w(a,9729,6407,t.value),this._searchTexture=w(a,9728,6409,s.value)}disable(){this.produces="disabled",this.requestRender(1)}destroy(){this._abortController=t(this._abortController),this._searchTexture=s(this._searchTexture),this._areaTexture=s(this._areaTexture)}precompile(){this.techniques.precompile(f),this.techniques.precompile(p),this.techniques.precompile(b)}render(e){const r=e.find(({name:e})=>e===m.ANTIALIASING),t=e.find(({name:e})=>e===c.COMPOSITE);if(!t)return r;if(!this._areaTexture||!this._searchTexture)return this.view.stage.renderer.blitFBO(t,r,!1),this.requestRender(1),r;const s=this.techniques.get(f),i=this.techniques.get(p),a=this.techniques.get(b);if(!s.compiled||!i.compiled||!a.compiled)return this.view.stage.renderer.blitFBO(t,r,!1),this.requestRender(1),r;const o=t.fbo.width,n=t.fbo.height,h=this.renderingContext;h.setViewport(0,0,o,n);const l=this.fboCache.acquire(o,n,"smaa edges",2);h.bindFramebuffer(l.fbo),h.setClearColor(0,0,0,1),h.clear(16384),this._smaaParameters.color=t.getTexture();const u=this.bindParameters;h.bindTechnique(s,u,this._smaaParameters),h.screen.draw();const d=this.fboCache.acquire(o,n,"smaa blend");return h.bindFramebuffer(d.fbo),h.setClearColor(0,0,1,1),h.clear(16384),this._smaaParameters.inputTexture=l.getTexture(),this._smaaParameters.areaTexture=this._areaTexture,this._smaaParameters.searchTexture=this._searchTexture,h.bindTechnique(i,u,this._smaaParameters),h.screen.draw(),l.release(),h.bindFramebuffer(r.fbo),h.setClearColor(0,1,0,1),h.clear(16384),this._smaaParameters.inputTexture=d.getTexture(),h.bindTechnique(a,u,this._smaaParameters),h.screen.draw(),d.release(),r}};function w(e,r,t,s){const i=new _(s.width,s.height);return i.pixelFormat=t,i.wrapMode=33071,i.samplingMode=r,new x(e,i,s)}e([h()],g.prototype,"produces",void 0),e([h()],g.prototype,"consumes",void 0),e([h({constructOnly:!0})],g.prototype,"isEnabled",void 0),e([h()],g.prototype,"_abortController",void 0),g=e([l("esri.views.3d.webgl-engine.effects.smaa.SMAA")],g);export{g as SMAA};
@@ -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{disposeMaybe as t}from"../../../../core/maybe.js";import{watch as i,syncAndInitial as s}from"../../../../core/reactiveUtils.js";import{property as o,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{copy as l}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{RenderCategory as a,InternalRenderCategory as n}from"../../webgl.js";import{glLayout as u}from"../../support/buffer/glUtil.js";import{newLayout as c}from"../../support/buffer/InterleavedLayout.js";import h from"../../webgl/RenderNode.js";import{VertexArrayObject as m}from"./VertexArrayObject.js";import{C as d}from"../../../../chunks/CutFillComposition.glsl.js";import{CutFillCompositionTechnique as f}from"../shaders/CutFillCompositionTechnique.js";import{C as p}from"../../../../chunks/CutFillMask.glsl.js";import{CutFillMaskTechnique as C}from"../shaders/CutFillMaskTechnique.js";import{DefaultMaterialPassParameters as _,DefaultMaterialDrawParameters as g,DefaultMaterialTechnique as b}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as T}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{DepthStencilAttachment as q,PrimitiveType as V}from"../../../webgl/enums.js";import{noParameters as v}from"../../../webgl/NoParameters.js";import{VertexBuffer as F}from"../../../webgl/VertexBuffer.js";let w=class extends h{constructor(e){super(e),this.consumes={required:[a.OPAQUE]},this.produces=n.CUTFILL_COLOR,this.measureType="cut-fill",this._vaoCut=null,this._vaoFill=null,this._countCut=0,this._countFill=0,this._maskParameters=new p,this._cutVolumeParameters=new _,this._fillVolumeParameters=new _,this._compositeParameters=new d,this._drawParameters=new g;const t=1===e.view.state.viewingMode;this._cutVolumeTechniqueConfiguration=new T(t),this._cutVolumeTechniqueConfiguration.customDepthTest=2,this._cutVolumeTechniqueConfiguration.writeDepth=!1,this._cutVolumeTechniqueConfiguration.cullFace=1,this._cutVolumeTechniqueConfiguration.doubleSidedMode=2,this._fillVolumeTechniqueConfiguration=new T(t),this._fillVolumeTechniqueConfiguration.cullFace=2}initialize(){this.addHandles([i(()=>[this.cutColor,this.fillColor],()=>this._updateColors(),s),i(()=>this.measureType,()=>{this.precompile(),this.requestRender(1)},s)])}destroy(){this._vaoCut=t(this._vaoCut),this._vaoFill=t(this._vaoFill)}precompile(){"cut-fill"===this.measureType?(this._cutVolumeTechniqueConfiguration.cullFace=1,this._cutVolumeTechniqueConfiguration.doubleSidedMode=2):(this._cutVolumeTechniqueConfiguration.cullFace=0,this._cutVolumeTechniqueConfiguration.doubleSidedMode=0),this.techniques.precompile(b,this._cutVolumeTechniqueConfiguration),this.techniques.precompile(b,this._fillVolumeTechniqueConfiguration),this.techniques.precompile(C),this.techniques.precompile(f)}render(e){const t=this.techniques.get(b,this._cutVolumeTechniqueConfiguration),i=this.techniques.get(b,this._fillVolumeTechniqueConfiguration),s=this.techniques.get(C),o=this.techniques.get(f),r=e.find(({name:e})=>e===this.produces);if(!this._vaoCut||!this._vaoFill)return r;if(!(t&&i&&s.compiled&&o.compiled))return this.requestRender(1),r;const l=this.bindParameters,a=l.camera,n=a.fullViewport[2],u=a.fullViewport[3],c=this.renderingContext,h=this.fboCache,m=h.acquire(n,u,"cutfill color mask",2);m.attachDepth(r.getAttachment(q)),c.bindFramebuffer(m.fbo),c.setClearColor(0,0,0,1),c.clear(17408),c.setViewport(0,0,n,u),c.bindTechnique(s,l,v,this._maskParameters),c.setFaceCullingEnabled(!1),c.setStencilTestEnabled(!0),c.setStencilOpSeparate(1028,7680,34055,7680),c.setStencilOpSeparate(1029,7680,34056,7680),c.setDepthWriteEnabled(!1),c.bindVAO(this._vaoCut),c.setDepthTestEnabled(!0),c.setStencilWriteMask(255),c.setStencilFunction(519,0,255),c.setColorMask(!1,!1,!1,!1),c.drawArrays(V.TRIANGLES,0,this._countCut),c.setDepthTestEnabled(!1),c.setStencilWriteMask(0),c.setStencilFunction(517,0,255),c.setColorMask(!0,!1,!1,!1),c.drawArrays(V.TRIANGLES,0,this._countCut),c.bindVAO(this._vaoFill),c.setDepthTestEnabled(!0),c.setStencilWriteMask(255),c.setStencilFunction(519,0,255),c.setColorMask(!1,!0,!1,!1),c.drawArrays(V.TRIANGLES,0,this._countFill);const d=h.acquire(n,u,"cutfill color volumes",5);d.attachDepth(r.getAttachment(q)),c.bindFramebuffer(d.fbo),c.setClearColor(0,0,0,0),c.clear(16384),c.setColorMask(!0,!0,!0,!0),c.bindTechnique(t,this.bindParameters,this._cutVolumeParameters,this._drawParameters),c.setPolygonOffset(1,1),c.setPolygonOffsetFillEnabled(!0),c.bindVAO(this._vaoCut),c.drawArrays(V.TRIANGLES,0,this._countCut),c.bindTechnique(i,this.bindParameters,this._fillVolumeParameters,this._drawParameters),c.setPolygonOffset(0,0),c.setPolygonOffsetFillEnabled(!1),c.bindVAO(this._vaoFill),c.drawArrays(V.TRIANGLES,0,this._countFill);const p=this.fboCache.acquire(n,u,this.produces);return c.bindFramebuffer(p.fbo),this._compositeParameters.color=r.getTexture(),this._compositeParameters.cutFillVolumes=d.getTexture(),this._compositeParameters.cutFillMask=m.getTexture(),this.borderColor.toUnitRGBA(this._compositeParameters.borderColor),c.bindTechnique(o,l,this._compositeParameters),c.screen.draw(),m.release(),d.release(),p.attachDepth(r.getAttachment(q)),p}enable(){this.produces=n.CUTFILL_COLOR,this.requestRender(1)}disable(){this.produces="disabled",this.requestRender(1)}updateGeometries(e,i,s){this._vaoCut=t(this._vaoCut),this._vaoCut=this._createVao(e),this._countCut=e.indicesBottom.length+e.indicesExtruded.length,this._vaoFill=t(this._vaoFill),this._vaoFill=this._createVao(i),this._countFill=i.indicesBottom.length+i.indicesExtruded.length,this._maskParameters.origin=s,l(this._drawParameters.origin,s),this.requestRender(1)}_updateColors(){this._cutVolumeParameters.diffuse=this.cutColor.toUnitRGB(),this._cutVolumeParameters.opacity=this.cutColor.a,this._fillVolumeParameters.diffuse=this.fillColor.toUnitRGB(),this._fillVolumeParameters.opacity=this.fillColor.a,this.requestRender(1)}_createVao(e){const t=this.renderingContext,{vertices:i,normals:s,indicesBottom:o,indicesExtruded:r}=e,l=P.createBuffer(o.length+r.length),{position:a,normal:n}=l;for(let u=0;u<o.length;u++){const e=3*o[u];a.set(u,0,i[e]),a.set(u,1,i[e+1]),a.set(u,2,i[e+2]),n.set(u,0,s[e]),n.set(u,1,s[e+1]),n.set(u,2,s[e+2])}for(let u=0;u<r.length;u++){const e=u+o.length,t=3*r[u];a.set(e,0,i[t]),a.set(e,1,i[t+1]),a.set(e,2,i[t+2]),n.set(e,0,s[t]),n.set(e,1,s[t+1]),n.set(e,2,s[t+2])}const c=new F(t,u(P),l.buffer);return new m(t,c)}};e([o()],w.prototype,"consumes",void 0),e([o()],w.prototype,"produces",void 0),e([o()],w.prototype,"cutColor",void 0),e([o()],w.prototype,"fillColor",void 0),e([o()],w.prototype,"borderColor",void 0),e([o()],w.prototype,"measureType",void 0),w=e([r("esri.views.3d.webgl-engine.lib.CutFillColor")],w);const P=c().vec3f("position").vec3f("normal").freeze();class y{constructor(e,t,i,s){this.vertices=e,this.indicesBottom=t,this.indicesExtruded=i,this.normals=s}}export{w as CutFillColor,y as VolumeGeometry};
5
+ import{__decorate as e}from"tslib";import{disposeMaybe as t}from"../../../../core/maybe.js";import{watch as i,syncAndInitial as s}from"../../../../core/reactiveUtils.js";import{property as o,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{copy as l}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{RenderNodeOutput as a,InternalRenderCategory as n}from"../../webgl.js";import{glLayout as u}from"../../support/buffer/glUtil.js";import{newLayout as c}from"../../support/buffer/InterleavedLayout.js";import h from"../../webgl/RenderNode.js";import{VertexArrayObject as m}from"./VertexArrayObject.js";import{C as d}from"../../../../chunks/CutFillComposition.glsl.js";import{CutFillCompositionTechnique as f}from"../shaders/CutFillCompositionTechnique.js";import{C as p}from"../../../../chunks/CutFillMask.glsl.js";import{CutFillMaskTechnique as C}from"../shaders/CutFillMaskTechnique.js";import{DefaultMaterialPassParameters as _,DefaultMaterialDrawParameters as g,DefaultMaterialTechnique as b}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as T}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{DepthStencilAttachment as q,PrimitiveType as V}from"../../../webgl/enums.js";import{noParameters as v}from"../../../webgl/NoParameters.js";import{VertexBuffer as F}from"../../../webgl/VertexBuffer.js";let w=class extends h{constructor(e){super(e),this.consumes={required:[a.OPAQUE]},this.produces=n.CUTFILL_COLOR,this.measureType="cut-fill",this._vaoCut=null,this._vaoFill=null,this._countCut=0,this._countFill=0,this._maskParameters=new p,this._cutVolumeParameters=new _,this._fillVolumeParameters=new _,this._compositeParameters=new d,this._drawParameters=new g;const t=1===e.view.state.viewingMode;this._cutVolumeTechniqueConfiguration=new T(t),this._cutVolumeTechniqueConfiguration.customDepthTest=2,this._cutVolumeTechniqueConfiguration.writeDepth=!1,this._cutVolumeTechniqueConfiguration.cullFace=1,this._cutVolumeTechniqueConfiguration.doubleSidedMode=2,this._fillVolumeTechniqueConfiguration=new T(t),this._fillVolumeTechniqueConfiguration.cullFace=2}initialize(){this.addHandles([i(()=>[this.cutColor,this.fillColor],()=>this._updateColors(),s),i(()=>this.measureType,()=>{this.precompile(),this.requestRender(1)},s)])}destroy(){this._vaoCut=t(this._vaoCut),this._vaoFill=t(this._vaoFill)}precompile(){"cut-fill"===this.measureType?(this._cutVolumeTechniqueConfiguration.cullFace=1,this._cutVolumeTechniqueConfiguration.doubleSidedMode=2):(this._cutVolumeTechniqueConfiguration.cullFace=0,this._cutVolumeTechniqueConfiguration.doubleSidedMode=0),this.techniques.precompile(b,this._cutVolumeTechniqueConfiguration),this.techniques.precompile(b,this._fillVolumeTechniqueConfiguration),this.techniques.precompile(C),this.techniques.precompile(f)}render(e){const t=this.techniques.get(b,this._cutVolumeTechniqueConfiguration),i=this.techniques.get(b,this._fillVolumeTechniqueConfiguration),s=this.techniques.get(C),o=this.techniques.get(f),r=e.find(({name:e})=>e===this.produces);if(!this._vaoCut||!this._vaoFill)return r;if(!(t&&i&&s.compiled&&o.compiled))return this.requestRender(1),r;const l=this.bindParameters,a=l.camera,n=a.fullViewport[2],u=a.fullViewport[3],c=this.renderingContext,h=this.fboCache,m=h.acquire(n,u,"cutfill color mask",2);m.attachDepth(r.getAttachment(q)),c.bindFramebuffer(m.fbo),c.setClearColor(0,0,0,1),c.clear(17408),c.setViewport(0,0,n,u),c.bindTechnique(s,l,v,this._maskParameters),c.setFaceCullingEnabled(!1),c.setStencilTestEnabled(!0),c.setStencilOpSeparate(1028,7680,34055,7680),c.setStencilOpSeparate(1029,7680,34056,7680),c.setDepthWriteEnabled(!1),c.bindVAO(this._vaoCut),c.setDepthTestEnabled(!0),c.setStencilWriteMask(255),c.setStencilFunction(519,0,255),c.setColorMask(!1,!1,!1,!1),c.drawArrays(V.TRIANGLES,0,this._countCut),c.setDepthTestEnabled(!1),c.setStencilWriteMask(0),c.setStencilFunction(517,0,255),c.setColorMask(!0,!1,!1,!1),c.drawArrays(V.TRIANGLES,0,this._countCut),c.bindVAO(this._vaoFill),c.setDepthTestEnabled(!0),c.setStencilWriteMask(255),c.setStencilFunction(519,0,255),c.setColorMask(!1,!0,!1,!1),c.drawArrays(V.TRIANGLES,0,this._countFill);const d=h.acquire(n,u,"cutfill color volumes",5);d.attachDepth(r.getAttachment(q)),c.bindFramebuffer(d.fbo),c.setClearColor(0,0,0,0),c.clear(16384),c.setColorMask(!0,!0,!0,!0),c.bindTechnique(t,this.bindParameters,this._cutVolumeParameters,this._drawParameters),c.setPolygonOffset(1,1),c.setPolygonOffsetFillEnabled(!0),c.bindVAO(this._vaoCut),c.drawArrays(V.TRIANGLES,0,this._countCut),c.bindTechnique(i,this.bindParameters,this._fillVolumeParameters,this._drawParameters),c.setPolygonOffset(0,0),c.setPolygonOffsetFillEnabled(!1),c.bindVAO(this._vaoFill),c.drawArrays(V.TRIANGLES,0,this._countFill);const p=this.fboCache.acquire(n,u,this.produces);return c.bindFramebuffer(p.fbo),this._compositeParameters.color=r.getTexture(),this._compositeParameters.cutFillVolumes=d.getTexture(),this._compositeParameters.cutFillMask=m.getTexture(),this.borderColor.toUnitRGBA(this._compositeParameters.borderColor),c.bindTechnique(o,l,this._compositeParameters),c.screen.draw(),m.release(),d.release(),p.attachDepth(r.getAttachment(q)),p}enable(){this.produces=n.CUTFILL_COLOR,this.requestRender(1)}disable(){this.produces="disabled",this.requestRender(1)}updateGeometries(e,i,s){this._vaoCut=t(this._vaoCut),this._vaoCut=this._createVao(e),this._countCut=e.indicesBottom.length+e.indicesExtruded.length,this._vaoFill=t(this._vaoFill),this._vaoFill=this._createVao(i),this._countFill=i.indicesBottom.length+i.indicesExtruded.length,this._maskParameters.origin=s,l(this._drawParameters.origin,s),this.requestRender(1)}_updateColors(){this._cutVolumeParameters.diffuse=this.cutColor.toUnitRGB(),this._cutVolumeParameters.opacity=this.cutColor.a,this._fillVolumeParameters.diffuse=this.fillColor.toUnitRGB(),this._fillVolumeParameters.opacity=this.fillColor.a,this.requestRender(1)}_createVao(e){const t=this.renderingContext,{vertices:i,normals:s,indicesBottom:o,indicesExtruded:r}=e,l=P.createBuffer(o.length+r.length),{position:a,normal:n}=l;for(let u=0;u<o.length;u++){const e=3*o[u];a.set(u,0,i[e]),a.set(u,1,i[e+1]),a.set(u,2,i[e+2]),n.set(u,0,s[e]),n.set(u,1,s[e+1]),n.set(u,2,s[e+2])}for(let u=0;u<r.length;u++){const e=u+o.length,t=3*r[u];a.set(e,0,i[t]),a.set(e,1,i[t+1]),a.set(e,2,i[t+2]),n.set(e,0,s[t]),n.set(e,1,s[t+1]),n.set(e,2,s[t+2])}const c=new F(t,u(P),l.buffer);return new m(t,c)}};e([o()],w.prototype,"consumes",void 0),e([o()],w.prototype,"produces",void 0),e([o()],w.prototype,"cutColor",void 0),e([o()],w.prototype,"fillColor",void 0),e([o()],w.prototype,"borderColor",void 0),e([o()],w.prototype,"measureType",void 0),w=e([r("esri.views.3d.webgl-engine.lib.CutFillColor")],w);const P=c().vec3f("position").vec3f("normal").freeze();class y{constructor(e,t,i,s){this.vertices=e,this.indicesBottom=t,this.indicesExtruded=i,this.normals=s}}export{w as CutFillColor,y as VolumeGeometry};
@@ -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 t}from"tslib";import has from"../../../../core/has.js";import{nextPowerOfTwo as e}from"../../../../core/mathUtils.js";import{disposeMaybe as i,destroyMaybe as r}from"../../../../core/maybe.js";import{property as s,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{ortho as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{set as n}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UNIT_X as l,ZEROS as c}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{RenderCategory as d,InternalRenderCategory as p}from"../../webgl.js";import{glLayout as _}from"../../support/buffer/glUtil.js";import{newLayout as f}from"../../support/buffer/InterleavedLayout.js";import m from"../../webgl/RenderCamera.js";import g from"../../webgl/RenderNode.js";import{ShaderOutputConfiguration as F}from"../core/shaderLibrary/ShaderOutputConfiguration.js";import{VertexArrayObject as C}from"./VertexArrayObject.js";import{C as w}from"../../../../chunks/CutFillDepth.glsl.js";import{CutFillDepthTechnique as R}from"../shaders/CutFillDepthTechnique.js";import{CutFillDepthTechniqueConfiguration as P}from"../shaders/CutFillDepthTechniqueConfiguration.js";import{C as b}from"../../../../chunks/CutFillReduction.glsl.js";import{CutFillReductionTechnique as T}from"../shaders/CutFillReductionTechnique.js";import{CutFillReductionTechniqueConfiguration as x}from"../shaders/CutFillReductionTechniqueConfiguration.js";import{C as D}from"../../../../chunks/CutFillTargetDepth.glsl.js";import{CutFillTargetDepthTechnique as B}from"../shaders/CutFillTargetDepthTechnique.js";import{ImmediateTask as y,TaskPriority as j}from"../../../support/Scheduler.js";import{Yield as q}from"../../../support/Yield.js";import{PrimitiveType as S,DataType as E}from"../../../webgl/enums.js";import{Sync as v}from"../../../webgl/Sync.js";import{VertexBuffer as O}from"../../../webgl/VertexBuffer.js";let V=class extends g{constructor(t){super(t),this.consumes={required:[d.TRANSPARENT]},this.produces=p.CUTFILL_DEPTH,this._cutFillTargetDepthConfiguration=new F,this._cutFillDepthConfiguration=new P,this._cutFillReductionConfiguration=new x,this._cutFillTargetDepthParameters=new D,this._cutFillDepthParameters=new w,this._cutFillReductionParameters=new b,this.needsRender=!1,this.readyToRun=!1,this.done=!0,this._frameTask=y,this._results=new k,this._localOrigin=u(),this._maxTextureSize=4096,this._width=0,this._height=0,this._reducedWidth=0,this._reducedHeight=0,this._depthFormat=14,this._colorFormat=11,this._numChannels=2,this._targetVao=null,this._numReductions=3,this._reductionPasses=0,this._pixelBufferSize=0,this._pixelBufferOffset=0,this._perReductionPixelBufferSize=0}initialize(){this._frameTask=this.view.resourceController.scheduler.registerTask(j.VOLUME_MEASUREMENT,this),this.addHandles(this._frameTask),this._maxTextureSize=Math.min(has("esri-mobile")?1024:this._maxTextureSize,this.fboCache.rctx.parameters.maxTextureSize),this._cutFillTargetDepthConfiguration.output=7}destroy(){this._targetVao=i(this._targetVao);const t=this.gl;this._sync=r(this._sync),this._pixelBuffer&&(t.deleteBuffer(this._pixelBuffer),this._pixelBuffer=null,this._pixelBufferSize=0)}precompile(){this.techniques.precompile(B,this._cutFillTargetDepthConfiguration),this._cutFillDepthConfiguration.preparePass=0,this.techniques.precompile(R,this._cutFillDepthConfiguration),this._cutFillDepthConfiguration.preparePass=1,this.techniques.precompile(R,this._cutFillDepthConfiguration),this._cutFillReductionConfiguration.reductionPass=0,this.techniques.precompile(T,this._cutFillReductionConfiguration),this._cutFillReductionConfiguration.reductionPass=1,this.techniques.precompile(T,this._cutFillReductionConfiguration),this._cutFillReductionConfiguration.reductionPass=2,this.techniques.precompile(T,this._cutFillReductionConfiguration),this.view.stage.renderer.precompileCutFill()}render(t){const e=t.find(({name:t})=>t===p.CUTFILL_DEPTH);if(!this._orthographicCamera||!this._targetVao||!this.needsRender||this._sync)return e;const i=this.techniques.get(B,this._cutFillTargetDepthConfiguration);this._cutFillDepthConfiguration.preparePass=0;const r=this.techniques.get(R,this._cutFillDepthConfiguration);this._cutFillDepthConfiguration.preparePass=1;const s=this.techniques.get(R,this._cutFillDepthConfiguration);this._cutFillReductionConfiguration.reductionPass=0;const h=this.techniques.get(T,this._cutFillReductionConfiguration);this._cutFillReductionConfiguration.reductionPass=1;const o=this.techniques.get(T,this._cutFillReductionConfiguration);this._cutFillReductionConfiguration.reductionPass=2;const n=this.techniques.get(T,this._cutFillReductionConfiguration);if(!(i.compiled&&r.compiled&&s.compiled&&h.compiled&&o.compiled&&n.compiled))return this.requestRender(1),e;this.needsRender=!1;const a=this.renderingContext,u=this.fboCache,d=this.gl,_=a.getViewport(),f=u.acquire(this._width,this._height,"cutfill reference depth",this._depthFormat);a.bindFramebuffer(f.fbo),a.setViewport(0,0,this._width,this._height),a.clear(1280),this.view.stage.renderer.renderCutFillReferenceDepth(this._orthographicCamera);const m=u.acquire(this._width,this._height,"cutfill target depth",this._depthFormat);a.bindFramebuffer(m.fbo),a.setViewport(0,0,this._width,this._height),a.setClearDepth(1),a.clear(256),this._cutFillTargetDepthParameters.origin=this._localOrigin,this._cutFillTargetDepthParameters.cutFillCamera=this._orthographicCamera,a.bindTechnique(i,this.bindParameters,this._cutFillTargetDepthParameters),a.bindVAO(this._targetVao),a.drawArrays(S.TRIANGLES,0,this._targetVao.vertexCount("geometry"));const g=u.acquire(this._width,this._height,"cutfill reduction even",this._colorFormat),F=u.acquire(this._width,this._height,"cutfill reduction odd",this._colorFormat);return this._cutFillDepthParameters.referenceDepthTexture=f.depthTexture,this._cutFillDepthParameters.targetDepthTexture=m.depthTexture,this._pixelBuffer||(this._pixelBuffer=d.createBuffer()),d.bindBuffer(d.PIXEL_PACK_BUFFER,this._pixelBuffer),d.bufferData(d.PIXEL_PACK_BUFFER,this._pixelBufferSize,d.STREAM_READ),this._prepareFBO(g,this.width,this.height),a.bindTechnique(r,this.bindParameters,this._cutFillDepthParameters),a.screen.draw(),this._runPyramidReduction(g,F,h),this._prepareFBO(g,this.width,this.height,l),a.bindTechnique(s,this.bindParameters,this._cutFillDepthParameters),a.screen.draw(),this._runPyramidReduction(g,F,o),this._prepareFBO(g,this.width,this.height,c),a.bindTechnique(s,this.bindParameters,this._cutFillDepthParameters),a.screen.draw(),this._runPyramidReduction(g,F,n),f.release(),m.release(),g.release(),F.release(),d.bindBuffer(d.PIXEL_PACK_BUFFER,null),a.setViewport(_.x,_.y,_.width,_.height),this._sync=new v(d),setTimeout(()=>this.readyToRun=!0,0),e}setup(t,r){if(!this.done)return;this.done=!1;const s=this.renderingContext,{cameraDimensions:{width:h,height:o},localOriginRenderSpace:n}=t,a=this._maxTextureSize,u=o/h,l=h>o?a:a/u,c=h>o?a*u:a;this._width=e(l),this._height=e(c);const d=[this._width,this._height];this._orthographicCamera=this._createCamera(t,d),this._targetVao=i(this._targetVao),this._targetVao=z(s,r),this._localOrigin=n,this._reductionPasses=Math.ceil(Math.log2(Math.min(this._width,this._height))),this._reducedWidth=Math.ceil(this._width/2**this._reductionPasses),this._reducedHeight=Math.ceil(this._height/2**this._reductionPasses),this._perReductionPixelBufferSize=this._reducedWidth*this._reducedHeight*this._numChannels*4,this._pixelBufferSize=this._perReductionPixelBufferSize*this._numReductions,this._pixelBufferOffset=0}runTask(){if(!this._sync)return void(this.readyToRun=!1);try{if(!this._sync.poll())return q}catch(e){return this.readyToRun=!1,void(this._sync=r(this._sync))}this.readyToRun=!1,this._sync=r(this._sync);const t=this.gl;this._cpuBuffer=new Float32Array(this._pixelBufferSize/4),t.bindBuffer(t.PIXEL_PACK_BUFFER,this._pixelBuffer),t.getBufferSubData(t.PIXEL_PACK_BUFFER,0,this._cpuBuffer),t.bindBuffer(t.PIXEL_PACK_BUFFER,null),this._updateResults(this._cpuBuffer),this.done=!0}start(){0!==this._width&&0!==this._height&&(this.needsRender=!0,this.requestRender(1))}getResults(){return this._results}get width(){return this._width}get height(){return this._height}get updating(){return this.readyToRun||!this.done||this._frameTask.updating}_runPyramidReduction(t,e,i){const r=this.renderingContext,s=this.gl;let h=this._width,o=this._height;for(let n=0;n<this._reductionPasses;n++)h=Math.ceil(h/2),o=Math.ceil(o/2),this._cutFillReductionParameters.depthTexture=t.getTexture(),this._prepareFBO(e,h,o),r.bindTechnique(i,this.bindParameters,this._cutFillReductionParameters),r.screen.draw(),[t,e]=[e,t];s.readPixels(0,0,h,o,33319,E.FLOAT,this._pixelBufferOffset),this._pixelBufferOffset+=this._perReductionPixelBufferSize}_updateResults(t){const e=new U(0,1,a()),i=new U(0,0,a());for(let r=0;r<this._reducedWidth;r++)for(let s=0;s<this._reducedHeight;s++){let h=(r+s*this._reducedWidth)*this._numChannels;const o=this._reducedWidth*this._reducedHeight*this._numChannels;e.totalDepth+=t[h],i.totalDepth+=t[h+1],h+=o;const n=t[h];n<e.labelDepth&&(e.labelDepth=n,L(e.labelCoords,t[h+1],this._width)),h+=o;const a=t[h];a>i.labelDepth&&(i.labelDepth=a,L(i.labelCoords,t[h+1],this._width))}this._results=new k(this._width,this._height,e,i)}_prepareFBO(t,e,i,r=c){const s=this.renderingContext;s.bindFramebuffer(t.fbo),s.setViewport(0,0,e,i),s.setClearColor(r[0],r[1],r[2],r[3]),s.clear(16384)}_createCamera(t,e){const{cameraPositionRenderSpace:i,localOriginRenderSpace:r,northVector:s,cameraDimensions:{width:h,height:n},cameraNearFar:{near:a,far:u}}=t,l=new m({eye:i,center:r,up:s,near:a,far:u});return l.viewport=[0,0,e[0],e[1]],o(l.projectionMatrix,-h/2,h/2,-n/2,n/2,a,u),l}};t([s()],V.prototype,"consumes",void 0),t([s()],V.prototype,"produces",void 0),t([s()],V.prototype,"needsRender",void 0),t([s()],V.prototype,"readyToRun",void 0),t([s()],V.prototype,"done",void 0),t([s()],V.prototype,"updating",null),t([s()],V.prototype,"_frameTask",void 0),V=t([h("esri.views.3d.webgl-engine.lib.CutFillDepth")],V);const A=f().vec3f("position").freeze();function z(t,e){const{positions:i,indices:r}=e,s=A.createBuffer(r.length),h=s.position;for(let n=0;n<r.length;++n){const t=3*r[n];h.set(n,0,i[t]),h.set(n,1,i[t+1]),h.set(n,2,i[t+2])}const o=new O(t,_(A),s.buffer);return new C(t,o)}function L(t,e,i){const r=e%i,s=Math.floor(e/i);n(t,r,s)}class M{constructor(t,e){this.positions=t,this.indices=e}}class U{constructor(t,e,i){this.totalDepth=t,this.labelDepth=e,this.labelCoords=i}}class k{constructor(t=0,e=0,i=new U(0,1,a()),r=new U(0,0,a())){this.width=t,this.height=e,this.cut=i,this.fill=r}}export{V as CutFillDepth,U as DepthResult,k as RenderResult,M as TargetGeometryRenderInfo};
5
+ import{__decorate as t}from"tslib";import has from"../../../../core/has.js";import{nextPowerOfTwo as e}from"../../../../core/mathUtils.js";import{disposeMaybe as i,destroyMaybe as r}from"../../../../core/maybe.js";import{property as s,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{ortho as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{set as n}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UNIT_X as l,ZEROS as c}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{RenderNodeOutput as d,InternalRenderCategory as p}from"../../webgl.js";import{glLayout as _}from"../../support/buffer/glUtil.js";import{newLayout as f}from"../../support/buffer/InterleavedLayout.js";import m from"../../webgl/RenderCamera.js";import g from"../../webgl/RenderNode.js";import{ShaderOutputConfiguration as F}from"../core/shaderLibrary/ShaderOutputConfiguration.js";import{VertexArrayObject as C}from"./VertexArrayObject.js";import{C as w}from"../../../../chunks/CutFillDepth.glsl.js";import{CutFillDepthTechnique as R}from"../shaders/CutFillDepthTechnique.js";import{CutFillDepthTechniqueConfiguration as P}from"../shaders/CutFillDepthTechniqueConfiguration.js";import{C as b}from"../../../../chunks/CutFillReduction.glsl.js";import{CutFillReductionTechnique as T}from"../shaders/CutFillReductionTechnique.js";import{CutFillReductionTechniqueConfiguration as x}from"../shaders/CutFillReductionTechniqueConfiguration.js";import{C as D}from"../../../../chunks/CutFillTargetDepth.glsl.js";import{CutFillTargetDepthTechnique as B}from"../shaders/CutFillTargetDepthTechnique.js";import{ImmediateTask as y,TaskPriority as j}from"../../../support/Scheduler.js";import{Yield as q}from"../../../support/Yield.js";import{PrimitiveType as S,DataType as E}from"../../../webgl/enums.js";import{Sync as v}from"../../../webgl/Sync.js";import{VertexBuffer as O}from"../../../webgl/VertexBuffer.js";let V=class extends g{constructor(t){super(t),this.consumes={required:[d.TRANSPARENT]},this.produces=p.CUTFILL_DEPTH,this._cutFillTargetDepthConfiguration=new F,this._cutFillDepthConfiguration=new P,this._cutFillReductionConfiguration=new x,this._cutFillTargetDepthParameters=new D,this._cutFillDepthParameters=new w,this._cutFillReductionParameters=new b,this.needsRender=!1,this.readyToRun=!1,this.done=!0,this._frameTask=y,this._results=new k,this._localOrigin=u(),this._maxTextureSize=4096,this._width=0,this._height=0,this._reducedWidth=0,this._reducedHeight=0,this._depthFormat=14,this._colorFormat=11,this._numChannels=2,this._targetVao=null,this._numReductions=3,this._reductionPasses=0,this._pixelBufferSize=0,this._pixelBufferOffset=0,this._perReductionPixelBufferSize=0}initialize(){this._frameTask=this.view.resourceController.scheduler.registerTask(j.VOLUME_MEASUREMENT,this),this.addHandles(this._frameTask),this._maxTextureSize=Math.min(has("esri-mobile")?1024:this._maxTextureSize,this.fboCache.rctx.parameters.maxTextureSize),this._cutFillTargetDepthConfiguration.output=7}destroy(){this._targetVao=i(this._targetVao);const t=this.gl;this._sync=r(this._sync),this._pixelBuffer&&(t.deleteBuffer(this._pixelBuffer),this._pixelBuffer=null,this._pixelBufferSize=0)}precompile(){this.techniques.precompile(B,this._cutFillTargetDepthConfiguration),this._cutFillDepthConfiguration.preparePass=0,this.techniques.precompile(R,this._cutFillDepthConfiguration),this._cutFillDepthConfiguration.preparePass=1,this.techniques.precompile(R,this._cutFillDepthConfiguration),this._cutFillReductionConfiguration.reductionPass=0,this.techniques.precompile(T,this._cutFillReductionConfiguration),this._cutFillReductionConfiguration.reductionPass=1,this.techniques.precompile(T,this._cutFillReductionConfiguration),this._cutFillReductionConfiguration.reductionPass=2,this.techniques.precompile(T,this._cutFillReductionConfiguration),this.view.stage.renderer.precompileCutFill()}render(t){const e=t.find(({name:t})=>t===p.CUTFILL_DEPTH);if(!this._orthographicCamera||!this._targetVao||!this.needsRender||this._sync)return e;const i=this.techniques.get(B,this._cutFillTargetDepthConfiguration);this._cutFillDepthConfiguration.preparePass=0;const r=this.techniques.get(R,this._cutFillDepthConfiguration);this._cutFillDepthConfiguration.preparePass=1;const s=this.techniques.get(R,this._cutFillDepthConfiguration);this._cutFillReductionConfiguration.reductionPass=0;const h=this.techniques.get(T,this._cutFillReductionConfiguration);this._cutFillReductionConfiguration.reductionPass=1;const o=this.techniques.get(T,this._cutFillReductionConfiguration);this._cutFillReductionConfiguration.reductionPass=2;const n=this.techniques.get(T,this._cutFillReductionConfiguration);if(!(i.compiled&&r.compiled&&s.compiled&&h.compiled&&o.compiled&&n.compiled))return this.requestRender(1),e;this.needsRender=!1;const a=this.renderingContext,u=this.fboCache,d=this.gl,_=a.getViewport(),f=u.acquire(this._width,this._height,"cutfill reference depth",this._depthFormat);a.bindFramebuffer(f.fbo),a.setViewport(0,0,this._width,this._height),a.clear(1280),this.view.stage.renderer.renderCutFillReferenceDepth(this._orthographicCamera);const m=u.acquire(this._width,this._height,"cutfill target depth",this._depthFormat);a.bindFramebuffer(m.fbo),a.setViewport(0,0,this._width,this._height),a.setClearDepth(1),a.clear(256),this._cutFillTargetDepthParameters.origin=this._localOrigin,this._cutFillTargetDepthParameters.cutFillCamera=this._orthographicCamera,a.bindTechnique(i,this.bindParameters,this._cutFillTargetDepthParameters),a.bindVAO(this._targetVao),a.drawArrays(S.TRIANGLES,0,this._targetVao.vertexCount("geometry"));const g=u.acquire(this._width,this._height,"cutfill reduction even",this._colorFormat),F=u.acquire(this._width,this._height,"cutfill reduction odd",this._colorFormat);return this._cutFillDepthParameters.referenceDepthTexture=f.depthTexture,this._cutFillDepthParameters.targetDepthTexture=m.depthTexture,this._pixelBuffer||(this._pixelBuffer=d.createBuffer()),d.bindBuffer(d.PIXEL_PACK_BUFFER,this._pixelBuffer),d.bufferData(d.PIXEL_PACK_BUFFER,this._pixelBufferSize,d.STREAM_READ),this._prepareFBO(g,this.width,this.height),a.bindTechnique(r,this.bindParameters,this._cutFillDepthParameters),a.screen.draw(),this._runPyramidReduction(g,F,h),this._prepareFBO(g,this.width,this.height,l),a.bindTechnique(s,this.bindParameters,this._cutFillDepthParameters),a.screen.draw(),this._runPyramidReduction(g,F,o),this._prepareFBO(g,this.width,this.height,c),a.bindTechnique(s,this.bindParameters,this._cutFillDepthParameters),a.screen.draw(),this._runPyramidReduction(g,F,n),f.release(),m.release(),g.release(),F.release(),d.bindBuffer(d.PIXEL_PACK_BUFFER,null),a.setViewport(_.x,_.y,_.width,_.height),this._sync=new v(d),setTimeout(()=>this.readyToRun=!0,0),e}setup(t,r){if(!this.done)return;this.done=!1;const s=this.renderingContext,{cameraDimensions:{width:h,height:o},localOriginRenderSpace:n}=t,a=this._maxTextureSize,u=o/h,l=h>o?a:a/u,c=h>o?a*u:a;this._width=e(l),this._height=e(c);const d=[this._width,this._height];this._orthographicCamera=this._createCamera(t,d),this._targetVao=i(this._targetVao),this._targetVao=z(s,r),this._localOrigin=n,this._reductionPasses=Math.ceil(Math.log2(Math.min(this._width,this._height))),this._reducedWidth=Math.ceil(this._width/2**this._reductionPasses),this._reducedHeight=Math.ceil(this._height/2**this._reductionPasses),this._perReductionPixelBufferSize=this._reducedWidth*this._reducedHeight*this._numChannels*4,this._pixelBufferSize=this._perReductionPixelBufferSize*this._numReductions,this._pixelBufferOffset=0}runTask(){if(!this._sync)return void(this.readyToRun=!1);try{if(!this._sync.poll())return q}catch(e){return this.readyToRun=!1,void(this._sync=r(this._sync))}this.readyToRun=!1,this._sync=r(this._sync);const t=this.gl;this._cpuBuffer=new Float32Array(this._pixelBufferSize/4),t.bindBuffer(t.PIXEL_PACK_BUFFER,this._pixelBuffer),t.getBufferSubData(t.PIXEL_PACK_BUFFER,0,this._cpuBuffer),t.bindBuffer(t.PIXEL_PACK_BUFFER,null),this._updateResults(this._cpuBuffer),this.done=!0}start(){0!==this._width&&0!==this._height&&(this.needsRender=!0,this.requestRender(1))}getResults(){return this._results}get width(){return this._width}get height(){return this._height}get updating(){return this.readyToRun||!this.done||this._frameTask.updating}_runPyramidReduction(t,e,i){const r=this.renderingContext,s=this.gl;let h=this._width,o=this._height;for(let n=0;n<this._reductionPasses;n++)h=Math.ceil(h/2),o=Math.ceil(o/2),this._cutFillReductionParameters.depthTexture=t.getTexture(),this._prepareFBO(e,h,o),r.bindTechnique(i,this.bindParameters,this._cutFillReductionParameters),r.screen.draw(),[t,e]=[e,t];s.readPixels(0,0,h,o,33319,E.FLOAT,this._pixelBufferOffset),this._pixelBufferOffset+=this._perReductionPixelBufferSize}_updateResults(t){const e=new U(0,1,a()),i=new U(0,0,a());for(let r=0;r<this._reducedWidth;r++)for(let s=0;s<this._reducedHeight;s++){let h=(r+s*this._reducedWidth)*this._numChannels;const o=this._reducedWidth*this._reducedHeight*this._numChannels;e.totalDepth+=t[h],i.totalDepth+=t[h+1],h+=o;const n=t[h];n<e.labelDepth&&(e.labelDepth=n,L(e.labelCoords,t[h+1],this._width)),h+=o;const a=t[h];a>i.labelDepth&&(i.labelDepth=a,L(i.labelCoords,t[h+1],this._width))}this._results=new k(this._width,this._height,e,i)}_prepareFBO(t,e,i,r=c){const s=this.renderingContext;s.bindFramebuffer(t.fbo),s.setViewport(0,0,e,i),s.setClearColor(r[0],r[1],r[2],r[3]),s.clear(16384)}_createCamera(t,e){const{cameraPositionRenderSpace:i,localOriginRenderSpace:r,northVector:s,cameraDimensions:{width:h,height:n},cameraNearFar:{near:a,far:u}}=t,l=new m({eye:i,center:r,up:s,near:a,far:u});return l.viewport=[0,0,e[0],e[1]],o(l.projectionMatrix,-h/2,h/2,-n/2,n/2,a,u),l}};t([s()],V.prototype,"consumes",void 0),t([s()],V.prototype,"produces",void 0),t([s()],V.prototype,"needsRender",void 0),t([s()],V.prototype,"readyToRun",void 0),t([s()],V.prototype,"done",void 0),t([s()],V.prototype,"updating",null),t([s()],V.prototype,"_frameTask",void 0),V=t([h("esri.views.3d.webgl-engine.lib.CutFillDepth")],V);const A=f().vec3f("position").freeze();function z(t,e){const{positions:i,indices:r}=e,s=A.createBuffer(r.length),h=s.position;for(let n=0;n<r.length;++n){const t=3*r[n];h.set(n,0,i[t]),h.set(n,1,i[t+1]),h.set(n,2,i[t+2])}const o=new O(t,_(A),s.buffer);return new C(t,o)}function L(t,e,i){const r=e%i,s=Math.floor(e/i);n(t,r,s)}class M{constructor(t,e){this.positions=t,this.indices=e}}class U{constructor(t,e,i){this.totalDepth=t,this.labelDepth=e,this.labelCoords=i}}class k{constructor(t=0,e=0,i=new U(0,1,a()),r=new U(0,0,a())){this.width=t,this.height=e,this.cut=i,this.fill=r}}export{V as CutFillDepth,U as DepthResult,k as RenderResult,M as TargetGeometryRenderInfo};