@arcgis/core 6.0.0-next.13 → 6.0.0-next.15

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 (220) hide show
  1. package/arcade/containerUtils.js +1 -1
  2. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  3. package/arcade/functions/feature.js +1 -1
  4. package/arcade/functions/featuresetstring.js +1 -1
  5. package/arcade/functions/geomasync.js +1 -1
  6. package/arcade/functions/portal.js +1 -1
  7. package/arcade/functions/string.js +1 -1
  8. package/assets/esri/core/workers/RemoteClient.js +1 -1
  9. package/assets/esri/core/workers/chunks/{5566f14afb63065e438f.js → 0050916e462e3c9e0627.js} +1 -1
  10. package/assets/esri/core/workers/chunks/02c5d027bdaee67869cf.js +1 -0
  11. package/assets/esri/core/workers/chunks/08fe248e412bb170210d.js +1 -0
  12. package/assets/esri/core/workers/chunks/0da6abe3ceabfe78f7a0.js +1 -0
  13. package/assets/esri/core/workers/chunks/0f617980c7dd9ad0444f.js +1 -0
  14. package/assets/esri/core/workers/chunks/{fb444954be74c1962ced.js → 10d80e793019dfb45ca2.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{10445313d0d57b34511b.js → 2145a512d269d64036b0.js} +1 -1
  16. package/assets/esri/core/workers/chunks/21ddb26526bcb2b122c3.js +1 -0
  17. package/assets/esri/core/workers/chunks/25f19fc929f25ddd628c.js +1 -0
  18. package/assets/esri/core/workers/chunks/28b74bc77f7c13080074.js +1 -0
  19. package/assets/esri/core/workers/chunks/{2ef5237e4c876d6a4ee0.js → 2bd4ee083ca4ad221f8b.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{f4f9d08b2df856e3b694.js → 2eae542fe7f0f6576ac1.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{2aeb5cc32284dd3e4d22.js → 33e4ff228a8c81b99022.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{42323093827adffe56d3.js → 3418877328f4f0830300.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{8dc1c3042267618fd710.js → 34cbaf844730ac2d92c2.js} +2 -2
  24. package/assets/esri/core/workers/chunks/{96c50a0dda0f1503ef92.js → 3c301a689c7853c9fa67.js} +2 -2
  25. package/assets/esri/core/workers/chunks/{02253bdffbd580af22d8.js → 3ff6d1ed3c0f1285f3e7.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{67e4b5651fd7ff7d8cf0.js → 4ac1d3e49e242e373a92.js} +1 -1
  27. package/assets/esri/core/workers/chunks/4df6cb1bee5d0720a43e.js +1 -0
  28. package/assets/esri/core/workers/chunks/{a4cab24af69260438ff4.js → 4e6f40cbdb8c508e6df1.js} +1 -1
  29. package/assets/esri/core/workers/chunks/5736feefa261589b6273.js +1 -0
  30. package/assets/esri/core/workers/chunks/601e1d020b8115497944.js +1 -0
  31. package/assets/esri/core/workers/chunks/{2686fe5b62dd0be699c0.js → 634523cc7757da9020e4.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{a518ae5683367eeda74c.js → 70d3055f15d8b0cf4074.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{1b946714ca4a1a7359d4.js → 76ab353d80d786777161.js} +2 -2
  34. package/assets/esri/core/workers/chunks/7f8e327acad48c9e75ea.js +1 -0
  35. package/assets/esri/core/workers/chunks/8052da8be251c3ff2176.js +1 -0
  36. package/assets/esri/core/workers/chunks/8e19629899a5becf8e19.js +1 -0
  37. package/assets/esri/core/workers/chunks/{f6e62d2d279a328cbed7.js → 90bdf86f553e2742d67c.js} +1 -1
  38. package/assets/esri/core/workers/chunks/91ebb2ccab1889eb7e81.js +1 -0
  39. package/assets/esri/core/workers/chunks/94e427040edb469d58ad.js +1 -0
  40. package/assets/esri/core/workers/chunks/{3d9d7d3a40b51eb7ee3d.js → 953ba13299e7aa92c1a0.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{f46d9a19f79d4a4bd354.js → 9e1a3b6a08c96dcefdde.js} +1 -1
  42. package/assets/esri/core/workers/chunks/9f0a973a0dd28953ce25.js +1 -0
  43. package/assets/esri/core/workers/chunks/a2ad3e620c98e2b2eb06.js +1 -0
  44. package/assets/esri/core/workers/chunks/a34b3d2e11a777e1ff3f.js +1 -0
  45. package/assets/esri/core/workers/chunks/{140f2eeb11e39ab15734.js → aa36c3a9bbaa086e3757.js} +1 -1
  46. package/assets/esri/core/workers/chunks/ae31fd416bbb41a81392.js +1 -0
  47. package/assets/esri/core/workers/chunks/b49df4ebd4be1181b0f9.js +2 -0
  48. package/assets/esri/core/workers/chunks/{68d8ae42ab71d01a70a5.js → b557824bc1fa163d72a3.js} +2 -2
  49. package/assets/esri/core/workers/chunks/bc915fb182d463d804e6.js +1 -0
  50. package/assets/esri/core/workers/chunks/{992f102992c2bed7b34e.js → d5d0fe8e198ff5a902ee.js} +1 -1
  51. package/assets/esri/core/workers/chunks/e2190361247f35b02b32.js +1 -0
  52. package/assets/esri/core/workers/chunks/e2f42aec02bff33b25dd.js +1 -0
  53. package/assets/esri/core/workers/chunks/ebc1a2ef3aed8aa29424.js +1 -0
  54. package/assets/esri/core/workers/chunks/ed6e9d7f71bfd2691717.js +1 -0
  55. package/assets/esri/core/workers/chunks/ed8786fed345718ed684.js +1 -0
  56. package/assets/esri/core/workers/chunks/ee6679ef9efa1504e7eb.js +1 -0
  57. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  58. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  59. package/assets/esri/libs/pdfjs/wasm/openjpeg_nowasm_fallback.js +1 -0
  60. package/chunks/BlendWeights.glsl.js +10 -10
  61. package/chunks/Blur.glsl.js +2 -2
  62. package/chunks/EdgeDetect.glsl.js +24 -19
  63. package/chunks/HUDMaterial.glsl.js +11 -1
  64. package/chunks/HighlightApply.glsl.js +4 -5
  65. package/chunks/HighlightBlur.glsl.js +5 -5
  66. package/chunks/HighlightDownsample.glsl.js +2 -2
  67. package/chunks/HighlightSharpApply.glsl.js +61 -0
  68. package/chunks/lyr3DMain.js +1 -1
  69. package/chunks/lyr3DWorker.js +2 -2
  70. package/chunks/portal.js +1 -1
  71. package/config.js +1 -1
  72. package/core/ObjectPool.js +1 -1
  73. package/core/PooledArray.js +1 -1
  74. package/core/accessorSupport/tracking/SimpleTrackingTarget.js +1 -1
  75. package/geometry/support/buffer/BufferPool.js +1 -1
  76. package/geometry/support/coordsUtils.js +1 -1
  77. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  78. package/geometry/support/curves/mathUtils.js +1 -1
  79. package/geometry/support/meshUtils.d.ts +5 -6
  80. package/interfaces.d.ts +18 -9
  81. package/kernel.js +1 -1
  82. package/layers/GeospatialPDFLayer.d.ts +154 -4
  83. package/layers/Layer.d.ts +2 -0
  84. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -1
  85. package/layers/geospatialPDF/ViewportMeasureFrame.js +1 -1
  86. package/layers/geospatialPDF/geospatialPDFParserUtils.js +1 -1
  87. package/layers/geospatialPDF/projectionToWKTUtils.js +2 -2
  88. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  89. package/layers/graphics/sources/GeoJSONSource.js +1 -1
  90. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  91. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  92. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  93. package/layers/graphics/sources/support/sourceUtils.js +1 -1
  94. package/layers/raster/datasets/TIFFRaster.js +1 -1
  95. package/layers/raster/datasets/pixelReader.js +1 -1
  96. package/layers/raster/functions/clipUtils.js +1 -1
  97. package/layers/support/LabelClass.d.ts +3 -2
  98. package/layers/support/PortalItemData.d.ts +31 -8
  99. package/layers/support/fieldUtils.js +1 -1
  100. package/layers/support/types.d.ts +4 -1
  101. package/package.json +2 -2
  102. package/portal/schemas/definitions.js +1 -1
  103. package/rest/knowledgeGraph/ObjectValue.js +1 -1
  104. package/symbols/cim/cimAnalyzer.js +1 -1
  105. package/views/2d/engine/webgl/GlyphWorker.js +1 -1
  106. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  107. package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
  108. package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
  109. package/views/3d/analysis/LineOfSight/LineOfSightObserverPlugin.js +1 -1
  110. package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +1 -1
  111. package/views/3d/analysis/LineOfSight/{LineOfSightRootPlugin.js → LineOfSightPlacementRootPlugin.js} +1 -1
  112. package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
  113. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  114. package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +1 -1
  115. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  116. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  117. package/views/3d/interactive/editingTools/ManipulatedObject3DGraphic.js +1 -1
  118. package/views/3d/support/MemoryController.js +1 -1
  119. package/views/3d/terrain/TerrainData.js +1 -1
  120. package/views/3d/terrain/terrainUtils.js +1 -1
  121. package/views/3d/webgl-engine/core/shaderLibrary/HighlightCellGridScreenSpacePass.glsl.js +20 -6
  122. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  123. package/views/3d/webgl-engine/effects/geometry/RenderOccluded.js +1 -1
  124. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  125. package/views/3d/webgl-engine/effects/highlight/HighlightApply.glsl.js +1 -1
  126. package/views/3d/webgl-engine/effects/highlight/HighlightCellGridScreenSpacePassParameters.js +2 -0
  127. package/views/3d/webgl-engine/effects/highlight/HighlightDownsample.glsl.js +1 -1
  128. package/views/3d/webgl-engine/effects/highlight/HighlightPassParameters.js +1 -1
  129. package/views/3d/webgl-engine/effects/highlight/HighlightSharpApply.glsl.js +2 -0
  130. package/views/3d/webgl-engine/effects/highlight/HighlightSharpApplyTechnique.js +2 -0
  131. package/views/3d/webgl-engine/effects/smaa/BlendWeights.glsl.js +1 -1
  132. package/views/3d/webgl-engine/effects/smaa/Blur.glsl.js +1 -1
  133. package/views/3d/webgl-engine/effects/smaa/EdgeDetect.glsl.js +1 -1
  134. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  135. package/views/3d/webgl-engine/effects/smaa/SMAABlendWeightsTechnique.js +1 -1
  136. package/views/3d/webgl-engine/effects/smaa/SMAABlurTechnique.js +1 -1
  137. package/views/3d/webgl-engine/effects/smaa/SMAAEdgeDetectTechnique.js +1 -1
  138. package/views/3d/webgl-engine/effects/smaa/SMAAPassParameters.js +1 -1
  139. package/views/3d/webgl-engine/effects/smaa/SMAATechniqueConfiguration.js +2 -0
  140. package/views/3d/webgl-engine/lib/Compositor.js +1 -1
  141. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  142. package/views/3d/webgl-engine/lib/PathCapBuilder.js +1 -1
  143. package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
  144. package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
  145. package/views/3d/webgl-engine/lib/PathProfile.js +1 -1
  146. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  147. package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
  148. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  149. package/views/draw/DrawTool.js +1 -1
  150. package/views/draw/plugins/MultipointPlugin.js +1 -1
  151. package/views/draw/support/PluginContext.js +1 -1
  152. package/views/draw/support/managers/TooltipManager.js +1 -1
  153. package/views/draw/support/types.d.ts +5 -2
  154. package/views/support/HighlightDefaults.js +1 -1
  155. package/webdoc/applicationProperties/SearchLayerField.d.ts +7 -1
  156. package/webdoc/applicationProperties/SearchLayerField.js +1 -1
  157. package/webdoc/applicationProperties/SearchTableField.d.ts +7 -1
  158. package/webdoc/applicationProperties/SearchTableField.js +1 -1
  159. package/webdoc/applicationProperties/searchMode.js +2 -0
  160. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  161. package/widgets/BatchAttributeForm/inputs/support/DynamicChoiceController.js +1 -1
  162. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  163. package/widgets/BatchAttributeForm.js +1 -1
  164. package/widgets/Editor/EditorViewModel.d.ts +10 -1
  165. package/widgets/Editor.d.ts +10 -1
  166. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  167. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  168. package/widgets/HistogramRangeSlider.d.ts +2 -2
  169. package/widgets/HistogramRangeSlider.js +1 -1
  170. package/widgets/Legend.d.ts +1 -0
  171. package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
  172. package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.d.ts +5 -2
  173. package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
  174. package/widgets/ScaleRangeSlider.js +1 -1
  175. package/widgets/Search/LayerSearchSource.d.ts +23 -1
  176. package/widgets/Search/LayerSearchSource.js +1 -1
  177. package/widgets/Search/support/layerSearchUtils.js +1 -1
  178. package/widgets/Search/types.d.ts +7 -0
  179. package/widgets/ValuePicker/ValuePickerBaseComponent.d.ts +5 -1
  180. package/widgets/ValuePicker/ValuePickerCollection.d.ts +2 -0
  181. package/widgets/ValuePicker/ValuePickerCombobox.d.ts +7 -1
  182. package/widgets/ValuePicker/ValuePickerLabel.d.ts +7 -1
  183. package/widgets/ValuePicker/ValuePickerSlider.d.ts +2 -0
  184. package/widgets/ValuePicker/ValuePickerSliderVisibleElements.d.ts +5 -1
  185. package/widgets/ValuePicker/ValuePickerVisibleElements.d.ts +5 -1
  186. package/widgets/ValuePicker/types.d.ts +2 -0
  187. package/widgets/support/forms/formUtils.js +1 -1
  188. package/widgets/support/forms/types.d.ts +1 -1
  189. package/assets/esri/core/workers/chunks/037a8cc19debbaaa4e10.js +0 -1
  190. package/assets/esri/core/workers/chunks/0dc66b03ff55d0ea5a09.js +0 -1
  191. package/assets/esri/core/workers/chunks/175c268e64ccd01f8c25.js +0 -1
  192. package/assets/esri/core/workers/chunks/1c65ab9ed611c322ce27.js +0 -1
  193. package/assets/esri/core/workers/chunks/2a1ec30f9ad305763f81.js +0 -2
  194. package/assets/esri/core/workers/chunks/3df5500a85345577480a.js +0 -1
  195. package/assets/esri/core/workers/chunks/3f7d583b676b23b3fadb.js +0 -1
  196. package/assets/esri/core/workers/chunks/408e81c8f1eff8a7b379.js +0 -1
  197. package/assets/esri/core/workers/chunks/4503b20ca6a80fb63d72.js +0 -1
  198. package/assets/esri/core/workers/chunks/4a640548032355e57acd.js +0 -1
  199. package/assets/esri/core/workers/chunks/53be85d04cd2da4f391d.js +0 -1
  200. package/assets/esri/core/workers/chunks/566e129f3d3805d7370a.js +0 -1
  201. package/assets/esri/core/workers/chunks/567a65f4203f6e81f4b4.js +0 -1
  202. package/assets/esri/core/workers/chunks/5982c6a8459c1237b298.js +0 -1
  203. package/assets/esri/core/workers/chunks/5eae5c29149f2429fe96.js +0 -1
  204. package/assets/esri/core/workers/chunks/6dc86e7496157c5e4d2c.js +0 -1
  205. package/assets/esri/core/workers/chunks/74b5c00f93cfc0d59029.js +0 -1
  206. package/assets/esri/core/workers/chunks/7c2c8f786a30267a5f05.js +0 -1
  207. package/assets/esri/core/workers/chunks/88e54449261ef94e390d.js +0 -1
  208. package/assets/esri/core/workers/chunks/9e142551163acf752618.js +0 -1
  209. package/assets/esri/core/workers/chunks/af75747b06d79446a855.js +0 -1
  210. package/assets/esri/core/workers/chunks/dba280c370df13196711.js +0 -1
  211. package/assets/esri/core/workers/chunks/dc486a3595b6d57018bb.js +0 -1
  212. package/assets/esri/core/workers/chunks/e3c1c9e6c62ba5cbcdb8.js +0 -1
  213. package/assets/esri/core/workers/chunks/f1f90adae13b04898008.js +0 -1
  214. package/assets/esri/core/workers/chunks/f47c7065da3b5001245f.js +0 -1
  215. /package/assets/esri/core/workers/chunks/{1b946714ca4a1a7359d4.js.LICENSE.txt → 34cbaf844730ac2d92c2.js.LICENSE.txt} +0 -0
  216. /package/assets/esri/core/workers/chunks/{96c50a0dda0f1503ef92.js.LICENSE.txt → 3c301a689c7853c9fa67.js.LICENSE.txt} +0 -0
  217. /package/assets/esri/core/workers/chunks/{8dc1c3042267618fd710.js.LICENSE.txt → 76ab353d80d786777161.js.LICENSE.txt} +0 -0
  218. /package/assets/esri/core/workers/chunks/{2a1ec30f9ad305763f81.js.LICENSE.txt → b49df4ebd4be1181b0f9.js.LICENSE.txt} +0 -0
  219. /package/assets/esri/core/workers/chunks/{68d8ae42ab71d01a70a5.js.LICENSE.txt → b557824bc1fa163d72a3.js.LICENSE.txt} +0 -0
  220. /package/views/3d/analysis/LineOfSight/{lineOfSightPlacementUtils.js → placementUtils.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{isSome as n}from"../../../../core/arrayUtils.js";import{cyclicalDegrees as r,Cyclical as i}from"../../../../core/Cyclical.js";import{handlesGroup as a}from"../../../../core/handleUtils.js";import{deg2rad as o}from"../../../../core/mathUtils.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{watch as c,syncAndInitial as l,initial as u}from"../../../../core/reactiveUtils.js";import{property as d,subclass as f}from"../../../../core/accessorSupport/decorators.js";import{sub as p,len as m,dot as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as _}from"../../../../core/support/UpdatingHandles.js";import{getFeatureReference as v}from"./placementUtils.js";import{viewshedToolManipulatorConfiguration as y}from"./ViewshedConfiguration.js";import{ViewshedFieldOfViewManipulation as b,isSideHorizontal as x,flipSide as S}from"./ViewshedFieldOfViewManipulation.js";import{ViewshedObserverManipulatedObject3D as C}from"./ViewshedObserverManipulatedObject3D.js";import{ViewshedScaleOrientManipulation as w}from"./ViewshedScaleOrientManipulation.js";import{ViewshedObserverManipulator as T}from"./viewshedToolManipulatorUtils.js";import{screenToMapAtSceneSurface as E}from"../../interactive/editingTools/dragEventPipeline3D.js";import{discRadiusSmall as D}from"../../interactive/editingTools/manipulations/config.js";import{MoveManipulation as O}from"../../interactive/editingTools/manipulations/MoveManipulation.js";import{createManipulatorDragEventPipeline as k,resetManipulatedObject as A,sceneSnappingAtLocation as j,dragManipulatedObject as M,sceneSnappingAtProjectedLocation as N,resetProperties as P}from"../../../interactive/dragEventPipeline.js";const F=Symbol(`dragHandles`);let I=class extends t{constructor(e){super(e),this._moveManipulation=null,this._observerManipulator=null,this._observerManipulatedObject=null,this._fieldOfViewManipulation=null,this._scaleOrientManipulation=null,this._updatingHandles=new _,this._grabbing=!1,this.viewshedComputedData=null}initialize(){this._moveManipulation=this._createMoveManipulation(),this._fieldOfViewManipulation=new b({view:this.view,tool:this.parentTool}),this._scaleOrientManipulation=new w({view:this.view,tool:this.parentTool}),this._observerManipulator=new T(this.view,this.parentTool),this._observerManipulatedObject=new C({view:this.view,subTool:this}),this.addHandles([c(()=>this.elevationAlignedObserverRenderSpace,e=>{e!=null&&(this._moveManipulation.renderLocation=e,this._observerManipulator.renderLocation=e)},l),this._updatingHandles.add(()=>this.viewshedComputedData?.heading,e=>{e&&(this._moveManipulation.angle=o(90-e))},u),this._updatingHandles.add(()=>{let{viewshedComputedData:e}=this;return{viewshedComputedData:e,observer:this.elevationAlignedObserverRenderSpace,operations:this._observerManipulatedObject.operations}},({viewshedComputedData:e,observer:t,operations:r},i)=>{this._grabbing&&t!==i?.observer||(this.removeHandles(F),e?.valid&&r!=null&&this.addHandles([this._buildObserverManipulatorDragPipeline(e),this._buildMoveManipulationDragPipeline(e),this._buildFOVDragPipeline(e),this._buildScaleOrientDragPipeline(e)].filter(n),F))},u),this._updatingHandles.add(()=>{let e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,target:e.elevationAlignedTargetRenderSpace,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView}:null},e=>{e!=null&&this._fieldOfViewManipulation.updateManipulatorsTransform(e.viewshedCompData)},u),this._updatingHandles.add(()=>{let e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView,tilt:e.tilt}:null},e=>{e!=null&&this._fieldOfViewManipulation.updateManipulatorVisuals(e.viewshedCompData)},u),this._updatingHandles.add(()=>{let{viewshedComputedData:e,analysisViewData:t}=this,n=t.visible&&(e?.valid??!1),r=t.selectedViewshed===e?.viewshed,i=n&&r,a=e?.effectiveElevationInfo.mode;return{controlsAvailable:i,selected:r,visibleAndValid:n,zManipulationAvailable:i&&a!==`on-the-ground`}},({controlsAvailable:e,selected:t,visibleAndValid:n,zManipulationAvailable:r})=>{this._moveManipulation.available=e,this._moveManipulation.zManipulation.available=r,this._scaleOrientManipulation.available=e,this._observerManipulator.available=n,this._observerManipulator.collisionPriority=t?2:0,this._fieldOfViewManipulation.available=e},u),this._updatingHandles.add(()=>{let e=this.viewshedComputedData;if(!e?.valid)return null;let{observer:t,target:n,verticalFieldOfView:r,horizontalFieldOfView:i}=e;return{viewshedCompData:e,observer:t,target:n,verticalFieldOfView:r,horizontalFieldOfView:i}},e=>{e!=null&&this._scaleOrientManipulation.updateManipulators(e.viewshedCompData)},u)]),this._forEachManipulator(e=>{this.addHandles([e.events.on(`grab-changed`,t=>{this._grabbing=t.action===`start`,t.action===`end`&&this.parentTool.updateInteractionVisualsVisibility(),this.parentTool.subToolHandles.forEach(({subTool:e})=>{e!==this&&e.setInteractive(!this._grabbing)}),this.setInteractive(t=>t===e||!this._grabbing)}),e.events.on(`drag`,e=>{e.action===`start`&&this.parentTool.updateInteractionVisualsVisibility()})])})}destroy(){this._observerManipulatedObject=s(this._observerManipulatedObject),this._moveManipulation=s(this._moveManipulation),this._fieldOfViewManipulation=s(this._fieldOfViewManipulation),this._scaleOrientManipulation=s(this._scaleOrientManipulation),this.parentTool.manipulators.remove(this._observerManipulator),this._observerManipulator=s(this._observerManipulator),this._updatingHandles.destroy()}get updating(){return this._updatingHandles.updating}get viewshed(){return this.viewshedComputedData?.viewshed}get grabbing(){return this._grabbing}get observer(){return this.viewshed?.observer}set observer(e){let t=this.viewshed;t!=null&&(t.observer=e)}get elevationAlignedObserverRenderSpace(){return this.viewshedComputedData?.elevationAlignedObserverRenderSpace}get discManipulator(){return this._moveManipulation.xyManipulation.discManipulator}get observerManipulator(){return this._observerManipulator}get observerManipulatedObject(){return this._observerManipulatedObject}get moveInteractionState(){let{dragging:e,grabbing:t}=this._moveManipulation;return{dragging:e||this._observerManipulator.dragging,grabbing:t||this._observerManipulator.grabbing}}get scaleOrientInteractionState(){let{dragging:e,grabbing:t}=this._scaleOrientManipulation;return{dragging:e,grabbing:t}}setInteractive(e){let t=typeof e==`boolean`;this._observerManipulator.interactive=t?e:e(this._observerManipulator),this._forEachManipulation(n=>{n.interactive=t?e:n.someManipulator(e)})}hideInactiveManipulators(e){let t=[];return this._forEachManipulation(n=>{n.hasManipulator(e)?n!==this._moveManipulation&&t.push(a(n.mapManipulators(t=>t===e||n===this._fieldOfViewManipulation&&t.grabbing?null:t.disableDisplay?.()))):t.push(n.hideManipulators())}),this._observerManipulator!==e&&t.push(this._observerManipulator.disableDisplay()),a(t)}onManipulatorSelectionChanged(){this._someManipulatorSelected()||this.analysisViewData.selectedViewshed===this.viewshed&&(this.analysisViewData.selectedViewshed=null)}hasManipulator(e){let t=!1;return this._forEachManipulator(n=>{t||=n===e}),t}_someManipulatorSelected(){return this._moveManipulation.selected||this._observerManipulator.selected||this._fieldOfViewManipulation.selected||this._scaleOrientManipulation.selected}_createMoveManipulation(){return new O({view:this.view,tool:this.parentTool,snapToScene:!1,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:!0,radius:D})}_buildObserverManipulatorDragPipeline(e){let{effectiveElevationInfo:t,viewshed:n}=e,r=this._observerManipulatedObject,i=r.operations;if(i==null)return null;let a=i.data.spatialReference;return k(this._observerManipulator,(e,o,s,c)=>{let{parentTool:l,view:u}=this,{intersector:d,snappingManager:f}=l,{geometry:p}=i.data;if(p.type!==`point`)return;let m=n.feature,h=A(r);s=s.next(e=>(n.feature=m,h(e)));let g=l.createObserverMoveSnappingPipeline(0,c,t,!0),_=o.next(E(u,p,t,a)).next(j(u,t));if(g!=null){let{snappingStep:e,cancelSnapping:t}=g;s.next(t),_=_.next(...e)}_.next(e=>(n.feature=v({intersector:d,snappingManager:f,screenPoint:e.screenEnd,view:u}),e)).next(M(r))})}_buildMoveManipulationDragPipeline(e){let{effectiveElevationInfo:t}=e,n=this._observerManipulatedObject,r=n.operations;return r==null?null:this._moveManipulation.createDragPipeline((e,r,i,a,o)=>{a=a.next(A(n));let s=this.parentTool.createObserverMoveSnappingPipeline(e,o,t);if(s!=null){let{snappingStep:e,cancelSnapping:r}=s;return a=a.next(r),i=i.next(N(this.view,t)).next(...e).next(M(n)),{steps:i,cancel:a}}return i=i.next(M(n)),{steps:i,cancel:a}},t,r.data.spatialReference,void 0)}_buildFOVDragPipeline(e){let t=0,n=0;return this._fieldOfViewManipulation.createDragPipeline((i,a,o)=>{if(e==null)return{steps:a,cancel:o};let s=e.viewshed,c=null;return o=o.next(P(s,[`horizontalFieldOfView`,`verticalFieldOfView`])),{steps:a.next(i=>{i.action===`start`&&(c=null,t=e.horizontalFieldOfView,n=e.verticalFieldOfView);let a=i.deltaAngle;if(c==null&&a!==0){let e=i.side===`bottom`||i.side===`left`?a>0:a<0;c=x(i.side)?t===0&&e||t===360&&!e:n===0&&e}let o=c?S(i.side):i.side,l=0;switch(o){case`left`:l=t/2-a;break;case`right`:l=t/2+a;break;case`top`:l=n+a*2;break;case`bottom`:l=n-a*2}return x(o)?(l=r.normalize(l),l=l>270?0:l>180?180:l,s.horizontalFieldOfView=l*2):s.verticalFieldOfView=l,i}),cancel:o}},e)}_buildScaleOrientDragPipeline(e){let t=0,n=0,i=(t,n)=>(r,i,a)=>{if(e==null)return{steps:i,cancel:a};let o=e.viewshed;return a=a.next(P(o,[t])),i=i.next(n(o,e)),{steps:i,cancel:a}};return a([this._scaleOrientManipulation.createHeadingDragPipeline(i(`heading`,(t,i)=>i=>(i.action===`start`&&(n=e.heading),t.heading=r.normalize(n+i.deltaAngle),i)),e),this._scaleOrientManipulation.createTiltDragPipeline(i(`tilt`,(n,r)=>r=>{r.action===`start`&&(t=e.tilt);let i=t+r.deltaAngle;return i<-90?i=180:i>270&&(i=0),n.tilt=R.clamp(i),r}),e),this._scaleOrientManipulation.createDistanceDragPipeline(i(`farDistance`,(e,t)=>n=>{let r=p(L,n.renderEnd,t.elevationAlignedObserverRenderSpace),i=m(r)*t.metersPerUnit;return e.farDistance=h(r,t.targetDirection)<0?y.scaleOrientMinDistance:i,n}),e)])}_forEachManipulator(e){this._forEachManipulation(t=>{t.forEachManipulator(e)}),e(this._observerManipulator)}_forEachManipulation(e){e(this._moveManipulation),e(this._fieldOfViewManipulation),e(this._scaleOrientManipulation)}get test(){return{observerManipulator:this._observerManipulator,moveManipulation:this._moveManipulation,fieldOfViewManipulation:this._fieldOfViewManipulation,scaleOrientManipulation:this._scaleOrientManipulation,viewshedComputedData:this.viewshedComputedData}}};e([d({constructOnly:!0})],I.prototype,`analysis`,void 0),e([d({constructOnly:!0})],I.prototype,`analysisViewData`,void 0),e([d({constructOnly:!0})],I.prototype,`parentTool`,void 0),e([d({constructOnly:!0,nonNullable:!0})],I.prototype,`view`,void 0),e([d()],I.prototype,`updating`,null),e([d()],I.prototype,`viewshed`,null),e([d()],I.prototype,`_grabbing`,void 0),e([d()],I.prototype,`grabbing`,null),e([d()],I.prototype,`viewshedComputedData`,void 0),e([d()],I.prototype,`observer`,null),e([d()],I.prototype,`elevationAlignedObserverRenderSpace`,null),I=e([f(`esri.views.3d.analysis.Viewshed.ViewshedSubTool`)],I);const L=g(),R=new i(0,180);export{I as ViewshedSubTool};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{isSome as n}from"../../../../core/arrayUtils.js";import{cyclicalDegrees as r,Cyclical as i}from"../../../../core/Cyclical.js";import{handlesGroup as a}from"../../../../core/handleUtils.js";import{deg2rad as o}from"../../../../core/mathUtils.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{watch as c,syncAndInitial as l,initial as u}from"../../../../core/reactiveUtils.js";import{property as d,subclass as f}from"../../../../core/accessorSupport/decorators.js";import{sub as p,len as m,dot as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as _}from"../../../../core/support/UpdatingHandles.js";import{getFeatureReference as v}from"./placementUtils.js";import{viewshedToolManipulatorConfiguration as y}from"./ViewshedConfiguration.js";import{ViewshedFieldOfViewManipulation as b,isSideHorizontal as x,flipSide as S}from"./ViewshedFieldOfViewManipulation.js";import{ViewshedObserverManipulatedObject3D as C}from"./ViewshedObserverManipulatedObject3D.js";import{ViewshedScaleOrientManipulation as w}from"./ViewshedScaleOrientManipulation.js";import{ViewshedObserverManipulator as T}from"./viewshedToolManipulatorUtils.js";import{screenToMapAtSceneSurface as E}from"../../interactive/editingTools/dragEventPipeline3D.js";import{discRadiusSmall as D}from"../../interactive/editingTools/manipulations/config.js";import{MoveManipulation as O}from"../../interactive/editingTools/manipulations/MoveManipulation.js";import{createManipulatorDragEventPipeline as k,resetManipulatedObject as A,sceneSnappingAtLocation as j,dragManipulatedObject as M,sceneSnappingAtProjectedLocation as N,resetProperties as P}from"../../../interactive/dragEventPipeline.js";const F=Symbol(`dragHandles`);let I=class extends t{constructor(e){super(e),this._moveManipulation=null,this._observerManipulator=null,this._observerManipulatedObject=null,this._fieldOfViewManipulation=null,this._scaleOrientManipulation=null,this._updatingHandles=new _,this._grabbing=!1,this.viewshedComputedData=null}initialize(){this._moveManipulation=this._createMoveManipulation(),this._fieldOfViewManipulation=new b({view:this.view,tool:this.parentTool}),this._scaleOrientManipulation=new w({view:this.view,tool:this.parentTool}),this._observerManipulator=new T(this.view,this.parentTool),this._observerManipulatedObject=new C({view:this.view,subTool:this}),this.addHandles([c(()=>this.elevationAlignedObserverRenderSpace,e=>{e!=null&&(this._moveManipulation.renderLocation=e,this._observerManipulator.renderLocation=e)},l),this._updatingHandles.add(()=>this.viewshedComputedData?.heading,e=>{e&&(this._moveManipulation.angle=o(90-e))},u),this._updatingHandles.add(()=>{let{viewshedComputedData:e}=this;return{viewshedComputedData:e,observer:this.elevationAlignedObserverRenderSpace,operations:this._observerManipulatedObject.operations}},({viewshedComputedData:e,observer:t,operations:r},i)=>{this._grabbing&&t!==i?.observer||(this.removeHandles(F),e?.valid&&r!=null&&this.addHandles([this._buildObserverManipulatorDragPipeline(e),this._buildMoveManipulationDragPipeline(e),this._buildFOVDragPipeline(e),this._buildScaleOrientDragPipeline(e)].filter(n),F))},u),this._updatingHandles.add(()=>{let e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,target:e.elevationAlignedTargetRenderSpace,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView}:null},e=>{e!=null&&this._fieldOfViewManipulation.updateManipulatorsTransform(e.viewshedCompData)},u),this._updatingHandles.add(()=>{let e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView,tilt:e.tilt}:null},e=>{e!=null&&this._fieldOfViewManipulation.updateManipulatorVisuals(e.viewshedCompData)},u),this._updatingHandles.add(()=>{let{viewshedComputedData:e,analysisViewData:t}=this,n=t.visible&&(e?.valid??!1),r=t.selectedViewshed===e?.viewshed,i=n&&r,a=e?.effectiveElevationInfo.mode;return{controlsAvailable:i,selected:r,visibleAndValid:n,zManipulationAvailable:i&&a!==`on-the-ground`}},({controlsAvailable:e,selected:t,visibleAndValid:n,zManipulationAvailable:r})=>{this._moveManipulation.available=e,this._moveManipulation.zManipulation.available=r,this._scaleOrientManipulation.available=e,this._observerManipulator.available=n,this._observerManipulator.collisionPriority=t?2:0,this._fieldOfViewManipulation.available=e},u),this._updatingHandles.add(()=>{let e=this.viewshedComputedData;if(!e?.valid)return null;let{observer:t,target:n,verticalFieldOfView:r,horizontalFieldOfView:i}=e;return{viewshedCompData:e,observer:t,target:n,verticalFieldOfView:r,horizontalFieldOfView:i}},e=>{e!=null&&this._scaleOrientManipulation.updateManipulators(e.viewshedCompData)},u)]),this._forEachManipulator(e=>{this.addHandles([e.events.on(`grab-changed`,t=>{this._grabbing=t.action===`start`,t.action===`end`&&this.parentTool.updateInteractionVisualsVisibility(),this.parentTool.subToolHandles.forEach(({subTool:e})=>{e!==this&&e.setInteractive(!this._grabbing)}),this.setInteractive(t=>t===e||!this._grabbing)}),e.events.on(`drag`,e=>{e.action===`start`&&this.parentTool.updateInteractionVisualsVisibility()})])})}destroy(){this._observerManipulatedObject=s(this._observerManipulatedObject),this._moveManipulation=s(this._moveManipulation),this._fieldOfViewManipulation=s(this._fieldOfViewManipulation),this._scaleOrientManipulation=s(this._scaleOrientManipulation),this.parentTool.manipulators.remove(this._observerManipulator),this._observerManipulator=s(this._observerManipulator),this._updatingHandles.destroy()}get updating(){return this._updatingHandles.updating}get viewshed(){return this.viewshedComputedData?.viewshed}get grabbing(){return this._grabbing}get observer(){return this.viewshed?.observer}set observer(e){let t=this.viewshed;t!=null&&(t.observer=e)}get elevationAlignedObserverRenderSpace(){return this.viewshedComputedData?.elevationAlignedObserverRenderSpace}get discManipulator(){return this._moveManipulation.xyManipulation.discManipulator}get observerManipulator(){return this._observerManipulator}get observerManipulatedObject(){return this._observerManipulatedObject}get moveInteractionState(){let{dragging:e,grabbing:t}=this._moveManipulation;return{dragging:e||this._observerManipulator.dragging,grabbing:t||this._observerManipulator.grabbing}}get scaleOrientInteractionState(){let{dragging:e,grabbing:t}=this._scaleOrientManipulation;return{dragging:e,grabbing:t}}setInteractive(e){let t=typeof e==`boolean`;this._observerManipulator.interactive=t?e:e(this._observerManipulator),this._forEachManipulation(n=>{n.interactive=t?e:n.someManipulator(e)})}hideInactiveManipulators(e){let t=[];return this._forEachManipulation(n=>{n.hasManipulator(e)?n!==this._moveManipulation&&t.push(a(n.mapManipulators(t=>t===e||n===this._fieldOfViewManipulation&&t.grabbing?null:t.disableDisplay?.()))):t.push(n.hideManipulators())}),this._observerManipulator!==e&&t.push(this._observerManipulator.disableDisplay()),a(t)}onManipulatorSelectionChanged(){this._someManipulatorSelected()||this.analysisViewData.selectedViewshed===this.viewshed&&(this.analysisViewData.selectedViewshed=null)}hasManipulator(e){let t=!1;return this._forEachManipulator(n=>{t||=n===e}),t}_someManipulatorSelected(){return this._moveManipulation.selected||this._observerManipulator.selected||this._fieldOfViewManipulation.selected||this._scaleOrientManipulation.selected}_createMoveManipulation(){return new O({view:this.view,tool:this.parentTool,snapToScene:!1,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:!0,radius:D})}_buildObserverManipulatorDragPipeline(e){let{effectiveElevationInfo:t,viewshed:n}=e,r=this._observerManipulatedObject,i=r.operations;if(i==null)return null;let a=i.data.spatialReference;return k(this._observerManipulator,(e,o,s,c)=>{let{parentTool:l,view:u}=this,{intersector:d,snappingManager:f}=l,{geometry:p}=i.data;if(p.type!==`point`)return;let m=n.feature,h=A(r);s=s.next(e=>(n.feature=m,h(e)));let g=l.createObserverMoveSnappingPipeline(0,c,t,!0),_=o.next(E(u,p,t,a)).next(j(u,t));if(g!=null){let{snappingStep:e,cancelSnapping:t}=g;s.next(t),_=_.next(...e)}_.next(e=>(n.feature=v({intersector:d,snappingManager:f,screenPoint:e.screenEnd,view:u}),e)).next(M(r))})}_buildMoveManipulationDragPipeline(e){let{effectiveElevationInfo:t}=e,n=this._observerManipulatedObject,r=n.operations;return r==null?null:this._moveManipulation.createDragPipeline((e,r,i,a,o)=>{a=a.next(A(n));let s=this.parentTool.createObserverMoveSnappingPipeline(e,o,t);if(s!=null){let{snappingStep:e,cancelSnapping:n}=s;a=a.next(n),i=i.next(N(this.view,t)).next(...e)}return i=i.next(M(n)),{steps:i,cancel:a}},t,r.data.spatialReference,void 0)}_buildFOVDragPipeline(e){let t=0,n=0;return this._fieldOfViewManipulation.createDragPipeline((i,a,o)=>{let s=e.viewshed,c=null;return o=o.next(P(s,[`horizontalFieldOfView`,`verticalFieldOfView`])),{steps:a.next(i=>{i.action===`start`&&(c=null,t=e.horizontalFieldOfView,n=e.verticalFieldOfView);let a=i.deltaAngle;if(c==null&&a!==0){let e=i.side===`bottom`||i.side===`left`?a>0:a<0;c=x(i.side)?t===0&&e||t===360&&!e:n===0&&e}let o=c?S(i.side):i.side,l=0;switch(o){case`left`:l=t/2-a;break;case`right`:l=t/2+a;break;case`top`:l=n+a*2;break;case`bottom`:l=n-a*2}return x(o)?(l=r.normalize(l),l=l>270?0:l>180?180:l,s.horizontalFieldOfView=l*2):s.verticalFieldOfView=l,i}),cancel:o}},e)}_buildScaleOrientDragPipeline(e){let t=0,n=0,i=(t,n)=>(r,i,a)=>{let o=e.viewshed;return a=a.next(P(o,[t])),i=i.next(n(o,e)),{steps:i,cancel:a}};return a([this._scaleOrientManipulation.createHeadingDragPipeline(i(`heading`,(t,i)=>i=>(i.action===`start`&&(n=e.heading),t.heading=r.normalize(n+i.deltaAngle),i)),e),this._scaleOrientManipulation.createTiltDragPipeline(i(`tilt`,(n,r)=>r=>{r.action===`start`&&(t=e.tilt);let i=t+r.deltaAngle;return i<-90?i=180:i>270&&(i=0),n.tilt=R.clamp(i),r}),e),this._scaleOrientManipulation.createDistanceDragPipeline(i(`farDistance`,(e,t)=>n=>{let r=p(L,n.renderEnd,t.elevationAlignedObserverRenderSpace),i=m(r)*t.metersPerUnit;return e.farDistance=h(r,t.targetDirection)<0?y.scaleOrientMinDistance:i,n}),e)])}_forEachManipulator(e){this._forEachManipulation(t=>{t.forEachManipulator(e)}),e(this._observerManipulator)}_forEachManipulation(e){e(this._moveManipulation),e(this._fieldOfViewManipulation),e(this._scaleOrientManipulation)}get test(){return{observerManipulator:this._observerManipulator,moveManipulation:this._moveManipulation,fieldOfViewManipulation:this._fieldOfViewManipulation,scaleOrientManipulation:this._scaleOrientManipulation,viewshedComputedData:this.viewshedComputedData}}};e([d({constructOnly:!0})],I.prototype,`analysis`,void 0),e([d({constructOnly:!0})],I.prototype,`analysisViewData`,void 0),e([d({constructOnly:!0})],I.prototype,`parentTool`,void 0),e([d({constructOnly:!0,nonNullable:!0})],I.prototype,`view`,void 0),e([d()],I.prototype,`updating`,null),e([d()],I.prototype,`viewshed`,null),e([d()],I.prototype,`_grabbing`,void 0),e([d()],I.prototype,`grabbing`,null),e([d()],I.prototype,`viewshedComputedData`,void 0),e([d()],I.prototype,`observer`,null),e([d()],I.prototype,`elevationAlignedObserverRenderSpace`,null),I=e([f(`esri.views.3d.analysis.Viewshed.ViewshedSubTool`)],I);const L=g(),R=new i(0,180);export{I as ViewshedSubTool};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import"../../../../core/has.js";import{destroyMaybe as n}from"../../../../core/maybe.js";import{watch as r,syncAndInitial as i}from"../../../../core/reactiveUtils.js";import{property as a,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as s}from"../../../../core/support/UpdatingHandles.js";import{detachToolFromView as c}from"./toolLifecycleUtils.js";import{ViewshedEditTool as l}from"./ViewshedEditTool.js";import{ViewshedPlacementController as u}from"./ViewshedPlacementController.js";import{newToolIntersector as d}from"../../../interactive/ToolIntersector.js";import{acquire as f}from"../../../interactive/snapping/SnappingManagerPool.js";import{setupSnappingToggleHandles as p}from"../../../interactive/snapping/snappingUtils.js";let m=class extends t{constructor(e){super(e),this._editTool=null,this._updatingHandles=new s}initialize(){let{view:e}=this,t=d(e.state.viewingMode);this._snappingManagerResult=f(e),this.addHandles(this._snappingManagerResult),this._placementController=new u({analysis:this.analysis,analysisViewData:this.analysisViewData,intersector:t,snappingManager:this._snappingManager,view:e,callbacks:{cancelTool:()=>{e.activeTool!=null&&(e.activeTool=null)},findViewshedComputedData:e=>this._findViewshedComputedData(e),isToolDestroyed:()=>this.destroyed,setSelectedViewshed:e=>{this.analysisViewData.selectedViewshed=e}}}),p(this),this.addHandles([r(()=>({creationState:this._placementController.creationState,interactive:this.analysisViewData.interactive}),({creationState:n,interactive:r})=>{r?n==null?this._editTool||(this._editTool=new l({analysis:this.analysis,analysisViewData:this.analysisViewData,intersector:t,snappingManager:this._snappingManager,view:e}),e.tools.add(this._editTool)):this._destroyEditTool():(this._placementController.cancelPlaceOperation(),this._destroyEditTool())},i),this._updatingHandles.add(()=>e.activeTool,e=>{e!=null&&e!==this._editTool&&this._placementController.creationState==null&&(this.analysisViewData.selectedViewshed=null)})])}destroy(){this._destroyEditTool(),n(this._placementController),this._updatingHandles.destroy()}get selectedViewshedComputedData(){return this._editTool?.selectedViewshedComputedData}get stagedViewshed(){return this._placementController.stagedViewshed}get active(){return this._placementController.active||(this._editTool?.active??!1)}get updating(){return this._updatingHandles.updating||this._placementController.updating||!!this._editTool?.updating}get creating(){return this._placementController.creationState!=null}get snappingOptions(){return this._snappingManager.options}set snappingOptions(e){this._snappingManager.options=e}get _snappingManager(){return this._snappingManagerResult.snappingManager}async place(e,t){if(this.analysisViewData.interactive=!0,this._destroyEditTool(),await this._placementController.startPlaceOperation(e,t),e===`single`)return{}}_findViewshedComputedData(e){return this.analysisViewData.viewshedComputedDataHandles?.find(t=>t.viewshedComputedData.viewshed===e)?.viewshedComputedData}_destroyEditTool(){let e=this._editTool;this._editTool=null,e!=null&&(c(this.view,e),n(e))}get test(){}};e([a({constructOnly:!0})],m.prototype,`view`,void 0),e([a({constructOnly:!0})],m.prototype,`analysis`,void 0),e([a({constructOnly:!0})],m.prototype,`analysisViewData`,void 0),e([a()],m.prototype,`_placementController`,void 0),e([a()],m.prototype,`_editTool`,void 0),e([a()],m.prototype,`_snappingManagerResult`,void 0),e([a()],m.prototype,`selectedViewshedComputedData`,null),e([a()],m.prototype,`stagedViewshed`,null),e([a()],m.prototype,`active`,null),e([a()],m.prototype,`updating`,null),e([a()],m.prototype,`creating`,null),e([a()],m.prototype,`snappingOptions`,null),m=e([o(`esri.views.3d.analysis.Viewshed.ViewshedTool`)],m);const h=m;export{h as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import"../../../../core/has.js";import{destroyMaybe as n}from"../../../../core/maybe.js";import{watch as r,syncAndInitial as i}from"../../../../core/reactiveUtils.js";import{property as a,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as s}from"../../../../core/support/UpdatingHandles.js";import{detachToolFromView as c}from"./toolLifecycleUtils.js";import{ViewshedEditTool as l}from"./ViewshedEditTool.js";import{ViewshedPlacementController as u}from"./ViewshedPlacementController.js";import{newToolIntersector as d}from"../../../interactive/ToolIntersector.js";import{acquire as f}from"../../../interactive/snapping/SnappingManagerPool.js";import{setupSnappingToggleHandles as p}from"../../../interactive/snapping/snappingUtils.js";let m=class extends t{constructor(e){super(e),this._editTool=null,this._updatingHandles=new s}initialize(){let{view:e}=this,t=d(e.state.viewingMode);this._snappingManagerResult=f(e),this.addHandles(this._snappingManagerResult),this._placementController=new u({analysis:this.analysis,analysisViewData:this.analysisViewData,intersector:t,snappingManager:this._snappingManager,view:e,callbacks:{cancelTool:()=>{e.activeTool!=null&&(e.activeTool=null)},findViewshedComputedData:e=>this._findViewshedComputedData(e),setSelectedViewshed:e=>{this.analysisViewData.selectedViewshed=e}}}),p(this),this.addHandles([r(()=>({creationState:this._placementController.creationState,interactive:this.analysisViewData.interactive}),({creationState:n,interactive:r})=>{r?n==null?this._editTool||(this._editTool=new l({analysis:this.analysis,analysisViewData:this.analysisViewData,intersector:t,snappingManager:this._snappingManager,view:e}),e.tools.add(this._editTool)):this._destroyEditTool():(this._placementController.cancelPlaceOperation(),this._destroyEditTool())},i),this._updatingHandles.add(()=>e.activeTool,e=>{e!=null&&e!==this._editTool&&this._placementController.creationState==null&&(this.analysisViewData.selectedViewshed=null)})])}destroy(){this._destroyEditTool(),n(this._placementController),this._updatingHandles.destroy()}get selectedViewshedComputedData(){return this._editTool?.selectedViewshedComputedData}get stagedViewshed(){return this._placementController.stagedViewshed}get active(){return this._placementController.active||(this._editTool?.active??!1)}get updating(){return this._updatingHandles.updating||this._placementController.updating||!!this._editTool?.updating}get creating(){return this._placementController.creationState!=null}get snappingOptions(){return this._snappingManager.options}set snappingOptions(e){this._snappingManager.options=e}get _snappingManager(){return this._snappingManagerResult.snappingManager}async place(e,t){if(this.analysisViewData.interactive=!0,this._destroyEditTool(),await this._placementController.startPlaceOperation(e,t),e===`single`)return{}}_findViewshedComputedData(e){return this.analysisViewData.viewshedComputedDataHandles?.find(t=>t.viewshedComputedData.viewshed===e)?.viewshedComputedData}_destroyEditTool(){let e=this._editTool;this._editTool=null,e!=null&&(c(this.view,e),n(e))}get test(){}};e([a({constructOnly:!0})],m.prototype,`view`,void 0),e([a({constructOnly:!0})],m.prototype,`analysis`,void 0),e([a({constructOnly:!0})],m.prototype,`analysisViewData`,void 0),e([a()],m.prototype,`_placementController`,void 0),e([a()],m.prototype,`_editTool`,void 0),e([a()],m.prototype,`_snappingManagerResult`,void 0),e([a()],m.prototype,`selectedViewshedComputedData`,null),e([a()],m.prototype,`stagedViewshed`,null),e([a()],m.prototype,`active`,null),e([a()],m.prototype,`updating`,null),e([a()],m.prototype,`creating`,null),e([a()],m.prototype,`snappingOptions`,null),m=e([o(`esri.views.3d.analysis.Viewshed.ViewshedTool`)],m);const h=m;export{h as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../../../core/Evented.js";import{destroyMaybe as n}from"../../../../core/maybe.js";import{syncAndInitial as r}from"../../../../core/reactiveUtils.js";import{property as i,subclass as a}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as o}from"../../../../core/support/UpdatingHandles.js";import{getGraphicEffectiveElevationInfo as s}from"../../../../support/elevationInfoUtils.js";import{getGraphicAttachmentOrigin as c}from"../manipulatorUtils.js";import{createGraphicGeometryUndoRecord as l}from"./undoRecords.js";import{GraphicState as u}from"../../layers/graphics/GraphicState.js";import{GraphicManipulator as d}from"../../../interactive/GraphicManipulator.js";import{EditGeometryOperations as f}from"../../../interactive/editGeometry/EditGeometryOperations.js";const p=Symbol();let m=class extends t{get operations(){return this._operations}get updating(){return this._updatingHandles.updating}get elevationInfo(){return s(this.graphic)}get visible(){return this._graphicState.displaying}get isDraped(){return this._graphicState.isDraped}get origin(){return c(this.view,this.graphic)}constructor(e){super(e),this._updatingHandles=new o}destroy(){this._operations=n(this._operations),this._updatingHandles.destroy()}initialize(){this._graphicState=new u({graphic:this.graphic}),this._graphicState.on(`changed`,()=>this.emit(`committed`)),this.addHandles(this.view.trackGraphicState(this._graphicState)),this.addHandles(this._updatingHandles.add(()=>this.graphic.geometry,e=>{if(e!==this._operations?.data.geometry){if(!e||e?.type===`multipoint`||e?.type===`extent`)n(this._operations),this.removeHandles(p),this._operations=null;else if(this._operations?.trySetGeometry(e))this.emit(`modified-externally`);else{n(this._operations),this.removeHandles(p);let t=f.fromGeometry(e,this.view.state.viewingMode);this._operations=t,this.addHandles(t.data.on(`change`,()=>this.graphic.geometry=t.data.geometry),p)}}},r))}createManipulator(e){return new d({view:this.view,graphic:this.graphic,...e})}maskOccludee(){return this.view.maskOccludee(this.graphic)}endInteraction(){this.graphic.geometry?.type===`mesh`&&this.graphic.notifyMeshTransformChanged()}toMap(e){return this.view.toMap(e,{include:[this.graphic]})}createUndoRecord(){let{graphic:{geometry:e}}=this;return l(e)}};e([i({constructOnly:!0})],m.prototype,`view`,void 0),e([i({constructOnly:!0})],m.prototype,`graphic`,void 0),e([i()],m.prototype,`_operations`,void 0),e([i()],m.prototype,`operations`,null),e([i()],m.prototype,`updating`,null),m=e([a(`esri.views.3d.interactive.editingTools.ManipulatedObject3DGraphic`)],m);export{m as ManipulatedObject3DGraphic};
2
+ import{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../../../core/Evented.js";import{destroyMaybe as n}from"../../../../core/maybe.js";import{syncAndInitial as r}from"../../../../core/reactiveUtils.js";import{property as i,subclass as a}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as o}from"../../../../core/support/UpdatingHandles.js";import{ringNeedsClosure as s,closeRings as c}from"../../../../geometry/support/coordsUtils.js";import{getGraphicEffectiveElevationInfo as l}from"../../../../support/elevationInfoUtils.js";import{getGraphicAttachmentOrigin as u}from"../manipulatorUtils.js";import{createGraphicGeometryUndoRecord as d}from"./undoRecords.js";import{GraphicState as f}from"../../layers/graphics/GraphicState.js";import{GraphicManipulator as p}from"../../../interactive/GraphicManipulator.js";import{EditGeometryOperations as m}from"../../../interactive/editGeometry/EditGeometryOperations.js";const h=Symbol();let g=class extends t{get operations(){return this._operations}get updating(){return this._updatingHandles.updating}get elevationInfo(){return l(this.graphic)}get visible(){return this._graphicState.displaying}get isDraped(){return this._graphicState.isDraped}get origin(){return u(this.view,this.graphic)}constructor(e){super(e),this._updatingHandles=new o}destroy(){this._operations=n(this._operations),this._updatingHandles.destroy()}initialize(){this._graphicState=new f({graphic:this.graphic}),this._graphicState.on(`changed`,()=>this.emit(`committed`)),this.addHandles(this.view.trackGraphicState(this._graphicState)),this.addHandles(this._updatingHandles.add(()=>this.graphic.geometry,e=>{let t=this._operations?.data.geometry;if(e!==t){if(!e||e?.type===`multipoint`||e?.type===`extent`)n(this._operations),this.removeHandles(h),this._operations=null;else if(e.type===`polygon`&&e.rings.some(s)&&(e=e.clone(),c(e)),this._operations?.trySetGeometry(e))this.emit(`modified-externally`);else{n(this._operations),this.removeHandles(h);let t=m.fromGeometry(e,this.view.state.viewingMode);this._operations=t,this.addHandles(t.data.on(`change`,()=>this.graphic.geometry=t.data.geometry),h)}}},r))}createManipulator(e){return new p({view:this.view,graphic:this.graphic,...e})}maskOccludee(){return this.view.maskOccludee(this.graphic)}endInteraction(){this.graphic.geometry?.type===`mesh`&&this.graphic.notifyMeshTransformChanged()}toMap(e){return this.view.toMap(e,{include:[this.graphic]})}createUndoRecord(){let{graphic:{geometry:e}}=this;return d(e)}};e([i({constructOnly:!0})],g.prototype,`view`,void 0),e([i({constructOnly:!0})],g.prototype,`graphic`,void 0),e([i()],g.prototype,`_operations`,void 0),e([i()],g.prototype,`operations`,null),e([i()],g.prototype,`updating`,null),g=e([a(`esri.views.3d.interactive.editingTools.ManipulatedObject3DGraphic`)],g);export{g as ManipulatedObject3DGraphic};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import"../../../core/has.js";import n from"../../../core/Logger.js";import{MemCacheStorage as r,MemCache as i}from"../../../core/MemCache.js";import{addFrameTask as a}from"../../../core/scheduling.js";import{Milliseconds as o}from"../../../core/time.js";import{property as s,subclass as c}from"../../../core/accessorSupport/decorators.js";import{getLyr3DWasm as l}from"../layers/Lyr3DWasm.js";import{isMemoryManagedView as u}from"./MemoryManagedView.js";import{makeBudget as d}from"../../support/Scheduler.js";function f(e){return new h({view:e})}const p=.1,m=1.3;let h=class extends t{constructor(e){super(e),this._quality=1,this._usedMemory=0,this._updating=!1,this._stableQuality=0,this._downscaleMemoryUsed=0,this._canFastRecover=!1,this._predictedMemory=0,this._cacheStorage=new r,this._warnMemoryUsage=null,this._numQualityChanges=0,this._maxMemory=750,this._additionalCacheMemory=0,this.addHandles(a({prepare:()=>this._updateMemory()}))}destroy(){this._cacheStorage.destroy()}get maxMemory(){return this._maxMemory}set maxMemory(e){e==null||e<=0||(this._stableQuality=0,this._canFastRecover=!1,this._maxMemory<e&&this._updateQuality(1),this._maxMemory=e)}get additionalCacheMemory(){return this._additionalCacheMemory}set additionalCacheMemory(e){e!=null&&(this._additionalCacheMemory=e)}get memoryFactor(){return this._quality}get updating(){return this._updating}get usedMemory(){return this._usedMemory}get usedCacheMemory(){return this._cacheStorage.size}newCache(e,t,n){return new i(e,this._cacheStorage,t,n)}resetStableQuality(){this._stableQuality=0}disableMemCache(){this.additionalCacheMemory=-4096}update(){if(this._predictedMemory<=0&&!this._updating)return;let e=this._layersUpdating();if(this._predictedMemory<.6&&this._canFastRecover)this._downscaleMemoryUsed=0,this._stableQuality=0,this._canFastRecover=!1,this._updateQuality(1);else if(e){if(this._predictedMemory>1.1||this._usedMemory>1){if(this._stableQuality>0)this._downscaleMemoryUsed=0,this._updateQuality(this._stableQuality);else if(this._quality>p&&this._downscaleMemoryUsed<this._usedMemory){if(this._compactAndUpdate())return;this._updateQuality(this._quality/m),this._downscaleMemoryUsed=this._usedMemory,this._canFastRecover=!1}}}else if(this._downscaleMemoryUsed=0,this._usedMemory>1){if(this._compactAndUpdate())return;this._stableQuality=0,this._canFastRecover=!1,e=this._updateQuality(this._quality/m),this._downscaleMemoryUsed=this._predictedMemory}else this._stableQuality!==this._quality&&(this._usedMemory<.75&&this._quality<1?(this._stableQuality=this._quality,e=this._updateQuality(this._quality+.05)):this._quality<1&&(this._canFastRecover=!0));this._updating=e}_compactAndUpdate(){let e=d(o(100)),t=this.view.stage.compact(e);return this.view.overlayManager.renderer.compact(e)||t}_updateQuality(e){return e=Math.min(Math.max(e,p),1),e!==this._quality&&(this._quality=e,++this._numQualityChanges,!0)}_layersUpdating(){return this.view.allLayerViews.some(e=>!!e.updating)}_updateMemory(){if(!this.view?.updating||this.view.destroyed||this.view.destroying)return;this.view.stage?.renderer?.tick();let e=this.view.stage?.renderer?.usedMemory,t=(this.view.basemapTerrain?.usedMemory??0)+(e?e.fbos+e.edges+e.plugins+e.clouds:0)+this.view.deconflictor?.usedMemory+this.view.labeler?.usedMemory+(l(this.view)?.lyr3DInternalMemoryBytes??0),r=0;this.view.allLayerViews&&this.view.allLayerViews.forEach(e=>{if(u(e)){let n=e.ignoresMemoryFactor?this._quality:1;t+=e.usedMemory*n,r+=e.unloadedMemory*n}});let i=this._warnMemoryUsage==null||Math.round(t*10)!==Math.round(this._warnMemoryUsage*10),a=this.maxMemory*1048576;if(t>a&&i){this._warnMemoryUsage=t;let e=e=>(e/1048576).toLocaleString(void 0,{maximumFractionDigits:1})+` MB`,i=Math.round(this._quality*100);n.getLogger(this).warn(`Memory Limit exceeded! Limit: ${e(a)} Current: ${e(t)} Projected: ${e(t+r)} Quality: ${i}%`)}this._usedMemory=t/a,this._predictedMemory=(t+r)/a;let o=a-t;this._cacheStorage.maxSize=Math.max(0,o+this.additionalCacheMemory*1048576)}get test(){}};e([s({constructOnly:!0})],h.prototype,`view`,void 0),e([s()],h.prototype,`maxMemory`,null),e([s()],h.prototype,`_quality`,void 0),e([s()],h.prototype,`_usedMemory`,void 0),e([s()],h.prototype,`_updating`,void 0),e([s()],h.prototype,`_stableQuality`,void 0),e([s()],h.prototype,`_maxMemory`,void 0),e([s()],h.prototype,`_additionalCacheMemory`,void 0),h=e([c(`esri.views.3d.support.MemoryController`)],h);export{p as minQuality,f as newMemoryController};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import has from"../../../core/has.js";import n from"../../../core/Logger.js";import{MemCacheStorage as r,MemCache as i}from"../../../core/MemCache.js";import{addFrameTask as a}from"../../../core/scheduling.js";import{Milliseconds as o}from"../../../core/time.js";import{property as s,subclass as c}from"../../../core/accessorSupport/decorators.js";import{getLyr3DWasm as l}from"../layers/Lyr3DWasm.js";import{isMemoryManagedView as u}from"./MemoryManagedView.js";import{makeBudget as d}from"../../support/Scheduler.js";function f(e){return new _({view:e})}const p=.1,m=1.3,h=-4096,g=!!has(`esri-tests-disable-memory-pools`);let _=class extends t{constructor(e){super(e),this._quality=1,this._usedMemory=0,this._updating=!1,this._stableQuality=0,this._downscaleMemoryUsed=0,this._canFastRecover=!1,this._predictedMemory=0,this._cacheStorage=new r,this._warnMemoryUsage=null,this._numQualityChanges=0,this._maxMemory=g?4096:750,this._additionalCacheMemory=g?h:0,this.addHandles(a({prepare:()=>this._updateMemory()}))}destroy(){this._cacheStorage.destroy()}get maxMemory(){return this._maxMemory}set maxMemory(e){e==null||e<=0||g||(this._stableQuality=0,this._canFastRecover=!1,this._maxMemory<e&&this._updateQuality(1),this._maxMemory=e)}get additionalCacheMemory(){return this._additionalCacheMemory}set additionalCacheMemory(e){e!=null&&!g&&(this._additionalCacheMemory=e)}get memoryFactor(){return this._quality}get updating(){return this._updating}get usedMemory(){return this._usedMemory}get usedCacheMemory(){return this._cacheStorage.size}newCache(e,t,n){return new i(e,this._cacheStorage,t,n)}resetStableQuality(){this._stableQuality=0}disableMemCache(){this.additionalCacheMemory=h}update(){if(this._predictedMemory<=0&&!this._updating)return;let e=this._layersUpdating();if(this._predictedMemory<.6&&this._canFastRecover)this._downscaleMemoryUsed=0,this._stableQuality=0,this._canFastRecover=!1,this._updateQuality(1);else if(e){if(this._predictedMemory>1.1||this._usedMemory>1){if(this._stableQuality>0)this._downscaleMemoryUsed=0,this._updateQuality(this._stableQuality);else if(this._quality>p&&this._downscaleMemoryUsed<this._usedMemory){if(this._compactAndUpdate())return;this._updateQuality(this._quality/m),this._downscaleMemoryUsed=this._usedMemory,this._canFastRecover=!1}}}else if(this._downscaleMemoryUsed=0,this._usedMemory>1){if(this._compactAndUpdate())return;this._stableQuality=0,this._canFastRecover=!1,e=this._updateQuality(this._quality/m),this._downscaleMemoryUsed=this._predictedMemory}else this._stableQuality!==this._quality&&(this._usedMemory<.75&&this._quality<1?(this._stableQuality=this._quality,e=this._updateQuality(this._quality+.05)):this._quality<1&&(this._canFastRecover=!0));this._updating=e}_compactAndUpdate(){let e=d(o(100)),t=this.view.stage.compact(e);return this.view.overlayManager.renderer.compact(e)||t}_updateQuality(e){return e=Math.min(Math.max(e,p),1),e!==this._quality&&(this._quality=e,++this._numQualityChanges,!0)}_layersUpdating(){return this.view.allLayerViews.some(e=>!!e.updating)}_updateMemory(){if(!this.view?.updating||this.view.destroyed||this.view.destroying)return;this.view.stage?.renderer?.tick();let e=this.view.stage?.renderer?.usedMemory,t=(this.view.basemapTerrain?.usedMemory??0)+(e?e.fbos+e.edges+e.plugins+e.clouds:0)+this.view.deconflictor?.usedMemory+this.view.labeler?.usedMemory+(l(this.view)?.lyr3DInternalMemoryBytes??0),r=0;this.view.allLayerViews&&this.view.allLayerViews.forEach(e=>{if(u(e)){let n=e.ignoresMemoryFactor?this._quality:1;t+=e.usedMemory*n,r+=e.unloadedMemory*n}});let i=this._warnMemoryUsage==null||Math.round(t*10)!==Math.round(this._warnMemoryUsage*10),a=this.maxMemory*1048576;if(t>a&&i){this._warnMemoryUsage=t;let e=e=>(e/1048576).toLocaleString(void 0,{maximumFractionDigits:1})+` MB`,i=Math.round(this._quality*100);n.getLogger(this).warn(`Memory Limit exceeded! Limit: ${e(a)} Current: ${e(t)} Projected: ${e(t+r)} Quality: ${i}%`)}this._usedMemory=t/a,this._predictedMemory=(t+r)/a;let o=a-t;this._cacheStorage.maxSize=Math.max(0,o+this.additionalCacheMemory*1048576)}get test(){}};e([s({constructOnly:!0})],_.prototype,`view`,void 0),e([s()],_.prototype,`maxMemory`,null),e([s()],_.prototype,`_quality`,void 0),e([s()],_.prototype,`_usedMemory`,void 0),e([s()],_.prototype,`_updating`,void 0),e([s()],_.prototype,`_stableQuality`,void 0),e([s()],_.prototype,`_maxMemory`,void 0),e([s()],_.prototype,`_additionalCacheMemory`,void 0),_=e([c(`esri.views.3d.support.MemoryController`)],_);export{p as minQuality,f as newMemoryController};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- const e={type:`empty-tile`};function t(e){return e!=null&&`type`in e&&e.type===`vector-tile`}function n(e){return e!=null&&`type`in e&&e.type===`raster-tile`}function r(e){return e!=null&&`type`in e&&e.type===`tile-texture`}function i(e){return e!=null&&`type`in e&&e.type===`empty-tile`}function a(e){return e!=null&&`type`in e&&`bitmap`in e}export{e as emptyTile,a as isCreateBitmapResult,i as isEmptyTile,n as isRasterTile,r as isTileTexture,t as isVectorTile};
2
+ const e={type:`empty-tile`};function t(e){return e!=null&&`type`in e&&e.type===`vector-tile`}function n(e){return e!=null&&`type`in e&&e.type===`raster-tile`}function r(e){return e!=null&&`type`in e&&e.type===`tile-texture`}function i(e){return e==null||`type`in e&&e.type===`empty-tile`}function a(e){return e!=null&&`type`in e&&`bitmap`in e}export{e as emptyTile,a as isCreateBitmapResult,i as isEmptyTile,n as isRasterTile,r as isTileTexture,t as isVectorTile};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../../core/Collection.js";import{isEarth as t}from"../../../geometry/ellipsoidUtils.js";import{isCGCS2000 as n}from"../../../geometry/support/spatialReferenceUtils.js";import{getTileMaxtrixSetFromActiveLayer as r}from"../../../layers/support/layerUtils.js";import{isRasterTile as i,isCreateBitmapResult as a,isTileTexture as o,isVectorTile as s}from"./TerrainData.js";import{t as c}from"../../../chunks/terrainUtilsPlanar.js";import{t as l}from"../../../chunks/terrainUtilsSpherical.js";const u={1:l,2:c};function d(e,t){e||console.warn(`Terrain: `+t)}let f=!1,p=!1;function m(e){p=e,f||=e}function h(e){f=e}function g(e,t){if(f&&!e){let e=Error().stack?.slice(5);throw console.warn(`Terrain internal: `+(t??``)+` at `+e),Error(`Assertion failed`+(t?`: `+t:``))}}function _(e){return e?.type===`imagery-tile`||e?.type===`wcs`}function v(e){return e?.type===`imagery-tile-3d`}function y(e){return e?.type===`tile-3d`}function b(e){return e?.type===`vector-tile-3d`}function x(e){return e?.type===`wmts-3d`}function S(e){return e?.type===`elevation-3d`}function C(e){return e?.type===`group`}function w(e){return e&&(y(e)||x(e)||v(e)||b(e))}function T(e){return e&&(y(e)||v(e)||b(e)||x(e))}function E(e){return T(e)||S(e)}function D(e){return i(e?.sourceLayerInfo?.data)}function O(e){return j(e?.sourceLayerInfo)||!!e?.isVTLBackground}function k(e){return o(e?.sourceLayerInfo?.data)}function A(e){let t=e?.sourceLayerInfo?.data;return a(t)}function j(e){return s(e?.data)}function M(e){return e!=null&&`release`in e&&e.release(),null}function N(e,t,n,r,i){return u[r].checkIfTileInfoSupportedForViewSR(e,n,t,i)}function P(e,t,n){let r=null,i=null;if(e?.type===`wmts`){let a=F(e,t,n);r=a.tileInfo,i=a.fullExtent}else{i=_(e)?e.getCompatibleFullExtent(t):e.fullExtent;let a=n===2;r=_(e)?e.getCompatibleTileInfo(t,i,a):e?.type===`vector-tile`?a&&!I(t)||L.force512VTL?e.tileInfo:e.tileInfo.getCompatibleForVTL(256):e.tileInfo}let a=`tilemapCache`in e?e.tilemapCache?.effectiveMaxLOD:void 0;return r!=null&&i!=null&&N(r,i,t,n,a)==null?{tileInfo:r,fullExtent:i}:null}function F(t,n,i){let a=r(t);if(a!=null){if(e.isCollection(a)){let e=a.find(e=>N(e.tileInfo,e.fullExtent,n,i)==null);if(e)return{tileInfo:e.tileInfo,fullExtent:e.fullExtent}}else return{tileInfo:a.tileInfo,fullExtent:a.fullExtent}}return{tileInfo:null,fullExtent:null}}function I(e){return e.isWGS84||e.isWebMercator||n(e)||!t(e)}const L={force512VTL:!1};function R(e){return`[`+e[0]+`,`+e[1]+`,`+e[2]+`]`}function z(e){return`(`+e[0]+`,`+e[1]+`,`+e[2]+`)`}function B(e,t,n=Z){return Math.abs(e-t)<n}function V(e){return e===1?5:e===7?3:e===5?1:7}function H(e){return e===0?4:e===2?6:e===4?0:2}function U(e){return e===7||e===5}function W(e){return e===7||e===1}function G(e){return e===7||e===6||e===5}function K(e){return e===1||e===2||e===3}function q(e){return e===3||e===4||e===5}function J(e){return e===1||e===0||e===7}const Y=[0,2,4,6],X=[1,3,5,7],Z=1e-5;export{B as almostEquals,N as checkIfTileInfoSupportedForView,h as enableInternalTerrainChecks,f as enableTerrainInternalChecks,m as enableTerrainWaterproofChecks,p as enableWaterproofTests,Z as eps,F as getTileInfoAndExtentFromWMTSLayer,P as getTiledLayerInfo,g as internalAssert,w as isBlendableLayerView,K as isEast,S as isElevationLayerView,C as isGroupLayerView,A as isImageSourceRenderInfo,v as isImageryTileLayerView,D as isImageryTileRenderInfo,T as isMapTileLayerView,J as isNorth,W as isNorthCorner,_ as isProjectableRasterLayer,q as isSouth,E as isSurfaceLayerView,k as isTextureTileRenderInfo,y as isTileLayerView,b as isVectorTileLayerView,j as isVectorTilePerLayerInfo,O as isVectorTileRenderInfo,x as isWMTSLayerView,G as isWest,U as isWestCorner,R as lij2s,X as neighborCornerIndices,Y as neighborEdgeIndices,V as oppositeCorner,H as oppositeEdge,M as releaseTerrainData,L as test,z as v32s,I as vtlAssumes256PixelSizeAsDefault,d as weakAssert};
2
+ import e from"../../../core/Collection.js";import{isEarth as t}from"../../../geometry/ellipsoidUtils.js";import{isCGCS2000 as n}from"../../../geometry/support/spatialReferenceUtils.js";import{getTileMaxtrixSetFromActiveLayer as r}from"../../../layers/support/layerUtils.js";import{isRasterTile as i,isCreateBitmapResult as a,isTileTexture as o,isVectorTile as s}from"./TerrainData.js";import{t as c}from"../../../chunks/terrainUtilsPlanar.js";import{t as l}from"../../../chunks/terrainUtilsSpherical.js";const u={1:l,2:c};function d(e,t){e||console.warn(`Terrain: `+t)}let f=!1,p=!1;function m(e){p=e,f||=e}function h(e){f=e}function g(e,t){if(f&&!e){let e=Error().stack?.slice(5);throw console.warn(`Terrain internal: `+(t??``)+` at `+e),Error(`Assertion failed`+(t?`: `+t:``))}}function _(e){return e?.type===`imagery-tile`||e?.type===`wcs`}function v(e){return e?.type===`imagery-tile-3d`}function y(e){return e?.type===`tile-3d`}function b(e){return e?.type===`vector-tile-3d`}function x(e){return e?.type===`wmts-3d`}function S(e){return e?.type===`elevation-3d`}function C(e){return e?.type===`group`}function w(e){return e&&(y(e)||x(e)||v(e)||b(e))}function T(e){return e&&(y(e)||v(e)||b(e)||x(e))}function E(e){return T(e)||S(e)}function D(e){return i(e?.sourceLayerInfo?.data)}function O(e){return e?.sourceLayerInfo?.data!=null&&j(e.sourceLayerInfo)||!!e?.isVTLBackground}function k(e){return o(e?.sourceLayerInfo?.data)}function A(e){let t=e?.sourceLayerInfo?.data;return a(t)}function j(e){return s(e?.data)}function M(e){return e!=null&&`release`in e&&e.release(),null}function N(e,t,n,r,i){return u[r].checkIfTileInfoSupportedForViewSR(e,n,t,i)}function P(e,t,n){let r=null,i=null;if(e?.type===`wmts`){let a=F(e,t,n);r=a.tileInfo,i=a.fullExtent}else{i=_(e)?e.getCompatibleFullExtent(t):e.fullExtent;let a=n===2;r=_(e)?e.getCompatibleTileInfo(t,i,a):e?.type===`vector-tile`?a&&!I(t)||L.force512VTL?e.tileInfo:e.tileInfo.getCompatibleForVTL(256):e.tileInfo}let a=`tilemapCache`in e?e.tilemapCache?.effectiveMaxLOD:void 0;return r!=null&&i!=null&&N(r,i,t,n,a)==null?{tileInfo:r,fullExtent:i}:null}function F(t,n,i){let a=r(t);if(a!=null){if(e.isCollection(a)){let e=a.find(e=>N(e.tileInfo,e.fullExtent,n,i)==null);if(e)return{tileInfo:e.tileInfo,fullExtent:e.fullExtent}}else return{tileInfo:a.tileInfo,fullExtent:a.fullExtent}}return{tileInfo:null,fullExtent:null}}function I(e){return e.isWGS84||e.isWebMercator||n(e)||!t(e)}const L={force512VTL:!1};function R(e){return`[`+e[0]+`,`+e[1]+`,`+e[2]+`]`}function z(e){return`(`+e[0]+`,`+e[1]+`,`+e[2]+`)`}function B(e,t,n=Z){return Math.abs(e-t)<n}function V(e){return e===1?5:e===7?3:e===5?1:7}function H(e){return e===0?4:e===2?6:e===4?0:2}function U(e){return e===7||e===5}function W(e){return e===7||e===1}function G(e){return e===7||e===6||e===5}function K(e){return e===1||e===2||e===3}function q(e){return e===3||e===4||e===5}function J(e){return e===1||e===0||e===7}const Y=[0,2,4,6],X=[1,3,5,7],Z=1e-5;export{B as almostEquals,N as checkIfTileInfoSupportedForView,h as enableInternalTerrainChecks,f as enableTerrainInternalChecks,m as enableTerrainWaterproofChecks,p as enableWaterproofTests,Z as eps,F as getTileInfoAndExtentFromWMTSLayer,P as getTiledLayerInfo,g as internalAssert,w as isBlendableLayerView,K as isEast,S as isElevationLayerView,C as isGroupLayerView,A as isImageSourceRenderInfo,v as isImageryTileLayerView,D as isImageryTileRenderInfo,T as isMapTileLayerView,J as isNorth,W as isNorthCorner,_ as isProjectableRasterLayer,q as isSouth,E as isSurfaceLayerView,k as isTextureTileRenderInfo,y as isTileLayerView,b as isVectorTileLayerView,j as isVectorTilePerLayerInfo,O as isVectorTileRenderInfo,x as isWMTSLayerView,G as isWest,U as isWestCorner,R as lij2s,X as neighborCornerIndices,Y as neighborEdgeIndices,V as oppositeCorner,H as oppositeEdge,M as releaseTerrainData,L as test,z as v32s,I as vtlAssumes256PixelSizeAsDefault,d as weakAssert};
@@ -1,10 +1,25 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{set as e}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as t}from"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{glsl as n}from"../shaderModules/glsl.js";import{Integer2PassUniform as r}from"../shaderModules/Integer2PassUniform.js";import{IntegerPassUniform as i}from"../shaderModules/IntegerPassUniform.js";import{Texture2DUintPassUniform as a}from"../shaderModules/Texture2DUintPassUniform.js";import{g as o}from"../../../../../chunks/HighlightDownsample.glsl.js";function s(t){let{vertex:s}=t;s.uniforms.add(new a(`coverageTexture`,e=>e.coverageTexture),new r(`highlightRenderCellCount`,t=>e(c,t.horizontalCellCount,t.verticalCellCount)),new r(`highlightTextureResolution`,({highlightTexture:t})=>e(c,t.descriptor.width,t.descriptor.height)),new i(`highlightLevel`,e=>e.highlightLevel)).constants.add(`cellSize`,`int`,o),t.varyings.add(`sUV`,`vec2`),t.varyings.add(`vOutlinePossible`,`float`),s.code.add(n`const ivec2 cellVertices[4] = ivec2[4](ivec2(0,0), ivec2(1,0), ivec2(0,1), ivec2(1,1));`),s.main.add(n`int cellIndex = gl_InstanceID;
2
+ import{set as e}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as t}from"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{glsl as n}from"../shaderModules/glsl.js";import{Integer2PassUniform as r}from"../shaderModules/Integer2PassUniform.js";import{IntegerPassUniform as i}from"../shaderModules/IntegerPassUniform.js";import{Texture2DUintPassUniform as a}from"../shaderModules/Texture2DUintPassUniform.js";import{g as o}from"../../../../../chunks/HighlightDownsample.glsl.js";function s(t,s=!1){let{vertex:l}=t;l.uniforms.add(new a(`coverageTexture`,e=>e.coverageTexture),new r(`highlightRenderCellCount`,t=>e(c,t.horizontalCellCount,t.verticalCellCount)),new r(`highlightTextureResolution`,({highlightTexture:t})=>e(c,t.descriptor.width,t.descriptor.height))),s||l.uniforms.add(new i(`highlightLevel`,e=>e.highlightLevel)),l.constants.add(`cellSize`,`int`,o),t.varyings.add(`uv`,`vec2`),t.varyings.add(`vOutlinePossible`,`float`),l.code.add(n`const ivec2 cellVertices[4] = ivec2[4](ivec2(0,0), ivec2(1,0), ivec2(0,1), ivec2(1,1));`),l.main.add(n`int cellIndex = gl_InstanceID;
3
3
  int cellX = cellIndex % highlightRenderCellCount[0];
4
4
  int cellY = (cellIndex - cellX) / highlightRenderCellCount[0];
5
5
  ivec2 cellPos = ivec2(cellX, cellY);
6
- uvec2 covTexel = texelFetch(coverageTexture, cellPos, 0).rg;
7
- int channelIndex = (highlightLevel >> 2) & 3;
6
+ uvec2 covTexel = texelFetch(coverageTexture, cellPos, 0).rg;`),s?l.main.add(n`ivec2 coverageSize = textureSize(coverageTexture, 0);
7
+ bool covered = false;
8
+ for (int y = -1; y <= 1 && !covered; ++y) {
9
+ for (int x = -1; x <= 1; ++x) {
10
+ ivec2 neighbor = clamp(cellPos + ivec2(x, y), ivec2(0), coverageSize - ivec2(1));
11
+ uvec2 neighborCoverage = texelFetch(coverageTexture, neighbor, 0).rg;
12
+ if (any(notEqual(neighborCoverage & uvec2(0x55u), uvec2(0u)))) {
13
+ covered = true;
14
+ break;
15
+ }
16
+ }
17
+ }
18
+ if (!covered) {
19
+ gl_Position = vec4(0.0);
20
+ return;
21
+ }
22
+ vOutlinePossible = any(notEqual(covTexel & uvec2(0xAAu), uvec2(0u))) ? 1.0 : 0.0;`):l.main.add(n`int channelIndex = (highlightLevel >> 2) & 3;
8
23
  uint channelValue = covTexel[channelIndex];
9
24
  int highlightIndex = (highlightLevel & 3) << 1;
10
25
  bool covered = ((channelValue >> highlightIndex) & 1u) == 1u;
@@ -12,9 +27,8 @@ if (!covered) {
12
27
  gl_Position = vec4(0.0);
13
28
  return;
14
29
  }
15
- vOutlinePossible = (((channelValue >> highlightIndex) & 2u) == 2u) ? 1.0 : 0.0;
16
- ivec2 iPosInCell = cellVertices[gl_VertexID];
30
+ vOutlinePossible = (((channelValue >> highlightIndex) & 2u) == 2u) ? 1.0 : 0.0;`),l.main.add(n`ivec2 iPosInCell = cellVertices[gl_VertexID];
17
31
  vec2 sPos = vec2(cellPos * cellSize + iPosInCell * (cellSize));
18
32
  vec2 vPos = sPos / vec2(highlightTextureResolution);
19
- sUV = vPos;
33
+ uv = vPos;
20
34
  gl_Position = vec4(2.0 * vPos - vec2(1.0), 0.0, 1.0);`)}const c=t();export{s as HighlightCellGridScreenSpacePass};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{removeUnordered as e}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{isPromiseLike as t,createAbortError as n}from"../../../../core/promiseUtils.js";import{signal as r}from"../../../../core/signal.js";import{getEmissions as i}from"./emissive/emissions.js";import{DepthRange as a}from"../lib/DepthRange.js";class o{constructor(e){this.context=e,this._renderPlugins=[],this._slots=[],this._version=r(0);for(let e=0;e<20;++e)this._slots[e]=[]}destroy(){this._renderPlugins.forEach(e=>e.destroy()),this._renderPlugins.length=0}get plugins(){return this._renderPlugins}add(e,r){let i=()=>{if(r?.aborted)throw e.uninitializeRenderContext(),n();this._renderPlugins.push(e),e.produces.forEach((t,n)=>this._slots[n].push(e)),this.context.requestRender(),this._version.value++},a=e.initializeRenderContext(this.context,r);if(t(a))return a.then(i);i()}remove(t){e(this._renderPlugins,t),t.uninitializeRenderContext();for(let e=0;e<this._slots.length;++e)this._slots[e]=this._slots[e].filter(e=>e!==t);this.context.requestRender(),this._version.value++}sortTestsTransparentOrderedSlots(e){if(process.env.NODE_ENV===`test`&&this._renderPlugins.some(e=>e.testsTransparentRenderOrder!==0))for(let t of e)this._slots[t].sort((e,t)=>(e.testsTransparentRenderOrder??0)-(t.testsTransparentRenderOrder??0))}prepareRender(){this._renderPlugins.forEach(e=>e.prepareRender?.(this.context.renderContext))}updateAnimation(e){let t=!1;return this._renderPlugins.forEach(n=>t=n.updateAnimation?.(e)||t),t}precompile(...e){++this.context.techniques.precompiling;let t=this.context.renderContext.bind.slot;for(let t of e)this.context.renderContext.bind.slot=t,this._forEachRender(()=>{});this.context.renderContext.bind.slot=t,--this.context.techniques.precompiling}render(...e){for(let t of e)this.context.renderContext.bind.slot=t,this._forEachRender((e,t)=>e.render(this.context.renderContext,t))}_forEachRender(e){let t=this.context.renderContext.bind.slot,n=this.context.renderContext.output;this._slots[t].forEach(r=>{if(!r.produces.get(t)?.(n)||r.isDecoration&&!this.context.renderContext.bind.decorations)return;let i=r.acquireTechniques(this.context.renderContext);i&&e(r,i)})}queryDepthRange(e){return this._renderPlugins.reduce((t,n)=>t.union(n.queryDepthRange?.(e)),new a)}get updating(){return this._version.value>=0&&this._renderPlugins.some(e=>e.readyToRun)}produces(e,...t){return t.some(t=>this._slots[t].some(n=>{let r=n.produces.get(t);return r?r(e):!1}))}hasHighlight(e){return s.some(t=>this._slots[t].some(t=>t.hasHighlight(e)))}get hasDecorations(){return this._renderPlugins.some(e=>e.isDecoration)}get hasOccludees(){return this._renderPlugins.some(e=>e.hasOccludees)}get emissions(){return i(this._renderPlugins)}get renderOccludedFlags(){return this._renderPlugins.reduce((e,t)=>e|(t.renderOccludedFlags??0),0)}get usedMemory(){return this._renderPlugins.reduce((e,t)=>t.material?e:e+(t.usedMemory??0),0)}get test(){}}const s=[2,4,18,12,13,14];export{o as RenderPluginManager};
2
+ import{remove as e}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{isPromiseLike as t,createAbortError as n}from"../../../../core/promiseUtils.js";import{signal as r}from"../../../../core/signal.js";import{getEmissions as i}from"./emissive/emissions.js";import{DepthRange as a}from"../lib/DepthRange.js";class o{constructor(e){this.context=e,this._renderPlugins=[],this._slots=[],this._version=r(0);for(let e=0;e<20;++e)this._slots[e]=[]}destroy(){this._renderPlugins.forEach(e=>e.destroy()),this._renderPlugins.length=0}get plugins(){return this._renderPlugins}add(e,r){let i=()=>{if(r?.aborted)throw e.uninitializeRenderContext(),n();this._renderPlugins.push(e),e.produces.forEach((t,n)=>this._slots[n].push(e)),this.context.requestRender(),this._version.value++},a=e.initializeRenderContext(this.context,r);if(t(a))return a.then(i);i()}remove(t){e(this._renderPlugins,t),t.uninitializeRenderContext();for(let e=0;e<this._slots.length;++e)this._slots[e]=this._slots[e].filter(e=>e!==t);this.context.requestRender(),this._version.value++}sortTestsTransparentOrderedSlots(e){if(process.env.NODE_ENV===`test`&&this._renderPlugins.some(e=>e.testsTransparentRenderOrder!==0))for(let t of e)this._slots[t].sort((e,t)=>(e.testsTransparentRenderOrder??0)-(t.testsTransparentRenderOrder??0))}prepareRender(){this._renderPlugins.forEach(e=>e.prepareRender?.(this.context.renderContext))}updateAnimation(e){let t=!1;return this._renderPlugins.forEach(n=>t=n.updateAnimation?.(e)||t),t}precompile(...e){++this.context.techniques.precompiling;let t=this.context.renderContext.bind.slot;for(let t of e)this.context.renderContext.bind.slot=t,this._forEachRender(()=>{});this.context.renderContext.bind.slot=t,--this.context.techniques.precompiling}render(...e){for(let t of e)this.context.renderContext.bind.slot=t,this._forEachRender((e,t)=>e.render(this.context.renderContext,t))}_forEachRender(e){let t=this.context.renderContext.bind.slot,n=this.context.renderContext.output;this._slots[t].forEach(r=>{if(!r.produces.get(t)?.(n)||r.isDecoration&&!this.context.renderContext.bind.decorations)return;let i=r.acquireTechniques(this.context.renderContext);i&&e(r,i)})}queryDepthRange(e){return this._renderPlugins.reduce((t,n)=>t.union(n.queryDepthRange?.(e)),new a)}get updating(){return this._version.value>=0&&this._renderPlugins.some(e=>e.readyToRun)}produces(e,...t){return t.some(t=>this._slots[t].some(n=>{let r=n.produces.get(t);return r?r(e):!1}))}hasHighlight(e){return s.some(t=>this._slots[t].some(t=>t.hasHighlight(e)))}get hasDecorations(){return this._renderPlugins.some(e=>e.isDecoration)}get hasOccludees(){return this._renderPlugins.some(e=>e.hasOccludees)}get emissions(){return i(this._renderPlugins)}get renderOccludedFlags(){return this._renderPlugins.reduce((e,t)=>e|(t.renderOccludedFlags??0),0)}get usedMemory(){return this._renderPlugins.reduce((e,t)=>t.material?e:e+(t.usedMemory??0),0)}get test(){}}const s=[2,4,18,12,13,14];export{o as RenderPluginManager};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../../core/PooledArray.js";import{property as n,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ZEROS as i}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as a}from"../../../webgl.js";import o from"../../../webgl/RenderNode.js";import{Blit as s}from"../blit/Blit.js";import{DepthStencilAttachment as c}from"../../../../webgl/enums.js";let l=class extends o{constructor(e){super(e),this.consumes={required:[a.OCCLUDED]},this.produces=a.OCCLUDED,this._blit=new s(e.view.stage.renderView.techniques,2)}precompile(){let e=this.view.stage.renderer;e.plugins.plugins.forEach(t=>{e.precompileSlots(t,9,11),t.material&&e.precompileOccludedSlots(t,f)})}render(){let e=this.input;return this._renderOccludedAndTransparentStencil(e),this._renderOccludedComposite(e),e}_renderOccludedAndTransparentStencil(e){let t=this.view.stage.renderer,n=u;this._acquirePlugins(n,8),n.length!==0&&(t.renderSlots(n,10),this._renderAndComposite(e,e.getAttachment(c),.5,()=>t.renderSlots(n,11),!1,!1),n.clear())}_renderOccludedComposite(e){let t=this.view.stage.renderer,n=u,r=this._acquirePlugins(n,p);if(n.length===0)return;let i=this._getDepthStencilAttachment(e),a=i.clearStencil;for(let o of f)r&o&&(this._renderAndComposite(e,i.depth,o===16?1:.5,()=>t.renderOccludedSlots(n,o),!0,a),a=!1);i.release(),n.clear()}_acquirePlugins(e,t){let n=this.view.stage.renderer;e.clear();let r=0,i=!1;for(let a of n.plugins.plugins){let n=a.renderOccludedFlags&t;r|=n,n&&(e.push(a),i||=a.testsTransparentRenderOrder!==0)}return i&&e.sort((e,t)=>e.testsTransparentRenderOrder-t.testsTransparentRenderOrder),r}_renderAndComposite(e,t,n,r,a,o){let s=this.renderingContext,{width:c,height:l}=e.fbo,u=this.fboCache.acquire(c,l,`tmp color`);u.attachDepth(t),s.bindFramebuffer(u.fbo),s.clearFramebuffer(i,a,o),r(),u.detachDepth(),this._blit.blend(u,e,this.bindParameters,n),u.release()}_getDepthStencilAttachment(e){let{width:t,height:n}=e.fbo;if(!this.view.stage.renderer.occludedRequiresIntegratedMeshStencil){let e=this.fboCache.acquireDepth(14,t,n,`retained stencil`);return{depth:e,release:()=>e.release(),clearStencil:!0}}let r=this.fboCache.acquire(t,n,`retained stencil`,14);return this.renderingContext.blitFramebuffer(e.fbo,r.fbo,1024),{depth:r.getAttachment(c),release:()=>r.release(),clearStencil:!1}}};e([n()],l.prototype,`consumes`,void 0),e([n()],l.prototype,`produces`,void 0),l=e([r(`esri.views.3d.webgl-engine.effects.geometry.RenderOccluded`)],l);const u=new t;function d(){u.prune()}const f=[4,2,16],p=f.reduce((e,t)=>e|t,0);export{l as RenderOccluded,d as cleanupRenderOccluded};
2
+ import{__decorate as e}from"tslib";import t from"../../../../../core/PooledArray.js";import{property as n,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ZEROS as i}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as a}from"../../../webgl.js";import o from"../../../webgl/RenderNode.js";import{Blit as s}from"../blit/Blit.js";import{DepthStencilAttachment as c}from"../../../../webgl/enums.js";let l=class extends o{constructor(e){super(e),this.consumes={required:[a.OCCLUDED]},this.produces=a.OCCLUDED,this._blit=new s(e.view.stage.renderView.techniques,2)}precompile(){let e=this.view.stage.renderer;e.plugins.plugins.forEach(t=>{e.precompileSlots(t,9,11),t.material&&e.precompileOccludedSlots(t,f)})}render(){let e=this.input;return this._renderOccludedAndTransparentStencil(e),this._renderOccludedComposite(e),e}_renderOccludedAndTransparentStencil(e){let t=this.view.stage.renderer,n=u;this._acquirePlugins(n,8),n.length!==0&&(t.renderSlots(n,10),this._renderAndComposite(e,e.getAttachment(c),.5,()=>t.renderSlots(n,11),!1,!1),n.clear())}_renderOccludedComposite(e){let t=this.view.stage.renderer,n=u,r=this._acquirePlugins(n,p);if(n.length===0)return;let i=this._getDepthStencilAttachment(e),a=i.clearStencil;for(let o of f)r&o&&(this._renderAndComposite(e,i.depth,o===16?1:.5,()=>t.renderOccludedSlots(n,o),!0,a),a=!1);i.release(),n.clear()}_acquirePlugins(e,t){let n=this.view.stage.renderer;e.clear();let r=0,i=!1;for(let a of n.plugins.plugins){let n=a.renderOccludedFlags&t;r|=n,n&&(e.push(a),i||=a.testsTransparentRenderOrder!==0)}return i&&(process.env.NODE_ENV===`test`?e.stableSort((e,t)=>e.testsTransparentRenderOrder-t.testsTransparentRenderOrder):e.sort((e,t)=>e.testsTransparentRenderOrder-t.testsTransparentRenderOrder)),r}_renderAndComposite(e,t,n,r,a,o){let s=this.renderingContext,{width:c,height:l}=e.fbo,u=this.fboCache.acquire(c,l,`tmp color`);u.attachDepth(t),s.bindFramebuffer(u.fbo),s.clearFramebuffer(i,a,o),r(),u.detachDepth(),this._blit.blend(u,e,this.bindParameters,n),u.release()}_getDepthStencilAttachment(e){let{width:t,height:n}=e.fbo;if(!this.view.stage.renderer.occludedRequiresIntegratedMeshStencil){let e=this.fboCache.acquireDepth(14,t,n,`retained stencil`);return{depth:e,release:()=>e.release(),clearStencil:!0}}let r=this.fboCache.acquire(t,n,`retained stencil`,14);return this.renderingContext.blitFramebuffer(e.fbo,r.fbo,1024),{depth:r.getAttachment(c),release:()=>r.release(),clearStencil:!1}}};e([n()],l.prototype,`consumes`,void 0),e([n()],l.prototype,`produces`,void 0),l=e([r(`esri.views.3d.webgl-engine.effects.geometry.RenderOccluded`)],l);const u=new t;function d(){u.prune()}const f=[4,2,16],p=f.reduce((e,t)=>e|t,0);export{l as RenderOccluded,d as cleanupRenderOccluded};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import"../../../../../core/has.js";import{releaseMaybe as t,disposeMaybe as n}from"../../../../../core/maybe.js";import{watch as r,initial as i}from"../../../../../core/reactiveUtils.js";import{property as a,subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{set as s}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{InternalRenderCategory as c}from"../../../webgl.js";import l from"../../../webgl/RenderNode.js";import{HighlightApplyTechnique as u}from"./HighlightApplyTechnique.js";import{H as d}from"../../../../../chunks/HighlightBlur.glsl.js";import{HighlightBlurTechnique as f}from"./HighlightBlurTechnique.js";import{H as p,g as m}from"../../../../../chunks/HighlightDownsample.glsl.js";import{HighlightDownsampleTechnique as h}from"./HighlightDownsampleTechnique.js";import{HighlightPassParameters as g}from"./HighlightPassParameters.js";import{HighlightToSingleTechnique as _}from"./HighlightToSingleTechnique.js";import{NoVertex as v}from"../../lib/DefaultVertexBufferLayouts.js";import{VertexArrayObject as y}from"../../lib/VertexArrayObject.js";import{BufferObject as b}from"../../../../webgl/BufferObject.js";import{ColorAttachment0 as x,PrimitiveType as S,DataType as C}from"../../../../webgl/enums.js";import w from"../../../../webgl/Texture.js";import{TextureDescriptor as T}from"../../../../webgl/TextureDescriptor.js";import{VertexBuffer as E}from"../../../../webgl/VertexBuffer.js";let D=class extends l{constructor(){super(...arguments),this.consumes={required:[c.HIGHLIGHT,`highlights`]},this.produces=c.HIGHLIGHT,this._downsampleDrawParameters=new p,this._passParameters=new g,this._highlightBlurDrawParameters=new d,this._grid=new O}initialize(){this.addHandles([r(()=>this._updateOptionsTexture(),()=>{},i)])}destroy(){this._grid.coverage=t(this._grid.coverage),this._grid.vao=n(this._grid.vao),this._passParameters.highlightOptionsTexture=t(this._passParameters.highlightOptionsTexture)}_updateOptionsTexture(){if(this._passParameters.highlightOptionsTexture==null){let e=new T(16,2);e.internalFormat=6408,e.samplingMode=9728,this._passParameters.highlightOptionsTexture=new w(this.renderingContext,e,null)}this._passParameters.highlightOptionsTexture.setData(k(this.view.state.highlights)),this.requestRender(1)}render(e){let t=e.find(({name:e})=>e===c.HIGHLIGHT),{techniques:n,bindParameters:r,fboCache:i,_passParameters:a,renderingContext:o}=this;if(!r.decorations)return t;let l=n.getCompiled(h),d=n.getCompiled(_),p=n.getCompiled(f),m=n.getCompiled(u);if(!l||!m||!p||!d)return this.requestRender(1),t;let g=e.find(({name:e})=>e===`highlights`).getTexture();a.highlightTexture=g;let v=this._prepareAndDownSample(g),{width:y,height:b}=g.descriptor;a.highlightTexture=g;let{camera:S}=r,{fullWidth:C,fullHeight:w,pixelRatio:T,fullViewport:E}=S,D=Math.ceil(C/T),O=Math.ceil(w/T),{_highlightBlurDrawParameters:k}=this,A=this.view.stage.renderView.renderer,{highlights:j}=r;for(let e=0;e<j.length;++e){let{name:n}=j[e];if(!A.hasHighlight(n))continue;a.highlightLevel=e,o.setClearColor(0,0,0,0);let c=i.acquire(y,b,`single highlight`,2);o.bindFramebuffer(c.fbo),o.setViewport(0,0,y,b),o.clear(16384),o.bindTechnique(d,r,a),this._renderGrid(v),k.blurInput=c.getTexture(),s(k.blurSize,1/D,0);let l=i.acquire(D,O,`single highlight blur`,2);o.unbindTexture(l.fbo?.colorTexture),o.bindFramebuffer(l.fbo),o.setViewport(0,0,D,O),o.clear(16384),o.bindTechnique(p,r,a,k),this._renderGrid(v),c.release(),s(k.blurSize,0,1/O),a.highlightBlurTexture=l.getTexture(),o.bindFramebuffer(t.fbo),o.setDrawBuffers([x]),o.setViewport4fv(E),o.bindTechnique(m,r,a,k),this._renderGrid(v),l.release()}return a.coverageTexture=a.highlightTexture=null,t}_prepareAndDownSample(e){this._gridUpdateResources(e);let t=this.techniques.get(h),n=this._gridComputeCoverage(t,e),{horizontalCellCount:r,verticalCellCount:i}=n,a=this._passParameters;return a.horizontalCellCount=r,a.verticalCellCount=i,a.coverageTexture=n.coverage?.getTexture(),n}_renderGrid(e){let t=e.verticalCellCount*e.horizontalCellCount;this.renderingContext.bindVAO(e.vao),this.renderingContext.drawElementsInstanced(S.TRIANGLES,6,C.UNSIGNED_BYTE,0,t)}_gridUpdateResources(e){let t=this._grid,{width:n,height:r}=e.descriptor;if(t.horizontalCellCount=Math.ceil(n/m),t.verticalCellCount=Math.ceil(r/m),t.vao)return;let i=this.renderingContext,a=b.createIndex(i,35044,M);t.vao=new y(i,new E(i,v),a)}_gridComputeCoverage(e,t){let n=this.renderingContext,r=this._grid,i=t.descriptor,a=Math.ceil(i.width/m),o=Math.ceil(i.height/m);this._downsampleDrawParameters.input=t;let{highlights:s}=this.bindParameters;r.coverage?.release();let c=this.fboCache.acquire(a,o,`highlight coverage`,s.length>P?3:1);return r.coverage=c,n.bindFramebuffer(c.fbo),n.bindTechnique(e,this.bindParameters,this._passParameters,this._downsampleDrawParameters),n.setViewport(0,0,a,o),n.screen.draw(),r}get test(){}};e([a()],D.prototype,`consumes`,void 0),e([a()],D.prototype,`produces`,void 0),D=e([o(`esri.views.3d.webgl-engine.effects.highlight.Highlight`)],D);class O{constructor(){this.coverage=null,this.vao=null,this.verticalCellCount=0,this.horizontalCellCount=0,this.viewportWidth=0,this.viewportHeight=0}}function k(e){let t=new Uint8Array(128),n=0;for(let r of e){let e=n*4,i=n*4+64;++n;let{color:a}=r,o=r.haloColor??a;t[e+0]=a.r,t[e+1]=a.g,t[e+2]=a.b,t[e+3]=r.fillOpacity*a.a*255,t[i+0]=o.r,t[i+1]=o.g,t[i+2]=o.b,t[i+3]=r.haloOpacity*o.a*255}return t}let A=0;function j(e){let t=0;for(let n of e){let{name:e}=n;t+=e.length;let{color:r,fillOpacity:i,haloColor:a,haloOpacity:o}=n;t+=r.r+r.g+r.b+r.a+i,t+=a?a.r+a.g+a.b+a.a+o:0}let n=e.at(0);if(n){let{shadowOpacity:e,shadowDifference:r,shadowColor:i}=n;t+=e+r+i.r+i.g+i.b+i.a}return A+++(t>=0?0:1)}const M=new Uint8Array([0,1,2,2,1,3]);function N(e,t,n,r,i,a,o=0){let{highlights:c}=i,l=c.length>1?t.acquire(n,r,`highlight mix`,c.length>P?3:1):null,{gl:u}=e;if(l){let t=e.boundFramebuffer;e.bindFramebuffer(l.fbo),u.clearBufferuiv(u.COLOR,0,[0,0,0,0]),e.bindFramebuffer(t)}let d=l?.getTexture();i.highlightMixTexture=d,s(i.highlightMixOrigin,o,0),c.forEach((t,s)=>{if(s>0){let t=w.TEXTURE_UNIT_FOR_UPDATES;e.bindTexture(d,t),e.setActiveTexture(t),u.copyTexSubImage2D(3553,0,0,0,o,0,n,r),e.bindTexture(null,t)}e.clear(256),i.highlightLevel=s,a()}),i.highlightLevel=null,i.highlightMixTexture=null,l?.release()}const P=4;export{D as Highlight,P as maxHighlightsPerChannel,N as renderHighlightBuffer,j as trackHighlightOptions};
2
+ import{__decorate as e}from"tslib";import"../../../../../core/has.js";import{releaseMaybe as t,disposeMaybe as n}from"../../../../../core/maybe.js";import{watch as r,initial as i}from"../../../../../core/reactiveUtils.js";import{property as a,subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{set as s}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{InternalRenderCategory as c}from"../../../webgl.js";import l from"../../../webgl/RenderNode.js";import{HighlightApplyTechnique as u}from"./HighlightApplyTechnique.js";import{H as d}from"../../../../../chunks/HighlightBlur.glsl.js";import{HighlightBlurTechnique as f}from"./HighlightBlurTechnique.js";import{H as p,g as m}from"../../../../../chunks/HighlightDownsample.glsl.js";import{HighlightDownsampleTechnique as h}from"./HighlightDownsampleTechnique.js";import{HighlightPassParameters as g}from"./HighlightPassParameters.js";import{m as _}from"../../../../../chunks/HighlightSharpApply.glsl.js";import{HighlightSharpApplyTechnique as v}from"./HighlightSharpApplyTechnique.js";import{HighlightToSingleTechnique as y}from"./HighlightToSingleTechnique.js";import{Compositor as b}from"../../lib/Compositor.js";import{NoVertex as x}from"../../lib/DefaultVertexBufferLayouts.js";import{VertexArrayObject as S}from"../../lib/VertexArrayObject.js";import{BufferObject as C}from"../../../../webgl/BufferObject.js";import{ColorAttachment0 as w,PrimitiveType as T,DataType as E}from"../../../../webgl/enums.js";import D from"../../../../webgl/Texture.js";import{TextureDescriptor as O}from"../../../../webgl/TextureDescriptor.js";import{VertexBuffer as k}from"../../../../webgl/VertexBuffer.js";let A=class extends l{constructor(e){super(e),this.consumes={required:[c.HIGHLIGHT,`highlights`]},this.produces=c.HIGHLIGHT,this._renderSharpHighlights=(e,t,n)=>{let{techniques:r}=this,i=r.getCompiled(v);if(!i||!this._compositor.isPremultipliedAlphaReady(!1))return!1;let a=this._prepareAndDownSample(t),{fullWidth:o,fullHeight:s,pixelRatio:c,fullViewport:l}=this.bindParameters.camera,u=this.fboCache.acquire(o,s,`highlight overlay`,5);this._clearHighlightOverlay(u),this._passParameters.pixelRatio=Math.min(c,_);let{renderingContext:d,bindParameters:f,_passParameters:p}=this,m=this.view.stage.renderView.renderer;for(let e=0;e<n.length;++e){let{name:t}=n[e];m.hasHighlight(t)&&(p.highlightLevel=e,d.bindFramebuffer(u.fbo),d.setViewport4fv(f.camera.fullViewport),d.bindTechnique(i,f,p),this._renderGrid(a))}let h=this.antialias.isEnabled()?this.antialias.renderTo(u,`highlight antialiasing`,{coverageTexture:a.coverage.getTexture(),horizontalCellCount:a.horizontalCellCount,verticalCellCount:a.verticalCellCount,draw:()=>this._renderGrid(a)}):u;h!==u&&u.release();let{_compositor:g}=this;return d.bindFramebuffer(e.fbo),d.setDrawBuffers([w]),d.setViewport4fv(l),g.compositePreMultipliedAlpha(this.bindParameters,h.getTexture(),!1),h.release(),!0},this._renderGaussianHighlights=(e,t,n)=>{let{renderingContext:r,bindParameters:i,fboCache:a,_passParameters:o,techniques:c}=this,l=c.getCompiled(y),d=c.getCompiled(f),p=c.getCompiled(u);if(!l||!d||!p)return!1;let m=this._prepareAndDownSample(t),{width:h,height:g}=t.descriptor,{fullWidth:_,fullHeight:v,pixelRatio:b,fullViewport:x}=i.camera,S=Math.ceil(_/b),C=Math.ceil(v/b),{_highlightBlurDrawParameters:T}=this,E=this.view.stage.renderView.renderer;for(let t=0;t<n.length;++t){let{name:c}=n[t];if(!E.hasHighlight(c))continue;o.highlightLevel=t,r.setClearColor(0,0,0,0);let u=a.acquire(h,g,`single highlight`,2);r.bindFramebuffer(u.fbo),r.setViewport(0,0,h,g),r.clear(16384),r.bindTechnique(l,i,o),this._renderGrid(m),T.blurInput=u.getTexture(),s(T.blurSize,1/S,0);let f=a.acquire(S,C,`single highlight blur`,2);r.unbindTexture(f.fbo?.colorTexture),r.bindFramebuffer(f.fbo),r.setViewport(0,0,S,C),r.clear(16384),r.bindTechnique(d,i,o,T),this._renderGrid(m),u.release(),s(T.blurSize,0,1/C),o.highlightBlurTexture=f.getTexture(),r.bindFramebuffer(e.fbo),r.setDrawBuffers([w]),r.setViewport4fv(x),r.bindTechnique(p,i,o,T),this._renderGrid(m),f.release()}return!0},this._downsampleDrawParameters=new p,this._passParameters=new g,this._highlightBlurDrawParameters=new d,this._compositor=null,this._grid=new j}initialize(){this._compositor=new b(this.renderingContext,this.techniques),this.addHandles([r(()=>this._updateOptionsTexture(),()=>{},i)])}destroy(){this._grid.coverage=t(this._grid.coverage),this._grid.vao=n(this._grid.vao),this._passParameters.highlightOptionsTexture=t(this._passParameters.highlightOptionsTexture)}_updateOptionsTexture(){if(this._passParameters.highlightOptionsTexture==null){let e=new O(16,2);e.internalFormat=6408,e.samplingMode=9728,this._passParameters.highlightOptionsTexture=new D(this.renderingContext,e,null)}this._passParameters.highlightOptionsTexture.setData(M(this.view.state.highlights)),this.requestRender(1)}render(e){let t=e.find(({name:e})=>e===c.HIGHLIGHT),{techniques:n,bindParameters:r,_passParameters:i}=this;if(!r.decorations)return t;if(!n.getCompiled(h))return this.requestRender(1),t;let a=this.view.stage.renderer.isFeatureEnabled(13),o=e.find(({name:e})=>e===`highlights`).getTexture(),s=a?this._renderSharpHighlights:this._renderGaussianHighlights,l=a?this._renderGaussianHighlights:this._renderSharpHighlights;return!s(t,o,r.highlights)&&(this.requestRender(1),!l(t,o,r.highlights))||(i.coverageTexture=null,i.highlightTexture=null),t}_clearHighlightOverlay(e){let{renderingContext:t}=this;t.bindFramebuffer(e.fbo),t.setViewport4fv(this.bindParameters.camera.fullViewport),t.setClearColor(0,0,0,0),t.clear(16384)}_prepareAndDownSample(e){this._passParameters.highlightTexture=e,this._gridUpdateResources(e);let t=this.techniques.get(h),n=this._gridComputeCoverage(t,e),{horizontalCellCount:r,verticalCellCount:i}=n,a=this._passParameters;return a.horizontalCellCount=r,a.verticalCellCount=i,a.coverageTexture=n.coverage?.getTexture(),n}_renderGrid(e){let t=e.verticalCellCount*e.horizontalCellCount;this.renderingContext.bindVAO(e.vao),this.renderingContext.drawElementsInstanced(T.TRIANGLES,6,E.UNSIGNED_BYTE,0,t)}_gridUpdateResources(e){let t=this._grid,{width:n,height:r}=e.descriptor;if(t.horizontalCellCount=Math.ceil(n/m),t.verticalCellCount=Math.ceil(r/m),t.vao)return;let i=this.renderingContext,a=C.createIndex(i,35044,F);t.vao=new S(i,new k(i,x),a)}_gridComputeCoverage(e,t){let n=this.renderingContext,r=this._grid,i=t.descriptor,a=Math.ceil(i.width/m),o=Math.ceil(i.height/m);this._downsampleDrawParameters.input=t;let{highlights:s}=this.bindParameters;r.coverage?.release();let c=this.fboCache.acquire(a,o,`highlight coverage`,s.length>L?3:1);return r.coverage=c,n.bindFramebuffer(c.fbo),n.bindTechnique(e,this.bindParameters,this._passParameters,this._downsampleDrawParameters),n.setViewport(0,0,a,o),n.screen.draw(),r}get test(){}};e([a()],A.prototype,`consumes`,void 0),e([a()],A.prototype,`produces`,void 0),e([a({constructOnly:!0})],A.prototype,`antialias`,void 0),A=e([o(`esri.views.3d.webgl-engine.effects.highlight.Highlight`)],A);class j{constructor(){this.coverage=null,this.vao=null,this.verticalCellCount=0,this.horizontalCellCount=0,this.viewportWidth=0,this.viewportHeight=0}}function M(e){let t=new Uint8Array(128),n=0;for(let r of e){let e=n*4,i=n*4+64;++n;let{color:a}=r,o=r.haloColor??a;t[e+0]=a.r,t[e+1]=a.g,t[e+2]=a.b,t[e+3]=r.fillOpacity*a.a*255,t[i+0]=o.r,t[i+1]=o.g,t[i+2]=o.b,t[i+3]=r.haloOpacity*o.a*255}return t}let N=0;function P(e){let t=0;for(let n of e){let{name:e}=n;t+=e.length;let{color:r,fillOpacity:i,haloColor:a,haloOpacity:o}=n;t+=r.r+r.g+r.b+r.a+i,t+=a?a.r+a.g+a.b+a.a+o:0}let n=e.at(0);if(n){let{shadowOpacity:e,shadowDifference:r,shadowColor:i}=n;t+=e+r+i.r+i.g+i.b+i.a}return N+++(t>=0?0:1)}const F=new Uint8Array([0,1,2,2,1,3]);function I(e,t,n,r,i,a,o=0){let{highlights:c}=i,l=c.length>1?t.acquire(n,r,`highlight mix`,c.length>L?3:1):null,{gl:u}=e;if(l){let t=e.boundFramebuffer;e.bindFramebuffer(l.fbo),u.clearBufferuiv(u.COLOR,0,[0,0,0,0]),e.bindFramebuffer(t)}let d=l?.getTexture();i.highlightMixTexture=d,s(i.highlightMixOrigin,o,0),c.forEach((t,s)=>{if(s>0){let t=D.TEXTURE_UNIT_FOR_UPDATES;e.bindTexture(d,t),e.setActiveTexture(t),u.copyTexSubImage2D(3553,0,0,0,o,0,n,r),e.bindTexture(null,t)}e.clear(256),i.highlightLevel=s,a()}),i.highlightLevel=null,i.highlightMixTexture=null,l?.release()}const L=4;export{A as Highlight,L as maxHighlightsPerChannel,I as renderHighlightBuffer,P as trackHighlightOptions};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import"../../core/shaderLibrary/HighlightCellGridScreenSpacePass.glsl.js";import"../../core/shaderLibrary/HighlightReadBitmap.glsl.js";import"../../core/shaderModules/Float2DrawUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/IntegerPassUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../core/shaderModules/Texture2DUintPassUniform.js";import"../../../../../chunks/HighlightDownsample.glsl.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/HighlightApply.glsl.js";
2
+ import"../../core/shaderLibrary/HighlightCellGridScreenSpacePass.glsl.js";import"../../core/shaderLibrary/HighlightReadBitmap.glsl.js";import"../../core/shaderModules/Float2DrawUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/IntegerPassUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../core/shaderModules/Texture2DUintPassUniform.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/HighlightApply.glsl.js";
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{NoParameters as e}from"../../../../webgl/NoParameters.js";class t extends e{constructor(){super(...arguments),this.horizontalCellCount=0,this.verticalCellCount=0,this.highlightLevel=0}}export{t as HighlightCellGridScreenSpacePassParameters};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DUintPassUniform.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{H as HighlightDownsampleDrawParameters,b as blurSize,c as build,g as gridCellPixelSize,o as outlineSize}from"../../../../../chunks/HighlightDownsample.glsl.js";
2
+ import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DUintPassUniform.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{H as HighlightDownsampleDrawParameters,b as build,g as gridCellPixelSize}from"../../../../../chunks/HighlightDownsample.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{defaultOccludedFactor as e}from"../../../../support/HighlightDefaults.js";import{NoParameters as t}from"../../../../webgl/NoParameters.js";class n extends t{constructor(){super(...arguments),this.occludedFactor=e,this.verticalCellCount=0,this.horizontalCellCount=0,this.highlightLevel=0,this.pixelRatio=1}}export{n as HighlightPassParameters};
2
+ import{HighlightCellGridScreenSpacePassParameters as e}from"./HighlightCellGridScreenSpacePassParameters.js";import{defaultOccludedFactor as t,defaultOccludedOutlineFactor as n}from"../../../../support/HighlightDefaults.js";class r extends e{constructor(){super(...arguments),this.occludedFactor=t,this.occludedOutlineFactor=n,this.pixelRatio=1}}export{r as HighlightPassParameters};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import"../../core/shaderLibrary/HighlightCellGridScreenSpacePass.glsl.js";import"../../core/shaderLibrary/HighlightReadBitmap.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/IntegerPassUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../core/shaderModules/Texture2DUintPassUniform.js";import"../../../../webgl/ShaderBuilder.js";export{b as build,m as maximumPixelRatio}from"../../../../../chunks/HighlightSharpApply.glsl.js";
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as n}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as r}from"../../core/shaderTechnique/ShaderTechnique.js";import{H as i}from"../../../../../chunks/HighlightSharpApply.glsl.js";import{NoVertex as a}from"../../lib/DefaultVertexBufferLayouts.js";import{makePipelineState as o,defaultColorWrite as s,unpremultipliedAlphaToPremultipliedAlpha as c}from"../../../../webgl/renderState.js";let l=class extends r{constructor(e,t){super(e,t,a),this.shader=new n(i,()=>import(`./HighlightSharpApply.glsl.js`))}initializePipeline(){return o({blending:c,colorWrite:s})}};l=e([t(`esri.views.3d.webgl-engine.effects.highlight.HighlightSharpApplyTechnique`)],l);export{l as HighlightSharpApplyTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/BlendWeights.glsl.js";
2
+ import"../../core/shaderLibrary/HighlightCellGridScreenSpacePass.glsl.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/BlendWeights.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/Blur.glsl.js";
2
+ import"../../core/shaderLibrary/HighlightCellGridScreenSpacePass.glsl.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/Blur.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/EdgeDetect.glsl.js";
2
+ import"../../core/shaderLibrary/HighlightCellGridScreenSpacePass.glsl.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/EdgeDetect.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../../core/Logger.js";import{abortMaybe as n,disposeMaybe as r}from"../../../../../core/maybe.js";import{throwIfAborted as i,isAbortError as a}from"../../../../../core/promiseUtils.js";import{watch as o,syncAndInitial as s}from"../../../../../core/reactiveUtils.js";import{property as c,subclass as l}from"../../../../../core/accessorSupport/decorators.js";import{requestImage as u}from"../../../../../request/image.js";import{InternalRenderCategory as d}from"../../../webgl.js";import f from"../../../webgl/RenderNode.js";import{SMAABlendWeightsTechnique as p}from"./SMAABlendWeightsTechnique.js";import{SMAABlurTechnique as m}from"./SMAABlurTechnique.js";import{SMAAEdgeDetectTechnique as h}from"./SMAAEdgeDetectTechnique.js";import{SMAAPassParameters as g}from"./SMAAPassParameters.js";import _ from"../../../../webgl/Texture.js";import{TextureDescriptor as v}from"../../../../webgl/TextureDescriptor.js";let y=class extends f{constructor(e){super(e),this.consumes={required:[d.ANTIALIASING]},this.produces=`disabled`,this._areaTexture=null,this._searchTexture=null,this._smaaParameters=new g}initialize(){this.addHandles([o(()=>this.isEnabled(),e=>e?this.view.addUpdatingPromise(this.enable()):this.disable(),s)])}async enable(){if(this.destroyed||(this.produces=d.ANTIALIASING,this.requestRender(1),this._abortController||this._areaTexture&&this._searchTexture))return;this._abortController=new AbortController;let e=this._abortController.signal;try{let t=await import(`./SMAAData.js`);i(e),await this._loadTextures(t,e),i(e),this.requestRender(1)}catch(e){a(e)||t.getLogger(this).errorOnce(e)}this._abortController=null}async _loadTextures(e,t){i(t);let[n,r]=await Promise.allSettled([u(e.areaTexture,{signal:t}),u(e.searchTexure,{signal:t})]);if(i(t),n.status!==`fulfilled`||r.status!==`fulfilled`)return;let a=this.renderingContext;this._areaTexture=b(a,9729,6407,n.value),this._searchTexture=b(a,9728,6409,r.value)}disable(){this.produces=`disabled`,this.requestRender(1)}destroy(){this._abortController=n(this._abortController),this._searchTexture=r(this._searchTexture),this._areaTexture=r(this._areaTexture)}render(){let e=this.input,t=this.techniques.getCompiled(h),n=this.techniques.getCompiled(p),r=this.techniques.getCompiled(m);if(!this._areaTexture||!this._searchTexture||!t||!n||!r)return this.requestRender(1),e;let{width:i,height:a}=e.fbo,o=this.renderingContext;o.setViewport(0,0,i,a);let s=this.fboCache.acquire(i,a,`smaa edges`,2);o.bindFramebuffer(s.fbo),o.setClearColor(0,0,0,1),o.clear(16384),this._smaaParameters.color=e.getTexture();let c=this.bindParameters;o.bindTechnique(t,c,this._smaaParameters),o.screen.draw();let l=this.fboCache.acquire(i,a,`smaa blend`);o.bindFramebuffer(l.fbo),o.setClearColor(0,0,1,1),o.clear(16384),this._smaaParameters.inputTexture=s.getTexture(),this._smaaParameters.areaTexture=this._areaTexture,this._smaaParameters.searchTexture=this._searchTexture,o.bindTechnique(n,c,this._smaaParameters),o.screen.draw(),s.release();let u=this.fboCache.acquire(i,a,d.ANTIALIASING);return o.bindFramebuffer(u.fbo),o.setClearColor(0,1,0,1),o.clear(16384),this._smaaParameters.inputTexture=l.getTexture(),o.bindTechnique(r,c,this._smaaParameters),o.screen.draw(),l.release(),u.moveAttachments(e),u}};e([c()],y.prototype,`consumes`,void 0),e([c()],y.prototype,`produces`,void 0),e([c({constructOnly:!0})],y.prototype,`isEnabled`,void 0),e([c()],y.prototype,`_abortController`,void 0),y=e([l(`esri.views.3d.webgl-engine.effects.smaa.SMAA`)],y);function b(e,t,n,r){let i=new v(r.width,r.height);return i.pixelFormat=n,i.wrapMode=33071,i.samplingMode=t,new _(e,i,r)}export{y as SMAA};
2
+ import{__decorate as e}from"tslib";import t from"../../../../../core/Logger.js";import{abortMaybe as n,disposeMaybe as r}from"../../../../../core/maybe.js";import{throwIfAborted as i,isAbortError as a}from"../../../../../core/promiseUtils.js";import{watch as o,syncAndInitial as s}from"../../../../../core/reactiveUtils.js";import{property as c,subclass as l}from"../../../../../core/accessorSupport/decorators.js";import{requestImage as u}from"../../../../../request/image.js";import{InternalRenderCategory as d}from"../../../webgl.js";import f from"../../../webgl/RenderNode.js";import{SMAABlendWeightsTechnique as p}from"./SMAABlendWeightsTechnique.js";import{SMAABlurTechnique as m}from"./SMAABlurTechnique.js";import{SMAAEdgeDetectTechnique as h}from"./SMAAEdgeDetectTechnique.js";import{SMAAPassParameters as g}from"./SMAAPassParameters.js";import{SMAATechniqueConfiguration as _}from"./SMAATechniqueConfiguration.js";import v from"../../../../webgl/Texture.js";import{TextureDescriptor as y}from"../../../../webgl/TextureDescriptor.js";let b=class extends f{constructor(e){super(e),this.consumes={required:[d.ANTIALIASING]},this.produces=`disabled`,this._areaTexture=null,this._searchTexture=null,this._configuration=new _,this._smaaParameters=new g}initialize(){this.addHandles([o(()=>this.isEnabled(),e=>e?this.view.addUpdatingPromise(this.enable()):this.disable(),s)])}async enable(){if(this.destroyed||(this.produces=d.ANTIALIASING,this.requestRender(1),this._abortController||this._areaTexture&&this._searchTexture))return;this._abortController=new AbortController;let e=this._abortController.signal;try{let t=await import(`./SMAAData.js`);i(e),await this._loadTextures(t,e),i(e),this.requestRender(1)}catch(e){a(e)||t.getLogger(this).errorOnce(e)}this._abortController=null}async _loadTextures(e,t){i(t);let[n,r]=await Promise.allSettled([u(e.areaTexture,{signal:t}),u(e.searchTexure,{signal:t})]);if(i(t),n.status!==`fulfilled`||r.status!==`fulfilled`)return;let a=this.renderingContext;this._areaTexture=x(a,9729,6407,n.value),this._searchTexture=x(a,9728,6409,r.value)}disable(){this.produces=`disabled`,this.requestRender(1)}destroy(){this._abortController=n(this._abortController),this._searchTexture=r(this._searchTexture),this._areaTexture=r(this._areaTexture)}render(){return this.renderTo(this.input,d.ANTIALIASING)}renderTo(e,t,n){this._configuration.useHighlightGrid=n!=null;let r=this.techniques.getCompiled(h,this._configuration),i=this.techniques.getCompiled(p,this._configuration),a=this.techniques.getCompiled(m,this._configuration);if(!this._areaTexture||!this._searchTexture||!r||!i||!a)return this.requestRender(1),e;let{width:o,height:s}=e.fbo,c=this.renderingContext,l=this._smaaParameters;l.highlightTexture=e.getTexture(),l.coverageTexture=n?.coverageTexture,l.horizontalCellCount=n?.horizontalCellCount??0,l.verticalCellCount=n?.verticalCellCount??0,c.setViewport(0,0,o,s);let u=this.fboCache.acquire(o,s,`smaa edges`,2);c.bindFramebuffer(u.fbo),c.setClearColor(0,0,0,1),c.clear(16384),l.color=e.getTexture();let d=this.bindParameters;c.bindTechnique(r,d,l),n?n.draw():c.screen.draw();let f=this.fboCache.acquire(o,s,`smaa blend`);c.bindFramebuffer(f.fbo),c.setClearColor(0,0,1,1),c.clear(16384),l.inputTexture=u.getTexture(),l.areaTexture=this._areaTexture,l.searchTexture=this._searchTexture,c.bindTechnique(i,d,l),n?n.draw():c.screen.draw(),u.release();let g=this.fboCache.acquire(o,s,t);return c.bindFramebuffer(g.fbo),c.setClearColor(0,+!n,0,+!n),c.clear(16384),l.inputTexture=f.getTexture(),c.bindTechnique(a,d,l),n?n.draw():c.screen.draw(),f.release(),g.moveAttachments(e),l.highlightTexture=null,l.coverageTexture=null,g}};e([c()],b.prototype,`consumes`,void 0),e([c()],b.prototype,`produces`,void 0),e([c({constructOnly:!0})],b.prototype,`isEnabled`,void 0),e([c()],b.prototype,`_abortController`,void 0),b=e([l(`esri.views.3d.webgl-engine.effects.smaa.SMAA`)],b);function x(e,t,n,r){let i=new y(r.width,r.height);return i.pixelFormat=n,i.wrapMode=33071,i.samplingMode=t,new v(e,i,r)}export{b as SMAA};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as n}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as r}from"../../core/shaderTechnique/ShaderTechnique.js";import{B as i}from"../../../../../chunks/BlendWeights.glsl.js";import{makePipelineState as a,defaultColorWrite as o}from"../../../../webgl/renderState.js";let s=class extends r{constructor(){super(...arguments),this.shader=new n(i,()=>import(`./BlendWeights.glsl.js`))}initializePipeline(){return a({colorWrite:o})}};s=e([t(`esri.views.3d.webgl-engine.effects.smaa.SMAABlendWeightsTechnique`)],s);export{s as SMAABlendWeightsTechnique};
2
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as n}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as r}from"../../core/shaderTechnique/ShaderTechnique.js";import{B as i}from"../../../../../chunks/BlendWeights.glsl.js";import{NoVertex as a}from"../../lib/DefaultVertexBufferLayouts.js";import{makePipelineState as o,defaultColorWrite as s}from"../../../../webgl/renderState.js";let c=class extends r{constructor(e,t){super(e,t,t.useHighlightGrid?a:void 0),this.shader=new n(i,()=>import(`./BlendWeights.glsl.js`))}initializePipeline(){return o({colorWrite:s})}};c=e([t(`esri.views.3d.webgl-engine.effects.smaa.SMAABlendWeightsTechnique`)],c);export{c as SMAABlendWeightsTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as n}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as r}from"../../core/shaderTechnique/ShaderTechnique.js";import{B as i}from"../../../../../chunks/Blur.glsl.js";import{makePipelineState as a,defaultColorWrite as o}from"../../../../webgl/renderState.js";let s=class extends r{constructor(){super(...arguments),this.shader=new n(i,()=>import(`./Blur.glsl.js`))}initializePipeline(){return a({colorWrite:o})}};s=e([t(`esri.views.3d.webgl-engine.effects.smaa.SMAABlurTechnique`)],s);export{s as SMAABlurTechnique};
2
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as n}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as r}from"../../core/shaderTechnique/ShaderTechnique.js";import{B as i}from"../../../../../chunks/Blur.glsl.js";import{NoVertex as a}from"../../lib/DefaultVertexBufferLayouts.js";import{makePipelineState as o,defaultColorWrite as s}from"../../../../webgl/renderState.js";let c=class extends r{constructor(e,t){super(e,t,t.useHighlightGrid?a:void 0),this.shader=new n(i,()=>import(`./Blur.glsl.js`))}initializePipeline(){return o({colorWrite:s})}};c=e([t(`esri.views.3d.webgl-engine.effects.smaa.SMAABlurTechnique`)],c);export{c as SMAABlurTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as n}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as r}from"../../core/shaderTechnique/ShaderTechnique.js";import{E as i}from"../../../../../chunks/EdgeDetect.glsl.js";import{makePipelineState as a,defaultColorWrite as o}from"../../../../webgl/renderState.js";let s=class extends r{constructor(){super(...arguments),this.shader=new n(i,()=>import(`./EdgeDetect.glsl.js`))}initializePipeline(){return a({colorWrite:o})}};s=e([t(`esri.views.3d.webgl-engine.effects.smaa.SMAAEdgeDetectTechnique`)],s);export{s as SMAAEdgeDetectTechnique};
2
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as n}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as r}from"../../core/shaderTechnique/ShaderTechnique.js";import{E as i}from"../../../../../chunks/EdgeDetect.glsl.js";import{NoVertex as a}from"../../lib/DefaultVertexBufferLayouts.js";import{makePipelineState as o,defaultColorWrite as s}from"../../../../webgl/renderState.js";let c=class extends r{constructor(e,t){super(e,t,t.useHighlightGrid?a:void 0),this.shader=new n(i,()=>import(`./EdgeDetect.glsl.js`))}initializePipeline(){return o({colorWrite:s})}};c=e([t(`esri.views.3d.webgl-engine.effects.smaa.SMAAEdgeDetectTechnique`)],c);export{c as SMAAEdgeDetectTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{NoParameters as e}from"../../../../webgl/NoParameters.js";class t extends e{}export{t as SMAAPassParameters};
2
+ import{HighlightCellGridScreenSpacePassParameters as e}from"../highlight/HighlightCellGridScreenSpacePassParameters.js";class t extends e{}export{t as SMAAPassParameters};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import{parameter as t,ShaderTechniqueConfiguration as n}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class r extends n{constructor(){super(...arguments),this.useHighlightGrid=!1}}e([t()],r.prototype,`useHighlightGrid`,void 0);export{r as SMAATechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{C as e}from"../../../../chunks/Compositing.glsl.js";import{CompositingTechnique as t}from"../shaders/CompositingTechnique.js";import{CompositingTechniqueConfiguration as n}from"../shaders/CompositingTechniqueConfiguration.js";class r{constructor(t,r){this._rctx=t,this._techniques=r,this._configuration=new n,this._passParameters=new e}precompile(e,n,{hasOpaqueEmission:r,hasTransparentEmission:i}){e&&(this._configuration.blendEmissive=r||i,this._configuration.mode=2,this._techniques.precompile(t,this._configuration)),this._configuration.blendEmissive=r,n&&(this._configuration.mode=1,this._techniques.precompile(t,this._configuration)),this._configuration.mode=3,this._techniques.getCompiled(t,this._configuration)}compositePreMultipliedAlpha(e,t,n=e.hasEmission){this._composite(e,t,2,n)}composite(e,t){this._composite(e,t,1,e.hasEmission)}blitDepthToLinearDepth(e,t){this._composite(e,t,3)}_composite(e,n,r,i=!1){this._configuration.mode=r,this._configuration.blendEmissive=i,this._passParameters.texture=n;let a=this._techniques.get(t,this._configuration);this._rctx.bindTechnique(a,e,this._passParameters),this._rctx.screen.draw()}}export{r as Compositor};
2
+ import{C as e}from"../../../../chunks/Compositing.glsl.js";import{CompositingTechnique as t}from"../shaders/CompositingTechnique.js";import{CompositingTechniqueConfiguration as n}from"../shaders/CompositingTechniqueConfiguration.js";class r{constructor(t,r){this._rctx=t,this._techniques=r,this._configuration=new n,this._passParameters=new e}precompile(e,n,{hasOpaqueEmission:r,hasTransparentEmission:i}){e&&(this._configuration.blendEmissive=r||i,this._configuration.mode=2,this._techniques.precompile(t,this._configuration)),this._configuration.blendEmissive=r,n&&(this._configuration.mode=1,this._techniques.precompile(t,this._configuration)),this._configuration.mode=3,this._techniques.getCompiled(t,this._configuration)}isPremultipliedAlphaReady(e){return this._configuration.mode=2,this._configuration.blendEmissive=e,this._techniques.getCompiled(t,this._configuration)!=null}compositePreMultipliedAlpha(e,t,n=e.hasEmission){this._composite(e,t,2,n)}composite(e,t){this._composite(e,t,1,e.hasEmission)}blitDepthToLinearDepth(e,t){this._composite(e,t,3)}_composite(e,n,r,i=!1){this._configuration.mode=r,this._configuration.blendEmissive=i,this._passParameters.texture=n;let a=this._techniques.get(t,this._configuration);this._rctx.bindTechnique(a,e,this._passParameters),this._rctx.screen.draw()}}export{r as Compositor};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{floatSubArray as e}from"../../../../geometry/support/FloatArray.js";import{newHalfFloatArray as t}from"../../../../geometry/support/HalfFloatArray.js";import{newIndexArray as n,compactIndices as r}from"../../../../geometry/support/Indices.js";import{newShortArray as i}from"../../../../geometry/support/ShortArray.js";import{pathNumProfilesPerJoin as a}from"../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";import{compressNormal as o,encodeInt16 as s}from"./Normals.js";import{PathEvaluator as c}from"./PathEvaluator.js";import{encodePathVertexInfo as l}from"./PathVertexInfo.js";class u{constructor(r,o,s,l,u){this.path=r,this.profile=o,this.extruder=s,this.cap=l,this._extrusionVertexCount=0,this._extrusionFrameCount=0;let d=this.path.vertices.length-2;this.numExtrusionProfiles=a*d+2,this.numVerticesTotal=o.vertices.length*this.numExtrusionProfiles,this.numExtrusionFrames=this.path.vertices.length;let f=this.cap.numVertices;this.startCapVertexBufferStart=this.numVerticesTotal,this.numVerticesTotal+=f,this.endCapVertexBufferStart=this.numVerticesTotal,this.numVerticesTotal+=f,this.profileRightAxes=i(this.numExtrusionFrames*2),this.profileUpAxes=i(this.numExtrusionFrames*2);let p=u===1;this.profileRotationFrameUpAxes=p?i(this.numExtrusionFrames*2):null,this.pathMaxStretchDistances=t(this.numExtrusionFrames),this.profileRotations=i(this.numExtrusionFrames),this.framePositionIndices=n(this.numExtrusionFrames),this.pathVertexInfos=new Uint32Array(this.numVerticesTotal),this.positions=e(r.positions,r.offset,r.vertices.length*3),this._rebuildGeometry(),this._buildTopology(),this.evaluator=new c(this,o,s,l.type,u)}emitVertexDescriptor(e){let t=this._extrusionVertexCount;this.pathVertexInfos[t]=l(e),++this._extrusionVertexCount}emitExtrusionFrame(e,t){let{frame:n,rotationFrameUp:r,rotationAngle:i,maxStretchDistance:a}=e,c=this._extrusionFrameCount;return o(this.profileRightAxes,c,n.right[0],n.right[1],n.right[2]),o(this.profileUpAxes,c,n.up[0],n.up[1],n.up[2]),this.profileRotations[c]=s(i/Math.PI),this.profileRotationFrameUpAxes&&o(this.profileRotationFrameUpAxes,c,r[0],r[1],r[2]),this.pathMaxStretchDistances[c]=a,this.framePositionIndices[c]=t,this._extrusionFrameCount++}_rebuildGeometry(){this._extrusionVertexCount=0,this._extrusionFrameCount=0;let{vertices:e}=this.path,{profile:t}=this;this._updatePositions();for(let t=0;t<e.length;++t)this.emitExtrusionFrame(e[t],t);for(let e=0;e<t.vertices.length;++e)this.emitVertexDescriptor({frameIndex:0,sourceIndex:e,subdivision:0,type:1,capSide:0});let n=(e,t,n)=>{this.emitVertexDescriptor({frameIndex:e,sourceIndex:t,subdivision:n,type:0,capSide:0})};for(let t=1;t<e.length-1;++t)this.extruder.extrude(t,this.profile,n);let r=e.length-1;for(let e=0;e<t.vertices.length;++e)this.emitVertexDescriptor({frameIndex:r,sourceIndex:e,subdivision:0,type:1,capSide:1});this.cap.rebuildCapGeometry((e,t,n)=>this.emitVertexDescriptor({frameIndex:0,sourceIndex:e,subdivision:t,type:n,capSide:0})),this.cap.rebuildCapGeometry((e,t,n)=>this.emitVertexDescriptor({frameIndex:r,sourceIndex:e,subdivision:t,type:n,capSide:1}))}_updatePositions(){let{positions:e,offset:t,vertices:n}=this.path;if(!Array.isArray(e))return;let r=n.length*3,i=this.positions;for(let n=0;n<r;++n)i[n]=e[t+n]}_buildTopology(){let e=this.profile.vertices.length,t=this.profile.numSegments,n=this.numExtrusionProfiles-1,i=e*(this.numExtrusionProfiles-1),a=[],o=(e,t,n)=>{a.push(e),a.push(t),a.push(n)};for(let r=0;r<t;++r){let t=this.profile.indices[r*2],i=this.profile.indices[r*2+1];for(let r=0;r<n;++r){let n=r*e+t,a=(r+1)*e+t,s=(r+1)*e+i,c=r*e+i;o(n,a,s),o(n,s,c)}}this.cap.buildTopology(o,0,this.startCapVertexBufferStart,0),this.cap.buildTopology(o,1,this.endCapVertexBufferStart,i),this.vertexIndices=r(a)}onPathChanged(){this._rebuildGeometry()}}export{u as PathBuilder};
2
+ import{floatSubArray as e}from"../../../../geometry/support/FloatArray.js";import{newHalfFloatArray as t}from"../../../../geometry/support/HalfFloatArray.js";import{newIndexArray as n}from"../../../../geometry/support/Indices.js";import{newShortArray as r}from"../../../../geometry/support/ShortArray.js";import{pathNumProfilesPerJoin as i,pathNumJoinSubdivisions as a}from"../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";import{compressNormal as o,encodeInt16 as s}from"./Normals.js";import{PathEvaluator as c}from"./PathEvaluator.js";import{encodePathVertexInfo as l}from"./PathVertexInfo.js";class u{constructor(o,s,l,u,d){this.path=o,this.profile=s,this.extruder=l,this.cap=u,this._extrusionVertexCount=0,this._extrusionFrameCount=0;let f=this.path.vertices.length-2;this.numExtrusionProfiles=i*f+2,this.numVerticesTotal=s.vertices.length*this.numExtrusionProfiles,this.numExtrusionFrames=this.path.vertices.length;let p=this.cap.numVertices;this.startCapGeometryVertexOffset=this.numVerticesTotal,this.numVerticesTotal+=p,this.endCapGeometryVertexOffset=this.numVerticesTotal,this.numVerticesTotal+=p,this.profileRightAxes=r(this.numExtrusionFrames*2),this.profileUpAxes=r(this.numExtrusionFrames*2);let m=d===1;this.profileRotationFrameUpAxes=m?r(this.numExtrusionFrames*2):null,this.pathMaxStretchDistances=t(this.numExtrusionFrames),this.profileRotations=r(this.numExtrusionFrames),this.framePositionIndices=n(this.numExtrusionFrames),this.pathVertexInfos=new Uint32Array(this.numVerticesTotal),this.positions=e(o.positions,o.offset,o.vertices.length*3);let h=l.join===2;this._numJoinTriangles=s.joinTriangleBudgets[d][l.join];let g=2*s.numSegments*(h?a:1);this._compressed=this._numJoinTriangles<g;let _=2*s.numSegments*(f+1)+this._numJoinTriangles*f;this.vertexIndices=n(_*3+2*this.cap.numIndices,this.numVerticesTotal),this._rebuildGeometry(),this._buildTopology(),this.evaluator=new c(this,s,l,u.type,d)}emitVertexDescriptor(e){let t=this._extrusionVertexCount;this.pathVertexInfos[t]=l(e),++this._extrusionVertexCount}emitExtrusionFrame(e,t){let{frame:n,rotationFrameUp:r,rotationAngle:i,maxStretchDistance:a}=e,c=this._extrusionFrameCount;return o(this.profileRightAxes,c,n.right[0],n.right[1],n.right[2]),o(this.profileUpAxes,c,n.up[0],n.up[1],n.up[2]),this.profileRotations[c]=s(i/Math.PI),this.profileRotationFrameUpAxes&&o(this.profileRotationFrameUpAxes,c,r[0],r[1],r[2]),this.pathMaxStretchDistances[c]=a,this.framePositionIndices[c]=t,this._extrusionFrameCount++}_rebuildGeometry(){this._extrusionVertexCount=0,this._extrusionFrameCount=0;let{vertices:e}=this.path,{profile:t}=this;this._updatePositions();for(let t=0;t<e.length;++t)this.emitExtrusionFrame(e[t],t);for(let e=0;e<t.vertices.length;++e)this.emitVertexDescriptor({frameIndex:0,sourceIndex:e,subdivision:0,type:1,capSide:0});let n=(e,t,n)=>{this.emitVertexDescriptor({frameIndex:e,sourceIndex:t,subdivision:n,type:0,capSide:0})};for(let t=1;t<e.length-1;++t)this.extruder.extrude(t,this.profile,n);let r=e.length-1;for(let e=0;e<t.vertices.length;++e)this.emitVertexDescriptor({frameIndex:r,sourceIndex:e,subdivision:0,type:1,capSide:1});this.cap.rebuildCapGeometry((e,t,n)=>this.emitVertexDescriptor({frameIndex:0,sourceIndex:e,subdivision:t,type:n,capSide:0})),this.cap.rebuildCapGeometry((e,t,n)=>this.emitVertexDescriptor({frameIndex:r,sourceIndex:e,subdivision:t,type:n,capSide:1}))}_updatePositions(){let{positions:e,offset:t,vertices:n}=this.path;if(!Array.isArray(e))return;let r=n.length*3,i=this.positions;for(let n=0;n<r;++n)i[n]=e[t+n]}_buildTopology(){let e=this.profile.vertices.length*(this.numExtrusionProfiles-1),{vertexIndices:t}=this,n=0,r=(e,r,i)=>{t[n++]=e,t[n++]=r,t[n++]=i};this.extruder.buildTopology(this.path,this.profile,0,this.profileRotationFrameUpAxes!=null,this._compressed,this._numJoinTriangles,(e,t)=>{for(let n=0;n<this.profile.numSegments;++n){let i=this.profile.indices[n*2],a=this.profile.indices[n*2+1];r(e+i,t+i,t+a),r(e+i,t+a,e+a)}},r),this.cap.buildTopology(r,0,this.startCapGeometryVertexOffset,0),this.cap.buildTopology(r,1,this.endCapGeometryVertexOffset,e)}onPathChanged(){this._rebuildGeometry(),this._buildTopology()}}export{u as PathBuilder};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{pathNumRoundCapExtrusionSubdivisions as e}from"../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";class t{constructor(){this.numVertices=0,this.numIndices=0,this.type=0}rebuildCapGeometry(){}buildTopology(){}}class n{constructor(e,t){this._profile=e,this.type=t}get numVertices(){return this._profile.vertices.length}get numIndices(){return this._profile.numSegments*3}rebuildCapGeometry(e){let t=this._profile;for(let n=0;n<t.vertices.length;++n)e(n,0,2)}buildTopology(e,t,n){let r=this._profile,i=n+r.indices[0],a=t===1;for(let t=1;t<r.numSegments;++t){let o=r.indices[t*2],s=r.indices[t*2+1],c=n+o,l=n+s;a?e(l,c,i):e(i,c,l)}}}class r{constructor(e,t){this._profile=e,this._breakNormals=t,this.type=3}get numVertices(){let t=this._profile.vertices.length*(e-1)+this._profile.poles.length;return this._breakNormals&&(t+=this._profile.vertices.length),t}get numIndices(){let t=0,n=this._profile;t+=n.numSegments*2*(e-1);for(let e=0;e<n.numSegments;++e){let r=n.indices[e*2],i=n.indices[e*2+1];n.poleIndices[r]===n.poleIndices[i]?t+=1:t+=2}return t*3}rebuildCapGeometry(t){let n=this._profile;for(let e=0;e<n.poles.length;++e)t(e,0,2);if(this._breakNormals)for(let e=0;e<n.vertices.length;++e)t(e,0,1);for(let r=0;r<e-1;++r)for(let e=0;e<n.vertices.length;++e)t(e,r,3)}buildTopology(t,n,r,i){let a=this._profile,o=this._breakNormals?r+a.poles.length:i,s=this._breakNormals?r+a.poles.length+a.vertices.length:r+a.poles.length,c=n===1;for(let n=0;n<a.numSegments;++n){let i=a.indices[n*2],l=a.indices[n*2+1],u=r+a.poleIndices[i],d=r+a.poleIndices[l],f=o+i,p=o+l;for(let n=0;n<e-1;++n){let e=s+n*a.vertices.length+i,r=s+n*a.vertices.length+l;c?(t(e,p,f),t(p,e,r)):(t(f,p,e),t(r,e,p)),f=e,p=r}c?(t(u,p,f),u!==d&&t(u,d,p)):(t(f,p,u),u!==d&&t(p,d,u))}}}export{t as NoCapBuilder,r as RoundCapBuilder,n as TriangulationCapBuilder};
2
+ import{pathNumRoundCapExtrusionSubdivisions as e}from"../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";class t{constructor(){this.numVertices=0,this.numIndices=0,this.type=0}rebuildCapGeometry(){}buildTopology(){}}class n{constructor(e,t){this._profile=e,this.type=t}get numVertices(){return this._profile.vertices.length}get numIndices(){return(this._profile.numSegments-1)*3}rebuildCapGeometry(e){let t=this._profile;for(let n=0;n<t.vertices.length;++n)e(n,0,2)}buildTopology(e,t,n){let r=this._profile,i=n+r.indices[0],a=t===1;for(let t=1;t<r.numSegments;++t){let o=r.indices[t*2],s=r.indices[t*2+1],c=n+o,l=n+s;a?e(l,c,i):e(i,c,l)}}}class r{constructor(e,t){this._profile=e,this._breakNormals=t,this.type=3}get numVertices(){let t=this._profile.vertices.length*(e-1)+this._profile.poles.length;return this._breakNormals&&(t+=this._profile.vertices.length),t}get numIndices(){let t=0,n=this._profile;t+=n.numSegments*2*(e-1);for(let e=0;e<n.numSegments;++e){let r=n.indices[e*2],i=n.indices[e*2+1];n.poleIndices[r]===n.poleIndices[i]?t+=1:t+=2}return t*3}rebuildCapGeometry(t){let n=this._profile;for(let e=0;e<n.poles.length;++e)t(e,0,2);if(this._breakNormals)for(let e=0;e<n.vertices.length;++e)t(e,0,1);for(let r=0;r<e-1;++r)for(let e=0;e<n.vertices.length;++e)t(e,r,3)}buildTopology(t,n,r,i){let a=this._profile,o=this._breakNormals?r+a.poles.length:i,s=this._breakNormals?r+a.poles.length+a.vertices.length:r+a.poles.length,c=n===1;for(let n=0;n<a.numSegments;++n){let i=a.indices[n*2],l=a.indices[n*2+1],u=r+a.poleIndices[i],d=r+a.poleIndices[l],f=o+i,p=o+l;for(let n=0;n<e-1;++n){let e=s+n*a.vertices.length+i,r=s+n*a.vertices.length+l;c?(t(e,p,f),t(p,e,r)):(t(f,p,e),t(r,e,p)),f=e,p=r}c?(t(u,p,f),u!==d&&t(u,d,p)):(t(f,p,u),u!==d&&t(p,d,u))}}}export{t as NoCapBuilder,r as RoundCapBuilder,n as TriangulationCapBuilder};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{reciprocalClamped as e}from"../../../../core/mathUtils.js";import{set as t}from"../../../../core/libs/gl-matrix-2/math/mat2.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat2f64.js";import{setAxisAngle as r}from"../../../../core/libs/gl-matrix-2/math/quat.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{multiply as a,copy as o,length as s,scale as c,set as l,dot as u,add as d,subtract as f,normalize as p,transformMat2 as m}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{UNIT_X as h,ZEROS as g,create as _}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{cross as v,set as y,transformQuat as b,dot as x,scale as S,add as C,normalize as w}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as T}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{pathNumJoinSubdivisions as E,pathNumRoundCapExtrusionSubdivisions as D}from"../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";import{decodeInt16 as O,decompressNormal as k}from"./Normals.js";import{PathFrame2D as A}from"./PathFrame2D.js";import{decodePathVertexInfo as j}from"./PathVertexInfo.js";class M{constructor(e,t,n,r,i){this.builder=e,this.profile=t,this.extruder=n,this.capType=r,this.upVectorAlignment=i}evaluateVertexPosition(e,t,n,r){let{framePositionIndices:i,positions:f}=this.builder,p=Y;this._evaluateExtrudedVertex(p,n);let m=U,h=0,g=p.frameIndex,_=p.frame.right,b=p.frame.up,x=i[g]*3,S=a(W,p.profileVertex,t);if(p.isCap)v(m,b,_),h=p.capPositionOffset*t[0];else{let e=G,n=K;o(e,p.rotationRight);let r=p.maxDistance;a(e,e,t);let i=s(e);i>0?c(e,e,1/i):l(e,0,0);let f=u(S,e);if(Math.abs(f)>r){l(n,-e[1],e[0]);let t=u(S,n);c(e,e,r*Math.sign(f)),c(n,n,t),d(S,e,n)}y(m,0,0,0)}let C=_[0]*S[0]+b[0]*S[1],w=_[1]*S[0]+b[1]*S[1],T=_[2]*S[0]+b[2]*S[1],E=r*3;e[E]=f[x]+C+m[0]*h,e[E+1]=f[x+1]+w+m[1]*h,e[E+2]=f[x+2]+T+m[2]*h}_evaluateExtrudedVertex(e,t){let{profileRotations:n,profileUpAxes:i,profileRightAxes:a,profileRotationFrameUpAxes:s,pathMaxStretchDistances:l,pathVertexInfos:m}=this.builder,{extruder:_,profile:v,upVectorAlignment:y}=this,{cutoffAngle:x,join:S}=_,C=N[y],w=this.upVectorAlignment===1,T=j(m[t]),A=T.frameIndex;e.frameIndex=A;let M=O(n[A])*Math.PI,I=l[A];switch(k(e.frame.right,a,A),k(e.frame.up,i,A),e.maxDistance=0,T.type){case 0:{e.isCap=!1;let t=v.vertices[T.sourceIndex],n=Math.abs(M)>=x,i=w?k(q,s,A):e.frame.up,a=s==null?h:F(B,e.frame,i),c=u(t,a)*M>=0;if(n&&c){o(e.profileVertex,t);let n=S===2?(-.5+T.subdivision/E)*M:(-.5+Math.floor(T.subdivision/2))*M;n!==0&&(r(J,i,n),w&&b(e.frame.up,e.frame.up,J),b(e.frame.right,e.frame.right,J))}else{let n=C(R,t,M,a);o(e.profileVertex,n)}o(e.rotationRight,c?g:a),e.maxDistance=c?0:I;break}case 1:{e.isCap=!0;let t=v.vertices[T.sourceIndex];switch(o(e.profileVertex,t),this.capType){case 0:case 1:case 3:e.capPositionOffset=0;break;case 2:e.capPositionOffset=P(T)?.5:-.5}break}case 2:{e.isCap=!0;let t=P(T)?1:-1;switch(this.capType){case 1:case 2:{let n=v.vertices[T.sourceIndex],r=this.capType===2?t*.5:0;o(e.profileVertex,n),e.capPositionOffset=r;break}case 3:{let n=t*.5,r=v.poles[T.sourceIndex],i=r.position;r.normal,o(e.profileVertex,i),e.capPositionOffset=n;break}}break}case 3:{e.isCap=!0;let t=(P(T)?1:-1)*.5,n=(1-(T.subdivision+1)/D)*Math.PI*.5,r=Math.sin(n),i=Math.cos(n),a=v.poleIndices[T.sourceIndex],s=v.poles[a],l=s.position,u=s.normal,m=v.vertices[T.sourceIndex];f(R,m,l),c(R,R,r),u?(d(R,R,l),o(e.profileVertex,R),e.capPositionOffset=t*i):(p(L,R),c(L,L,r),d(R,R,l),o(e.profileVertex,R),e.capPositionOffset=t*i);break}default:T.type}}}const N={0:(t,n,r)=>{if(Math.abs(r)<=0)return n;let i=e(Math.cos(.5*r));return l(t,(1+(i-1))*n[0],n[1])},1:(n,r,i,a)=>{if(Math.abs(i)===0)return r;let o=e(Math.cos(.5*i)),s=t(z,1+(o-1)*a[0]*a[0],(o-1)*a[0]*a[1],(o-1)*a[0]*a[1],1+(o-1)*a[1]*a[1]);return m(n,r,s)}};function P(e){return e.capSide===1}function F(e,t,n){let r=x(n,t.up),i=x(n,t.right);return S(V,t.up,-i),S(H,t.right,r),C(V,V,H),w(V,V),I(e,t,V),e}function I(e,t,n){l(e,x(n,t.right),x(n,t.up))}const L=_(),R=_(),z=n(),B=_(),V=T(),H=T(),U=T(),W=_(),G=_(),K=_(),q=T(),J=i(),Y={profileVertex:_(),rotationRight:_(),maxDistance:0,capPositionOffset:0,isCap:!1,frame:new A,frameIndex:0};export{M as PathEvaluator};
2
+ import{reciprocalClamped as e}from"../../../../core/mathUtils.js";import{set as t}from"../../../../core/libs/gl-matrix-2/math/mat2.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat2f64.js";import{setAxisAngle as r}from"../../../../core/libs/gl-matrix-2/math/quat.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{multiply as a,copy as o,length as s,scale as c,set as l,dot as u,add as d,subtract as f,normalize as p,transformMat2 as m}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{ZEROS as h,create as g}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{cross as _,set as v,transformQuat as y}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as b}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{pathNumJoinSubdivisions as x,pathNumRoundCapExtrusionSubdivisions as S}from"../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";import{decodeInt16 as C,decompressNormal as w}from"./Normals.js";import{PathFrame2D as T}from"./PathFrame2D.js";import{constructPathRotationRight as E,isOuterJoinVertex as D}from"./pathGeometryUtils.js";import{decodePathVertexInfo as O}from"./PathVertexInfo.js";class k{constructor(e,t,n,r,i){this.builder=e,this.profile=t,this.extruder=n,this.capType=r,this.upVectorAlignment=i}evaluateVertexPosition(e,t,n,r){let{framePositionIndices:i,positions:f}=this.builder,p=H;this._evaluateExtrudedVertex(p,n);let m=I,h=0,g=p.frameIndex,y=p.frame.right,b=p.frame.up,x=i[g]*3,S=a(L,p.profileVertex,t);if(p.isCap)_(m,b,y),h=p.capPositionOffset*t[0];else{let e=R,n=z;o(e,p.rotationRight);let r=p.maxDistance;a(e,e,t);let i=s(e);i>0?c(e,e,1/i):l(e,0,0);let f=u(S,e);if(Math.abs(f)>r){l(n,-e[1],e[0]);let t=u(S,n);c(e,e,r*Math.sign(f)),c(n,n,t),d(S,e,n)}v(m,0,0,0)}let C=y[0]*S[0]+b[0]*S[1],w=y[1]*S[0]+b[1]*S[1],T=y[2]*S[0]+b[2]*S[1],E=r*3;e[E]=f[x]+C+m[0]*h,e[E+1]=f[x+1]+w+m[1]*h,e[E+2]=f[x+2]+T+m[2]*h}_evaluateExtrudedVertex(e,t){let{profileRotations:n,profileUpAxes:i,profileRightAxes:a,profileRotationFrameUpAxes:s,pathMaxStretchDistances:l,pathVertexInfos:u}=this.builder,{extruder:m,profile:g,upVectorAlignment:_}=this,{cutoffAngle:v,join:b}=m,T=A[_],k=this.upVectorAlignment===1,P=O(u[t]),I=P.frameIndex;e.frameIndex=I;let L=C(n[I])*Math.PI,R=l[I];switch(w(e.frame.right,a,I),w(e.frame.up,i,I),e.maxDistance=0,P.type){case 0:{e.isCap=!1;let t=g.vertices[P.sourceIndex],n=Math.abs(L)>=v,i=k?w(B,s,I):e.frame.up,a=E(F,e.frame,i,k),c=D(t,a,L);if(n&&c){o(e.profileVertex,t);let n=b===2?(-.5+P.subdivision/x)*L:(-.5+Math.floor(P.subdivision/2))*L;n!==0&&(r(V,i,n),k&&y(e.frame.up,e.frame.up,V),y(e.frame.right,e.frame.right,V))}else{let n=T(N,t,L,a);o(e.profileVertex,n)}o(e.rotationRight,c?h:a),e.maxDistance=c?0:R;break}case 1:{e.isCap=!0;let t=g.vertices[P.sourceIndex];switch(o(e.profileVertex,t),this.capType){case 0:case 1:case 3:e.capPositionOffset=0;break;case 2:e.capPositionOffset=j(P)?.5:-.5}break}case 2:{e.isCap=!0;let t=j(P)?1:-1;switch(this.capType){case 1:case 2:{let n=g.vertices[P.sourceIndex],r=this.capType===2?t*.5:0;o(e.profileVertex,n),e.capPositionOffset=r;break}case 3:{let n=t*.5,r=g.poles[P.sourceIndex],i=r.position;r.normal,o(e.profileVertex,i),e.capPositionOffset=n;break}}break}case 3:{e.isCap=!0;let t=(j(P)?1:-1)*.5,n=(1-(P.subdivision+1)/S)*Math.PI*.5,r=Math.sin(n),i=Math.cos(n),a=g.poleIndices[P.sourceIndex],s=g.poles[a],l=s.position,u=s.normal,m=g.vertices[P.sourceIndex];f(N,m,l),c(N,N,r),u?(d(N,N,l),o(e.profileVertex,N),e.capPositionOffset=t*i):(p(M,N),c(M,M,r),d(N,N,l),o(e.profileVertex,N),e.capPositionOffset=t*i);break}default:P.type}}}const A={0:(t,n,r)=>{if(Math.abs(r)<=0)return n;let i=e(Math.cos(.5*r));return l(t,(1+(i-1))*n[0],n[1])},1:(n,r,i,a)=>{if(Math.abs(i)===0)return r;let o=e(Math.cos(.5*i)),s=t(P,1+(o-1)*a[0]*a[0],(o-1)*a[0]*a[1],(o-1)*a[0]*a[1],1+(o-1)*a[1]*a[1]);return m(n,r,s)}};function j(e){return e.capSide===1}const M=g(),N=g(),P=n(),F=g(),I=b(),L=g(),R=g(),z=g(),B=b(),V=i(),H={profileVertex:g(),rotationRight:g(),maxDistance:0,capPositionOffset:0,isCap:!1,frame:new T,frameIndex:0};export{k as PathEvaluator};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{pathNumProfilesPerJoin as e}from"../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";class t{constructor(e){this.join=e,this.cutoffAngle=this.join===0?.8*Math.PI:0}extrude(t,n,r){for(let i=0;i<e;++i)for(let e=0;e<n.vertices.length;++e)r(t,e,i)}}export{t as PathExtruder};
2
+ import{create as e}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{pathNumProfilesPerJoin as t,pathNumJoinSubdivisions as n}from"../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";import{constructPathRotationRight as r,needsJoinSubdivisions as i}from"./pathGeometryUtils.js";class a{constructor(e){this.join=e,this.cutoffAngle=this.join===0?.8*Math.PI:0}extrude(e,n,r){for(let i=0;i<t;++i)for(let t=0;t<n.vertices.length;++t)r(e,t,i)}buildTopology(e,t,n,r,i,a,o,s){i?this._buildCompressedTopology(e,t,n,r,a,o,s):this._buildFixedTopology(e,t,n,o)}_buildCompressedTopology(e,r,i,a,o,s,c){let l=r.vertices.length,u=this.join===2?n:1,d=Array(l).fill(!1),f=i;for(let i=1;i<e.vertices.length-1;++i){let p=l*(1+(i-1)*t);s(f,p),this._classifyJoinVertices(e.vertices[i],r,a,d);let m=o-r.indices.reduce((e,t)=>e+(d[t]?0:u),0);this._emitCompressedJoinTopology(r,p,d,c);for(let e=0;e<m;++e)c(p,p,p);f=p+n*l}let p=l*(1+(e.vertices.length-2)*t);s(f,p)}_buildFixedTopology(e,r,i,a){let o=r.vertices.length,s=this.join===2,c=+!s,l=s?n:2,u=i;for(let r=1;r<e.vertices.length-1;++r){let e=o*(1+(r-1)*t);a(u,e);for(let t=c;t<l;++t){let n=e+t*o;a(n,n+o)}u=e+n*o}let d=o*(1+(e.vertices.length-2)*t);a(u,d)}_classifyJoinVertices(e,t,n,a){let s=e.rotationAngle,c=r(o,e.frame,e.rotationFrameUp,n);for(let e=0;e<a.length;++e){let n=t.vertices[e];a[e]=!i(n,c,s)}}_emitCompressedJoinTopology(e,t,r,i){let a=e.vertices.length,o=this.join===2,s=+!o,c=o?n:2;for(let n=0;n<e.numSegments;++n){let o=e.indices[n*2],l=e.indices[n*2+1];if(!(r[o]&&r[l]))for(let e=s;e<c;++e){let n=t+e*a,s=n+a,c=n+o,u=s+o,d=s+l,f=n+l;r[o]||i(c,u,d),r[l]||i(c,d,f)}}}}const o=e();export{a as PathExtruder};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{estimateNumberArrayMemory as e}from"../../../../core/memoryEstimations.js";import{fromValues as t,clone as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{pathNumCircleProfileSubdivisions as r}from"../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";const i=r,a={0:{indexCount:i*2,poleCount:1,vertexCount:i},1:{indexCount:8,poleCount:4,vertexCount:8}};class o{constructor(e){this.type=e,this.vertices=[],this.normals=[],this.indices=[],this.poles=[],this.poleIndices=[]}addVertex(e,t){return this.vertices.push(n(e)),this.normals.push(n(t)),this.vertices.length-1}addPole(e,t=null){return this.poles.push({position:n(e),normal:t?n(t):null}),this.poles.length-1}addSegment(e,t=null){this.indices.push(e.v0),this.indices.push(e.v1),t&&(this.poleIndices.push(t.v0),this.poleIndices.push(t.v1))}get numSegments(){return this.indices.length/2}translate(e,t){for(let n of this.vertices)n[0]+=e,n[1]+=t;for(let n of this.poles)n.position[0]+=e,n.position[1]+=t}get usedMemory(){return this.vertices.length*e(this.vertices[0])*2+e(this.indices)}}const s={top:[0,-.5],bottom:[0,.5]};function c(e){let n=.5,i=r,a=new o(0),c={v0:0,v1:0};a.addPole(t(0,0));for(let e=0;e<i;++e){let r=e*2*Math.PI/i,o=Math.cos(r),s=Math.sin(r),c=t(o*n,s*n),l=t(o,s);a.addVertex(c,l)}for(let e=0;e<i-1;++e){let t={v0:e,v1:e+1};a.addSegment(t,c)}let l={v0:i-1,v1:0};if(a.addSegment(l,c),e!==`center`){let t=s[e];a.translate(t[0],t[1])}return a}const l={center:c(`center`),top:c(`top`),bottom:c(`bottom`)},u={center:d(`center`),top:d(`top`),bottom:d(`bottom`)};function d(e){let n=new o(1),r=t(-.5,-.5),i=t(.5,-.5),a=t(.5,.5),c=t(-.5,.5),l=t(0,-1),u=t(1,0),d=t(0,1),f=t(-1,0);if(n.addPole(t(0,.5),d),n.addPole(t(0,.5)),n.addPole(t(0,-.5)),n.addPole(t(0,-.5),l),n.addVertex(r,l),n.addVertex(i,l),n.addSegment({v0:0,v1:1},{v0:3,v1:3}),n.addVertex(i,u),n.addVertex(a,u),n.addSegment({v0:2,v1:3},{v0:2,v1:1}),n.addVertex(a,d),n.addVertex(c,d),n.addSegment({v0:4,v1:5},{v0:0,v1:0}),n.addVertex(c,f),n.addVertex(r,f),n.addSegment({v0:6,v1:7},{v0:1,v1:2}),e!==`center`){let t=s[e];n.translate(t[0],t[1])}return n}export{o as PathProfile,l as circleProfiles,a as pathProfileUniformLayout,u as quadProfiles};
2
+ import{cyclical2PI as e}from"../../../../core/Cyclical.js";import{estimateNumberArrayMemory as t}from"../../../../core/memoryEstimations.js";import{exactEquals as n}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as r,clone as i,UNIT_X as a,ZEROS as o}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{pathNumJoinSubdivisions as s,pathNumCircleProfileSubdivisions as c}from"../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";import{needsJoinSubdivisions as l,classificationTolerance as u}from"./pathGeometryUtils.js";const d=Math.acos(-2*u),f=c,p={0:{indexCount:f*2,poleCount:1,vertexCount:f},1:{indexCount:8,poleCount:4,vertexCount:8}};class m{constructor(e){this.type=e,this.vertices=[],this.normals=[],this.indices=[],this.poles=[],this.poleIndices=[],this.joinTriangleBudgets={0:{0:0,1:0,2:0},1:{0:0,1:0,2:0}}}addVertex(e,t){return this.vertices.push(i(e)),this.normals.push(i(t)),this.vertices.length-1}addPole(e,t=null){return this.poles.push({position:i(e),normal:t?i(t):null}),this.poles.length-1}addSegment(e,t=null){this.indices.push(e.v0),this.indices.push(e.v1),t&&(this.poleIndices.push(t.v0),this.poleIndices.push(t.v1))}get numSegments(){return this.indices.length/2}translate(e,t){for(let n of this.vertices)n[0]+=e,n[1]+=t;for(let n of this.poles)n.position[0]+=e,n.position[1]+=t}get usedMemory(){return this.vertices.length*t(this.vertices[0])*2+t(this.indices)}}const h={top:[0,-.5],bottom:[0,.5]};function g(e){let t=.5,n=c,i=new m(0),a={v0:0,v1:0};i.addPole(r(0,0));for(let e=0;e<n;++e){let a=e*2*Math.PI/n,o=Math.cos(a),s=Math.sin(a),c=r(o*t,s*t),l=r(o,s);i.addVertex(c,l)}for(let e=0;e<n-1;++e){let t={v0:e,v1:e+1};i.addSegment(t,a)}let o={v0:n-1,v1:0};if(i.addSegment(o,a),e!==`center`){let t=h[e];i.translate(t[0],t[1])}return b(i,2)}const _={center:g(`center`),top:g(`top`),bottom:g(`bottom`)},v={center:y(`center`),top:y(`top`),bottom:y(`bottom`)};function y(e){let t=new m(1),n=r(-.5,-.5),i=r(.5,-.5),a=r(.5,.5),o=r(-.5,.5),s=r(0,-1),c=r(1,0),l=r(0,1),u=r(-1,0);if(t.addPole(r(0,.5),l),t.addPole(r(0,.5)),t.addPole(r(0,-.5)),t.addPole(r(0,-.5),s),t.addVertex(n,s),t.addVertex(i,s),t.addSegment({v0:0,v1:1},{v0:3,v1:3}),t.addVertex(i,c),t.addVertex(a,c),t.addSegment({v0:2,v1:3},{v0:2,v1:1}),t.addVertex(a,l),t.addVertex(o,l),t.addSegment({v0:4,v1:5},{v0:0,v1:0}),t.addVertex(o,u),t.addVertex(n,u),t.addSegment({v0:6,v1:7},{v0:1,v1:2}),e!==`center`){let n=h[e];t.translate(n[0],n[1])}return b(t,1)}function b(e,t){let n=x(e,t),r=S(e,t);return e.joinTriangleBudgets={0:{0:n,1:n,2:s*n},1:{0:r,1:r,2:s*r}},e}function x(e,t){let n=0,r=0;for(let i=0;i<e.vertices.length;++i){let o=e.vertices[i];n+=l(o,a,1)?t:0,r+=l(o,a,-1)?t:0}return Math.max(n,r)}function S(t,r){let i=[],a=0;for(let s=0;s<t.vertices.length;++s){let c=t.vertices[s];if(n(c,o))continue;let l=Math.atan2(c[1],c[0]),u=e.normalize(l-d,0,!0),f=e.normalize(l+d,0,!0);i.push({angle:u,diff:r},{angle:f,diff:-r}),u>f&&(a+=r)}i.sort((e,t)=>e.angle-t.angle||t.diff-e.diff);let s=a;for(let e of i)a+=e.diff,s=Math.max(s,a);return s}export{m as PathProfile,_ as circleProfiles,p as pathProfileUniformLayout,v as quadProfiles};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import has from"../../../../core/has.js";import{NestedMap as e}from"../../../../core/NestedMap.js";function t(t){let i=new e;if(i.set(2,4,!0),i.set(2,0,!0),i.set(2,2,!0),i.set(2,1,!0),i.set(2,8,!0),i.set(2,12,!0),t===`high`){let e=has(`disable-feature:global-illumination`)?3:11;i.set(0,e,!0),i.set(1,e,!0),i.set(2,e,!0),e===11&&i.set(2,10,!0)}else i.set(2,3,!0);if(t!==`low`&&(i.set(2,5,!0),i.set(2,6,!0)),t===`medium`)for(let e of n)i.set(0,e,!0),i.set(1,e,!0),i.set(2,e,!0);else if(t===`high`)for(let e of r)i.set(0,e,!0),i.set(1,e,!0),i.set(2,e,!0);return i}const n=[9,7],r=[...n,0,2,4];export{t as setupFeatureDefaults};
2
+ import has from"../../../../core/has.js";import{NestedMap as e}from"../../../../core/NestedMap.js";function t(t){let i=new e;if(i.set(2,4,!0),i.set(2,0,!0),i.set(2,2,!0),i.set(2,1,!0),i.set(2,8,!0),i.set(2,12,!0),i.set(2,13,!0),t===`high`){let e=has(`disable-feature:global-illumination`)?3:11;i.set(0,e,!0),i.set(1,e,!0),i.set(2,e,!0),e===11&&i.set(2,10,!0)}else i.set(2,3,!0);if(t!==`low`&&(i.set(2,5,!0),i.set(2,6,!0)),t===`medium`)for(let e of n)i.set(0,e,!0),i.set(1,e,!0),i.set(2,e,!0);else if(t===`high`)for(let e of r)i.set(0,e,!0),i.set(1,e,!0),i.set(2,e,!0);return i}const n=[9,7],r=[...n,0,2,4];export{t as setupFeatureDefaults};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{copy as e,set as t,add as n,length as r,normalize as i,cross as a}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as s,fromPositionAndNormal as c,intersectRay as l}from"../../../../geometry/support/plane.js";import{wrap as u}from"../../../../geometry/support/ray.js";import{makeOrthoBasisDirUpFallback as d}from"./GeometryUtil.js";function f(f,m){let h=null,g=f.vertices.length,_=.99619469809,v=o(),y=o(),b=o(),x=o(),S=o(),C=o(),w=s(),T=f.vertices[0];e(y,m),t(v,0,1,0),d(T.vRight,y,v,v,b,y,_),e(T.frame.up,y),e(T.frame.right,b);let E=f.positions,D=f.offset;h=T;for(let o=1;o<g;++o){T=f.vertices[o],n(S,T.vLeft,T.vRight);let s=r(S);s>0?(s=1/Math.sqrt(s),S[0]*=s,S[1]*=s,S[2]*=s):(S[0]=T.vRight[0],S[1]=T.vRight[1],S[2]=T.vRight[2]),C[0]=E[D]+h.frame.up[0],C[1]=E[D+1]+h.frame.up[1],C[2]=E[D+2]+h.frame.up[2],D+=3;let m=t(p,E[D],E[D+1],E[D+2]);c(m,S,w),l(w,u(C,T.vLeft),x)?(x[0]-=E[D],x[1]-=E[D+1],x[2]-=E[D+2],i(y,x),a(b,S,y),i(b,b)):d(S,h.frame.up,h.frame.right,v,b,y,_),e(T.frame.up,y),e(T.frame.right,b),h=T}}const p=o();export{f as computeMinimumRotationTangentFrame};
2
+ import{set as e,exactEquals as t,dot as n,length as r}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{ZEROS as i}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{dot as a,scale as o,add as s,normalize as c,copy as l,set as u,length as d,cross as f}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as m,fromPositionAndNormal as h,intersectRay as g}from"../../../../geometry/support/plane.js";import{wrap as _}from"../../../../geometry/support/ray.js";import{makeOrthoBasisDirUpFallback as v}from"./GeometryUtil.js";function y(e,t){let n=null,r=e.vertices.length,i=.99619469809,a=p(),o=p(),y=p(),b=p(),x=p(),S=p(),C=m(),T=e.vertices[0];l(o,t),u(a,0,1,0),v(T.vRight,o,a,a,y,o,i),l(T.frame.up,o),l(T.frame.right,y);let E=e.positions,D=e.offset;n=T;for(let t=1;t<r;++t){T=e.vertices[t],s(x,T.vLeft,T.vRight);let r=d(x);r>0?(r=1/Math.sqrt(r),x[0]*=r,x[1]*=r,x[2]*=r):(x[0]=T.vRight[0],x[1]=T.vRight[1],x[2]=T.vRight[2]),S[0]=E[D]+n.frame.up[0],S[1]=E[D+1]+n.frame.up[1],S[2]=E[D+2]+n.frame.up[2],D+=3;let p=u(w,E[D],E[D+1],E[D+2]);h(p,x,C),g(C,_(S,T.vLeft),b)?(b[0]-=E[D],b[1]-=E[D+1],b[2]-=E[D+2],c(o,b),f(y,x,o),c(y,y)):v(x,n.frame.up,n.frame.right,a,y,o,i),l(T.frame.up,o),l(T.frame.right,y),n=T}}const b=.001;function x(t,n,r,i){if(!i)return e(t,1,0);let l=a(r,n.up),u=a(r,n.right);return o(w,n.right,l),o(T,n.up,-u),s(w,w,T),c(w,w),e(t,a(w,n.right),a(w,n.up))}function S(e,t,i,a=0){return n(e,t)*Math.sign(i)>=-a*r(e)}function C(e,n,r){return r!==0&&!t(e,i)&&S(e,n,r,b)}const w=p(),T=p();export{b as classificationTolerance,y as computeMinimumRotationTangentFrame,x as constructPathRotationRight,S as isOuterJoinVertex,C as needsJoinSubdivisions};