@arcgis/core 4.33.0-next.20250416 → 4.33.0-next.20250418

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 (352) hide show
  1. package/analysis/Analysis.js +1 -1
  2. package/analysis/AreaMeasurementAnalysis.js +1 -1
  3. package/analysis/DimensionAnalysis.js +1 -1
  4. package/analysis/DirectLineMeasurementAnalysis.js +1 -1
  5. package/analysis/LengthDimension.js +1 -1
  6. package/analysis/LineOfSightAnalysis.js +1 -1
  7. package/analysis/SliceAnalysis.js +1 -1
  8. package/analysis/Viewshed.js +1 -1
  9. package/analysis/ViewshedAnalysis.js +1 -1
  10. package/assets/components/assets/icon/browserJoin16.json +1 -0
  11. package/assets/components/assets/icon/browserJoin24.json +1 -0
  12. package/assets/components/assets/icon/browserJoin32.json +1 -0
  13. package/assets/components/assets/icon/browserPlus16.json +1 -0
  14. package/assets/components/assets/icon/browserPlus24.json +1 -0
  15. package/assets/components/assets/icon/browserPlus32.json +1 -0
  16. package/assets/components/assets/icon/check16.json +1 -1
  17. package/assets/components/assets/icon/check24.json +1 -1
  18. package/assets/components/assets/icon/check32.json +1 -1
  19. package/assets/components/assets/icon/classroomGis16.json +1 -0
  20. package/assets/components/assets/icon/classroomGis24.json +1 -0
  21. package/assets/components/assets/icon/classroomGis32.json +1 -0
  22. package/assets/components/assets/icon/documentLearning16.json +1 -0
  23. package/assets/components/assets/icon/documentLearning24.json +1 -0
  24. package/assets/components/assets/icon/documentLearning32.json +1 -0
  25. package/assets/components/assets/icon/doubleFloatSet16.json +1 -0
  26. package/assets/components/assets/icon/doubleFloatSet24.json +1 -0
  27. package/assets/components/assets/icon/doubleFloatSet32.json +1 -0
  28. package/assets/components/assets/icon/eLearningGis16.json +1 -0
  29. package/assets/components/assets/icon/eLearningGis24.json +1 -0
  30. package/assets/components/assets/icon/eLearningGis32.json +1 -0
  31. package/assets/components/assets/icon/language216.json +1 -0
  32. package/assets/components/assets/icon/language224.json +1 -0
  33. package/assets/components/assets/icon/language232.json +1 -0
  34. package/assets/components/assets/icon/layerSet16.json +1 -0
  35. package/assets/components/assets/icon/layerSet24.json +1 -0
  36. package/assets/components/assets/icon/layerSet32.json +1 -0
  37. package/assets/components/assets/icon/learningGisWorkflow16.json +1 -0
  38. package/assets/components/assets/icon/learningGisWorkflow24.json +1 -0
  39. package/assets/components/assets/icon/learningGisWorkflow32.json +1 -0
  40. package/assets/components/assets/icon/learningSteps16.json +1 -0
  41. package/assets/components/assets/icon/learningSteps24.json +1 -0
  42. package/assets/components/assets/icon/learningSteps32.json +1 -0
  43. package/assets/components/assets/icon/learningWebCourse16.json +1 -0
  44. package/assets/components/assets/icon/learningWebCourse24.json +1 -0
  45. package/assets/components/assets/icon/learningWebCourse32.json +1 -0
  46. package/assets/components/assets/icon/mapInformation16.json +1 -0
  47. package/assets/components/assets/icon/mapInformation24.json +1 -0
  48. package/assets/components/assets/icon/mapInformation32.json +1 -0
  49. package/assets/components/assets/icon/mooc16.json +1 -0
  50. package/assets/components/assets/icon/mooc24.json +1 -0
  51. package/assets/components/assets/icon/mooc32.json +1 -0
  52. package/assets/components/assets/icon/multipleVariablesSet16.json +1 -0
  53. package/assets/components/assets/icon/multipleVariablesSet24.json +1 -0
  54. package/assets/components/assets/icon/multipleVariablesSet32.json +1 -0
  55. package/assets/components/assets/icon/parameters16.json +1 -0
  56. package/assets/components/assets/icon/parameters24.json +1 -0
  57. package/assets/components/assets/icon/parameters32.json +1 -0
  58. package/assets/components/assets/icon/parametersGear16.json +1 -0
  59. package/assets/components/assets/icon/parametersGear24.json +1 -0
  60. package/assets/components/assets/icon/parametersGear32.json +1 -0
  61. package/assets/components/assets/icon/parametersPlus16.json +1 -0
  62. package/assets/components/assets/icon/parametersPlus24.json +1 -0
  63. package/assets/components/assets/icon/parametersPlus32.json +1 -0
  64. package/assets/components/assets/icon/storymapExperience16.json +1 -0
  65. package/assets/components/assets/icon/storymapExperience24.json +1 -0
  66. package/assets/components/assets/icon/storymapExperience32.json +1 -0
  67. package/assets/components/assets/icon/stringSet16.json +1 -0
  68. package/assets/components/assets/icon/stringSet24.json +1 -0
  69. package/assets/components/assets/icon/stringSet32.json +1 -0
  70. package/assets/components/assets/icon/tableSet16.json +1 -0
  71. package/assets/components/assets/icon/tableSet24.json +1 -0
  72. package/assets/components/assets/icon/tableSet32.json +1 -0
  73. package/assets/components/assets/icon/variablePlus16.json +1 -0
  74. package/assets/components/assets/icon/variablePlus24.json +1 -0
  75. package/assets/components/assets/icon/variablePlus32.json +1 -0
  76. package/assets/components/assets/icon/videoLearning16.json +1 -0
  77. package/assets/components/assets/icon/videoLearning24.json +1 -0
  78. package/assets/components/assets/icon/videoLearning32.json +1 -0
  79. package/assets/esri/core/workers/RemoteClient.js +1 -1
  80. package/assets/esri/core/workers/chunks/02176f84d6d57f1bc1c8.js +2 -0
  81. package/assets/esri/core/workers/chunks/{75e01c6404cbd51daabc.js.LICENSE.txt → 02176f84d6d57f1bc1c8.js.LICENSE.txt} +1 -1
  82. package/assets/esri/core/workers/chunks/05cba30c0d3855de7a65.js +1 -0
  83. package/assets/esri/core/workers/chunks/{7ef9bcd58af499a14a08.js → 089a19381b66cd074425.js} +1 -1
  84. package/assets/esri/core/workers/chunks/{984c5047ab1fa632ca09.js → 0a7cba60a5286ba621d4.js} +1 -1
  85. package/assets/esri/core/workers/chunks/0be7a0f4c4f4f91d1957.js +1 -0
  86. package/assets/esri/core/workers/chunks/0c6f2808c57ff820bfdd.js +2 -0
  87. package/assets/esri/core/workers/chunks/{baed733a29aa65efc2a0.js.LICENSE.txt → 0c6f2808c57ff820bfdd.js.LICENSE.txt} +7 -1
  88. package/assets/esri/core/workers/chunks/103c78c8bfdb56227bc0.js +1 -0
  89. package/assets/esri/core/workers/chunks/184d7c8ea818bec5c462.js +1 -0
  90. package/assets/esri/core/workers/chunks/{4523ba4a3c8987abca56.js → 1c75f7e4d2e9c8e377e7.js} +1 -1
  91. package/assets/esri/core/workers/chunks/1e1c3243ac82c969bb1f.js +1 -0
  92. package/assets/esri/core/workers/chunks/22f604726529ee6f8c25.js +1 -0
  93. package/assets/esri/core/workers/chunks/244d2196bac5ef279436.js +1 -0
  94. package/assets/esri/core/workers/chunks/25142d431dd1e5e82234.js +1 -0
  95. package/assets/esri/core/workers/chunks/25e19bd171eeb5634a4f.js +1 -0
  96. package/assets/esri/core/workers/chunks/26924d2f03b8a1b7a9b2.js +1 -0
  97. package/assets/esri/core/workers/chunks/27482132abb939a1cdb7.js +1 -0
  98. package/assets/esri/core/workers/chunks/2ae1dbdac9f24f4a3c84.js +1 -0
  99. package/assets/esri/core/workers/chunks/31b2ceed80796c7f6c03.js +1 -0
  100. package/assets/esri/core/workers/chunks/32f2e0c88046b39916cc.js +1 -0
  101. package/assets/esri/core/workers/chunks/3521a53f826f0ce6ac33.js +1 -0
  102. package/assets/esri/core/workers/chunks/3697ec74522cc5059098.js +1 -0
  103. package/assets/esri/core/workers/chunks/{60472225a228e499b1a2.js → 38557792ff9516fc991b.js} +1 -1
  104. package/assets/esri/core/workers/chunks/388a763da712ca71ccf4.js +1 -0
  105. package/assets/esri/core/workers/chunks/38f9ede26098eb03ca2d.js +2 -0
  106. package/assets/esri/core/workers/chunks/{239821543abbd63c5787.js.LICENSE.txt → 38f9ede26098eb03ca2d.js.LICENSE.txt} +3 -3
  107. package/assets/esri/core/workers/chunks/3f3a2c6ce48d832bf2f1.js +1 -0
  108. package/assets/esri/core/workers/chunks/{82493f51a2182f76dd2f.js → 459e3e507e8ea3e7e6ab.js} +1 -1
  109. package/assets/esri/core/workers/chunks/{f4111bb5e5a4910b684a.js → 4867a515ddbdab97cc61.js} +1 -1
  110. package/assets/esri/core/workers/chunks/51b5dfc7085272d26b89.js +1 -0
  111. package/assets/esri/core/workers/chunks/536d7986ebb710a8a452.js +1 -0
  112. package/assets/esri/core/workers/chunks/53eaad20c4f55dae21e0.js +1 -0
  113. package/assets/esri/core/workers/chunks/55eff05354069f34bb1d.js +1 -0
  114. package/assets/esri/core/workers/chunks/569e9ec636199d1f1744.js +1 -0
  115. package/assets/esri/core/workers/chunks/598fade09fa4da759ac2.js +1 -0
  116. package/assets/esri/core/workers/chunks/5ac3096139e3eafd0e1d.js +1 -0
  117. package/assets/esri/core/workers/chunks/{93d06a1a0b700ddb3807.js → 5bdd5ae2d2f23ef6b331.js} +1 -1
  118. package/assets/esri/core/workers/chunks/5db336767959507c07e5.js +2 -0
  119. package/assets/esri/core/workers/chunks/{c03bffa13841e4f80379.js.LICENSE.txt → 5db336767959507c07e5.js.LICENSE.txt} +2 -2
  120. package/assets/esri/core/workers/chunks/5e5225623977e61fd0ef.js +1 -0
  121. package/assets/esri/core/workers/chunks/642a595353a86f3717e3.js +1 -0
  122. package/assets/esri/core/workers/chunks/64640051f1fd787a3362.js +1 -0
  123. package/assets/esri/core/workers/chunks/6d230c55cde66ee905b3.js +1 -0
  124. package/assets/esri/core/workers/chunks/{c1bd47cde53918f454ca.js → 729407e372c8353cf871.js} +1 -1
  125. package/assets/esri/core/workers/chunks/{29283c19e1ccdc6cfbde.js → 736a11e64e5f03e3936b.js} +34 -33
  126. package/assets/esri/core/workers/chunks/769b66cca8347f0f84db.js +1 -0
  127. package/assets/esri/core/workers/chunks/7c4746f60332620f75c5.js +1 -0
  128. package/assets/esri/core/workers/chunks/{b6dd25bccb9f6e19c18e.js → 7c7ff11246479382974c.js} +1 -1
  129. package/assets/esri/core/workers/chunks/7fce62ef3f0b011e0d35.js +1 -0
  130. package/assets/esri/core/workers/chunks/814d72abbfdd4552e4ec.js +2 -0
  131. package/assets/esri/core/workers/chunks/{373782e9f5d61616fde4.js.LICENSE.txt → 814d72abbfdd4552e4ec.js.LICENSE.txt} +1 -6
  132. package/assets/esri/core/workers/chunks/{07f206719763173faa8d.js → 873327fc41edd3830afa.js} +4 -4
  133. package/assets/esri/core/workers/chunks/8ea182c2fc20dba79ef2.js +1 -0
  134. package/assets/esri/core/workers/chunks/{d58fae2fc9d148e015ae.js → 90dc783a617ff053e862.js} +1 -1
  135. package/assets/esri/core/workers/chunks/93e9dfd1ba8f393c6c47.js +1 -0
  136. package/assets/esri/core/workers/chunks/93f792f5b94f3745b57d.js +2 -0
  137. package/assets/esri/core/workers/chunks/{3845e1d47bb51c06682e.js.LICENSE.txt → 93f792f5b94f3745b57d.js.LICENSE.txt} +1 -1
  138. package/assets/esri/core/workers/chunks/a197c86d42cc9ce21924.js +1 -0
  139. package/assets/esri/core/workers/chunks/a276980c06d5d311a37e.js +1 -0
  140. package/assets/esri/core/workers/chunks/a600194cfe26aedc21dd.js +1 -0
  141. package/assets/esri/core/workers/chunks/{a4239e301728d594afa5.js → a6b14665a46c2af5ac11.js} +1 -1
  142. package/assets/esri/core/workers/chunks/ae13bd77a25ce8b54631.js +1 -0
  143. package/assets/esri/core/workers/chunks/ae156b99e60a2bf940e4.js +1 -0
  144. package/assets/esri/core/workers/chunks/b2f1d1721a9dd88a1adf.js +1 -0
  145. package/assets/esri/core/workers/chunks/{4275dcec730a11173661.js → b7fc99ec15e2c86a6425.js} +1 -1
  146. package/assets/esri/core/workers/chunks/b8248939373e25a8d6db.js +1 -0
  147. package/assets/esri/core/workers/chunks/bbaadce582df7e20397b.js +1 -0
  148. package/assets/esri/core/workers/chunks/{18404cd87d29b2bdc7bf.js → c4dba6cf17aece714d22.js} +1 -1
  149. package/assets/esri/core/workers/chunks/c5d786166a5609b85276.js +2 -0
  150. package/assets/esri/core/workers/chunks/{e4d522ade82192f32d54.js.LICENSE.txt → c5d786166a5609b85276.js.LICENSE.txt} +1 -1
  151. package/assets/esri/core/workers/chunks/{c589d32f8efcca6bf712.js → c6b08fdc0421258efcf5.js} +1 -1
  152. package/assets/esri/core/workers/chunks/c779335f5d5455c77a62.js +1 -0
  153. package/assets/esri/core/workers/chunks/{eb61e484f090fca28937.js → cb2be1a81bdd3443f758.js} +1 -1
  154. package/assets/esri/core/workers/chunks/ccc50f28f217e50cc2c3.js +1 -0
  155. package/assets/esri/core/workers/chunks/cd2927b922444880566d.js +1 -0
  156. package/assets/esri/core/workers/chunks/{df1225a3e751a662c182.js → d04efa51da9b4eb3a8a7.js} +1 -1
  157. package/assets/esri/core/workers/chunks/d28e2c9bdf514236b011.js +1 -0
  158. package/assets/esri/core/workers/chunks/d434d44916d32d4b10d5.js +1 -0
  159. package/assets/esri/core/workers/chunks/{50c1753ee3dc0d28ffd7.js → d696abbb1b13ac1a689b.js} +1 -1
  160. package/assets/esri/core/workers/chunks/dbaa4b8d37aab40d7bd1.js +2 -0
  161. package/assets/esri/core/workers/chunks/dbaa4b8d37aab40d7bd1.js.LICENSE.txt +3 -0
  162. package/assets/esri/core/workers/chunks/{4a15308b54734247f38e.js → dd8e72d6784a8ebc115d.js} +1 -1
  163. package/assets/esri/core/workers/chunks/de0784474d2e9e504a91.js +1 -0
  164. package/assets/esri/core/workers/chunks/{aca3ccb9599bcc444617.js → e1472af8f5d64c057d04.js} +1 -1
  165. package/assets/esri/core/workers/chunks/e27fa1e84f16b7f19a90.js +1 -0
  166. package/assets/esri/core/workers/chunks/e2cd6038d9c7167b128e.js +1 -0
  167. package/assets/esri/core/workers/chunks/{0252d853419adc203f04.js → ef6e805c49e1afdf966b.js} +1 -1
  168. package/assets/esri/core/workers/chunks/f2bc75a718a10065011d.js +1 -0
  169. package/assets/esri/core/workers/chunks/{1263391920fbb8926ced.js → f34ce3c37a385b341631.js} +1 -1
  170. package/assets/esri/core/workers/chunks/{e3d25d027885eb1a415f.js → f458a40e1f8fce3ad23c.js} +1 -1
  171. package/assets/esri/core/workers/chunks/f65b720b750aebca1bcd.js +1 -0
  172. package/assets/esri/core/workers/chunks/fdcbd28f38bc485ac5e3.js +1 -0
  173. package/assets/esri/themes/dark/main.css +1 -1
  174. package/assets/esri/themes/light/main.css +1 -1
  175. package/assets/esri/themes/light/view.css +1 -1
  176. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  177. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  178. package/chunks/BloomComposition.glsl.js +25 -19
  179. package/chunks/ChapmanAtmosphere.glsl.js +1 -1
  180. package/chunks/ComponentShader.glsl.js +14 -14
  181. package/chunks/DefaultMaterial.glsl.js +6 -6
  182. package/chunks/Fog.glsl.js +3 -3
  183. package/chunks/Haze.glsl.js +1 -1
  184. package/chunks/OITBlend.glsl.js +1 -0
  185. package/chunks/Path.glsl.js +3 -3
  186. package/chunks/RealisticTree.glsl.js +5 -5
  187. package/chunks/SSAO.glsl.js +5 -4
  188. package/chunks/Viewshed.glsl.js +1 -1
  189. package/core/promiseUtils.d.ts +1 -0
  190. package/core/urlUtils.d.ts +4 -0
  191. package/identity/IdentityModal.js +1 -1
  192. package/interfaces.d.ts +335 -42
  193. package/intl/date.js +1 -1
  194. package/intl/messages.js +1 -1
  195. package/intl/number.js +1 -1
  196. package/layers/FeatureLayer.js +1 -1
  197. package/layers/ParquetLayer.js +1 -1
  198. package/layers/VideoLayer.js +1 -1
  199. package/layers/ViewshedLayer.js +1 -1
  200. package/layers/graphics/sources/ParquetSource.js +1 -1
  201. package/layers/save/featureLayerUtils.js +1 -1
  202. package/layers/support/ParquetEncodingBase.js +5 -0
  203. package/layers/support/ParquetEncodingLocation.js +5 -0
  204. package/layers/support/ParquetEncodingWkb.js +5 -0
  205. package/layers/support/domainUtils.js +1 -1
  206. package/layers/support/fieldUtils.js +1 -1
  207. package/layers/support/labelingInfo.js +1 -1
  208. package/layers/support/layerUtils.js +1 -1
  209. package/layers/support/parquetUtils.js +5 -0
  210. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  211. package/layers/video/VideoController.js +1 -1
  212. package/layers/video/videoUtils.js +1 -1
  213. package/libs/parquet/parquet.js +1 -1
  214. package/networks/UtilityNetwork.js +1 -1
  215. package/package.json +2 -2
  216. package/portal/PortalItem.js +1 -1
  217. package/portal/PortalUser.js +1 -1
  218. package/portal/support/portalItemUtils.js +1 -1
  219. package/rest/featureService/FeatureService.js +1 -1
  220. package/rest/networks/support/NetworkElement.js +1 -1
  221. package/rest/networks/support/TelecomNetworkElement.js +5 -0
  222. package/rest/networks/trace.js +1 -1
  223. package/rest/print.js +1 -1
  224. package/support/TablesMixin.js +1 -1
  225. package/support/modeUtils.js +5 -0
  226. package/support/revision.js +1 -1
  227. package/views/2d/engine/webgl/FeatureTile.js +1 -1
  228. package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
  229. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  230. package/views/2d/layers/VideoLayerView2D.js +1 -1
  231. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  232. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  233. package/views/2d/layers/features/sources/strategies/ParquetLoadStrategy.js +1 -1
  234. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  235. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  236. package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
  237. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  238. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  239. package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
  240. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  241. package/views/3d/environment/ChapmanAtmosphereTechniqueConfiguration.js +1 -1
  242. package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
  243. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentMove.js +1 -1
  244. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
  245. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
  246. package/views/3d/interactive/visualElements/ViewshedShapeVisualElement.js +1 -1
  247. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  248. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  249. package/views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js +1 -1
  250. package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +8 -8
  251. package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +1 -1
  252. package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechniqueConfiguration.js +5 -0
  253. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  254. package/views/3d/webgl-engine/effects/haze/HazeTechniqueConfiguration.js +1 -1
  255. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  256. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  257. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  258. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  259. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  260. package/views/3d/webgl-engine/shaders/ToneMapping.glsl.js +20 -2
  261. package/views/ToolViewManager.js +1 -1
  262. package/views/analysis/analysisViewUtils.js +1 -1
  263. package/views/draw/support/HighlightHelper.js +1 -1
  264. package/views/interactive/InteractiveToolBase.js +1 -1
  265. package/views/interactive/Tooltip.js +1 -1
  266. package/views/interactive/interactiveToolUtils.js +1 -1
  267. package/views/interactive/keybindings.js +1 -1
  268. package/views/ui/UI.js +1 -1
  269. package/webdoc/support/saveUtils.js +1 -1
  270. package/webdoc/support/webdocSaveUtils.js +1 -1
  271. package/widgets/Editor.js +1 -1
  272. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  273. package/widgets/Feature/FeatureMedia.js +1 -1
  274. package/widgets/Feature/support/featureUtils.js +1 -1
  275. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  276. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  277. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  278. package/widgets/FeatureTable.js +1 -1
  279. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  280. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  281. package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
  282. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  283. package/widgets/OrientedImageryViewer.js +1 -1
  284. package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
  285. package/widgets/Slider/SliderViewModel.js +1 -1
  286. package/widgets/Slider.js +1 -1
  287. package/widgets/TimeSlider.js +1 -1
  288. package/widgets/support/AnalysisViewModel.js +1 -1
  289. package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
  290. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  291. package/widgets/support/widget.js +1 -1
  292. package/assets/esri/core/workers/chunks/0297e55a49ca0d1231ef.js +0 -1
  293. package/assets/esri/core/workers/chunks/04008648c59031bca8ea.js +0 -1
  294. package/assets/esri/core/workers/chunks/067dda58592fbf4fb812.js +0 -1
  295. package/assets/esri/core/workers/chunks/0b4e63e705db09dbe171.js +0 -1
  296. package/assets/esri/core/workers/chunks/1072b4f37eacbbfda2c8.js +0 -1
  297. package/assets/esri/core/workers/chunks/1b87fa15470cce26feea.js +0 -1
  298. package/assets/esri/core/workers/chunks/239821543abbd63c5787.js +0 -2
  299. package/assets/esri/core/workers/chunks/272a309760dacb13dee3.js +0 -1
  300. package/assets/esri/core/workers/chunks/2791f1f2791087d0217f.js +0 -1
  301. package/assets/esri/core/workers/chunks/35dccd3883d2e466c42e.js +0 -1
  302. package/assets/esri/core/workers/chunks/364860a42edc0c3b8d5b.js +0 -1
  303. package/assets/esri/core/workers/chunks/373782e9f5d61616fde4.js +0 -2
  304. package/assets/esri/core/workers/chunks/37e49d1a1407c193dcd0.js +0 -1
  305. package/assets/esri/core/workers/chunks/37e4f588a6896f98bce3.js +0 -1
  306. package/assets/esri/core/workers/chunks/3845e1d47bb51c06682e.js +0 -2
  307. package/assets/esri/core/workers/chunks/3f6dc811b5d515c2725c.js +0 -1
  308. package/assets/esri/core/workers/chunks/42aab2a336ee22fd9055.js +0 -1
  309. package/assets/esri/core/workers/chunks/4ba34124054752b363c0.js +0 -1
  310. package/assets/esri/core/workers/chunks/4baef5262ce401bf81bb.js +0 -1
  311. package/assets/esri/core/workers/chunks/593396b4c210da77a131.js +0 -1
  312. package/assets/esri/core/workers/chunks/5b32c2a1b276352593dc.js +0 -1
  313. package/assets/esri/core/workers/chunks/5df4e73905c0ae75e37c.js +0 -1
  314. package/assets/esri/core/workers/chunks/5fb9bb3ac2f60dbd59c4.js +0 -1
  315. package/assets/esri/core/workers/chunks/66e90f7d473d1f688254.js +0 -1
  316. package/assets/esri/core/workers/chunks/68d7babbe7e0d934e056.js +0 -1
  317. package/assets/esri/core/workers/chunks/6e6b60779c11efc128af.js +0 -1
  318. package/assets/esri/core/workers/chunks/759c12b0715279e3c0f6.js +0 -1
  319. package/assets/esri/core/workers/chunks/75e01c6404cbd51daabc.js +0 -2
  320. package/assets/esri/core/workers/chunks/77660e18ea793ae85f83.js +0 -1
  321. package/assets/esri/core/workers/chunks/7f36cffc6ed984b7e467.js +0 -1
  322. package/assets/esri/core/workers/chunks/7f86c9ec45f4fae1fb49.js +0 -1
  323. package/assets/esri/core/workers/chunks/879d672d12f9ef2e1b50.js +0 -1
  324. package/assets/esri/core/workers/chunks/90442f47c9f31f26b453.js +0 -1
  325. package/assets/esri/core/workers/chunks/91439b59260b0fb04be9.js +0 -1
  326. package/assets/esri/core/workers/chunks/96978d039f183565bffa.js +0 -1
  327. package/assets/esri/core/workers/chunks/999a4f7ca581f28cc1c4.js +0 -1
  328. package/assets/esri/core/workers/chunks/af41dcc8006cd0f451c2.js +0 -1
  329. package/assets/esri/core/workers/chunks/af9fda47d02c51a2c7da.js +0 -1
  330. package/assets/esri/core/workers/chunks/baed733a29aa65efc2a0.js +0 -2
  331. package/assets/esri/core/workers/chunks/c03bffa13841e4f80379.js +0 -2
  332. package/assets/esri/core/workers/chunks/c7ab674764312d65348f.js +0 -1
  333. package/assets/esri/core/workers/chunks/ca0572fe5614005acceb.js +0 -1
  334. package/assets/esri/core/workers/chunks/d2c7067bb6654c0e2793.js +0 -1
  335. package/assets/esri/core/workers/chunks/d46c82a55219b27c301b.js +0 -1
  336. package/assets/esri/core/workers/chunks/d89f105b8a0b13dd8e5f.js +0 -1
  337. package/assets/esri/core/workers/chunks/e13caf9691f556071e31.js +0 -1
  338. package/assets/esri/core/workers/chunks/e14449f07ed3386f4f2b.js +0 -1
  339. package/assets/esri/core/workers/chunks/e31bb256921807464715.js +0 -1
  340. package/assets/esri/core/workers/chunks/e4d522ade82192f32d54.js +0 -2
  341. package/assets/esri/core/workers/chunks/e5713b757f770a138b8c.js +0 -1
  342. package/assets/esri/core/workers/chunks/e6544e966f14fb410157.js +0 -1
  343. package/assets/esri/core/workers/chunks/e792603b7cc3ddd133f3.js +0 -1
  344. package/assets/esri/core/workers/chunks/e7cb4003c45e42b48ea6.js +0 -1
  345. package/assets/esri/core/workers/chunks/eb011e8b14db37ddb110.js +0 -1
  346. package/assets/esri/core/workers/chunks/efb0f3ec2344adcb24f3.js +0 -1
  347. package/assets/esri/core/workers/chunks/f0c864425f000ab87a7b.js +0 -1
  348. package/assets/esri/core/workers/chunks/f7d33d18bf1bd4db9df8.js +0 -1
  349. package/assets/esri/core/workers/chunks/f9396af9cbfd165e72e2.js +0 -1
  350. package/assets/esri/core/workers/chunks/fa2d836d4a844b26b84e.js +0 -1
  351. package/layers/support/parquetLayerUtils.js +0 -5
  352. package/support/themeUtils.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../Color.js";import i from"../../../../core/Accessor.js";import"../../../../core/has.js";import{equals as s}from"../../../../core/lang.js";import{deg2rad as r}from"../../../../core/mathUtils.js";import{destroyMaybe as o}from"../../../../core/maybe.js";import{watch as a,initial as l}from"../../../../core/reactiveUtils.js";import{property as n}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{fromRotation as h}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{t as d,i as u,a as p,H as _,n as V,h as f,r as v,v as w,c as E,g as b}from"../../../../chunks/vec32.js";import{create as g,clone as C}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{viewshedVisualizationConfiguration as L,arcAnglePerSegment as A}from"./ViewshedConfiguration.js";import j from"./ViewshedTool.js";import{LineVisualElement as y}from"../../interactive/visualElements/LineVisualElement.js";import{PointVisualElement as D}from"../../interactive/visualElements/PointVisualElement.js";import{ViewshedShapeVisualElement as F}from"../../interactive/visualElements/ViewshedShapeVisualElement.js";import{RenderOccludedFlag as R}from"../../webgl-engine/lib/Material.js";import{createStipplePatternSimple as O}from"../../webgl-engine/materials/lineStippleUtils.js";let S=class extends i{constructor(e){super(e),this.visible=!0,this._viewshedCorners={topLeft:g(),topRight:g(),bottomLeft:g(),bottomRight:g()},this._arcCenterPoints={top:g(),bottom:g(),left:g(),right:g()},this._parallelCenters={top:g(),bottom:g()}}initialize(){const e={view:this.view,isDecoration:!0},t={...e,color:this._color,renderOccluded:R.OccludeAndTransparent},i={...t,stipplePattern:O(2)};this._observerVisualElement=new D({...e,...L.observerPointConfiguration}),this._shapeVisualElement=new F(e),this._frameLinesVisualElement=new y(t),this._leftArcVisualElement=new y(t),this._rightArcVisualElement=new y(t),this._topArcVisualElement=new y(t),this._bottomArcVisualElement=new y(t),this._centralLongitude=new y(i),this._centralLatitude=new y(i),this.addHandles([a((()=>{const e=this.viewshedComputedData;if(!e?.isValid())return null;const t=this._viewshedCorners,i=this._arcCenterPoints,s=this._parallelCenters;return e.cornerPoints(t),e.arcCentersPoints(i),e.parallelCenterPoints(s),{viewshedComputedData:e,corners:t,arcCenters:i,parallelCenters:s,interactive:this.analysisViewData.interactive,selected:this._selected}}),(e=>{const t=null!=e;this._forEachVisualElement((e=>e.attached=t)),t&&this._updateVisualElements(e)}),{initial:!0,equals:s}),a((()=>{const{viewshedComputedData:e}=this,{horizontalFieldOfView:t,verticalFieldOfView:i}=e??{};return{viewshedComputedData:e,horizontalFieldOfView:t,verticalFieldOfView:i}}),(({viewshedComputedData:e})=>{const{_shapeVisualElement:t}=this;e!==t.viewshedComputedData&&(t.viewshedComputedData=e),this._shapeVisualElement.recreateGeometry()}),l),a((()=>{const{interactive:e}=this.analysisViewData;return{visible:this.visible,selected:e&&this._selected,staged:e&&this._staged,horFovNot360:360!==this.viewshedComputedData?.horizontalFieldOfView}}),(({visible:e,selected:t,staged:i,horFovNot360:s})=>{const r=t||i;this._shapeVisualElement.visible=e,this._topArcVisualElement.visible=e,this._bottomArcVisualElement.visible=e,this._frameLinesVisualElement.visible=e&&s;const o=e&&(t||s);this._leftArcVisualElement.visible=o,this._rightArcVisualElement.visible=o,this._forEachLineVisualElement((e=>{e.width=r?L.frameWidthSelected:L.frameWidthNotSelected,e.renderOccluded=t?R.OccludeAndTransparent:R.Occlude})),[this._centralLatitude,this._centralLongitude].forEach((i=>{i.width=2*(r?L.frameWidthSelected:L.frameWidthNotSelected),i.visible=e&&t}))}),l),a((()=>{const{analysisViewData:{interactive:e,tool:t},_selected:i,visible:s}=this,r=this.view.activeTool,o=!t?.active&&r instanceof j&&r.creating;return{observerVisible:s&&!i&&(!e||(t?.creating??!1)||o),color:this._color}}),(({observerVisible:e,color:t})=>{this._observerVisualElement.visible=e,this._forEachLineVisualElement((e=>e.color=t))}),l)])}get _color(){const{viewshedComputedData:e,_selected:i,analysisViewData:s}=this;if(null==e)return t.toUnitRGBA(L.frameColor);const r=s.tool?.active||s.interactive,o=e.viewshed===s.tool?.stagedViewshed,a=r&&(i||o)?this.view.effectiveTheme.accentColor:L.frameColor;return t.toUnitRGBA(a)}get _selected(){const{viewshedComputedData:e,analysisViewData:{selectedViewshedComputedData:t}}=this;return null!=e&&e===t}get _staged(){const{analysisViewData:{tool:e},viewshedComputedData:t}=this;return null!=e&&e.creating&&e.stagedViewshed===t?.viewshed}destroy(){this._observerVisualElement=o(this._observerVisualElement),this._shapeVisualElement=o(this._shapeVisualElement),this._frameLinesVisualElement=o(this._frameLinesVisualElement),this._leftArcVisualElement=o(this._leftArcVisualElement),this._rightArcVisualElement=o(this._rightArcVisualElement),this._topArcVisualElement=o(this._topArcVisualElement),this._bottomArcVisualElement=o(this._bottomArcVisualElement),this._centralLongitude=o(this._centralLongitude),this._centralLatitude=o(this._centralLatitude)}_forEachLineVisualElement(e){[this._frameLinesVisualElement,this._leftArcVisualElement,this._rightArcVisualElement,this._topArcVisualElement,this._bottomArcVisualElement,this._centralLatitude,this._centralLongitude].forEach(e)}_forEachVisualElement(e){this._forEachLineVisualElement(e),e(this._observerVisualElement),e(this._shapeVisualElement)}_updateVisualElements(e){const{viewshedComputedData:t,corners:i,arcCenters:s,parallelCenters:r}=e,o=C(t.observerRenderSpace);this._observerVisualElement.geometry=t.observer,this._shapeVisualElement.updateTransform(),this._updateFrameLines(o,i),this._updateFrameArcs(t,i,r),this._updateCentralHelperArcs(t,s)}_updateFrameLines(e,t){this._frameLinesVisualElement.geometry=[[e,t.topLeft],[e,t.topRight],[e,t.bottomLeft],[e,t.bottomRight]]}_updateFrameArcs(e,t,i){const{observerRenderSpace:s,rightVector:o,horizontalFieldOfView:a,tiltedUpVector:l}=e,n=r(a),c=g(),p=m();h(p,n/2,l),d(c,o,p),P(this._leftArcVisualElement,s,t.bottomLeft,t.topLeft,"forward",c),h(p,-n/2,l),u(c,0,0,0),d(c,o,p),P(this._rightArcVisualElement,s,t.bottomRight,t.topRight,"forward",c);const _=a>180?"backward":"forward";P(this._topArcVisualElement,i.top,t.topRight,t.topLeft,_,l),P(this._bottomArcVisualElement,i.bottom,t.bottomRight,t.bottomLeft,_,l)}_updateCentralHelperArcs(e,t){const i=e.observerRenderSpace,s=e.horizontalFieldOfView>=180?"backward":"forward";P(this._centralLatitude,i,t.right,t.left,s,e.tiltedUpVector),P(this._centralLongitude,i,t.top,t.bottom,"forward",e.leftVector)}get test(){}};function P(e,t,i,s,r,o,a=A){const l=g();p(l,i,t);const n=_(l),c=g();p(c,s,t),V(c,c),f(c,c,n);let u=v(l,c);const L=C(o);"backward"===r&&(w(L,L),u=-(2*Math.PI-u));const j=[],y=Math.ceil(Math.abs(u)/a),D=m();h(D,u/y,L);const F=g();E(F,l);const R=g();E(R,i);for(let h=0;h<y;h++){const e=g();E(e,R),d(F,F,D),b(R,t,F);const i=g();E(i,R),j.push([e,i])}e.geometry=j}e([n()],S.prototype,"view",void 0),e([n()],S.prototype,"analysisViewData",void 0),e([n()],S.prototype,"viewshedComputedData",void 0),e([n()],S.prototype,"visible",void 0),e([n()],S.prototype,"_color",null),e([n()],S.prototype,"_selected",null),e([n()],S.prototype,"_staged",null),S=e([c("esri.views.3d.analysis.Viewshed.ViewshedVisualization")],S);const z=S;export{z as default};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../Color.js";import i from"../../../../core/Accessor.js";import"../../../../core/has.js";import{equals as s}from"../../../../core/lang.js";import{deg2rad as r}from"../../../../core/mathUtils.js";import{destroyMaybe as o}from"../../../../core/maybe.js";import{watch as a,initial as l}from"../../../../core/reactiveUtils.js";import{property as n}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{fromRotation as h}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{t as d,i as u,a as p,H as _,n as f,h as V,r as v,v as w,c as E,g as b}from"../../../../chunks/vec32.js";import{create as g,clone as C}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{viewshedVisualizationConfiguration as L,arcAnglePerSegment as A}from"./ViewshedConfiguration.js";import j from"./ViewshedTool.js";import{LineVisualElement as y}from"../../interactive/visualElements/LineVisualElement.js";import{PointVisualElement as D}from"../../interactive/visualElements/PointVisualElement.js";import{ViewshedShapeVisualElement as F}from"../../interactive/visualElements/ViewshedShapeVisualElement.js";import{RenderOccludedFlag as R}from"../../webgl-engine/lib/Material.js";import{createStipplePatternSimple as O}from"../../webgl-engine/materials/lineStippleUtils.js";let S=class extends i{constructor(e){super(e),this.visible=!0,this._viewshedCorners={topLeft:g(),topRight:g(),bottomLeft:g(),bottomRight:g()},this._arcCenterPoints={top:g(),bottom:g(),left:g(),right:g()},this._parallelCenters={top:g(),bottom:g()}}initialize(){const e={view:this.view,isDecoration:!0},t={...e,color:this._color,renderOccluded:R.OccludeAndTransparent},i={...t,stipplePattern:O(2)};this._observerVisualElement=new D({...e,...L.observerPointConfiguration}),this._shapeVisualElement=new F(e),this._frameLinesVisualElement=new y(t),this._leftArcVisualElement=new y(t),this._rightArcVisualElement=new y(t),this._topArcVisualElement=new y(t),this._bottomArcVisualElement=new y(t),this._centralLongitude=new y(i),this._centralLatitude=new y(i),this.addHandles([a((()=>{const e=this.viewshedComputedData;if(!e?.valid)return null;const t=this._viewshedCorners,i=this._arcCenterPoints,s=this._parallelCenters;return e.cornerPoints(t),e.arcCentersPoints(i),e.parallelCenterPoints(s),{viewshedComputedData:e,corners:t,arcCenters:i,parallelCenters:s,interactive:this.analysisViewData.interactive,selected:this._selected}}),(e=>{const t=null!=e;this._forEachVisualElement((e=>e.attached=t)),t&&this._updateVisualElements(e)}),{initial:!0,equals:s}),a((()=>{const{viewshedComputedData:e}=this,{horizontalFieldOfView:t,verticalFieldOfView:i}=e??{};return{viewshedComputedData:e,horizontalFieldOfView:t,verticalFieldOfView:i}}),(({viewshedComputedData:e})=>{const{_shapeVisualElement:t}=this;e!==t.viewshedComputedData&&(t.viewshedComputedData=e),this._shapeVisualElement.recreateGeometry()}),l),a((()=>{const{interactive:e}=this.analysisViewData;return{visible:this.visible,selected:e&&this._selected,staged:e&&this._staged,horFovNot360:360!==this.viewshedComputedData?.horizontalFieldOfView}}),(({visible:e,selected:t,staged:i,horFovNot360:s})=>{const r=t||i;this._shapeVisualElement.visible=e,this._topArcVisualElement.visible=e,this._bottomArcVisualElement.visible=e,this._frameLinesVisualElement.visible=e&&s;const o=e&&(t||s);this._leftArcVisualElement.visible=o,this._rightArcVisualElement.visible=o,this._forEachLineVisualElement((e=>{e.width=r?L.frameWidthSelected:L.frameWidthNotSelected,e.renderOccluded=t?R.OccludeAndTransparent:R.Occlude})),[this._centralLatitude,this._centralLongitude].forEach((i=>{i.width=2*(r?L.frameWidthSelected:L.frameWidthNotSelected),i.visible=e&&t}))}),l),a((()=>{const{analysisViewData:{interactive:e,tool:t},_selected:i,visible:s}=this,r=this.view.activeTool,o=!t?.active&&r instanceof j&&r.creating;return{observerVisible:s&&!i&&(!e||(t?.creating??!1)||o),color:this._color}}),(({observerVisible:e,color:t})=>{this._observerVisualElement.visible=e,this._forEachLineVisualElement((e=>e.color=t))}),l)])}get _color(){const{viewshedComputedData:e,_selected:i,analysisViewData:s}=this;if(null==e)return t.toUnitRGBA(L.frameColor);const r=s.tool?.active||s.interactive,o=e.viewshed===s.tool?.stagedViewshed,a=r&&(i||o)?this.view.effectiveTheme.accentColor:L.frameColor;return t.toUnitRGBA(a)}get _selected(){const{viewshedComputedData:e,analysisViewData:{selectedViewshedComputedData:t}}=this;return null!=e&&e===t}get _staged(){const{analysisViewData:{tool:e},viewshedComputedData:t}=this;return null!=e&&e.creating&&e.stagedViewshed===t?.viewshed}destroy(){this._observerVisualElement=o(this._observerVisualElement),this._shapeVisualElement=o(this._shapeVisualElement),this._frameLinesVisualElement=o(this._frameLinesVisualElement),this._leftArcVisualElement=o(this._leftArcVisualElement),this._rightArcVisualElement=o(this._rightArcVisualElement),this._topArcVisualElement=o(this._topArcVisualElement),this._bottomArcVisualElement=o(this._bottomArcVisualElement),this._centralLongitude=o(this._centralLongitude),this._centralLatitude=o(this._centralLatitude)}_forEachLineVisualElement(e){[this._frameLinesVisualElement,this._leftArcVisualElement,this._rightArcVisualElement,this._topArcVisualElement,this._bottomArcVisualElement,this._centralLatitude,this._centralLongitude].forEach(e)}_forEachVisualElement(e){this._forEachLineVisualElement(e),e(this._observerVisualElement),e(this._shapeVisualElement)}_updateVisualElements(e){const{viewshedComputedData:t,corners:i,arcCenters:s,parallelCenters:r}=e,o=C(t.observerRenderSpace);this._observerVisualElement.geometry=t.observer,this._shapeVisualElement.updateTransform(),this._updateFrameLines(o,i),this._updateFrameArcs(t,i,r),this._updateCentralHelperArcs(t,s)}_updateFrameLines(e,t){this._frameLinesVisualElement.geometry=[[e,t.topLeft],[e,t.topRight],[e,t.bottomLeft],[e,t.bottomRight]]}_updateFrameArcs(e,t,i){const{observerRenderSpace:s,rightVector:o,horizontalFieldOfView:a,tiltedUpVector:l}=e,n=r(a),c=g(),p=m();h(p,n/2,l),d(c,o,p),P(this._leftArcVisualElement,s,t.bottomLeft,t.topLeft,"forward",c),h(p,-n/2,l),u(c,0,0,0),d(c,o,p),P(this._rightArcVisualElement,s,t.bottomRight,t.topRight,"forward",c);const _=a>180?"backward":"forward";P(this._topArcVisualElement,i.top,t.topRight,t.topLeft,_,l),P(this._bottomArcVisualElement,i.bottom,t.bottomRight,t.bottomLeft,_,l)}_updateCentralHelperArcs(e,t){const i=e.observerRenderSpace,s=e.horizontalFieldOfView>=180?"backward":"forward";P(this._centralLatitude,i,t.right,t.left,s,e.tiltedUpVector),P(this._centralLongitude,i,t.top,t.bottom,"forward",e.leftVector)}get test(){}};function P(e,t,i,s,r,o,a=A){const l=g();p(l,i,t);const n=_(l),c=g();p(c,s,t),f(c,c),V(c,c,n);let u=v(l,c);const L=C(o);"backward"===r&&(w(L,L),u=-(2*Math.PI-u));const j=[],y=Math.ceil(Math.abs(u)/a),D=m();h(D,u/y,L);const F=g();E(F,l);const R=g();E(R,i);for(let h=0;h<y;h++){const e=g();E(e,R),d(F,F,D),b(R,t,F);const i=g();E(i,R),j.push([e,i])}e.geometry=j}e([n()],S.prototype,"view",void 0),e([n()],S.prototype,"analysisViewData",void 0),e([n()],S.prototype,"viewshedComputedData",void 0),e([n()],S.prototype,"visible",void 0),e([n()],S.prototype,"_color",null),e([n()],S.prototype,"_selected",null),e([n()],S.prototype,"_staged",null),S=e([c("esri.views.3d.analysis.Viewshed.ViewshedVisualization")],S);const z=S;export{z 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/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import{getFeatureId as s,updatePointsFromFeatureReference as t}from"../../../analysis/featureReferenceUtils.js";import i from"../../../core/Accessor.js";import"../../../core/has.js";import r from"../../../core/Logger.js";import{mapCollection as o}from"../../../core/mapCollectionUtils.js";import{abortMaybe as a,destroyMaybe as d}from"../../../core/maybe.js";import{watch as n,when as l,syncAndInitial as h,initial as c}from"../../../core/reactiveUtils.js";import{property as p}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as m}from"../../../core/accessorSupport/decorators/subclass.js";import{c as u,p as w}from"../../../chunks/vec32.js";import{create as v}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectOrLoad as f,canProjectWithoutEngine as V,isLoaded as y}from"../../../geometry/projection.js";import{projectBoundingRect as _}from"../../../geometry/projection/projectBoundingRect.js";import{empty as j,containsPoint as g}from"../../../geometry/support/aaBoundingRect.js";import{AnalysisView3D as R}from"./AnalysisView3D.js";import{logFailedGeometryProjectionError as b}from"./support/projectionUtils.js";import{ViewshedAnalysisVisualization as C}from"./Viewshed/ViewshedAnalysisVisualization.js";import{ViewshedComputedData as D}from"./Viewshed/ViewshedComputedData.js";import F from"./Viewshed/ViewshedTool.js";import{newIntersector as H}from"../webgl-engine/lib/Intersector.js";import{StoreResults as T}from"../webgl-engine/lib/IntersectorInterfaces.js";import{Viewshed as O}from"../webgl-engine/lib/Viewshed.js";import{connectAnalysisViewToTool as k,removeAnalysisViewTool as S,activateAnalysisViewTool as U}from"../../analysis/analysisViewUtils.js";let A=class extends(R(i)){constructor(e){super(e),this.type="viewshed-view-3d",this.analysis=null,this.tool=null,this._selectedViewshed=null,this.viewshedComputedDataHandles=null,this._placementTask=null,this._viewshedRenderer=null,this._intersector=null}get selectedViewshed(){return this._selectedViewshed}set selectedViewshed(e){this._unselectOtherViewsheds(e),this._selectedViewshed=e}get selectedViewshedComputedData(){return this.tool?.selectedViewshedComputedData}initialize(){const e=this.view;this._viewshedRenderer=new O({view:e,selectedViewshed:()=>this.selectedViewshed??this.tool?.stagedViewshed}),this._intersector=H(this.view.state.viewingMode),this._intersector.options.hud=!1,this._intersector.options.store=T.MIN,this.viewshedComputedDataHandles=o((()=>this.analysis.viewsheds),(s=>{const t=new D({renderCoordsHelper:e.renderCoordsHelper,viewshed:s}),i=Symbol();return this.addHandles([n((()=>({valid:t.isValid(),canProject:V(t.observer?.spatialReference,this.view.spatialReference)||y()})),(({valid:e,canProject:s},i)=>{this.visible&&(e&&s?this._addViewshedsToRenderer(t):i?.valid&&i?.canProject&&this._removeViewshedsFromRenderer(t),s||b(this.analysis,t.observer.spatialReference,r.getLogger(this)))}),c),...this._createFeatureReferenceHandles(t)],i),{viewshedComputedData:t,remove:()=>{this.removeHandles(i),this._removeViewshedsFromRenderer(t),t.destroy()}}})),this._analysisVisualization=new C({view:e,analysisViewData:this,isDecoration:!this.parent}),this.addHandles([n((()=>this.visible),(e=>{const s=this.viewshedComputedDataHandles;if(null==s)return;e||(this.selectedViewshed=null);const t=s.map((e=>e.viewshedComputedData)).filter((e=>e.isValid())).toArray();e?this._addViewshedsToRenderer(t):this._removeViewshedsFromRenderer(t)})),n((()=>e.renderCoordsHelper),(e=>{this.viewshedComputedDataHandles?.forEach((({viewshedComputedData:s})=>s.renderCoordsHelper=e))})),k(this,F),l((()=>this.interactive),(()=>{this._unselectOtherViewsheds(this.selectedViewshed)}),h)])}destroy(){this._placementTask=a(this._placementTask),S(this),this._analysisVisualization=d(this._analysisVisualization);const e=this.viewshedComputedDataHandles;null!=e&&this._removeViewshedsFromRenderer(e.map((e=>e.viewshedComputedData)).toArray())}_createFeatureReferenceHandles(e){const{view:s}=this;return[n((()=>[s.state.camera,s.slicePlane,e.viewshed.observer,e.targetRenderSpace,e.verticalFieldOfView,e.horizontalFieldOfView,e.feature]),(()=>{this._updateObserverFromFeature(s,e)}),c),this._createElevationUpdateHandle(e),l((()=>e.needUpdateByFeature),(()=>{this._updateObserverFromFeature(s,e),e.needUpdateByFeature=!1}))]}_createElevationUpdateHandle(e){const s=(t,i)=>{const{view:r}=this,{observer:o}=e;if(null==o)return;const a=f(o,r.spatialReference);if(null!=a.pending)return void a.pending.finally((()=>s(t,i)));const d=a.geometry;null!=d&&(_(t,i,I,r.spatialReference),g(I,[d.x,d.y])&&(e.needUpdateByFeature=!0))};return this.view.elevationProvider.on("elevation-change",(({extent:e,spatialReference:t})=>s(e,t)))}async createViewsheds(e){return this._placementTask=a(this._placementTask),this._placementTask=U(this,e),null!=this.tool&&this.tool.createViewsheds(),await this._placementTask.promise}_addViewshedsToRenderer(e){this._viewshedRenderer.updateViewsheds({adds:e})}_removeViewshedsFromRenderer(e){this._viewshedRenderer.updateViewsheds({removes:e})}_updateObserverFromFeature(e,i){const r=i.observerRenderSpace,o=i.targetRenderSpace,a=u(v(),r),d={observer:r,observerSurfaceNormal:null,observerAdjusted:a,observerFeatureId:s(i.feature),target:o,targetSurfaceNormal:null,targetAdjusted:u(v(),o),targetFeatureId:null};t(e,this._intersector,d,(e=>Math.min(e,.05*i.farDistanceRenderSpace))),i.observerRenderSpaceOverride=w(a,r)?null:a}_unselectOtherViewsheds(e){if(null!=e)for(const s of this.view.tools.items)s!==this.tool&&s instanceof F&&(s.analysisViewData.selectedViewshed=null)}get test(){}};e([p({readOnly:!0})],A.prototype,"type",void 0),e([p({constructOnly:!0,nonNullable:!0})],A.prototype,"analysis",void 0),e([p()],A.prototype,"tool",void 0),e([p()],A.prototype,"_selectedViewshed",void 0),e([p()],A.prototype,"selectedViewshed",null),e([p()],A.prototype,"selectedViewshedComputedData",null),e([p()],A.prototype,"viewshedComputedDataHandles",void 0),e([p()],A.prototype,"_analysisVisualization",void 0),e([p()],A.prototype,"_placementTask",void 0),e([p()],A.prototype,"_viewshedRenderer",void 0),A=e([m("esri.views.3d.analysis.ViewshedAnalysisView3D")],A);const z=A,I=j();export{z as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import{getFeatureId as t,updatePointsFromFeatureReference as s}from"../../../analysis/featureReferenceUtils.js";import i from"../../../core/Accessor.js";import"../../../core/has.js";import r from"../../../core/Logger.js";import{mapCollection as o}from"../../../core/mapCollectionUtils.js";import{abortMaybe as a,destroyMaybe as d}from"../../../core/maybe.js";import{watch as n,when as l,syncAndInitial as h,initial as c}from"../../../core/reactiveUtils.js";import{property as p}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as m}from"../../../core/accessorSupport/decorators/subclass.js";import{c as u,p as w}from"../../../chunks/vec32.js";import{create as v}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectOrLoad as f,canProjectWithoutEngine as V,isLoaded as y}from"../../../geometry/projection.js";import{projectBoundingRect as _}from"../../../geometry/projection/projectBoundingRect.js";import{empty as j,containsPoint as g}from"../../../geometry/support/aaBoundingRect.js";import{AnalysisView3D as R}from"./AnalysisView3D.js";import{logFailedGeometryProjectionError as b}from"./support/projectionUtils.js";import{ViewshedAnalysisVisualization as C}from"./Viewshed/ViewshedAnalysisVisualization.js";import{ViewshedComputedData as D}from"./Viewshed/ViewshedComputedData.js";import F from"./Viewshed/ViewshedTool.js";import{newIntersector as H}from"../webgl-engine/lib/Intersector.js";import{StoreResults as T}from"../webgl-engine/lib/IntersectorInterfaces.js";import{Viewshed as O}from"../webgl-engine/lib/Viewshed.js";import{connectAnalysisViewToTool as k,removeAnalysisViewTool as S,activateAnalysisViewTool as U}from"../../analysis/analysisViewUtils.js";let A=class extends(R(i)){constructor(e){super(e),this.type="viewshed-view-3d",this.analysis=null,this.tool=null,this._selectedViewshed=null,this.viewshedComputedDataHandles=null,this._placementTask=null,this._viewshedRenderer=null,this._intersector=null}get selectedViewshed(){return this._selectedViewshed}set selectedViewshed(e){this._unselectOtherViewsheds(e),this._selectedViewshed=e}get selectedViewshedComputedData(){return this.tool?.selectedViewshedComputedData}initialize(){const e=this.view;this._viewshedRenderer=new O({view:e,selectedViewshed:()=>this.selectedViewshed??this.tool?.stagedViewshed}),this._intersector=H(this.view.state.viewingMode),this._intersector.options.hud=!1,this._intersector.options.store=T.MIN,this.viewshedComputedDataHandles=o((()=>this.analysis.viewsheds),(t=>{const s=new D({renderCoordsHelper:e.renderCoordsHelper,viewshed:t}),i=Symbol();return this.addHandles([n((()=>({valid:s.valid,canProject:V(s.observer?.spatialReference,this.view.spatialReference)||y()})),(({valid:e,canProject:t},i)=>{this.visible&&(e&&t?this._addViewshedsToRenderer(s):i?.valid&&i?.canProject&&this._removeViewshedsFromRenderer(s),t||b(this.analysis,s.observer.spatialReference,r.getLogger(this)))}),c),...this._createFeatureReferenceHandles(s)],i),{viewshedComputedData:s,remove:()=>{this.removeHandles(i),this._removeViewshedsFromRenderer(s),s.destroy()}}})),this._analysisVisualization=new C({view:e,analysisViewData:this,isDecoration:!this.parent}),this.addHandles([n((()=>this.visible),(e=>{const t=this.viewshedComputedDataHandles;if(null==t)return;e||(this.selectedViewshed=null);const s=t.map((e=>e.viewshedComputedData)).filter((e=>e.valid)).toArray();e?this._addViewshedsToRenderer(s):this._removeViewshedsFromRenderer(s)})),n((()=>e.renderCoordsHelper),(e=>{this.viewshedComputedDataHandles?.forEach((({viewshedComputedData:t})=>t.renderCoordsHelper=e))})),k(this,F),l((()=>this.interactive),(()=>{this._unselectOtherViewsheds(this.selectedViewshed)}),h)])}destroy(){this._placementTask=a(this._placementTask),S(this),this._analysisVisualization=d(this._analysisVisualization);const e=this.viewshedComputedDataHandles;null!=e&&this._removeViewshedsFromRenderer(e.map((e=>e.viewshedComputedData)).toArray())}_createFeatureReferenceHandles(e){const{view:t}=this;return[n((()=>[t.state.camera,t.slicePlane,e.viewshed.observer,e.targetRenderSpace,e.verticalFieldOfView,e.horizontalFieldOfView,e.feature]),(()=>{this._updateObserverFromFeature(t,e)}),c),this._createElevationUpdateHandle(e),l((()=>e.needUpdateByFeature),(()=>{this._updateObserverFromFeature(t,e),e.needUpdateByFeature=!1}))]}_createElevationUpdateHandle(e){const t=(s,i)=>{const{view:r}=this,{observer:o}=e;if(null==o)return;const a=f(o,r.spatialReference);if(null!=a.pending)return void a.pending.finally((()=>t(s,i)));const d=a.geometry;null!=d&&(_(s,i,I,r.spatialReference),g(I,[d.x,d.y])&&(e.needUpdateByFeature=!0))};return this.view.elevationProvider.on("elevation-change",(({extent:e,spatialReference:s})=>t(e,s)))}async createViewsheds(e){return this._placementTask=a(this._placementTask),this._placementTask=U(this,e),null!=this.tool&&this.tool.createViewsheds(),await this._placementTask.promise}_addViewshedsToRenderer(e){this._viewshedRenderer.updateViewsheds({adds:e})}_removeViewshedsFromRenderer(e){this._viewshedRenderer.updateViewsheds({removes:e})}_updateObserverFromFeature(e,i){const r=i.observerRenderSpace,o=i.targetRenderSpace,a=u(v(),r),d={observer:r,observerSurfaceNormal:null,observerAdjusted:a,observerFeatureId:t(i.feature),target:o,targetSurfaceNormal:null,targetAdjusted:u(v(),o),targetFeatureId:null};s(e,this._intersector,d,(e=>Math.min(e,.05*i.farDistanceRenderSpace))),i.observerRenderSpaceOverride=w(a,r)?null:a}_unselectOtherViewsheds(e){if(null!=e)for(const t of this.view.tools.items)t!==this.tool&&t instanceof F&&(t.analysisViewData.selectedViewshed=null)}get test(){}};e([p({readOnly:!0})],A.prototype,"type",void 0),e([p({constructOnly:!0,nonNullable:!0})],A.prototype,"analysis",void 0),e([p()],A.prototype,"tool",void 0),e([p()],A.prototype,"_selectedViewshed",void 0),e([p()],A.prototype,"selectedViewshed",null),e([p()],A.prototype,"selectedViewshedComputedData",null),e([p()],A.prototype,"viewshedComputedDataHandles",void 0),e([p()],A.prototype,"_analysisVisualization",void 0),e([p()],A.prototype,"_placementTask",void 0),e([p()],A.prototype,"_viewshedRenderer",void 0),A=e([m("esri.views.3d.analysis.ViewshedAnalysisView3D")],A);const z=A,I=j();export{z 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/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import{ShaderTechniqueConfiguration as r,parameter as o}from"../webgl-engine/core/shaderTechnique/ShaderTechniqueConfiguration.js";class s extends r{constructor(){super(...arguments),this.reduced=!1}}e([o()],s.prototype,"reduced",void 0);export{s as ChapmanAtmosphereTechniqueConfiguration};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import{ShaderTechniqueConfiguration as r,parameter as s}from"../webgl-engine/core/shaderTechnique/ShaderTechniqueConfiguration.js";import{ToneMappingFunction as o}from"../webgl-engine/shaders/ToneMapping.glsl.js";class i extends r{constructor(){super(...arguments),this.reduced=!1,this.toneMapping=o.ACES}}e([s()],i.prototype,"reduced",void 0);export{i as ChapmanAtmosphereTechniqueConfiguration};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../../chunks/tslib.es6.js";import e from"../../../../../core/Evented.js";import{makeHandle as i}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{watch as o,initial as a}from"../../../../../core/reactiveUtils.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as n}from"../../../../../core/accessorSupport/decorators/subclass.js";import{containsXY as r}from"../../../../../geometry/support/aaBoundingRect.js";import{sm4d as l}from"../../../../../geometry/support/vectorStacks.js";import{calculateBoundedPlaneTranslateRotate as p,resizeNormal as h,resizeOutlineOnly as c}from"../../../analysis/Slice/sliceToolUtils.js";import{Manipulator3D as d}from"../../Manipulator3D.js";import{manipulatedObjectGeometry as u}from"../manipulatedObjectUtils.js";import{ManipulatorType as m}from"../ManipulatorType.js";import{canMoveZOperations as b}from"../manipulatorUtils.js";import{createVisualElements as v}from"../visualElementUtils.js";import{ExtentMove as _}from"./extentTransform/ExtentMove.js";import{ExtentRotate as f}from"./extentTransform/ExtentRotate.js";import{ExtentScale as g}from"./extentTransform/ExtentScale.js";import{TransformBounds as j}from"./extentTransform/extentUtils.js";import{PreserveAspectRatio as y}from"./extentTransform/PreserveAspectRatio.js";import{SnapRotation as M}from"./extentTransform/SnapRotation.js";import{OutlineVisualElement as R}from"../../visualElements/OutlineVisualElement.js";import{InteractiveToolBase as x}from"../../../../interactive/InteractiveToolBase.js";import E from"../../../../interactive/sketch/SketchOptions.js";import{makeTooltip as A}from"../../../../interactive/tooltip/tooltipCommonUtils.js";let S=class extends x{get updating(){return!!this.object.updating}constructor(t){super(t),this.events=new e,this.enableZ=!0,this.enableScaling=!0,this.enableRotation=!0,this.sketchOptions=new E,this._preserveAspectRatio=new y,this._snapRotation=new M,this.grabbing=!1,this.inputState=null,this._attachmentOrigin=null,this.type="transform-3d",this._outlineVisualElement=null}initialize(){const{view:t,object:e}=this,s=this._bounds=new j(this,(()=>this._updateManipulators()));this._extentMove=new _(this,s),this._extentScale=new g(this,s,(()=>this._preserveAspectRatio.createDragEventPipelineStep())),this._extentRotate=new f(this,s,(()=>this._snapRotation.createDragEventPipelineStep())),this.addHandles([o((()=>this.enableZ),(()=>this._updateManipulatorAvailability(this._extentMove.moveZManipulator,m.TRANSLATE_Z))),o((()=>this.enableScaling),(()=>this._extentScale.forEachManipulator((t=>this._updateManipulatorAvailability(t,m.SCALE))))),o((()=>this.enableRotation),(()=>this._updateManipulatorAvailability(this._extentRotate.rotateManipulator,m.ROTATE)))]),this._updateManipulators(),this._updateAllManipulatorAvailability();const n=v({view:t,object:e,forEachManipulator:t=>this._forEachManipulator(t),onManipulatorsChanged:()=>i()});if(null!=n){const{visualElement:t}=n;t instanceof R&&(this._outlineVisualElement=t,this.addHandles(t.events.on("attachment-origin-changed",(()=>this._bounds.updateDisplayBounds())))),this.addHandles(n)}this.addHandles([e.on("committed",(()=>this._onGeometryChanged())),o((()=>this.object.visible),(()=>this._updateAllManipulatorAvailability())),o((()=>this.object.isDraped),(()=>this._graphicDrapedChanged()),a),o((()=>t.pointsOfInterest?.centerOnSurfaceFrequent.location),(()=>s.updateDisplayBounds()))]);const r=t=>{this.addHandles(t.events.on("grab-changed",(()=>{this.grabbing=t.grabbing,this._updateAllManipulatorAvailability()})))};this._forEachManipulator(r);const l=(t,i)=>{this.addHandles(t.events.on("immediate-click",(t=>{i===m.TRANSLATE_XY&&this.events.emit("immediate-click",{...t,object:e}),t.stopPropagation()})))};this._forEachManipulator(l),this._initializeTooltip(),this.finishToolCreation()}destroy(){this._extentMove.destroy(),this._extentScale.destroy(),this._extentRotate.destroy(),this.tooltip.destroy(),this._set("view",null),this._set("object",null)}_initializeTooltip(){const{view:t}=this;this.tooltip=A((()=>({view:t,options:this.sketchOptions.tooltips})));const e=()=>{this.tooltip.info=this._getUpdatedTooltipInfo()};this.addHandles([o((()=>this.sketchOptions.tooltips.effectiveEnabled),e),o((()=>this.preserveAspectRatio),e)]),this._forEachManipulator((t=>{this.addHandles([t.events.on(["focus-changed","grab-changed"],e),t.events.on("drag",(t=>{"cancel"===t.action?this.tooltip.clear():e()}))])}))}_getUpdatedTooltipInfo(){return this.sketchOptions.tooltips.effectiveEnabled?this._extentMove.getUpdatedTooltipInfo()??this._extentScale.getUpdatedTooltipInfo()??this._extentRotate.getUpdatedTooltipInfo():null}_onGeometryChanged(){this._bounds.updateDisplayBounds()}_graphicDrapedChanged(){this.removeHandles(T),this._bounds.updateDisplayBounds(),this.object.isDraped&&this.addHandles(this.view.elevationProvider.on("elevation-change",(t=>{null!=this._attachmentOrigin&&r(t.extent,this._attachmentOrigin.x,this._attachmentOrigin.y)&&this._bounds.updateDisplayBounds()})),T)}_updateManipulators(){if(!this.visible)return;const t=this._bounds.displayBounds,e=p(t,l.get());this._extentMove.updateManipulators(e,t),this._extentScale.updateManipulators(e,t),this._extentRotate.updateManipulators(e,t)}_updateAllManipulatorAvailability(){this._forEachManipulator(((t,e)=>this._updateManipulatorAvailability(t,e)))}_updateManipulatorAvailability(t,e){const i=this.grabbing&&!t.grabbing;if(t.interactive=!i,t instanceof d){const o=this.object.visible,a=this.enableZ&&b(this.object.operations,this.object.elevationInfo);switch(e){case m.ROTATE:t.available=o&&this.enableRotation;break;case m.SCALE:t.available=o&&(this.enableScaling||this.enableRotation||a),t.interactive=!i&&this.enableScaling,t.state=this.enableScaling?h:c;break;case m.TRANSLATE_Z:t.available=o&&a;break;default:t.available=o}}}_forEachManipulator(t){this._extentMove.forEachManipulator(t),this._extentScale.forEachManipulator(t),this._extentRotate.forEachManipulator(t)}get preserveAspectRatio(){return this._preserveAspectRatio.enabled}set preserveAspectRatio(t){this._preserveAspectRatio.enabled=t,this._set("preserveAspectRatio",t)}get snapRotation(){return this._snapRotation.enabled}set snapRotation(t){this._snapRotation.enabled=t,this._set("snapRotation",t)}get attachmentOrigin(){const t=this.object.isDraped?null:this._outlineVisualElement?.attachmentOrigin;return this._attachmentOrigin=t??this.object.origin??u(this.object)?.extent?.center,this._attachmentOrigin}reset(){}cancel(){if(this.canUndo){const t=this.object.operations?.undo();t&&this._bounds.updateMapBoundsFromOperationInverse(t)}this.inputState=null}get canUndo(){return!!this.object.operations?.canUndo}undo(){if(null!=this.inputState)this.view.activeTool=null;else if(this.canUndo){const t=this.object.operations?.undo();t&&this._bounds.updateMapBoundsFromOperationInverse(t)}}get canRedo(){return!!this.object.operations?.canRedo}redo(){if(this.canRedo){const t=this.object.operations?.redo();t&&this._bounds.updateMapBoundsFromOperation(t)}}get test(){}};t([s()],S.prototype,"updating",null),t([s({constructOnly:!0,nonNullable:!0})],S.prototype,"view",void 0),t([s({constructOnly:!0,nonNullable:!0})],S.prototype,"object",void 0),t([s()],S.prototype,"enableZ",void 0),t([s()],S.prototype,"enableScaling",void 0),t([s()],S.prototype,"enableRotation",void 0),t([s({constructOnly:!0,type:E})],S.prototype,"sketchOptions",void 0),t([s()],S.prototype,"preserveAspectRatio",null),t([s()],S.prototype,"snapRotation",null),t([s()],S.prototype,"grabbing",void 0),t([s()],S.prototype,"inputState",void 0),t([s({readOnly:!0})],S.prototype,"type",void 0),t([s()],S.prototype,"tooltip",void 0),S=t([n("esri.views.3d.interactive.editingTools.transform.ExtentTransformTool")],S);const T="draped-elevation-changes";export{S as ExtentTransformTool};
5
+ import{_ as t}from"../../../../../chunks/tslib.es6.js";import e from"../../../../../core/Evented.js";import{makeHandle as i}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{watch as o,initial as a}from"../../../../../core/reactiveUtils.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as n}from"../../../../../core/accessorSupport/decorators/subclass.js";import{containsXY as r}from"../../../../../geometry/support/aaBoundingRect.js";import{sm4d as l}from"../../../../../geometry/support/vectorStacks.js";import{calculateBoundedPlaneTranslateRotate as p,resizeNormal as h,resizeOutlineOnly as c}from"../../../analysis/Slice/sliceToolUtils.js";import{Manipulator3D as d}from"../../Manipulator3D.js";import{manipulatedObjectGeometry as u}from"../manipulatedObjectUtils.js";import{ManipulatorType as m}from"../ManipulatorType.js";import{canMoveZOperations as b}from"../manipulatorUtils.js";import{createVisualElements as v}from"../visualElementUtils.js";import{ExtentMove as _}from"./extentTransform/ExtentMove.js";import{ExtentRotate as g}from"./extentTransform/ExtentRotate.js";import{ExtentScale as f}from"./extentTransform/ExtentScale.js";import{TransformBounds as j}from"./extentTransform/extentUtils.js";import{PreserveAspectRatio as y}from"./extentTransform/PreserveAspectRatio.js";import{SnapRotation as M}from"./extentTransform/SnapRotation.js";import{OutlineVisualElement as R}from"../../visualElements/OutlineVisualElement.js";import{InteractiveToolBase as x}from"../../../../interactive/InteractiveToolBase.js";import E from"../../../../interactive/sketch/SketchOptions.js";import{makeTooltip as A}from"../../../../interactive/tooltip/tooltipCommonUtils.js";let S=class extends x{get updating(){return!!this.object.updating}constructor(t){super(t),this.events=new e,this.enableZ=!0,this.enableScaling=!0,this.enableRotation=!0,this.sketchOptions=new E,this._preserveAspectRatio=new y,this._snapRotation=new M,this.grabbing=!1,this.inputState=null,this._attachmentOrigin=null,this.type="transform-3d",this._outlineVisualElement=null}initialize(){const{view:t,object:e}=this,s=this._bounds=new j(this,(()=>this._updateManipulators()));this._extentMove=new _(this,s),this._extentScale=new f(this,s,(()=>this._preserveAspectRatio.createDragEventPipelineStep())),this._extentRotate=new g(this,s,(()=>this._snapRotation.createDragEventPipelineStep())),this.addHandles([o((()=>this.enableZ),(()=>this._updateManipulatorAvailability(this._extentMove.moveZManipulator,m.TRANSLATE_Z))),o((()=>this.enableScaling),(()=>this._extentScale.forEachManipulator((t=>this._updateManipulatorAvailability(t,m.SCALE))))),o((()=>this.enableRotation),(()=>this._updateManipulatorAvailability(this._extentRotate.rotateManipulator,m.ROTATE)))]),this._updateManipulators(),this._updateAllManipulatorAvailability();const n=v({view:t,object:e,forEachManipulator:t=>this._forEachManipulator(t),onManipulatorsChanged:()=>i()});if(null!=n){const{visualElement:t}=n;t instanceof R&&(this._outlineVisualElement=t,this.addHandles(t.events.on("attachment-origin-changed",(()=>this._bounds.updateDisplayBounds())))),this.addHandles(n)}this.addHandles([e.on("committed",(()=>this._onGeometryChanged())),o((()=>this.object.visible),(()=>this._updateAllManipulatorAvailability())),o((()=>this.object.isDraped),(()=>this._graphicDrapedChanged()),a),o((()=>t.pointsOfInterest?.centerOnSurfaceFrequent.location),(()=>s.updateDisplayBounds()))]);const r=t=>{this.addHandles(t.events.on("grab-changed",(()=>{this.grabbing=t.grabbing,this._updateAllManipulatorAvailability()})))};this._forEachManipulator(r);const l=(t,i)=>{this.addHandles(t.events.on("immediate-click",(t=>{i===m.TRANSLATE_XY&&this.events.emit("immediate-click",{...t,object:e}),t.stopPropagation()})))};this._forEachManipulator(l),this._initializeTooltip(),this.finishToolCreation()}destroy(){this._extentMove.destroy(),this._extentScale.destroy(),this._extentRotate.destroy(),this.tooltip.destroy(),this._set("view",null),this._set("object",null)}_initializeTooltip(){const{view:t}=this;this.tooltip=A((()=>({view:t,options:this.sketchOptions.tooltips})));const e=()=>{this.tooltip.info=this._getUpdatedTooltipInfo()};this.addHandles([o((()=>this.sketchOptions.tooltips.effectiveEnabled),e),o((()=>this.preserveAspectRatio),e)]),this._forEachManipulator((t=>{this.addHandles([t.events.on(["focus-changed","grab-changed"],e),t.events.on("drag",(t=>{"cancel"===t.action?this.tooltip.clear():e()}))])}))}_getUpdatedTooltipInfo(){return this.sketchOptions.tooltips.effectiveEnabled?this._extentMove.getUpdatedTooltipInfo()??this._extentScale.getUpdatedTooltipInfo()??this._extentRotate.getUpdatedTooltipInfo():null}_onGeometryChanged(){this._bounds.updateDisplayBounds()}_graphicDrapedChanged(){this.removeHandles(T),this._bounds.updateDisplayBounds(),this.object.isDraped&&this.addHandles(this.view.elevationProvider.on("elevation-change",(t=>{null!=this._attachmentOrigin&&r(t.extent,this._attachmentOrigin.x,this._attachmentOrigin.y)&&this._bounds.updateDisplayBounds()})),T)}_updateManipulators(){if(!this.visible)return;const t=this._bounds.displayBounds,e=p(t,l.get());this._extentMove.updateManipulators(e,t),this._extentScale.updateManipulators(e,t),this._extentRotate.updateManipulators(e,t)}_updateAllManipulatorAvailability(){this._forEachManipulator(((t,e)=>this._updateManipulatorAvailability(t,e)))}_updateManipulatorAvailability(t,e){const i=this.grabbing&&!t.grabbing;if(t.interactive=!i,t instanceof d){const o=this.object.visible,a=this.enableZ&&b(this.object.operations,this.object.elevationInfo);switch(e){case m.ROTATE:t.available=o&&this.enableRotation;break;case m.SCALE:t.available=o&&(this.enableScaling||this.enableRotation||a),t.interactive=!i&&this.enableScaling,t.state=this.enableScaling?h:c;break;case m.TRANSLATE_Z:t.available=o&&a;break;default:t.available=o}}}_forEachManipulator(t){this._extentMove.forEachManipulator(t),this._extentScale.forEachManipulator(t),this._extentRotate.forEachManipulator(t)}get preserveAspectRatio(){return this._preserveAspectRatio.enabled}set preserveAspectRatio(t){this._preserveAspectRatio.enabled=t,this._set("preserveAspectRatio",t)}get snapRotation(){return this._snapRotation.enabled}set snapRotation(t){this._snapRotation.enabled=t,this._set("snapRotation",t)}get attachmentOrigin(){const t=this.object.isDraped?null:this._outlineVisualElement?.attachmentOrigin;return this._attachmentOrigin=t??this.object.origin??u(this.object)?.extent?.center,this._attachmentOrigin}reset(){}cancelDrag(){if(this.canUndo){const t=this.object.operations?.undo();t&&this._bounds.updateMapBoundsFromOperationInverse(t)}this.inputState=null}get canUndo(){return!!this.object.operations?.canUndo}undo(){if(null!=this.inputState)this.view.activeTool=null;else if(this.canUndo){const t=this.object.operations?.undo();t&&this._bounds.updateMapBoundsFromOperationInverse(t)}}get canRedo(){return!!this.object.operations?.canRedo}redo(){if(this.canRedo){const t=this.object.operations?.redo();t&&this._bounds.updateMapBoundsFromOperation(t)}}get test(){}};t([s()],S.prototype,"updating",null),t([s({constructOnly:!0,nonNullable:!0})],S.prototype,"view",void 0),t([s({constructOnly:!0,nonNullable:!0})],S.prototype,"object",void 0),t([s()],S.prototype,"enableZ",void 0),t([s()],S.prototype,"enableScaling",void 0),t([s()],S.prototype,"enableRotation",void 0),t([s({constructOnly:!0,type:E})],S.prototype,"sketchOptions",void 0),t([s()],S.prototype,"preserveAspectRatio",null),t([s()],S.prototype,"snapRotation",null),t([s()],S.prototype,"grabbing",void 0),t([s()],S.prototype,"inputState",void 0),t([s({readOnly:!0})],S.prototype,"type",void 0),t([s()],S.prototype,"tooltip",void 0),S=t([n("esri.views.3d.interactive.editingTools.transform.ExtentTransformTool")],S);const T="draped-elevation-changes";export{S as ExtentTransformTool};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{makeHandle as t}from"../../../../../../core/handleUtils.js";import{zeroMeters as e}from"../../../../../../core/quantityUtils.js";import{rotateZ as o}from"../../../../../../core/libs/gl-matrix-2/math/mat4.js";import{d as i}from"../../../../../../chunks/vec32.js";import{clone as n}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sm4d as a,sv3d as r}from"../../../../../../geometry/support/vectorStacks.js";import{ShiftManipulator as s,OffsetMode as l}from"../../../../analysis/Slice/ShiftManipulator.js";import{IsShiftEdgeOnScreenFlag as p}from"../../../../analysis/Slice/sliceToolUtils.js";import{screenToZConstrained as c}from"../../dragEventPipeline3D.js";import{ManipulatorType as m}from"../../ManipulatorType.js";import{MoveXYObjectManipulation as u}from"../../manipulations/MoveXYObjectManipulation.js";import{createManipulatorDragEventPipeline as d,addScreenDelta as h,addMapDelta as v}from"../../../../../interactive/dragEventPipeline.js";import{AccumulationBehavior as f}from"../../../../../interactive/editGeometry/interfaces.js";import{TranslateTooltipInfo as _}from"../../../../../interactive/tooltip/infos/TranslateTooltipInfo.js";import{TranslateZTooltipInfo as M}from"../../../../../interactive/tooltip/infos/TranslateZTooltipInfo.js";import{autoDistance2D as g}from"../../../../../support/automaticLengthMeasurementUtils.js";import{verticalSignedDistance as j}from"../../../../../support/euclideanLengthMeasurementUtils.js";class b{get _object(){return this._tool.object}get _operations(){return this._object.operations}constructor(t,e){this._tool=t,this._bounds=e,this._moveXYTooltipInfo=null,this._moveZTooltipInfo=null;const o=this._tool,i=o.view;this.moveXYObjectManipulation=new u({view:i,tool:o,object:this._object}),o.addHandles(this._createMoveXYObjectDragPipeline()),this.moveZManipulator=new s(i,l.CENTER_ON_CALLOUT),this.moveZManipulator.state|=p,o.manipulators.add(this.moveZManipulator),o.addHandles(this._createMoveZDragPipeline()),o.addHandles(o.events.on("translate-stop",(()=>{this._moveXYTooltipInfo=null,this._moveZTooltipInfo=null})))}destroy(){this.moveXYObjectManipulation.destroy(),this._tool.manipulators.remove(this.moveZManipulator),this.moveZManipulator.destroy()}forEachManipulator(t){this.moveXYObjectManipulation.forEachManipulator(t),t(this.moveZManipulator,m.TRANSLATE_Z)}updateManipulators(t,e){const n=this.moveZManipulator,s=o(a.get(),t,Math.PI);s[12]=0,s[13]=0,s[14]=0,n.modelTransform=s,n.renderLocation=i(r.get(),e.origin,e.basis1)}getUpdatedTooltipInfo(){return this.moveXYObjectManipulation.grabbing||this.moveXYObjectManipulation.dragging?this._computeMoveXYTooltipInfo():this.moveZManipulator.focused?this._computeMoveZTooltipInfo():null}_computeMoveXYTooltipInfo(){const t=this._tool,o=this._moveXYTooltipInfo??=new _({sketchOptions:t.sketchOptions});if(this.moveXYObjectManipulation.dragging){const e=this._bounds,i=e.mapBoundsStart.origin,n=e.mapBounds.origin,{renderSpatialReference:a}=t.view;if(!a)return null;const r=g(i,n,a);if(null==r)return null;o.distance=r}else o.distance=e;return o}_computeMoveZTooltipInfo(){const t=this._tool,o=this._moveZTooltipInfo??=new M({sketchOptions:t.sketchOptions});if(this.moveZManipulator.dragging){const e=this._bounds,i=e.mapBoundsStart.origin,n=e.mapBounds.origin,{renderSpatialReference:a}=t.view;if(!a)return null;const r=j(i,n,a);if(null==r)return null;o.distance=r}else o.distance=e;return o}_createMoveXYObjectDragPipeline(){return this.moveXYObjectManipulation.createDragPipeline(((t,e,o)=>this._buildMoveDragPipeline(e,o)))}_createMoveZDragPipeline(){if(!this._operations)return t();const e=this._operations.data.spatialReference;return d(this.moveZManipulator,((t,o,i)=>{const a=n(t.renderLocation),r=o.next(c(this._tool.view,a,e)).next(h());this._buildMoveDragPipeline(r,i)}))}_buildMoveDragPipeline(t,e){const{_tool:o,_object:i}=this;t.next((t=>("start"===t.action&&(o.inputState={type:"move"},this._bounds.backupMapBounds(),o.events.emit("translate-start",{object:i,dxScreen:t.screenDeltaX,dyScreen:t.screenDeltaY})),t))).next(v()).next(this._updateGeometry()).next((t=>{const e={object:i,dxScreen:t.screenDeltaX,dyScreen:t.screenDeltaY};switch(t.action){case"start":case"update":(t.mapEnd.x-t.mapStart.x||t.mapEnd.y-t.mapStart.y||(t.mapEnd.z??0)-(t.mapStart.z??0))&&o.events.emit("translate",e);break;case"end":o.inputState=null,o.events.emit("translate-stop",e)}return t})),e.next((()=>{null!=o.inputState&&o.events.emit("translate-stop",{object:i,dxScreen:0,dyScreen:0}),o.cancel()}))}_updateGeometry(){const t=this._tool;return e=>{if(null==t.inputState||"move"!==t.inputState.type)return e;const o="start"===e.action?f.NEW_STEP:f.ACCUMULATE_STEPS;if(this._operations){const t=this._operations.move(e.mapDeltaX,e.mapDeltaY,e.mapDeltaZ,o);this._bounds.updateMapBoundsFromOperation(t)}return e}}}export{b as ExtentMove};
5
+ import{makeHandle as t}from"../../../../../../core/handleUtils.js";import{zeroMeters as e}from"../../../../../../core/quantityUtils.js";import{rotateZ as o}from"../../../../../../core/libs/gl-matrix-2/math/mat4.js";import{d as i}from"../../../../../../chunks/vec32.js";import{clone as n}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sm4d as a,sv3d as r}from"../../../../../../geometry/support/vectorStacks.js";import{ShiftManipulator as s,OffsetMode as l}from"../../../../analysis/Slice/ShiftManipulator.js";import{IsShiftEdgeOnScreenFlag as p}from"../../../../analysis/Slice/sliceToolUtils.js";import{screenToZConstrained as c}from"../../dragEventPipeline3D.js";import{ManipulatorType as m}from"../../ManipulatorType.js";import{MoveXYObjectManipulation as u}from"../../manipulations/MoveXYObjectManipulation.js";import{createManipulatorDragEventPipeline as d,addScreenDelta as h,addMapDelta as v}from"../../../../../interactive/dragEventPipeline.js";import{AccumulationBehavior as f}from"../../../../../interactive/editGeometry/interfaces.js";import{TranslateTooltipInfo as _}from"../../../../../interactive/tooltip/infos/TranslateTooltipInfo.js";import{TranslateZTooltipInfo as M}from"../../../../../interactive/tooltip/infos/TranslateZTooltipInfo.js";import{autoDistance2D as g}from"../../../../../support/automaticLengthMeasurementUtils.js";import{verticalSignedDistance as j}from"../../../../../support/euclideanLengthMeasurementUtils.js";class b{get _object(){return this._tool.object}get _operations(){return this._object.operations}constructor(t,e){this._tool=t,this._bounds=e,this._moveXYTooltipInfo=null,this._moveZTooltipInfo=null;const o=this._tool,i=o.view;this.moveXYObjectManipulation=new u({view:i,tool:o,object:this._object}),o.addHandles(this._createMoveXYObjectDragPipeline()),this.moveZManipulator=new s(i,l.CENTER_ON_CALLOUT),this.moveZManipulator.state|=p,o.manipulators.add(this.moveZManipulator),o.addHandles(this._createMoveZDragPipeline()),o.addHandles(o.events.on("translate-stop",(()=>{this._moveXYTooltipInfo=null,this._moveZTooltipInfo=null})))}destroy(){this.moveXYObjectManipulation.destroy(),this._tool.manipulators.remove(this.moveZManipulator),this.moveZManipulator.destroy()}forEachManipulator(t){this.moveXYObjectManipulation.forEachManipulator(t),t(this.moveZManipulator,m.TRANSLATE_Z)}updateManipulators(t,e){const n=this.moveZManipulator,s=o(a.get(),t,Math.PI);s[12]=0,s[13]=0,s[14]=0,n.modelTransform=s,n.renderLocation=i(r.get(),e.origin,e.basis1)}getUpdatedTooltipInfo(){return this.moveXYObjectManipulation.grabbing||this.moveXYObjectManipulation.dragging?this._computeMoveXYTooltipInfo():this.moveZManipulator.focused?this._computeMoveZTooltipInfo():null}_computeMoveXYTooltipInfo(){const t=this._tool,o=this._moveXYTooltipInfo??=new _({sketchOptions:t.sketchOptions});if(this.moveXYObjectManipulation.dragging){const e=this._bounds,i=e.mapBoundsStart.origin,n=e.mapBounds.origin,{renderSpatialReference:a}=t.view;if(!a)return null;const r=g(i,n,a);if(null==r)return null;o.distance=r}else o.distance=e;return o}_computeMoveZTooltipInfo(){const t=this._tool,o=this._moveZTooltipInfo??=new M({sketchOptions:t.sketchOptions});if(this.moveZManipulator.dragging){const e=this._bounds,i=e.mapBoundsStart.origin,n=e.mapBounds.origin,{renderSpatialReference:a}=t.view;if(!a)return null;const r=j(i,n,a);if(null==r)return null;o.distance=r}else o.distance=e;return o}_createMoveXYObjectDragPipeline(){return this.moveXYObjectManipulation.createDragPipeline(((t,e,o)=>this._buildMoveDragPipeline(e,o)))}_createMoveZDragPipeline(){if(!this._operations)return t();const e=this._operations.data.spatialReference;return d(this.moveZManipulator,((t,o,i)=>{const a=n(t.renderLocation),r=o.next(c(this._tool.view,a,e)).next(h());this._buildMoveDragPipeline(r,i)}))}_buildMoveDragPipeline(t,e){const{_tool:o,_object:i}=this;t.next((t=>("start"===t.action&&(o.inputState={type:"move"},this._bounds.backupMapBounds(),o.events.emit("translate-start",{object:i,dxScreen:t.screenDeltaX,dyScreen:t.screenDeltaY})),t))).next(v()).next(this._updateGeometry()).next((t=>{const e={object:i,dxScreen:t.screenDeltaX,dyScreen:t.screenDeltaY};switch(t.action){case"start":case"update":(t.mapEnd.x-t.mapStart.x||t.mapEnd.y-t.mapStart.y||(t.mapEnd.z??0)-(t.mapStart.z??0))&&o.events.emit("translate",e);break;case"end":o.inputState=null,o.events.emit("translate-stop",e)}return t})),e.next((()=>{null!=o.inputState&&o.events.emit("translate-stop",{object:i,dxScreen:0,dyScreen:0}),o.cancelDrag()}))}_updateGeometry(){const t=this._tool;return e=>{if(null==t.inputState||"move"!==t.inputState.type)return e;const o="start"===e.action?f.NEW_STEP:f.ACCUMULATE_STEPS;if(this._operations){const t=this._operations.move(e.mapDeltaX,e.mapDeltaY,e.mapDeltaZ,o);this._bounds.updateMapBoundsFromOperation(t)}return e}}}export{b as ExtentMove};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{rad2deg as t}from"../../../../../../core/mathUtils.js";import{rotateX as e}from"../../../../../../core/libs/gl-matrix-2/math/mat4.js";import{g as o,c as r}from"../../../../../../chunks/vec32.js";import{create as a}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as n}from"../../../../../../chunks/boundedPlane.js";import{create as s,intersectRay as i,getNormal as l}from"../../../../../../geometry/support/plane.js";import{sm4d as p,sv3d as c}from"../../../../../../geometry/support/vectorStacks.js";import{getRotateHeadingTexture as u}from"../../../../analysis/images/Factory.js";import{RotateManipulator as m}from"../../../../analysis/Slice/RotateManipulator.js";import{createRotatePlane as d,RotationAxis as h}from"../../../../analysis/Slice/sliceToolUtils.js";import{calculateInputRotationTransform as g}from"../../../manipulatorUtils.js";import{screenToRenderPlane as _}from"../../dragEventPipeline3D.js";import{ManipulatorType as f}from"../../ManipulatorType.js";import{fromScreenNormalized as j}from"../../../../support/geometryUtils/ray.js";import{createManipulatorDragEventPipeline as v}from"../../../../../interactive/dragEventPipeline.js";import{AccumulationBehavior as b}from"../../../../../interactive/editGeometry/interfaces.js";import{AccumulationType as A}from"../../../../../interactive/editGeometry/operations/UpdateVertices.js";import{ExtentRotateTooltipInfo as y}from"../../../../../interactive/tooltip/infos/ExtentRotateTooltipInfo.js";class M{get _object(){return this._tool.object}get _operations(){return this._object.operations}constructor(t,e,o){this._tool=t,this._bounds=e,this._snapRotation=o,this._rotateTooltipInfo=null,this._startAngle=0,this._endAngle=0;const r=this._tool,a=r.view,n=!a.stage?.renderView.renderingContext.driverTest.svgPremultipliesAlpha.result;this.rotateManipulator=new m(a,((t,e)=>u(a.stage.textures,{accentColor:t,contrastColor:e,preMultiplyAlpha:n}))),r.addHandles([this.rotateManipulator.events.on("grab-changed",(t=>this._onGrabChanged(t))),this._createRotateDragPipeline(this.rotateManipulator)]),r.manipulators.add(this.rotateManipulator),r.addHandles([r.events.on("rotate-start",(t=>this._startAngle=t.angle)),r.events.on("rotate",(t=>this._endAngle=t.angle)),r.events.on("rotate-stop",(()=>{this._startAngle=0,this._endAngle=0}))])}destroy(){this._tool.manipulators.remove(this.rotateManipulator),this.rotateManipulator.destroy()}forEachManipulator(t){t(this.rotateManipulator,f.ROTATE)}updateManipulators(t,r){const a=this._bounds.mapBounds.plane[2]<0?Math.PI:0,n=e(p.get(),t,a);n[12]=0,n[13]=0,n[14]=0,this.rotateManipulator.modelTransform=n,this.rotateManipulator.renderLocation=o(c.get(),r.origin,r.basis1)}getUpdatedTooltipInfo(){return this.rotateManipulator.focused?this._computeRotateTooltipInfo():null}_computeRotateTooltipInfo(){const t=this._rotateTooltipInfo??=new y({sketchOptions:this._tool.sketchOptions});return t.angle=this._startAngle-this._endAngle,t}_onGrabChanged({action:t,screenPoint:e}){const o=this._tool,r=this._bounds;if("start"!==t||!e)return;const a=d(r.displayBounds,o.view.renderCoordsHelper,h.HEADING,s()),n=j(o.view.state.camera,e);i(a,n,c.get())&&(r.backupMapBounds(),o.inputState={type:"rotate",rotatePlane:a})}_createRotateDragPipeline(e){const{_tool:o,_object:r}=this;return v(e,((e,a,n)=>{const s=o.inputState;null!=s&&(a.next((t=>("start"===t.action&&o.events.emit("rotate-start",{object:r,angle:0}),t))).next(_(o.view,s.rotatePlane)).next(this._renderPlaneToAngle()).next(...this._snapRotation()).next(this._updateGeometry()).next((e=>{const a={object:r,angle:t(e.rotateAngle)};switch(e.action){case"start":case"update":o.events.emit("rotate",a);break;case"end":o.inputState=null,o.events.emit("rotate-stop",a)}return e})),n.next((()=>{null!=o.inputState&&o.events.emit("rotate-stop",{object:r,angle:0}),o.cancel()})))}))}_renderPlaneToAngle(){return t=>{const e=g(t.renderStart,t.renderEnd,this._bounds.displayBounds.origin,l(t.plane));return{...t,rotateAngle:e}}}_updateGeometry(){const t=this._bounds;return e=>{const o=r(a(),t.mapBoundsStart.origin),s="start"===e.action?b.NEW_STEP:b.ACCUMULATE_STEPS;if(this._operations){const r=this._operations.rotate(o,e.rotateAngle,s,A.REPLACE);n(t.mapBoundsStart,t.mapBounds),t.updateMapBoundsFromOperation(r)}return e}}}export{M as ExtentRotate};
5
+ import{rad2deg as t}from"../../../../../../core/mathUtils.js";import{rotateX as e}from"../../../../../../core/libs/gl-matrix-2/math/mat4.js";import{g as o,c as r}from"../../../../../../chunks/vec32.js";import{create as a}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as n}from"../../../../../../chunks/boundedPlane.js";import{create as s,intersectRay as i,getNormal as l}from"../../../../../../geometry/support/plane.js";import{sm4d as p,sv3d as c}from"../../../../../../geometry/support/vectorStacks.js";import{getRotateHeadingTexture as u}from"../../../../analysis/images/Factory.js";import{RotateManipulator as m}from"../../../../analysis/Slice/RotateManipulator.js";import{createRotatePlane as d,RotationAxis as h}from"../../../../analysis/Slice/sliceToolUtils.js";import{calculateInputRotationTransform as g}from"../../../manipulatorUtils.js";import{screenToRenderPlane as _}from"../../dragEventPipeline3D.js";import{ManipulatorType as f}from"../../ManipulatorType.js";import{fromScreenNormalized as j}from"../../../../support/geometryUtils/ray.js";import{createManipulatorDragEventPipeline as v}from"../../../../../interactive/dragEventPipeline.js";import{AccumulationBehavior as b}from"../../../../../interactive/editGeometry/interfaces.js";import{AccumulationType as A}from"../../../../../interactive/editGeometry/operations/UpdateVertices.js";import{ExtentRotateTooltipInfo as y}from"../../../../../interactive/tooltip/infos/ExtentRotateTooltipInfo.js";class M{get _object(){return this._tool.object}get _operations(){return this._object.operations}constructor(t,e,o){this._tool=t,this._bounds=e,this._snapRotation=o,this._rotateTooltipInfo=null,this._startAngle=0,this._endAngle=0;const r=this._tool,a=r.view,n=!a.stage?.renderView.renderingContext.driverTest.svgPremultipliesAlpha.result;this.rotateManipulator=new m(a,((t,e)=>u(a.stage.textures,{accentColor:t,contrastColor:e,preMultiplyAlpha:n}))),r.addHandles([this.rotateManipulator.events.on("grab-changed",(t=>this._onGrabChanged(t))),this._createRotateDragPipeline(this.rotateManipulator)]),r.manipulators.add(this.rotateManipulator),r.addHandles([r.events.on("rotate-start",(t=>this._startAngle=t.angle)),r.events.on("rotate",(t=>this._endAngle=t.angle)),r.events.on("rotate-stop",(()=>{this._startAngle=0,this._endAngle=0}))])}destroy(){this._tool.manipulators.remove(this.rotateManipulator),this.rotateManipulator.destroy()}forEachManipulator(t){t(this.rotateManipulator,f.ROTATE)}updateManipulators(t,r){const a=this._bounds.mapBounds.plane[2]<0?Math.PI:0,n=e(p.get(),t,a);n[12]=0,n[13]=0,n[14]=0,this.rotateManipulator.modelTransform=n,this.rotateManipulator.renderLocation=o(c.get(),r.origin,r.basis1)}getUpdatedTooltipInfo(){return this.rotateManipulator.focused?this._computeRotateTooltipInfo():null}_computeRotateTooltipInfo(){const t=this._rotateTooltipInfo??=new y({sketchOptions:this._tool.sketchOptions});return t.angle=this._startAngle-this._endAngle,t}_onGrabChanged({action:t,screenPoint:e}){const o=this._tool,r=this._bounds;if("start"!==t||!e)return;const a=d(r.displayBounds,o.view.renderCoordsHelper,h.HEADING,s()),n=j(o.view.state.camera,e);i(a,n,c.get())&&(r.backupMapBounds(),o.inputState={type:"rotate",rotatePlane:a})}_createRotateDragPipeline(e){const{_tool:o,_object:r}=this;return v(e,((e,a,n)=>{const s=o.inputState;null!=s&&(a.next((t=>("start"===t.action&&o.events.emit("rotate-start",{object:r,angle:0}),t))).next(_(o.view,s.rotatePlane)).next(this._renderPlaneToAngle()).next(...this._snapRotation()).next(this._updateGeometry()).next((e=>{const a={object:r,angle:t(e.rotateAngle)};switch(e.action){case"start":case"update":o.events.emit("rotate",a);break;case"end":o.inputState=null,o.events.emit("rotate-stop",a)}return e})),n.next((()=>{null!=o.inputState&&o.events.emit("rotate-stop",{object:r,angle:0}),o.cancelDrag()})))}))}_renderPlaneToAngle(){return t=>{const e=g(t.renderStart,t.renderEnd,this._bounds.displayBounds.origin,l(t.plane));return{...t,rotateAngle:e}}}_updateGeometry(){const t=this._bounds;return e=>{const o=r(a(),t.mapBoundsStart.origin),s="start"===e.action?b.NEW_STEP:b.ACCUMULATE_STEPS;if(this._operations){const r=this._operations.rotate(o,e.rotateAngle,s,A.REPLACE);n(t.mapBoundsStart,t.mapBounds),t.updateMapBoundsFromOperation(r)}return e}}}export{M as ExtentRotate};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{set as t,normalize as e}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as s}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{c as i,b as a,d as o,l as r,f as n}from"../../../../../../chunks/vec32.js";import{create as c}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{d as p,a as l}from"../../../../../../chunks/boundedPlane.js";import{intersectRay as d}from"../../../../../../geometry/support/plane.js";import{sv3d as u}from"../../../../../../geometry/support/vectorStacks.js";import{ResizeManipulator as h}from"../../../../analysis/Slice/ResizeManipulator.js";import{updateResizeHandle as m,isDiagonalResizeHandle as _,calculateDiagonalResizeHandleScale as f}from"../../../../analysis/Slice/sliceToolUtils.js";import{screenToRenderPlane as S}from"../../dragEventPipeline3D.js";import{ManipulatorType as y}from"../../ManipulatorType.js";import{mapPlaneAutoSize2D as x}from"./extentUtils.js";import{fromScreenNormalized as M}from"../../../../support/geometryUtils/ray.js";import{createManipulatorDragEventPipeline as g}from"../../../../../interactive/dragEventPipeline.js";import{AccumulationBehavior as b}from"../../../../../interactive/editGeometry/interfaces.js";import{AccumulationType as z}from"../../../../../interactive/editGeometry/operations/UpdateVertices.js";import{ExtentScaleTooltipInfo as j}from"../../../../../interactive/tooltip/infos/ExtentScaleTooltipInfo.js";class v{get _object(){return this._tool.object}get _operations(){return this._object.operations}get zMax(){if(!this._zMaxDirty||!this._operations)return this._zMax;const t=this._operations.data;if(t.geometry.hasZ){const e=t.coordinateHelper;this._zMax=Number.NEGATIVE_INFINITY;for(const s of t.components)for(const t of s.vertices){const s=e.getZ(t.pos)??0;this._zMax=Math.max(s,this._zMax)}}else this._zMax=0;return this._zMaxDirty=!1,this._zMax}constructor(t,e,s){this._tool=t,this._bounds=e,this._preserveAspectRatioStep=s,this._resizeHandles=[{direction:[1,0]},{direction:[1,1]},{direction:[0,1]},{direction:[-1,1]},{direction:[-1,0]},{direction:[-1,-1]},{direction:[0,-1]},{direction:[1,-1]}],this._displayBoundsStart=p(),this._displayBoundsMarginStart=0,this._zMax=0,this._zMaxDirty=!0;const i=this._tool,a=i.view;this.resizeManipulators=this._resizeHandles.map((t=>{const e=new h(a,t);return i.addHandles([e.events.on("grab-changed",(t=>this._onGrabChanged(t))),this._createResizeDragPipeline(e,t)]),e})),i.manipulators.addMany(this.resizeManipulators),this._operations&&i.addHandles(this._operations.data.on("change",(()=>{"resize"!==i.inputState?.type&&(this._zMaxDirty=!0)})))}destroy(){this.forEachManipulator((t=>{this._tool.manipulators.remove(t),t.destroy()}))}forEachManipulator(t){this.resizeManipulators.forEach((e=>t(e,y.SCALE)))}updateManipulators(t,e){this.resizeManipulators.forEach(((s,i)=>{m(s,this._resizeHandles[i],t,e)}))}getUpdatedTooltipInfo(){if(!this.resizeManipulators.some((t=>t.focused)))return null;const t=this._tooltipInfo??=new j({sketchOptions:this._tool.sketchOptions}),e=x(this._bounds.mapBounds,this.zMax,this._bounds.spatialReference);return e&&(t.xSize=e.xSize,t.ySize=e.ySize),this.resizeManipulators.some((t=>t.dragging))||(t.xScale=1,t.yScale=1),t}_onGrabChanged({action:t,screenPoint:e}){const s=this._tool,i=this._bounds;if("start"!==t||!e)return;const a=M(s.view.state.camera,e);d(i.displayBounds.plane,a,u.get())&&(i.backupMapBounds(),l(i.displayBounds,this._displayBoundsStart),this._displayBoundsMarginStart=i.displayBoundsMargin,s.inputState={type:"resize"})}_createResizeDragPipeline(t,e){const{_tool:s,_object:i}=this;return g(t,((t,a,o)=>{null!=s.inputState&&(a.next((t=>("start"===t.action&&s.events.emit("scale-start",{object:i,xScale:1,yScale:1}),{...t,handle:e}))).next(S(s.view,this._displayBoundsStart.plane)).next(this._renderPlaneToFactors()).next(...this._preserveAspectRatioStep()).next(this._updateGeometry()).next((t=>{const e=this._tooltipInfo;e&&(e.xScale=t.factor1,e.yScale=t.factor2);const a={object:i,xScale:t.factor1,yScale:t.factor2};switch(t.action){case"start":case"update":s.events.emit("scale",a);break;case"end":s.inputState=null,s.events.emit("scale-stop",a)}return t})),o.next((()=>{null!=s.inputState&&s.events.emit("scale-stop",{object:i,xScale:1,yScale:1}),s.cancel()})))}))}_renderPlaneToFactors(){const t=this._bounds;return e=>{const s=this._displayBoundsStart,c=e.handle.direction,p=t.displayBoundsMargin,l=this._displayBoundsMarginStart,d=i(u.get(),s.origin);a(d,d,s.basis1,-c[0]),a(d,d,s.basis2,-c[1]);const h=o(u.get(),e.renderEnd,d),m=o(u.get(),e.renderStart,d),S=_(e.handle),y=f(s),x=f(t.displayBounds)/y,M=(t,e)=>{if(0===t)return 1;let s=r(e),i=.5*t*n(e,h)/s;const a=i<0?-1:1;if(S){i+=(s-.5*t*n(e,m)/s)*a*x}const o=s<1.5*l?1:B;return s=Math.max(s-l,B),a>0&&(i-=p),a*Math.max(a*(i/s),o)};return{...e,factor1:M(c[0],s.basis1),factor2:M(c[1],s.basis2)}}}_updateGeometry(){const o=this._bounds;return r=>{const n=i(c(),o.mapBoundsStart.origin);a(n,n,o.mapBoundsStart.basis1,-r.handle.direction[0]),a(n,n,o.mapBoundsStart.basis2,-r.handle.direction[1]);const p=t(s(),o.mapBoundsStart.basis1[0],o.mapBoundsStart.basis1[1]);e(p,p);const d="start"===r.action?b.NEW_STEP:b.ACCUMULATE_STEPS;if(this._operations){const t=this._operations.scale(n,p,r.factor1,r.factor2,d,z.REPLACE);l(o.mapBoundsStart,o.mapBounds),o.updateMapBoundsFromOperation(t)}return r}}}const B=1e-6;export{v as ExtentScale,B as scaleEpsilon};
5
+ import{set as t,normalize as e}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as s}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{c as i,b as a,d as o,l as r,f as n}from"../../../../../../chunks/vec32.js";import{create as c}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{d as p,a as l}from"../../../../../../chunks/boundedPlane.js";import{intersectRay as d}from"../../../../../../geometry/support/plane.js";import{sv3d as u}from"../../../../../../geometry/support/vectorStacks.js";import{ResizeManipulator as h}from"../../../../analysis/Slice/ResizeManipulator.js";import{updateResizeHandle as m,isDiagonalResizeHandle as _,calculateDiagonalResizeHandleScale as f}from"../../../../analysis/Slice/sliceToolUtils.js";import{screenToRenderPlane as S}from"../../dragEventPipeline3D.js";import{ManipulatorType as y}from"../../ManipulatorType.js";import{mapPlaneAutoSize2D as g}from"./extentUtils.js";import{fromScreenNormalized as x}from"../../../../support/geometryUtils/ray.js";import{createManipulatorDragEventPipeline as M}from"../../../../../interactive/dragEventPipeline.js";import{AccumulationBehavior as b}from"../../../../../interactive/editGeometry/interfaces.js";import{AccumulationType as z}from"../../../../../interactive/editGeometry/operations/UpdateVertices.js";import{ExtentScaleTooltipInfo as j}from"../../../../../interactive/tooltip/infos/ExtentScaleTooltipInfo.js";class v{get _object(){return this._tool.object}get _operations(){return this._object.operations}get zMax(){if(!this._zMaxDirty||!this._operations)return this._zMax;const t=this._operations.data;if(t.geometry.hasZ){const e=t.coordinateHelper;this._zMax=Number.NEGATIVE_INFINITY;for(const s of t.components)for(const t of s.vertices){const s=e.getZ(t.pos)??0;this._zMax=Math.max(s,this._zMax)}}else this._zMax=0;return this._zMaxDirty=!1,this._zMax}constructor(t,e,s){this._tool=t,this._bounds=e,this._preserveAspectRatioStep=s,this._resizeHandles=[{direction:[1,0]},{direction:[1,1]},{direction:[0,1]},{direction:[-1,1]},{direction:[-1,0]},{direction:[-1,-1]},{direction:[0,-1]},{direction:[1,-1]}],this._displayBoundsStart=p(),this._displayBoundsMarginStart=0,this._zMax=0,this._zMaxDirty=!0;const i=this._tool,a=i.view;this.resizeManipulators=this._resizeHandles.map((t=>{const e=new h(a,t);return i.addHandles([e.events.on("grab-changed",(t=>this._onGrabChanged(t))),this._createResizeDragPipeline(e,t)]),e})),i.manipulators.addMany(this.resizeManipulators),this._operations&&i.addHandles(this._operations.data.on("change",(()=>{"resize"!==i.inputState?.type&&(this._zMaxDirty=!0)})))}destroy(){this.forEachManipulator((t=>{this._tool.manipulators.remove(t),t.destroy()}))}forEachManipulator(t){this.resizeManipulators.forEach((e=>t(e,y.SCALE)))}updateManipulators(t,e){this.resizeManipulators.forEach(((s,i)=>{m(s,this._resizeHandles[i],t,e)}))}getUpdatedTooltipInfo(){if(!this.resizeManipulators.some((t=>t.focused)))return null;const t=this._tooltipInfo??=new j({sketchOptions:this._tool.sketchOptions}),e=g(this._bounds.mapBounds,this.zMax,this._bounds.spatialReference);return e&&(t.xSize=e.xSize,t.ySize=e.ySize),this.resizeManipulators.some((t=>t.dragging))||(t.xScale=1,t.yScale=1),t}_onGrabChanged({action:t,screenPoint:e}){const s=this._tool,i=this._bounds;if("start"!==t||!e)return;const a=x(s.view.state.camera,e);d(i.displayBounds.plane,a,u.get())&&(i.backupMapBounds(),l(i.displayBounds,this._displayBoundsStart),this._displayBoundsMarginStart=i.displayBoundsMargin,s.inputState={type:"resize"})}_createResizeDragPipeline(t,e){const{_tool:s,_object:i}=this;return M(t,((t,a,o)=>{null!=s.inputState&&(a.next((t=>("start"===t.action&&s.events.emit("scale-start",{object:i,xScale:1,yScale:1}),{...t,handle:e}))).next(S(s.view,this._displayBoundsStart.plane)).next(this._renderPlaneToFactors()).next(...this._preserveAspectRatioStep()).next(this._updateGeometry()).next((t=>{const e=this._tooltipInfo;e&&(e.xScale=t.factor1,e.yScale=t.factor2);const a={object:i,xScale:t.factor1,yScale:t.factor2};switch(t.action){case"start":case"update":s.events.emit("scale",a);break;case"end":s.inputState=null,s.events.emit("scale-stop",a)}return t})),o.next((()=>{null!=s.inputState&&s.events.emit("scale-stop",{object:i,xScale:1,yScale:1}),s.cancelDrag()})))}))}_renderPlaneToFactors(){const t=this._bounds;return e=>{const s=this._displayBoundsStart,c=e.handle.direction,p=t.displayBoundsMargin,l=this._displayBoundsMarginStart,d=i(u.get(),s.origin);a(d,d,s.basis1,-c[0]),a(d,d,s.basis2,-c[1]);const h=o(u.get(),e.renderEnd,d),m=o(u.get(),e.renderStart,d),S=_(e.handle),y=f(s),g=f(t.displayBounds)/y,x=(t,e)=>{if(0===t)return 1;let s=r(e),i=.5*t*n(e,h)/s;const a=i<0?-1:1;if(S){i+=(s-.5*t*n(e,m)/s)*a*g}const o=s<1.5*l?1:B;return s=Math.max(s-l,B),a>0&&(i-=p),a*Math.max(a*(i/s),o)};return{...e,factor1:x(c[0],s.basis1),factor2:x(c[1],s.basis2)}}}_updateGeometry(){const o=this._bounds;return r=>{const n=i(c(),o.mapBoundsStart.origin);a(n,n,o.mapBoundsStart.basis1,-r.handle.direction[0]),a(n,n,o.mapBoundsStart.basis2,-r.handle.direction[1]);const p=t(s(),o.mapBoundsStart.basis1[0],o.mapBoundsStart.basis1[1]);e(p,p);const d="start"===r.action?b.NEW_STEP:b.ACCUMULATE_STEPS;if(this._operations){const t=this._operations.scale(n,p,r.factor1,r.factor2,d,z.REPLACE);l(o.mapBoundsStart,o.mapBounds),o.updateMapBoundsFromOperation(t)}return r}}}const B=1e-6;export{v as ExtentScale,B as scaleEpsilon};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{deg2rad as e}from"../../../../core/mathUtils.js";import{fromScaling as t,mul as r,fromTranslation as s,fromRotation as i}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{i as a,c as n,t as l}from"../../../../chunks/vec32.js";import{fromValues as m,create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{viewshedVisualizationConfiguration as h,arcAnglePerSegment as f}from"../../analysis/Viewshed/ViewshedConfiguration.js";import{getViewshedRotationMatrix as u,rotateBy as p}from"../../analysis/Viewshed/viewshedToolUtils.js";import{Object3DVisualElement as d}from"./Object3DVisualElement.js";import{Attribute as w}from"../../webgl-engine/lib/Attribute.js";import{Geometry as b}from"../../webgl-engine/lib/Geometry.js";import{VertexAttribute as g}from"../../webgl-engine/lib/VertexAttribute.js";import{ColorMaterial as j}from"../../webgl-engine/materials/ColorMaterial.js";class v extends d{constructor(e){super(e),this._material=null,this._viewshedComputedData=null,this._material=new j({...h.shapeMaterialParameters,isDecoration:this.isDecoration,writeDepth:!1}),this.applyProperties(e)}get viewshedComputedData(){return this._viewshedComputedData}set viewshedComputedData(e){this._viewshedComputedData=e,this.updateTransform()}updateTransform(){const e=this._viewshedComputedData;if(null==e)return;const i=o(),a=e.farDistanceRenderSpace;t(i,m(a,a,a)),u(e,E),r(i,E,i),s(E,this._viewshedComputedData.observerRenderSpace),r(i,E,i),this.transform=i}createExternalResources(){}destroyExternalResources(){}forEachExternalMaterial(e){null!=this._material&&e(this._material)}createGeometries(e){const{_material:t,viewshedComputedData:r}=this;if(null==r||null==t||!r.isValid())return;D(t,r).forEach((t=>e.addGeometry(t)))}}function D(t,r){const{horizontalFieldOfView:s,verticalFieldOfView:o}=r,m=a(_,0,0,1),c=a(x,0,1,0),h=a(V,1,0,0);p(m,m,e(o/2),c),p(m,m,e(s/2),h);const u=e=>Math.ceil(Math.abs(e)/f)+1,d=e(s),j=n(y,h),v=u(d),D=C(-d/(v-1)),O=i(E,D,j),R=e(-o),T=u(R),G=C(R/(T-1)),N=n(x,c),P=i(M,e(s)/2,h);l(N,N,P);const S=M,A=[],F=n(V,m);for(let e=0;e<v;e++){i(S,G,N);for(let t=0;t<T;t++){const r=3*(t*v+e);A[r]=F[0],A[r+1]=F[1],A[r+2]=F[2],l(F,F,S)}l(N,N,O),l(m,m,O),n(F,m)}const I=v*T;A[3*I]=0,A[3*I+1]=0,A[3*I+2]=0;const U=[];for(let e=0;e<v-1;e++)for(let t=0;t<T-1;t++){const r=6*(t*(v-1)+e);U[r]=t*v+e,U[r+1]=(t+1)*v+e,U[r+2]=t*v+e+1,U[r+3]=t*v+e+1,U[r+4]=(t+1)*v+e,U[r+5]=(t+1)*v+e+1}const k=[U];if(360!==s&&0!==o){const e=[],t=[];for(let r=0;r<T-1;r++){const s=3*r;e[s]=I,e[s+1]=(r+1)*v,e[s+2]=r*v,t[s]=I,t[s+1]=r*v+v-1,t[s+2]=(r+1)*v+v-1}k.push(e,t)}if(180!==o&&0!==s){const e=[],t=[];for(let r=0;r<v-1;r++){const s=3*r;e[s]=I,e[s+1]=r,e[s+2]=r+1,t[s]=I,t[s+1]=r+(T-1)*v+1,t[s+2]=r+(T-1)*v}k.push(e,t)}return k.map((e=>{const r=[[g.POSITION,new w(A,e,3,!0)]];return new b(t,r)}))}function C(e){return isNaN(e)?1:e}const _=c(),x=c(),V=c(),y=c(),E=o(),M=o();export{v as ViewshedShapeVisualElement};
5
+ import{deg2rad as e}from"../../../../core/mathUtils.js";import{fromScaling as t,mul as r,fromTranslation as s,fromRotation as i}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{i as a,c as n,t as l}from"../../../../chunks/vec32.js";import{fromValues as m,create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{viewshedVisualizationConfiguration as h,arcAnglePerSegment as f}from"../../analysis/Viewshed/ViewshedConfiguration.js";import{getViewshedRotationMatrix as u,rotateBy as p}from"../../analysis/Viewshed/viewshedToolUtils.js";import{Object3DVisualElement as d}from"./Object3DVisualElement.js";import{Attribute as w}from"../../webgl-engine/lib/Attribute.js";import{Geometry as b}from"../../webgl-engine/lib/Geometry.js";import{VertexAttribute as v}from"../../webgl-engine/lib/VertexAttribute.js";import{ColorMaterial as g}from"../../webgl-engine/materials/ColorMaterial.js";class j extends d{constructor(e){super(e),this._material=null,this._viewshedComputedData=null,this._material=new g({...h.shapeMaterialParameters,isDecoration:this.isDecoration,writeDepth:!1}),this.applyProperties(e)}get viewshedComputedData(){return this._viewshedComputedData}set viewshedComputedData(e){this._viewshedComputedData=e,this.updateTransform()}updateTransform(){const e=this._viewshedComputedData;if(null==e)return;const i=o(),a=e.farDistanceRenderSpace;t(i,m(a,a,a)),u(e,E),r(i,E,i),s(E,this._viewshedComputedData.observerRenderSpace),r(i,E,i),this.transform=i}createExternalResources(){}destroyExternalResources(){}forEachExternalMaterial(e){null!=this._material&&e(this._material)}createGeometries(e){const{_material:t,viewshedComputedData:r}=this;if(null==r||null==t||!r.valid)return;D(t,r).forEach((t=>e.addGeometry(t)))}}function D(t,r){const{horizontalFieldOfView:s,verticalFieldOfView:o}=r,m=a(_,0,0,1),c=a(x,0,1,0),h=a(V,1,0,0);p(m,m,e(o/2),c),p(m,m,e(s/2),h);const u=e=>Math.ceil(Math.abs(e)/f)+1,d=e(s),g=n(y,h),j=u(d),D=C(-d/(j-1)),O=i(E,D,g),R=e(-o),T=u(R),G=C(R/(T-1)),N=n(x,c),P=i(M,e(s)/2,h);l(N,N,P);const S=M,A=[],F=n(V,m);for(let e=0;e<j;e++){i(S,G,N);for(let t=0;t<T;t++){const r=3*(t*j+e);A[r]=F[0],A[r+1]=F[1],A[r+2]=F[2],l(F,F,S)}l(N,N,O),l(m,m,O),n(F,m)}const I=j*T;A[3*I]=0,A[3*I+1]=0,A[3*I+2]=0;const U=[];for(let e=0;e<j-1;e++)for(let t=0;t<T-1;t++){const r=6*(t*(j-1)+e);U[r]=t*j+e,U[r+1]=(t+1)*j+e,U[r+2]=t*j+e+1,U[r+3]=t*j+e+1,U[r+4]=(t+1)*j+e,U[r+5]=(t+1)*j+e+1}const k=[U];if(360!==s&&0!==o){const e=[],t=[];for(let r=0;r<T-1;r++){const s=3*r;e[s]=I,e[s+1]=(r+1)*j,e[s+2]=r*j,t[s]=I,t[s+1]=r*j+j-1,t[s+2]=(r+1)*j+j-1}k.push(e,t)}if(180!==o&&0!==s){const e=[],t=[];for(let r=0;r<j-1;r++){const s=3*r;e[s]=I,e[s+1]=r,e[s+2]=r+1,t[s]=I,t[s+1]=r+(T-1)*j+1,t[s+2]=r+(T-1)*j}k.push(e,t)}return k.map((e=>{const r=[[v.POSITION,new w(A,e,3,!0)]];return new b(t,r)}))}function C(e){return isNaN(e)?1:e}const _=c(),x=c(),V=c(),y=c(),E=o(),M=o();export{j as ViewshedShapeVisualElement};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../../chunks/tslib.es6.js";import{invert as t,transpose as r}from"../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{clone as o}from"../../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{p as s,I as i}from"../../../../../../chunks/vec32.js";import{freeze as a,ZEROS as l}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{v as n}from"../../../../../../chunks/vec42.js";import{freeze as h,fromValues as u}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{EmissiveSourceMode as p}from"../../../../../../symbols/support/materialUtils.js";import{ColorMixModeEnum as c}from"../../../../layers/support/symbolColorUtils.js";import{OverlayContent as d}from"../../../../terrain/OverlayContent.js";import{ComponentTechnique as m}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as g,IntegratedMeshMode as f}from"./ComponentTechniqueConfiguration.js";import{ComponentDataType as x}from"./shader/ComponentData.glsl.js";import{VertexDiscardMode as v}from"./shader/VertexDiscardMode.js";import{MaterialBase as b,parameter as M,parameterBlock as y,MaterialParameterBlock as T}from"../../../core/material/MaterialBase.js";import{RenderPassIdentifier as w}from"../../../core/renderPasses/RenderPassIdentifier.js";import{ShaderOutput as O}from"../../../core/shaderLibrary/ShaderOutput.js";import{NormalType as C}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{EmissionSource as S}from"../../../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as N}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as P}from"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{EllipsoidMode as j}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{TwoVectorPosition as D}from"../../../core/util/TwoVectorPosition.js";import{AlphaDiscardMode as A,CullFaceOptions as q}from"../../../lib/basicInterfaces.js";import{OITPass as R}from"../../../lib/OITPass.js";import{advancedMRRFactors as I}from"../../../materials/pbrUtils.js";import{defaultHighlightName as E}from"../../../../../support/HighlightDefaults.js";import{alphaCutoff as F}from"../../../../../../webscene/support/AlphaCutoff.js";class W extends b{constructor(e,s){super(),this.toMapSpace=s,this.baseColor=h(1,1,1,1),this.usePBR=!1,this.hasParametersFromSource=!1,this.mrrFactors=I,this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.normalTexture=null,this.occlusionTexture=null,this.emissionTexture=null,this.emissiveBaseColor=a(0,0,0),this.emissiveStrength=1,this.emissiveSource=p.Emissive,this.commonMaterialParameters=new L,this.componentParameters=new H,this.objectOpacity=1,this.textureAlphaCutoff=F,this.alphaDiscardMode=A.Opaque,this.isIntegratedMesh=!1,this.polygonOffsetEnabled=!1,this.ellipsoidMode=j.Earth,this.hasOccludees=!1;const i=new D(e.position),l=o(e.rotationScale);t(l,l),r(l,l),this.transformNormalGlobalFromModel=l,this.transformWorldFromModelTL=i.low,this.transformWorldFromModelTH=i.high,this.transformWorldFromModelRS=e.rotationScale}dispose(){this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null}get hasEmissions(){return null!=this.emissionTexture||!s(this.emissiveBaseColor,l)}get texture(){return this.baseColorTexture?.glTexture}get textureMetallicRoughness(){return this.metallicRoughnessTexture?.glTexture}get textureEmissive(){return this.emissionTexture?.glTexture}get textureOcclusion(){return this.occlusionTexture?.glTexture}get textureNormal(){return this.normalTexture?.glTexture}acquireTechnique(e,t,r,o){const s=new g(e.context.spherical);s.hasVertexColors=o.colors,s.hasNormals=o.hasNormals,s.textureCoordinateType=o.textureCoordinates,s.hasMetallicRoughnessTexture=null!=this.metallicRoughnessTexture,s.hasOcclusionTexture=null!=this.occlusionTexture,s.hasNormalTexture=null!=this.normalTexture,s.oitPass=t.identifier===w.Material&&null!=r.oitPass?r.oitPass:R.NONE,s.terrainDepthTest=t.identifier===w.Material&&r.terrainDepthTest,s.cullAboveTerrain=t.identifier===w.Material&&r.cullAboveTerrain,s.ellipsoidMode=this.ellipsoidMode,s.componentData=this.componentParameters.type,s.cullFace=this.commonMaterialParameters.cullFace,s.doubleSidedMode=this.commonMaterialParameters.doubleSided?N.View:N.None,s.hasColorTexture=null!=this.baseColorTexture;const i=this._computeWhichMaterialPass();if(s.blendingEnabled=i===B.Transparent||i===B.OpaqueAndTransparent,s.alphaDiscardMode=this.alphaDiscardMode,s.integratedMeshMode=this.isIntegratedMesh?z(r)?U(r)?f.ColorOverlayWithWater:f.ColorOverlay:f.NoOverlay:f.None,s.hasPolygonOffset=this.polygonOffsetEnabled,s.pbrMode=s.integratedMeshMode===f.ColorOverlayWithWater?P.WaterOnIntegratedMesh:this.usePBR?this.hasParametersFromSource?o.shadeNormals&&this.isIntegratedMesh?P.Disabled:P.Schematic:P.Normal:P.Disabled,s.emissionSource=this.hasEmissions?null!=this.emissionTexture?S.Texture:s.pbrMode===P.Normal?S.SymbolColor:S.None:S.None,s.shadeNormals=o.shadeNormals,s.normalType=s.hasNormals?C.Compressed:C.ScreenDerivative,s.hasSlicePlane=null!=r.slicePlane&&this.commonMaterialParameters.hasSlicePlane,s.receiveAmbientOcclusion=s.hasOccludees=s.receiveShadows=s.screenSpaceReflections=s.cloudReflections=s.hasHighlightMixTexture=!1,t.identifier===w.ShadowMap)s.output=O.Shadow,s.vertexDiscardMode=v.None;else if(t.identifier===w.ViewshedShadowMap)s.output=O.ViewshedShadow,s.vertexDiscardMode=v.None;else if(t.identifier===w.Highlight)s.output=O.Highlight,s.vertexDiscardMode=v.None,s.hasHighlightMixTexture=null!=r.highlightMixTexture;else{switch(i===B.OpaqueAndTransparent?s.vertexDiscardMode=t.transparent?v.Opaque:v.Transparent:s.vertexDiscardMode=v.None,s.output=t.output,t.output){case O.Color:case O.ColorEmission:s.receiveAmbientOcclusion=o.applySSAO&&null!=r.ssao?.getTexture(),s.hasOccludees=r.hasOccludees,s.receiveShadows=r.shadowMap.ready,s.screenSpaceReflections=null!=r.ssr.lastFrameColor,s.cloudReflections=null!=r.clouds.data?.cubeMap?.colorTexture;break;case O.ObjectAndLayerIdColor:s.objectAndLayerIdColor=!0}s.snowCover=this.hasSnowCover(r)}const a=e.get(m,s);return this._setClean(),a}hasSnowCover(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}submit(e,t,r){if(this.objectOpacity<=0)return;const{componentData:o,renderable:s}=r,{geometry:i}=s,a=s.meta.cameraDepthSquared;o.updateHighlights(t.highlights);const{geometryRanges:l,highlightRangesMap:n,shadowmapRanges:h}=o;switch(this._computeWhichMaterialPass()){case B.Opaque:e.opaque.submitDraw(this,i,l,a);break;case B.Transparent:e.transparent.submitDraw(this,i,l,a);break;case B.OpaqueAndTransparent:e.opaque.submitDraw(this,i,l,a),e.transparent.submitDraw(this,i,l,a);break;case B.IntegratedMesh:e.integratedMesh.submitDraw(this,i,l,a),_(t)&&e.highlightIntegratedMesh.submitDraw(this,i,l,a)}if(this.componentParameters.castShadows!==k.None){if(null!=n)for(const t of n)t[0]===E&&e.highlightShadowMap.submitDraw(this,i,t[1],a,t[0]);null!=h&&e.defaultShadowMap.submitDraw(this,i,h,a),e.shadowMap.submitDraw(this,i,l,a)}if(null!=n)for(const u of n)e.highlight.submitDraw(this,i,u[1],a,u[0]);t.viewshedEnabled&&e.viewshedShadowMap.submitDraw(this,i,l,a)}_computeWhichMaterialPass(){if(this.isIntegratedMesh)return B.IntegratedMesh;if(this.objectOpacity<1)return B.Transparent;if(this.componentParameters.opaqueOverride===k.All)return B.Opaque;if(this.baseColor[3]<1||this.alphaDiscardMode===A.Blend||this.alphaDiscardMode===A.MaskBlend)return B.Transparent;switch(this.componentParameters.transparent){case k.None:return B.Opaque;case k.All:return B.Transparent;case k.Some:return B.OpaqueAndTransparent}}}var B,k;e([M({vectorOps:n})],W.prototype,"baseColor",void 0),e([M()],W.prototype,"usePBR",void 0),e([M()],W.prototype,"hasParametersFromSource",void 0),e([M({vectorOps:i})],W.prototype,"mrrFactors",void 0),e([M({dispose:!0})],W.prototype,"baseColorTexture",void 0),e([M({dispose:!0})],W.prototype,"metallicRoughnessTexture",void 0),e([M({dispose:!0})],W.prototype,"normalTexture",void 0),e([M({dispose:!0})],W.prototype,"occlusionTexture",void 0),e([M({dispose:!0})],W.prototype,"emissionTexture",void 0),e([M({vectorOps:i})],W.prototype,"emissiveBaseColor",void 0),e([M()],W.prototype,"emissiveStrength",void 0),e([M()],W.prototype,"emissiveSource",void 0),e([y()],W.prototype,"commonMaterialParameters",void 0),e([y()],W.prototype,"componentParameters",void 0),e([M()],W.prototype,"objectOpacity",void 0),e([M()],W.prototype,"textureAlphaCutoff",void 0),e([M()],W.prototype,"alphaDiscardMode",void 0),e([M()],W.prototype,"isIntegratedMesh",void 0),e([M()],W.prototype,"polygonOffsetEnabled",void 0),e([M()],W.prototype,"ellipsoidMode",void 0),e([M()],W.prototype,"hasOccludees",void 0),function(e){e[e.Opaque=0]="Opaque",e[e.Transparent=1]="Transparent",e[e.OpaqueAndTransparent=2]="OpaqueAndTransparent",e[e.IntegratedMesh=3]="IntegratedMesh"}(B||(B={}));class L extends T{constructor(){super(...arguments),this.doubleSided=!1,this.cullFace=q.Back,this.hasSlicePlane=!0}}e([M()],L.prototype,"doubleSided",void 0),e([M()],L.prototype,"cullFace",void 0),e([M()],L.prototype,"hasSlicePlane",void 0);class H extends T{constructor(){super(...arguments),this.externalColor=u(1,1,1,1),this.externalColorMixMode=c.Multiply,this.castShadows=k.All}get transparent(){return this.externalColor[3]<1?k.All:k.None}get opaqueOverride(){return this.externalColorMixMode===c.Replace&&1===this.externalColor[3]?k.All:k.None}get visible(){return this.externalColor[3]>0?k.All:k.None}get type(){return x.Uniform}}e([M({vectorOps:n})],H.prototype,"externalColor",void 0),e([M()],H.prototype,"externalColorMixMode",void 0),e([M()],H.prototype,"castShadows",void 0),function(e){e[e.All=0]="All",e[e.Some=1]="Some",e[e.None=2]="None"}(k||(k={}));class V extends T{constructor(){super(...arguments),this.texture=null,this.transparent=k.None,this.opaqueOverride=k.None,this.castShadows=k.None}get type(){return x.Varying}}function _(e){return null!=e.overlay?.getTexture(d.Highlight)}function U(e){return null!=e.overlay?.getTexture(d.WaterNormal)}function z(e){return null!=e.overlay?.getTexture(d.ColorNoRasterImage)}e([M()],V.prototype,"texture",void 0),e([M()],V.prototype,"transparent",void 0),e([M()],V.prototype,"opaqueOverride",void 0),e([M()],V.prototype,"castShadows",void 0);export{L as CommonMaterialParameters,W as ComponentMaterial,k as ComponentParameterSummary,H as ComponentParametersUniform,V as ComponentParametersVarying};
5
+ import{_ as e}from"../../../../../../chunks/tslib.es6.js";import{invert as t,transpose as r}from"../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{clone as o}from"../../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{p as s,I as i}from"../../../../../../chunks/vec32.js";import{freeze as a,ZEROS as l}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{v as n}from"../../../../../../chunks/vec42.js";import{freeze as h,fromValues as u}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{EmissiveSourceMode as p}from"../../../../../../symbols/support/materialUtils.js";import{ColorMixModeEnum as c}from"../../../../layers/support/symbolColorUtils.js";import{OverlayContent as d}from"../../../../terrain/OverlayContent.js";import{ComponentTechnique as m}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as g,IntegratedMeshMode as f}from"./ComponentTechniqueConfiguration.js";import{ComponentDataType as x}from"./shader/ComponentData.glsl.js";import{VertexDiscardMode as v}from"./shader/VertexDiscardMode.js";import{MaterialBase as b,parameter as M,parameterBlock as y,MaterialParameterBlock as T}from"../../../core/material/MaterialBase.js";import{RenderPassIdentifier as w}from"../../../core/renderPasses/RenderPassIdentifier.js";import{ShaderOutput as O,isColorEmission as C}from"../../../core/shaderLibrary/ShaderOutput.js";import{NormalType as S}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{EmissionSource as N}from"../../../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as P}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as j}from"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{EllipsoidMode as D}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{TwoVectorPosition as A}from"../../../core/util/TwoVectorPosition.js";import{AlphaDiscardMode as q,CullFaceOptions as R}from"../../../lib/basicInterfaces.js";import{OITPass as I}from"../../../lib/OITPass.js";import{advancedMRRFactors as E}from"../../../materials/pbrUtils.js";import{defaultHighlightName as F}from"../../../../../support/HighlightDefaults.js";import{alphaCutoff as B}from"../../../../../../webscene/support/AlphaCutoff.js";class W extends b{constructor(e,s){super(),this.toMapSpace=s,this.baseColor=h(1,1,1,1),this.usePBR=!1,this.hasParametersFromSource=!1,this.mrrFactors=E,this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.normalTexture=null,this.occlusionTexture=null,this.emissionTexture=null,this.emissiveBaseColor=a(0,0,0),this.emissiveStrength=1,this.emissiveSource=p.Emissive,this.commonMaterialParameters=new H,this.componentParameters=new V,this.objectOpacity=1,this.textureAlphaCutoff=B,this.alphaDiscardMode=q.Opaque,this.isIntegratedMesh=!1,this.polygonOffsetEnabled=!1,this.ellipsoidMode=D.Earth,this.hasOccludees=!1;const i=new A(e.position),l=o(e.rotationScale);t(l,l),r(l,l),this.transformNormalGlobalFromModel=l,this.transformWorldFromModelTL=i.low,this.transformWorldFromModelTH=i.high,this.transformWorldFromModelRS=e.rotationScale}dispose(){this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null}get hasEmissions(){return null!=this.emissionTexture||!s(this.emissiveBaseColor,l)}get texture(){return this.baseColorTexture?.glTexture}get textureMetallicRoughness(){return this.metallicRoughnessTexture?.glTexture}get textureEmissive(){return this.emissionTexture?.glTexture}get textureOcclusion(){return this.occlusionTexture?.glTexture}get textureNormal(){return this.normalTexture?.glTexture}acquireTechnique(e,t,r,o){const s=new g(e.context.spherical);s.hasVertexColors=o.colors,s.hasNormals=o.hasNormals,s.textureCoordinateType=o.textureCoordinates,s.hasMetallicRoughnessTexture=null!=this.metallicRoughnessTexture,s.hasOcclusionTexture=null!=this.occlusionTexture,s.hasNormalTexture=null!=this.normalTexture,s.oitPass=t.identifier===w.Material&&null!=r.oitPass?r.oitPass:I.NONE,s.terrainDepthTest=t.identifier===w.Material&&r.terrainDepthTest,s.cullAboveTerrain=t.identifier===w.Material&&r.cullAboveTerrain,s.ellipsoidMode=this.ellipsoidMode,s.componentData=this.componentParameters.type,s.cullFace=this.commonMaterialParameters.cullFace,s.doubleSidedMode=this.commonMaterialParameters.doubleSided?P.View:P.None,s.hasColorTexture=null!=this.baseColorTexture;const i=this._computeWhichMaterialPass();if(s.blendingEnabled=i===k.Transparent||i===k.OpaqueAndTransparent,s.alphaDiscardMode=this.alphaDiscardMode,s.integratedMeshMode=this.isIntegratedMesh?G(r)?z(r)?f.ColorOverlayWithWater:f.ColorOverlay:f.NoOverlay:f.None,s.hasPolygonOffset=this.polygonOffsetEnabled,s.pbrMode=s.integratedMeshMode===f.ColorOverlayWithWater?j.WaterOnIntegratedMesh:this.usePBR?this.hasParametersFromSource?o.shadeNormals&&this.isIntegratedMesh?j.Disabled:j.Schematic:j.Normal:j.Disabled,s.emissionSource=this.hasEmissions?null!=this.emissionTexture?N.Texture:s.pbrMode===j.Normal?N.SymbolColor:N.None:N.None,s.shadeNormals=o.shadeNormals,s.normalType=s.hasNormals?S.Compressed:S.ScreenDerivative,s.hasSlicePlane=null!=r.slicePlane&&this.commonMaterialParameters.hasSlicePlane,s.receiveAmbientOcclusion=s.hasOccludees=s.receiveShadows=s.screenSpaceReflections=s.cloudReflections=s.hasHighlightMixTexture=!1,t.identifier===w.ShadowMap)s.output=O.Shadow,s.vertexDiscardMode=v.None;else if(t.identifier===w.ViewshedShadowMap)s.output=O.ViewshedShadow,s.vertexDiscardMode=v.None;else if(t.identifier===w.Highlight)s.output=O.Highlight,s.vertexDiscardMode=v.None,s.hasHighlightMixTexture=null!=r.highlightMixTexture;else{switch(i===k.OpaqueAndTransparent?s.vertexDiscardMode=t.transparent?v.Opaque:v.Transparent:s.vertexDiscardMode=v.None,s.hasBloom=C(t.output),s.output=t.output,t.output){case O.Color:case O.ColorEmission:s.receiveAmbientOcclusion=o.applySSAO&&null!=r.ssao?.getTexture(),s.hasOccludees=r.hasOccludees,s.receiveShadows=r.shadowMap.ready,s.screenSpaceReflections=null!=r.ssr.lastFrameColor,s.cloudReflections=null!=r.clouds.data?.cubeMap?.colorTexture;break;case O.ObjectAndLayerIdColor:s.objectAndLayerIdColor=!0}s.snowCover=this.hasSnowCover(r)}const a=e.get(m,s);return this._setClean(),a}hasSnowCover(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}submit(e,t,r){if(this.objectOpacity<=0)return;const{componentData:o,renderable:s}=r,{geometry:i}=s,a=s.meta.cameraDepthSquared;o.updateHighlights(t.highlights);const{geometryRanges:l,highlightRangesMap:n,shadowmapRanges:h}=o;switch(this._computeWhichMaterialPass()){case k.Opaque:e.opaque.submitDraw(this,i,l,a);break;case k.Transparent:e.transparent.submitDraw(this,i,l,a);break;case k.OpaqueAndTransparent:e.opaque.submitDraw(this,i,l,a),e.transparent.submitDraw(this,i,l,a);break;case k.IntegratedMesh:e.integratedMesh.submitDraw(this,i,l,a),U(t)&&e.highlightIntegratedMesh.submitDraw(this,i,l,a)}if(this.componentParameters.castShadows!==L.None){if(null!=n)for(const t of n)t[0]===F&&e.highlightShadowMap.submitDraw(this,i,t[1],a,t[0]);null!=h&&e.defaultShadowMap.submitDraw(this,i,h,a),e.shadowMap.submitDraw(this,i,l,a)}if(null!=n)for(const u of n)e.highlight.submitDraw(this,i,u[1],a,u[0]);t.viewshedEnabled&&e.viewshedShadowMap.submitDraw(this,i,l,a)}_computeWhichMaterialPass(){if(this.isIntegratedMesh)return k.IntegratedMesh;if(this.objectOpacity<1)return k.Transparent;if(this.componentParameters.opaqueOverride===L.All)return k.Opaque;if(this.baseColor[3]<1||this.alphaDiscardMode===q.Blend||this.alphaDiscardMode===q.MaskBlend)return k.Transparent;switch(this.componentParameters.transparent){case L.None:return k.Opaque;case L.All:return k.Transparent;case L.Some:return k.OpaqueAndTransparent}}}var k,L;e([M({vectorOps:n})],W.prototype,"baseColor",void 0),e([M()],W.prototype,"usePBR",void 0),e([M()],W.prototype,"hasParametersFromSource",void 0),e([M({vectorOps:i})],W.prototype,"mrrFactors",void 0),e([M({dispose:!0})],W.prototype,"baseColorTexture",void 0),e([M({dispose:!0})],W.prototype,"metallicRoughnessTexture",void 0),e([M({dispose:!0})],W.prototype,"normalTexture",void 0),e([M({dispose:!0})],W.prototype,"occlusionTexture",void 0),e([M({dispose:!0})],W.prototype,"emissionTexture",void 0),e([M({vectorOps:i})],W.prototype,"emissiveBaseColor",void 0),e([M()],W.prototype,"emissiveStrength",void 0),e([M()],W.prototype,"emissiveSource",void 0),e([y()],W.prototype,"commonMaterialParameters",void 0),e([y()],W.prototype,"componentParameters",void 0),e([M()],W.prototype,"objectOpacity",void 0),e([M()],W.prototype,"textureAlphaCutoff",void 0),e([M()],W.prototype,"alphaDiscardMode",void 0),e([M()],W.prototype,"isIntegratedMesh",void 0),e([M()],W.prototype,"polygonOffsetEnabled",void 0),e([M()],W.prototype,"ellipsoidMode",void 0),e([M()],W.prototype,"hasOccludees",void 0),function(e){e[e.Opaque=0]="Opaque",e[e.Transparent=1]="Transparent",e[e.OpaqueAndTransparent=2]="OpaqueAndTransparent",e[e.IntegratedMesh=3]="IntegratedMesh"}(k||(k={}));class H extends T{constructor(){super(...arguments),this.doubleSided=!1,this.cullFace=R.Back,this.hasSlicePlane=!0}}e([M()],H.prototype,"doubleSided",void 0),e([M()],H.prototype,"cullFace",void 0),e([M()],H.prototype,"hasSlicePlane",void 0);class V extends T{constructor(){super(...arguments),this.externalColor=u(1,1,1,1),this.externalColorMixMode=c.Multiply,this.castShadows=L.All}get transparent(){return this.externalColor[3]<1?L.All:L.None}get opaqueOverride(){return this.externalColorMixMode===c.Replace&&1===this.externalColor[3]?L.All:L.None}get visible(){return this.externalColor[3]>0?L.All:L.None}get type(){return x.Uniform}}e([M({vectorOps:n})],V.prototype,"externalColor",void 0),e([M()],V.prototype,"externalColorMixMode",void 0),e([M()],V.prototype,"castShadows",void 0),function(e){e[e.All=0]="All",e[e.Some=1]="Some",e[e.None=2]="None"}(L||(L={}));class _ extends T{constructor(){super(...arguments),this.texture=null,this.transparent=L.None,this.opaqueOverride=L.None,this.castShadows=L.None}get type(){return x.Varying}}function U(e){return null!=e.overlay?.getTexture(d.Highlight)}function z(e){return null!=e.overlay?.getTexture(d.WaterNormal)}function G(e){return null!=e.overlay?.getTexture(d.ColorNoRasterImage)}e([M()],_.prototype,"texture",void 0),e([M()],_.prototype,"transparent",void 0),e([M()],_.prototype,"opaqueOverride",void 0),e([M()],_.prototype,"castShadows",void 0);export{H as CommonMaterialParameters,W as ComponentMaterial,L as ComponentParameterSummary,V as ComponentParametersUniform,_ as ComponentParametersVarying};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../../../../../chunks/tslib.es6.js";import{ComponentDataType as e}from"./shader/ComponentData.glsl.js";import{VertexDiscardMode as t}from"./shader/VertexDiscardMode.js";import{ShaderOutput as r,isColorEmissionHighlightOrOID as i}from"../../../core/shaderLibrary/ShaderOutput.js";import{NormalType as s}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateType as a}from"../../../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as d}from"../../../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as h}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as p}from"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{EllipsoidMode as l}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{parameter as n,ShaderTechniqueConfiguration as c}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{CullFaceOptions as u,AlphaDiscardMode as y}from"../../../lib/basicInterfaces.js";import{OITPass as m}from"../../../lib/OITPass.js";import{BindType as v}from"../../../../../webgl/BindType.js";var T;!function(o){o[o.None=0]="None",o[o.NoOverlay=1]="NoOverlay",o[o.ColorOverlay=2]="ColorOverlay",o[o.ColorOverlayWithWater=3]="ColorOverlayWithWater",o[o.COUNT=4]="COUNT"}(T||(T={}));class C extends c{constructor(o){super(),this.spherical=o,this.output=r.Color,this.textureCoordinateType=a.None,this.componentData=e.Uniform,this.cullFace=u.Back,this.vertexDiscardMode=t.None,this.doubleSidedMode=h.WindingOrder,this.alphaDiscardMode=y.Opaque,this.integratedMeshMode=T.None,this.oitPass=m.NONE,this.ellipsoidMode=l.Earth,this.pbrMode=p.Disabled,this.normalType=s.Attribute,this.emissionSource=d.None,this.hasVertexColors=!1,this.hasNormals=!1,this.shadeNormals=!0,this.hasSlicePlane=!1,this.hasColorTexture=!1,this.hasHighlightMixTexture=!1,this.receiveAmbientOcclusion=!0,this.receiveShadows=!0,this.blendingEnabled=!0,this.screenSpaceReflections=!1,this.hasPolygonOffset=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasNormalTextureTransform=!1,this.cloudReflections=!0,this.snowCover=!1,this.objectAndLayerIdColor=!1,this.discardInvisibleFragments=!1,this.occlusionPass=!1,this.bindType=v.Draw,this.useCustomDTRExponentForWater=!1,this.hasVertexTangents=!1,this.highStepCount=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.useFillLights=!0,this.objectAndLayerIdColorInstanced=!1,this.draped=!1}get overlayEnabled(){return(this.integratedMeshMode===T.ColorOverlay||this.integratedMeshMode===T.ColorOverlayWithWater)&&i(this.output)}}o([n({count:r.COUNT})],C.prototype,"output",void 0),o([n({count:a.COUNT})],C.prototype,"textureCoordinateType",void 0),o([n({count:e.COUNT})],C.prototype,"componentData",void 0),o([n({count:u.COUNT})],C.prototype,"cullFace",void 0),o([n({count:t.COUNT})],C.prototype,"vertexDiscardMode",void 0),o([n({count:h.COUNT})],C.prototype,"doubleSidedMode",void 0),o([n({count:y.COUNT})],C.prototype,"alphaDiscardMode",void 0),o([n({count:T.COUNT})],C.prototype,"integratedMeshMode",void 0),o([n({count:m.COUNT})],C.prototype,"oitPass",void 0),o([n({count:l.COUNT})],C.prototype,"ellipsoidMode",void 0),o([n({count:p.COUNT})],C.prototype,"pbrMode",void 0),o([n({count:s.COUNT})],C.prototype,"normalType",void 0),o([n({count:d.COUNT})],C.prototype,"emissionSource",void 0),o([n()],C.prototype,"hasVertexColors",void 0),o([n()],C.prototype,"hasNormals",void 0),o([n()],C.prototype,"shadeNormals",void 0),o([n()],C.prototype,"hasSlicePlane",void 0),o([n()],C.prototype,"hasColorTexture",void 0),o([n()],C.prototype,"hasHighlightMixTexture",void 0),o([n()],C.prototype,"receiveAmbientOcclusion",void 0),o([n()],C.prototype,"receiveShadows",void 0),o([n()],C.prototype,"blendingEnabled",void 0),o([n()],C.prototype,"screenSpaceReflections",void 0),o([n()],C.prototype,"hasPolygonOffset",void 0),o([n()],C.prototype,"hasMetallicRoughnessTexture",void 0),o([n()],C.prototype,"hasOcclusionTexture",void 0),o([n()],C.prototype,"hasNormalTexture",void 0),o([n()],C.prototype,"hasOccludees",void 0),o([n()],C.prototype,"terrainDepthTest",void 0),o([n()],C.prototype,"cullAboveTerrain",void 0),o([n()],C.prototype,"hasNormalTextureTransform",void 0),o([n()],C.prototype,"cloudReflections",void 0),o([n()],C.prototype,"snowCover",void 0),o([n()],C.prototype,"objectAndLayerIdColor",void 0);export{C as ComponentTechniqueConfiguration,T as IntegratedMeshMode};
5
+ import{_ as o}from"../../../../../../chunks/tslib.es6.js";import{ComponentDataType as e}from"./shader/ComponentData.glsl.js";import{VertexDiscardMode as t}from"./shader/VertexDiscardMode.js";import{ShaderOutput as r,isColorEmissionHighlightOrOID as i}from"../../../core/shaderLibrary/ShaderOutput.js";import{NormalType as s}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateType as a}from"../../../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as d}from"../../../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as h}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as p}from"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{EllipsoidMode as l}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{parameter as n,ShaderTechniqueConfiguration as c}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{CullFaceOptions as u,AlphaDiscardMode as y}from"../../../lib/basicInterfaces.js";import{OITPass as m}from"../../../lib/OITPass.js";import{BindType as v}from"../../../../../webgl/BindType.js";var T;!function(o){o[o.None=0]="None",o[o.NoOverlay=1]="NoOverlay",o[o.ColorOverlay=2]="ColorOverlay",o[o.ColorOverlayWithWater=3]="ColorOverlayWithWater",o[o.COUNT=4]="COUNT"}(T||(T={}));class C extends c{constructor(o){super(),this.spherical=o,this.output=r.Color,this.textureCoordinateType=a.None,this.componentData=e.Uniform,this.cullFace=u.Back,this.vertexDiscardMode=t.None,this.doubleSidedMode=h.WindingOrder,this.alphaDiscardMode=y.Opaque,this.integratedMeshMode=T.None,this.oitPass=m.NONE,this.ellipsoidMode=l.Earth,this.pbrMode=p.Disabled,this.normalType=s.Attribute,this.emissionSource=d.None,this.hasVertexColors=!1,this.hasNormals=!1,this.shadeNormals=!0,this.hasSlicePlane=!1,this.hasColorTexture=!1,this.hasHighlightMixTexture=!1,this.receiveAmbientOcclusion=!0,this.receiveShadows=!0,this.blendingEnabled=!0,this.screenSpaceReflections=!1,this.hasPolygonOffset=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasNormalTextureTransform=!1,this.cloudReflections=!0,this.snowCover=!1,this.objectAndLayerIdColor=!1,this.hasBloom=!1,this.discardInvisibleFragments=!1,this.occlusionPass=!1,this.bindType=v.Draw,this.useCustomDTRExponentForWater=!1,this.hasVertexTangents=!1,this.highStepCount=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.useFillLights=!0,this.objectAndLayerIdColorInstanced=!1,this.draped=!1}get overlayEnabled(){return(this.integratedMeshMode===T.ColorOverlay||this.integratedMeshMode===T.ColorOverlayWithWater)&&i(this.output)}}o([n({count:r.COUNT})],C.prototype,"output",void 0),o([n({count:a.COUNT})],C.prototype,"textureCoordinateType",void 0),o([n({count:e.COUNT})],C.prototype,"componentData",void 0),o([n({count:u.COUNT})],C.prototype,"cullFace",void 0),o([n({count:t.COUNT})],C.prototype,"vertexDiscardMode",void 0),o([n({count:h.COUNT})],C.prototype,"doubleSidedMode",void 0),o([n({count:y.COUNT})],C.prototype,"alphaDiscardMode",void 0),o([n({count:T.COUNT})],C.prototype,"integratedMeshMode",void 0),o([n({count:m.COUNT})],C.prototype,"oitPass",void 0),o([n({count:l.COUNT})],C.prototype,"ellipsoidMode",void 0),o([n({count:p.COUNT})],C.prototype,"pbrMode",void 0),o([n({count:s.COUNT})],C.prototype,"normalType",void 0),o([n({count:d.COUNT})],C.prototype,"emissionSource",void 0),o([n()],C.prototype,"hasVertexColors",void 0),o([n()],C.prototype,"hasNormals",void 0),o([n()],C.prototype,"shadeNormals",void 0),o([n()],C.prototype,"hasSlicePlane",void 0),o([n()],C.prototype,"hasColorTexture",void 0),o([n()],C.prototype,"hasHighlightMixTexture",void 0),o([n()],C.prototype,"receiveAmbientOcclusion",void 0),o([n()],C.prototype,"receiveShadows",void 0),o([n()],C.prototype,"blendingEnabled",void 0),o([n()],C.prototype,"screenSpaceReflections",void 0),o([n()],C.prototype,"hasPolygonOffset",void 0),o([n()],C.prototype,"hasMetallicRoughnessTexture",void 0),o([n()],C.prototype,"hasOcclusionTexture",void 0),o([n()],C.prototype,"hasNormalTexture",void 0),o([n()],C.prototype,"hasOccludees",void 0),o([n()],C.prototype,"terrainDepthTest",void 0),o([n()],C.prototype,"cullAboveTerrain",void 0),o([n()],C.prototype,"hasNormalTextureTransform",void 0),o([n()],C.prototype,"cloudReflections",void 0),o([n()],C.prototype,"snowCover",void 0),o([n()],C.prototype,"objectAndLayerIdColor",void 0),o([n()],C.prototype,"hasBloom",void 0);export{C as ComponentTechniqueConfiguration,T as IntegratedMeshMode};
@@ -32,7 +32,7 @@ float depthStep = clamp(depth + minStep, 0.0, 1.0);
32
32
  float linearDepthStep = linearizeDepth(depthStep);
33
33
  float depthError = abs(linearDepthStep - linearDepth);
34
34
  if (depthError > 0.2) {
35
- normal = texture(normalMap, uv).xyz * 2.0 - 1.0;
35
+ normal = normalize(texture(normalMap, uv).xyz * 2.0 - 1.0);
36
36
  angleCutoffAdjust = 0.004;
37
37
  } else {
38
38
  normal = normalize(cross(dFdx(pos), dFdy(pos)));
@@ -2,11 +2,11 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{FoamColor as e}from"./FoamRendering.glsl.js";import{Gamma as o}from"./Gamma.glsl.js";import{PhysicallyBasedRenderingWater as t}from"./PhysicallyBasedRendering.glsl.js";import{distanceFadeStart as r,distanceFadeEnd as i}from"./ScreenSpaceConstants.js";import{ScreenSpaceReflections as n}from"./ScreenSpaceReflections.glsl.js";import{CloudsParallaxShading as a}from"../util/CloudsParallaxShading.glsl.js";import{FloatBindUniform as l}from"../../shaderModules/FloatBindUniform.js";import{glsl as d}from"../../shaderModules/glsl.js";import{Matrix4BindUniform as c}from"../../shaderModules/Matrix4BindUniform.js";import{Texture2DBindUniform as s}from"../../shaderModules/Texture2DBindUniform.js";import{ToneMapping as f}from"../../../shaders/ToneMapping.glsl.js";function m(m,v){m.include(t,v),m.include(o),m.include(e),v.cloudReflections&&m.include(a),m.include(n,v);const u=m.fragment;u.include(f),u.constants.add("fresnelSky","vec3",[.02,1,15]),u.constants.add("fresnelMaterial","vec2",[.02,.1]),u.constants.add("roughness","float",.015),u.constants.add("foamIntensityExternal","float",1.7),u.constants.add("ssrIntensity","float",.65),u.constants.add("ssrHeightFadeStart","float",r),u.constants.add("ssrHeightFadeEnd","float",i),u.constants.add("waterDiffusion","float",.92),u.constants.add("waterSeaColorMod","float",.8),u.constants.add("correctionViewingPowerFactor","float",.4),u.constants.add("skyZenitColor","vec3",[.52,.68,.9]),u.constants.add("skyColor","vec3",[.67,.79,.9]),u.constants.add("cloudFresnelModifier","vec2",[1.2,.01]),u.code.add(d`PBRShadingWater shadingInfo;
5
+ import{FoamColor as e}from"./FoamRendering.glsl.js";import{Gamma as o}from"./Gamma.glsl.js";import{PhysicallyBasedRenderingWater as t}from"./PhysicallyBasedRendering.glsl.js";import{distanceFadeStart as r,distanceFadeEnd as i}from"./ScreenSpaceConstants.js";import{ScreenSpaceReflections as n}from"./ScreenSpaceReflections.glsl.js";import{CloudsParallaxShading as a}from"../util/CloudsParallaxShading.glsl.js";import{FloatBindUniform as l}from"../../shaderModules/FloatBindUniform.js";import{glsl as d}from"../../shaderModules/glsl.js";import{Matrix4BindUniform as c}from"../../shaderModules/Matrix4BindUniform.js";import{Texture2DBindUniform as s}from"../../shaderModules/Texture2DBindUniform.js";import{ToneMapping as f,ToneMappingFunction as m}from"../../../shaders/ToneMapping.glsl.js";function v(v,u){v.include(t,u),v.include(o),v.include(e),u.cloudReflections&&v.include(a),v.include(n,u);const p=v.fragment;p.include(f,{toneMapping:m.ACES}),p.constants.add("fresnelSky","vec3",[.02,1,15]),p.constants.add("fresnelMaterial","vec2",[.02,.1]),p.constants.add("roughness","float",.015),p.constants.add("foamIntensityExternal","float",1.7),p.constants.add("ssrIntensity","float",.65),p.constants.add("ssrHeightFadeStart","float",r),p.constants.add("ssrHeightFadeEnd","float",i),p.constants.add("waterDiffusion","float",.92),p.constants.add("waterSeaColorMod","float",.8),p.constants.add("correctionViewingPowerFactor","float",.4),p.constants.add("skyZenitColor","vec3",[.52,.68,.9]),p.constants.add("skyColor","vec3",[.67,.79,.9]),p.constants.add("cloudFresnelModifier","vec2",[1.2,.01]),p.code.add(d`PBRShadingWater shadingInfo;
6
6
  vec3 getSkyGradientColor(in float cosTheta, in vec3 horizon, in vec3 zenit) {
7
7
  float exponent = pow((1.0 - cosTheta), fresnelSky[2]);
8
8
  return mix(zenit, horizon, exponent);
9
- }`),u.uniforms.add(new l("lightingSpecularStrength",(e=>e.lighting.mainLight.specularStrength)),new l("lightingEnvironmentStrength",(e=>e.lighting.mainLight.environmentStrength))),u.code.add(d`vec3 getSeaColor(in vec3 n, in vec3 v, in vec3 l, vec3 color, in vec3 lightIntensity, in vec3 localUp, in float shadow, float foamIntensity, vec3 viewPosition, vec3 position) {
9
+ }`),p.uniforms.add(new l("lightingSpecularStrength",(e=>e.lighting.mainLight.specularStrength)),new l("lightingEnvironmentStrength",(e=>e.lighting.mainLight.environmentStrength))),p.code.add(d`vec3 getSeaColor(in vec3 n, in vec3 v, in vec3 l, vec3 color, in vec3 lightIntensity, in vec3 localUp, in float shadow, float foamIntensity, vec3 viewPosition, vec3 position) {
10
10
  float reflectionHit = 0.0;
11
11
  float reflectionHitDiffused = 0.0;
12
12
  vec3 seaWaterColor = linearizeGamma(color);
@@ -40,10 +40,10 @@ foam = foamIntensity2FoamColor(foamIntensityExternal, foamIntensity, skyZenitCol
40
40
  }
41
41
  float correctionViewingFactor = pow(max(dot(v, localUp), 0.0), correctionViewingPowerFactor);
42
42
  vec3 normalCorrectedClouds = mix(localUp, n, correctionViewingFactor);
43
- vec3 reflectedWorld = normalize(reflect(-v, normalCorrectedClouds));`),v.cloudReflections&&u.uniforms.add(new l("cloudsOpacity",(e=>e.clouds.opacity))).code.add(d`vec4 cloudsColor = renderClouds(reflectedWorld, position);
43
+ vec3 reflectedWorld = normalize(reflect(-v, normalCorrectedClouds));`),u.cloudReflections&&p.uniforms.add(new l("cloudsOpacity",(e=>e.clouds.opacity))).code.add(d`vec4 cloudsColor = renderClouds(reflectedWorld, position);
44
44
  cloudsColor.a = 1.0 - cloudsColor.a;
45
45
  cloudsColor = pow(cloudsColor, vec4(GAMMA));
46
- cloudsColor *= clamp(fresnelModifier.y * cloudFresnelModifier[0] - cloudFresnelModifier[1], 0.0, 1.0) * cloudsOpacity;`),v.screenSpaceReflections?u.uniforms.add(new c("view",(e=>e.camera.viewMatrix)),new s("lastFrameColorTexture",(e=>e.ssr.lastFrameColor?.getTexture())),new l("fadeFactorSSR",(e=>e.ssr.fadeFactor))).code.add(d`vec3 viewDir = normalize(viewPosition);
46
+ cloudsColor *= clamp(fresnelModifier.y * cloudFresnelModifier[0] - cloudFresnelModifier[1], 0.0, 1.0) * cloudsOpacity;`),u.screenSpaceReflections?p.uniforms.add(new c("view",(e=>e.camera.viewMatrix)),new s("lastFrameColorTexture",(e=>e.ssr.lastFrameColor?.getTexture())),new l("fadeFactorSSR",(e=>e.ssr.fadeFactor))).code.add(d`vec3 viewDir = normalize(viewPosition);
47
47
  vec4 viewNormalVectorCoordinate = view * vec4(n, 0.0);
48
48
  vec3 viewNormal = normalize(viewNormalVectorCoordinate.xyz);
49
49
  vec4 viewUp = view * vec4(localUp, 0.0);
@@ -63,7 +63,7 @@ reflectionHitDiffused * fresnelModifier.y * ssrIntensity;
63
63
  }
64
64
  float seaColorMod = mix(waterSeaColorMod, waterSeaColorMod * 0.5, reflectionHitDiffused);
65
65
  vec3 waterRenderedColor = tonemapACES((1.0 - reflectionHitDiffused) * reflSky + reflectedColor +
66
- reflSea * seaColorMod + specular + foam);`):u.code.add(d`vec3 waterRenderedColor = tonemapACES(reflSky + reflSea * waterSeaColorMod + specular + foam);`),v.cloudReflections?v.screenSpaceReflections?u.code.add(d`return waterRenderedColor * (1.0 - (1.0 - reflectionHit) * cloudsColor.a) + (1.0 - reflectionHit) * cloudsColor.xyz;
67
- }`):u.code.add(d`return waterRenderedColor * (1.0 - cloudsColor.a) + cloudsColor.xyz;
68
- }`):u.code.add(d`return waterRenderedColor;
69
- }`)}export{m as Water};
66
+ reflSea * seaColorMod + specular + foam);`):p.code.add(d`vec3 waterRenderedColor = tonemapACES(reflSky + reflSea * waterSeaColorMod + specular + foam);`),u.cloudReflections?u.screenSpaceReflections?p.code.add(d`return waterRenderedColor * (1.0 - (1.0 - reflectionHit) * cloudsColor.a) + (1.0 - reflectionHit) * cloudsColor.xyz;
67
+ }`):p.code.add(d`return waterRenderedColor * (1.0 - cloudsColor.a) + cloudsColor.xyz;
68
+ }`):p.code.add(d`return waterRenderedColor;
69
+ }`)}export{v as Water};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/output/ReadDepth.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/FloatsPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/IntegerPassUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"./BloomPresets.glsl.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{B as BloomCompositionPassParameters,b as build,d as defaultCompositionParameters}from"../../../../../chunks/BloomComposition.glsl.js";
5
+ import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/output/ReadDepth.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/FloatsPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/IntegerPassUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"./BloomPresets.glsl.js";import"../../shaders/ToneMapping.glsl.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{B as BloomCompositionPassParameters,b as build,d as defaultCompositionParameters}from"../../../../../chunks/BloomComposition.glsl.js";
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
+ */
5
+ import{_ as o}from"../../../../../chunks/tslib.es6.js";import{parameter as e,ShaderTechniqueConfiguration as s}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{ToneMappingFunction as r}from"../../shaders/ToneMapping.glsl.js";class t extends s{constructor(){super(...arguments),this.toneMapping=r.ACES}}o([e({count:r.COUNT})],t.prototype,"toneMapping",void 0);export{t as BloomCompositionTechniqueConfiguration};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import{lerp as t}from"../../../../../core/mathUtils.js";import{watch as r,syncAndInitial as o}from"../../../../../core/reactiveUtils.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as i}from"../../../../../core/accessorSupport/decorators/subclass.js";import{InternalRenderCategory as a}from"../../../webgl.js";import{ColorFormat as l}from"../../../webgl/formats.js";import{TransparentEnvironment as m}from"../TransparentEnvironment.js";import{B as n,a as u}from"../../../../../chunks/BloomBlur.glsl.js";import{BloomBlurTechnique as c}from"./BloomBlurTechnique.js";import{BloomBlurTechniqueConfiguration as h}from"./BloomBlurTechniqueConfiguration.js";import{B as p}from"../../../../../chunks/BloomComposition.glsl.js";import{BloomCompositionTechnique as b}from"./BloomCompositionTechnique.js";import{blurRadiusPresets as _,lodFactorsPresets as d,normalizePreset as f}from"./BloomPresets.glsl.js";import{RenderRequestType as g}from"../../lib/basicInterfaces.js";import{ColorAttachment1 as P,DepthStencilAttachment as T,FramebufferBit as R}from"../../../../webgl/enums.js";let j=class extends m{constructor(e){super(e),this.consumes={required:[a.TRANSPARENT_ENVIRONMENT,"emissive"]},this._blurHorizontalConfiguration=new h,this._blurVerticalConfiguration=new h,this._compositionParameters=new p,this._blurParameters=new n,this._blurScale=3.06,this._bloomResults=new Array}initialize(){this.addHandles([r((()=>this._updateFogParameters()),(()=>{}),o),r((()=>this.view.qualitySettings.bloom),(e=>{e?(this._enable(),this.precompile()):this._disable()}),o)])}destroy(){}_updateFogParameters(){const e=this.view.environment.weather;if("sunny"===e.type||"cloudy"===e.type)this._blurParameters.blurRadius=_[e.type];else{const r="foggy"===e.type?e.fogStrength:e.precipitation;this._blurParameters.blurRadius=t(_.cloudy,_[e.type],r)}this._compositionParameters.lodFactors=d[e.type].far,this._compositionParameters.lodFactorsFront=d[e.type].near,this.requestRender(g.UPDATE)}precompile(){this._blurHorizontalConfiguration.bloomStage=u.Horizontal,this._blurVerticalConfiguration.bloomStage=u.Vertical,this.techniques.precompile(c,this._blurHorizontalConfiguration),this.techniques.precompile(c,this._blurVerticalConfiguration),this.techniques.precompile(b)}render(e){const t=e.find((({name:e})=>e===a.TRANSPARENT_ENVIRONMENT)),r=t.getAttachment(P)?.attachment;if(!r)return t;const o=this.techniques.get(c,this._blurHorizontalConfiguration),s=this.techniques.get(c,this._blurVerticalConfiguration),i=this.techniques.get(b);if(!o.compiled||!s.compiled||!i.compiled)return this.requestRender(g.UPDATE),t;const m=t.getTexture(),n=this.fboCache,{fullWidth:u,fullHeight:h}=this.bindParameters.camera,p=this.renderingContext;let _=r,d=u,f=h;const R=5,j=this._blurParameters.blurRadius;for(let a=0;a<R;a++){const e=n.acquire(d,f,"bloomHorizontal",l.RGBA16F);this._blurParameters.color=_,this._prepareFBO(e,d,f),p.bindTechnique(o,this.bindParameters,this._blurParameters),p.screen.draw();const t=n.acquire(d,f,"bloomVertical",l.RGBA16F);this._blurParameters.color=e.getTexture(),this._prepareFBO(t,d,f),p.bindTechnique(s,this.bindParameters,this._blurParameters),p.screen.draw(),e.release(),this._bloomResults[a]=t,d=Math.ceil(d/2),f=Math.ceil(f/2),_=this._bloomResults[a].getTexture(),this._blurParameters.blurRadius*=this._blurScale}this._blurParameters.blurRadius=j,this._compositionParameters.color=m,this._compositionParameters.bloomTexture0=this._bloomResults[0].getTexture(),this._compositionParameters.bloomTexture1=this._bloomResults[1].getTexture(),this._compositionParameters.bloomTexture2=this._bloomResults[2].getTexture(),this._compositionParameters.bloomTexture3=this._bloomResults[3].getTexture(),this._compositionParameters.bloomTexture4=this._bloomResults[4].getTexture();const q=this.acquireOutputFramebuffer();return this._prepareFBO(q,u,h),p.bindTechnique(i,this.bindParameters,this._compositionParameters),p.screen.draw(),this._bloomResults.forEach((e=>e.release())),q.attachDepth(t.getAttachment(T)),q.attachColor(t.getAttachment(P),P),q}_prepareFBO(e,t,r){const o=this.renderingContext;o.bindFramebuffer(e.fbo),o.setViewport(0,0,t,r),o.setClearColor(0,0,0,0),o.clear(R.COLOR)}get test(){return{compositionParameters:this._compositionParameters,blurParameters:this._blurParameters,setLodFactors:e=>{this._compositionParameters.lodFactors=f(e)}}}};e([s()],j.prototype,"consumes",void 0),j=e([i("esri.views.3d.webgl-engine.effects.bloom.BloomRenderNode")],j);export{j as BloomRenderNode};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import{lerp as t}from"../../../../../core/mathUtils.js";import{watch as r,syncAndInitial as o}from"../../../../../core/reactiveUtils.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as i}from"../../../../../core/accessorSupport/decorators/subclass.js";import{InternalRenderCategory as a}from"../../../webgl.js";import{ColorFormat as m}from"../../../webgl/formats.js";import{TransparentEnvironment as n}from"../TransparentEnvironment.js";import{B as l,a as u}from"../../../../../chunks/BloomBlur.glsl.js";import{BloomBlurTechnique as c}from"./BloomBlurTechnique.js";import{BloomBlurTechniqueConfiguration as h}from"./BloomBlurTechniqueConfiguration.js";import{B as p}from"../../../../../chunks/BloomComposition.glsl.js";import{BloomCompositionTechnique as b}from"./BloomCompositionTechnique.js";import{BloomCompositionTechniqueConfiguration as _}from"./BloomCompositionTechniqueConfiguration.js";import{blurRadiusPresets as f,lodFactorsPresets as d,normalizePreset as g}from"./BloomPresets.glsl.js";import{RenderRequestType as P}from"../../lib/basicInterfaces.js";import{ColorAttachment1 as T,DepthStencilAttachment as R,FramebufferBit as C}from"../../../../webgl/enums.js";let j=class extends n{constructor(e){super(e),this.consumes={required:[a.TRANSPARENT_ENVIRONMENT,"emissive"]},this._blurHorizontalConfiguration=new h,this._blurVerticalConfiguration=new h,this._compositionConfiguration=new _,this._compositionParameters=new p,this._blurParameters=new l,this._blurScale=3.06,this._bloomResults=new Array}initialize(){this.addHandles([r((()=>this._updateFogParameters()),(()=>{}),o),r((()=>this.view.qualitySettings.bloom),(e=>{e?(this._enable(),this.precompile()):this._disable()}),o)])}destroy(){}_updateFogParameters(){const e=this.view.environment.weather;if("sunny"===e.type||"cloudy"===e.type)this._blurParameters.blurRadius=f[e.type];else{const r="foggy"===e.type?e.fogStrength:e.precipitation;this._blurParameters.blurRadius=t(f.cloudy,f[e.type],r)}this._compositionParameters.lodFactors=d[e.type].far,this._compositionParameters.lodFactorsFront=d[e.type].near,this.requestRender(P.UPDATE)}precompile(){this.techniques.precompile(c,this._blurHorizontalConfiguration),this._blurVerticalConfiguration.bloomStage=u.Vertical,this.techniques.precompile(c,this._blurVerticalConfiguration),this.techniques.precompile(b,this._compositionConfiguration)}render(e){const t=e.find((({name:e})=>e===a.TRANSPARENT_ENVIRONMENT)),r=t.getAttachment(T)?.attachment;if(!r)return t;const o=this.techniques.get(c,this._blurHorizontalConfiguration),s=this.techniques.get(c,this._blurVerticalConfiguration),i=this.techniques.get(b,this._compositionConfiguration);if(!o.compiled||!s.compiled||!i.compiled)return this.requestRender(P.UPDATE),t;const n=t.getTexture(),l=this.fboCache,{fullWidth:u,fullHeight:h}=this.bindParameters.camera,p=this.renderingContext;let _=r,f=u,d=h;const g=5,C=this._blurParameters.blurRadius;for(let a=0;a<g;a++){const e=l.acquire(f,d,"bloomHorizontal",m.RGBA16F);this._blurParameters.color=_,this._prepareFBO(e,f,d),p.bindTechnique(o,this.bindParameters,this._blurParameters),p.screen.draw();const t=l.acquire(f,d,"bloomVertical",m.RGBA16F);this._blurParameters.color=e.getTexture(),this._prepareFBO(t,f,d),p.bindTechnique(s,this.bindParameters,this._blurParameters),p.screen.draw(),e.release(),this._bloomResults[a]=t,f=Math.ceil(f/2),d=Math.ceil(d/2),_=this._bloomResults[a].getTexture(),this._blurParameters.blurRadius*=this._blurScale}this._blurParameters.blurRadius=C,this._compositionParameters.color=n,this._compositionParameters.bloomTexture0=this._bloomResults[0].getTexture(),this._compositionParameters.bloomTexture1=this._bloomResults[1].getTexture(),this._compositionParameters.bloomTexture2=this._bloomResults[2].getTexture(),this._compositionParameters.bloomTexture3=this._bloomResults[3].getTexture(),this._compositionParameters.bloomTexture4=this._bloomResults[4].getTexture();const j=this.acquireOutputFramebuffer();return this._prepareFBO(j,u,h),p.bindTechnique(i,this.bindParameters,this._compositionParameters),p.screen.draw(),this._bloomResults.forEach((e=>e.release())),j.attachDepth(t.getAttachment(R)),j.attachColor(t.getAttachment(T),T),j}_prepareFBO(e,t,r){const o=this.renderingContext;o.bindFramebuffer(e.fbo),o.setViewport(0,0,t,r),o.setClearColor(0,0,0,0),o.clear(C.COLOR)}get test(){return{compositionParameters:this._compositionParameters,blurParameters:this._blurParameters,setLodFactors:e=>{this._compositionParameters.lodFactors=g(e)}}}};e([s()],j.prototype,"consumes",void 0),j=e([i("esri.views.3d.webgl-engine.effects.bloom.BloomRenderNode")],j);export{j as BloomRenderNode};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import{ShaderTechniqueConfiguration as r,parameter as o}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class s extends r{constructor(){super(...arguments),this.reduced=!1}}e([o()],s.prototype,"reduced",void 0);export{s as HazeTechniqueConfiguration};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import{ShaderTechniqueConfiguration as r,parameter as s}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{ToneMappingFunction as o}from"../../shaders/ToneMapping.glsl.js";class t extends r{constructor(){super(...arguments),this.reduced=!1,this.toneMapping=o.ACES}}e([s()],t.prototype,"reduced",void 0);export{t as HazeTechniqueConfiguration};