@arcgis/core 5.2.0-next.116 → 5.2.0-next.118

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 (189) hide show
  1. package/analysis/ElevationProfile/ElevationProfileLineQuery.d.ts +1 -1
  2. package/analysis/featureReferenceUtils.js +1 -1
  3. package/arcade.d.ts +1 -1
  4. package/arcade.js +1 -1
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/03918a862455191a8910.js +1 -0
  7. package/assets/esri/core/workers/chunks/{9b9a60f1e0c48aa701f0.js → 066b7f6866d602f963e0.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{4bfd63f3cf9208eb839b.js → 0dc317d022807af92e3f.js} +41 -41
  9. package/assets/esri/core/workers/chunks/{564fdf0d663b773806cc.js → 114bc14c49176f64a2c5.js} +1 -1
  10. package/assets/esri/core/workers/chunks/1630913399384030d0b9.js +1 -0
  11. package/assets/esri/core/workers/chunks/{db141122060d8d9b38da.js → 1742dbc6a827cfda471b.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{045ff98313b06a2188b7.js → 1a39335aa2dce6d564d9.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{caf38cf4d8542fb11c46.js → 20e4277a4a6c57957202.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{f42243c62dd0b6993816.js → 24014f3701c31ee74bc2.js} +1 -1
  15. package/assets/esri/core/workers/chunks/37cf4ca2083cd3b6002e.js +1 -0
  16. package/assets/esri/core/workers/chunks/{44d3fe10cb35d16f0b33.js → 4396ef5ab3eb9e9a7df2.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{3b499cfc89c8f87cdb20.js → 4925d0b29a166cc8fee1.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{56989b48c0a5d7fe85e6.js → 4c4ba466e23159991322.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{b9023cc3298ee4fddea7.js → 54f3bc940cea15fce2c7.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{7e42be27ead91a4cc0f1.js → 581285e4d7bbe1b7c27a.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{05584d8828ae7bca0fc5.js → 64ee22134fda2f09c094.js} +1 -1
  22. package/assets/esri/core/workers/chunks/6efc5873747b9cd44fb9.js +1 -0
  23. package/assets/esri/core/workers/chunks/{0463c807b37f01bbc35c.js → 70347d25968975126fa7.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{1eafb214519d8fc63ccb.js → 8465e2c7221125fd3cc4.js} +1 -1
  25. package/assets/esri/core/workers/chunks/862e1acd80c4e43831dc.js +1 -0
  26. package/assets/esri/core/workers/chunks/{fd808d38ae2d475ac442.js → 8675ab3c4dec2f13b9c6.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{925a0b29d3ed7165b8dd.js → 8984d02c0ce828fd223a.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{57328c206f1e699ac06f.js → 89edaa1ffa566908ebca.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{bb4cbf6b7c35e8c78cc7.js → a917a1df8270860dc514.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{996438b3afec92c5c68e.js → b0058619e0363002ad86.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{9fb46ccd4be4c3b61c31.js → b5a102cf9f4377fb9842.js} +1 -1
  32. package/assets/esri/core/workers/chunks/b6409d89914030d5854a.js +1 -0
  33. package/assets/esri/core/workers/chunks/{2e0fd0536408053ac6f5.js → b961e0aaa6b3ea75315c.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{fa869977ac2abb063925.js → b9c834e3c0701e9b14a2.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{32dd990a3bd93cbad309.js → c0ec87800faf99cbd8bd.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{20de0ea9fa08a6545978.js → cf1106eda10f3cccb1bd.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{ed988360264574cd8f6b.js → cf7c06702babd6fa88b4.js} +1 -1
  38. package/assets/esri/core/workers/chunks/cfd8317ecd2e63af7c40.js +1 -0
  39. package/assets/esri/core/workers/chunks/d090baaa974e1e83fa44.js +1 -0
  40. package/assets/esri/core/workers/chunks/{c5ceceb0683671f92efa.js → da6583e8d88441a1c02a.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{e1f2b07be33e33117313.js → dd02cc18ebebb90778c6.js} +1 -1
  42. package/assets/esri/core/workers/chunks/de8a3a0796bd115426c0.js +1 -0
  43. package/assets/esri/core/workers/chunks/{05b373a663cb5d4d722f.js → deb5b1d772ca407654d4.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{10fa8fbade8ae084c307.js → e22a013ec38989caf9de.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{c7e6b5594fed5bb16691.js → e4016ae9cb8f16e3efc3.js} +1 -1
  46. package/assets/esri/core/workers/chunks/e5f0c47957a4e9663720.js +1 -0
  47. package/assets/esri/core/workers/chunks/{a3f4818f4190fa92331d.js → edd36e98355f1655e5c8.js} +1 -1
  48. package/assets/esri/core/workers/chunks/ef6e52f9b656751eebaf.js +1 -0
  49. package/assets/esri/core/workers/chunks/f0709c48daca93e759c8.js +1 -0
  50. package/assets/esri/core/workers/chunks/f5423006fb07db7dd6ee.js +1 -0
  51. package/assets/esri/core/workers/chunks/{d926bffc3ff9f87e9081.js → f890359d972cce54459e.js} +1 -1
  52. package/assets/esri/core/workers/chunks/fb11ff3f2eae5f072560.js +1 -0
  53. package/assets/esri/core/workers/chunks/fdad31bbe8aee68a6eaf.js +1 -0
  54. package/assets/esri/core/workers/chunks/fe1787a8d499832996b3.js +1 -0
  55. package/chunks/CloudsComposition.glsl.js +2 -2
  56. package/chunks/ColorMaterial.glsl.js +3 -3
  57. package/chunks/Compositing.glsl.js +4 -4
  58. package/chunks/DeepSky.glsl.js +3 -3
  59. package/chunks/EdgeShader.glsl.js +6 -6
  60. package/chunks/FocusArea.glsl.js +1 -1
  61. package/chunks/GlobalIllumination.glsl.js +7 -7
  62. package/chunks/HUDMaterial.glsl.js +5 -5
  63. package/chunks/LaserlinePath.glsl.js +5 -5
  64. package/chunks/LineCallout.glsl.js +2 -2
  65. package/chunks/LineMarker.glsl.js +30 -30
  66. package/chunks/NavigationDepth.glsl.js +1 -1
  67. package/chunks/OccludedGeometryDepth.glsl.js +2 -2
  68. package/chunks/Path.glsl.js +12 -12
  69. package/chunks/PointRenderer.glsl.js +5 -5
  70. package/chunks/Precipitation.glsl.js +7 -7
  71. package/chunks/RibbonLine.glsl.js +50 -50
  72. package/chunks/SimpleAtmosphere.glsl.js +9 -9
  73. package/chunks/Stars.glsl.js +5 -5
  74. package/chunks/Terrain.glsl.js +18 -16
  75. package/chunks/Viewshed.glsl.js +3 -3
  76. package/chunks/VolumeMask.glsl.js +2 -2
  77. package/chunks/Water.glsl.js +20 -19
  78. package/config.js +1 -1
  79. package/core/NestedMap.js +1 -1
  80. package/kernel.js +1 -1
  81. package/layers/AnnotationFeatureLayer.d.ts +2 -1
  82. package/layers/AnnotationFeatureLayer.js +1 -1
  83. package/layers/CatalogLayer.d.ts +2 -1
  84. package/layers/CatalogLayer.js +1 -1
  85. package/layers/DimensionFeatureLayer.d.ts +2 -1
  86. package/layers/DimensionFeatureLayer.js +1 -1
  87. package/layers/FeatureLayer.d.ts +2 -30
  88. package/layers/FeatureLayer.js +1 -1
  89. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  90. package/layers/SubtypeGroupLayer.d.ts +2 -1
  91. package/layers/SubtypeGroupLayer.js +1 -1
  92. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  93. package/layers/mixins/FeatureLayerBase.js +1 -1
  94. package/layers/mixins/FeatureLayerReload.d.ts +26 -0
  95. package/layers/mixins/FeatureLayerReload.js +2 -0
  96. package/layers/mixins/PortalLayer.js +1 -1
  97. package/layers/support/TimeInfo.d.ts +2 -2
  98. package/layers/support/TimeInfo.js +1 -1
  99. package/layers/support/fieldUtils.js +1 -1
  100. package/package.json +2 -2
  101. package/support/revision.js +1 -1
  102. package/time/timeZoneUtils.js +1 -1
  103. package/views/3d/analysis/LineOfSight/LineOfSightEditTool.js +1 -1
  104. package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
  105. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  106. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  107. package/views/3d/support/engineContent/line.js +1 -1
  108. package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +2 -2
  109. package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js +4 -4
  110. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +9 -9
  111. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +15 -15
  112. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +3 -3
  113. package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +23 -23
  114. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js +8 -8
  115. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +7 -7
  116. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +7 -7
  117. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  118. package/views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js +2 -0
  119. package/views/3d/webgl-engine/effects/AmbientIllumination.js +1 -1
  120. package/views/3d/webgl-engine/effects/atmosphere/SimpleAtmosphere.glsl.js +1 -1
  121. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.glsl.js +1 -1
  122. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  123. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  124. package/views/3d/webgl-engine/effects/laserlines/LaserlinePath.glsl.js +1 -1
  125. package/views/3d/webgl-engine/effects/precipitation/Precipitation.glsl.js +1 -1
  126. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  127. package/views/3d/webgl-engine/effects/stars/DeepSky.glsl.js +1 -1
  128. package/views/3d/webgl-engine/effects/stars/Stars.glsl.js +1 -1
  129. package/views/3d/webgl-engine/lib/LineMaterial.js +1 -1
  130. package/views/3d/webgl-engine/lib/Program.js +1 -1
  131. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  132. package/views/3d/webgl-engine/lib/edgeRendering/AdjustProjectedPosition.glsl.js +4 -4
  133. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
  134. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  135. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  136. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  137. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  138. package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
  139. package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
  140. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  141. package/views/3d/webgl-engine/materials/ViewingModeConfiguration.js +1 -1
  142. package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
  143. package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
  144. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  145. package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
  146. package/views/3d/webgl-engine/shaders/Compositing.glsl.js +1 -1
  147. package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +26 -26
  148. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  149. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  150. package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
  151. package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
  152. package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
  153. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  154. package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
  155. package/views/3d/webgl-engine/shaders/LineTechniqueConfiguration.js +2 -0
  156. package/views/3d/webgl-engine/shaders/MeasurementArrowTechniqueConfiguration.js +1 -1
  157. package/views/3d/webgl-engine/shaders/NativeLineTechniqueConfiguration.js +1 -1
  158. package/views/3d/webgl-engine/shaders/NavigationDepth.glsl.js +1 -1
  159. package/views/3d/webgl-engine/shaders/OccludedGeometryDepth.glsl.js +1 -1
  160. package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
  161. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  162. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  163. package/views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js +1 -1
  164. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  165. package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
  166. package/views/3d/webgl-engine/shaders/VolumeMask.glsl.js +1 -1
  167. package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +1 -1
  168. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  169. package/widgets/ValuePicker.d.ts +1 -1
  170. package/widgets/ValuePicker.js +1 -1
  171. package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +4 -2
  172. package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
  173. package/widgets/VideoPlayer.js +1 -1
  174. package/assets/esri/core/workers/chunks/0630e650abdfea1792e4.js +0 -1
  175. package/assets/esri/core/workers/chunks/0edebc6c516f0b9dac7b.js +0 -1
  176. package/assets/esri/core/workers/chunks/25c5e1b14b184b1228a3.js +0 -1
  177. package/assets/esri/core/workers/chunks/573e8fa0af8711ffec45.js +0 -1
  178. package/assets/esri/core/workers/chunks/5b9925f23d4b10a7087e.js +0 -1
  179. package/assets/esri/core/workers/chunks/66c46c5a7147550ea3ed.js +0 -1
  180. package/assets/esri/core/workers/chunks/6c7cb7974969e3167f2b.js +0 -1
  181. package/assets/esri/core/workers/chunks/7bbc3d22383388d11345.js +0 -1
  182. package/assets/esri/core/workers/chunks/7edf57e31ff07af9032b.js +0 -1
  183. package/assets/esri/core/workers/chunks/8bd187b48a4e4296e3d8.js +0 -1
  184. package/assets/esri/core/workers/chunks/9acaabe950319d031f2e.js +0 -1
  185. package/assets/esri/core/workers/chunks/ac02df176f9ea94278bb.js +0 -1
  186. package/assets/esri/core/workers/chunks/b4222152efaf73b37b53.js +0 -1
  187. package/assets/esri/core/workers/chunks/c0855be20ffcd52c7026.js +0 -1
  188. package/assets/esri/core/workers/chunks/e606be4ece4eac1e9bbe.js +0 -1
  189. package/assets/esri/core/workers/chunks/f05622413cadfd14553e.js +0 -1
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../core/Error.js";import"../core/shaderLibrary/ShaderOutput.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import"../core/shaderLibrary/shading/MainLighting.glsl.js";import"../core/shaderLibrary/shading/NormalUtils.glsl.js";import"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../core/shaderLibrary/shading/WaterColor.glsl.js";import"../core/shaderLibrary/shading/WaterDistortion.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../shaders/OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";import"../../../../webscene/support/AlphaCutoff.js";export{b as build}from"../../../../chunks/Water.glsl.js";
2
+ import"../../../../core/Error.js";import"../core/shaderLibrary/ShaderOutput.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/MainLighting.glsl.js";import"../core/shaderLibrary/shading/NormalUtils.glsl.js";import"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../core/shaderLibrary/shading/WaterColor.glsl.js";import"../core/shaderLibrary/shading/WaterDistortion.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../shaders/OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";import"../../../../webscene/support/AlphaCutoff.js";export{b as build}from"../../../../chunks/Water.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{getOrCreateMapValue as t}from"../../../../../core/MapUtils.js";import s from"../../../../../core/PooledArray.js";import{assert as e}from"../../lib/Util.js";import{bufferRangePool as n,mergeAdjacentRanges as a}from"./BufferRange.js";import{DrawCommand as i}from"./DrawCommand.js";import{Instance as r}from"./Instance.js";import{InstancedCommandVAO as o}from"./InstancedCommandVAO.js";import{InstancedCommandVAOs as h}from"./InstancedCommandVAOs.js";import{defaultHighlightName as d}from"../../../../support/HighlightDefaults.js";class m{constructor(t,s){this.isInstanced=t,this.targetBuffers=s,this.vao=null,this.textureBuffer=null,this.endElements={geometry:0,texture:0,index:0},this._instances=new Map,this.hasHiddenInstances=!1,this.hasOccludees=!1,this.drawCommandsDirty=!0,this.highlightNames=new Set,this.drawCommandsDefault=u(),this.drawCommandsHighlights=new Map,this.drawCommandsOccludees=u(),this.drawCommandsShadowHighlightRest=u(),this._instancedCommandVAOs=null;const e={},n={};for(const a of s)e[a]=0,n[a]=[];this._numElements=e,this._holes=n,this.useIndexing=s.includes("index"),this._drawRangesTarget=this.useIndexing?"index":"geometry"}getTargetBuffer(t){return"geometry"===t?this.vao?.buffer("geometry"):"texture"===t?this.textureBuffer:this.vao?.indexBuffer}get numElements(){return this._numElements}get instances(){return this._instances}get writeableInstances(){return this._instances}get indexType(){return this.vao?.indexBuffer?.indexType}clearHoles(){for(const t of this.targetBuffers){const s=this._holes[t];for(const t of s)n.release(t);s.length=0}}get holes(){return this._holes}get hasHighlights(){return this.highlightNames.size>0}get instancedCommandVAOs(){return this._instancedCommandVAOs}get _drawTargetHoles(){return this._holes[this._drawRangesTarget]}get _drawTargetEndElement(){return this.endElements[this._drawRangesTarget]}get usedMemory(){return(this.vao?.usedMemory??0)+(this.textureBuffer?.usedMemory??0)}resetInstanceSummary(){this.hasHiddenInstances=!1,this.hasOccludees=!1,this.highlightNames.clear()}updateDirtyDrawCommands(t){if(this.drawCommandsDirty){this.resetInstanceSummary();for(const t of this.instances.values())this.updateDrawState(t);this.updateDrawCommands(t)}}createInstance(t,s,e=this._makeEmptyRanges()){const n=new r(t,e,s,this._drawRangesTarget);return this.addInstance(t.id,n),n}addInstance(t,s){e(!this._instances.has(t)),this._instances.set(t,s);for(const e of this.targetBuffers)this._numElements[e]+=s.targetRanges[e].numElements}deleteInstance(t){const s=this._instances.get(t);if(s){for(const t of this.targetBuffers){const e=s.targetRanges[t];this._numElements[t]-=e.numElements,n.release(e)}this._instances.delete(t)}}updateInstances(){const{targetBuffers:t}=this,s={};for(const e of t)s[e]=0;for(const e of this._instances.values()){for(const n of t)s[n]+=e.targetRanges[n].numElements;this.updateDrawState(e)}this._numElements=s}updateDrawState(t){if(t.isVisible){const{highlightName:s}=t;s&&this.highlightNames.add(s),t.hasOccludees&&(this.hasOccludees=!0)}else this.hasHiddenInstances=!0}updateDrawCommands(t){this._updateDrawCommands(t),this._updateInstancedCommandVAOs()}_updateDrawCommands(t){if(this.drawCommandsDefault.clear(),this.drawCommandsOccludees.clear(),this.drawCommandsDirty=!1,0===this._instances.size)return;const{sortedInstances:s}=this;if(this._updateHighlightDrawCommands(t,s),!this.needsMultipleCommands){const t=this.drawCommandsDefault.pushNew(),s=this._drawTargetHoles,e=s.at(0);return this.vao&&1===s.length&&e.to===this._drawTargetEndElement?(t.first=0,void(t.count=e.from)):(t.first=1/0,t.count=0,this._instances.forEach(s=>{t.first=Math.min(t.first,s.drawRange.from),t.count=Math.max(t.count,s.drawRange.to)}),void(t.count-=t.first))}for(const e of s)e.isVisible&&this.addOrMerge(e.hasOccludees?this.drawCommandsOccludees:this.drawCommandsDefault,e)}get sortedInstances(){return Array.from(this._instances.values()).sort(({drawRange:t},{drawRange:s})=>t.from===s.from?t.to-s.to:t.from-s.from)}updateHighlights(t){this.highlightNames.clear();const s=this.sortedInstances;for(const e of s)e.updateHighlightOptions(t),e.isVisible&&e.highlightName&&this.highlightNames.add(e.highlightName);this._updateHighlightDrawCommands(t,s),this._updateInstancedCommandVAOs()}mergeHoles(){const t=this._holes;for(const s of this.targetBuffers)a(t[s])}_updateHighlightDrawCommands(s,e){const{drawCommandsHighlights:n,drawCommandsShadowHighlightRest:a}=this;n.clear(),a.clear();for(const i of e){if(i.updateHighlightOptions(s),!i.isVisible)continue;const{highlightName:e}=i;if(e){this.highlightNames.add(e);const s=t(n,e,u);this.addOrMerge(s,i)}e&&e===d||this.addOrMerge(a,i)}}_updateInstancedCommandVAOs(){const t=this.vao;if(!this.isInstanced||null==t)return;this._instancedCommandVAOs??=new h;const s=this._instancedCommandVAOs,e=s.commandVAOs.copy();s.clear();const n=s.commandVAOs,a=(s,a)=>{for(const i of s){const{first:s,count:r}=i,h=n.get(s,r)??e.pop(s,r)??new o(t.shallowCloneWithBaseInstances(new Map([["geometry",i.first]])),i.count);n.set(s,r,h),a.push(h)}};a(this.drawCommandsDefault,s.drawCommandsDefault);for(const[i,r]of this.drawCommandsHighlights){const t=new Array;a(r,t),s.drawCommandsHighlights.set(i,t)}a(this.drawCommandsOccludees,s.drawCommandsOccludees),a(this.drawCommandsShadowHighlightRest,s.drawCommandsShadowHighlightRest);for(const i of e.values())i.dispose();e.clear()}get needsMultipleCommands(){return this.hasOccludees||this.hasHighlights||this.hasHiddenInstances}addOrMerge(t,{drawRange:s}){const e=t.back();if(null==e){const e=t.pushNew();return e.first=s.from,void(e.count=s.numElements)}if(l(e,s)){const t=s.from-e.first+s.numElements;e.count=t}else{const e=t.pushNew();e.first=s.from,e.count=s.numElements}}_makeEmptyRanges(){const t={};for(const s of this.targetBuffers)t[s]=n.acquire(0,0);return t}}function c(t){return null!=t.vao}function u(){return new s({allocator:t=>t||new i,deallocator:t=>t})}function l(t,s){return t.first+t.count>=s.from}export{m as PerBufferData,c as hasVao};
2
+ import{getOrCreateMapValue as t}from"../../../../../core/MapUtils.js";import s from"../../../../../core/PooledArray.js";import{assert as e}from"../../lib/Util.js";import{bufferRangePool as n,mergeAdjacentRanges as a}from"./BufferRange.js";import{DrawCommand as i}from"./DrawCommand.js";import{Instance as r}from"./Instance.js";import{InstancedCommandVAO as o}from"./InstancedCommandVAO.js";import{InstancedCommandVAOs as h}from"./InstancedCommandVAOs.js";import{defaultHighlightName as d}from"../../../../support/HighlightDefaults.js";class m{constructor(t,s){this.isInstanced=t,this.targetBuffers=s,this.vao=null,this.textureBuffer=null,this.endElements={geometry:0,texture:0,index:0},this._instances=new Map,this.hasHiddenInstances=!1,this.hasOccludees=!1,this.drawCommandsDirty=!0,this.highlightNames=new Set,this.drawCommandsDefault=u(),this.drawCommandsHighlights=new Map,this.drawCommandsOccludees=u(),this.drawCommandsShadowHighlightRest=u(),this._instancedCommandVAOs=null;const e={},n={};for(const a of s)e[a]=0,n[a]=[];this._numElements=e,this._holes=n,this.useIndexing=s.includes("index"),this._drawRangesTarget=this.useIndexing?"index":"geometry"}getTargetBuffer(t){return"geometry"===t?this.vao?.buffer("geometry"):"texture"===t?this.textureBuffer:this.vao?.indexBuffer}get numElements(){return this._numElements}get instances(){return this._instances}get writeableInstances(){return this._instances}get indexType(){return this.vao?.indexBuffer?.indexType}clearHoles(){for(const t of this.targetBuffers){const s=this._holes[t];for(const t of s)n.release(t);s.length=0}}get holes(){return this._holes}get hasHighlights(){return this.highlightNames.size>0}get instancedCommandVAOs(){return this._instancedCommandVAOs}get _drawTargetHoles(){return this._holes[this._drawRangesTarget]}get _drawTargetEndElement(){return this.endElements[this._drawRangesTarget]}get usedMemory(){return(this.vao?.usedMemory??0)+(this.textureBuffer?.usedMemory??0)}resetInstanceSummary(){this.hasHiddenInstances=!1,this.hasOccludees=!1,this.highlightNames.clear()}updateDirtyDrawCommands(t){if(this.drawCommandsDirty){this.resetInstanceSummary();for(const t of this.instances.values())this.updateDrawState(t);this.updateDrawCommands(t)}}createInstance(t,s,e=this._makeEmptyRanges()){const n=new r(t,e,s,this._drawRangesTarget);return this.addInstance(t.id,n),n}addInstance(t,s){e(!this._instances.has(t)),this._instances.set(t,s);for(const e of this.targetBuffers)this._numElements[e]+=s.targetRanges[e].numElements}deleteInstance(t){const s=this._instances.get(t);if(s){for(const t of this.targetBuffers){const e=s.targetRanges[t];this._numElements[t]-=e.numElements,n.release(e)}this._instances.delete(t)}}updateInstances(){const{targetBuffers:t}=this,s={};for(const e of t)s[e]=0;for(const e of this._instances.values()){for(const n of t)s[n]+=e.targetRanges[n].numElements;this.updateDrawState(e)}this._numElements=s}updateDrawState(t){if(t.isVisible){const{highlightName:s}=t;s&&this.highlightNames.add(s),t.hasOccludees&&(this.hasOccludees=!0)}else this.hasHiddenInstances=!0}updateDrawCommands(t){this._updateDrawCommands(t),this._updateInstancedCommandVAOs()}_updateDrawCommands(t){if(this.drawCommandsDefault.clear(),this.drawCommandsOccludees.clear(),this.drawCommandsDirty=!1,0===this._instances.size)return;const{sortedInstances:s}=this;if(this._updateHighlightDrawCommands(t,s),!this.needsMultipleCommands){const t=this.drawCommandsDefault.pushNew(),s=this._drawTargetHoles,e=s.at(0);return this.vao&&1===s.length&&e.to===this._drawTargetEndElement?(t.first=0,void(t.count=e.from)):(t.first=1/0,t.count=0,this._instances.forEach(s=>{t.first=Math.min(t.first,s.drawRange.from),t.count=Math.max(t.count,s.drawRange.to)}),void(t.count-=t.first))}for(const e of s)e.isVisible&&this.addOrMerge(e.hasOccludees?this.drawCommandsOccludees:this.drawCommandsDefault,e)}get sortedInstances(){return Array.from(this._instances.values()).sort(({drawRange:t},{drawRange:s})=>t.from===s.from?t.to-s.to:t.from-s.from)}updateHighlights(t){this.highlightNames.clear();const s=this.sortedInstances;for(const e of s)e.updateHighlightOptions(t),e.isVisible&&e.highlightName&&this.highlightNames.add(e.highlightName);this._updateHighlightDrawCommands(t,s),this._updateInstancedCommandVAOs()}mergeHoles(){const t=this._holes;for(const s of this.targetBuffers)a(t[s])}_updateHighlightDrawCommands(s,e){const{drawCommandsHighlights:n,drawCommandsShadowHighlightRest:a}=this;n.clear(),a.clear();for(const i of e){if(i.updateHighlightOptions(s),!i.isVisible)continue;const{highlightName:e}=i;if(e){this.highlightNames.add(e);const s=t(n,e,u);this.addOrMerge(s,i)}e&&e===d||this.addOrMerge(a,i)}}_updateInstancedCommandVAOs(){const t=this.vao;if(!this.isInstanced||null==t)return;this._instancedCommandVAOs??=new h;const s=this._instancedCommandVAOs,e=s.commandVAOs.clone();s.clear();const n=s.commandVAOs,a=(s,a)=>{for(const i of s){const{first:s,count:r}=i,h=n.get(s,r)??e.pop(s,r)??new o(t.shallowCloneWithBaseInstances(new Map([["geometry",i.first]])),i.count);n.set(s,r,h),a.push(h)}};a(this.drawCommandsDefault,s.drawCommandsDefault);for(const[i,r]of this.drawCommandsHighlights){const t=new Array;a(r,t),s.drawCommandsHighlights.set(i,t)}a(this.drawCommandsOccludees,s.drawCommandsOccludees),a(this.drawCommandsShadowHighlightRest,s.drawCommandsShadowHighlightRest);for(const i of e.values())i.dispose();e.clear()}get needsMultipleCommands(){return this.hasOccludees||this.hasHighlights||this.hasHiddenInstances}addOrMerge(t,{drawRange:s}){const e=t.back();if(null==e){const e=t.pushNew();return e.first=s.from,void(e.count=s.numElements)}if(l(e,s)){const t=s.from-e.first+s.numElements;e.count=t}else{const e=t.pushNew();e.first=s.from,e.count=s.numElements}}_makeEmptyRanges(){const t={};for(const s of this.targetBuffers)t[s]=n.acquire(0,0);return t}}function c(t){return null!=t.vao}function u(){return new s({allocator:t=>t||new i,deallocator:t=>t})}function l(t,s){return t.first+t.count>=s.from}export{m as PerBufferData,c as hasVao};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{toConst as r}from"../../../../core/compilerUtils.js";import{unpackFloatRGBA as i}from"../../../../core/floatRGBA.js";import has from"../../../../core/has.js";import s from"../../../../core/Logger.js";import{removeMaybe as n,destroyMaybe as o}from"../../../../core/maybe.js";import{when as a,initial as h,watch as l,syncAndInitial as d}from"../../../../core/reactiveUtils.js";import{addFrameTask as c}from"../../../../core/scheduling.js";import{signal as p}from"../../../../core/signal.js";import{Milliseconds as m}from"../../../../core/time.js";import{property as u,subclass as f}from"../../../../core/accessorSupport/decorators.js";import{isMoon as g,isMars as w}from"../../../../geometry/ellipsoidUtils.js";import{debugFlags as _}from"../../support/debugFlags.js";import{ComponentObjectCollection as v}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueConstructionContext as x}from"../core/shaderTechnique/ShaderTechniqueConstructionContext.js";import{ShaderTechniqueRepository as j}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{ChapmanAtmosphere as y}from"../effects/atmosphere/ChapmanAtmosphere.js";import{LocalAtmosphere as b}from"../effects/atmosphere/LocalAtmosphere.js";import{MarsAtmosphere as R}from"../effects/atmosphere/MarsAtmosphere.js";import{CloudsComposition as A}from"../effects/clouds/CloudsComposition.js";import{Fog as C}from"../effects/fog/Fog.js";import{ObjectAndLayerID as S}from"../effects/geometry/ObjectAndLayerID.js";import{olidEnabled as T}from"../effects/geometry/olidUtils.js";import{RenderOccluded as U}from"../effects/geometry/RenderOccluded.js";import{GlobalIllumination as D}from"../effects/globalIllumination/GlobalIllumination.js";import{Haze as M}from"../effects/haze/Haze.js";import{Highlight as O}from"../effects/highlight/Highlight.js";import{ShadowHighlight as q}from"../effects/highlight/ShadowHighlight.js";import{ShadowHighlightBuffer as F}from"../effects/highlight/ShadowHighlightBuffer.js";import{Magnifier as L}from"../effects/magnifier/Magnifier.js";import{ShadowAccumulator as k}from"../effects/shadowAccumulation/ShadowAccumulator.js";import{ShadowCastRenderer as W}from"../effects/shadowAccumulation/ShadowCastRenderer.js";import{SMAA as I}from"../effects/smaa/SMAA.js";import{SSAO as B}from"../effects/ssao/SSAO.js";import{Stars as E}from"../effects/stars/Stars.js";import{EmissionComposite as H}from"../lib/EmissionComposite.js";import{GLMaterialRepository as G}from"../lib/GLMaterialRepository.js";import{ObjectAndLayerIdRenderHelper as P}from"../lib/ObjectAndLayerIdRenderHelper.js";import{Renderer as N}from"../lib/Renderer.js";import{RenderingContext as z}from"../lib/RenderingContext.js";import{RenderingContextOptions as V}from"../lib/RenderingContextOptions.js";import{TextureRepository as X}from"../lib/TextureRepository.js";import{createMarkerTextureRepository as Q}from"../materials/markerTextureRepository.js";import{createStippleTextureRepository as J}from"../materials/stippleTextureRepository.js";import{WaterTextureRepository as K}from"../materials/internal/WaterTextureRepository.js";import{getContextCache as Y}from"./contextCache.js";import{removeLoadedShaderModules as Z}from"./renderUtils.js";import{ScreenshotManager as $,ScreenshotContext as ee}from"./ScreenshotManager.js";import{contextCache as te}from"./testUtils.js";import{noBudget as re}from"../../../support/Scheduler.js";import{checkWebGLError as ie}from"../../../webgl/checkWebGLError.js";const se=has("disable-feature:async-navigation-3d-depth-readback");let ne=class extends t{constructor(e,t){super(e),this.olidRenderHelper=T()?new P:null,this.waterTextures=new K,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this._fog=p(null),this.globalIllumination=null,this.shadowAccumulator=null,this.test=null,this._initializeContext(t);const{memoryController:r}=t.view.resourceController;this.stippleTextures=J(this._rctx,r),this.markerTextures=Q(this._rctx,r),this.techniques=new j(new x(this._rctx,this.stippleTextures,this.waterTextures,this.markerTextures)),this.textures=new X(t),this.addHandles(this.textures.events.on("changed",e=>this.requestRender(e)));const i=new G(this.textures,this.techniques,()=>this.requestRender(),()=>this.requestRender());this.renderer=new N(t,i,this.techniques,this._rctx,e=>this.requestRender(e)),this.addHandles([a(()=>t.view.ready,()=>this._createRenderNodes(),h),l(()=>this.waterTextures.updating,()=>this.requestRender(),h),l(()=>t.view.qualityProfile,e=>this.renderer?.updateRenderFeatures(e),d)]);const s={renderScene:(e,t,r,i)=>(this.renderer.setTime(t),this.renderer.render(e,r,i)),requestRenderScene:e=>this.requestRender(e),prepareOverlay:()=>t.options.screenshot.prepareOverlay(),renderOverlay:(e,r,i)=>t.options.screenshot.renderOverlay(e,r,i)};this._screenshotManager=new $(this._rctx,s,e=>t.view.overlayManager.updateOverlays(re,e.camera,0)),this._registerFrameTask(t)}destroy(){const e=this.stage?.container;e?.contains(this._canvas)&&e.removeChild(this._canvas),this._frameTask=n(this._frameTask),this.techniques.destroy(),this._componentObjectCollection=o(this._componentObjectCollection),this._screenshotManager.destroy(),this.renderer.destroy(),this.globalIllumination=null,this.textures.destroy(),this.waterTextures.destroy(),this.markerTextures.destroy(),this.stippleTextures.destroy(),this._canvas=null,this._rctx=o(this._rctx),this.test?.destroy()}_createRenderNodes(){const{view:e,viewingMode:t}=this.stage;this.shadowAccumulator=new k({view:e}),this.shadowAccumulator.accumulationRenderer=new W({view:e,data:this.shadowAccumulator}),this.renderer.setShadowAccumulator(this.shadowAccumulator),new E({view:e}),g(e.spatialReference)||(2===t?new b({view:e}):w(e.spatialReference)?new R({view:e}):(new y({view:e}),new A({view:e}),new M({view:e}),this._fog.value=new C({view:e}))),new B({view:e}),has("disable-feature:global-illumination")||(this.globalIllumination=new D({view:e})),new I({view:e,isEnabled:()=>this.renderer.hasSMAA}),new L({view:e}),new O({view:e}),new F({view:e}),new q({view:e,viewingMode:t}),new H({view:e}),new U({view:e}),T()&&new S({view:e})}requestRender(e=1){switch(e){case 2:this.view.state.fading=!0;case 1:this._needsUpdate=!0,this.globalIllumination?.resetAccumulatedFrames();case 0:this._needsRender=!0}}get updating(){const e=this._needsUpdate||this._needsWaterReflectionUpdate||this.renderer.updating||this.textures.updating||this.waterTextures.updating;return e&&_.UPDATING&&console.log(" RenderView:",this._needsUpdate,this._needsWaterReflectionUpdate,this.renderer.updating,this.textures.updating,this.waterTextures.updating),e}setIdleSuspend(e){this._idleSuspend!==e&&(this._idleSuspend=e,this.requestRender())}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(r(e))}getAlpha(){return!!this._rctx.contextAttributes.alpha}getMinimalDepthForArea(e,t,r,i,s,n=s){let o=se?this._readMainDepthSynchronously(t,r,i,s,n):this.renderer.navigationDepthCache.getMinimalDepthForArea(t,r,i,s,n)??Number.MAX_VALUE;if(e){const s=e.pickDepth(t*i.pixelRatio,r*i.pixelRatio,i);null!=s&&o>s&&s!==i.nearFar[0]&&s!==i.nearFar[1]&&(o=s)}return o===Number.MAX_VALUE?void 0:o}whenRepresentativeDepthForArea(e,t,r,i,s,n=1){return this.renderer.navigationDepthCache.whenRepresentativeDepthForArea(e,t,r,i,s,n)}_readMainDepthSynchronously(e,t,r,i,s){const n=r.constrainWindowSize(e,t,i*r.pixelRatio,s*r.pixelRatio),o=this._ensureLinearDepthArrayBuffer(n);this.renderer.readMainDepth(n,o);let a=Number.MAX_VALUE;for(let h=0;h<n[2]*n[3];h++){const e=this._linearDepthFromTexture(4*h,o,r.nearFar);a>e&&e!==r.nearFar[0]&&e!==r.nearFar[1]&&(a=e)}return a}_linearDepthFromTexture(e,t,r){return i(t,e)*(r[1]-r[0])+r[0]}_ensureLinearDepthArrayBuffer(e){const t=4*e[2]*e[3];return(null==this._tmpDepthBuffer||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}async reloadShaders(){Z(),await this.techniques.reloadAll(),this.renderer.overlay?.reloadShaders(),this.requestRender()}_registerFrameTask(e){const t=e.view.state;let r=!1,i=0,s=!1;const n={preRender:({time:s})=>{r=this.updating,i=this._needsUpdate?1:0,this._needsRender&&this.renderer.updateSceneDepthRange(t.camera),e.commitSyncLayers(),s=this.test?.time??s;const n=m(s-this._lastAnimationUpdate);this.view.state.animationsEnabled&&(n>this.renderer.animationTimestep||r||this._needsRender)&&(this.renderer.updateAnimation(t,s)&&this.requestRender(0),this._lastAnimationUpdate=s)},render:({time:e})=>{if(e=this.test?.time??e,this.renderer.setTime(e),(this._needsRender||!this._idleSuspend||!this.renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const e=this._needsUpdate&&this._idleSuspend&&this.renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,this.renderer.render(t,0),s=!0,e&&this.renderer.hasReflections&&(this.requestRender(0),this._needsWaterReflectionUpdate=!0)}},update:({time:e})=>{this.view.state.animationsEnabled&&this.textures.update();const r=new ee(t,this.renderer.fboCache);e=this.test?.time??e,this._screenshotManager.update(r,e)},finish:()=>{s&&(this.renderer.finish(2===t.mode?i:1),s=!1)}};this._frameTask=c(n)}_initializeContext(e){const{options:t}=e,r=t.canvas??document.createElement("canvas");r.setAttribute("style","width: 100%; height:100%; display:block;"),this._canvas=r;const i={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:t.stencil??!0,powerPreference:"high-performance",preserveDrawingBuffer:t.preserveDrawingBuffer??!1},n=r.getContext("webgl2",i);if(null==n)return void s.getLogger(this).error("A WebGL2 context could not be created.");ie(n,!0),this._rctx=oe(n,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&s.getLogger(this).error("WebGL context has alpha channel even though no alpha channel was requested");const{container:o}=e;!this._rctx.contextAttributes.alpha&&has("safari")>=11&&(o.style.backgroundColor="black"),o.contains(r)||o.appendChild(r)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("textureFloatLinear")}get _viewingMode(){return this.stage.viewingMode}get stage(){return this.view.stage}getObjectAndLayerIdColor(e){return this.olidRenderHelper?.getObjectAndLayerIdColor(e)}get componentObjectCollection(){return this._componentObjectCollection??=new v(this.renderer.renderPassManager,this._viewingMode,this.view.spatialReference.isWebMercator),this._componentObjectCollection}updateQualitySettings(e){null!=this.test?.time&&null!=e.fadeDuration&&(this.test.savedFadeDuration=e.fadeDuration,e.fadeDuration=m(0)),this._rctx.updateOptions({maxPreferredTexturePixels:this.view.qualitySettings.maxTexturePixels})}get fog(){return r(this._fog.value)}};function oe(e,t){const r=new V(t);if(te.enabled){let t=ae.get(e);return 1===t?.refCount?(t.configure(r),t.ref(),t):(t=new z(e,r),ae.set(e,t),t.ref(),t)}return new z(e,r)}e([u({type:Boolean,readOnly:!0})],ne.prototype,"updating",null),e([u({constructOnly:!0})],ne.prototype,"view",void 0),e([u({readOnly:!0})],ne.prototype,"componentObjectCollection",null),e([u()],ne.prototype,"_componentObjectCollection",void 0),e([u()],ne.prototype,"_needsUpdate",void 0),e([u()],ne.prototype,"_needsWaterReflectionUpdate",void 0),ne=e([f("esri.views.3d.webgl-engine.parts.RenderView")],ne);const ae=Y();export{ne as RenderView};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{toConst as r}from"../../../../core/compilerUtils.js";import{unpackFloatRGBA as i}from"../../../../core/floatRGBA.js";import has from"../../../../core/has.js";import s from"../../../../core/Logger.js";import{removeMaybe as n,destroyMaybe as o}from"../../../../core/maybe.js";import{when as a,initial as h,watch as l,syncAndInitial as d}from"../../../../core/reactiveUtils.js";import{addFrameTask as c}from"../../../../core/scheduling.js";import{signal as p}from"../../../../core/signal.js";import{Milliseconds as m}from"../../../../core/time.js";import{property as u,subclass as f}from"../../../../core/accessorSupport/decorators.js";import{isMoon as g,isMars as w}from"../../../../geometry/ellipsoidUtils.js";import{debugFlags as _}from"../../support/debugFlags.js";import{ComponentObjectCollection as v}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueConstructionContext as x}from"../core/shaderTechnique/ShaderTechniqueConstructionContext.js";import{ShaderTechniqueRepository as j}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{ChapmanAtmosphere as y}from"../effects/atmosphere/ChapmanAtmosphere.js";import{LocalAtmosphere as b}from"../effects/atmosphere/LocalAtmosphere.js";import{MarsAtmosphere as R}from"../effects/atmosphere/MarsAtmosphere.js";import{CloudsComposition as A}from"../effects/clouds/CloudsComposition.js";import{Fog as C}from"../effects/fog/Fog.js";import{ObjectAndLayerID as S}from"../effects/geometry/ObjectAndLayerID.js";import{olidEnabled as T}from"../effects/geometry/olidUtils.js";import{RenderOccluded as U}from"../effects/geometry/RenderOccluded.js";import{GlobalIllumination as D}from"../effects/globalIllumination/GlobalIllumination.js";import{Haze as M}from"../effects/haze/Haze.js";import{Highlight as O}from"../effects/highlight/Highlight.js";import{ShadowHighlight as q}from"../effects/highlight/ShadowHighlight.js";import{ShadowHighlightBuffer as F}from"../effects/highlight/ShadowHighlightBuffer.js";import{Magnifier as L}from"../effects/magnifier/Magnifier.js";import{ShadowAccumulator as k}from"../effects/shadowAccumulation/ShadowAccumulator.js";import{ShadowCastRenderer as W}from"../effects/shadowAccumulation/ShadowCastRenderer.js";import{SMAA as I}from"../effects/smaa/SMAA.js";import{SSAO as B}from"../effects/ssao/SSAO.js";import{Stars as E}from"../effects/stars/Stars.js";import{EmissionComposite as H}from"../lib/EmissionComposite.js";import{GLMaterialRepository as G}from"../lib/GLMaterialRepository.js";import{ObjectAndLayerIdRenderHelper as P}from"../lib/ObjectAndLayerIdRenderHelper.js";import{Renderer as N}from"../lib/Renderer.js";import{RenderingContext as z}from"../lib/RenderingContext.js";import{RenderingContextOptions as V}from"../lib/RenderingContextOptions.js";import{TextureRepository as X}from"../lib/TextureRepository.js";import{createMarkerTextureRepository as Q}from"../materials/markerTextureRepository.js";import{createStippleTextureRepository as J}from"../materials/stippleTextureRepository.js";import{WaterTextureRepository as K}from"../materials/internal/WaterTextureRepository.js";import{getContextCache as Y}from"./contextCache.js";import{removeLoadedShaderModules as Z}from"./renderUtils.js";import{ScreenshotManager as $,ScreenshotContext as ee}from"./ScreenshotManager.js";import{contextCache as te}from"./testUtils.js";import{noBudget as re}from"../../../support/Scheduler.js";import{checkWebGLError as ie}from"../../../webgl/checkWebGLError.js";const se=has("disable-feature:async-navigation-3d-depth-readback");let ne=class extends t{constructor(e,t){super(e),this.olidRenderHelper=T()?new P:null,this.waterTextures=new K,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this._fog=p(null),this.globalIllumination=null,this.shadowAccumulator=null,this.test=null,this._initializeContext(t);const{memoryController:r}=t.view.resourceController;this.stippleTextures=J(this._rctx,r),this.markerTextures=Q(this._rctx,r),this.techniques=new j(new x(this._rctx,this.stippleTextures,this.waterTextures,this.markerTextures)),this.textures=new X(t),this.addHandles(this.textures.events.on("changed",e=>this.requestRender(e)));const i=new G(this.textures,this.techniques,()=>this.requestRender(),()=>this.requestRender());this.renderer=new N(t,i,this.techniques,this._rctx,e=>this.requestRender(e)),this.addHandles([a(()=>t.view.ready,()=>this._createRenderNodes(),h),l(()=>this.waterTextures.updating,()=>this.requestRender(),h),l(()=>t.view.qualityProfile,e=>this.renderer?.updateRenderFeatures(e),d)]);const s={renderScene:(e,t,r,i)=>(this.renderer.setTime(t),this.renderer.render(e,r,i)),requestRenderScene:e=>this.requestRender(e),prepareOverlay:()=>t.options.screenshot.prepareOverlay(),renderOverlay:(e,r,i)=>t.options.screenshot.renderOverlay(e,r,i)};this._screenshotManager=new $(this._rctx,s,e=>t.view.overlayManager.updateOverlays(re,e.camera,0)),this._registerFrameTask(t)}destroy(){const e=this.stage?.container;e?.contains(this._canvas)&&e.removeChild(this._canvas),this._frameTask=n(this._frameTask),this.techniques.destroy(),this._componentObjectCollection=o(this._componentObjectCollection),this._screenshotManager.destroy(),this.renderer.destroy(),this.globalIllumination=null,this.textures.destroy(),this.waterTextures.destroy(),this.markerTextures.destroy(),this.stippleTextures.destroy(),this._canvas=null,this._rctx=o(this._rctx),this.test?.destroy()}_createRenderNodes(){const{view:e,viewingMode:t}=this.stage;this.shadowAccumulator=new k({view:e}),this.shadowAccumulator.accumulationRenderer=new W({view:e,data:this.shadowAccumulator}),this.renderer.setShadowAccumulator(this.shadowAccumulator),new E({view:e}),g(e.spatialReference)||(2===t?new b({view:e}):w(e.spatialReference)?new R({view:e}):(new y({view:e}),new A({view:e}),new M({view:e}),this._fog.value=new C({view:e}))),new B({view:e}),has("disable-feature:global-illumination")||(this.globalIllumination=new D({view:e})),new I({view:e,isEnabled:()=>this.renderer.hasSMAA}),new L({view:e}),new O({view:e}),new F({view:e}),new q({view:e,viewingMode:t}),new H({view:e}),new U({view:e}),T()&&new S({view:e})}requestRender(e=1){switch(e){case 2:this.view.state.fading=!0;case 1:this._needsUpdate=!0,this.globalIllumination?.resetAccumulation();case 0:this._needsRender=!0}}get updating(){const e=this._needsUpdate||this._needsWaterReflectionUpdate||this.renderer.updating||this.textures.updating||this.waterTextures.updating;return e&&_.UPDATING&&console.log(" RenderView:",this._needsUpdate,this._needsWaterReflectionUpdate,this.renderer.updating,this.textures.updating,this.waterTextures.updating),e}setIdleSuspend(e){this._idleSuspend!==e&&(this._idleSuspend=e,this.requestRender())}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(r(e))}getAlpha(){return!!this._rctx.contextAttributes.alpha}getMinimalDepthForArea(e,t,r,i,s,n=s){let o=se?this._readMainDepthSynchronously(t,r,i,s,n):this.renderer.navigationDepthCache.getMinimalDepthForArea(t,r,i,s,n)??Number.MAX_VALUE;if(e){const s=e.pickDepth(t*i.pixelRatio,r*i.pixelRatio,i);null!=s&&o>s&&s!==i.nearFar[0]&&s!==i.nearFar[1]&&(o=s)}return o===Number.MAX_VALUE?void 0:o}whenRepresentativeDepthForArea(e,t,r,i,s,n=1){return this.renderer.navigationDepthCache.whenRepresentativeDepthForArea(e,t,r,i,s,n)}_readMainDepthSynchronously(e,t,r,i,s){const n=r.constrainWindowSize(e,t,i*r.pixelRatio,s*r.pixelRatio),o=this._ensureLinearDepthArrayBuffer(n);this.renderer.readMainDepth(n,o);let a=Number.MAX_VALUE;for(let h=0;h<n[2]*n[3];h++){const e=this._linearDepthFromTexture(4*h,o,r.nearFar);a>e&&e!==r.nearFar[0]&&e!==r.nearFar[1]&&(a=e)}return a}_linearDepthFromTexture(e,t,r){return i(t,e)*(r[1]-r[0])+r[0]}_ensureLinearDepthArrayBuffer(e){const t=4*e[2]*e[3];return(null==this._tmpDepthBuffer||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}async reloadShaders(){Z(),await this.techniques.reloadAll(),this.renderer.overlay?.reloadShaders(),this.requestRender()}_registerFrameTask(e){const t=e.view.state;let r=!1,i=0,s=!1;const n={preRender:({time:s})=>{r=this.updating,i=this._needsUpdate?1:0,this._needsRender&&this.renderer.updateSceneDepthRange(t.camera),e.commitSyncLayers(),s=this.test?.time??s;const n=m(s-this._lastAnimationUpdate);this.view.state.animationsEnabled&&(n>this.renderer.animationTimestep||r||this._needsRender)&&(this.renderer.updateAnimation(t,s)&&this.requestRender(0),this._lastAnimationUpdate=s)},render:({time:e})=>{if(e=this.test?.time??e,this.renderer.setTime(e),(this._needsRender||!this._idleSuspend||!this.renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const e=this._needsUpdate&&this._idleSuspend&&this.renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,this.renderer.render(t,0),s=!0,e&&this.renderer.hasReflections&&(this.requestRender(0),this._needsWaterReflectionUpdate=!0)}},update:({time:e})=>{this.view.state.animationsEnabled&&this.textures.update();const r=new ee(t,this.renderer.fboCache);e=this.test?.time??e,this._screenshotManager.update(r,e)},finish:()=>{s&&(this.renderer.finish(2===t.mode?i:1),s=!1)}};this._frameTask=c(n)}_initializeContext(e){const{options:t}=e,r=t.canvas??document.createElement("canvas");r.setAttribute("style","width: 100%; height:100%; display:block;"),this._canvas=r;const i={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:t.stencil??!0,powerPreference:"high-performance",preserveDrawingBuffer:t.preserveDrawingBuffer??!1},n=r.getContext("webgl2",i);if(null==n)return void s.getLogger(this).error("A WebGL2 context could not be created.");ie(n,!0),this._rctx=oe(n,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&s.getLogger(this).error("WebGL context has alpha channel even though no alpha channel was requested");const{container:o}=e;!this._rctx.contextAttributes.alpha&&has("safari")>=11&&(o.style.backgroundColor="black"),o.contains(r)||o.appendChild(r)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("textureFloatLinear")}get _viewingMode(){return this.stage.viewingMode}get stage(){return this.view.stage}getObjectAndLayerIdColor(e){return this.olidRenderHelper?.getObjectAndLayerIdColor(e)}get componentObjectCollection(){return this._componentObjectCollection??=new v(this.renderer.renderPassManager,this._viewingMode,this.view.spatialReference.isWebMercator),this._componentObjectCollection}updateQualitySettings(e){null!=this.test?.time&&null!=e.fadeDuration&&(this.test.savedFadeDuration=e.fadeDuration,e.fadeDuration=m(0)),this._rctx.updateOptions({maxPreferredTexturePixels:this.view.qualitySettings.maxTexturePixels})}get fog(){return r(this._fog.value)}};function oe(e,t){const r=new V(t);if(te.enabled){let t=ae.get(e);return 1===t?.refCount?(t.configure(r),t.ref(),t):(t=new z(e,r),ae.set(e,t),t.ref(),t)}return new z(e,r)}e([u({type:Boolean,readOnly:!0})],ne.prototype,"updating",null),e([u({constructOnly:!0})],ne.prototype,"view",void 0),e([u({readOnly:!0})],ne.prototype,"componentObjectCollection",null),e([u()],ne.prototype,"_componentObjectCollection",void 0),e([u()],ne.prototype,"_needsUpdate",void 0),e([u()],ne.prototype,"_needsWaterReflectionUpdate",void 0),ne=e([f("esri.views.3d.webgl-engine.parts.RenderView")],ne);const ae=Y();export{ne as RenderView};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../core/shaderLibrary/ScreenSizeScaling.glsl.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import"../core/shaderLibrary/attributes/VertexColor.glsl.js";import"../core/shaderLibrary/shading/VisualVariables.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float3PassUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/glsl.js";import"./OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/ColorMaterial.glsl.js";
2
+ import"../core/shaderLibrary/ScreenSizeScaling.glsl.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import"../core/shaderLibrary/attributes/VertexColor.glsl.js";import"../core/shaderLibrary/shading/VisualVariables.glsl.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float3PassUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/glsl.js";import"./OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/ColorMaterial.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../core/shaderLibrary/output/ReadDepth.glsl.js";import"../core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import"../core/shaderModules/Float2BindUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{C as CompositingPassParameters,b as build}from"../../../../chunks/Compositing.glsl.js";
2
+ import"../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../core/shaderLibrary/output/ReadDepth.glsl.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{C as CompositingPassParameters,b as build}from"../../../../chunks/Compositing.glsl.js";
@@ -1,22 +1,22 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{set as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{RejectBySlicePass as i}from"../core/shaderLibrary/Slice.glsl.js";import{DepthConversion as n}from"../core/shaderLibrary/output/DepthConversion.glsl.js";import{positionOutsideClipSpace as r}from"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{GaussianSplatCovariance as t}from"../core/shaderLibrary/util/GaussianSplatCovariance.glsl.js";import{GaussianSplatEvaluation as s}from"../core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js";import{GaussianSplatTextureFetch as o}from"../core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js";import{GaussianSplatUnpacking as c}from"../core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js";import{QuaternionToRotationMatrix as l}from"../core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js";import{Float2BindUniform as u}from"../core/shaderModules/Float2BindUniform.js";import{Float2PassUniform as d}from"../core/shaderModules/Float2PassUniform.js";import{Float3PassUniform as p}from"../core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as m}from"../core/shaderModules/FloatPassUniform.js";import{glsl as f,If as v}from"../core/shaderModules/glsl.js";import{Matrix4BindUniform as g}from"../core/shaderModules/Matrix4BindUniform.js";import{Texture2DUintPassUniform as x}from"../core/shaderModules/Texture2DUintPassUniform.js";function y(e,n){const{clippingEnabled:r}=n,{fragment:d,varyings:v,vertex:y}=e;v.add("gaussianCoordinates","vec2"),v.add("gaussianLogAlphaCutoff","float"),v.add("fragmentPositionCameraRelative","vec3"),y.uniforms.add(new x("splatOrderTexture",a=>a.splatOrder),new x("splatAtlasTexture",a=>a.splatAtlas),new x("splatHeaderTexture",a=>a.splatHeader),new m("minSplatRadius",a=>a.minSplatRadius),new u("inverseScreenSize",({camera:e})=>a(D,1/e.fullWidth,1/e.fullHeight)),new g("proj",a=>a.camera.projectionMatrix),new g("view",a=>a.camera.viewMatrix),new u("nearFar",a=>a.camera.nearFar)),r&&(y.uniforms.add(new p("clipMin",a=>a.clipMinCameraRelative),new p("clipMax",a=>a.clipMaxCameraRelative)),d.uniforms.add(new p("clipMin",a=>a.clipMinCameraRelative),new p("clipMax",a=>a.clipMaxCameraRelative))),y.include(c),y.include(o),y.include(l),y.include(t),y.include(s),y.include(i,n),d.include(s),d.include(i,n),d.main.add(f`
3
- ${z(n)}
4
- `)}function h(a,e){a.include(y,e),a.vertex.uniforms.add(new m("focalLength",a=>a.focalLength),new d("tanFov",a=>a.tanFov)),e.preciseDepth?(a.include(P),a.vertex.uniforms.add(new g("inverseProjectionMatrix",({camera:a})=>a.inverseProjectionMatrix)),a.fragment.include(n),a.fragment.code.add(f`float gaussianSplatDepth() {
2
+ import{RejectBySlicePass as a}from"../core/shaderLibrary/Slice.glsl.js";import{DepthConversion as e}from"../core/shaderLibrary/output/DepthConversion.glsl.js";import{positionOutsideClipSpace as i}from"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{inverseProjMatrix as n,inverseScreenSize as t,projMatrix as s,viewMatrix as r,nearFar as o}from"../core/shaderLibrary/util/cameraUniforms.js";import{GaussianSplatCovariance as c}from"../core/shaderLibrary/util/GaussianSplatCovariance.glsl.js";import{GaussianSplatEvaluation as l}from"../core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js";import{GaussianSplatTextureFetch as u}from"../core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js";import{GaussianSplatUnpacking as d}from"../core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js";import{QuaternionToRotationMatrix as p}from"../core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js";import{Float2PassUniform as f}from"../core/shaderModules/Float2PassUniform.js";import{Float3PassUniform as m}from"../core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as v}from"../core/shaderModules/FloatPassUniform.js";import{glsl as g,If as x}from"../core/shaderModules/glsl.js";import{Texture2DUintPassUniform as y}from"../core/shaderModules/Texture2DUintPassUniform.js";function h(e,i){const{clippingEnabled:n}=i,{fragment:f,varyings:x,vertex:h}=e;x.add("gaussianCoordinates","vec2"),x.add("gaussianLogAlphaCutoff","float"),x.add("fragmentPositionCameraRelative","vec3"),h.uniforms.add(new y("splatOrderTexture",a=>a.splatOrder),new y("splatAtlasTexture",a=>a.splatAtlas),new y("splatHeaderTexture",a=>a.splatHeader),new v("minSplatRadius",a=>a.minSplatRadius),t,s,r,o),n&&(h.uniforms.add(new m("clipMin",a=>a.clipMinCameraRelative),new m("clipMax",a=>a.clipMaxCameraRelative)),f.uniforms.add(new m("clipMin",a=>a.clipMinCameraRelative),new m("clipMax",a=>a.clipMaxCameraRelative))),h.include(d),h.include(u),h.include(p),h.include(c),h.include(l),h.include(a,i),f.include(l),f.include(a,i),f.main.add(g`
3
+ ${D(i)}
4
+ `)}function P(a,i){a.include(h,i),a.vertex.uniforms.add(new v("focalLength",a=>a.focalLength),new f("tanFov",a=>a.tanFov)),i.preciseDepth?(a.include(R),a.vertex.uniforms.add(n),a.fragment.include(e),a.fragment.code.add(g`float gaussianSplatDepth() {
5
5
  float rayDepth = gaussianSplatRayDepth();
6
6
  return delinearizeDepth(-rayDepth);
7
- }`)):a.fragment.code.add(f`float gaussianSplatDepth() {
7
+ }`)):a.fragment.code.add(g`float gaussianSplatDepth() {
8
8
  return gl_FragCoord.z;
9
- }`)}function P(a){a.varyings.add("rayGaussianFactor","vec4"),a.fragment.code.add(f`float gaussianSplatRayDepth() {
9
+ }`)}function R(a){a.varyings.add("rayGaussianFactor","vec4"),a.fragment.code.add(g`float gaussianSplatRayDepth() {
10
10
  return rayGaussianFactor.w / dot(rayGaussianFactor.xyz, rayGaussianFactor.xyz);
11
- }`)}function R(a){a.uniforms.add(new x("splatFadingTexture",a=>a.splatFading)),a.code.add(f`float applyGaussianSplatFading(float opacity, uint gaussianIndex) {
11
+ }`)}function S(a){a.uniforms.add(new y("splatFadingTexture",a=>a.splatFading)),a.code.add(g`float applyGaussianSplatFading(float opacity, uint gaussianIndex) {
12
12
  uint pageIndex = fetchGaussianPageIndex(gaussianIndex);
13
13
  uint fadingTextureWidth = uint(textureSize(splatFadingTexture, 0).x);
14
14
  uint fadeX = pageIndex % fadingTextureWidth;
15
15
  uint fadeY = pageIndex / fadingTextureWidth;
16
16
  uint opacityModifier = texelFetch(splatFadingTexture, ivec2(fadeX, fadeY), 0).r;
17
17
  return opacity * float(opacityModifier) / 255.0;
18
- }`)}function S(a,e){const{clippingEnabled:i,hasSlicePlane:n}=a;return f`
19
- gl_Position = ${r};
18
+ }`)}function C(a,e){const{clippingEnabled:n,hasSlicePlane:t}=a;return g`
19
+ gl_Position = ${i};
20
20
 
21
21
  if (opacity < ${e}) {
22
22
  return;
@@ -24,14 +24,14 @@ return opacity * float(opacityModifier) / 255.0;
24
24
 
25
25
  vec3 cameraRelativePosition = fetchGaussianCameraRelativePosition(gaussianIndex, packedGaussian);
26
26
 
27
- ${v(i,f`
27
+ ${x(n,g`
28
28
  if (cameraRelativePosition.x < clipMin.x || cameraRelativePosition.y < clipMin.y || cameraRelativePosition.z < clipMin.z ||
29
29
  cameraRelativePosition.x > clipMax.x || cameraRelativePosition.y > clipMax.y || cameraRelativePosition.z > clipMax.z) {
30
30
  return;
31
31
  }
32
32
  `)}
33
33
 
34
- ${v(n,f`
34
+ ${x(t,g`
35
35
  if (rejectBySlice(cameraRelativePosition)) {
36
36
  return;
37
37
  }
@@ -42,11 +42,11 @@ return opacity * float(opacityModifier) / 255.0;
42
42
  if (viewPos.z > -nearFar.x || viewPos.z < -nearFar.y) {
43
43
  return;
44
44
  }
45
- `}const C=f`vec3 gaussianScale = unpackScale(packedGaussian);
46
- mat3 gaussianRotation = quaternionToRotationMatrix(unpackQuaternion(packedGaussian));`;function w(a){return f`
45
+ `}const G=g`vec3 gaussianScale = unpackScale(packedGaussian);
46
+ mat3 gaussianRotation = quaternionToRotationMatrix(unpackQuaternion(packedGaussian));`;function w(a){return g`
47
47
  vec3 inverseGaussianScale = 1.0 / gaussianScale;
48
48
  vec3 rayGaussianFactorCenter = (gaussianRotation * ${a}) * inverseGaussianScale;
49
- `}function M(a,e){return f`
49
+ `}function M(a,e){return g`
50
50
  float determinant = computeGaussianCovarianceDeterminant(covariance2D);
51
51
  if (determinant <= 0.0) {
52
52
  return;
@@ -61,7 +61,7 @@ mat3 gaussianRotation = quaternionToRotationMatrix(unpackQuaternion(packedGaussi
61
61
  if (rejectGaussianByMinimumRadius(maxRadius, ${e}, minSplatRadius)) {
62
62
  return;
63
63
  }
64
- `}const G=f`vec2 clipSpacePixelScale = 2.0 * inverseScreenSize;
64
+ `}const F=g`vec2 clipSpacePixelScale = 2.0 * inverseScreenSize;
65
65
  if (rejectGaussianByScreenBounds(ndcPos.xy, screenRadii, clipSpacePixelScale)) {
66
66
  return;
67
67
  }
@@ -70,32 +70,32 @@ gaussianCoordinates = quadCorner * sqrt(gaussianEllipseThreshold);
70
70
  float inverseRadiusX = inversesqrt(covariance2D.x);
71
71
  vec2 choleskyAxisX = covariance2D.xy * inverseRadiusX;
72
72
  vec2 choleskyAxisY = vec2(0.0, sqrt(determinant) * inverseRadiusX);
73
- vec2 offsetFromCenter = gaussianCoordinates.x * choleskyAxisX + gaussianCoordinates.y * choleskyAxisY;`;function F(a,e){return f`
74
- ${S(a,f.float(e))}
73
+ vec2 offsetFromCenter = gaussianCoordinates.x * choleskyAxisX + gaussianCoordinates.y * choleskyAxisY;`;function z(a,e){return g`
74
+ ${C(a,g.float(e))}
75
75
 
76
- ${C}
76
+ ${G}
77
77
  vec3 covariance2D = computeGaussianCovariance2D(viewPos.xyz, focalLength, tanFov, gaussianScale, gaussianRotation, view);
78
78
  float minimumRadiusOpacity = opacity;
79
79
  float opacityScale = regularizeGaussianCovariance(covariance2D);
80
80
  opacity *= opacityScale;
81
- if (opacity < ${f.float(e)}) {
81
+ if (opacity < ${g.float(e)}) {
82
82
  return;
83
83
  }
84
84
 
85
- ${M(`${f.float(Math.log(e))} - log(opacity)`,"minimumRadiusOpacity")}
85
+ ${M(`${g.float(Math.log(e))} - log(opacity)`,"minimumRadiusOpacity")}
86
86
  ${j(a)}
87
- `}function j(a){return f`
87
+ `}function j(a){return g`
88
88
  vec4 projPos = proj * viewPos;
89
89
  float invW = 1.0 / (projPos.w + 1e-7);
90
90
  vec3 ndcPos = projPos.xyz * invW;
91
- ${G}
91
+ ${F}
92
92
 
93
93
  float viewSpacePixelScale = -viewPos.z / focalLength;
94
94
  vec3 fragmentViewOffset = vec3(offsetFromCenter * viewSpacePixelScale, 0.0);
95
95
  fragmentPositionCameraRelative = cameraRelativePosition + transpose(mat3(view)) * fragmentViewOffset;
96
96
 
97
97
  vec2 quadClipPosition = ndcPos.xy + offsetFromCenter * clipSpacePixelScale - inverseScreenSize;
98
- ${v(a.preciseDepth,f`
98
+ ${x(a.preciseDepth,g`
99
99
  ${w("cameraRelativePosition")}
100
100
  vec3 rayViewPoint = (inverseProjectionMatrix * vec4(quadClipPosition, -1.0, 1.0)).xyz;
101
101
  vec3 rayView = vec3(-rayViewPoint.xy / rayViewPoint.z, -1.0);
@@ -103,17 +103,17 @@ vec2 offsetFromCenter = gaussianCoordinates.x * choleskyAxisX + gaussianCoordina
103
103
  rayGaussianFactor = vec4(rayGaussianFactorRay, dot(rayGaussianFactorCenter, rayGaussianFactorRay));
104
104
  `)}
105
105
  gl_Position = vec4(quadClipPosition, ndcPos.z, 1.0);
106
- `}function z(a){const{clippingEnabled:e,hasSlicePlane:i}=a;return f`
107
- ${v(e,f`
106
+ `}function D(a){const{clippingEnabled:e,hasSlicePlane:i}=a;return g`
107
+ ${x(e,g`
108
108
  if (fragmentPositionCameraRelative.x < clipMin.x || fragmentPositionCameraRelative.y < clipMin.y || fragmentPositionCameraRelative.z < clipMin.z ||
109
109
  fragmentPositionCameraRelative.x > clipMax.x || fragmentPositionCameraRelative.y > clipMax.y || fragmentPositionCameraRelative.z > clipMax.z) {
110
110
  discard;
111
111
  }
112
112
  `)}
113
- ${v(i,f`if (rejectBySlice(fragmentPositionCameraRelative)) { discard; }`)}
113
+ ${x(i,g`if (rejectBySlice(fragmentPositionCameraRelative)) { discard; }`)}
114
114
 
115
115
  float gaussianExponent = evaluateGaussianExponent(gaussianCoordinates);
116
116
  if (gaussianExponent > 0.0 || gaussianExponent < gaussianLogAlphaCutoff) {
117
117
  discard;
118
118
  }
119
- `}const D=e();export{R as GaussianSplatFading,y as GaussianSplatPass,h as GaussianSplatPerspectivePass,M as gaussianSplatComputeEllipse,G as gaussianSplatComputeQuad,S as gaussianSplatCullAndTransformVertex,F as gaussianSplatPerspectiveVertex,C as gaussianSplatUnpackScaleAndRotation};
119
+ `}export{S as GaussianSplatFading,h as GaussianSplatPass,P as GaussianSplatPerspectivePass,M as gaussianSplatComputeEllipse,F as gaussianSplatComputeQuad,C as gaussianSplatCullAndTransformVertex,z as gaussianSplatPerspectiveVertex,G as gaussianSplatUnpackScaleAndRotation};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{SliceConfiguration as i}from"../core/shaderLibrary/Slice.glsl.js";import{parameter as e}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";class o extends i{constructor(t){super(),this.spherical=t,this.alphaCutoff=1,this.fadingEnabled=!1,this.clippingEnabled=!1,this.writeNormals=!1,this.preciseDepth=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.output=0,this.hasEmission=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.pbrMode=0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!0}}function r(t){switch(t){case 2:return.005;case 0:return.05;default:return.01}}t([e({count:3})],o.prototype,"alphaCutoff",void 0),t([e()],o.prototype,"fadingEnabled",void 0),t([e()],o.prototype,"clippingEnabled",void 0),t([e()],o.prototype,"writeNormals",void 0),t([e()],o.prototype,"preciseDepth",void 0),t([e()],o.prototype,"receiveShadows",void 0),t([e()],o.prototype,"hasShadowHighlights",void 0),t([e({count:12})],o.prototype,"output",void 0),t([e()],o.prototype,"receiveAmbientOcclusion",void 0),t([e()],o.prototype,"receiveGlobalIllumination",void 0);export{o as GaussianSplatTechniqueConfiguration,r as getGaussianSplatAlphaCutoffValue};
2
+ import{__decorate as t}from"tslib";import{SliceConfiguration as i}from"../core/shaderLibrary/Slice.glsl.js";import{parameter as e}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";class o extends i{constructor(t){super(),this.spherical=t,this.alphaCutoff=1,this.fadingEnabled=!1,this.clippingEnabled=!1,this.writeNormals=!1,this.preciseDepth=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.output=0,this.hasEmission=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.pbrMode=0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.draped=!1,this.hasColorTexture=!0}}function r(t){switch(t){case 2:return.005;case 0:return.05;default:return.01}}t([e({count:3})],o.prototype,"alphaCutoff",void 0),t([e()],o.prototype,"fadingEnabled",void 0),t([e()],o.prototype,"clippingEnabled",void 0),t([e()],o.prototype,"writeNormals",void 0),t([e()],o.prototype,"preciseDepth",void 0),t([e()],o.prototype,"receiveShadows",void 0),t([e()],o.prototype,"hasShadowHighlights",void 0),t([e({count:12})],o.prototype,"output",void 0),t([e()],o.prototype,"receiveAmbientOcclusion",void 0),t([e()],o.prototype,"receiveGlobalIllumination",void 0);export{o as GaussianSplatTechniqueConfiguration,r as getGaussianSplatAlphaCutoffValue};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../core/libs/gl-matrix-2/math/vec2.js";import"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import"../core/shaderLibrary/ShaderOutput.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import"../core/shaderLibrary/hud/AlignPixel.glsl.js";import"../core/shaderLibrary/hud/HUD.glsl.js";import"../core/shaderLibrary/output/DepthConversion.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import"../core/shaderLibrary/shading/VisualVariables.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float2PassUniform.js";import"../core/shaderModules/Float4BindUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/IntegerPassUniform.js";import"../core/shaderModules/Texture2DBindUniform.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../effects/focusArea/FocusArea.js";import"./alphaCutoff.glsl.js";import"./OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{a as anchorPosition,b as build}from"../../../../chunks/HUDMaterial.glsl.js";
2
+ import"../../../../core/libs/gl-matrix-2/math/vec2.js";import"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import"../core/shaderLibrary/ShaderOutput.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import"../core/shaderLibrary/hud/AlignPixel.glsl.js";import"../core/shaderLibrary/hud/HUD.glsl.js";import"../core/shaderLibrary/output/DepthConversion.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import"../core/shaderLibrary/shading/VisualVariables.glsl.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float2PassUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/IntegerPassUniform.js";import"../core/shaderModules/Texture2DBindUniform.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../effects/focusArea/FocusArea.js";import"./alphaCutoff.glsl.js";import"./OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{a as anchorPosition,b as build}from"../../../../chunks/HUDMaterial.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../core/libs/gl-matrix-2/math/vec2.js";import"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/hud/AlignPixel.glsl.js";import"../core/shaderLibrary/hud/HUD.glsl.js";import"../core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import"../core/shaderModules/Float2BindUniform.js";import"../core/shaderModules/Float2PassUniform.js";import"../core/shaderModules/Float4BindUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"./OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/LineCallout.glsl.js";
2
+ import"../../../../core/libs/gl-matrix-2/math/vec2.js";import"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/hud/AlignPixel.glsl.js";import"../core/shaderLibrary/hud/HUD.glsl.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import"../core/shaderModules/Float2BindUniform.js";import"../core/shaderModules/Float2PassUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"./OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/LineCallout.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as i}from"../materials/DefaultTechniqueConfiguration.js";class r extends i{constructor(e){super(),this.spherical=e,this.screenCenterOffsetUnitsEnabled=!1,this.hasVerticalOffset=!1,this.hasScreenSizePerspective=!1,this.hudDepth=!1,this.hudDepthAlignStart=!1,this.writeDepth=!1,this.draped=!1,this.oitPremultipliedAlpha=!0,this.snowCover=!1,this.renderOccluded=!1,this.emissionSource=0,this.textureCoordinateType=0,this.hasVertexCenterOffset=!0}}e([t()],r.prototype,"screenCenterOffsetUnitsEnabled",void 0),e([t()],r.prototype,"hasVerticalOffset",void 0),e([t()],r.prototype,"hasScreenSizePerspective",void 0),e([t()],r.prototype,"hudDepth",void 0),e([t()],r.prototype,"hudDepthAlignStart",void 0);export{r as LineCalloutTechniqueConfiguration};
2
+ import{__decorate as t}from"tslib";import{parameter as e}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{LineTechniqueConfiguration as i}from"./LineTechniqueConfiguration.js";class r extends i{constructor(){super(...arguments),this.screenCenterOffsetUnitsEnabled=!1,this.hasVerticalOffset=!1,this.hudDepth=!1,this.hudDepthAlignStart=!1,this.writeDepth=!1,this.oitPremultipliedAlpha=!0,this.hasSliceTranslatedView=!1,this.hasVertexCenterOffset=!0}}t([e()],r.prototype,"screenCenterOffsetUnitsEnabled",void 0),t([e()],r.prototype,"hasVerticalOffset",void 0),t([e()],r.prototype,"hudDepth",void 0),t([e()],r.prototype,"hudDepthAlignStart",void 0);export{r as LineCalloutTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../support/engineContent/marker.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/MarkerSizing.glsl.js";import"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/NoPerspective.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float2BindUniform.js";import"../core/shaderModules/Float4BindUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatBindUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4BindUniform.js";import"../core/shaderModules/Texture2DPassUniform.js";import"./alphaCutoff.glsl.js";import"./OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/LineMarker.glsl.js";
2
+ import"../../support/engineContent/marker.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/MarkerSizing.glsl.js";import"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/NoPerspective.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatBindUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DPassUniform.js";import"./alphaCutoff.glsl.js";import"./OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/LineMarker.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as i}from"../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../support/buffer/glUtil.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as l}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as n,depthTest as o,blending as c}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as p,stencilBaseAllZeros as u,stencilWriteMaskOn as a,stencilToolTransparentOccluder as d,depthCompareAlways as h,stencilToolMaskOccluder as m,stencilWriteMaskOff as f,depthCompareLess as P}from"../lib/StencilUtils.js";import{L as g}from"../../../../chunks/LineMarker.glsl.js";import{makePipelineState as T,defaultColorWrite as b,unpremultipliedAlphaToPremultipliedAlpha as W}from"../../../webgl/renderState.js";let _=class extends s{constructor(e,i){super(e,i,t(S(i))),this.shader=new l(g,()=>import("./LineMarker.glsl.js"))}_makePipelineState(e,i){const{output:t,space:r,hasOccludees:l}=e;return T({blending:c(t,!1,e.emissionDimmingPass),depthTest:0===r?null:o(t),depthWrite:n(e),colorWrite:b,stencilWrite:l?a:null,stencilTest:l?i?p:u:null,polygonOffset:{factor:0,units:-10}})}initializePipeline(e){return e.occluder?(this._occluderPipelineTransparent=T({blending:W,depthTest:h,depthWrite:null,colorWrite:b,stencilWrite:null,stencilTest:d}),this._occluderPipelineOpaque=T({blending:W,depthTest:h,depthWrite:null,colorWrite:b,stencilWrite:f,stencilTest:m}),this._occluderPipelineMaskWrite=T({blending:null,depthTest:P,depthWrite:null,colorWrite:null,stencilWrite:a,stencilTest:p})):this._occluderPipelineTransparent=this._occluderPipelineOpaque=this._occluderPipelineMaskWrite=null,this._occludeePipelineState=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,i,t){return t?this._occludeePipelineState:11===e.occluder?this._occluderPipelineTransparent??super.getPipeline(e,i,t):10===e.occluder?this._occluderPipelineOpaque??super.getPipeline(e,i,t):this._occluderPipelineMaskWrite??super.getPipeline(e,i,t)}};function S(e){const i=r().vec3f("position").vec4f16("previousDelta").vec2f16("uv0");return e.hasVVColor?i.f32("colorFeatureAttribute"):i.vec4u8("color",{glNormalized:!0}),e.hasVVOpacity&&i.f32("opacityFeatureAttribute"),e.hasVVSize?i.f32("sizeFeatureAttribute"):i.f16("size"),e.worldSpace&&i.vec3f16("normal"),i.freeze()}_=e([i("esri.views.3d.webgl-engine.shaders.LineMarkerTechnique")],_);export{_ as LineMarkerTechnique,S as getLayout};
2
+ import{__decorate as e}from"tslib";import{subclass as i}from"../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../support/buffer/glUtil.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as l}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as n,depthTest as o,blending as c}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as p,stencilBaseAllZeros as u,stencilWriteMaskOn as a,stencilToolTransparentOccluder as d,depthCompareAlways as h,stencilToolMaskOccluder as m,stencilWriteMaskOff as f,depthCompareLess as P}from"../lib/StencilUtils.js";import{lineMarkerPolygonOffset as g}from"../materials/PolygonOffset.js";import{L as T}from"../../../../chunks/LineMarker.glsl.js";import{makePipelineState as b,defaultColorWrite as W,unpremultipliedAlphaToPremultipliedAlpha as _}from"../../../webgl/renderState.js";let S=class extends s{constructor(e,i){super(e,i,t(j(i))),this.shader=new l(T,()=>import("./LineMarker.glsl.js"))}_makePipelineState(e,i){const{output:t,draped:r,hasOccludees:l}=e;return b({blending:c(t,!1,e.emissionDimmingPass),depthTest:r?null:o(t),depthWrite:n(e),colorWrite:W,stencilWrite:l?a:null,stencilTest:l?i?p:u:null,polygonOffset:g})}initializePipeline(e){return e.occluder?(this._occluderPipelineTransparent=b({blending:_,depthTest:h,depthWrite:null,colorWrite:W,stencilWrite:null,stencilTest:d}),this._occluderPipelineOpaque=b({blending:_,depthTest:h,depthWrite:null,colorWrite:W,stencilWrite:f,stencilTest:m}),this._occluderPipelineMaskWrite=b({blending:null,depthTest:P,depthWrite:null,colorWrite:null,stencilWrite:a,stencilTest:p})):this._occluderPipelineTransparent=this._occluderPipelineOpaque=this._occluderPipelineMaskWrite=null,this._occludeePipelineState=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,i,t){return t?this._occludeePipelineState:11===e.occluder?this._occluderPipelineTransparent??super.getPipeline(e,i,t):10===e.occluder?this._occluderPipelineOpaque??super.getPipeline(e,i,t):this._occluderPipelineMaskWrite??super.getPipeline(e,i,t)}};function j(e){const i=r().vec3f("position").vec4f16("previousDelta").vec2f16("uv0");return e.hasVVColor?i.f32("colorFeatureAttribute"):i.vec4u8("color",{glNormalized:!0}),e.hasVVOpacity&&i.f32("opacityFeatureAttribute"),e.hasVVSize?i.f32("sizeFeatureAttribute"):i.f16("size"),e.worldSpace&&i.vec3f16("normal"),i.freeze()}S=e([i("esri.views.3d.webgl-engine.shaders.LineMarkerTechnique")],S);export{S as LineMarkerTechnique,j as getLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as o}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as t}from"../materials/DefaultTechniqueConfiguration.js";class i extends t{constructor(e){super(),this.spherical=e,this.emissionSource=0,this.space=1,this.anchor=0,this.occluder=!1,this.hideOnShortSegments=!1,this.hasCap=!1,this.hasTip=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVVOpacity=!1,this.hasOccludees=!1,this.hasScreenSizePerspective=!1,this.worldSized=!1,this.textureCoordinateType=0,this.occlusionPass=!1,this.hasVVInstancing=!1,this.hasSliceTranslatedView=!0,this.olidColorInstanced=!1,this.overlayEnabled=!1,this.snowCover=!1,this.renderOccluded=!1}get draped(){return 0===this.space}get worldSpace(){return 2===this.space}}e([o({count:8})],i.prototype,"emissionSource",void 0),e([o({count:3})],i.prototype,"space",void 0),e([o({count:2})],i.prototype,"anchor",void 0),e([o()],i.prototype,"occluder",void 0),e([o()],i.prototype,"hideOnShortSegments",void 0),e([o()],i.prototype,"hasCap",void 0),e([o()],i.prototype,"hasTip",void 0),e([o()],i.prototype,"hasVVSize",void 0),e([o()],i.prototype,"hasVVColor",void 0),e([o()],i.prototype,"hasVVOpacity",void 0),e([o()],i.prototype,"hasOccludees",void 0),e([o()],i.prototype,"hasScreenSizePerspective",void 0),e([o()],i.prototype,"worldSized",void 0);export{i as LineMarkerTechniqueConfiguration};
2
+ import{__decorate as o}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{LineTechniqueConfiguration as i}from"./LineTechniqueConfiguration.js";class e extends i{constructor(){super(...arguments),this.anchor=0,this.worldSpace=!1,this.hideOnShortSegments=!1,this.hasCap=!1,this.hasTip=!1,this.occlusionPass=!1,this.olidColorInstanced=!1}}o([t({count:2})],e.prototype,"anchor",void 0),o([t()],e.prototype,"worldSpace",void 0),o([t()],e.prototype,"hideOnShortSegments",void 0),o([t()],e.prototype,"hasCap",void 0),o([t()],e.prototype,"hasTip",void 0);export{e as LineMarkerTechniqueConfiguration};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import{parameter as o}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as i}from"../materials/DefaultTechniqueConfiguration.js";class t extends i{constructor(e){super(),this.spherical=e,this.emissionSource=0,this.draped=!1,this.worldSized=!1,this.hasScreenSizePerspective=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVVOpacity=!1,this.hasOccludees=!1,this.occluder=!1,this.textureCoordinateType=0,this.hasVVInstancing=!1,this.hasSliceTranslatedView=!0,this.overlayEnabled=!1,this.snowCover=!1,this.renderOccluded=!1}}e([o({count:8})],t.prototype,"emissionSource",void 0),e([o()],t.prototype,"draped",void 0),e([o()],t.prototype,"worldSized",void 0),e([o()],t.prototype,"hasScreenSizePerspective",void 0),e([o()],t.prototype,"hasVVSize",void 0),e([o()],t.prototype,"hasVVColor",void 0),e([o()],t.prototype,"hasVVOpacity",void 0),e([o()],t.prototype,"hasOccludees",void 0),e([o()],t.prototype,"occluder",void 0);export{t as LineTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as r}from"../materials/DefaultTechniqueConfiguration.js";class o extends r{constructor(){super(...arguments),this.enableOITOffset=!1,this.transparent=!1,this.writeDepth=!0,this.polygonOffset=3,this.draped=!1,this.emissionSource=0,this.snowCover=!1,this.renderOccluded=!1,this.textureCoordinateType=0}}e([t()],o.prototype,"enableOITOffset",void 0),e([t()],o.prototype,"transparent",void 0),e([t()],o.prototype,"writeDepth",void 0);export{o as MeasurementArrowTechniqueConfiguration};
2
+ import{__decorate as t}from"tslib";import{parameter as e}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{LineTechniqueConfiguration as o}from"./LineTechniqueConfiguration.js";class r extends o{constructor(){super(...arguments),this.enableOITOffset=!1,this.transparent=!1,this.writeDepth=!0,this.polygonOffset=3}}t([e()],r.prototype,"enableOITOffset",void 0),t([e()],r.prototype,"transparent",void 0),t([e()],r.prototype,"writeDepth",void 0);export{r as MeasurementArrowTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as r}from"../materials/DefaultTechniqueConfiguration.js";class o extends r{constructor(){super(...arguments),this.hasVertexColors=!1,this.transparent=!1,this.hasOccludees=!1,this.writeDepth=!0,this.draped=!1,this.snowCover=!1,this.renderOccluded=!1,this.emissionSource=0,this.textureCoordinateType=0}}e([t()],o.prototype,"hasVertexColors",void 0),e([t()],o.prototype,"transparent",void 0),e([t()],o.prototype,"hasOccludees",void 0),e([t()],o.prototype,"writeDepth",void 0);export{o as NativeLineTechniqueConfiguration};
2
+ import{__decorate as t}from"tslib";import{parameter as r}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{LineTechniqueConfiguration as e}from"./LineTechniqueConfiguration.js";class o extends e{constructor(){super(...arguments),this.hasVertexColors=!1,this.transparent=!1,this.writeDepth=!0}}t([r()],o.prototype,"hasVertexColors",void 0),t([r()],o.prototype,"transparent",void 0),t([r()],o.prototype,"writeDepth",void 0);export{o as NativeLineTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../core/shaderLibrary/output/ReadDepth.glsl.js";import"../core/shaderModules/BooleanPassUniform.js";import"../core/shaderModules/Float2BindUniform.js";import"../core/shaderModules/Float2PassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/IntegerPassUniform.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{N as NavigationDepthPassParameters,b as build}from"../../../../chunks/NavigationDepth.glsl.js";
2
+ import"../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../core/shaderLibrary/output/ReadDepth.glsl.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderModules/BooleanPassUniform.js";import"../core/shaderModules/Float2PassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/IntegerPassUniform.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{N as NavigationDepthPassParameters,b as build}from"../../../../chunks/NavigationDepth.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../core/libs/gl-matrix-2/math/mat4.js";import"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4BindUniform.js";import"../core/shaderModules/Matrix4DrawUniform.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{O as OccludedGeometryDepthPassParameters,b as build}from"../../../../chunks/OccludedGeometryDepth.glsl.js";
2
+ import"../../../../core/libs/gl-matrix-2/math/mat4.js";import"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4DrawUniform.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{O as OccludedGeometryDepthPassParameters,b as build}from"../../../../chunks/OccludedGeometryDepth.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../core/mathUtils.js";import"../../../../core/libs/gl-matrix-2/math/mat4.js";import"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../../../core/libs/gl-matrix-2/math/vec2.js";import"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../../core/libs/gl-matrix-2/math/vec3.js";import"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../../../../geometry/support/aaBoundingBox.js";import"../core/shaderLibrary/ShaderOutput.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import"../core/shaderModules/Float2DrawUniform.js";import"../core/shaderModules/Float2PassUniform.js";import"../core/shaderModules/Float3DrawUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4BindUniform.js";import"../core/shaderModules/Matrix4DrawUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{a as PointRendererDrawParameters,P as PointRendererPassParameters,c as build,g as getMaxPointSizeScreenspace}from"../../../../chunks/PointRenderer.glsl.js";
2
+ import"../../../../core/mathUtils.js";import"../../../../core/libs/gl-matrix-2/math/mat4.js";import"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../../../core/libs/gl-matrix-2/math/vec2.js";import"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../../core/libs/gl-matrix-2/math/vec3.js";import"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../../../../geometry/support/aaBoundingBox.js";import"../core/shaderLibrary/ShaderOutput.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderModules/Float2DrawUniform.js";import"../core/shaderModules/Float2PassUniform.js";import"../core/shaderModules/Float3DrawUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4DrawUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{a as PointRendererDrawParameters,P as PointRendererPassParameters,c as build,g as getMaxPointSizeScreenspace}from"../../../../chunks/PointRenderer.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import"../core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/LineStipple.glsl.js";import"../core/shaderLibrary/shading/MainLighting.glsl.js";import"../core/shaderLibrary/shading/MarkerSizing.glsl.js";import"../core/shaderLibrary/shading/NormalUtils.glsl.js";import"../core/shaderLibrary/shading/PiUtils.glsl.js";import"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/NoPerspective.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float2BindUniform.js";import"../core/shaderModules/Float4BindUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatBindUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4BindUniform.js";import"./alphaCutoff.glsl.js";import"./AnimatedLine.glsl.js";import"./OutputColorHighlightOLID.glsl.js";import"./RibbonLineTextureBuffer.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build,n as numRoundJoinSubdivisions}from"../../../../chunks/RibbonLine.glsl.js";
2
+ import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import"../core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/LineStipple.glsl.js";import"../core/shaderLibrary/shading/MainLighting.glsl.js";import"../core/shaderLibrary/shading/MarkerSizing.glsl.js";import"../core/shaderLibrary/shading/NormalUtils.glsl.js";import"../core/shaderLibrary/shading/PiUtils.glsl.js";import"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/NoPerspective.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatBindUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"./alphaCutoff.glsl.js";import"./AnimatedLine.glsl.js";import"./OutputColorHighlightOLID.glsl.js";import"./RibbonLineTextureBuffer.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build,n as numRoundJoinSubdivisions}from"../../../../chunks/RibbonLine.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as o}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as e}from"../materials/TriangleTechniqueConfiguration.js";const i=16,r=8;class s extends e{constructor(o){super(),this.spherical=o,this.capType=0,this.pbrMode=0,this.emissionSource=0,this.animation=2,this.polygonOffsetIndex=0,this.numJoinSubdivisions=1,this.writeDepth=!1,this.shadingEnabled=!1,this.draped=!1,this.stippleEnabled=!1,this.stippleOffColorEnabled=!1,this.stipplePreferContinuous=!0,this.roundJoins=!1,this.applyMarkerOffset=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVVOpacity=!1,this.falloffEnabled=!1,this.innerColorEnabled=!1,this.hasOccludees=!1,this.occluder=!1,this.wireframe=!1,this.hasScreenSizePerspective=!1,this.worldSized=!1,this.imagePattern=!1,this.receiveAmbientOcclusion=!0,this.receiveGlobalIllumination=!0,this.textureCoordinateType=0,this.hasVVInstancing=!1,this.hasSliceTranslatedView=!0,this.overlayEnabled=!1,this.snowCover=!1,this.renderOccluded=!1,this.useCustomDTRExponentForWater=!1,this.hasColorTexture=!1,this.useFillLights=!1}get hasAnimation(){return 0!==this.animation}}o([t({count:3})],s.prototype,"capType",void 0),o([t({count:8})],s.prototype,"pbrMode",void 0),o([t({count:8})],s.prototype,"emissionSource",void 0),o([t({count:4})],s.prototype,"animation",void 0),o([t({count:i})],s.prototype,"polygonOffsetIndex",void 0),o([t({count:r})],s.prototype,"numJoinSubdivisions",void 0),o([t()],s.prototype,"writeDepth",void 0),o([t()],s.prototype,"shadingEnabled",void 0),o([t()],s.prototype,"draped",void 0),o([t()],s.prototype,"stippleEnabled",void 0),o([t()],s.prototype,"stippleOffColorEnabled",void 0),o([t()],s.prototype,"stipplePreferContinuous",void 0),o([t()],s.prototype,"roundJoins",void 0),o([t()],s.prototype,"applyMarkerOffset",void 0),o([t()],s.prototype,"hasVVSize",void 0),o([t()],s.prototype,"hasVVColor",void 0),o([t()],s.prototype,"hasVVOpacity",void 0),o([t()],s.prototype,"falloffEnabled",void 0),o([t()],s.prototype,"innerColorEnabled",void 0),o([t()],s.prototype,"hasOccludees",void 0),o([t()],s.prototype,"occluder",void 0),o([t()],s.prototype,"wireframe",void 0),o([t()],s.prototype,"hasScreenSizePerspective",void 0),o([t()],s.prototype,"worldSized",void 0),o([t()],s.prototype,"imagePattern",void 0),o([t()],s.prototype,"receiveAmbientOcclusion",void 0),o([t()],s.prototype,"receiveGlobalIllumination",void 0);export{r as NUM_JOIN_SUBDIVISION_COUNT,i as POLYGON_OFFSET_INDEX_COUNT,s as RibbonLineTechniqueConfiguration};
2
+ import{__decorate as o}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{LineTechniqueConfiguration as e}from"./LineTechniqueConfiguration.js";const i=16,n=8;class p extends e{constructor(){super(...arguments),this.capType=0,this.pbrMode=0,this.animation=2,this.polygonOffsetIndex=0,this.numJoinSubdivisions=1,this.polygonOffset=0,this.writeDepth=!1,this.transparent=!1,this.enableOITOffset=!0,this.shadingEnabled=!1,this.stippleEnabled=!1,this.stippleOffColorEnabled=!1,this.stipplePreferContinuous=!0,this.roundJoins=!1,this.applyMarkerOffset=!1,this.falloffEnabled=!1,this.innerColorEnabled=!1,this.wireframe=!1,this.imagePattern=!1,this.receiveAmbientOcclusion=!0,this.receiveGlobalIllumination=!0,this.useCustomDTRExponentForWater=!1,this.hasColorTexture=!1,this.useFillLights=!1}get hasAnimation(){return 0!==this.animation}}o([t({count:3})],p.prototype,"capType",void 0),o([t({count:8})],p.prototype,"pbrMode",void 0),o([t({count:4})],p.prototype,"animation",void 0),o([t({count:i})],p.prototype,"polygonOffsetIndex",void 0),o([t({count:n})],p.prototype,"numJoinSubdivisions",void 0),o([t({count:5})],p.prototype,"polygonOffset",void 0),o([t()],p.prototype,"writeDepth",void 0),o([t()],p.prototype,"transparent",void 0),o([t()],p.prototype,"enableOITOffset",void 0),o([t()],p.prototype,"shadingEnabled",void 0),o([t()],p.prototype,"stippleEnabled",void 0),o([t()],p.prototype,"stippleOffColorEnabled",void 0),o([t()],p.prototype,"stipplePreferContinuous",void 0),o([t()],p.prototype,"roundJoins",void 0),o([t()],p.prototype,"applyMarkerOffset",void 0),o([t()],p.prototype,"falloffEnabled",void 0),o([t()],p.prototype,"innerColorEnabled",void 0),o([t()],p.prototype,"wireframe",void 0),o([t()],p.prototype,"imagePattern",void 0),o([t()],p.prototype,"receiveAmbientOcclusion",void 0),o([t()],p.prototype,"receiveGlobalIllumination",void 0);export{n as NUM_JOIN_SUBDIVISION_COUNT,i as POLYGON_OFFSET_INDEX_COUNT,p as RibbonLineTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{Matrix4BindUniform as e}from"../core/shaderModules/Matrix4BindUniform.js";function i(i,r={needUVs:!0,needEyeDirection:!0}){i.attributes.add("position","vec2"),i.varyings.add("worldRay","vec3");const{needUVs:n,needEyeDirection:a}=r;i.vertex.uniforms.add(new e("inverseProjectionMatrix",e=>e.camera.inverseProjectionMatrix),new e("inverseViewMatrix",e=>e.camera.inverseViewMatrix)).main.add("\n gl_Position = vec4(position, 1, 1);\n\n vec3 posViewNear = (inverseProjectionMatrix * vec4(position, -1.0, 1.0)).xyz;\n worldRay = (inverseViewMatrix * vec4(posViewNear, 0)).xyz;\n "),n&&(i.varyings.add("uv","vec2"),i.vertex.main.add("uv = position * 0.5 + vec2(0.5);")),a&&(i.varyings.add("eyeDir","vec3"),i.vertex.main.add("eyeDir = posViewNear;"))}export{i as ScreenSpacePassAtmosphere};
2
+ import{inverseProjMatrix as e,inverseViewMatrix as i}from"../core/shaderLibrary/util/cameraUniforms.js";function r(r,n={needUVs:!0,needEyeDirection:!0}){r.attributes.add("position","vec2"),r.varyings.add("worldRay","vec3");const{needUVs:o,needEyeDirection:a}=n;r.vertex.uniforms.add(e,i).main.add("\n gl_Position = vec4(position, 1, 1);\n\n vec3 posViewNear = (inverseProjectionMatrix * vec4(position, -1.0, 1.0)).xyz;\n worldRay = (inverseViewMatrix * vec4(posViewNear, 0)).xyz;\n "),o&&(r.varyings.add("uv","vec2"),r.vertex.main.add("uv = position * 0.5 + vec2(0.5);")),a&&(r.varyings.add("eyeDir","vec3"),r.vertex.main.add("eyeDir = posViewNear;"))}export{r as ScreenSpacePassAtmosphere};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../core/libs/gl-matrix-2/math/mat4.js";import"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../../../core/libs/gl-matrix-2/math/vec3.js";import"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../core/shaderLibrary/ForwardLinearDepth.glsl.js";import"../core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import"../core/shaderLibrary/attributes/VertexTangent.glsl.js";import"../core/shaderLibrary/output/OutputDepth.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/output/OutputHighlightOverlay.js";import"../core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/MainLighting.glsl.js";import"../core/shaderLibrary/shading/NormalUtils.glsl.js";import"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../core/shaderLibrary/terrain/Overlay.glsl.js";import"../core/shaderLibrary/terrain/TerrainTexture.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float3BindUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4DrawUniform.js";import"../core/shaderModules/Texture2DBindUniform.js";import"./alphaCutoff.glsl.js";import"./OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{T as TerrainPassParameters,b as build}from"../../../../chunks/Terrain.glsl.js";
2
+ import"../../../../core/libs/gl-matrix-2/math/mat4.js";import"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../../../core/libs/gl-matrix-2/math/vec3.js";import"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../core/shaderLibrary/ForwardLinearDepth.glsl.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import"../core/shaderLibrary/attributes/VertexTangent.glsl.js";import"../core/shaderLibrary/output/OutputDepth.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/output/OutputHighlightOverlay.js";import"../core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/MainLighting.glsl.js";import"../core/shaderLibrary/shading/NormalUtils.glsl.js";import"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../core/shaderLibrary/terrain/Overlay.glsl.js";import"../core/shaderLibrary/terrain/TerrainTexture.glsl.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float3BindUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4DrawUniform.js";import"../core/shaderModules/Texture2DBindUniform.js";import"./alphaCutoff.glsl.js";import"./OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{T as TerrainPassParameters,b as build}from"../../../../chunks/Terrain.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../core/libs/gl-matrix-2/math/mat4.js";import"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../core/shaderLibrary/output/ReadDepth.glsl.js";import"../core/shaderLibrary/shading/PiUtils.glsl.js";import"../core/shaderLibrary/util/LocalFromScreenSpace.glsl.js";import"../core/shaderModules/Float2DrawUniform.js";import"../core/shaderModules/Float3DrawUniform.js";import"../core/shaderModules/FloatDrawUniform.js";import"../core/shaderModules/FloatsDrawUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/IntegerDrawUniform.js";import"../core/shaderModules/Matrix4BindUniform.js";import"../core/shaderModules/Matrix4sDrawUniform.js";import"../core/shaderModules/Texture2DBindUniform.js";import"../core/shaderModules/Texture2DDrawUniform.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{a as ViewshedDrawParameters,V as ViewshedPassParameters,c as build}from"../../../../chunks/Viewshed.glsl.js";
2
+ import"../../../../core/libs/gl-matrix-2/math/mat4.js";import"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../core/shaderLibrary/output/ReadDepth.glsl.js";import"../core/shaderLibrary/shading/PiUtils.glsl.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderLibrary/util/LocalFromScreenSpace.glsl.js";import"../core/shaderModules/Float2DrawUniform.js";import"../core/shaderModules/Float3DrawUniform.js";import"../core/shaderModules/FloatDrawUniform.js";import"../core/shaderModules/FloatsDrawUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/IntegerDrawUniform.js";import"../core/shaderModules/Matrix4BindUniform.js";import"../core/shaderModules/Matrix4sDrawUniform.js";import"../core/shaderModules/Texture2DBindUniform.js";import"../core/shaderModules/Texture2DDrawUniform.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{a as ViewshedDrawParameters,V as ViewshedPassParameters,c as build}from"../../../../chunks/Viewshed.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../core/libs/gl-matrix-2/math/mat4.js";import"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4BindUniform.js";import"../core/shaderModules/Matrix4DrawUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{V as VolumeMaskDrawParameters,b as build}from"../../../../chunks/VolumeMask.glsl.js";
2
+ import"../../../../core/libs/gl-matrix-2/math/mat4.js";import"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../core/shaderLibrary/util/cameraUniforms.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4DrawUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{V as VolumeMaskDrawParameters,b as build}from"../../../../chunks/VolumeMask.glsl.js";
@@ -38,7 +38,7 @@ export interface ElevationProfileLineQueryProperties extends ElevationProfileLin
38
38
  * @see [ElevationProfileLineView](https://developers.arcgis.com/javascript/latest/references/core/widgets/ElevationProfile/ElevationProfileLineView/) - Deprecated since 5.0. Use [ElevationProfileLineScene](https://developers.arcgis.com/javascript/latest/references/core/analysis/ElevationProfile/ElevationProfileLineScene/) from [ElevationProfileAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/ElevationProfileAnalysis/) instead.
39
39
  * @example
40
40
  * const elevLayer = new ElevationLayer({
41
- * url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Elevation/MtBaldy_Elevation/ImageServer"
41
+ * url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/OsoLandslide/OsoLandslide_Before_3DTerrain/ImageServer"
42
42
  * });
43
43
  * const elevationProfile = new ElevationProfile({
44
44
  * view: view,
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../../../Graphic.js";import{isSome as t}from"../../../../core/arrayUtils.js";import{clamp as i}from"../../../../core/mathUtils.js";import{throwIfAborted as a,waitTick as o}from"../../../../core/promiseUtils.js";import r from"../../../../geometry/Mesh.js";import n from"../../../../geometry/Point.js";import{projectAsync as s}from"../../../../geometry/projectionUtils.js";import l from"../../../../geometry/support/MeshVertexAttributes.js";import{projectVertices as c,updateFrustum as p,createCoveragePolygon as m}from"../../../../layers/orientedImagery/core/coverageUtils.js";import{getMetersPerUnitOfSR as u}from"../../../../layers/orientedImagery/core/utils.js";import{fixedImageSize as d,invalidCameraHeading as h}from"../../constants.js";import{activeFrustumSymbol as f,additionalFrustumSymbol as v}from"../../symbols.js";import{getDefaultSuperimposeFov as w,panoramicSuperimposeZoomOutFactor as g,panoramicSuperimposeZoomInFactor as y,panoramicSuperimposeMaxFov as S,panoramicSuperimposeMinFov as b,getViewCameraFieldOfView as _,panoramicSuperimposeMaxTilt as R,panoramicSuperimposeMinTilt as F,panoramicSuperimposeKeyboardAngleStep as M}from"../../support/superimposeUtils.js";class P{constructor(n){this.viewModel=n,this._defaultSuperimposeSecondaryDragAction=null,this._panoramicSuperimposeAnchor=null,this._panoramicSuperimposeLastScreenPoint=null,this._panoramicSuperimposeNavigationHandles=[],this._updateBestFeatureFootprintElevation=!1,this._updatedElevationSampler=null,this.createFootprints=async i=>{const{coverageFrustums:o,currentBestFeature:n,isAdditionalCoverageVisible:p,view:m}=this.viewModel,u=o.filter(t);for(const t of u){let o=t.clone();if(!m.spatialReference.equals(o.spatialReference)){const{components:e,spatialReference:t,origin:n,vertexAttributes:p,vertexSpace:u}=o;if("local"===u.type){const e=await s(n,m.spatialReference,i);a(i),o.centerAt(e)}else{const n=p.position,s=Float64Array.from(await c([...n],t.clone(),m.spatialReference.clone(),i));a(i),o=new r({vertexAttributes:new l({position:s}),components:e,spatialReference:m.spatialReference.clone()})}}t.imageID===n.attributes.objectId?(this._updateBestFeatureFootprintElevation=!0,this.viewModel.bestFeatureFootprint=new e({attributes:{imageID:t.imageID},geometry:o,symbol:f.clone(),visible:!1})):this.viewModel.additionalFootprints.push(new e({attributes:{imageID:t.imageID},geometry:o,symbol:v.clone(),visible:p}))}},this.updateFootprint=async(i,o,r)=>{const{bestFeatureFootprint:n,currentBestFeature:l,activeViewer:c,footprintExtent:m,view:u,mode:h}=this.viewModel,v="video"===h?d:c?.imageSize,w=o??l;if(!(l&&n?.geometry&&v&&m&&w&&u?.spatialReference))return void this.viewModel.updateCurrentCoveragePolygon(null);const{attributes:{cameraHeight:g,location:y,cameraPitch:S,horizontalFieldOfView:b,verticalFieldOfView:_,cameraRoll:R},elevationSample:F}=w;let M=null;if(o&&(this._updatedElevationSampler=l.elevationSample,M=await x(o,u.spatialReference),this._updatedElevationSampler)){const e=this._updatedElevationSampler?.extent,t=o.attributes.geometry;if(e&&!e.contains(t)){const e=this.viewModel.selectedPoint;if(!e)return;e.x=o.geometry.x,e.y=o.geometry.y;const t=await this.viewModel.processFeatureElevation([o],e);t&&(this._updatedElevationSampler=t)}const[i]=E([M],this._updatedElevationSampler,o);i&&(M=i)}F&&this._updateBestFeatureFootprintElevation&&(this.updateGroundElevation([n]),this._updateBestFeatureFootprintElevation=!1);const P=y.toArray(),D=o&&M?M:n,{vertexAttributes:{position:V},spatialReference:C}=D.geometry,k=await A(V,C,y.spatialReference),j=await this.viewModel.getMapPoint(i);a(r);let z=j.filter(t);if(!z.length)return;z[0].spatialReference.equals(y.spatialReference)||(z=await Promise.all(z.map(async e=>{const t=await s(e,y.spatialReference,r);return a(r),t})));const I=await p(i.map(({x:e,y:t})=>[e,t]),z.map(e=>e.toArray()),{cameraHeight:g,cameraLocation:P,cameraPitch:S,frustumVertices:k,horizontalFieldOfView:b,imageHeight:v[1],imageWidth:v[0],inSRS:{wkid:y.spatialReference.wkid},outSRS:{wkid:u.spatialReference.wkid},verticalFieldOfView:_,cameraRoll:R??0,options:r});this.viewModel.updateCurrentCoveragePolygon(new e({attributes:{imageID:w.attributes.objectId},geometry:I,symbol:f.clone(),visible:this.viewModel.currentCoverageVisible}))},this.updateVideoFootprint=async i=>{const{points:o,feature:r,scale:n,options:l}=i,{bestFeatureFootprint:c,currentBestFeature:m,activeViewer:u,footprintExtent:h,view:v,mode:w}=this.viewModel,g="video"===w?d:u?.imageSize,y=r??m;if(!(m&&c?.geometry&&g&&h&&y&&v?.spatialReference&&"none"!==w))return void this.viewModel.updateCurrentCoveragePolygon(null);const{attributes:{cameraHeight:S,location:b,cameraPitch:_,horizontalFieldOfView:R,verticalFieldOfView:F,cameraRoll:M},elevationSample:P}=y;let V=null;if(r&&(this._updatedElevationSampler=m.elevationSample,V=await x(r,v.spatialReference),this._updatedElevationSampler)){const e=this._updatedElevationSampler?.extent,t=r.attributes.geometry;if(e&&!e.contains(t)){const e=this.viewModel.selectedPoint;if(!e)return;e.x=r.geometry.x,e.y=r.geometry.y;const t=await this.viewModel.processFeatureElevation([r],e);t&&(this._updatedElevationSampler=t)}const[i]=E([V],this._updatedElevationSampler,r);i&&(V=i)}P&&this._updateBestFeatureFootprintElevation&&(this.updateGroundElevation([c]),this._updateBestFeatureFootprintElevation=!1);const C=b.toArray(),k=r&&V?V:c,{vertexAttributes:{position:j},spatialReference:z}=k.geometry,I=await A(j,z,b.spatialReference),O={feature:y,mode:w,imageSize:g,footprintExtent:h},B=await this.viewModel.getMapPointForFeature(o,O,l);a(l);let H=B.filter(t);if(!H.length)return;H[0].spatialReference.equals(b.spatialReference)||(H=await Promise.all(H.map(async e=>{const t=await s(e,b.spatialReference,l);return a(l),t})));const L=await p(o.map(({x:e,y:t})=>[e,t]),H.map(e=>e.toArray()),{cameraHeight:S,cameraLocation:C,cameraPitch:_,frustumVertices:I,horizontalFieldOfView:R,imageHeight:g[1],imageWidth:g[0],inSRS:{wkid:b.spatialReference.wkid},outSRS:{wkid:v.spatialReference.wkid},verticalFieldOfView:F,cameraRoll:M??0,options:l});if(n&&L){const e=D(L);L.scale(n,{origin:e})}this.viewModel.updateCurrentCoveragePolygon(new e({attributes:{imageID:y.attributes.objectId},geometry:L,symbol:f.clone(),visible:this.viewModel.currentCoverageVisible}))},this.updateFootprintPanorama=async(t,i)=>{await o(i);const{horizontalFieldOfView:a,pitch:r,verticalFieldOfView:n,yaw:l,feature:c}=t,p=c?.clone()??this.viewModel.currentBestFeature?.clone();if(!p)return;const{attributes:u}=p;u.orientedImageryType=null,u.cameraHeading=l,u.cameraPitch=r,u.horizontalFieldOfView=a,u.verticalFieldOfView=n,u.cameraRoll=0;const{frustum:d}=m(u);if(!d)return void this.viewModel.updateCurrentCoveragePolygon(null);const h=this.viewModel.view?.spatialReference.equals(d.spatialReference)?d.clone():await s(d.clone(),this.viewModel.view?.spatialReference,i);this.viewModel.updateCurrentCoveragePolygon(new e({attributes:{imageID:u.objectId},geometry:h,symbol:f.clone(),visible:this.viewModel.currentCoverageVisible}))},this.updatePanoramicSuperimposeCamera=async(e,t)=>{const{camera:i,currentBestFeature:o}=e,{view:r}=this.viewModel;if("3d"!==r?.type)return;const n=o.attributes.location.clone(),l=n.spatialReference.equals(r.spatialReference)?n:await s(n,r.spatialReference,t);if(a(t),!l)return;const c=i.clone();c.position=l.clone(),r.camera=c,this._enablePanoramicSuperimposeNavigation(l)},this.updateDefaultSuperimposeCamera=async(e,t)=>{const{currentBestFeature:i}=e,{view:o}=this.viewModel;if("3d"!==o?.type)return;const{cameraHeading:r,cameraPitch:n,cameraRoll:l,horizontalFieldOfView:c,location:p,verticalFieldOfView:m}=i.attributes,u=p.spatialReference.equals(o.spatialReference)?p.clone():await s(p,o.spatialReference,t);if(a(t),!u)return;const d=w(o,c,m,l??0),f=o.camera.clone();f.position=u,null!=r&&r!==h&&(f.heading=r),null!=n&&(f.tilt=n),null!=d&&(f.fov=d),o.camera=f},this.enableDefaultSuperimposeNavigation=()=>{const{view:e}=this.viewModel;if("3d"!==e?.type)return;const t=e.navigation.actionMap;null==this._defaultSuperimposeSecondaryDragAction&&(this._defaultSuperimposeSecondaryDragAction=t.dragSecondary),"none"!==t.dragSecondary&&(t.dragSecondary="none")},this.disableDefaultSuperimposeNavigation=()=>{const{view:e}=this.viewModel,t=this._defaultSuperimposeSecondaryDragAction;"3d"===e?.type&&null!=t?(e.navigation.actionMap.dragSecondary=t,this._defaultSuperimposeSecondaryDragAction=null):this._defaultSuperimposeSecondaryDragAction=null},this.disablePanoramicSuperimposeNavigation=()=>{this._panoramicSuperimposeNavigationHandles.forEach(e=>e.remove()),this._panoramicSuperimposeNavigationHandles=[],this._panoramicSuperimposeAnchor=null,this._panoramicSuperimposeLastScreenPoint=null},this._handlePanoramicSuperimposeDoubleClick=e=>{const{view:t}=this.viewModel;if(!t||"3d"!==t.type||!this._panoramicSuperimposeAnchor)return;e.stopPropagation();const a=t.camera.clone(),o=e.native.ctrlKey?g:y;a.position=this._panoramicSuperimposeAnchor.clone(),a.fov=i(a.fov*o,b,S),t.camera=a},this._handlePanoramicSuperimposeDrag=e=>{const{view:t}=this.viewModel;if(t&&"3d"===t.type&&this._panoramicSuperimposeAnchor)switch(e.stopPropagation(),e.action){case"start":return void(this._panoramicSuperimposeLastScreenPoint={x:e.x,y:e.y});case"update":{const a=this._panoramicSuperimposeLastScreenPoint;if(!a)return void(this._panoramicSuperimposeLastScreenPoint={x:e.x,y:e.y});const o=a.x-e.x,r=e.y-a.y;this._panoramicSuperimposeLastScreenPoint={x:e.x,y:e.y};const n=t.camera.clone(),{horizontal:s,vertical:l}=_(t);return n.position=this._panoramicSuperimposeAnchor.clone(),n.heading+=s*o/Math.max(t.width,1),n.tilt=i(n.tilt+l*r/Math.max(t.height,1),F,R),void(t.camera=n)}case"end":return void(this._panoramicSuperimposeLastScreenPoint=null)}},this._handlePanoramicSuperimposeKeyDown=e=>{const{view:t}=this.viewModel;if(!t||"3d"!==t.type||!this._panoramicSuperimposeAnchor)return;const a=t.camera.clone();let o=!0;switch(a.position=this._panoramicSuperimposeAnchor.clone(),e.key){case"ArrowLeft":a.heading-=M;break;case"ArrowRight":a.heading+=M;break;case"ArrowUp":a.tilt=i(a.tilt-M,F,R);break;case"ArrowDown":a.tilt=i(a.tilt+M,F,R);break;default:o=!1}o&&(e.stopPropagation(),t.camera=a)},this._handlePanoramicSuperimposeWheel=e=>{const{view:t}=this.viewModel;if(!t||"3d"!==t.type||!this._panoramicSuperimposeAnchor)return;e.stopPropagation();const a=t.camera.clone();a.position=this._panoramicSuperimposeAnchor.clone(),a.fov=i(a.fov*(e.deltaY>0?g:y),b,S),t.camera=a}}updateGroundElevation(e){const{geometry:t,attributes:{elevation:i}}=this.viewModel.currentBestFeature,a=(i??0)*u(t.spatialReference);e.forEach(e=>{const{geometry:t}=e;switch(t?.type){case"mesh":{const{vertexAttributes:{position:e}}=t,i=Math.floor(e.length/3);for(let o=0;o<i;o+=1)e[3*o+2]+=a/u(t.spatialReference);break}case"point":t.z=(t.z??0)+a/u(t.spatialReference)}})}_enablePanoramicSuperimposeNavigation(e){const{view:t}=this.viewModel;t&&"3d"===t.type&&(this.disablePanoramicSuperimposeNavigation(),this._panoramicSuperimposeAnchor=e.clone(),this._panoramicSuperimposeNavigationHandles=[t.on("drag",this._handlePanoramicSuperimposeDrag),t.on("mouse-wheel",this._handlePanoramicSuperimposeWheel),t.on("double-click",this._handlePanoramicSuperimposeDoubleClick),t.on("key-down",this._handlePanoramicSuperimposeKeyDown)])}}async function A(e,t,i,a){return Float64Array.from((await Promise.all(e.reduce((e,t,i)=>{const a=Math.floor(i/3);return e[a]=e[a]??[],e[a].push(t),e},new Array).map(async e=>(await s(new n(e,t),i,a)).toArray()))).flat())}const x=async(t,i,o)=>{const{frustum:n}=m(t.attributes);let p=n.clone();if(!i.equals(p.spatialReference)){const{components:e,spatialReference:t,origin:i,vertexAttributes:n,vertexSpace:m}=p;if("local"===m.type){const e=await s(i,t,o);a(o),p.centerAt(e)}else{const i=n.position,s=Float64Array.from(await c([...i],t.clone(),t.clone(),o));a(o),p=new r({vertexAttributes:new l({position:s}),components:e,spatialReference:t.clone()})}}return new e({attributes:{imageID:n.imageID},geometry:p,symbol:f.clone(),visible:!1})},E=(e,t,i)=>{const{geometry:a}=i,o=t.queryElevation(a);for(const r of e){const{geometry:e}=r;switch(e?.type){case"mesh":{const{vertexAttributes:{position:t}}=e,i=Math.floor(t.length/3);for(let e=0;e<i;e++)t[3*e+2]+=o?.z??0;break}case"point":e.z=(e.z??0)+(o?.z??0)}}return e},D=e=>{const t=e.vertexAttributes.position;let i=0,a=0,o=0;const r=t.length/3;for(let n=0;n<t.length;n+=3)i+=t[n],a+=t[n+1],o+=t[n+2];return new n({x:i/r,y:a/r,z:o/r,spatialReference:e.spatialReference})};export{P as default};
2
+ import e from"../../../../Graphic.js";import{isSome as t}from"../../../../core/arrayUtils.js";import{clamp as i}from"../../../../core/mathUtils.js";import{throwIfAborted as a,waitTick as o}from"../../../../core/promiseUtils.js";import r from"../../../../geometry/Mesh.js";import n from"../../../../geometry/Point.js";import{projectAsync as s}from"../../../../geometry/projectionUtils.js";import l from"../../../../geometry/support/MeshVertexAttributes.js";import{projectVertices as c,updateFrustum as p,createCoveragePolygon as m}from"../../../../layers/orientedImagery/core/coverageUtils.js";import{getMetersPerUnitOfSR as u}from"../../../../layers/orientedImagery/core/utils.js";import{fixedImageSize as d,invalidCameraHeading as h}from"../../constants.js";import{activeFrustumSymbol as f,additionalFrustumSymbol as v}from"../../symbols.js";import{getDefaultSuperimposeFov as w,panoramicSuperimposeMaxFov as g,panoramicSuperimposeMinFov as y,panoramicSuperimposeZoomOutFactor as S,panoramicSuperimposeZoomInFactor as b,getViewCameraFieldOfView as _,panoramicSuperimposeMaxTilt as R,panoramicSuperimposeMinTilt as F,panoramicSuperimposeKeyboardAngleStep as M}from"../../support/superimposeUtils.js";class P{constructor(n){this.viewModel=n,this._defaultSuperimposeSecondaryDragAction=null,this._panoramicSuperimposeAnchor=null,this._panoramicSuperimposeLastScreenPoint=null,this._panoramicSuperimposeNavigationHandles=[],this._updateBestFeatureFootprintElevation=!1,this._updatedElevationSampler=null,this.createFootprints=async i=>{const{coverageFrustums:o,currentBestFeature:n,isAdditionalCoverageVisible:p,view:m}=this.viewModel,u=o.filter(t);for(const t of u){let o=t.clone();if(!m.spatialReference.equals(o.spatialReference)){const{components:e,spatialReference:t,origin:n,vertexAttributes:p,vertexSpace:u}=o;if("local"===u.type){const e=await s(n,m.spatialReference,i);a(i),o.centerAt(e)}else{const n=p.position,s=Float64Array.from(await c([...n],t.clone(),m.spatialReference.clone(),i));a(i),o=new r({vertexAttributes:new l({position:s}),components:e,spatialReference:m.spatialReference.clone()})}}t.imageID===n.attributes.objectId?(this._updateBestFeatureFootprintElevation=!0,this.viewModel.bestFeatureFootprint=new e({attributes:{imageID:t.imageID},geometry:o,symbol:f.clone(),visible:!1})):this.viewModel.additionalFootprints.push(new e({attributes:{imageID:t.imageID},geometry:o,symbol:v.clone(),visible:p}))}},this.updateFootprint=async(i,o,r)=>{const{bestFeatureFootprint:n,currentBestFeature:l,activeViewer:c,footprintExtent:m,view:u,mode:h}=this.viewModel,v="video"===h?d:c?.imageSize,w=o??l;if(!(l&&n?.geometry&&v&&m&&w&&u?.spatialReference))return void this.viewModel.updateCurrentCoveragePolygon(null);const{attributes:{cameraHeight:g,location:y,cameraPitch:S,horizontalFieldOfView:b,verticalFieldOfView:_,cameraRoll:R},elevationSample:F}=w;let M=null;if(o&&(this._updatedElevationSampler=l.elevationSample,M=await x(o,u.spatialReference),this._updatedElevationSampler)){const e=this._updatedElevationSampler?.extent,t=o.attributes.geometry;if(e&&!e.contains(t)){const e=this.viewModel.selectedPoint;if(!e)return;e.x=o.geometry.x,e.y=o.geometry.y;const t=await this.viewModel.processFeatureElevation([o],e);t&&(this._updatedElevationSampler=t)}const[i]=E([M],this._updatedElevationSampler,o);i&&(M=i)}F&&this._updateBestFeatureFootprintElevation&&(this.updateGroundElevation([n]),this._updateBestFeatureFootprintElevation=!1);const P=y.toArray(),D=o&&M?M:n,{vertexAttributes:{position:V},spatialReference:C}=D.geometry,k=await A(V,C,y.spatialReference),j=await this.viewModel.getMapPoint(i);a(r);let z=j.filter(t);if(!z.length)return;z[0].spatialReference.equals(y.spatialReference)||(z=await Promise.all(z.map(async e=>{const t=await s(e,y.spatialReference,r);return a(r),t})));const I=await p(i.map(({x:e,y:t})=>[e,t]),z.map(e=>e.toArray()),{cameraHeight:g,cameraLocation:P,cameraPitch:S,frustumVertices:k,horizontalFieldOfView:b,imageHeight:v[1],imageWidth:v[0],inSRS:{wkid:y.spatialReference.wkid},outSRS:{wkid:u.spatialReference.wkid},verticalFieldOfView:_,cameraRoll:R??0,options:r});this.viewModel.updateCurrentCoveragePolygon(new e({attributes:{imageID:w.attributes.objectId},geometry:I,symbol:f.clone(),visible:this.viewModel.currentCoverageVisible}))},this.updateVideoFootprint=async i=>{const{points:o,feature:r,scale:n,options:l}=i,{bestFeatureFootprint:c,currentBestFeature:m,activeViewer:u,footprintExtent:h,view:v,mode:w}=this.viewModel,g="video"===w?d:u?.imageSize,y=r??m;if(!(m&&c?.geometry&&g&&h&&y&&v?.spatialReference&&"none"!==w))return void this.viewModel.updateCurrentCoveragePolygon(null);const{attributes:{cameraHeight:S,location:b,cameraPitch:_,horizontalFieldOfView:R,verticalFieldOfView:F,cameraRoll:M},elevationSample:P}=y;let V=null;if(r&&(this._updatedElevationSampler=m.elevationSample,V=await x(r,v.spatialReference),this._updatedElevationSampler)){const e=this._updatedElevationSampler?.extent,t=r.attributes.geometry;if(e&&!e.contains(t)){const e=this.viewModel.selectedPoint;if(!e)return;e.x=r.geometry.x,e.y=r.geometry.y;const t=await this.viewModel.processFeatureElevation([r],e);t&&(this._updatedElevationSampler=t)}const[i]=E([V],this._updatedElevationSampler,r);i&&(V=i)}P&&this._updateBestFeatureFootprintElevation&&(this.updateGroundElevation([c]),this._updateBestFeatureFootprintElevation=!1);const C=b.toArray(),k=r&&V?V:c,{vertexAttributes:{position:j},spatialReference:z}=k.geometry,I=await A(j,z,b.spatialReference),O={feature:y,mode:w,imageSize:g,footprintExtent:h},B=await this.viewModel.getMapPointForFeature(o,O,l);a(l);let H=B.filter(t);if(!H.length)return;H[0].spatialReference.equals(b.spatialReference)||(H=await Promise.all(H.map(async e=>{const t=await s(e,b.spatialReference,l);return a(l),t})));const L=await p(o.map(({x:e,y:t})=>[e,t]),H.map(e=>e.toArray()),{cameraHeight:S,cameraLocation:C,cameraPitch:_,frustumVertices:I,horizontalFieldOfView:R,imageHeight:g[1],imageWidth:g[0],inSRS:{wkid:b.spatialReference.wkid},outSRS:{wkid:v.spatialReference.wkid},verticalFieldOfView:F,cameraRoll:M??0,options:l});if(n&&L){const e=D(L);L.scale(n,{origin:e})}this.viewModel.updateCurrentCoveragePolygon(new e({attributes:{imageID:y.attributes.objectId},geometry:L,symbol:f.clone(),visible:this.viewModel.currentCoverageVisible}))},this.updateFootprintPanorama=async(t,i)=>{await o(i);const{horizontalFieldOfView:a,pitch:r,verticalFieldOfView:n,yaw:l,feature:c}=t,p=c?.clone()??this.viewModel.currentBestFeature?.clone();if(!p)return;const{attributes:u}=p;u.orientedImageryType=null,u.cameraHeading=l,u.cameraPitch=r,u.horizontalFieldOfView=a,u.verticalFieldOfView=n,u.cameraRoll=0;const{frustum:d}=m(u);if(!d)return void this.viewModel.updateCurrentCoveragePolygon(null);const h=this.viewModel.view?.spatialReference.equals(d.spatialReference)?d.clone():await s(d.clone(),this.viewModel.view?.spatialReference,i);this.viewModel.updateCurrentCoveragePolygon(new e({attributes:{imageID:u.objectId},geometry:h,symbol:f.clone(),visible:this.viewModel.currentCoverageVisible}))},this.updatePanoramicSuperimposeCamera=async(e,t)=>{const{camera:i,currentBestFeature:o}=e,{view:r}=this.viewModel;if("3d"!==r?.type)return;const n=o.attributes.location.clone(),l=n.spatialReference.equals(r.spatialReference)?n:await s(n,r.spatialReference,t);if(a(t),!l)return;const c=i.clone();c.position=l.clone(),r.camera=c,this._enablePanoramicSuperimposeNavigation(l)},this.updateDefaultSuperimposeCamera=async(e,t)=>{const{currentBestFeature:o}=e,{view:r}=this.viewModel;if("3d"!==r?.type)return;const{cameraHeading:n,cameraPitch:l,cameraRoll:c,horizontalFieldOfView:p,location:m,verticalFieldOfView:u}=o.attributes,d=m.spatialReference.equals(r.spatialReference)?m.clone():await s(m,r.spatialReference,t);if(a(t),!d)return;const f=w(r,p,u,c??0),v=r.camera.clone();v.position=d,v.fov=i(v.fov,y,g),null!=n&&n!==h&&(v.heading=n),null!=l&&(v.tilt=l),null!=f&&(v.fov=f),r.camera=v},this.enableDefaultSuperimposeNavigation=()=>{const{view:e}=this.viewModel;if("3d"!==e?.type)return;const t=e.navigation.actionMap;null==this._defaultSuperimposeSecondaryDragAction&&(this._defaultSuperimposeSecondaryDragAction=t.dragSecondary),"none"!==t.dragSecondary&&(t.dragSecondary="none")},this.disableDefaultSuperimposeNavigation=()=>{const{view:e}=this.viewModel,t=this._defaultSuperimposeSecondaryDragAction;"3d"===e?.type&&null!=t?(e.navigation.actionMap.dragSecondary=t,this._defaultSuperimposeSecondaryDragAction=null):this._defaultSuperimposeSecondaryDragAction=null},this.disablePanoramicSuperimposeNavigation=()=>{this._panoramicSuperimposeNavigationHandles.forEach(e=>e.remove()),this._panoramicSuperimposeNavigationHandles=[],this._panoramicSuperimposeAnchor=null,this._panoramicSuperimposeLastScreenPoint=null},this._handlePanoramicSuperimposeDoubleClick=e=>{const{view:t}=this.viewModel;if(!t||"3d"!==t.type||!this._panoramicSuperimposeAnchor)return;e.stopPropagation();const a=t.camera.clone(),o=e.native.ctrlKey?S:b;a.position=this._panoramicSuperimposeAnchor.clone(),a.fov=i(a.fov*o,y,g),t.camera=a},this._handlePanoramicSuperimposeDrag=e=>{const{view:t}=this.viewModel;if(t&&"3d"===t.type&&this._panoramicSuperimposeAnchor)switch(e.stopPropagation(),e.action){case"start":return void(this._panoramicSuperimposeLastScreenPoint={x:e.x,y:e.y});case"update":{const a=this._panoramicSuperimposeLastScreenPoint;if(!a)return void(this._panoramicSuperimposeLastScreenPoint={x:e.x,y:e.y});const o=a.x-e.x,r=e.y-a.y;this._panoramicSuperimposeLastScreenPoint={x:e.x,y:e.y};const n=t.camera.clone(),{horizontal:s,vertical:l}=_(t);return n.position=this._panoramicSuperimposeAnchor.clone(),n.heading+=s*o/Math.max(t.width,1),n.tilt=i(n.tilt+l*r/Math.max(t.height,1),F,R),void(t.camera=n)}case"end":return void(this._panoramicSuperimposeLastScreenPoint=null)}},this._handlePanoramicSuperimposeKeyDown=e=>{const{view:t}=this.viewModel;if(!t||"3d"!==t.type||!this._panoramicSuperimposeAnchor)return;const a=t.camera.clone();let o=!0;switch(a.position=this._panoramicSuperimposeAnchor.clone(),e.key){case"ArrowLeft":a.heading-=M;break;case"ArrowRight":a.heading+=M;break;case"ArrowUp":a.tilt=i(a.tilt-M,F,R);break;case"ArrowDown":a.tilt=i(a.tilt+M,F,R);break;default:o=!1}o&&(e.stopPropagation(),t.camera=a)},this._handlePanoramicSuperimposeWheel=e=>{const{view:t}=this.viewModel;if(!t||"3d"!==t.type||!this._panoramicSuperimposeAnchor)return;e.stopPropagation();const a=t.camera.clone();a.position=this._panoramicSuperimposeAnchor.clone(),a.fov=i(a.fov*(e.deltaY>0?S:b),y,g),t.camera=a}}updateGroundElevation(e){const{geometry:t,attributes:{elevation:i}}=this.viewModel.currentBestFeature,a=(i??0)*u(t.spatialReference);e.forEach(e=>{const{geometry:t}=e;switch(t?.type){case"mesh":{const{vertexAttributes:{position:e}}=t,i=Math.floor(e.length/3);for(let o=0;o<i;o+=1)e[3*o+2]+=a/u(t.spatialReference);break}case"point":t.z=(t.z??0)+a/u(t.spatialReference)}})}_enablePanoramicSuperimposeNavigation(e){const{view:t}=this.viewModel;t&&"3d"===t.type&&(this.disablePanoramicSuperimposeNavigation(),this._panoramicSuperimposeAnchor=e.clone(),this._panoramicSuperimposeNavigationHandles=[t.on("drag",this._handlePanoramicSuperimposeDrag),t.on("mouse-wheel",this._handlePanoramicSuperimposeWheel),t.on("double-click",this._handlePanoramicSuperimposeDoubleClick),t.on("key-down",this._handlePanoramicSuperimposeKeyDown)])}}async function A(e,t,i,a){return Float64Array.from((await Promise.all(e.reduce((e,t,i)=>{const a=Math.floor(i/3);return e[a]=e[a]??[],e[a].push(t),e},new Array).map(async e=>(await s(new n(e,t),i,a)).toArray()))).flat())}const x=async(t,i,o)=>{const{frustum:n}=m(t.attributes);let p=n.clone();if(!i.equals(p.spatialReference)){const{components:e,spatialReference:t,origin:i,vertexAttributes:n,vertexSpace:m}=p;if("local"===m.type){const e=await s(i,t,o);a(o),p.centerAt(e)}else{const i=n.position,s=Float64Array.from(await c([...i],t.clone(),t.clone(),o));a(o),p=new r({vertexAttributes:new l({position:s}),components:e,spatialReference:t.clone()})}}return new e({attributes:{imageID:n.imageID},geometry:p,symbol:f.clone(),visible:!1})},E=(e,t,i)=>{const{geometry:a}=i,o=t.queryElevation(a);for(const r of e){const{geometry:e}=r;switch(e?.type){case"mesh":{const{vertexAttributes:{position:t}}=e,i=Math.floor(t.length/3);for(let e=0;e<i;e++)t[3*e+2]+=o?.z??0;break}case"point":e.z=(e.z??0)+(o?.z??0)}}return e},D=e=>{const t=e.vertexAttributes.position;let i=0,a=0,o=0;const r=t.length/3;for(let n=0;n<t.length;n+=3)i+=t[n],a+=t[n+1],o+=t[n+2];return new n({x:i/r,y:a/r,z:o/r,spatialReference:e.spatialReference})};export{P as default};