@arcgis/core 5.2.0-next.120 → 5.2.0-next.121

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 (348) hide show
  1. package/arcade/containerUtils.js +1 -1
  2. package/arcade/functions/feature.js +1 -1
  3. package/arcade/functions/featuresetstring.js +1 -1
  4. package/arcade/languageUtils.js +1 -1
  5. package/arcgisGlobal.d.ts +7 -0
  6. package/assets/components/assets/icon/addCellAbove16.json +1 -0
  7. package/assets/components/assets/icon/addCellAbove24.json +1 -0
  8. package/assets/components/assets/icon/addCellAbove32.json +1 -0
  9. package/assets/components/assets/icon/addCellBelow16.json +1 -0
  10. package/assets/components/assets/icon/addCellBelow24.json +1 -0
  11. package/assets/components/assets/icon/addCellBelow32.json +1 -0
  12. package/assets/components/assets/icon/linkedChart16.json +1 -0
  13. package/assets/components/assets/icon/linkedChart24.json +1 -0
  14. package/assets/components/assets/icon/linkedChart32.json +1 -0
  15. package/assets/components/assets/icon/polygonFromFeature16.json +1 -0
  16. package/assets/components/assets/icon/polygonFromFeature24.json +1 -0
  17. package/assets/components/assets/icon/polygonFromFeature32.json +1 -0
  18. package/assets/esri/core/workers/RemoteClient.js +1 -1
  19. package/assets/esri/core/workers/chunks/015cb790262a59857c5f.js +1 -0
  20. package/assets/esri/core/workers/chunks/025da54eef112d7e8f66.js +1 -0
  21. package/assets/esri/core/workers/chunks/033debcbf6b3683dc4fe.js +2 -0
  22. package/assets/esri/core/workers/chunks/064445e6f9512817ac87.js +2 -0
  23. package/assets/esri/core/workers/chunks/{304462b049116f59accc.js → 09676cfa99b90fe0cc63.js} +1 -1
  24. package/assets/esri/core/workers/chunks/0aadee0437fa061e4ff5.js +1 -0
  25. package/assets/esri/core/workers/chunks/{b0058619e0363002ad86.js → 0e9f54d7f158195bd203.js} +1 -1
  26. package/assets/esri/core/workers/chunks/1086f190f94c715bbfe4.js +1 -0
  27. package/assets/esri/core/workers/chunks/1846296be959e28c42bb.js +1 -0
  28. package/assets/esri/core/workers/chunks/{ea9e770efc85594e4dd2.js → 216d8cb86548e92a8196.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{d629708bf23da24ee523.js → 298f234f11a10c5120a2.js} +1 -1
  30. package/assets/esri/core/workers/chunks/29ae19206bbeb480be0f.js +1 -0
  31. package/assets/esri/core/workers/chunks/{dc1944a7601b518a9c48.js → 2ca49fb4590cc34a02bd.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{f890359d972cce54459e.js → 2f829321bfbd3bacd64f.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{7232fc11b23777b6be94.js → 369012c032ea6882607c.js} +1 -1
  34. package/assets/esri/core/workers/chunks/39c5e0f6262f69a62c66.js +1 -0
  35. package/assets/esri/core/workers/chunks/{9f760dc4492a03e0504c.js → 45d87af48a21644590c2.js} +1 -1
  36. package/assets/esri/core/workers/chunks/463d69f596d1d34ef275.js +2 -0
  37. package/assets/esri/core/workers/chunks/49affbed22e201f7c32b.js +1 -0
  38. package/assets/esri/core/workers/chunks/4adad3312caa24af98ac.js +1 -0
  39. package/assets/esri/core/workers/chunks/{8f0ecf4d06ec7b67d4ed.js → 52744dfd430cd0c0edfb.js} +1 -1
  40. package/assets/esri/core/workers/chunks/58a17fb3c0dd07c63d57.js +2 -0
  41. package/assets/esri/core/workers/chunks/5993db944b9e7825e0bc.js +1 -0
  42. package/assets/esri/core/workers/chunks/{090c9c2dbf92f2cac0b8.js → 770ca70d363184e39d60.js} +1 -1
  43. package/assets/esri/core/workers/chunks/83c7c4218bc6ba2f16ee.js +1 -0
  44. package/assets/esri/core/workers/chunks/{cfd8317ecd2e63af7c40.js → 8a103b6e9534516421e2.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{49e8ff5ed079a9e3be4b.js → 91a51d959ee5c6123c46.js} +1 -1
  46. package/assets/esri/core/workers/chunks/92f35b2c3c5f13778308.js +1 -0
  47. package/assets/esri/core/workers/chunks/97cd4145c016cf379120.js +1 -0
  48. package/assets/esri/core/workers/chunks/99ebc99e8d1bca105b5e.js +1 -0
  49. package/assets/esri/core/workers/chunks/{e18b8646c7378213b618.js → 9b3813e39992b1b99941.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{32fc7d1db4b311f6b880.js → 9e5b30b907102bc0c201.js} +1 -1
  51. package/assets/esri/core/workers/chunks/a005efcde3ca9def4e6b.js +1 -0
  52. package/assets/esri/core/workers/chunks/a3c1a5a5c5cbf27b376d.js +1 -0
  53. package/assets/esri/core/workers/chunks/a70c59129ea808857d07.js +1 -0
  54. package/assets/esri/core/workers/chunks/b5b30c8447a0f967fa79.js +1 -0
  55. package/assets/esri/core/workers/chunks/bb5ed2a796a45c41b0b4.js +1 -0
  56. package/assets/esri/core/workers/chunks/bcb06a0643b4c83535ee.js +1 -0
  57. package/assets/esri/core/workers/chunks/{066b7f6866d602f963e0.js → c3008b20cb5fd38bd900.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{22e85819e23202a8ba90.js → c39ebd8d469f1e8bb61e.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{7f2ac03efaa4a4898ba2.js → c3b96d1d43afccd23e45.js} +2 -2
  60. package/assets/esri/core/workers/chunks/{cb983f65995e57fff7a1.js → c44cbe04efddbbbaec13.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{8ce14dd209462f88b163.js → c70a32ac0fa49f4493ca.js} +1 -1
  62. package/assets/esri/core/workers/chunks/ce08e3369641da0d7a27.js +2 -0
  63. package/assets/esri/core/workers/chunks/d1b5be1aeab16d36d4b1.js +1 -0
  64. package/assets/esri/core/workers/chunks/{da6583e8d88441a1c02a.js → d38252956c3d9e2168f7.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{1742dbc6a827cfda471b.js → d3d48401462ef3bf0ad9.js} +1 -1
  66. package/assets/esri/core/workers/chunks/d9b761104ab6e4acaf91.js +1 -0
  67. package/assets/esri/core/workers/chunks/{723478607badcde5706b.js → d9d5f50af047ee7af129.js} +87 -86
  68. package/assets/esri/core/workers/chunks/{354912041363502c6a89.js → da161f8cbe1cfc5fcf7c.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{862e1acd80c4e43831dc.js → dc923e50958b68a50014.js} +1 -1
  70. package/assets/esri/core/workers/chunks/e86f83a6514a35255f64.js +1 -0
  71. package/assets/esri/core/workers/chunks/ea49721fdd2172d1c799.js +1 -0
  72. package/assets/esri/core/workers/chunks/{98a5327fd96d9542b39f.js → f90cad9f007a11154c0d.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{f18ee2eaa96d103627a6.js → fa3f824c874f29d24953.js} +1 -1
  74. package/assets/esri/core/workers/chunks/fbb390c0d92d1536fce3.js +1 -0
  75. package/assets/esri/core/workers/chunks/fbc5f275c4e5e6bfffaa.js +1 -0
  76. package/assets/esri/core/workers/chunks/{6ab7bb3834841834f839.js → fd5e61cb6f936eadcfe3.js} +1 -1
  77. package/assets/esri/themes/dark/main.css +1 -1
  78. package/assets/esri/themes/light/main.css +1 -1
  79. package/assets/esri/themes/light/view.css +1 -1
  80. package/basemaps/BasemapCollection.d.ts +148 -0
  81. package/basemaps/BasemapCollection.js +2 -0
  82. package/basemaps/BasemapsSource.d.ts +39 -0
  83. package/basemaps/BasemapsSource.js +2 -0
  84. package/basemaps/LocalBasemapsSource.d.ts +55 -0
  85. package/basemaps/LocalBasemapsSource.js +2 -0
  86. package/basemaps/PortalBasemapsSource.d.ts +98 -0
  87. package/basemaps/PortalBasemapsSource.js +2 -0
  88. package/basemaps/support/BasemapItem.d.ts +74 -0
  89. package/basemaps/support/BasemapItem.js +2 -0
  90. package/basemaps/support/basemapCompatibilityUtils.js +2 -0
  91. package/basemaps/types.d.ts +42 -0
  92. package/chunks/CheckerBoard.glsl.js +1 -1
  93. package/chunks/ColorMaterial.glsl.js +1 -1
  94. package/chunks/Component.glsl.js +11 -11
  95. package/chunks/DeepSky.glsl.js +1 -1
  96. package/chunks/DefaultMaterial.glsl.js +4 -4
  97. package/chunks/EdgeShader.glsl.js +1 -1
  98. package/chunks/FocusArea.glsl.js +1 -1
  99. package/chunks/GaussianSplat.glsl.js +9 -9
  100. package/chunks/HUDMaterial.glsl.js +1 -1
  101. package/chunks/ImageMaterial.glsl.js +1 -1
  102. package/chunks/LineCallout.glsl.js +1 -1
  103. package/chunks/LineMarker.glsl.js +97 -89
  104. package/chunks/NativeLine.glsl.js +1 -1
  105. package/chunks/Path.glsl.js +8 -7
  106. package/chunks/Pattern.glsl.js +1 -1
  107. package/chunks/PointRenderer.glsl.js +1 -1
  108. package/chunks/RealisticTree.glsl.js +4 -4
  109. package/chunks/RibbonLine.glsl.js +58 -56
  110. package/chunks/ShadowCastAccumulate.glsl.js +3 -3
  111. package/chunks/ShadowHighlight.glsl.js +4 -4
  112. package/chunks/ShadowHighlightBuffer.glsl.js +3 -3
  113. package/chunks/Terrain.glsl.js +12 -14
  114. package/chunks/Viewshed.glsl.js +1 -1
  115. package/chunks/Water.glsl.js +3 -3
  116. package/chunks/languageUtils.js +1 -1
  117. package/config.js +1 -1
  118. package/core/Accessor.d.ts +10 -0
  119. package/kernel.js +1 -1
  120. package/layers/CSVLayer.js +1 -1
  121. package/layers/GeoJSONLayer.d.ts +1 -1
  122. package/layers/GeoJSONLayer.js +1 -1
  123. package/layers/OGCFeatureLayer.js +1 -1
  124. package/layers/StreamLayer.js +1 -1
  125. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  126. package/layers/mixins/FeatureLayerBase.js +1 -1
  127. package/layers/support/LabelClass.d.ts +13 -4
  128. package/layers/support/LabelClass.js +1 -1
  129. package/layers/support/commonProperties.js +1 -1
  130. package/legend/ActiveLayerInfo.d.ts +130 -0
  131. package/legend/ActiveLayerInfo.js +2 -0
  132. package/legend/LegendContent.d.ts +118 -0
  133. package/legend/LegendContent.js +2 -0
  134. package/legend/support/clusterUtils.js +2 -0
  135. package/legend/support/colorRampUtils.js +2 -0
  136. package/legend/support/heatmapRampUtils.js +2 -0
  137. package/legend/support/relationshipRampUtils.js +2 -0
  138. package/legend/support/sizeRampUtils.js +2 -0
  139. package/legend/support/utils.js +2 -0
  140. package/legend/types.d.ts +403 -0
  141. package/libs/i3s/I3SModule.js +1 -1
  142. package/package.json +5 -5
  143. package/support/revision.js +1 -1
  144. package/support/userTypeGuards/isBasemapsSource.js +2 -0
  145. package/symbols/cim/CIMOperators.js +1 -1
  146. package/symbols/cim/callouts/effects/BackgroundCallout.js +2 -0
  147. package/symbols/cim/callouts/effects/BalloonCallout.js +2 -0
  148. package/symbols/cim/callouts/effects/PointSymbolCallout.js +2 -0
  149. package/symbols/cim/callouts/effects/SimpleLineCallout.js +2 -0
  150. package/symbols/cim/callouts/effects/calloutUtils.js +2 -0
  151. package/symbols/cim/cimAnalyzer.js +1 -1
  152. package/symbols/cim/utils.js +1 -1
  153. package/symbols/support/typeUtils.js +1 -1
  154. package/views/2d/LabelManager.js +1 -1
  155. package/views/2d/engine/AFeatureContainer.js +1 -1
  156. package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
  157. package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
  158. package/views/2d/engine/webgl/FeatureTile.js +1 -1
  159. package/views/2d/engine/webgl/GlyphWorker.js +1 -1
  160. package/views/2d/engine/webgl/TileCpuState.js +1 -1
  161. package/views/2d/engine/webgl/TileGpuState.js +1 -1
  162. package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
  163. package/views/2d/engine/webgl/collisions/LabelStore.js +2 -0
  164. package/views/2d/engine/webgl/cpuMapped/CpuBuffer.js +1 -1
  165. package/views/2d/engine/webgl/cpuMapped/CpuMeshData.js +1 -1
  166. package/views/2d/engine/webgl/cpuMapped/GpuMeshState.js +1 -1
  167. package/views/2d/engine/webgl/definitions.js +1 -1
  168. package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
  169. package/views/2d/engine/webgl/mesh/MultiTileMeshData.js +1 -1
  170. package/views/2d/engine/webgl/mesh/factories/CalloutMeshWriterCoordinator.js +2 -0
  171. package/views/2d/engine/webgl/mesh/factories/FeatureMeshFactory.js +1 -1
  172. package/views/2d/engine/webgl/mesh/factories/MeshWriterGroupCoordinator.js +2 -0
  173. package/views/2d/engine/webgl/mesh/templates/segmentUtils.js +1 -1
  174. package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
  175. package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
  176. package/views/2d/engine/webgl/shaderGraph/techniques/GraphicInstanceStore.js +1 -1
  177. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueInstance.js +1 -1
  178. package/views/2d/engine/webgl/shaderGraph/techniques/TestDisplayObject.js +1 -1
  179. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedPolyShader.js +1 -1
  180. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  181. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +1 -1
  182. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
  183. package/views/2d/engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas.js +1 -1
  184. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
  185. package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
  186. package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
  187. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
  188. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
  189. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js +1 -1
  190. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  191. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
  192. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
  193. package/views/2d/engine/webgl/shaderGraph/techniques/markers/ComputedMarkerParams.js +1 -1
  194. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
  195. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  196. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/CalloutMeshWriterPolicy.js +2 -0
  197. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  198. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterReferences.js +2 -0
  199. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterVertexPack.js +1 -1
  200. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/dataViewUtils.js +1 -1
  201. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
  202. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
  203. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
  204. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/FillShader.js +1 -1
  205. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader.js +1 -1
  206. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  207. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
  208. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
  209. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  210. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  211. package/views/2d/engine/webgl/util/AnnotationMatcher.js +1 -1
  212. package/views/2d/engine/webgl/util/DimensionMatcher.js +1 -1
  213. package/views/2d/engine/webgl/util/IntervalMatcher.js +1 -1
  214. package/views/2d/engine/webgl/util/LabelMatcher.js +1 -1
  215. package/views/2d/engine/webgl/util/MapMatcher.js +1 -1
  216. package/views/2d/engine/webgl/util/Matcher.js +1 -1
  217. package/views/2d/engine/webgl/util/MatcherContext.js +1 -1
  218. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  219. package/views/2d/layers/MediaLayerView2D.js +1 -1
  220. package/views/2d/layers/TileLayerView2D.js +1 -1
  221. package/views/2d/layers/features/FeatureContainer.js +1 -1
  222. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  223. package/views/2d/layers/features/RenderState.js +1 -1
  224. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  225. package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
  226. package/views/2d/layers/features/support/GraphicsReader.js +1 -1
  227. package/views/2d/layers/graphics/AGraphicContainer.js +1 -1
  228. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  229. package/views/2d/layers/support/annodime/MatcherGeometryOverride.js +1 -1
  230. package/views/2d/layers/support/annodime/PrivateMatcherGeometryOverrideEffect.js +1 -1
  231. package/views/2d/layers/support/annodime/annotationGraphic.js +1 -1
  232. package/views/2d/layers/support/annodime/cimAnnotations.js +1 -1
  233. package/views/2d/layers/support/annodime/debugUtils.js +1 -1
  234. package/views/2d/layers/support/annodime/virtualFields.js +1 -1
  235. package/views/3d/input/SceneInputManager.js +1 -1
  236. package/views/3d/input/handlers/ground/GroundDoubleClickMove.js +2 -0
  237. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  238. package/views/3d/layers/SceneLayerWorker.js +1 -1
  239. package/views/3d/support/MemoryController.js +1 -1
  240. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  241. package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
  242. package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +1 -3
  243. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +1 -1
  244. package/views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js +1 -1
  245. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +8 -8
  246. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +6 -6
  247. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +1 -1
  248. package/views/3d/webgl-engine/core/shaderLibrary/forwardLinearDepthToReadShadow.glsl.js +4 -0
  249. package/views/3d/webgl-engine/core/shaderLibrary/{ForwardLinearDepthToWriteShadowMap.glsl.js → forwardLinearDepthToWriteShadow.glsl.js} +5 -5
  250. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js +1 -1
  251. package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.glsl.js +3 -4
  252. package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js +2 -2
  253. package/views/3d/webgl-engine/core/shaderLibrary/shading/readFragmentShadow.glsl.js +5 -0
  254. package/views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js +24 -0
  255. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +1 -1
  256. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  257. package/views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js +1 -1
  258. package/views/3d/webgl-engine/effects/focusArea/FocusArea.js +1 -1
  259. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  260. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.glsl.js +1 -1
  261. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.glsl.js +1 -1
  262. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightTechnique.js +1 -1
  263. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowAccumulator.js +1 -1
  264. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulate.glsl.js +1 -1
  265. package/views/3d/webgl-engine/lib/LineMaterial.js +1 -1
  266. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  267. package/views/3d/webgl-engine/materials/DrawParameters.js +1 -1
  268. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  269. package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
  270. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  271. package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
  272. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  273. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  274. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  275. package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +1 -1
  276. package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
  277. package/views/3d/webgl-engine/shaders/LineTechniqueConfiguration.js +1 -1
  278. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  279. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  280. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  281. package/views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js +1 -1
  282. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  283. package/views/3d/webgl-engine/shaders/{AnimatedLine.glsl.js → animatedAlpha.glsl.js} +11 -17
  284. package/views/ToolViewManager.js +1 -1
  285. package/views/VideoView.js +1 -1
  286. package/widgets/BasemapGallery/BasemapGalleryViewModel.d.ts +3 -0
  287. package/widgets/BasemapGallery/support/BasemapGalleryItem.d.ts +3 -0
  288. package/widgets/BasemapGallery/support/LocalBasemapsSource.d.ts +2 -0
  289. package/widgets/BasemapGallery/support/PortalBasemapsSource.d.ts +2 -0
  290. package/widgets/BasemapGallery/types.d.ts +6 -1
  291. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +2 -0
  292. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  293. package/widgets/Editor/EditorViewModel.d.ts +2 -1
  294. package/widgets/Editor/EditorViewModel.js +1 -1
  295. package/widgets/Editor/legacy/CreateFeaturesWorkflow.js +1 -1
  296. package/widgets/Editor.d.ts +2 -1
  297. package/widgets/Editor.js +1 -1
  298. package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.d.ts +1 -0
  299. package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.js +1 -1
  300. package/widgets/HistogramRangeSlider.js +1 -1
  301. package/widgets/Legend/LegendViewModel.d.ts +1 -0
  302. package/widgets/Legend/LegendViewModel.js +1 -1
  303. package/widgets/Legend/styles/card/CardView.d.ts +1 -0
  304. package/widgets/Legend/styles/card/CardView.js +1 -1
  305. package/widgets/Legend/styles/classic/ClassicView.d.ts +1 -0
  306. package/widgets/Legend/styles/classic/ClassicView.js +1 -1
  307. package/widgets/Legend/support/ActiveLayerInfo.d.ts +2 -0
  308. package/widgets/Legend.js +1 -1
  309. package/assets/esri/core/workers/chunks/03918a862455191a8910.js +0 -1
  310. package/assets/esri/core/workers/chunks/1630913399384030d0b9.js +0 -1
  311. package/assets/esri/core/workers/chunks/1a39335aa2dce6d564d9.js +0 -1
  312. package/assets/esri/core/workers/chunks/25bb07d3c32b16a08813.js +0 -1
  313. package/assets/esri/core/workers/chunks/25cc6d7178a52f2f46b7.js +0 -1
  314. package/assets/esri/core/workers/chunks/2e999b05ce179dd9fa08.js +0 -1
  315. package/assets/esri/core/workers/chunks/36792b8a85e88044cb49.js +0 -1
  316. package/assets/esri/core/workers/chunks/3acc1299c1382c3b034d.js +0 -1
  317. package/assets/esri/core/workers/chunks/430802108b63194b7ddd.js +0 -2
  318. package/assets/esri/core/workers/chunks/4396ef5ab3eb9e9a7df2.js +0 -1
  319. package/assets/esri/core/workers/chunks/4efe5827a5c61db3b19d.js +0 -2
  320. package/assets/esri/core/workers/chunks/5938d5f6e37f49867d5a.js +0 -1
  321. package/assets/esri/core/workers/chunks/70347d25968975126fa7.js +0 -1
  322. package/assets/esri/core/workers/chunks/8628c027198982baed7c.js +0 -1
  323. package/assets/esri/core/workers/chunks/8c521caf050a486b6548.js +0 -1
  324. package/assets/esri/core/workers/chunks/a6d4132a16c51323a38a.js +0 -1
  325. package/assets/esri/core/workers/chunks/add834f867900a7091d2.js +0 -1
  326. package/assets/esri/core/workers/chunks/b56c5883a5468b18b122.js +0 -1
  327. package/assets/esri/core/workers/chunks/b5a102cf9f4377fb9842.js +0 -1
  328. package/assets/esri/core/workers/chunks/b6409d89914030d5854a.js +0 -1
  329. package/assets/esri/core/workers/chunks/c118b88a7c4359e68d9b.js +0 -1
  330. package/assets/esri/core/workers/chunks/c5e288d57bacb8451e2d.js +0 -2
  331. package/assets/esri/core/workers/chunks/ce3fb992f6c6ae7378a3.js +0 -1
  332. package/assets/esri/core/workers/chunks/ceda1e08c9ff26248db0.js +0 -1
  333. package/assets/esri/core/workers/chunks/d5e3f8e5b8d2576d3cb3.js +0 -2
  334. package/assets/esri/core/workers/chunks/ddb5d29a8998d0a76fd4.js +0 -1
  335. package/assets/esri/core/workers/chunks/de8a3a0796bd115426c0.js +0 -1
  336. package/assets/esri/core/workers/chunks/e707534a700a2de687ca.js +0 -1
  337. package/assets/esri/core/workers/chunks/f465fb26541372fdc908.js +0 -2
  338. package/assets/esri/core/workers/chunks/f5423006fb07db7dd6ee.js +0 -1
  339. package/assets/esri/core/workers/chunks/fdad31bbe8aee68a6eaf.js +0 -1
  340. package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToReadShadowMap.glsl.js +0 -4
  341. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +0 -18
  342. package/views/3d/webgl-engine/core/shaderLibrary/shading/ShadowmapFiltering.glsl.js +0 -4
  343. /package/assets/esri/core/workers/chunks/{430802108b63194b7ddd.js.LICENSE.txt → 033debcbf6b3683dc4fe.js.LICENSE.txt} +0 -0
  344. /package/assets/esri/core/workers/chunks/{4efe5827a5c61db3b19d.js.LICENSE.txt → 064445e6f9512817ac87.js.LICENSE.txt} +0 -0
  345. /package/assets/esri/core/workers/chunks/{c5e288d57bacb8451e2d.js.LICENSE.txt → 463d69f596d1d34ef275.js.LICENSE.txt} +0 -0
  346. /package/assets/esri/core/workers/chunks/{d5e3f8e5b8d2576d3cb3.js.LICENSE.txt → 58a17fb3c0dd07c63d57.js.LICENSE.txt} +0 -0
  347. /package/assets/esri/core/workers/chunks/{7f2ac03efaa4a4898ba2.js.LICENSE.txt → c3b96d1d43afccd23e45.js.LICENSE.txt} +0 -0
  348. /package/assets/esri/core/workers/chunks/{f465fb26541372fdc908.js.LICENSE.txt → ce08e3369641da0d7a27.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{createScreenPointArray as t}from"../../../../../core/screenUtils.js";import{copy as e,subtract as i,length as o,scaleAndAdd as r,add as s}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as a}from"../../../../../geometry/ellipsoidUtils.js";import{fromRenderCamera as m}from"../../../webgl.js";import{pickPointAndInitSphere as c}from"../../../state/utils/navigationUtils.js";import{OffsetCorrectionController as l}from"../../../state/utils/OffsetCorrectionController.js";import p from"../../../webgl/RenderCamera.js";import{InputHandler as h}from"../../../../input/InputHandler.js";import{eventMatchesPointerAction as f}from"../../../../input/handlers/support.js";const _=.99,g=2,u=1e3,d=500;class v extends h{constructor(t,e){super(!0),this._view=t,this._tmpTranslation=n(),this._tmpTargetLocation=n(),this._tmpCenterOffset=n(),this.registerIncoming("double-click",e,t=>this._handleDoubleClick(t)),this._offsetCorrectionController=new l(this._view)}_handleDoubleClick(t){if("ground"!==this._view.navigation.mode.type)return;const{data:e}=t;f(e,"primary")&&(this._move(t),t.stopPropagation())}async _move(n){const l=this._view.state.camera,h=(new p).copyFrom(l),f=t(n.data.x,n.data.y);if(this._view.state.isGlobal){const t=c(this._view,this._view.state.camera,f,a(this._view.spatialReference).radius,1,{});if(null==t.scenePickPoint||!t.hasGeometryIntersection)return;e(this._tmpTargetLocation,t.scenePickPoint)}else{if(!this._view.sceneIntersectionHelper.intersectScreenFreePointFallback(f,this._tmpTargetLocation,{}))return}i(this._tmpTranslation,this._tmpTargetLocation,l.eye);const v=o(this._tmpTranslation),w=Math.min(_,Math.max(v-g,0)/v);r(this._tmpTargetLocation,l.eye,this._tmpTranslation,w),i(this._tmpCenterOffset,h.center,h.eye),h.eye=this._tmpTargetLocation,h.center=s(this._tmpCenterOffset,this._tmpTargetLocation,this._tmpCenterOffset),this._offsetCorrectionController.immediatelyCorrectGroundElevation(h,u),await this._view.goTo(m(this._view,h),{liftOffDisabled:!0,duration:d})}}export{v as GroundDoubleClickMove};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{isSome as o}from"../../../../../core/arrayUtils.js";import e from"../../../../../core/Collection.js";import{EventEmitter as i}from"../../../../../core/Evented.js";import{makeHandle as n}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{destroyMaybe as s}from"../../../../../core/maybe.js";import{debounce as a}from"../../../../../core/promiseUtils.js";import{scale as l,zeroMeters as r}from"../../../../../core/quantity.js";import{initial as p,syncAndInitial as h}from"../../../../../core/reactiveUtils.js";import{property as c,subclass as u}from"../../../../../core/accessorSupport/decorators.js";import{ensureType as d}from"../../../../../core/accessorSupport/ensureType.js";import{UpdatingHandles as m}from"../../../../../core/support/UpdatingHandles.js";import v from"../../../../../geometry/Point.js";import{makeDehydratedPoint as f}from"../../../../../layers/graphics/dehydratedPoint.js";import{getConvertedElevation as _}from"../../../../../support/elevationInfoUtils.js";import{SnappingVisualizer3D as g}from"../../SnappingVisualizer3D.js";import{orientation as M}from"../geometryUtils.js";import{manipulatedObjectGeometry as y}from"../manipulatedObjectUtils.js";import{canMoveZOperations as b}from"../manipulatorUtils.js";import{meshTransformFastUpdateHandles as j}from"../meshFastUpdateUtils.js";import{connectTooltipToManipulatedObject as T}from"../tooltipUtils3D.js";import{createVisualElements as w}from"../visualElementUtils.js";import{discRadius as I}from"../manipulations/config.js";import{MoveManipulation as H}from"../manipulations/MoveManipulation.js";import{axisConstrainedDragSign as S}from"../manipulations/moveUtils.js";import{MoveXYObjectManipulation as O}from"../manipulations/MoveXYObjectManipulation.js";import{isSupportedObject as D}from"./isSupportedObject.js";import{OutlineVisualElement as E}from"../../visualElements/OutlineVisualElement.js";import{createElevationUpdateHandle as x}from"../../../support/elevationUpdateUtils.js";import{dragManipulatedObjectMany as P,resetManipulatedObjectMany as U}from"../../../../interactive/dragEventPipeline.js";import{InteractiveToolBase as A}from"../../../../interactive/InteractiveToolBase.js";import{EditGeometryOperations as R}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import z from"../../../../interactive/options/InteractiveToolOptions.js";import{SnappingContext as k}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as X}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{makeTooltip as Y,enterInputModeIfAvailable as B}from"../../../../interactive/tooltip/tooltipCommonUtils.js";import{MovePointTooltipInfo as C}from"../../../../interactive/tooltip/infos/MovePointTooltipInfo.js";import{TranslateTooltipInfo as V}from"../../../../interactive/tooltip/infos/TranslateTooltipInfo.js";import{TranslateXYTooltipInfo as G}from"../../../../interactive/tooltip/infos/TranslateXYTooltipInfo.js";import{TranslateZTooltipInfo as Z}from"../../../../interactive/tooltip/infos/TranslateZTooltipInfo.js";import{verticalSignedDistanceBetweenPoints as F}from"../../../../support/euclideanLengthMeasurementUtils.js";import{GeometryWorkerHandle as W}from"../../../../support/GeometryWorkerHandle.js";class N{constructor(t){this.objects=t,this.type="move-start"}}class q{constructor(t,o,e){this.dx=t,this.dy=o,this.objects=e,this.type="move"}}class L{constructor(t){this.objects=t,this.type="move-stop"}}class J{constructor(t){this.objects=t,this.type="hold"}}const K=Symbol("manipulators"),Q=Symbol("tooltips"),$=Symbol("move-manipulator-display");let tt=class extends A{get _infos(){return Array.from(this._infosByType.values())}constructor(t){super(t),this._infosByType=new Map,this.events=new i,this.objects=new e,this.enableVisualElements=!0,this.enableZ=!0,this.manipulatorRadius=null,this.toolOptions=new z,this.type="move-3d",this._measurementWorker=new W({preloadGeodetic:!0}),this._latestTooltipInfo=null,this._translateTooltipInfo=null,this._translateXYTooltipInfo=null,this._translateZTooltipInfo=null,this._updatingHandles=new m,this._moveManipulation=null,this._updateMoveTooltipDistanceDebounced=a(this._updateMoveTooltipDistanceAsync.bind(this))}initialize(){const{view:t}=this;this.tooltip=Y(()=>({view:t,options:this.toolOptions.tooltips})),this.addHandles(this._updatingHandles.addOnCollectionChange(()=>this.objects,t=>{t.removed.forEach(t=>this.removeHandles(t)),this._updateObjectInfos(t),this._setupFastTransformUpdates(t.added),this._refreshManipulators(),this._connectTooltips()}));const o=this.objects.toArray();this._updateObjectInfos({added:o,removed:[]}),this._setupFastTransformUpdates(o),this._refreshManipulators(),this._connectTooltips(),this.finishToolCreation()}destroy(){this.tooltip=s(this.tooltip),this._moveManipulation=s(this._moveManipulation),this._set("view",null),this._updatingHandles.destroy(),this._measurementWorker.destroy()}onInputEvent(t){if(this.destroyed)return;if(B(t,this.tooltip))return;const o=this.firstGrabbedManipulator;if("hold"===t.type&&null!=o){const t=this._getActiveObjectInfos(this._infos,o).map(({object:t})=>t);this.events.emit("hold",new J(t))}return super.onInputEvent(t)}get updating(){return this._updatingHandles.updating||!!this.snappingManager?.updating}get _shouldShowMovePointTooltip(){const{objects:t}=this;if(1!==t.length)return!1;const o=y(t.at(0))?.type;return"point"===o||"mesh"===o}get activeTooltipInfo(){return this._shouldShowMovePointTooltip?this._movePointTooltipInfo:this._latestTooltipInfo}reset(){}_updateObjectInfos({added:t,removed:o}){for(const e of t){if(0!==D(e))continue;const t=new et(e);this._infosByType.set(e,t)}for(const e of o)this._infosByType.delete(e)}_setupFastTransformUpdates(t){for(const o of t){const t=this._infosByType.get(o);this.addHandles(j(t.object),o)}}_refreshManipulators(){if(this.removeHandles(K),this.removeHandles($),this._moveManipulation=s(this._moveManipulation),this.manipulators.removeAll(),0===this._infosByType.size)return;const t=this._infos;this._createManipulators(t),this._createVisualElements(t),this._updateMoveManipulation(t)}_createManipulators(t){for(const o of t){const e=o.object;o.manipulationXY=new O({tool:this,view:this.view,object:e}),o.manipulationXY.forEachManipulator(t=>{this.addHandles([t.events.on("immediate-click",t=>{this.events.emit("immediate-click",{...t,object:e}),t.stopPropagation()}),t.events.on("grab-changed",({action:t})=>{"start"===t?this._showTooltip(0):this._hideTooltip(),this._updateMoveManipulatorDisplay()})],K)}),this.addHandles(o.manipulationXY.createDragPipeline((o,e,i,n)=>this._buildDragEventPipeline(t,0,o,e,i,n)),K)}this._createMoveManipulation(t)}_updateMoveManipulatorDisplay(){const t=this._infos.some(t=>t.manipulationXY?.grabbing);this._moveManipulation&&(this._moveManipulation.interactive=!t),this.removeHandles($),t&&this._moveManipulation&&this.addHandles(this._moveManipulation.hideManipulators(),$)}_createMoveManipulation(t){const o=new H({tool:this,view:this.view,snapToScene:!1,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:!0,radius:this.manipulatorRadius??(1===t.length?H.radiusForSymbol(t[0].object.graphic?.symbol):I)});this._moveManipulation=o,o.elevationInfo={mode:"absolute-height",offset:0},o.forEachManipulator(t=>{this.addHandles(t.events.on("immediate-click",e=>{const i=this.objects.at(0);!o.zManipulation.hasManipulator(t)&&1===this.objects.length&&i&&this.events.emit("immediate-click",{...e,object:i}),e.stopPropagation()}),K)});const e=t=>o=>{this.addHandles([o.events.on("focus-changed",({action:o})=>{"focus"===o?this._showTooltip(t):this._hideTooltip()}),o.events.on("grab-changed",()=>{this._latestTooltipInfo&&(this._latestTooltipInfo.distance=r)})],K)};this._moveManipulation.xyManipulation.forEachManipulator(e(0)),this._moveManipulation.xyAxisManipulation.forEachManipulator(e(1)),this._moveManipulation.zManipulation.forEachManipulator(e(2));const i=()=>this._updateMoveManipulation(t);for(const r of t){this.addHandles([r.object.on("committed",i),this._updatingHandles.add(()=>r.object.visible,i)],K);const o=Symbol();this.addHandles(this._updatingHandles.add(()=>r.object.isDraped,e=>{this._updateMoveManipulation(t),this.removeHandles(o),e&&this.addHandles(x({view:this.view,geometry:r.object.graphic?.geometry,elevationInfo:r.object.elevationInfo,onElevationChanges:()=>this._updateMoveManipulation(t)}),o)},p),K),this.addHandles(n(()=>this.removeHandles(o)),K)}const s=t[t.length-1];this.addHandles(s.object.on("committed",()=>this._updateMoveManipulationAngle(s)),K);const{object:a}=s,{operations:l}=a;if(l){const e=a.graphic;this.addHandles(o.createDragPipeline((o,e,i,n,s)=>this._buildDragEventPipeline(t,o,e,i,n,s),a.elevationInfo,l.data.spatialReference,e),K)}this._updateMoveManipulationAngle(s)}_createVisualElements(t){if(this.enableVisualElements)for(const o of t){const e=o.object,i=w({view:this.view,object:e,forEachManipulator:t=>{o.manipulationXY?.forEachManipulator(t),this._moveManipulation?.forEachManipulator(t)},onManipulatorsChanged:()=>n()});null!=i&&(o.geometryRepresentation=i.visualElement,o.geometryRepresentation instanceof E&&this.addHandles([o.geometryRepresentation.events.on("attachment-origin-changed",()=>{o.object.isDraped||this._updateMoveManipulation(t)}),this._updatingHandles.add(()=>o.object.isDraped,()=>this._updateMoveManipulation(t))],K),this.addHandles(i,K))}}_updateMoveManipulationAngle(t){this._moveManipulation&&(this._moveManipulation.angle=M(y(t.object)))}_updateMoveManipulation(t){const o=f(0,0,0,this.view.spatialReference);let e=0,i=!1;const n=this._moveManipulation;if(n){for(const n of t){if(!n.object.visible)continue;this.enableZ&&b(n.object.operations,n.object.elevationInfo)&&(i=!0);const t=n.geometryRepresentation instanceof E&&!n.object.isDraped?n.geometryRepresentation.attachmentOrigin:n.object.origin;if(null!=t){const{x:i,y:n,z:s}=t;o.x+=i,o.y+=n,s&&(o.z??=0,o.z+=s),e++}}e>0?(o.x/=e,o.y/=e,o.z??=0,o.z/=e,n.location=o,n.xyManipulation.available=!0,n.xyAxisManipulation.available=!0,n.zManipulation.available=i):n.available=!1}}_buildDragEventPipeline(t,o,e,i,n,s){const a=[],l=[];let r=null,p=null;const h=()=>{for(const t of a)t.dragging=!1;a.length=0,l.length=0,r=null,p=null,this._updateMoveManipulatorDisplay()};if(1===t.length&&0===o){const o=t[0].object;({steps:i,cancel:n}=this._buildSnappingPipelineSteps(o,o.elevationInfo,i,n,s))}return n=n.next(t=>p?.(t)).next(()=>(l.length&&this.events.emit("move-stop",new L(l)),this.destroyed||h(),null)),{steps:i=i.next(o=>{if("start"===o.action){a.length=0,l.length=0;for(const o of this._getActiveObjectInfos(t,e))a.push(o),l.push(o.object),o.dragging=!0;if(0!==l.length&&(this._moveManipulation&&(this._moveManipulation.interactive=!1),r=P(l),p=U(l),this._emitRecordUndo(),this.events.emit("move-start",new N(l)),this.destroyed))return null}return 0!==l.length?o:null}).next(t=>r?.(t)).next(t=>(this._updateMoveTooltip(o,t),t)).next(t=>{switch(t.action){case"start":case"update":if(t.translationX||t.translationY||t.translationZ){const o=this.view.toScreen(t.mapStart),e=this.view.toScreen(t.mapEnd);if(!o||!e)return null;const i=e.x-o.x,n=e.y-o.y;if(this.events.emit("move",new q(i,n,l)),this.destroyed)return null}break;case"end":if(this.events.emit("move-stop",new L(l)),this.destroyed)return null;h()}return null}),cancel:n}}_getActiveObjectInfos(t,o){return t.filter(t=>!t.dragging&&(t.manipulationXY?.hasManipulator(o)||!t.manipulationXY?.grabbing))}_connectTooltips(){let t;if(this.removeHandles(Q),this._shouldShowMovePointTooltip){const o=this.objects.at(0),{events:e}=this;this._movePointTooltipInfo??=new C({viewType:this.view.type,toolOptions:this.toolOptions});const i={onBeforeUpdate:()=>this.endDrag(),onMoveStart:()=>{this._emitRecordUndo(),e.emit("move-start",new N([o]))},onMove:()=>e.emit("move",new q(0,0,[o])),onMoveStop:()=>e.emit("move-stop",new L([o])),onRotateStart:()=>{},onRotate:()=>{},onRotateStop:()=>{},onScaleStart:()=>{},onScale:()=>{},onScaleStop:()=>{}};t=T(this.tooltip,o,()=>({toolOptions:this.toolOptions,activeTooltipInfo:this._movePointTooltipInfo,callbacks:i}))}else t=this._updatingHandles.add(()=>this.toolOptions.tooltips.effectiveEnabled?this._latestTooltipInfo:null,t=>{this.tooltip.info=t},h);this.addHandles(t,Q)}_showTooltip(t){this._shouldShowMovePointTooltip||this._updateMoveTooltip(t)}_hideTooltip(){this._shouldShowMovePointTooltip||(this.tooltip?.clear(),this._latestTooltipInfo=null)}_updateMoveTooltip(t,o){if(this._shouldShowMovePointTooltip)return;const{toolOptions:e}=this;switch(t){case 0:this._latestTooltipInfo=this._translateTooltipInfo??=new V({toolOptions:e}),this._updatingHandles.consumePromise(this._updateMoveTooltipDistanceDebounced(this._latestTooltipInfo,o,(t,o)=>this._measurementWorker.autoDistance2DBetweenPoints(ot(t),ot(o))));break;case 1:this._latestTooltipInfo=this._translateXYTooltipInfo??=new G({toolOptions:e}),this._updatingHandles.consumePromise(this._updateMoveTooltipDistanceDebounced(this._latestTooltipInfo,o,async(t,e)=>l(await this._measurementWorker.autoDistance2DBetweenPoints(ot(t),ot(e)),S(o))));break;case 2:this._latestTooltipInfo=this._translateZTooltipInfo??=new Z({toolOptions:e}),this._updatingHandles.consumePromise(this._updateMoveTooltipDistanceDebounced(this._latestTooltipInfo,o,F))}this._latestTooltipInfo.toolOptions=e}async _updateMoveTooltipDistanceAsync(t,o,e){if(null!=o&&"end"!==o.action){const{mapStart:i,mapEnd:n}=o,s=await e(i,n);t.distance=s??r}else t.distance=r}_emitRecordUndo(){const t=this.objects.toArray().map(t=>t.createUndoRecord?.()).filter(o);t.length>0&&this.events.emit("record-undo",{updates:t})}_buildSnappingPipelineSteps(t,o,e,i,n){const s=y(t);if(null==s||"point"!==s.type&&"mesh"!==s.type)return{steps:e,cancel:i};const a=("point"===s.type?s:s.origin).clone(),l=new k({elevationInfo:o,pointer:n,editGeometryOperations:R.fromGeometry(a,this.view.state.viewingMode),visualizer:new g,excludeFeature:t.graphic}),r=this.snappingManager,{snappingStep:p,cancelSnapping:h}=X({snappingContext:l,snappingManager:r,updatingHandles:this._updatingHandles});return i=i.next(h),{steps:e=e.next(o=>{a.z=_(this.view,a,t.elevationInfo,{mode:"absolute-height",offset:0});return{...o,snapOrigin:l.coordinateHelper.pointToVector(a)}}).next(...p),cancel:i}}get test(){}};t([c({constructOnly:!0,nonNullable:!0})],tt.prototype,"view",void 0),t([c()],tt.prototype,"objects",void 0),t([c({constructOnly:!0,nonNullable:!0})],tt.prototype,"enableVisualElements",void 0),t([c({constructOnly:!0,nonNullable:!0})],tt.prototype,"enableZ",void 0),t([c({constructOnly:!0})],tt.prototype,"manipulatorRadius",void 0),t([c({constructOnly:!0,type:z})],tt.prototype,"toolOptions",void 0),t([c({constructOnly:!0})],tt.prototype,"snappingManager",void 0),t([c()],tt.prototype,"type",void 0),t([c()],tt.prototype,"updating",null),t([c()],tt.prototype,"_latestTooltipInfo",void 0),t([c()],tt.prototype,"_shouldShowMovePointTooltip",null),t([c()],tt.prototype,"activeTooltipInfo",null),tt=t([u("esri.views.3d.interactive.editingTools.move.MoveTool3D")],tt);const ot=d(v);class et{constructor(t){this.object=t,this.geometryRepresentation=null,this.manipulationXY=null,this.dragging=!1}}export{J as HoldEvent,q as MoveEvent,N as MoveStartEvent,L as MoveStopEvent,tt as MoveTool3D};
2
+ import{__decorate as t}from"tslib";import{isSome as o}from"../../../../../core/arrayUtils.js";import e from"../../../../../core/Collection.js";import{EventEmitter as i}from"../../../../../core/Evented.js";import{makeHandle as n}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{destroyMaybe as s}from"../../../../../core/maybe.js";import{debounce as a}from"../../../../../core/promiseUtils.js";import{scale as l,zeroMeters as r}from"../../../../../core/quantity.js";import{initial as p,syncAndInitial as h}from"../../../../../core/reactiveUtils.js";import{property as c,subclass as d}from"../../../../../core/accessorSupport/decorators.js";import{ensureType as u}from"../../../../../core/accessorSupport/ensureType.js";import{UpdatingHandles as m}from"../../../../../core/support/UpdatingHandles.js";import v from"../../../../../geometry/Point.js";import{makeDehydratedPoint as f}from"../../../../../layers/graphics/dehydratedPoint.js";import{SnappingVisualizer3D as _}from"../../SnappingVisualizer3D.js";import{orientation as g}from"../geometryUtils.js";import{manipulatedObjectGeometry as M}from"../manipulatedObjectUtils.js";import{canMoveZOperations as y}from"../manipulatorUtils.js";import{meshTransformFastUpdateHandles as b}from"../meshFastUpdateUtils.js";import{connectTooltipToManipulatedObject as j}from"../tooltipUtils3D.js";import{createVisualElements as T}from"../visualElementUtils.js";import{discRadius as w}from"../manipulations/config.js";import{MoveManipulation as I}from"../manipulations/MoveManipulation.js";import{axisConstrainedDragSign as H}from"../manipulations/moveUtils.js";import{MoveXYObjectManipulation as S}from"../manipulations/MoveXYObjectManipulation.js";import{isSupportedObject as O}from"./isSupportedObject.js";import{OutlineVisualElement as D}from"../../visualElements/OutlineVisualElement.js";import{createElevationUpdateHandle as E}from"../../../support/elevationUpdateUtils.js";import{dragManipulatedObjectMany as x,resetManipulatedObjectMany as P}from"../../../../interactive/dragEventPipeline.js";import{InteractiveToolBase as U}from"../../../../interactive/InteractiveToolBase.js";import{EditGeometryOperations as A}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import R from"../../../../interactive/options/InteractiveToolOptions.js";import{SnappingContext as k}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as z}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{makeTooltip as X,enterInputModeIfAvailable as Y}from"../../../../interactive/tooltip/tooltipCommonUtils.js";import{MovePointTooltipInfo as B}from"../../../../interactive/tooltip/infos/MovePointTooltipInfo.js";import{TranslateTooltipInfo as C}from"../../../../interactive/tooltip/infos/TranslateTooltipInfo.js";import{TranslateXYTooltipInfo as V}from"../../../../interactive/tooltip/infos/TranslateXYTooltipInfo.js";import{TranslateZTooltipInfo as Z}from"../../../../interactive/tooltip/infos/TranslateZTooltipInfo.js";import{verticalSignedDistanceBetweenPoints as G}from"../../../../support/euclideanLengthMeasurementUtils.js";import{GeometryWorkerHandle as F}from"../../../../support/GeometryWorkerHandle.js";class W{constructor(t){this.objects=t,this.type="move-start"}}class N{constructor(t,o,e){this.dx=t,this.dy=o,this.objects=e,this.type="move"}}class q{constructor(t){this.objects=t,this.type="move-stop"}}class L{constructor(t){this.objects=t,this.type="hold"}}const J=Symbol("manipulators"),K=Symbol("tooltips"),Q=Symbol("move-manipulator-display");let $=class extends U{get _infos(){return Array.from(this._infosByType.values())}constructor(t){super(t),this._infosByType=new Map,this.events=new i,this.objects=new e,this.enableVisualElements=!0,this.enableZ=!0,this.manipulatorRadius=null,this.toolOptions=new R,this.type="move-3d",this._measurementWorker=new F({preloadGeodetic:!0}),this._latestTooltipInfo=null,this._translateTooltipInfo=null,this._translateXYTooltipInfo=null,this._translateZTooltipInfo=null,this._updatingHandles=new m,this._moveManipulation=null,this._updateMoveTooltipDistanceDebounced=a(this._updateMoveTooltipDistanceAsync.bind(this))}initialize(){const{view:t}=this;this.tooltip=X(()=>({view:t,options:this.toolOptions.tooltips})),this.addHandles(this._updatingHandles.addOnCollectionChange(()=>this.objects,t=>{t.removed.forEach(t=>this.removeHandles(t)),this._updateObjectInfos(t),this._setupFastTransformUpdates(t.added),this._refreshManipulators(),this._connectTooltips()}));const o=this.objects.toArray();this._updateObjectInfos({added:o,removed:[]}),this._setupFastTransformUpdates(o),this._refreshManipulators(),this._connectTooltips(),this.finishToolCreation()}destroy(){this.tooltip=s(this.tooltip),this._moveManipulation=s(this._moveManipulation),this._set("view",null),this._updatingHandles.destroy(),this._measurementWorker.destroy()}onInputEvent(t){if(this.destroyed)return;if(Y(t,this.tooltip))return;const o=this.firstGrabbedManipulator;if("hold"===t.type&&null!=o){const t=this._getActiveObjectInfos(this._infos,o).map(({object:t})=>t);this.events.emit("hold",new L(t))}return super.onInputEvent(t)}get updating(){return this._updatingHandles.updating||!!this.snappingManager?.updating}get _shouldShowMovePointTooltip(){const{objects:t}=this;if(1!==t.length)return!1;const o=M(t.at(0))?.type;return"point"===o||"mesh"===o}get activeTooltipInfo(){return this._shouldShowMovePointTooltip?this._movePointTooltipInfo:this._latestTooltipInfo}reset(){}_updateObjectInfos({added:t,removed:o}){for(const e of t){if(0!==O(e))continue;const t=new ot(e);this._infosByType.set(e,t)}for(const e of o)this._infosByType.delete(e)}_setupFastTransformUpdates(t){for(const o of t){const t=this._infosByType.get(o);this.addHandles(b(t.object),o)}}_refreshManipulators(){if(this.removeHandles(J),this.removeHandles(Q),this._moveManipulation=s(this._moveManipulation),this.manipulators.removeAll(),0===this._infosByType.size)return;const t=this._infos;this._createManipulators(t),this._createVisualElements(t),this._updateMoveManipulation(t)}_createManipulators(t){for(const o of t){const e=o.object;o.manipulationXY=new S({tool:this,view:this.view,object:e}),o.manipulationXY.forEachManipulator(t=>{this.addHandles([t.events.on("immediate-click",t=>{this.events.emit("immediate-click",{...t,object:e}),t.stopPropagation()}),t.events.on("grab-changed",({action:t})=>{"start"===t?this._showTooltip(0):this._hideTooltip(),this._updateMoveManipulatorDisplay()})],J)}),this.addHandles(o.manipulationXY.createDragPipeline((o,e,i,n)=>this._buildDragEventPipeline(t,0,o,e,i,n)),J)}this._createMoveManipulation(t)}_updateMoveManipulatorDisplay(){const t=this._infos.some(t=>t.manipulationXY?.grabbing);this._moveManipulation&&(this._moveManipulation.interactive=!t),this.removeHandles(Q),t&&this._moveManipulation&&this.addHandles(this._moveManipulation.hideManipulators(),Q)}_createMoveManipulation(t){const o=new I({tool:this,view:this.view,snapToScene:!1,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:!0,radius:this.manipulatorRadius??(1===t.length?I.radiusForSymbol(t[0].object.graphic?.symbol):w)});this._moveManipulation=o,o.elevationInfo={mode:"absolute-height",offset:0},o.forEachManipulator(t=>{this.addHandles(t.events.on("immediate-click",e=>{const i=this.objects.at(0);!o.zManipulation.hasManipulator(t)&&1===this.objects.length&&i&&this.events.emit("immediate-click",{...e,object:i}),e.stopPropagation()}),J)});const e=t=>o=>{this.addHandles([o.events.on("focus-changed",({action:o})=>{"focus"===o?this._showTooltip(t):this._hideTooltip()}),o.events.on("grab-changed",()=>{this._latestTooltipInfo&&(this._latestTooltipInfo.distance=r)})],J)};this._moveManipulation.xyManipulation.forEachManipulator(e(0)),this._moveManipulation.xyAxisManipulation.forEachManipulator(e(1)),this._moveManipulation.zManipulation.forEachManipulator(e(2));const i=()=>this._updateMoveManipulation(t);for(const r of t){this.addHandles([r.object.on("committed",i),this._updatingHandles.add(()=>r.object.visible,i)],J);const o=Symbol();this.addHandles(this._updatingHandles.add(()=>r.object.isDraped,e=>{this._updateMoveManipulation(t),this.removeHandles(o),e&&this.addHandles(E({view:this.view,geometry:r.object.graphic?.geometry,elevationInfo:r.object.elevationInfo,onElevationChanges:()=>this._updateMoveManipulation(t)}),o)},p),J),this.addHandles(n(()=>this.removeHandles(o)),J)}const s=t[t.length-1];this.addHandles(s.object.on("committed",()=>this._updateMoveManipulationAngle(s)),J);const{object:a}=s,{operations:l}=a;if(l){const e=a.graphic;this.addHandles(o.createDragPipeline((o,e,i,n,s)=>this._buildDragEventPipeline(t,o,e,i,n,s),a.elevationInfo,l.data.spatialReference,e),J)}this._updateMoveManipulationAngle(s)}_createVisualElements(t){if(this.enableVisualElements)for(const o of t){const e=o.object,i=T({view:this.view,object:e,forEachManipulator:t=>{o.manipulationXY?.forEachManipulator(t),this._moveManipulation?.forEachManipulator(t)},onManipulatorsChanged:()=>n()});null!=i&&(o.geometryRepresentation=i.visualElement,o.geometryRepresentation instanceof D&&this.addHandles([o.geometryRepresentation.events.on("attachment-origin-changed",()=>{o.object.isDraped||this._updateMoveManipulation(t)}),this._updatingHandles.add(()=>o.object.isDraped,()=>this._updateMoveManipulation(t))],J),this.addHandles(i,J))}}_updateMoveManipulationAngle(t){this._moveManipulation&&(this._moveManipulation.angle=g(M(t.object)))}_updateMoveManipulation(t){const o=f(0,0,0,this.view.spatialReference);let e=0,i=!1;const n=this._moveManipulation;if(n){for(const n of t){if(!n.object.visible)continue;this.enableZ&&y(n.object.operations,n.object.elevationInfo)&&(i=!0);const t=n.geometryRepresentation instanceof D&&!n.object.isDraped?n.geometryRepresentation.attachmentOrigin:n.object.origin;if(null!=t){const{x:i,y:n,z:s}=t;o.x+=i,o.y+=n,s&&(o.z??=0,o.z+=s),e++}}e>0?(o.x/=e,o.y/=e,o.z??=0,o.z/=e,n.location=o,n.xyManipulation.available=!0,n.xyAxisManipulation.available=!0,n.zManipulation.available=i):n.available=!1}}_buildDragEventPipeline(t,o,e,i,n,s){const a=[],l=[];let r=null,p=null;const h=()=>{for(const t of a)t.dragging=!1;a.length=0,l.length=0,r=null,p=null,this._updateMoveManipulatorDisplay()};if(1===t.length&&0===o){const o=t[0].object;({steps:i,cancel:n}=this._buildSnappingPipelineSteps(o,o.elevationInfo,i,n,s))}return n=n.next(t=>p?.(t)).next(()=>(l.length&&this.events.emit("move-stop",new q(l)),this.destroyed||h(),null)),{steps:i=i.next(o=>{if("start"===o.action){a.length=0,l.length=0;for(const o of this._getActiveObjectInfos(t,e))a.push(o),l.push(o.object),o.dragging=!0;if(0!==l.length&&(this._moveManipulation&&(this._moveManipulation.interactive=!1),r=x(l),p=P(l),this._emitRecordUndo(),this.events.emit("move-start",new W(l)),this.destroyed))return null}return 0!==l.length?o:null}).next(t=>r?.(t)).next(t=>(this._updateMoveTooltip(o,t),t)).next(t=>{switch(t.action){case"start":case"update":if(t.translationX||t.translationY||t.translationZ){const o=this.view.toScreen(t.mapStart),e=this.view.toScreen(t.mapEnd);if(!o||!e)return null;const i=e.x-o.x,n=e.y-o.y;if(this.events.emit("move",new N(i,n,l)),this.destroyed)return null}break;case"end":if(this.events.emit("move-stop",new q(l)),this.destroyed)return null;h()}return null}),cancel:n}}_getActiveObjectInfos(t,o){return t.filter(t=>!t.dragging&&(t.manipulationXY?.hasManipulator(o)||!t.manipulationXY?.grabbing))}_connectTooltips(){let t;if(this.removeHandles(K),this._shouldShowMovePointTooltip){const o=this.objects.at(0),{events:e}=this;this._movePointTooltipInfo??=new B({viewType:this.view.type,toolOptions:this.toolOptions});const i={onBeforeUpdate:()=>this.endDrag(),onMoveStart:()=>{this._emitRecordUndo(),e.emit("move-start",new W([o]))},onMove:()=>e.emit("move",new N(0,0,[o])),onMoveStop:()=>e.emit("move-stop",new q([o])),onRotateStart:()=>{},onRotate:()=>{},onRotateStop:()=>{},onScaleStart:()=>{},onScale:()=>{},onScaleStop:()=>{}};t=j(this.tooltip,o,()=>({toolOptions:this.toolOptions,activeTooltipInfo:this._movePointTooltipInfo,callbacks:i}))}else t=this._updatingHandles.add(()=>this.toolOptions.tooltips.effectiveEnabled?this._latestTooltipInfo:null,t=>{this.tooltip.info=t},h);this.addHandles(t,K)}_showTooltip(t){this._shouldShowMovePointTooltip||this._updateMoveTooltip(t)}_hideTooltip(){this._shouldShowMovePointTooltip||(this.tooltip?.clear(),this._latestTooltipInfo=null)}_updateMoveTooltip(t,o){if(this._shouldShowMovePointTooltip)return;const{toolOptions:e}=this;switch(t){case 0:this._latestTooltipInfo=this._translateTooltipInfo??=new C({toolOptions:e}),this._updatingHandles.consumePromise(this._updateMoveTooltipDistanceDebounced(this._latestTooltipInfo,o,(t,o)=>this._measurementWorker.autoDistance2DBetweenPoints(tt(t),tt(o))));break;case 1:this._latestTooltipInfo=this._translateXYTooltipInfo??=new V({toolOptions:e}),this._updatingHandles.consumePromise(this._updateMoveTooltipDistanceDebounced(this._latestTooltipInfo,o,async(t,e)=>l(await this._measurementWorker.autoDistance2DBetweenPoints(tt(t),tt(e)),H(o))));break;case 2:this._latestTooltipInfo=this._translateZTooltipInfo??=new Z({toolOptions:e}),this._updatingHandles.consumePromise(this._updateMoveTooltipDistanceDebounced(this._latestTooltipInfo,o,G))}this._latestTooltipInfo.toolOptions=e}async _updateMoveTooltipDistanceAsync(t,o,e){if(null!=o&&"end"!==o.action){const{mapStart:i,mapEnd:n}=o,s=await e(i,n);t.distance=s??r}else t.distance=r}_emitRecordUndo(){const t=this.objects.toArray().map(t=>t.createUndoRecord?.()).filter(o);t.length>0&&this.events.emit("record-undo",{updates:t})}_buildSnappingPipelineSteps(t,o,e,i,n){const s=M(t);if(null==s||"point"!==s.type&&"mesh"!==s.type)return{steps:e,cancel:i};const a=("point"===s.type?s:s.origin).clone(),l=new k({elevationInfo:o,pointer:n,editGeometryOperations:A.fromGeometry(a,this.view.state.viewingMode),visualizer:new _,excludeFeature:t.graphic}),r=this.snappingManager,{snappingStep:p,cancelSnapping:h}=z({snappingContext:l,snappingManager:r,updatingHandles:this._updatingHandles,useZ:"on-the-ground"!==o.mode});return i=i.next(h),{steps:e=e.next(t=>({...t,snapOrigin:l.coordinateHelper.pointToVector(a)})).next(...p),cancel:i}}get test(){}};t([c({constructOnly:!0,nonNullable:!0})],$.prototype,"view",void 0),t([c()],$.prototype,"objects",void 0),t([c({constructOnly:!0,nonNullable:!0})],$.prototype,"enableVisualElements",void 0),t([c({constructOnly:!0,nonNullable:!0})],$.prototype,"enableZ",void 0),t([c({constructOnly:!0})],$.prototype,"manipulatorRadius",void 0),t([c({constructOnly:!0,type:R})],$.prototype,"toolOptions",void 0),t([c({constructOnly:!0})],$.prototype,"snappingManager",void 0),t([c()],$.prototype,"type",void 0),t([c()],$.prototype,"updating",null),t([c()],$.prototype,"_latestTooltipInfo",void 0),t([c()],$.prototype,"_shouldShowMovePointTooltip",null),t([c()],$.prototype,"activeTooltipInfo",null),$=t([d("esri.views.3d.interactive.editingTools.move.MoveTool3D")],$);const tt=u(v);class ot{constructor(t){this.object=t,this.geometryRepresentation=null,this.manipulationXY=null,this.dragging=!1}}export{L as HoldEvent,N as MoveEvent,W as MoveStartEvent,q as MoveStopEvent,$ as MoveTool3D};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{hasScaling as e}from"../../../core/mathUtils.js";import{fromMat4 as t}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{multiply as o}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{clone as n,create as s}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import i from"../../../geometry/SpatialReference.js";import{ensurePackedMat4f64 as a,ensurePackedArray as f}from"../../../geometry/support/DoubleArray.js";import c from"../../../geometry/support/MeshGeoreferencedVertexSpace.js";import l from"../../../geometry/support/MeshLocalVertexSpace.js";import{b as m,n as u}from"../../../chunks/vec3.js";import{get as p,cleanup as y}from"../../../libs/i3s/I3SModule.js";import{processNormals as h}from"./IntegratedMeshNormals.js";import{TransformedGeometry as g,TransformedData as d}from"./SceneLayerWorkerHandle.js";async function b(e){S=await B();const t=[e.geometryBuffer];return{result:N(S,e,t),transferList:t}}async function w(e){S=await B();const t=[e.geometryBuffer],{geometryBuffer:r}=e,o=r.byteLength,n=S._malloc(o),s=new Uint8Array(S.HEAPU8.buffer,n,o);s.set(new Uint8Array(r));const i=S.dracoDecompressPointCloudData(n,s.byteLength);if(S._free(n),i.error.length>0)throw new Error(`i3s.wasm: ${i.error}`);const a=i.featureIds?.length>0?i.featureIds.slice():null,f=i.positions.slice();return a&&t.push(a.buffer),t.push(f.buffer),{result:{positions:f,featureIds:a},transferList:t}}async function j(e){await B(),_(e);const t={buffer:e.buffer};return{result:t,transferList:[t.buffer]}}async function x(e){await B(),U(e)}async function A(e){S=await B(),S.setLegacySchema(e.context,e.jsonSchema)}async function E(e){const{localMatrix:t,origin:r,positions:o,vertexSpace:n}=e,s=i.fromJSON(e.inSpatialReference),m=i.fromJSON(e.outSpatialReference),u=t?a(t):void 0,p=f(r);let y;const[{projectBuffer:h},{initializeProjection:g}]=await Promise.all([import("../../../geometry/projection/projectBuffer.js"),import("../../../geometry/projectionUtils.js")]);await g(s,m);const d=[0,0,0];if(!h(p,s,0,d,m,0))throw new Error("Failed to project");if("georeferenced"===n.type&&null==n.origin){if(y=new Float64Array(o.length),!h(o,s,0,y,m,0,y.length/3))throw new Error("Failed to project")}else{const e="georeferenced"===n.type?c.fromJSON(n):l.fromJSON(n),{projectMeshVertexPositions:t}=await(import("../../../geometry/support/meshUtils/projectMeshVertexPositions.js")),r=t({vertexAttributes:{position:o},transform:u?{localMatrix:u}:void 0,vertexSpace:e,spatialReference:s},m);if(!r)throw new Error("Failed to project");y=r}const b=y.length,[w,j,x]=d;for(let i=0;i<b;i+=3)y[i]-=w,y[i+1]-=j,y[i+2]-=x;return{result:{projected:y,original:o,projectedOrigin:d},transferList:[y.buffer,o.buffer]}}async function L({normalMatrix:t,normals:r}){const o=new Float32Array(r.length);return m(o,r,t),e(t)&&u(o,o),{result:{transformed:o,original:r},transferList:[o.buffer,r.buffer]}}function v(e){O(e)}let M,S;function U(e){if(!S)return;const t=e.modifications,r=S._malloc(8*t.length),o=new Float64Array(S.HEAPU8.buffer,r,t.length);for(let n=0;n<t.length;++n)o[n]=t[n];S.setModifications(e.context,r,t.length,e.isGeodetic),S._free(r)}function N(e,o,n){const{context:s,globalTrafo:i,geometryElevationOffset:a,mbs:f,obbData:c,layouts:l,needNormals:m,computeNormals:u,elevationOffset:p,planetRadiusInGlobalMode:y,geometryBuffer:b,geometryDescriptor:w,geometryData:j,indexToVertexProjector:x,vertexToRenderProjector:A,normalReferenceFrame:E}=o,L=e._malloc(b.byteLength),v=33,M=e._malloc(v*Float64Array.BYTES_PER_ELEMENT),S=new Uint8Array(e.HEAPU8.buffer,L,b.byteLength);S.set(new Uint8Array(b));const U=new Float64Array(e.HEAPU8.buffer,M,v);F(U,[NaN,NaN,NaN],0);let N=3;F(U,i,N),N+=16,F(U,f.center,N),N+=3,U[N++]=f.radius,c&&F(U,c,N++);const P={isDraco:!1,isLegacy:!1,color:l.some(e=>e.some(e=>"color"===e.name)),normal:m&&l.some(e=>e.some(e=>"normalCompressed"===e.name)),uv0:l.some(e=>e.some(e=>"uv0"===e.name)),uvRegion:l.some(e=>e.some(e=>"uvRegion"===e.name)),featureIndex:w.featureIndex},_=e.process(s,!!c,L,S.byteLength,w,P,M,p,x,A,E);if(e._free(M),e._free(L),_.error.length>0)throw new Error(`i3s.wasm: ${_.error}`);if(_.discarded)return null;const O=_.componentOffsets.length>0?_.componentOffsets.slice():null,R=_.featureIds.length>0?_.featureIds.slice():null,B=_.anchorIds.length>0?Array.from(_.anchorIds):null,T=_.anchors.length>0?Array.from(_.anchors):null,D=1===_.indicesType?new Uint16Array(_.indices.buffer,_.indices.byteOffset,_.indices.byteLength/2).slice():new Uint32Array(_.indices.buffer,_.indices.byteOffset,_.indices.byteLength/4).slice(),H=l[0].slice(),V=t(r(),i),J=h(_.interleavedVertedData,D,H,u&&!P.normal,V),C=_.positions.slice(),G=I(C,i,j?.geometries[0]?.transformation,y,a),{buffer:k,byteOffset:Y,byteLength:$}=_.positionIndices,q=1===_.positionIndicesType?new Uint16Array(k,Y,$/2).slice():new Uint32Array(k,Y,$/4).slice(),z=new g(H,J.data,J.indices,_.hasColors,_.hasModifications,{data:C,indices:q});return R&&n.push(R.buffer),O&&n.push(O.buffer),n.push(J.data),n.push(J.indices.buffer),n.push(C.buffer),n.push(q.buffer),new d(O,R,B,T,z,i,_.obb,G.minElevation,G.maxElevation)}function I(e,t,r,i,a){const f=r?n(r):s();o(f,t,f);const c=f[0],l=f[1],m=f[2],u=f[4],p=f[5],y=f[6],h=f[8],g=f[9],d=f[10],b=f[12],w=f[13],j=f[14];let x=1/0,A=-1/0;for(let o=0;o<e.length;o+=3){const t=e[o],r=e[o+1],n=e[o+2],s=t*m+r*y+n*d+j;let f=0;if(i>0){const e=t*c+r*u+n*h+b,o=t*l+r*p+n*g+w;f=Math.sqrt(e*e+o*o+s*s)-i}else f=s;f-=a,x=Math.min(x,f),A=Math.max(A,f)}return{minElevation:x,maxElevation:A}}function P(e){return 0===e?0:1===e?1:2===e?2:3}function _(e){if(!S)return;const{context:t,buffer:r}=e,o=S._malloc(r.byteLength),n=r.byteLength/Float64Array.BYTES_PER_ELEMENT,s=new Float64Array(S.HEAPU8.buffer,o,n),i=new Float64Array(r);s.set(i),S.filterOBBs(t,o,n),i.set(s),S._free(o)}function O(e){0===S?.destroy(e)&&(S=null,M=null,y())}function F(e,t,r){for(let o=0;o<t.length;++o)e[o+r]=t[o]}async function R(){S||await B()}async function B(){return S||(S=await(M??=p())),S}const T={transform:(e,t)=>S&&N(S,e,t),destroy:O};export{v as destroyContext,w as dracoDecompressPointCloudData,j as filterObbsForModifications,_ as filterObbsForModificationsSync,R as initialize,P as interpretObbModificationResults,b as process,E as project,A as setLegacySchema,x as setModifications,U as setModificationsSync,T as test,L as transformNormals};
2
+ import{hasScaling as e}from"../../../core/mathUtils.js";import{fromMat4 as t}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{multiply as o}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{clone as n,create as s}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import i from"../../../geometry/SpatialReference.js";import{ensurePackedMat4f64 as a,ensurePackedArray as f}from"../../../geometry/support/DoubleArray.js";import c from"../../../geometry/support/MeshGeoreferencedVertexSpace.js";import l from"../../../geometry/support/MeshLocalVertexSpace.js";import{b as m,n as u}from"../../../chunks/vec3.js";import{get as p,cleanup as y}from"../../../libs/i3s/I3SModule.js";import{processNormals as h}from"./IntegratedMeshNormals.js";import{TransformedGeometry as g,TransformedData as d}from"./SceneLayerWorkerHandle.js";async function b(e){M=await R();const t=[e.geometryBuffer];return{result:U(M,e,t),transferList:t}}async function w(e){M=await R();const t=[e.geometryBuffer],{geometryBuffer:r}=e,o=r.byteLength,n=M._malloc(o),s=new Uint8Array(M.HEAPU8.buffer,n,o);s.set(new Uint8Array(r));const i=M.dracoDecompressPointCloudData(n,s.byteLength);if(M._free(n),i.error.length>0)throw new Error(`i3s.wasm: ${i.error}`);const a=i.featureIds?.length>0?i.featureIds.slice():null,f=i.positions.slice();return a&&t.push(a.buffer),t.push(f.buffer),{result:{positions:f,featureIds:a},transferList:t}}async function j(e){await R(),P(e);const t={buffer:e.buffer};return{result:t,transferList:[t.buffer]}}async function x(e){await R(),S(e)}async function A(e){M=await R(),M.setLegacySchema(e.context,e.jsonSchema)}async function E(e){const{localMatrix:t,origin:r,positions:o,vertexSpace:n}=e,s=i.fromJSON(e.inSpatialReference),m=i.fromJSON(e.outSpatialReference),u=t?a(t):void 0,p=f(r);let y;const[{projectBuffer:h},{initializeProjection:g}]=await Promise.all([import("../../../geometry/projection/projectBuffer.js"),import("../../../geometry/projectionUtils.js")]);await g(s,m);const d=[0,0,0];if(!h(p,s,0,d,m,0))throw new Error("Failed to project");if("georeferenced"===n.type&&null==n.origin){if(y=new Float64Array(o.length),!h(o,s,0,y,m,0,y.length/3))throw new Error("Failed to project")}else{const e="georeferenced"===n.type?c.fromJSON(n):l.fromJSON(n),{projectMeshVertexPositions:t}=await(import("../../../geometry/support/meshUtils/projectMeshVertexPositions.js")),r=t({vertexAttributes:{position:o},transform:u?{localMatrix:u}:void 0,vertexSpace:e,spatialReference:s},m);if(!r)throw new Error("Failed to project");y=r}const b=y.length,[w,j,x]=d;for(let i=0;i<b;i+=3)y[i]-=w,y[i+1]-=j,y[i+2]-=x;return{result:{projected:y,original:o,projectedOrigin:d},transferList:[y.buffer,o.buffer]}}async function L({normalMatrix:t,normals:r}){const o=new Float32Array(r.length);return m(o,r,t),e(t)&&u(o,o),{result:{transformed:o,original:r},transferList:[o.buffer,r.buffer]}}function v(e){_(e)}let M;function S(e){if(!M)return;const t=e.modifications,r=M._malloc(8*t.length),o=new Float64Array(M.HEAPU8.buffer,r,t.length);for(let n=0;n<t.length;++n)o[n]=t[n];M.setModifications(e.context,r,t.length,e.isGeodetic),M._free(r)}function U(e,o,n){const{context:s,globalTrafo:i,geometryElevationOffset:a,mbs:f,obbData:c,layouts:l,needNormals:m,computeNormals:u,elevationOffset:p,planetRadiusInGlobalMode:y,geometryBuffer:b,geometryDescriptor:w,geometryData:j,indexToVertexProjector:x,vertexToRenderProjector:A,normalReferenceFrame:E}=o,L=e._malloc(b.byteLength),v=33,M=e._malloc(v*Float64Array.BYTES_PER_ELEMENT),S=new Uint8Array(e.HEAPU8.buffer,L,b.byteLength);S.set(new Uint8Array(b));const U=new Float64Array(e.HEAPU8.buffer,M,v);O(U,[NaN,NaN,NaN],0);let I=3;O(U,i,I),I+=16,O(U,f.center,I),I+=3,U[I++]=f.radius,c&&O(U,c,I++);const P={isDraco:!1,isLegacy:!1,color:l.some(e=>e.some(e=>"color"===e.name)),normal:m&&l.some(e=>e.some(e=>"normalCompressed"===e.name)),uv0:l.some(e=>e.some(e=>"uv0"===e.name)),uvRegion:l.some(e=>e.some(e=>"uvRegion"===e.name)),featureIndex:w.featureIndex},_=e.process(s,!!c,L,S.byteLength,w,P,M,p,x,A,E);if(e._free(M),e._free(L),_.error.length>0)throw new Error(`i3s.wasm: ${_.error}`);if(_.discarded)return null;const F=_.componentOffsets.length>0?_.componentOffsets.slice():null,R=_.featureIds.length>0?_.featureIds.slice():null,B=_.anchorIds.length>0?Array.from(_.anchorIds):null,T=_.anchors.length>0?Array.from(_.anchors):null,D=1===_.indicesType?new Uint16Array(_.indices.buffer,_.indices.byteOffset,_.indices.byteLength/2).slice():new Uint32Array(_.indices.buffer,_.indices.byteOffset,_.indices.byteLength/4).slice(),H=l[0].slice(),V=t(r(),i),J=h(_.interleavedVertedData,D,H,u&&!P.normal,V),C=_.positions.slice(),G=N(C,i,j?.geometries[0]?.transformation,y,a),{buffer:k,byteOffset:Y,byteLength:$}=_.positionIndices,q=1===_.positionIndicesType?new Uint16Array(k,Y,$/2).slice():new Uint32Array(k,Y,$/4).slice(),z=new g(H,J.data,J.indices,_.hasColors,_.hasModifications,{data:C,indices:q});return R&&n.push(R.buffer),F&&n.push(F.buffer),n.push(J.data),n.push(J.indices.buffer),n.push(C.buffer),n.push(q.buffer),new d(F,R,B,T,z,i,_.obb,G.minElevation,G.maxElevation)}function N(e,t,r,i,a){const f=r?n(r):s();o(f,t,f);const c=f[0],l=f[1],m=f[2],u=f[4],p=f[5],y=f[6],h=f[8],g=f[9],d=f[10],b=f[12],w=f[13],j=f[14];let x=1/0,A=-1/0;for(let o=0;o<e.length;o+=3){const t=e[o],r=e[o+1],n=e[o+2],s=t*m+r*y+n*d+j;let f=0;if(i>0){const e=t*c+r*u+n*h+b,o=t*l+r*p+n*g+w;f=Math.sqrt(e*e+o*o+s*s)-i}else f=s;f-=a,x=Math.min(x,f),A=Math.max(A,f)}return{minElevation:x,maxElevation:A}}function I(e){return 0===e?0:1===e?1:2===e?2:3}function P(e){if(!M)return;const{context:t,buffer:r}=e,o=M._malloc(r.byteLength),n=r.byteLength/Float64Array.BYTES_PER_ELEMENT,s=new Float64Array(M.HEAPU8.buffer,o,n),i=new Float64Array(r);s.set(i),M.filterOBBs(t,o,n),i.set(s),M._free(o)}function _(e){0===M?.destroy(e)&&(M=null,y())}function O(e,t,r){for(let o=0;o<t.length;++o)e[o+r]=t[o]}async function F(){M||await R()}async function R(){return M??=await p(),M}const B={transform:(e,t)=>M&&U(M,e,t),destroy:_};export{v as destroyContext,w as dracoDecompressPointCloudData,j as filterObbsForModifications,P as filterObbsForModificationsSync,F as initialize,I as interpretObbModificationResults,b as process,E as project,A as setLegacySchema,x as setModifications,S as setModificationsSync,B as test,L as transformNormals};
@@ -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"../../../core/has.js";import i from"../../../core/Logger.js";import{MemCacheStorage as s,MemCache as r}from"../../../core/MemCache.js";import{addFrameTask as a}from"../../../core/scheduling.js";import{Milliseconds as o}from"../../../core/time.js";import{property as h,subclass as d}from"../../../core/accessorSupport/decorators.js";import{getLyr3DWasm as y}from"../layers/Lyr3DWasm.js";import{isMemoryManagedView as l}from"./MemoryManagedView.js";import{makeBudget as m}from"../../support/Scheduler.js";function u(e){return new w({view:e})}const n=.1,c=1,_=1,p=.75,M=.6,g=1.3;let w=class extends t{constructor(e){super(e),this._quality=1,this._usedMemory=0,this._updating=!1,this._stableQuality=0,this._downscaleMemoryUsed=0,this._canFastRecover=!1,this._predictedMemory=0,this._cacheStorage=new s,this._warnMemoryUsage=null,this._numQualityChanges=0,this._maxMemory=750,this._additionalCacheMemory=0,this.addHandles(a({prepare:()=>this._updateMemory()}))}destroy(){this._cacheStorage.destroy()}get maxMemory(){return this._maxMemory}set maxMemory(e){null==e||e<=0||(this._stableQuality=0,this._canFastRecover=!1,this._maxMemory<e&&this._updateQuality(c),this._maxMemory=e)}get additionalCacheMemory(){return this._additionalCacheMemory}set additionalCacheMemory(e){null!=e&&(this._additionalCacheMemory=e)}get memoryFactor(){return this._quality}get updating(){return this._updating}get usedMemory(){return this._usedMemory}get usedCacheMemory(){return this._cacheStorage.size}newCache(e,t,i){return new r(e,this._cacheStorage,t,i)}resetStableQuality(){this._stableQuality=0}disableMemCache(){this.additionalCacheMemory=-4096}update(){if(this._predictedMemory<=0&&!this._updating)return;let e=this._layersUpdating();if(this._predictedMemory<M&&this._canFastRecover)this._downscaleMemoryUsed=0,this._stableQuality=0,this._canFastRecover=!1,this._updateQuality(c);else if(e){if(this._predictedMemory>1.1*_||this._usedMemory>_)if(this._stableQuality>0)this._downscaleMemoryUsed=0,this._updateQuality(this._stableQuality);else if(this._quality>n&&this._downscaleMemoryUsed<this._usedMemory){if(this._compactAndUpdate())return;this._updateQuality(this._quality/g),this._downscaleMemoryUsed=this._usedMemory,this._canFastRecover=!1}}else if(this._downscaleMemoryUsed=0,this._usedMemory>_){if(this._compactAndUpdate())return;this._stableQuality=0,this._canFastRecover=!1,e=this._updateQuality(this._quality/g),this._downscaleMemoryUsed=this._predictedMemory}else if(this._stableQuality!==this._quality)if(this._usedMemory<p&&this._quality<c){this._stableQuality=this._quality;const t=.05;e=this._updateQuality(this._quality+t)}else this._quality<1&&(this._canFastRecover=!0);this._updating=e}_compactAndUpdate(){const e=m(o(100)),t=this.view.stage.compact(e);return this.view.overlayManager.renderer.compact(e)||t}_updateQuality(e){return(e=Math.min(Math.max(e,n),c))!==this._quality&&(this._quality=e,++this._numQualityChanges,!0)}_layersUpdating(){return this.view.allLayerViews.some(e=>!!e.updating)}_updateMemory(){if(!this.view?.updating||this.view.destroyed||this.view.destroying)return;this.view.stage?.renderer?.tick();const e=this.view.stage?.renderer?.usedMemory;let t=(this.view.basemapTerrain?.usedMemory??0)+(e?e.fbos+e.edges+e.plugins+e.clouds:0)+this.view.deconflictor?.usedMemory+this.view.labeler?.usedMemory+(y(this.view)?.lyr3DInternalMemoryBytes??0),s=0;this.view.allLayerViews&&this.view.allLayerViews.forEach(e=>{if(l(e)){const i=e.ignoresMemoryFactor?this._quality:1;t+=e.usedMemory*i,s+=e.unloadedMemory*i}});const r=null==this._warnMemoryUsage||Math.round(10*t)!==Math.round(10*this._warnMemoryUsage),a=1048576*this.maxMemory;if(t>a&&r){this._warnMemoryUsage=t;const e=e=>(e/1048576).toLocaleString(void 0,{maximumFractionDigits:1})+" MB",r=Math.round(100*this._quality);i.getLogger(this).warn(`Memory Limit exceeded! Limit: ${e(a)} Current: ${e(t)} Projected: ${e(t+s)} Quality: ${r}%`)}this._usedMemory=t/a,this._predictedMemory=(t+s)/a;const o=a-t;this._cacheStorage.maxSize=Math.max(0,o+1048576*this.additionalCacheMemory)}get test(){}};e([h({constructOnly:!0})],w.prototype,"view",void 0),e([h()],w.prototype,"maxMemory",null),e([h()],w.prototype,"additionalCacheMemory",null),e([h({readOnly:!0})],w.prototype,"memoryFactor",null),e([h({readOnly:!0})],w.prototype,"updating",null),e([h({readOnly:!0})],w.prototype,"usedMemory",null),e([h()],w.prototype,"_quality",void 0),e([h()],w.prototype,"_usedMemory",void 0),e([h()],w.prototype,"_updating",void 0),e([h()],w.prototype,"_stableQuality",void 0),e([h()],w.prototype,"_maxMemory",void 0),e([h()],w.prototype,"_additionalCacheMemory",void 0),w=e([d("esri.views.3d.support.MemoryController")],w);export{n as minQuality,u as newMemoryController};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import"../../../core/has.js";import i from"../../../core/Logger.js";import{MemCacheStorage as s,MemCache as r}from"../../../core/MemCache.js";import{addFrameTask as a}from"../../../core/scheduling.js";import{Milliseconds as o}from"../../../core/time.js";import{property as h,subclass as d}from"../../../core/accessorSupport/decorators.js";import{getLyr3DWasm as y}from"../layers/Lyr3DWasm.js";import{isMemoryManagedView as m}from"./MemoryManagedView.js";import{makeBudget as u}from"../../support/Scheduler.js";function l(e){return new w({view:e})}const n=.1,c=1,_=1,p=.75,M=.6,g=1.3;let w=class extends t{constructor(e){super(e),this._quality=1,this._usedMemory=0,this._updating=!1,this._stableQuality=0,this._downscaleMemoryUsed=0,this._canFastRecover=!1,this._predictedMemory=0,this._cacheStorage=new s,this._warnMemoryUsage=null,this._numQualityChanges=0,this._maxMemory=750,this._additionalCacheMemory=0,this.addHandles(a({prepare:()=>this._updateMemory()}))}destroy(){this._cacheStorage.destroy()}get maxMemory(){return this._maxMemory}set maxMemory(e){null==e||e<=0||(this._stableQuality=0,this._canFastRecover=!1,this._maxMemory<e&&this._updateQuality(c),this._maxMemory=e)}get additionalCacheMemory(){return this._additionalCacheMemory}set additionalCacheMemory(e){null!=e&&(this._additionalCacheMemory=e)}get memoryFactor(){return this._quality}get updating(){return this._updating}get usedMemory(){return this._usedMemory}get usedCacheMemory(){return this._cacheStorage.size}newCache(e,t,i){return new r(e,this._cacheStorage,t,i)}resetStableQuality(){this._stableQuality=0}disableMemCache(){this.additionalCacheMemory=-4096}update(){if(this._predictedMemory<=0&&!this._updating)return;let e=this._layersUpdating();if(this._predictedMemory<M&&this._canFastRecover)this._downscaleMemoryUsed=0,this._stableQuality=0,this._canFastRecover=!1,this._updateQuality(c);else if(e){if(this._predictedMemory>1.1*_||this._usedMemory>_)if(this._stableQuality>0)this._downscaleMemoryUsed=0,this._updateQuality(this._stableQuality);else if(this._quality>n&&this._downscaleMemoryUsed<this._usedMemory){if(this._compactAndUpdate())return;this._updateQuality(this._quality/g),this._downscaleMemoryUsed=this._usedMemory,this._canFastRecover=!1}}else if(this._downscaleMemoryUsed=0,this._usedMemory>_){if(this._compactAndUpdate())return;this._stableQuality=0,this._canFastRecover=!1,e=this._updateQuality(this._quality/g),this._downscaleMemoryUsed=this._predictedMemory}else if(this._stableQuality!==this._quality)if(this._usedMemory<p&&this._quality<c){this._stableQuality=this._quality;const t=.05;e=this._updateQuality(this._quality+t)}else this._quality<1&&(this._canFastRecover=!0);this._updating=e}_compactAndUpdate(){const e=u(o(100)),t=this.view.stage.compact(e);return this.view.overlayManager.renderer.compact(e)||t}_updateQuality(e){return(e=Math.min(Math.max(e,n),c))!==this._quality&&(this._quality=e,++this._numQualityChanges,!0)}_layersUpdating(){return this.view.allLayerViews.some(e=>!!e.updating)}_updateMemory(){if(!this.view?.updating||this.view.destroyed||this.view.destroying)return;this.view.stage?.renderer?.tick();const e=this.view.stage?.renderer?.usedMemory;let t=(this.view.basemapTerrain?.usedMemory??0)+(e?e.fbos+e.edges+e.plugins+e.clouds:0)+this.view.deconflictor?.usedMemory+this.view.labeler?.usedMemory+(y(this.view)?.lyr3DInternalMemoryBytes??0),s=0;this.view.allLayerViews&&this.view.allLayerViews.forEach(e=>{if(m(e)){const i=e.ignoresMemoryFactor?this._quality:1;t+=e.usedMemory*i,s+=e.unloadedMemory*i}});const r=null==this._warnMemoryUsage||Math.round(10*t)!==Math.round(10*this._warnMemoryUsage),a=1048576*this.maxMemory;if(t>a&&r){this._warnMemoryUsage=t;const e=e=>(e/1048576).toLocaleString(void 0,{maximumFractionDigits:1})+" MB",r=Math.round(100*this._quality);i.getLogger(this).warn(`Memory Limit exceeded! Limit: ${e(a)} Current: ${e(t)} Projected: ${e(t+s)} Quality: ${r}%`)}this._usedMemory=t/a,this._predictedMemory=(t+s)/a;const o=a-t;this._cacheStorage.maxSize=Math.max(0,o+1048576*this.additionalCacheMemory)}get test(){}};e([h({constructOnly:!0})],w.prototype,"view",void 0),e([h()],w.prototype,"maxMemory",null),e([h()],w.prototype,"_quality",void 0),e([h()],w.prototype,"_usedMemory",void 0),e([h()],w.prototype,"_updating",void 0),e([h()],w.prototype,"_stableQuality",void 0),e([h()],w.prototype,"_maxMemory",void 0),e([h()],w.prototype,"_additionalCacheMemory",void 0),w=e([d("esri.views.3d.support.MemoryController")],w);export{n as minQuality,l as newMemoryController};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{reallocGrowthFactor as e}from"../../../../core/arrayUtils.js";import{minExpectedGaussianCount as t}from"./GaussianSplatAtlasPages.js";import{TextureBackedBufferLayout as r}from"../../webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js";import{TextureBuffer as u}from"../../webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js";const s=new r([{name:"gaussianSplatOrder",type:"u32"}]);class a{constructor(e){this._textureBuffer=null,this._rctx=e}get usedMemory(){return this._textureBuffer?.usedMemory??0}ensureCapacity(r){if(r<=0)return;const a=this._textureBuffer;if(null!=a&&a.itemCount>=r&&a.texture.hasWebGLTextureObject)return;const f=Math.max(Math.ceil(r*e),t);a?.dispose(),this._textureBuffer=new u(this._rctx,s,f)}setData(e,t){this.ensureCapacity(t);const r=this._textureBuffer,{width:u}=r.texture.descriptor,s=u*Math.max(1,Math.floor(1048576/Uint32Array.BYTES_PER_ELEMENT/u));for(let a=0;a<t;a+=s)r.setSubData(e.buffer,a,e.byteOffset+a*Uint32Array.BYTES_PER_ELEMENT,Math.min(s,t-a))}clear(){this._textureBuffer?.dispose(),this._textureBuffer=null}destroy(){this.clear()}get texture(){return this._textureBuffer?.texture??null}}export{a as GaussianSplatOrderTexture};
2
+ import{reallocGrowthFactor as e}from"../../../../core/arrayUtils.js";import{minExpectedGaussianCount as t}from"./GaussianSplatAtlasPages.js";import{TextureBackedBufferLayout as r}from"../../webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js";import{TextureBuffer as u}from"../../webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js";const s=new r([{name:"gaussianSplatOrder",type:"u32"}]);class f{constructor(e){this._textureBuffer=null,this._rctx=e}get usedMemory(){return this._textureBuffer?.usedMemory??0}ensureCapacity(r){if(r<=0)return;const f=this._textureBuffer;if(null!=f&&f.itemCount>=r&&f.texture.hasWebGLTextureObject)return;const i=Math.max(Math.ceil(r*e),t);f?.dispose(),this._textureBuffer=new u(this._rctx,s,i)}setData(e,t){this.ensureCapacity(t),this._textureBuffer.setSubData(e.buffer,0,e.byteOffset,t)}clear(){this._textureBuffer?.dispose(),this._textureBuffer=null}destroy(){this.clear()}get texture(){return this._textureBuffer?.texture??null}}export{f as GaussianSplatOrderTexture};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./ComponentData.glsl.js";import"../../../core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import"../../../core/shaderLibrary/ShaderOutput.js";import"../../../core/shaderLibrary/Slice.glsl.js";import"../../../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import"../../../core/shaderLibrary/attributes/VertexColor.glsl.js";import"../../../core/shaderLibrary/attributes/VertexNormal.glsl.js";import"../../../core/shaderLibrary/attributes/VertexPosition.glsl.js";import"../../../core/shaderLibrary/output/DepthConversion.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/ComputeFragmentNormals.glsl.js";import"../../../core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import"../../../core/shaderLibrary/shading/ComputeNormalTexture.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/pbrGlobals.glsl.js";import"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import"../../../core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import"../../../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../../../core/shaderLibrary/terrain/Overlay.glsl.js";import"../../../core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import"../../../core/shaderModules/BooleanDrawUniform.js";import"../../../core/shaderModules/FloatDrawUniform.js";import"../../../core/shaderModules/glsl.js";import"../../../core/shaderModules/Texture2DBindUniform.js";import"../../../effects/snowcover/SnowCover.glsl.js";import"../../../shaders/alphaCutoff.glsl.js";import"../../../shaders/OutputColorHighlightOLID.glsl.js";import"../../../shaders/SphereDepthInterpolate.glsl.js";import"../../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../../chunks/Component.glsl.js";
2
+ import"./ComponentData.glsl.js";import"../../../core/shaderLibrary/forwardLinearDepthToWriteShadow.glsl.js";import"../../../core/shaderLibrary/ShaderOutput.js";import"../../../core/shaderLibrary/Slice.glsl.js";import"../../../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import"../../../core/shaderLibrary/attributes/VertexColor.glsl.js";import"../../../core/shaderLibrary/attributes/VertexNormal.glsl.js";import"../../../core/shaderLibrary/attributes/VertexPosition.glsl.js";import"../../../core/shaderLibrary/output/DepthConversion.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/ComputeFragmentNormals.glsl.js";import"../../../core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import"../../../core/shaderLibrary/shading/ComputeNormalTexture.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/pbrGlobals.glsl.js";import"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import"../../../core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import"../../../core/shaderLibrary/shading/readShadow.glsl.js";import"../../../core/shaderLibrary/terrain/Overlay.glsl.js";import"../../../core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import"../../../core/shaderModules/BooleanDrawUniform.js";import"../../../core/shaderModules/FloatDrawUniform.js";import"../../../core/shaderModules/glsl.js";import"../../../core/shaderModules/Texture2DBindUniform.js";import"../../../effects/snowcover/SnowCover.glsl.js";import"../../../shaders/alphaCutoff.glsl.js";import"../../../shaders/OutputColorHighlightOLID.glsl.js";import"../../../shaders/SphereDepthInterpolate.glsl.js";import"../../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../../chunks/Component.glsl.js";
@@ -1,4 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{ShaderOutputConfiguration as r}from"./ShaderOutputConfiguration.js";import{If as i,glsl as t}from"../shaderModules/glsl.js";import{parameter as o}from"../shaderTechnique/ShaderTechniqueConfiguration.js";class a extends r{constructor(e){super(),this.spherical=e,this.receiveShadows=!0,this.draped=!1}}function n(e){e.varyings.add("linearDepth","float",{invariant:!0})}function s(e,r){r&&n(e),e.vertex.code.add(t`
3
- void forwardLinearDepth(float _linearDepth) { ${i(r,"linearDepth = _linearDepth;")} }
4
- `)}e([o()],a.prototype,"receiveShadows",void 0);export{s as ForwardLinearDepth,a as ForwardLinearDepthConfiguration,n as addLinearDepth};
2
+ import{ShaderOutputConfiguration as t}from"./ShaderOutputConfiguration.js";class e extends t{constructor(t){super(),this.spherical=t,this.draped=!1}}function r(t){t.varyings.add("linearDepth","float",{invariant:!0})}function a(t){r(t),t.vertex.code.add("void forwardLinearDepth(float _linearDepth) { linearDepth = _linearDepth; }")}export{e as ForwardLinearDepthConfiguration,r as addLinearDepth,a as forwardLinearDepth};
@@ -35,4 +35,4 @@ return dot(slicePlaneBasis1, slicePlaneBasis1) != 0.0;
35
35
  bool rejectBySlice(vec3 pos) {
36
36
  return sliceEnabled() && sliceByFactors(calculateSliceFactors(pos));
37
37
  }`)):e.code.add("bool rejectBySlice(vec3 pos) { return false; }")}function g(e,s,...i){e.constants.add("groundSliceOpacity","float",.2),B(e,s,...i),s.hasSlicePlane?e.code.add("\n void discardBySlice(vec3 pos) {\n if (rejectBySlice(pos)) {\n discard;\n }\n }\n\n vec4 applySliceOutline(vec4 color, vec3 pos) {\n SliceFactors factors = calculateSliceFactors(pos);\n\n factors.front /= 2.0 * fwidth(factors.front);\n factors.side0 /= 2.0 * fwidth(factors.side0);\n factors.side1 /= 2.0 * fwidth(factors.side1);\n factors.side2 /= 2.0 * fwidth(factors.side2);\n factors.side3 /= 2.0 * fwidth(factors.side3);\n\n // return after calling fwidth, to avoid aliasing caused by discontinuities in the input to fwidth\n if (sliceByFactors(factors)) {\n return color;\n }\n\n float outlineFactor = (1.0 - step(0.5, factors.front))\n * (1.0 - step(0.5, factors.side0))\n * (1.0 - step(0.5, factors.side1))\n * (1.0 - step(0.5, factors.side2))\n * (1.0 - step(0.5, factors.side3));\n\n return mix(color, vec4(vec3(0.0), color.a), outlineFactor * 0.3);\n }\n\n vec4 applySlice(vec4 color, vec3 pos) {\n return sliceEnabled() ? applySliceOutline(color, pos) : color;\n }\n "):e.code.add(u`void discardBySlice(vec3 pos) { }
38
- vec4 applySlice(vec4 color, vec3 pos) { return color; }`)}function y(e){return[new d("slicePlaneOrigin",(s,i)=>O(e,s,i)),new d("slicePlaneBasis1",(s,i)=>L(e,s,i,i.slicePlane?.basis1)),new d("slicePlaneBasis2",(s,i)=>L(e,s,i,i.slicePlane?.basis2))]}function F(e){return[new f("slicePlaneOrigin",(s,i)=>O(e,s,i)),new f("slicePlaneBasis1",(s,i)=>L(e,s,i,i.slicePlane?.basis1)),new f("slicePlaneBasis2",(s,i)=>L(e,s,i,i.slicePlane?.basis2))]}function j(e,s,i){return e.instancedDoublePrecision?n(M,i.camera.viewInverseTransposeMatrix[3],i.camera.viewInverseTransposeMatrix[7],i.camera.viewInverseTransposeMatrix[11]):s.slicePlaneLocalOrigin}function x(e,s){return null!=e?l(T,s.origin,e):s.origin}function D(e,i,a){return e.hasSliceTranslatedView?null!=i?s(N,a.camera.viewMatrix,i):a.camera.viewMatrix:null}function O(e,s,i){if(null==i.slicePlane)return c;const o=j(e,s,i),l=x(o,i.slicePlane),n=D(e,o,i);return null!=n?a(T,l,n):l}function L(e,s,i,n){if(null==n||null==i.slicePlane)return c;const t=j(e,s,i),r=x(t,i.slicePlane),f=D(e,t,i);return null!=f?(o(I,n,r),a(T,r,f),a(I,I,f),l(I,I,T)):n}const M=t(),T=t(),I=t(),N=i();export{S as RejectBySliceDraw,w as RejectBySlicePass,P as SliceConfiguration,h as SliceDraw,v as SlicePass,b as SlicePlaneParameters};
38
+ vec4 applySlice(vec4 color, vec3 pos) { return color; }`)}function y(e){return[new d("slicePlaneOrigin",(s,i)=>O(e,s,i)),new d("slicePlaneBasis1",(s,i)=>L(e,s,i,i.slicePlane?.basis1)),new d("slicePlaneBasis2",(s,i)=>L(e,s,i,i.slicePlane?.basis2))]}function F(e){return[new f("slicePlaneOrigin",(s,i)=>O(e,s,i)),new f("slicePlaneBasis1",(s,i)=>L(e,s,i,i.slicePlane?.basis1)),new f("slicePlaneBasis2",(s,i)=>L(e,s,i,i.slicePlane?.basis2))]}function j(e,s,i){return e.instancedDoublePrecision?n(M,i.camera.viewInverseTransposeMatrix[3],i.camera.viewInverseTransposeMatrix[7],i.camera.viewInverseTransposeMatrix[11]):s.slicePlaneLocalOrigin}function x(e,s){return null!=e?l(T,s.origin,e):s.origin}function D(e,i,a){return e.hasSliceTranslatedView?null!=i?s(N,a.camera.viewMatrix,i):a.camera.viewMatrix:null}function O(e,s,i){if(null==i.slicePlane)return c;const o=j(e,s,i),l=x(o,i.slicePlane),n=D(e,o,i);return null!=n?a(T,l,n):l}function L(e,s,i,n){if(null==n||null==i.slicePlane)return c;const t=j(e,s,i),r=x(t,i.slicePlane),f=D(e,t,i);return null!=f?(o(I,n,r),a(T,r,f),a(I,I,f),l(I,I,T)):n}const M=t(),T=t(),I=t(),N=i();export{P as SliceConfiguration,b as SlicePlaneParameters,S as rejectBySliceDraw,w as rejectBySlicePass,h as sliceDraw,v as slicePass};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{addCalculateLinearDepth as e}from"./ForwardLinearDepthToWriteShadowMap.glsl.js";import{glsl as r}from"../shaderModules/glsl.js";function o(o){e(o),o.vertex.code.add(r`vec4 transformPositionWithDepth(mat4 proj, mat4 view, vec3 pos, vec2 nearFar, out float depth) {
2
+ import{addCalculateLinearDepth as e}from"./forwardLinearDepthToWriteShadow.glsl.js";import{glsl as r}from"../shaderModules/glsl.js";function o(o){e(o),o.vertex.code.add(r`vec4 transformPositionWithDepth(mat4 proj, mat4 view, vec3 pos, vec2 nearFar, out float depth) {
3
3
  vec4 eye = view * vec4(pos, 1.0);
4
4
  depth = calculateLinearDepth(nearFar,eye.z);
5
5
  return proj * eye;
@@ -1,7 +1,7 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{normalFromMat4 as e}from"../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{IDENTITY as o}from"../../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as a}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as n}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{viewNormal as i}from"../util/cameraUniforms.js";import{DoublePrecision as t}from"../util/DoublePrecision.glsl.js";import{Float3BindUniform as s}from"../../shaderModules/Float3BindUniform.js";import{glsl as l}from"../../shaderModules/glsl.js";import{Matrix3PassUniform as m}from"../../shaderModules/Matrix3PassUniform.js";import{Matrix4PassUniform as c}from"../../shaderModules/Matrix4PassUniform.js";import{encodeDoubleHi as d,encodeDoubleLo as v}from"../../../../../webgl/doublePrecisionUtils.js";import{NoParameters as g}from"../../../../../webgl/NoParameters.js";class u extends g{constructor(){super(...arguments),this.modelTransformation=null}}const x=r();function p(r,n){const{hasModelTransformation:g,instancedDoublePrecision:u,instanced:p,output:f,hasVertexTangents:w}=n;g&&(r.vertex.uniforms.add(new c("model",e=>e.modelTransformation??o)),r.vertex.uniforms.add(new m("normalLocalOriginFromModel",r=>(e(x,r.modelTransformation??o),x)))),p&&u&&(r.attributes.add("instanceModelOriginHi","vec3"),r.attributes.add("instanceModelOriginLo","vec3"),r.attributes.add("instanceModel","mat3"),r.attributes.add("instanceModelNormal","mat3"));const _=r.vertex;u&&(_.include(t),_.uniforms.add(new s("viewOriginHi",e=>d(a(M,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),M)),new s("viewOriginLo",e=>v(a(M,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),M)))),_.code.add(l`
2
+ import{normalFromMat4 as e}from"../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{IDENTITY as o}from"../../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as a}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as i}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{viewNormal as n}from"../util/cameraUniforms.js";import{DoublePrecision as t}from"../util/DoublePrecision.glsl.js";import{Float3BindUniform as s}from"../../shaderModules/Float3BindUniform.js";import{glsl as l}from"../../shaderModules/glsl.js";import{Matrix3PassUniform as m}from"../../shaderModules/Matrix3PassUniform.js";import{Matrix4PassUniform as c}from"../../shaderModules/Matrix4PassUniform.js";import{VisualVariablePassParameters as d}from"../../../materials/VisualVariablePassParameters.js";import{encodeDoubleHi as v,encodeDoubleLo as g}from"../../../../../webgl/doublePrecisionUtils.js";class u extends d{constructor(){super(...arguments),this.modelTransformation=null}}const x=r();function p(r,i){const{hasModelTransformation:d,instancedDoublePrecision:u,instanced:p,output:f,hasVertexTangents:w}=i;d&&r.vertex.uniforms.add(new c("model",e=>e.modelTransformation??o),new m("normalLocalOriginFromModel",r=>(e(x,r.modelTransformation??o),x))),p&&u&&(r.attributes.add("instanceModelOriginHi","vec3"),r.attributes.add("instanceModelOriginLo","vec3"),r.attributes.add("instanceModel","mat3"),r.attributes.add("instanceModelNormal","mat3"));const _=r.vertex;u&&(_.include(t),_.uniforms.add(new s("viewOriginHi",e=>v(a(M,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),M)),new s("viewOriginLo",e=>g(a(M,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),M)))),_.code.add(l`
3
3
  vec3 getVertexInLocalOriginSpace() {
4
- return ${g?u?"(model * vec4(instanceModel * localPosition().xyz, 1.0)).xyz":"(model * localPosition()).xyz":u?"instanceModel * localPosition().xyz":"localPosition().xyz"};
4
+ return ${d?u?"(model * vec4(instanceModel * localPosition().xyz, 1.0)).xyz":"(model * localPosition()).xyz":u?"instanceModel * localPosition().xyz":"localPosition().xyz"};
5
5
  }
6
6
 
7
7
  vec3 subtractOrigin(vec3 _pos) {
@@ -10,15 +10,15 @@ import{normalFromMat4 as e}from"../../../../../../core/libs/gl-matrix-2/math/mat
10
10
  vec3 originDelta = dpAdd(viewOriginHi, viewOriginLo, -instanceModelOriginHi, -instanceModelOriginLo);
11
11
  return _pos - originDelta;`:"return vpos;"}
12
12
  }
13
- `),_.code.add(l`
13
+
14
14
  vec3 dpNormal(vec4 _normal) {
15
- return normalize(${g?u?"normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz)":"normalLocalOriginFromModel * _normal.xyz":u?"instanceModelNormal * _normal.xyz":"_normal.xyz"});
15
+ return normalize(${d?u?"normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz)":"normalLocalOriginFromModel * _normal.xyz":u?"instanceModelNormal * _normal.xyz":"_normal.xyz"});
16
16
  }
17
- `),4===f&&_.uniforms.add(i).code.add(l`
17
+ `),4===f&&_.uniforms.add(n).code.add(l`
18
18
  vec3 dpNormalView(vec4 _normal) {
19
- return normalize((viewNormal * ${g?u?"vec4(normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz), 1.0)":"vec4(normalLocalOriginFromModel * _normal.xyz, 1.0)":u?"vec4(instanceModelNormal * _normal.xyz, 1.0)":"_normal"}).xyz);
19
+ return normalize((viewNormal * ${d?u?"vec4(normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz), 1.0)":"vec4(normalLocalOriginFromModel * _normal.xyz, 1.0)":u?"vec4(instanceModelNormal * _normal.xyz, 1.0)":"_normal"}).xyz);
20
20
  }
21
21
  `),w&&_.code.add(l`
22
22
  vec4 dpTransformVertexTangent(vec4 _tangent) {
23
- ${g?u?"return vec4(normalLocalOriginFromModel * (instanceModelNormal * _tangent.xyz), _tangent.w);":"return vec4(normalLocalOriginFromModel * _tangent.xyz, _tangent.w);":u?"return vec4(instanceModelNormal * _tangent.xyz, _tangent.w);":"return _tangent;"}
24
- }`)}const M=n();export{u as InstancedDoublePassParameters,p as InstancedDoublePrecision};
23
+ ${d?u?"return vec4(normalLocalOriginFromModel * (instanceModelNormal * _tangent.xyz), _tangent.w);":"return vec4(normalLocalOriginFromModel * _tangent.xyz, _tangent.w);":u?"return vec4(instanceModelNormal * _tangent.xyz, _tangent.w);":"return _tangent;"}
24
+ }`)}const M=i();export{u as InstancedDoublePassParameters,p as InstancedDoublePrecision};
@@ -104,12 +104,12 @@ return applyOpacity(vec4(1, 1, 1, 1));
104
104
  return ${1===p.upVectorAlignment?u`decompressAxis(${y.getTextureAttribute("pathRotationUp")})`:u`getFrameUp()`};
105
105
  }
106
106
  `),e.include(r,p),m.code.add(u`
107
- vec3 calculateVPos(ExtrudedVertex extrudedVertex) {
108
- vec2 size = getSize();
109
- vec3 origin = ${y.getTextureAttribute("position")};
110
- vec3 right = extrudedVertex.positionFrame.right;
111
- vec3 up = extrudedVertex.positionFrame.up;
112
- vec2 profileVertex = extrudedVertex.profileVertex * size;
107
+ vec3 calculateVPos(ExtrudedVertex extrudedVertex) {
108
+ vec2 size = getSize();
109
+ vec3 origin = ${y.getTextureAttribute("position")};
110
+ vec3 right = extrudedVertex.positionFrame.right;
111
+ vec3 up = extrudedVertex.positionFrame.up;
112
+ vec2 profileVertex = extrudedVertex.profileVertex * size;
113
113
  `),m.code.add(u`if(extrudedVertex.isCap) {
114
114
  float positionOffsetAlongProfilePlaneNormal = extrudedVertex.capPositionOffset * size[0];
115
115
  vec3 forward = cross(up, right);
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{SliceDraw as o}from"../Slice.glsl.js";import{Transform as e}from"../Transform.glsl.js";import{NormalAttribute as r}from"../attributes/NormalAttribute.glsl.js";import{ObjectAndLayerIdColor as t}from"../attributes/ObjectAndLayerIdColor.glsl.js";import{TextureCoordinateAttribute as i}from"../attributes/TextureCoordinateAttribute.glsl.js";import{VertexNormal as a}from"../attributes/VertexNormal.glsl.js";import{DefaultMaterialExternalColor as l}from"./DefaultMaterialExternalColor.glsl.js";import{outputDepth as s}from"../output/OutputDepth.glsl.js";import{OutputHighlight as d}from"../output/OutputHighlight.glsl.js";import{VisualVariables as n}from"../shading/VisualVariables.glsl.js";import{nearFar as c}from"../util/cameraUniforms.js";import{DiscardOrAdjustAlphaPass as u}from"../util/DiscardOrAdjustAlpha.glsl.js";import{addProjViewLocalOrigin as p}from"../util/View.glsl.js";import{glsl as m,If as v}from"../../shaderModules/glsl.js";import{Texture2DPassUniform as f}from"../../shaderModules/Texture2DPassUniform.js";function g(g,x){const{vertex:O,fragment:j,varyings:h}=g,{hasColorTexture:C,alphaDiscardMode:w}=x,V=C&&1!==w,{output:b,normalType:A,hasColorTextureTransform:y}=x;switch(b){case 3:p(O,x),g.include(e),j.include(o,x),g.include(i,x),V&&j.uniforms.add(new f("tex",o=>o.texture)),O.main.add(m`vpos = getVertexInLocalOriginSpace();
2
+ import{sliceDraw as o}from"../Slice.glsl.js";import{Transform as e}from"../Transform.glsl.js";import{NormalAttribute as r}from"../attributes/NormalAttribute.glsl.js";import{ObjectAndLayerIdColor as t}from"../attributes/ObjectAndLayerIdColor.glsl.js";import{TextureCoordinateAttribute as i}from"../attributes/TextureCoordinateAttribute.glsl.js";import{VertexNormal as a}from"../attributes/VertexNormal.glsl.js";import{DefaultMaterialExternalColor as l}from"./DefaultMaterialExternalColor.glsl.js";import{outputDepth as s}from"../output/OutputDepth.glsl.js";import{OutputHighlight as d}from"../output/OutputHighlight.glsl.js";import{VisualVariables as n}from"../shading/VisualVariables.glsl.js";import{nearFar as c}from"../util/cameraUniforms.js";import{DiscardOrAdjustAlphaPass as u}from"../util/DiscardOrAdjustAlpha.glsl.js";import{addProjViewLocalOrigin as p}from"../util/View.glsl.js";import{glsl as m,If as v}from"../../shaderModules/glsl.js";import{Texture2DPassUniform as f}from"../../shaderModules/Texture2DPassUniform.js";function g(g,x){const{vertex:O,fragment:j,varyings:h}=g,{hasColorTexture:C,alphaDiscardMode:w}=x,V=C&&1!==w,{output:b,normalType:A,hasColorTextureTransform:y}=x;switch(b){case 3:p(O,x),g.include(e),j.include(o,x),g.include(i,x),V&&j.uniforms.add(new f("tex",o=>o.texture)),O.main.add(m`vpos = getVertexInLocalOriginSpace();
3
3
  vpos = subtractOrigin(vpos);
4
4
  vpos = addVerticalOffset(vpos, localOrigin);
5
5
  gl_Position = transformPosition(proj, view, vpos);
@@ -0,0 +1,4 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{forwardLinearDepth as o}from"./ForwardLinearDepth.glsl.js";import{isColor as r}from"./ShaderOutput.js";import{If as e,glsl as t}from"../shaderModules/glsl.js";function d(d,a){const i=r(a.output)&&a.receiveShadows;i&&o(d),d.vertex.code.add(t`
3
+ void forwardLinearDepthToReadShadow() { ${e(i,"forwardLinearDepth(gl_Position.w);")} }
4
+ `)}export{d as forwardLinearDepthToReadShadow};
@@ -1,8 +1,8 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{ForwardLinearDepth as r}from"./ForwardLinearDepth.glsl.js";import{isShadowLike as e}from"./ShaderOutput.js";import{VertexPosition as a}from"./attributes/VertexPosition.glsl.js";import{nearFar as t}from"./util/cameraUniforms.js";import{glsl as o,If as i}from"../shaderModules/glsl.js";function n(r){r.vertex.code.add(o`float calculateLinearDepth(vec2 nearFar,float z) {
2
+ import{forwardLinearDepth as r}from"./ForwardLinearDepth.glsl.js";import{isShadowLike as e}from"./ShaderOutput.js";import{VertexPosition as a}from"./attributes/VertexPosition.glsl.js";import{nearFar as t}from"./util/cameraUniforms.js";import{glsl as o,If as i}from"../shaderModules/glsl.js";function n(r){r.vertex.code.add(o`float calculateLinearDepth(vec2 nearFar,float z) {
3
3
  return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
4
- }`)}function d(d,s){const{vertex:l}=d,p=e(s.output);p&&(d.include(a,s),r(d,!0),l.uniforms.add(t),n(d)),l.code.add(o`
5
- void forwardLinearDepthToWriteShadowMap() {
6
- ${i(p,"forwardLinearDepth(calculateLinearDepth(nearFar, vPosition_view.z));")}
4
+ }`)}function d(d,s){const{vertex:l}=d,u=e(s.output);u&&(d.include(a,s),r(d),l.uniforms.add(t),n(d)),l.code.add(o`
5
+ void forwardLinearDepthToWriteShadow() {
6
+ ${i(u,"forwardLinearDepth(calculateLinearDepth(nearFar, vPosition_view.z));")}
7
7
  }
8
- `)}export{d as ForwardLinearDepthToWriteShadowMap,n as addCalculateLinearDepth};
8
+ `)}export{n as addCalculateLinearDepth,d as forwardLinearDepthToWriteShadow};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{set as e}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as t}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as r}from"../../../../../../core/libs/gl-matrix-2/math/vec4.js";import{create as a}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{FoamIntensity as o}from"./FoamRendering.glsl.js";import{ReadShadowMapPassParameters as m}from"./ReadShadowMap.glsl.js";import{Float2PassUniform as s}from"../../shaderModules/Float2PassUniform.js";import{Float4PassUniform as v}from"../../shaderModules/Float4PassUniform.js";import{glsl as l}from"../../shaderModules/glsl.js";import{Texture2DPassUniform as i}from"../../shaderModules/Texture2DPassUniform.js";function u(t){t.fragment.uniforms.add(new i("texWaveNormal",e=>e.waveNormal),new i("texWavePerturbation",e=>e.wavePerturbation),new v("waveParams",e=>r(c,e.waveStrength,e.waveTextureRepeat,e.flowStrength,e.flowOffset)),new s("waveDirection",t=>e(n,t.waveDirection[0]*t.waveVelocity,t.waveDirection[1]*t.waveVelocity))),t.fragment.include(o),t.fragment.code.add(l`const vec2 FLOW_JUMP = vec2(6.0/25.0, 5.0/24.0);
2
+ import{set as e}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as t}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as r}from"../../../../../../core/libs/gl-matrix-2/math/vec4.js";import{create as a}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{FoamIntensity as o}from"./FoamRendering.glsl.js";import{ReadShadowMapPassParameters as m}from"./readShadow.glsl.js";import{Float2PassUniform as s}from"../../shaderModules/Float2PassUniform.js";import{Float4PassUniform as v}from"../../shaderModules/Float4PassUniform.js";import{glsl as l}from"../../shaderModules/glsl.js";import{Texture2DPassUniform as i}from"../../shaderModules/Texture2DPassUniform.js";function u(t){t.fragment.uniforms.add(new i("texWaveNormal",e=>e.waveNormal),new i("texWavePerturbation",e=>e.wavePerturbation),new v("waveParams",e=>r(c,e.waveStrength,e.waveTextureRepeat,e.flowStrength,e.flowOffset)),new s("waveDirection",t=>e(n,t.waveDirection[0]*t.waveVelocity,t.waveDirection[1]*t.waveVelocity))),t.fragment.include(o),t.fragment.code.add(l`const vec2 FLOW_JUMP = vec2(6.0/25.0, 5.0/24.0);
3
3
  vec2 textureDenormalized2D(sampler2D _tex, vec2 _uv) {
4
4
  return 2.0 * texture(_tex, _uv).rg - 1.0;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{create as a}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{Float4BindUniform as e}from"../../shaderModules/Float4BindUniform.js";import{glsl as o}from"../../shaderModules/glsl.js";import{IntegerBindUniform as s}from"../../shaderModules/IntegerBindUniform.js";import{Matrix4sDrawUniform as i}from"../../shaderModules/Matrix4sDrawUniform.js";import{Matrix4sPassUniform as r}from"../../shaderModules/Matrix4sPassUniform.js";import{NoParameters as t}from"../../../../../webgl/NoParameters.js";class d extends t{constructor(){super(...arguments),this.origin=a()}}function c(a){a.uniforms.add(new r("shadowMapMatrix",({origin:a},e)=>e.shadowMap.getShadowMapMatrices(a),4)),a.include(l)}function n(a){a.uniforms.add(new i("shadowMapMatrix",({origin:a},e)=>e.shadowMap.getShadowMapMatrices(a),4)),a.include(l)}function l(a){a.uniforms.add(new e("cascadeDistances",a=>a.shadowMap.cascadeDistances),new s("numCascades",a=>a.shadowMap.numCascades)).code.add(o`const vec3 invalidShadowmapUVZ = vec3(0.0, 0.0, -1.0);
2
+ import{create as a}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{Float4BindUniform as e}from"../../shaderModules/Float4BindUniform.js";import{glsl as o}from"../../shaderModules/glsl.js";import{IntegerBindUniform as s}from"../../shaderModules/IntegerBindUniform.js";import{Matrix4sDrawUniform as i}from"../../shaderModules/Matrix4sDrawUniform.js";import{Matrix4sPassUniform as r}from"../../shaderModules/Matrix4sPassUniform.js";import{NoParameters as t}from"../../../../../webgl/NoParameters.js";class c extends t{constructor(){super(...arguments),this.origin=a()}}function d(a){a.uniforms.add(new r("shadowMapMatrix",({origin:a},e)=>e.shadowMap.getShadowMapMatrices(a),4)),a.include(l)}function n(a){a.uniforms.add(new i("shadowMapMatrix",({origin:a},e)=>e.shadowMap.getShadowMapMatrices(a),4)),a.include(l)}function l(a){a.uniforms.add(new e("cascadeDistances",a=>a.shadowMap.cascadeDistances),new s("numCascades",a=>a.shadowMap.numCascades)).code.add(o`const vec3 invalidShadowmapUVZ = vec3(0.0, 0.0, -1.0);
3
3
  vec3 lightSpacePosition(vec3 _vpos, mat4 mat) {
4
4
  vec4 lv = mat * vec4(_vpos, 1.0);
5
5
  lv.xy /= lv.w;
@@ -16,11 +16,10 @@ _linearDepth < cascadeDistances[3] ? 2 : 3;
16
16
  if (i >= numCascades) {
17
17
  return invalidShadowmapUVZ;
18
18
  }
19
- mat4 shadowMatrix = i == 0 ? shadowMapMatrix[0] : i == 1 ? shadowMapMatrix[1] : i == 2 ? shadowMapMatrix[2] : shadowMapMatrix[3];
20
- vec3 lvpos = lightSpacePosition(_worldPos, shadowMatrix);
19
+ vec3 lvpos = lightSpacePosition(_worldPos, shadowMapMatrix[i]);
21
20
  if (lvpos.z >= 1.0 || lvpos.x < 0.0 || lvpos.x > 1.0 || lvpos.y < 0.0 || lvpos.y > 1.0) {
22
21
  return invalidShadowmapUVZ;
23
22
  }
24
23
  vec2 uvShadow = cascadeCoordinates(i, shadowMapSize, lvpos);
25
24
  return vec3(uvShadow, lvpos.z);
26
- }`)}export{d as ReadShadowMapOrigin,n as calculateUVZShadowDraw,c as calculateUVZShadowPass};
25
+ }`)}export{c as ReadShadowMapOrigin,n as calculateUVZShadowDraw,d as calculateUVZShadowPass};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{invert as e,translate as r}from"../../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as t}from"../../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{ReadDepth as a}from"../output/ReadDepth.glsl.js";import{calculateUVZShadowPass as o}from"./calculateUVZShadow.glsl.js";import{CameraSpace as i}from"../util/CameraSpace.glsl.js";import{glsl as l}from"../../shaderModules/glsl.js";import{Matrix4BindUniform as c}from"../../shaderModules/Matrix4BindUniform.js";function p(e){e.fragment.include(o),n(e)}function n(t){t.fragment.include(a),t.include(i),t.fragment.uniforms.add(new c("inverseViewMatrix",({camera:t})=>e(d,r(d,t.viewMatrix,t.center)))).code.add(l`vec3 calculateUVZShadowAndPixelPosFromDepth(
2
+ import{invert as e,translate as r}from"../../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as t}from"../../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{ReadDepth as a}from"../output/ReadDepth.glsl.js";import{calculateUVZShadowPass as o}from"./calculateUVZShadow.glsl.js";import{CameraSpace as i}from"../util/CameraSpace.glsl.js";import{glsl as l}from"../../shaderModules/glsl.js";import{Matrix4BindUniform as c}from"../../shaderModules/Matrix4BindUniform.js";function p(t){t.fragment.include(o),t.fragment.include(a),t.include(i),t.fragment.uniforms.add(new c("inverseViewMatrix",({camera:t})=>e(d,r(d,t.viewMatrix,t.center)))).code.add(l`vec3 calculateUVZShadowAndPixelPosFromDepth(
3
3
  in vec2 _uv,
4
4
  ivec2 shadowMapSize,
5
5
  in sampler2D _depthMap,
@@ -22,4 +22,4 @@ in sampler2D _depthMap
22
22
  ) {
23
23
  vec4 currentPixelPos;
24
24
  return calculateUVZShadowAndPixelPosFromDepth(_uv, shadowMapSize, _depthMap, currentPixelPos);
25
- }`)}const d=t();export{p as calculateUVZShadowFromDepthPass};
25
+ }`)}const d=t();export{p as calculateUVZShadowFromDepth};
@@ -0,0 +1,5 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{DepthConversion as o}from"../output/DepthConversion.glsl.js";import{readShadowDraw as e}from"./readShadow.glsl.js";import{localFromScreenSpace as r}from"../util/LocalFromScreenSpace.glsl.js";import{glsl as a}from"../../shaderModules/glsl.js";function l(l,t){l.include(e,t),l.include(r),l.fragment.include(o),l.fragment.code.add(a`float readFragmentShadow(float additionalAmbientScale) {
3
+ vec3 pos = reconstructLocalPosition(gl_FragCoord.xy, linearizeDepth(gl_FragCoord.z)).xyz;
4
+ return readShadow(additionalAmbientScale, pos);
5
+ }`)}export{l as readFragmentShadow};
@@ -0,0 +1,24 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as a}from"tslib";import{ForwardLinearDepthConfiguration as o}from"../ForwardLinearDepth.glsl.js";import{forwardLinearDepthToReadShadow as e}from"../forwardLinearDepthToReadShadow.glsl.js";import{calculateUVZShadowPass as t,calculateUVZShadowDraw as d,ReadShadowMapOrigin as r}from"./calculateUVZShadow.glsl.js";import{FloatBindUniform as i}from"../../shaderModules/FloatBindUniform.js";import{glsl as s,If as h}from"../../shaderModules/glsl.js";import{Texture2DBindUniform as l}from"../../shaderModules/Texture2DBindUniform.js";import{Texture2DShadowBindUniform as n}from"../../shaderModules/Texture2DShadowBindUniform.js";import{parameter as w}from"../../shaderTechnique/ShaderTechniqueConfiguration.js";class c extends r{}class u extends r{}class f extends o{constructor(){super(...arguments),this.hasShadowHighlights=!1,this.receiveShadows=!0}}function g(a,o){o.receiveShadows&&a.fragment.include(t),p(a,o)}function m(a,o){o.receiveShadows&&a.fragment.include(d),p(a,o)}function p(a,o){a.include(e,o);const{hasShadowHighlights:t,receiveShadows:d,spherical:r}=o;d&&(S(a.fragment,t),a.fragment.code.add(s`float readShadowMap(const in vec3 _worldPos, float _linearDepth) {
3
+ vec3 uvzShadow = calculateUVZShadow(_worldPos, _linearDepth, textureSize(shadowMap, 0));
4
+ return readShadowMaps(uvzShadow);
5
+ }
6
+ float readShadowMap(const in vec3 _worldPos ) { return readShadowMap(_worldPos, linearDepth); }`)),a.fragment.uniforms.add(new i("lightingGlobalFactor",({lighting:a})=>a.globalFactor)).code.add(s`
7
+ float getShadow(float additionalAmbientScale, float shadow) {
8
+ float ambient = ${h(r,"lightingGlobalFactor * (1.0 - additionalAmbientScale)","0.0")};
9
+ return max(ambient, shadow);
10
+ }
11
+
12
+ float readShadow(float additionalAmbientScale, vec3 vpos) {
13
+ return getShadow(additionalAmbientScale, ${h(d,"readShadowMap(vpos)","0.0")});
14
+ }
15
+ `)}function S(a,o){o&&a.uniforms.add(new l("shadowHighlight",({shadowHighlight:a})=>a?.getTexture())),a.uniforms.add(new n("shadowMap",({shadowMap:a})=>a.getOutput(5)??a.getOutput(7))).code.add(s`
16
+ float readShadowMaps(const in vec3 uvzShadow) {
17
+ if (uvzShadow.z < 0.0) {
18
+ return 0.0;
19
+ }
20
+
21
+ float shadow1 = texture(shadowMap, uvzShadow);
22
+ ${h(o,"float shadow2 = texelFetch(shadowHighlight, ivec2(gl_FragCoord.xy), 0).r;\n return shadow1 > shadow2 ? shadow1 : shadow2;","return shadow1;")}
23
+ }
24
+ `)}a([w()],f.prototype,"hasShadowHighlights",void 0),a([w()],f.prototype,"receiveShadows",void 0);export{f as ReadShadowMapConfiguration,c as ReadShadowMapDrawParameters,u as ReadShadowMapPassParameters,m as readShadowDraw,S as readShadowMaps,g as readShadowPass};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{ReadShadowMapPassParameters as e}from"../shading/ReadShadowMap.glsl.js";import{BackgroundGrid as t}from"./BackgroundGrid.glsl.js";import{If as o,glsl as r}from"../../shaderModules/glsl.js";import{Uniform as c}from"../../../../../webgl/Uniform.js";class n extends e{constructor(){super(...arguments),this.overlayOpacity=1}}function s(e,c){const{vertex:n,fragment:s,varyings:u}=e;u.add("vtc","vec2"),n.uniforms.add(new i("texOffsetAndScale")),s.uniforms.add(new l("tex")),s.uniforms.add(new d("textureOpacities"));const{textureFadingEnabled:x,renderOccluded:f,tileBlendInput:v}=c,p=x&&!f;p&&(n.uniforms.add(new i("nextTexOffsetAndScale")),u.add("nvtc","vec2"),s.uniforms.add(new l("texNext")),s.uniforms.add(new d("nextTexOpacities")),s.uniforms.add(new a("fadeFactor")));const m=2===v;m&&s.include(t);const g=1===v;g&&s.uniforms.add(new d("backgroundColor")),n.code.add(r`
2
+ import{ReadShadowMapPassParameters as e}from"../shading/readShadow.glsl.js";import{BackgroundGrid as t}from"./BackgroundGrid.glsl.js";import{If as o,glsl as r}from"../../shaderModules/glsl.js";import{Uniform as c}from"../../../../../webgl/Uniform.js";class n extends e{constructor(){super(...arguments),this.overlayOpacity=1}}function s(e,c){const{vertex:n,fragment:s,varyings:u}=e;u.add("vtc","vec2"),n.uniforms.add(new i("texOffsetAndScale")),s.uniforms.add(new l("tex")),s.uniforms.add(new d("textureOpacities"));const{textureFadingEnabled:x,renderOccluded:f,tileBlendInput:v}=c,p=x&&!f;p&&(n.uniforms.add(new i("nextTexOffsetAndScale")),u.add("nvtc","vec2"),s.uniforms.add(new l("texNext")),s.uniforms.add(new d("nextTexOpacities")),s.uniforms.add(new a("fadeFactor")));const m=2===v;m&&s.include(t);const g=1===v;g&&s.uniforms.add(new d("backgroundColor")),n.code.add(r`
3
3
  void forwardTextureCoordinatesWithTransform(in vec2 uv) {
4
4
  vtc = texOffsetAndScale.xy + uv * texOffsetAndScale.zw;
5
5
  ${o(p,"nvtc = nextTexOffsetAndScale.xy + uv * nextTexOffsetAndScale.zw;")}
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{translate as r}from"../../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as i}from"../../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as e}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as o,create as a}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projMatrix as s}from"./cameraUniforms.js";import{Float3BindUniform as n}from"../../shaderModules/Float3BindUniform.js";import{Float3DrawUniform as t}from"../../shaderModules/Float3DrawUniform.js";import{FloatBindUniform as m}from"../../shaderModules/FloatBindUniform.js";import{Matrix4BindUniform as c}from"../../shaderModules/Matrix4BindUniform.js";import{Matrix4DrawUniform as f}from"../../shaderModules/Matrix4DrawUniform.js";function d(r,i){i.instancedDoublePrecision?r.constants.add("cameraPosition","vec3",o):r.uniforms.add(new t("cameraPosition",(r,i)=>e(p,i.camera.viewInverseTransposeMatrix[3]-r.origin[0],i.camera.viewInverseTransposeMatrix[7]-r.origin[1],i.camera.viewInverseTransposeMatrix[11]-r.origin[2])))}function l(i,o){if(!o.instancedDoublePrecision)return void i.uniforms.add(s,new f("view",(i,e)=>r(v,e.camera.viewMatrix,i.origin)),new t("localOrigin",r=>r.origin));const a=({camera:r})=>e(p,r.viewInverseTransposeMatrix[3],r.viewInverseTransposeMatrix[7],r.viewInverseTransposeMatrix[11]);i.uniforms.add(s,new c("view",i=>r(v,i.camera.viewMatrix,a(i))),new n("localOrigin",r=>a(r)))}const v=i(),p=a();function w(r){r.uniforms.add(new m("pixelRatio",r=>r.camera.pixelRatio/r.overlayStretch))}export{d as addCameraPosition,w as addPixelRatio,l as addProjViewLocalOrigin};
2
+ import{translate as r}from"../../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as i}from"../../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as e}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as o,create as a}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projMatrix as s}from"./cameraUniforms.js";import{Float3BindUniform as n}from"../../shaderModules/Float3BindUniform.js";import{Float3DrawUniform as t}from"../../shaderModules/Float3DrawUniform.js";import{FloatBindUniform as m}from"../../shaderModules/FloatBindUniform.js";import{Matrix4BindUniform as c}from"../../shaderModules/Matrix4BindUniform.js";import{Matrix4DrawUniform as f}from"../../shaderModules/Matrix4DrawUniform.js";function d(r,i){i.instancedDoublePrecision?r.constants.add("cameraPosition","vec3",o):r.uniforms.add(new t("cameraPosition",({origin:r},{camera:i})=>e(p,i.viewInverseTransposeMatrix[3]-r[0],i.viewInverseTransposeMatrix[7]-r[1],i.viewInverseTransposeMatrix[11]-r[2])))}function l(i,o){if(!o.instancedDoublePrecision)return void i.uniforms.add(s,new f("view",(i,e)=>r(v,e.camera.viewMatrix,i.origin)),new t("localOrigin",r=>r.origin));const a=({camera:r})=>e(p,r.viewInverseTransposeMatrix[3],r.viewInverseTransposeMatrix[7],r.viewInverseTransposeMatrix[11]);i.uniforms.add(s,new c("view",i=>r(v,i.camera.viewMatrix,a(i))),new n("localOrigin",r=>a(r)))}const v=i(),p=a();function w(r){r.uniforms.add(new m("pixelRatio",r=>r.camera.pixelRatio/r.overlayStretch))}export{d as addCameraPosition,w as addPixelRatio,l as addProjViewLocalOrigin};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{set as e}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as r}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{Float2BindUniform as i}from"../../shaderModules/Float2BindUniform.js";import{Float4BindUniform as a}from"../../shaderModules/Float4BindUniform.js";import{FloatBindUniform as o}from"../../shaderModules/FloatBindUniform.js";import{Matrix4BindUniform as t}from"../../shaderModules/Matrix4BindUniform.js";const n=new t("view",({camera:e})=>e.viewMatrix),m=new t("inverseViewMatrix",({camera:e})=>e.inverseViewMatrix),s=new t("proj",({camera:e})=>e.projectionMatrix),l=new t("inverseProjectionMatrix",({camera:e})=>e.inverseProjectionMatrix),c=new t("viewNormal",({camera:e})=>e.viewInverseTransposeMatrix),w=new i("nearFar",({camera:e})=>e.nearFar),f=new a("viewport",({camera:e})=>e.fullViewport),p=new o("pixelRatio",({camera:e})=>e.pixelRatio),d=new i("inverseScreenSize",({camera:r})=>e(v,1/r.fullWidth,1/r.fullHeight)),v=r();export{l as inverseProjMatrix,d as inverseScreenSize,m as inverseViewMatrix,w as nearFar,p as pixelRatio,s as projMatrix,n as viewMatrix,c as viewNormal,f as viewport};
2
+ import{set as e}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as r}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{Float2BindUniform as i}from"../../shaderModules/Float2BindUniform.js";import{Float4BindUniform as a}from"../../shaderModules/Float4BindUniform.js";import{FloatBindUniform as o}from"../../shaderModules/FloatBindUniform.js";import{Matrix4BindUniform as t}from"../../shaderModules/Matrix4BindUniform.js";const n=new t("view",({camera:e})=>e.viewMatrix),m=new t("inverseViewMatrix",({camera:e})=>e.inverseViewMatrix),s=new t("proj",({camera:e})=>e.projectionMatrix),l=new t("inverseProjectionMatrix",({camera:e})=>e.inverseProjectionMatrix),c=new t("viewNormal",({camera:e})=>e.viewInverseTransposeMatrix),w=new i("nearFar",({camera:e})=>e.nearFar),f=new a("viewport",({camera:e})=>e.fullViewport),p=new o("pixelRatio",({camera:e})=>e.pixelRatio),d=new i("inverseScreenSize",({camera:r})=>e(v,1/r.fullWidth,1/r.fullHeight)),v=r();export{l as inverseProjectionMatrix,d as inverseScreenSize,m as inverseViewMatrix,w as nearFar,p as pixelRatio,s as projMatrix,n as viewMatrix,c as viewNormal,f as viewport};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{watch as s}from"../../../../../core/reactiveUtils.js";import{property as t,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ZEROS as i}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as o}from"../../../webgl.js";import a from"../../../webgl/RenderNode.js";import{F as n}from"../../../../../chunks/FocusArea.glsl.js";import{FocusAreaTechnique as c}from"./FocusAreaTechnique.js";import{EmissiveTechniqueConfiguration as h}from"../../shaders/EmissiveTechniqueConfiguration.js";let m=class extends a{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[o.FOCUSAREA,o.FOCUSAREA_MASK]},this.produces=o.FOCUSAREA,this._fadeDirection=0,this._configuration=new h,this._passParameters=new n}fadeOut(e){this.removeAllHandles(),this._startTime=null,this._fadeDirection=1,this.addHandles(s(()=>this._passParameters.fadeFactor.value,s=>{0===s&&(this.removeAllHandles(),e())})),this.requestRender(2)}precompile(){this._configuration.hasEmissive=0!==this.bindParameters.emissions,this.techniques.precompile(c,this._configuration)}render(e){const s=this.bindParameters;this._startTime??=this.view.stage?.renderer.renderContext.time;const t=this.view.qualitySettings.fadeDuration,r=t>0?Math.min(t,this.view.stage?.renderer.renderContext.time-this._startTime)/t:1,a=this.renderingContext,n=this.techniques.get(c,this._configuration),h=this.input,m=e.find(({name:e})=>e===o.FOCUSAREA_MASK),f="bright"===this.focusAreasView.style;this._passParameters.color=f?h.getTexture():a.emptyTexture,this._passParameters.focusArea=m.getTexture(),this._passParameters.effect=u[this.focusAreasView.style],this._passParameters.fadeFactor.value=0===this._fadeDirection?r:1-r;const d=s.camera,p=d.fullViewport[2],l=d.fullViewport[3],A=f?this.fboCache.acquire(p,l,this.produces).moveAttachments(h):h;return a.bindFramebuffer(A.fbo),f&&a.clearBuffer(0,i),a.bindTechnique(n,s,this._passParameters),a.screen.draw(),r<1&&this.requestRender(2),A}};e([t()],m.prototype,"consumes",void 0),e([t()],m.prototype,"produces",void 0),e([t({constructOnly:!0})],m.prototype,"focusAreasView",void 0),m=e([r("esri.views.3d.webgl-engine.effects.focusArea.FocusArea")],m);const u={bright:0,dark:1};export{m as FocusArea,u as styleToEffect};
2
+ import{__decorate as e}from"tslib";import{watch as s}from"../../../../../core/reactiveUtils.js";import{property as t,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{InternalRenderCategory as i}from"../../../webgl.js";import o from"../../../webgl/RenderNode.js";import{F as a}from"../../../../../chunks/FocusArea.glsl.js";import{FocusAreaTechnique as n}from"./FocusAreaTechnique.js";import{EmissiveTechniqueConfiguration as c}from"../../shaders/EmissiveTechniqueConfiguration.js";import{ColorAttachment1 as m,SizedPixelFormat as h}from"../../../../webgl/enums.js";let u=class extends o{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[i.FOCUSAREA,i.FOCUSAREA_MASK]},this.produces=i.FOCUSAREA,this._fadeDirection=0,this._configuration=new c,this._passParameters=new a}fadeOut(e){this.removeAllHandles(),this._startTime=null,this._fadeDirection=1,this.addHandles(s(()=>this._passParameters.fadeFactor.value,s=>{0===s&&(this.removeAllHandles(),e())})),this.requestRender(2)}precompile(){this._configuration.hasEmissive=0!==this.bindParameters.emissions,this.techniques.precompile(n,this._configuration)}render(e){const s=this.bindParameters;this._startTime??=this.view.stage?.renderer.renderContext.time;const t=this.view.qualitySettings.fadeDuration,r=t>0?Math.min(t,this.view.stage?.renderer.renderContext.time-this._startTime)/t:1,o=this.renderingContext,a=this.techniques.get(n,this._configuration),c=this.input,u=e.find(({name:e})=>e===i.FOCUSAREA_MASK),d="bright"===this.focusAreasView.style;this._passParameters.color=this._passParameters.emission=o.emptyTexture,this._passParameters.focusArea=u.getTexture(),this._passParameters.effect=f[this.focusAreasView.style],this._passParameters.fadeFactor.value=0===this._fadeDirection?r:1-r;const p=s.camera,l=p.fullViewport[2],_=p.fullViewport[3],A=d?this.fboCache.acquire(l,_,this.produces):c;if(d){if(this._passParameters.color=c.getTexture(),this._configuration.hasEmissive){this._passParameters.emission=c.getTexture(m);const e=this._passParameters.emission?.descriptor.internalFormat===h.RGBA16F?8:5;A.acquireColor(m,e,"emissive")}A.moveAttachments(c),o.bindFramebuffer(A.fbo),o.setClearColor(0,0,0,0),o.clear(16384)}else o.bindFramebuffer(A.fbo);return o.bindTechnique(a,s,this._passParameters),o.screen.draw(),r<1&&this.requestRender(2),A}};e([t()],u.prototype,"consumes",void 0),e([t()],u.prototype,"produces",void 0),e([t({constructOnly:!0})],u.prototype,"focusAreasView",void 0),u=e([r("esri.views.3d.webgl-engine.effects.focusArea.FocusArea")],u);const f={bright:0,dark:1};export{u as FocusArea,f as styleToEffect};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{releaseMaybe as t}from"../../../../../core/maybe.js";import{watch as s,syncAndInitial as a}from"../../../../../core/reactiveUtils.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{set as i}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{UNIT_W as l,ZEROS as o}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as u}from"../../../webgl.js";import{AmbientIllumination as n}from"../AmbientIllumination.js";import{G as m}from"../../../../../chunks/GlobalIllumination.glsl.js";import{G as h}from"../../../../../chunks/GlobalIlluminationBlur.glsl.js";import{GlobalIlluminationBlurTechnique as c}from"./GlobalIlluminationBlurTechnique.js";import{GlobalIlluminationTechnique as p}from"./GlobalIlluminationTechnique.js";import{GlobalIlluminationTechniqueConfiguration as _}from"./GlobalIlluminationTechniqueConfiguration.js";import{G as d}from"../../../../../chunks/GlobalIlluminationUpscale.glsl.js";import{GlobalIlluminationUpscaleTechnique as f}from"./GlobalIlluminationUpscaleTechnique.js";import{DepthStencilAttachment as b,ColorAttachment1 as g}from"../../../../webgl/enums.js";const w=1,P=100;let x=class extends n{constructor(e){super(e),this._passParameters=new m,this._drawParameters=new h,this._drawParametersUpscale=new d,this._maxFrames=256,this._lowQualityResolutionScale=.35,this._configuration=new _,this._lastOutput=null,this._isGlobalIlluminationUpdate=!1,this._resetBuffer=!1}initialize(){this.addHandles(s(()=>this._mode,e=>{0===e?this._disable():this._enable()},a))}destroy(){this._lastOutput=t(this._lastOutput)}_disable(){super._disable(),this._resetAccumulation(),this._passParameters.temporalSampleFrame=0}get hasHighQuality(){return 2===this._mode}resetAccumulation(){this._isGlobalIlluminationUpdate||!(this._passParameters.accumulatedFrames>P)&&this._configuration.hasEmission||this._resetAccumulation()}precompile(){this.techniques.getCompiled(f)}render(e){if(this._passParameters.accumulatedFrames>=this._maxFrames)return this._lastOutput?.retain(),this._lastOutput;const t=e.find(({name:e})=>"normals"===e),s=t?.getTexture(),a=t?.getTexture(b),r=this._mode;if(!s||!a)return this._emptyOutput;if(0===r)return this._resetBuffer=!1,this._emptyOutput;if(!this._canRender)return this._resetBuffer=!1,this._requestRender(),this._emptyOutput;const l=this.bindParameters;this._configuration.hasEmission=!!l.reprojection.lastFrameEmission;const o=this.techniques.getCompiled(p,this._configuration),n=this.techniques.getCompiled(c),m=1===r,h=m?this._lowQualityResolutionScale:1,_=m?this.techniques.getCompiled(f):null;if(!o||!n||m&&!_)return this._requestRender(),this._emptyOutput;const d=this.renderingContext,{camera:P}=l;this._passParameters.normalTexture=s,this._passParameters.depthTexture=a,this._passParameters.projScale=1/P.computeScreenPixelSizeAtDist(1),this._passParameters.scaleGlobalIllumination=h;const{fullWidth:x,fullHeight:I}=P,T=Math.max(1,Math.floor(x*h)),q=Math.max(1,Math.floor(I*h)),F=this.fboCache.acquire(T,q,"global illumination input").acquireColor(g,2);d.bindFramebuffer(F.fbo),d.setViewport(0,0,T,q),d.bindTechnique(o,l,this._passParameters,this._drawParameters),d.screen.draw();const O=F.obtainAttachment(g),C=Math.max(1,Math.round(T/w)),j=Math.max(1,Math.round(q/w)),G=this.fboCache.acquire(C,j,"global illumination blur horizontal");d.bindFramebuffer(G.fbo),this._drawParameters.texture=F.getTexture(),this._drawParameters.weightTexture=O.attachment,i(this._drawParameters.blurSize,0,w/q),d.bindTechnique(n,l,this._passParameters,this._drawParameters),d.setViewport(0,0,C,j),d.screen.draw(),F.release();const S=m?"global illumination blur vertical":u.AMBIENT_ILLUMINATION,y=this.fboCache.acquire(C,j,S);d.bindFramebuffer(y.fbo),d.setViewport(0,0,C,j),d.setClearColor(1,1,1,0),d.clear(16384),this._drawParameters.texture=G.getTexture(),this._drawParameters.weightTexture=O.attachment,i(this._drawParameters.blurSize,w/C,0),d.bindTechnique(n,l,this._passParameters,this._drawParameters),d.setViewport(0,0,C,j),d.screen.draw(),G.release(),y.attachColor(O,g),O.release();let M=y;return _&&(M=this.fboCache.acquire(x,I,u.AMBIENT_ILLUMINATION).acquireColor(g,2),d.bindFramebuffer(M.fbo),d.setViewport(0,0,x,I),d.setClearColor(1,1,1,0),d.clear(16384),this._drawParametersUpscale.colorTexture=y.getTexture(),this._drawParametersUpscale.weightTexture=y.getTexture(g),d.bindTechnique(_,l,this._passParameters,this._drawParametersUpscale),d.screen.draw(),y.release()),d.setViewport4fv(P.fullViewport),this._passParameters.temporalSampleFrame=(this._passParameters.temporalSampleFrame+1)%64,++this._passParameters.accumulatedFrames,this._storeOutput(M),this._passParameters.accumulatedFrames<this._maxFrames&&this._requestRender(),M}_requestRender(){this._isGlobalIlluminationUpdate=!0,this.requestRender(1),this._isGlobalIlluminationUpdate=!1}_storeOutput(e){this._lastOutput!==e&&(this._lastOutput=t(this._lastOutput),this._lastOutput=e,this._lastOutput.retain())}get _emptyOutput(){const e=this.renderingContext,{fullWidth:t,fullHeight:s}=this.bindParameters.camera,a=this.fboCache.acquire(t,s,u.AMBIENT_ILLUMINATION).acquireColor(g,2);return e.bindFramebuffer(a.fbo),e.setViewport(0,0,t,s),e.clearBuffer(0,l),e.clearBuffer(1,o),a}get _canRender(){const{reprojection:e,hasEmission:t,globalIllumination:s}=this.bindParameters;return!(!e.lastFrameColor||t&&!e.lastFrameEmission||!e.lastFrameDepth||!s||this._resetBuffer)}get _mode(){return this._useGlobalIllumination?this.view.stage.renderer.isFeatureEnabled(10)?2:1:0}_resetAccumulation(){this._passParameters.accumulatedFrames=0,this._lastOutput=t(this._lastOutput)}get test(){const e=this;return{passParameters:this._passParameters,configuration:this._configuration,get maxFrames(){return e._maxFrames},set maxFrames(t){e._maxFrames=t},get lowQualityResolutionScale(){return e._lowQualityResolutionScale},set lowQualityResolutionScale(t){e._lowQualityResolutionScale=t},get mode(){return e._mode}}}};x=e([r("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination")],x);export{x as GlobalIllumination,w as blurSizePixels};
2
+ import{__decorate as t}from"tslib";import{releaseMaybe as e}from"../../../../../core/maybe.js";import{watch as s,syncAndInitial as r}from"../../../../../core/reactiveUtils.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators.js";import{set as i}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{UNIT_W as l,ZEROS as o}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as u}from"../../../webgl.js";import{AmbientIllumination as n}from"../AmbientIllumination.js";import{G as m}from"../../../../../chunks/GlobalIllumination.glsl.js";import{G as h}from"../../../../../chunks/GlobalIlluminationBlur.glsl.js";import{GlobalIlluminationBlurTechnique as c}from"./GlobalIlluminationBlurTechnique.js";import{GlobalIlluminationTechnique as p}from"./GlobalIlluminationTechnique.js";import{GlobalIlluminationTechniqueConfiguration as _}from"./GlobalIlluminationTechniqueConfiguration.js";import{G as d}from"../../../../../chunks/GlobalIlluminationUpscale.glsl.js";import{GlobalIlluminationUpscaleTechnique as f}from"./GlobalIlluminationUpscaleTechnique.js";import{DepthStencilAttachment as b,ColorAttachment1 as g}from"../../../../webgl/enums.js";const w=1,P=256,I=100;let T=class extends n{constructor(t){super(t),this._passParameters=new m,this._drawParameters=new h,this._drawParametersUpscale=new d,this._lowQualityResolutionScale=.35,this._configuration=new _,this._lastOutput=null,this._isGlobalIlluminationUpdate=!1,this._resetBuffer=!1}initialize(){this.addHandles(s(()=>this._mode,t=>{0===t?this._disable():this._enable()},r))}destroy(){this._lastOutput=e(this._lastOutput)}_disable(){super._disable(),this._resetAccumulation(),this._passParameters.temporalSampleFrame=0}get hasHighQuality(){return 2===this._mode}resetAccumulation(){this._isGlobalIlluminationUpdate||!(this._passParameters.accumulatedFrames>I)&&this._configuration.hasEmission||this._resetAccumulation()}_resetAccumulation(){this._passParameters.accumulatedFrames=0,this._lastOutput=e(this._lastOutput)}precompile(){this.techniques.getCompiled(f)}render(t){if(this._passParameters.accumulatedFrames>=P)return this._lastOutput?.retain(),this._lastOutput;const e=t.find(({name:t})=>"normals"===t),s=e?.getTexture(),r=e?.getTexture(b),a=this._mode;if(!s||!r)return this._emptyOutput;if(0===a)return this._resetBuffer=!1,this._emptyOutput;if(!this._canRender)return this._resetBuffer=!1,this._requestRender(),this._emptyOutput;const l=this.bindParameters;this._configuration.hasEmission=!!l.reprojection.lastFrameEmission;const o=this.techniques.getCompiled(p,this._configuration),n=this.techniques.getCompiled(c),m=1===a,h=m?this._lowQualityResolutionScale:1,_=m?this.techniques.getCompiled(f):null;if(!o||!n||m&&!_)return this._requestRender(),this._emptyOutput;const d=this.renderingContext,{camera:I}=l;this._passParameters.normalTexture=s,this._passParameters.depthTexture=r,this._passParameters.projScale=1/I.computeScreenPixelSizeAtDist(1),this._passParameters.scaleGlobalIllumination=h;const{fullWidth:T,fullHeight:q}=I,x=Math.max(1,Math.floor(T*h)),O=Math.max(1,Math.floor(q*h)),C=this.fboCache.acquire(x,O,"global illumination input").acquireColor(g,2);d.bindFramebuffer(C.fbo),d.setViewport(0,0,x,O),d.bindTechnique(o,l,this._passParameters,this._drawParameters),d.screen.draw();const j=Math.max(1,Math.round(x/w)),F=Math.max(1,Math.round(O/w)),G=this.fboCache.acquire(j,F,"global illumination blur horizontal");d.bindFramebuffer(G.fbo);const M=C.obtainAttachment(g);this._drawParameters.texture=C.getTexture(),this._drawParameters.weightTexture=M.attachment,i(this._drawParameters.blurSize,0,w/O),d.bindTechnique(n,l,this._passParameters,this._drawParameters),d.setViewport(0,0,j,F),d.screen.draw(),C.release();const U=m?"global illumination blur vertical":u.AMBIENT_ILLUMINATION,A=this.fboCache.acquire(j,F,U);d.bindFramebuffer(A.fbo),d.setViewport(0,0,j,F),d.setClearColor(1,1,1,0),d.clear(16384),this._drawParameters.texture=G.getTexture(),this._drawParameters.weightTexture=M.attachment,i(this._drawParameters.blurSize,w/j,0),d.bindTechnique(n,l,this._passParameters,this._drawParameters),d.setViewport(0,0,j,F),d.screen.draw(),G.release(),A.attachColor(M,g),M.release();let B=A;return _&&(B=this.fboCache.acquire(T,q,u.AMBIENT_ILLUMINATION).acquireColor(g,2),d.bindFramebuffer(B.fbo),d.setViewport(0,0,T,q),d.setClearColor(1,1,1,0),d.clear(16384),this._drawParametersUpscale.colorTexture=A.getTexture(),this._drawParametersUpscale.weightTexture=A.getTexture(g),d.bindTechnique(_,l,this._passParameters,this._drawParametersUpscale),d.screen.draw(),A.release()),d.setViewport4fv(I.fullViewport),this._passParameters.temporalSampleFrame=(this._passParameters.temporalSampleFrame+1)%64,++this._passParameters.accumulatedFrames,this._storeOutput(B),this._passParameters.accumulatedFrames<P&&this._requestRender(),B}_requestRender(){this._isGlobalIlluminationUpdate=!0,this.requestRender(1),this._isGlobalIlluminationUpdate=!1}_storeOutput(t){this._lastOutput!==t&&(this._lastOutput=e(this._lastOutput),this._lastOutput=t,this._lastOutput.retain())}get _emptyOutput(){const t=this.renderingContext,{fullWidth:e,fullHeight:s}=this.bindParameters.camera,r=this.fboCache.acquire(e,s,u.AMBIENT_ILLUMINATION).acquireColor(g,2);return t.bindFramebuffer(r.fbo),t.setViewport(0,0,e,s),t.clearBuffer(0,l),t.clearBuffer(1,o),r}get _canRender(){const{reprojection:t,hasEmission:e,globalIllumination:s}=this.bindParameters;return!(!t.lastFrameColor||e&&!t.lastFrameEmission||!t.lastFrameDepth||!s||this._resetBuffer)}get _mode(){return this._useGlobalIllumination?this.view.stage.renderer.isFeatureEnabled(10)?2:1:0}get test(){const t=this;return{passParameters:this._passParameters,configuration:this._configuration,get mode(){return t._mode}}}};T=t([a("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination")],T);export{T as GlobalIllumination,w as blurSizePixels,P as maxFrames};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../../core/libs/gl-matrix-2/math/vec3.js";import"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../../core/shaderLibrary/NormalFromDepth.glsl.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js";import"../../core/shaderLibrary/shading/ShadowmapFiltering.glsl.js";import"../../core/shaderLibrary/util/blendEmission.glsl.js";import"../../core/shaderModules/Float3BindUniform.js";import"../../core/shaderModules/Float4PassUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DShadowBindUniform.js";import"../../core/shaderModules/Texture2DUintPassUniform.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/ShadowHighlight.glsl.js";
2
+ import"../../../../../core/libs/gl-matrix-2/math/vec3.js";import"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../../core/shaderLibrary/NormalFromDepth.glsl.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js";import"../../core/shaderLibrary/util/blendEmission.glsl.js";import"../../core/shaderModules/Float3BindUniform.js";import"../../core/shaderModules/Float4PassUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DShadowBindUniform.js";import"../../core/shaderModules/Texture2DUintPassUniform.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/ShadowHighlight.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/shading/calculateUVZShadowFromDepth.glsl.js";import"../../core/shaderLibrary/shading/ShadowmapFiltering.glsl.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DShadowBindUniform.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/ShadowHighlightBuffer.glsl.js";
2
+ import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DShadowBindUniform.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/ShadowHighlightBuffer.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{fromValues as r}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ReadShadowMapPassParameters as t}from"../../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{ReloadableShader as o}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../../core/shaderTechnique/ShaderTechnique.js";import{S as h}from"../../../../../chunks/ShadowHighlight.glsl.js";import{PrimitiveType as a}from"../../../../webgl/enums.js";import{makePipelineState as l,defaultColorWrite as c,unpremultipliedAlphaToPremultipliedAlpha as d}from"../../../../webgl/renderState.js";class n extends t{constructor(){super(...arguments),this.shadowColor=r(1,0,1,1),this.shadowOpacity=.2,this.occludedShadowOpacity=.1,this.opacityElevation=1,this.dayNightTerminator=1}}let p=class extends s{constructor(){super(...arguments),this.shader=new o(h,()=>import("./ShadowHighlight.glsl.js")),this.ignoreUnused=!0,this.primitiveType=a.TRIANGLE_STRIP}initializePipeline(){return l({blending:d,colorWrite:c,depthTest:null,depthWrite:null})}};p=e([i("esri.views.3d.webgl-engine.effects.highlight.ShadowHighlightTechnique")],p);export{n as ShadowHighlightPassParameters,p as ShadowHighlightTechnique};
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{fromValues as i}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ReadShadowMapPassParameters as t}from"../../core/shaderLibrary/shading/readShadow.glsl.js";import{ReloadableShader as o}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../../core/shaderTechnique/ShaderTechnique.js";import{S as h}from"../../../../../chunks/ShadowHighlight.glsl.js";import{PrimitiveType as a}from"../../../../webgl/enums.js";import{makePipelineState as l,defaultColorWrite as c,unpremultipliedAlphaToPremultipliedAlpha as d}from"../../../../webgl/renderState.js";class n extends t{constructor(){super(...arguments),this.shadowColor=i(1,0,1,1),this.shadowOpacity=.2,this.occludedShadowOpacity=.1,this.opacityElevation=1,this.dayNightTerminator=1}}let m=class extends s{constructor(){super(...arguments),this.shader=new o(h,()=>import("./ShadowHighlight.glsl.js")),this.ignoreUnused=!0,this.primitiveType=a.TRIANGLE_STRIP}initializePipeline(){return l({blending:d,colorWrite:c,depthTest:null,depthWrite:null})}};m=e([r("esri.views.3d.webgl-engine.effects.highlight.ShadowHighlightTechnique")],m);export{n as ShadowHighlightPassParameters,m as ShadowHighlightTechnique};